@maptiler/geocoding-control 3.0.0 → 3.1.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +455 -383
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +118 -98
- package/dist/index.umd.js.map +1 -1
- package/dist/leaflet.js +520 -448
- package/dist/leaflet.js.map +1 -1
- package/dist/leaflet.umd.js +121 -101
- package/dist/leaflet.umd.js.map +1 -1
- package/dist/maplibregl.js +454 -382
- package/dist/maplibregl.js.map +1 -1
- package/dist/maplibregl.umd.js +120 -100
- package/dist/maplibregl.umd.js.map +1 -1
- package/dist/maptilersdk.js +466 -394
- package/dist/maptilersdk.js.map +1 -1
- package/dist/maptilersdk.umd.js +120 -100
- package/dist/maptilersdk.umd.js.map +1 -1
- package/dist/openlayers.js +610 -538
- package/dist/openlayers.js.map +1 -1
- package/dist/openlayers.umd.js +121 -101
- package/dist/openlayers.umd.js.map +1 -1
- package/dist/src/geocoder/geocoder.d.ts +14 -2
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { css as
|
|
2
|
-
import { customElement as
|
|
3
|
-
import { convert as
|
|
4
|
-
import { classMap as
|
|
5
|
-
import { repeat as
|
|
1
|
+
import { css as E, LitElement as O, svg as N, html as f, unsafeCSS as xe, nothing as X } from "lit";
|
|
2
|
+
import { customElement as S, property as h, state as y, queryAssignedElements as I } from "lit/decorators.js";
|
|
3
|
+
import { convert as je } from "geo-coordinates-parser";
|
|
4
|
+
import { classMap as V } from "lit/directives/class-map.js";
|
|
5
|
+
import { repeat as Re } from "lit/directives/repeat.js";
|
|
6
6
|
import "@turf/clone";
|
|
7
|
-
import { styleMap as
|
|
8
|
-
var
|
|
9
|
-
for (var
|
|
10
|
-
(
|
|
11
|
-
return
|
|
7
|
+
import { styleMap as Ve } from "lit/directives/style-map.js";
|
|
8
|
+
var De = Object.getOwnPropertyDescriptor, qe = (e, t, r, n) => {
|
|
9
|
+
for (var l = n > 1 ? void 0 : n ? De(t, r) : t, p = e.length - 1, c; p >= 0; p--)
|
|
10
|
+
(c = e[p]) && (l = c(l) || l);
|
|
11
|
+
return l;
|
|
12
12
|
};
|
|
13
|
-
let
|
|
13
|
+
let Y = class extends O {
|
|
14
14
|
render() {
|
|
15
|
-
return
|
|
15
|
+
return N`
|
|
16
16
|
<svg viewBox="0 0 14 14" width="13" height="13">
|
|
17
17
|
<path
|
|
18
18
|
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"
|
|
@@ -21,23 +21,23 @@ let Q = class extends F {
|
|
|
21
21
|
`;
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
|
-
|
|
24
|
+
Y.styles = E`
|
|
25
25
|
svg {
|
|
26
26
|
display: block;
|
|
27
|
-
fill: var(--color-icon-button);
|
|
27
|
+
fill: var(--color-icon-button, #444952);
|
|
28
28
|
}
|
|
29
29
|
`;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
],
|
|
33
|
-
var
|
|
34
|
-
for (var
|
|
35
|
-
(
|
|
36
|
-
return
|
|
37
|
-
};
|
|
38
|
-
let
|
|
30
|
+
Y = qe([
|
|
31
|
+
S("maptiler-geocode-clear-icon")
|
|
32
|
+
], Y);
|
|
33
|
+
var Ne = Object.getOwnPropertyDescriptor, Ke = (e, t, r, n) => {
|
|
34
|
+
for (var l = n > 1 ? void 0 : n ? Ne(t, r) : t, p = e.length - 1, c; p >= 0; p--)
|
|
35
|
+
(c = e[p]) && (l = c(l) || l);
|
|
36
|
+
return l;
|
|
37
|
+
};
|
|
38
|
+
let ee = class extends O {
|
|
39
39
|
render() {
|
|
40
|
-
return
|
|
40
|
+
return N`
|
|
41
41
|
<svg viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
42
42
|
<path
|
|
43
43
|
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"
|
|
@@ -46,21 +46,21 @@ let H = class extends F {
|
|
|
46
46
|
`;
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
|
-
|
|
49
|
+
ee.styles = E`
|
|
50
50
|
svg {
|
|
51
51
|
display: block;
|
|
52
|
-
fill: #e15042;
|
|
52
|
+
fill: var(--color-fail-icon, #e15042);
|
|
53
53
|
}
|
|
54
54
|
`;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
],
|
|
58
|
-
var
|
|
59
|
-
for (var
|
|
60
|
-
(
|
|
61
|
-
return
|
|
62
|
-
};
|
|
63
|
-
let
|
|
55
|
+
ee = Ke([
|
|
56
|
+
S("maptiler-geocode-fail-icon")
|
|
57
|
+
], ee);
|
|
58
|
+
var Ze = Object.getOwnPropertyDescriptor, He = (e, t, r, n) => {
|
|
59
|
+
for (var l = n > 1 ? void 0 : n ? Ze(t, r) : t, p = e.length - 1, c; p >= 0; p--)
|
|
60
|
+
(c = e[p]) && (l = c(l) || l);
|
|
61
|
+
return l;
|
|
62
|
+
};
|
|
63
|
+
let te = class extends O {
|
|
64
64
|
render() {
|
|
65
65
|
return f`
|
|
66
66
|
<div>
|
|
@@ -72,7 +72,7 @@ let J = class extends F {
|
|
|
72
72
|
`;
|
|
73
73
|
}
|
|
74
74
|
};
|
|
75
|
-
|
|
75
|
+
te.styles = E`
|
|
76
76
|
div {
|
|
77
77
|
position: absolute;
|
|
78
78
|
left: 50%;
|
|
@@ -99,17 +99,17 @@ J.styles = L`
|
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
`;
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
],
|
|
105
|
-
var
|
|
106
|
-
for (var
|
|
107
|
-
(
|
|
108
|
-
return
|
|
109
|
-
};
|
|
110
|
-
let
|
|
102
|
+
te = He([
|
|
103
|
+
S("maptiler-geocode-loading-icon")
|
|
104
|
+
], te);
|
|
105
|
+
var Qe = Object.getOwnPropertyDescriptor, Je = (e, t, r, n) => {
|
|
106
|
+
for (var l = n > 1 ? void 0 : n ? Qe(t, r) : t, p = e.length - 1, c; p >= 0; p--)
|
|
107
|
+
(c = e[p]) && (l = c(l) || l);
|
|
108
|
+
return l;
|
|
109
|
+
};
|
|
110
|
+
let ie = class extends O {
|
|
111
111
|
render() {
|
|
112
|
-
return
|
|
112
|
+
return N`
|
|
113
113
|
<svg viewBox="0 0 60.006 21.412" width="14" height="20">
|
|
114
114
|
<path
|
|
115
115
|
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"
|
|
@@ -118,23 +118,23 @@ let X = class extends F {
|
|
|
118
118
|
`;
|
|
119
119
|
}
|
|
120
120
|
};
|
|
121
|
-
|
|
121
|
+
ie.styles = E`
|
|
122
122
|
svg {
|
|
123
123
|
display: block;
|
|
124
|
-
fill: var(--color-icon-button);
|
|
124
|
+
fill: var(--color-icon-button, #444952);
|
|
125
125
|
}
|
|
126
126
|
`;
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
],
|
|
130
|
-
var
|
|
131
|
-
for (var
|
|
132
|
-
(
|
|
133
|
-
return
|
|
134
|
-
};
|
|
135
|
-
let
|
|
127
|
+
ie = Je([
|
|
128
|
+
S("maptiler-geocode-reverse-geocoding-icon")
|
|
129
|
+
], ie);
|
|
130
|
+
var Xe = Object.getOwnPropertyDescriptor, Ye = (e, t, r, n) => {
|
|
131
|
+
for (var l = n > 1 ? void 0 : n ? Xe(t, r) : t, p = e.length - 1, c; p >= 0; p--)
|
|
132
|
+
(c = e[p]) && (l = c(l) || l);
|
|
133
|
+
return l;
|
|
134
|
+
};
|
|
135
|
+
let se = class extends O {
|
|
136
136
|
render() {
|
|
137
|
-
return
|
|
137
|
+
return N`
|
|
138
138
|
<svg
|
|
139
139
|
xmlns="http://www.w3.org/2000/svg"
|
|
140
140
|
width="13"
|
|
@@ -147,7 +147,7 @@ let Y = class extends F {
|
|
|
147
147
|
`;
|
|
148
148
|
}
|
|
149
149
|
};
|
|
150
|
-
|
|
150
|
+
se.styles = E`
|
|
151
151
|
circle {
|
|
152
152
|
stroke-width: 1.875;
|
|
153
153
|
fill: none;
|
|
@@ -160,50 +160,50 @@ Y.styles = L`
|
|
|
160
160
|
|
|
161
161
|
svg {
|
|
162
162
|
display: block;
|
|
163
|
-
stroke: var(--color-icon-button);
|
|
163
|
+
stroke: var(--color-icon-button, #444952);
|
|
164
164
|
}
|
|
165
165
|
`;
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
],
|
|
169
|
-
function
|
|
170
|
-
const n = t[1],
|
|
171
|
-
return e === n &&
|
|
166
|
+
se = Ye([
|
|
167
|
+
S("maptiler-geocode-search-icon")
|
|
168
|
+
], se);
|
|
169
|
+
function et(e, t, r) {
|
|
170
|
+
const n = t[1], l = t[0], p = n - l;
|
|
171
|
+
return e === n && r ? e : ((e - l) % p + p) % p + l;
|
|
172
172
|
}
|
|
173
|
-
let
|
|
174
|
-
async function
|
|
173
|
+
let P;
|
|
174
|
+
async function tt(e, t, r) {
|
|
175
175
|
for (const n of t ?? [])
|
|
176
176
|
if (!(e && (n.minZoom != null && n.minZoom > e[0] || n.maxZoom != null && n.maxZoom < e[0]))) {
|
|
177
177
|
if (n.type === "fixed")
|
|
178
178
|
return n.coordinates.join(",");
|
|
179
179
|
if (n.type === "client-geolocation")
|
|
180
|
-
if (
|
|
181
|
-
if (
|
|
182
|
-
return
|
|
180
|
+
if (P && n.cachedLocationExpiry && P.time + n.cachedLocationExpiry > Date.now()) {
|
|
181
|
+
if (P.coords)
|
|
182
|
+
return P.coords;
|
|
183
183
|
} else {
|
|
184
|
-
let
|
|
184
|
+
let l;
|
|
185
185
|
try {
|
|
186
|
-
return
|
|
187
|
-
|
|
188
|
-
|
|
186
|
+
return l = await new Promise((p, c) => {
|
|
187
|
+
r.signal.addEventListener("abort", () => {
|
|
188
|
+
c(Error("aborted"));
|
|
189
189
|
}), navigator.geolocation.getCurrentPosition(
|
|
190
|
-
(
|
|
191
|
-
p([
|
|
190
|
+
(w) => {
|
|
191
|
+
p([w.coords.longitude, w.coords.latitude].map((x) => x.toFixed(6)).join(","));
|
|
192
192
|
},
|
|
193
|
-
(
|
|
194
|
-
|
|
193
|
+
(w) => {
|
|
194
|
+
c(w);
|
|
195
195
|
},
|
|
196
196
|
n
|
|
197
197
|
);
|
|
198
|
-
}),
|
|
198
|
+
}), l;
|
|
199
199
|
} catch {
|
|
200
200
|
} finally {
|
|
201
|
-
n.cachedLocationExpiry && (
|
|
201
|
+
n.cachedLocationExpiry && (P = {
|
|
202
202
|
time: Date.now(),
|
|
203
|
-
coords:
|
|
203
|
+
coords: l
|
|
204
204
|
});
|
|
205
205
|
}
|
|
206
|
-
if (
|
|
206
|
+
if (r.signal.aborted)
|
|
207
207
|
return;
|
|
208
208
|
}
|
|
209
209
|
if (n.type === "server-geolocation")
|
|
@@ -212,21 +212,21 @@ async function Ze(e, t, i) {
|
|
|
212
212
|
return e[1].toFixed(6) + "," + e[2].toFixed(6);
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
|
-
const
|
|
216
|
-
var
|
|
215
|
+
const it = ".sprite-icon{align-self:center;justify-self:center;opacity:var(--icon-items-opacity, .75);background-repeat:no-repeat}li{text-align:left;cursor:default;display:grid;grid-template-columns:40px 1fr;color:var(--color-items, #444952);padding:8px 0;font-size:var(--font-size-items, 14px);line-height:1.3;min-width:fit-content;outline:0}li:first-child{padding-top:10px}li:last-child{padding-bottom:10px}li.picked{background-color:var(--color-items-picked-bg, #e7edff)}li.picked .secondary,li.picked .line2{color:var(--color-items-picked-secondary, #96a4c7)}li.selected{background-color:var(--color-items-selected-bg, #f3f6ff);animation:backAndForth 5s linear infinite}li.selected .primary{color:var(--color-items-selected, #2b8bfb)}li.selected .secondary,li.selected .line2{color:var(--color-items-selected-secondary, #a2adc7)}li>img{align-self:center;justify-self:center;opacity:var(--icon-opacity, .75)}.texts{padding:0 17px 0 0}.texts>*{white-space:nowrap;display:block;min-width:fit-content}.primary{font-weight:600}.secondary{color:var(--color-items-secondary, #aeb6c7);padding-left:4px}.line2{color:var(--color-items-secondary, #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)}}";
|
|
216
|
+
var st = Object.defineProperty, rt = Object.getOwnPropertyDescriptor, be = (e) => {
|
|
217
217
|
throw TypeError(e);
|
|
218
|
-
},
|
|
219
|
-
for (var
|
|
220
|
-
(
|
|
221
|
-
return n &&
|
|
222
|
-
},
|
|
223
|
-
const
|
|
224
|
-
let
|
|
218
|
+
}, $ = (e, t, r, n) => {
|
|
219
|
+
for (var l = n > 1 ? void 0 : n ? rt(t, r) : t, p = e.length - 1, c; p >= 0; p--)
|
|
220
|
+
(c = e[p]) && (l = (n ? c(t, r, l) : c(l)) || l);
|
|
221
|
+
return n && l && st(t, r, l), l;
|
|
222
|
+
}, we = (e, t, r) => t.has(e) || be("Cannot " + r), u = (e, t, r) => (we(e, t, "read from private field"), r ? r.call(e) : t.get(e)), ot = (e, t, r) => t.has(e) ? be("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), B = (e, t, r) => (we(e, t, "access private method"), r), d, W, G, m, _e, Ie, ne, re;
|
|
223
|
+
const $e = typeof devicePixelRatio > "u" || devicePixelRatio > 1.25, ke = $e ? "@2x" : "", C = $e ? 2 : 1;
|
|
224
|
+
let F, Le, b = class extends O {
|
|
225
225
|
constructor() {
|
|
226
|
-
super(...arguments),
|
|
226
|
+
super(...arguments), ot(this, d), this.itemStyle = "default", this.showPlaceType = "if-needed", this.missingIconsCache = /* @__PURE__ */ new Set(), this.iconsBaseUrl = "", this.index = 0;
|
|
227
227
|
}
|
|
228
228
|
willUpdate(e) {
|
|
229
|
-
e.has("feature") && u(this, d,
|
|
229
|
+
e.has("feature") && u(this, d, W) && (this.index = u(this, d, W).length, B(this, d, ne).call(this));
|
|
230
230
|
}
|
|
231
231
|
render() {
|
|
232
232
|
return f`
|
|
@@ -238,112 +238,124 @@ let I, we, w = class extends F {
|
|
|
238
238
|
class=${this.itemStyle}
|
|
239
239
|
@click=${() => this.dispatchEvent(new CustomEvent("select"))}
|
|
240
240
|
>
|
|
241
|
-
${
|
|
241
|
+
${F && this.spriteIcon ? f`
|
|
242
242
|
<div
|
|
243
243
|
class="sprite-icon"
|
|
244
|
-
style=${
|
|
245
|
-
width: `${this.spriteIcon.width /
|
|
246
|
-
height: `${this.spriteIcon.height /
|
|
247
|
-
backgroundImage: `url(${this.iconsBaseUrl}sprite${
|
|
248
|
-
backgroundPosition: `-${this.spriteIcon.x /
|
|
249
|
-
backgroundSize: `${
|
|
244
|
+
style=${Ve({
|
|
245
|
+
width: `${this.spriteIcon.width / C}px`,
|
|
246
|
+
height: `${this.spriteIcon.height / C}px`,
|
|
247
|
+
backgroundImage: `url(${this.iconsBaseUrl}sprite${ke}.png)`,
|
|
248
|
+
backgroundPosition: `-${this.spriteIcon.x / C}px -${this.spriteIcon.y / C}px`,
|
|
249
|
+
backgroundSize: `${F.width / C}px ${F.height / C}px`
|
|
250
250
|
})}
|
|
251
|
-
title=${u(this, d,
|
|
251
|
+
title=${u(this, d, m)}
|
|
252
252
|
/>
|
|
253
|
-
` : this.imageUrl ? f` <img src=${this.imageUrl} alt=${this.category} title=${u(this, d,
|
|
253
|
+
` : this.imageUrl ? f` <img src=${this.imageUrl} alt=${this.category} title=${u(this, d, m)} @error=${B(this, d, Ie)} />` : this.feature?.address ? f` <img src=${this.iconsBaseUrl + "housenumber.svg"} alt=${u(this, d, m)} title=${u(this, d, m)} /> ` : this.feature?.id.startsWith("road.") ? f` <img src=${this.iconsBaseUrl + "road.svg"} alt=${u(this, d, m)} title=${u(this, d, m)} /> ` : this.feature?.id.startsWith("address.") ? f` <img src=${this.iconsBaseUrl + "street.svg"} alt=${u(this, d, m)} title=${u(this, d, m)} /> ` : this.feature?.id.startsWith("postal_code.") ? f` <img src=${this.iconsBaseUrl + "postal_code.svg"} alt=${u(this, d, m)} title=${u(this, d, m)} /> ` : this.feature?.id.startsWith("poi.") ? f` <img src=${this.iconsBaseUrl + "poi.svg"} alt=${u(this, d, m)} title=${u(this, d, m)} /> ` : u(this, d, G) ? f` <img src=${this.iconsBaseUrl + "reverse.svg"} alt=${u(this, d, m)} title=${u(this, d, m)} /> ` : f` <img src=${this.iconsBaseUrl + "area.svg"} alt=${u(this, d, m)} title=${u(this, d, m)} /> `}
|
|
254
254
|
|
|
255
255
|
<span class="texts">
|
|
256
256
|
<span>
|
|
257
|
-
<span class="primary"> ${u(this, d,
|
|
257
|
+
<span class="primary"> ${u(this, d, G) ? this.feature?.place_name : this.feature?.place_name.replace(/,.*/, "")} </span>
|
|
258
258
|
|
|
259
|
-
${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) && !u(this, d,
|
|
259
|
+
${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) && !u(this, d, G) ? f` <span class="secondary"> ${u(this, d, m)} </span> ` : X}
|
|
260
260
|
</span>
|
|
261
261
|
|
|
262
|
-
<span class="line2"> ${u(this, d,
|
|
262
|
+
<span class="line2"> ${u(this, d, G) ? this.feature?.text : this.feature?.place_name.replace(/[^,]*,?s*/, "")} </span>
|
|
263
263
|
</span>
|
|
264
264
|
</li>
|
|
265
265
|
`;
|
|
266
266
|
}
|
|
267
267
|
};
|
|
268
268
|
d = /* @__PURE__ */ new WeakSet();
|
|
269
|
-
|
|
269
|
+
W = function() {
|
|
270
270
|
return this.feature?.properties?.categories;
|
|
271
271
|
};
|
|
272
|
-
|
|
272
|
+
G = function() {
|
|
273
273
|
return this.feature?.place_type[0] === "reverse";
|
|
274
274
|
};
|
|
275
|
-
|
|
276
|
-
return this
|
|
275
|
+
m = function() {
|
|
276
|
+
return u(this, d, W)?.join(", ") ?? this.feature?.place_type_name?.[0] ?? this.feature?.place_type[0];
|
|
277
277
|
};
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
278
|
+
_e = function() {
|
|
279
|
+
Le ??= fetch(`${this.iconsBaseUrl}sprite${ke}.json`).then((e) => e.json()).then((e) => {
|
|
280
|
+
F = e;
|
|
281
281
|
}).catch(() => {
|
|
282
|
-
|
|
282
|
+
F = null;
|
|
283
283
|
});
|
|
284
284
|
};
|
|
285
|
-
|
|
286
|
-
this.imageUrl && this.missingIconsCache.add(this.imageUrl),
|
|
285
|
+
Ie = function() {
|
|
286
|
+
this.imageUrl && this.missingIconsCache.add(this.imageUrl), B(this, d, ne).call(this);
|
|
287
287
|
};
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
288
|
+
ne = function() {
|
|
289
|
+
F !== void 0 ? B(this, d, re).call(this) : (B(this, d, _e).call(this), Le?.then(() => {
|
|
290
|
+
B(this, d, re).call(this);
|
|
291
291
|
}));
|
|
292
292
|
};
|
|
293
|
-
|
|
293
|
+
re = function() {
|
|
294
294
|
do {
|
|
295
|
-
if (this.index--, this.category = u(this, d,
|
|
295
|
+
if (this.index--, this.category = u(this, d, W)?.[this.index], this.spriteIcon = this.category ? F?.icons[this.category] : void 0, this.spriteIcon)
|
|
296
296
|
break;
|
|
297
297
|
this.imageUrl = this.category ? this.iconsBaseUrl + this.category.replace(/ /g, "_") + ".svg" : void 0;
|
|
298
298
|
} while (this.index > -1 && (!this.imageUrl || this.missingIconsCache.has(this.imageUrl)));
|
|
299
299
|
};
|
|
300
|
-
|
|
301
|
-
${
|
|
300
|
+
b.styles = E`
|
|
301
|
+
${xe(it)}
|
|
302
302
|
`;
|
|
303
|
-
|
|
303
|
+
$([
|
|
304
304
|
h({ type: Object })
|
|
305
|
-
],
|
|
306
|
-
|
|
305
|
+
], b.prototype, "feature", 2);
|
|
306
|
+
$([
|
|
307
307
|
h({ type: String })
|
|
308
|
-
],
|
|
309
|
-
|
|
308
|
+
], b.prototype, "itemStyle", 2);
|
|
309
|
+
$([
|
|
310
310
|
h({ type: String })
|
|
311
|
-
],
|
|
312
|
-
|
|
311
|
+
], b.prototype, "showPlaceType", 2);
|
|
312
|
+
$([
|
|
313
313
|
h({ attribute: !1 })
|
|
314
|
-
],
|
|
315
|
-
|
|
314
|
+
], b.prototype, "missingIconsCache", 2);
|
|
315
|
+
$([
|
|
316
316
|
h({ type: String })
|
|
317
|
-
],
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
],
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
],
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
],
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
],
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
],
|
|
333
|
-
const
|
|
334
|
-
var
|
|
317
|
+
], b.prototype, "iconsBaseUrl", 2);
|
|
318
|
+
$([
|
|
319
|
+
y()
|
|
320
|
+
], b.prototype, "category", 2);
|
|
321
|
+
$([
|
|
322
|
+
y()
|
|
323
|
+
], b.prototype, "imageUrl", 2);
|
|
324
|
+
$([
|
|
325
|
+
y()
|
|
326
|
+
], b.prototype, "spriteIcon", 2);
|
|
327
|
+
$([
|
|
328
|
+
y()
|
|
329
|
+
], b.prototype, "index", 2);
|
|
330
|
+
b = $([
|
|
331
|
+
S("maptiler-geocoder-feature-item")
|
|
332
|
+
], b);
|
|
333
|
+
const at = 'form{font-family:var(--font-family, "Open Sans", "Ubuntu", "Helvetica Neue", Arial, Helvetica, sans-serif);position:relative;background-color:var(--color-bg, #fff);z-index:10;border-radius:var(--radius, 4px);margin:0;transition:max-width .25s;box-shadow:var(--shadow, 0px 2px 5px rgba(51, 51, 89, .15));pointer-events:all}form,form *,form *:after,form *:before{box-sizing:border-box}form.can-collapse{max-width:var(--size-collapse-width, 29px)}form.can-collapse input::placeholder{transition:opacity .25s;opacity:0}form,form.can-collapse:focus-within,form.can-collapse:hover{width:var(--size-width, 270px);max-width:var(--size-width, 270px)}form input::placeholder,form:focus-within input::placeholder,form:hover input::placeholder{opacity:1}input{font:inherit;font-size:var(--font-size-input, 14px);flex-grow:1;min-height:var(--size-input-min-height, 29px);background-color:transparent;color:var(--color-input, #444952);white-space:nowrap;overflow:hidden;border:0;margin:0;padding:0}input:focus{color:var(--color-input-focus, #444952);outline:0;box-shadow:none}ul,div.error,div.no-results{background-color:var(--color-bg-dropdown, #fff);border-radius:var(--radius-dropdown, 4px);left:0;list-style:none;margin:0;padding:0;position:absolute;width:100%;top:calc(100% + 6px);overflow:hidden}ul{font-size:var(--font-size-items, 14px);line-height:16px;box-shadow:var(--shadow-dropdown, 0px 5px 10px rgba(51, 51, 89, .15))}div.error,div.no-results{font:inherit;line-height:18px;font-size:var(--font-size-error, 12px);display:flex;gap:16px}div.error{padding:16px;font-weight:600;color:var(--color-error-text, #e25041);background-color:var(--color-error-bg, #fbeae8)}div.error div{flex-grow:1}div.error maptiler-geocode-fail-icon{flex-shrink:0;width:20px;height:20px}div.error button{flex-shrink:0}div.error button maptiler-geocode-clear-icon{--color-icon-button: var(--color-error-icon, #e25041)}div.error button:hover maptiler-geocode-clear-icon,div.error button:active maptiler-geocode-clear-icon{--color-icon-button: inherit}div.no-results{padding:14px 24px 14px 16px;font-weight:400;color:var(--color-no-results-text, #6b7c93);box-shadow:var(--shadow-dropdown, 0px 5px 10px rgba(51, 51, 89, .15))}div.no-results maptiler-geocode-fail-icon{margin-top:4px;flex-shrink:0;width:20px;height:20px}ul.options.open-on-top{top:auto;bottom:calc(100% + 6px)}button{padding:0;margin:0;border:0;background-color:transparent;height:auto;width:auto}button:hover{background-color:transparent}button:hover,button:active{--color-icon-button: var(--color-icon-button-hover, #2b8bfb)}.input-group{display:flex;align-items:stretch;gap:var(--input-group-gap, 7px);padding:var(--input-group-padding, 0 8px);border-radius:var(--radius-input-group, 4px);overflow:hidden}.input-group:focus-within{outline:var(--color-focus-outline, #2b8bfb) solid var(--size-focus-outline, 2px)}.search-button{flex-shrink:0}.clear-button-container{display:none;position:relative;align-items:stretch}.clear-button-container.displayable{display:flex;flex-shrink:0}:host(.maptiler-geocoder):not(:empty){box-shadow:none}:host(.maptiler-geocoder) .input-group{border:var(--color-input-group-border, white solid 2px)}:host(.maptiler-geocoder) .input-group:focus-within{border:var(--color-input-group-border-focused, #2b8bfb solid 2px);outline:0}:host(.maptiler-geocoder) form.can-collapse{max-width:var(--size-collapse-width, 33px)}:host(.maptiler-geocoder) form,:host(.leaflet-geocoder) form,:host(.maptiler-geocoder) form.can-collapse:focus-within,:host(.leaflet-geocoder) form.can-collapse:focus-within,:host(.maptiler-geocoder) form.can-collapse:hover,:host(.leaflet-geocoder) form.can-collapse:hover{width:var(--size-width, 270px);max-width:var(--size-width, 270px)}:host(.leaflet-geocoder) .input-group{border:var(--color-input-group-border, white solid 1px)}:host(.leaflet-geocoder) form.can-collapse{max-width:var(--size-collapse-width, 30px)}';
|
|
334
|
+
var lt = Object.defineProperty, nt = Object.getOwnPropertyDescriptor, Fe = (e) => {
|
|
335
335
|
throw TypeError(e);
|
|
336
|
-
}, a = (e, t,
|
|
337
|
-
for (var
|
|
338
|
-
(
|
|
339
|
-
return n &&
|
|
340
|
-
},
|
|
341
|
-
|
|
336
|
+
}, a = (e, t, r, n) => {
|
|
337
|
+
for (var l = n > 1 ? void 0 : n ? nt(t, r) : t, p = e.length - 1, c; p >= 0; p--)
|
|
338
|
+
(c = e[p]) && (l = (n ? c(t, r, l) : c(l)) || l);
|
|
339
|
+
return n && l && lt(t, r, l), l;
|
|
340
|
+
}, ce = (e, t, r) => t.has(e) || Fe("Cannot " + r), _ = (e, t, r) => (ce(e, t, "read from private field"), r ? r.call(e) : t.get(e)), M = (e, t, r) => t.has(e) ? Fe("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), oe = (e, t, r, n) => (ce(e, t, "write to private field"), t.set(e, r), r), o = (e, t, r) => (ce(e, t, "access private method"), r), D, A, ae, j, i, q, he, v, pe, K, de, ue, k, fe, Z, Ee, Oe, le, Se, Te, Ce, Be, Ue, Pe, Me, Ge, ze, We, L, z;
|
|
341
|
+
const me = "input:not([type]), input[type=text], input[type=search], select, textarea", H = "button, input[type=button]";
|
|
342
|
+
let s = class extends O {
|
|
342
343
|
constructor() {
|
|
343
|
-
super(...arguments),
|
|
344
|
+
super(...arguments), M(this, i), this.clearListOnPick = !1, this.clearOnBlur = !1, this.collapsed = !1, this.excludeTypes = !1, this.exhaustiveReverseGeocoding = !1, this.fetchFullGeometryOnPick = !1, this.keepListOpen = !1, this.openListOnTop = !1, this.reverseActive = !1, this.searchValue = "", this.selectedItemIndex = -1, this.cachedFeatures = [], this.lastSearchUrl = "", this.focused = !1, this.isFeatureListVisible = !1, this.isFeatureListInteractedWith = !1, M(this, D, !1), M(this, A), M(this, ae, /* @__PURE__ */ new Set()), M(this, j);
|
|
345
|
+
}
|
|
346
|
+
get isLoading() {
|
|
347
|
+
return this.abortController !== void 0;
|
|
348
|
+
}
|
|
349
|
+
get input() {
|
|
350
|
+
for (const e of this.contentSlotElements) {
|
|
351
|
+
if (o(this, i, L).call(this, e)) return e;
|
|
352
|
+
const t = e.querySelector(me);
|
|
353
|
+
if (o(this, i, L).call(this, t)) return t;
|
|
354
|
+
}
|
|
355
|
+
return this.inputSlotElements[0];
|
|
344
356
|
}
|
|
345
357
|
firstUpdated() {
|
|
346
|
-
|
|
358
|
+
oe(this, D, !0), this.input && (this.input.value = this.searchValue);
|
|
347
359
|
}
|
|
348
360
|
/**
|
|
349
361
|
* Set the options of this instance.
|
|
@@ -352,8 +364,8 @@ let o = class extends F {
|
|
|
352
364
|
*/
|
|
353
365
|
setOptions(e) {
|
|
354
366
|
const t = { ...e };
|
|
355
|
-
for (const
|
|
356
|
-
|
|
367
|
+
for (const r of Object.keys(t))
|
|
368
|
+
ct.includes(r) || delete t[r];
|
|
357
369
|
Object.assign(this, t);
|
|
358
370
|
}
|
|
359
371
|
/**
|
|
@@ -362,7 +374,7 @@ let o = class extends F {
|
|
|
362
374
|
* @param value text to set
|
|
363
375
|
*/
|
|
364
376
|
setQuery(e) {
|
|
365
|
-
|
|
377
|
+
o(this, i, ue).call(this, e, { external: !0 }), o(this, i, de).call(this);
|
|
366
378
|
}
|
|
367
379
|
/**
|
|
368
380
|
* Set the content of search input box and immediately submit it.
|
|
@@ -370,13 +382,13 @@ let o = class extends F {
|
|
|
370
382
|
* @param value text to set and submit
|
|
371
383
|
*/
|
|
372
384
|
submitQuery(e) {
|
|
373
|
-
|
|
385
|
+
o(this, i, fe).call(this, e, { external: !0 });
|
|
374
386
|
}
|
|
375
387
|
/**
|
|
376
388
|
* Clear search result list.
|
|
377
389
|
*/
|
|
378
390
|
clearList() {
|
|
379
|
-
|
|
391
|
+
o(this, i, k).call(this), this.picked = void 0, this.selectedItemIndex = -1;
|
|
380
392
|
}
|
|
381
393
|
/**
|
|
382
394
|
* Focus the search input box.
|
|
@@ -384,99 +396,117 @@ let o = class extends F {
|
|
|
384
396
|
* @param options [FocusOptions](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
|
|
385
397
|
*/
|
|
386
398
|
focus(e) {
|
|
387
|
-
this.input
|
|
399
|
+
this.input?.focus(e);
|
|
388
400
|
}
|
|
389
401
|
/**
|
|
390
402
|
* Blur the search input box.
|
|
391
403
|
*/
|
|
392
404
|
blur() {
|
|
393
|
-
this.input
|
|
405
|
+
this.input?.blur();
|
|
394
406
|
}
|
|
395
|
-
addEventListener(e, t,
|
|
396
|
-
super.addEventListener(e, t,
|
|
407
|
+
addEventListener(e, t, r) {
|
|
408
|
+
super.addEventListener(e, t, r);
|
|
397
409
|
}
|
|
398
|
-
removeEventListener(e, t,
|
|
399
|
-
super.removeEventListener(e, t,
|
|
410
|
+
removeEventListener(e, t, r) {
|
|
411
|
+
super.removeEventListener(e, t, r);
|
|
400
412
|
}
|
|
401
413
|
/** @internal */
|
|
402
414
|
handleMapChange(e) {
|
|
403
|
-
|
|
415
|
+
oe(this, j, e);
|
|
404
416
|
}
|
|
405
417
|
/** @internal */
|
|
406
418
|
handleMapClick(e) {
|
|
407
|
-
this.reverseActive &&
|
|
419
|
+
this.reverseActive && o(this, i, Ee).call(this, e);
|
|
408
420
|
}
|
|
409
421
|
willUpdate(e) {
|
|
410
|
-
e.has("error") && this.error && console.error("[MapTilerGeocodingControl] Error:", this.error), e.has("enableReverse") && (this.reverseActive = this.enableReverse === "always"), ["picked"].some((t) => e.has(t)) && this.picked && (this.clearListOnPick &&
|
|
422
|
+
e.has("error") && this.error && console.error("[MapTilerGeocodingControl] Error:", this.error), e.has("enableReverse") && (this.reverseActive = this.enableReverse === "always"), ["picked"].some((t) => e.has(t)) && this.picked && (this.clearListOnPick && o(this, i, k).call(this), this.selectedItemIndex = -1), ["searchValue", "minLength"].some((t) => e.has(t)) && _(this, i, he) && (o(this, i, k).call(this), this.error = void 0), ["focused", "listIsInteractedWith"].some((t) => e.has(t)) && this.clearOnBlur && !this.focused && !this.isFeatureListInteractedWith && (this.searchValue = ""), ["selectFirst", "listFeatures", "selectedItemIndex", "picked"].some((t) => e.has(t)) && this.selectFirst !== !1 && this.listFeatures?.length && this.selectedItemIndex == -1 && !this.picked && (this.selectedItemIndex = 0), ["listFeatures", "selectedItemIndex"].some((t) => e.has(t)) && o(this, i, v).call(this, "select", { feature: _(this, i, q) }), ["picked"].some((t) => e.has(t)) && this.picked && this.picked.id !== e.get("picked")?.id && (this.fetchFullGeometryOnPick && !this.picked.address && this.picked.geometry.type === "Point" && this.picked.place_type[0] !== "reverse" ? o(this, i, Z).call(this, this.picked.id, { byId: !0 }) : Promise.resolve()).then(
|
|
411
423
|
() => {
|
|
412
|
-
|
|
424
|
+
o(this, i, v).call(this, "pick", { feature: this.picked });
|
|
413
425
|
},
|
|
414
426
|
(t) => {
|
|
415
|
-
t && typeof t == "object" && "name" in t && t.name === "AbortError" || (this.error = t,
|
|
427
|
+
t && typeof t == "object" && "name" in t && t.name === "AbortError" || (this.error = t, o(this, i, v).call(this, "pick", { feature: this.picked }));
|
|
416
428
|
}
|
|
417
|
-
), ["listFeatures", "focused", "isFeatureListInteractedWith", "keepListOpen"].some((t) => e.has(t)) && (this.isFeatureListVisible = !!this.listFeatures?.length && (this.focused || this.isFeatureListInteractedWith || this.keepListOpen)), ["isFeatureListVisible"].some((t) => e.has(t)) && (this.isFeatureListVisible ?
|
|
429
|
+
), ["listFeatures", "focused", "isFeatureListInteractedWith", "keepListOpen"].some((t) => e.has(t)) && (this.isFeatureListVisible = !!this.listFeatures?.length && (this.focused || this.isFeatureListInteractedWith || this.keepListOpen)), ["isFeatureListVisible"].some((t) => e.has(t)) && (this.isFeatureListVisible ? o(this, i, v).call(this, "featuresshow") : o(this, i, v).call(this, "featureshide")), ["reverseActive"].some((t) => e.has(t)) && o(this, i, v).call(this, "reversetoggle", { reverse: this.reverseActive }), ["searchValue"].some((t) => e.has(t)) && this.input && (this.input.value = this.searchValue);
|
|
418
430
|
}
|
|
419
431
|
render() {
|
|
420
432
|
return f`
|
|
421
|
-
<form
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
433
|
+
<form
|
|
434
|
+
class=${V({ "can-collapse": this.collapsed && this.searchValue === "" })}
|
|
435
|
+
@submit=${o(this, i, pe)}
|
|
436
|
+
@focusin=${o(this, i, Ce)}
|
|
437
|
+
@focusout=${o(this, i, Be)}
|
|
438
|
+
@click=${o(this, i, Oe)}
|
|
439
|
+
@keydown=${o(this, i, le)}
|
|
440
|
+
@input=${o(this, i, Se)}
|
|
441
|
+
@change=${o(this, i, Te)}
|
|
442
|
+
>
|
|
443
|
+
<slot name="content">
|
|
444
|
+
<div class="input-group">
|
|
445
|
+
<slot name="start"></slot>
|
|
432
446
|
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
@change=${() => this.picked = void 0}
|
|
441
|
-
placeholder=${this.placeholder ?? "Search"}
|
|
442
|
-
aria-label=${this.placeholder ?? "Search"}
|
|
443
|
-
/>
|
|
447
|
+
<slot name="search-button">
|
|
448
|
+
<button class="search-button" type="button">
|
|
449
|
+
<slot name="search-icon">
|
|
450
|
+
<maptiler-geocode-search-icon></maptiler-geocode-search-icon>
|
|
451
|
+
</slot>
|
|
452
|
+
</button>
|
|
453
|
+
</slot>
|
|
444
454
|
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
<maptiler-geocode-clear-icon></maptiler-geocode-clear-icon>
|
|
449
|
-
</button>
|
|
450
|
-
`}
|
|
451
|
-
</div>
|
|
455
|
+
<slot name="input">
|
|
456
|
+
<input placeholder=${this.placeholder ?? "Search"} aria-label=${this.placeholder ?? "Search"} />
|
|
457
|
+
</slot>
|
|
452
458
|
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
459
|
+
<div class="clear-button-container ${V({ displayable: this.searchValue !== "" })}">
|
|
460
|
+
${this.isLoading ? f`
|
|
461
|
+
<slot name="loading-icon">
|
|
462
|
+
<maptiler-geocode-loading-icon></maptiler-geocode-loading-icon>
|
|
463
|
+
</slot>
|
|
464
|
+
` : f`
|
|
465
|
+
<slot name="clear-button">
|
|
466
|
+
<button type="button" title=${this.clearButtonTitle ?? "clear"}>
|
|
467
|
+
<slot name="clear-icon">
|
|
468
|
+
<maptiler-geocode-clear-icon></maptiler-geocode-clear-icon>
|
|
469
|
+
</slot>
|
|
470
|
+
</button>
|
|
471
|
+
</slot>
|
|
472
|
+
`}
|
|
473
|
+
</div>
|
|
463
474
|
|
|
464
|
-
|
|
465
|
-
|
|
475
|
+
${this.enableReverse === "button" ? f`
|
|
476
|
+
<slot name="reverse-button">
|
|
477
|
+
<button type="button" class=${V({ active: this.reverseActive })} title=${this.reverseButtonTitle ?? "toggle reverse geocoding"}>
|
|
478
|
+
<slot name="reverse-icon">
|
|
479
|
+
<maptiler-geocode-reverse-geocoding-icon></maptiler-geocode-reverse-geocoding-icon>
|
|
480
|
+
</slot>
|
|
481
|
+
</button>
|
|
482
|
+
</slot>
|
|
483
|
+
` : X}
|
|
484
|
+
|
|
485
|
+
<slot name="end"></slot>
|
|
486
|
+
</div>
|
|
487
|
+
</slot>
|
|
466
488
|
|
|
467
489
|
${this.error ? f`
|
|
468
490
|
<div class="error">
|
|
469
|
-
<
|
|
491
|
+
<slot name="error-icon">
|
|
492
|
+
<maptiler-geocode-fail-icon></maptiler-geocode-fail-icon>
|
|
493
|
+
</slot>
|
|
470
494
|
|
|
471
495
|
<div>${this.errorMessage ?? "Something went wrong…"}</div>
|
|
472
496
|
|
|
473
|
-
<
|
|
474
|
-
<
|
|
475
|
-
|
|
497
|
+
<slot name="clear-error-button">
|
|
498
|
+
<button>
|
|
499
|
+
<slot name="clear-error-icon">
|
|
500
|
+
<maptiler-geocode-clear-icon></maptiler-geocode-clear-icon>
|
|
501
|
+
</slot>
|
|
502
|
+
</button>
|
|
503
|
+
</slot>
|
|
476
504
|
</div>
|
|
477
|
-
` : !this.focused && !this.isFeatureListInteractedWith && !this.keepListOpen || this.listFeatures === void 0 ?
|
|
505
|
+
` : !this.focused && !this.isFeatureListInteractedWith && !this.keepListOpen || this.listFeatures === void 0 ? X : this.listFeatures.length === 0 ? f`
|
|
478
506
|
<div class="no-results">
|
|
479
|
-
<
|
|
507
|
+
<slot name="no-results-icon">
|
|
508
|
+
<maptiler-geocode-fail-icon></maptiler-geocode-fail-icon>
|
|
509
|
+
</slot>
|
|
480
510
|
|
|
481
511
|
<div>
|
|
482
512
|
${this.noResultsMessage ?? "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!"}
|
|
@@ -484,14 +514,14 @@ let o = class extends F {
|
|
|
484
514
|
</div>
|
|
485
515
|
` : f`
|
|
486
516
|
<ul
|
|
487
|
-
class="options ${
|
|
488
|
-
@pointerleave=${
|
|
489
|
-
@pointerdown=${
|
|
490
|
-
@pointerup=${
|
|
491
|
-
@keydown=${
|
|
517
|
+
class="options ${V({ "open-on-top": this.openListOnTop })}"
|
|
518
|
+
@pointerleave=${o(this, i, Me)}
|
|
519
|
+
@pointerdown=${o(this, i, Ge)}
|
|
520
|
+
@pointerup=${o(this, i, ze)}
|
|
521
|
+
@keydown=${o(this, i, le)}
|
|
492
522
|
role="listbox"
|
|
493
523
|
>
|
|
494
|
-
${
|
|
524
|
+
${Re(
|
|
495
525
|
this.listFeatures,
|
|
496
526
|
(e) => e.id + (e.address ? "," + e.address : ""),
|
|
497
527
|
(e, t) => f`
|
|
@@ -500,13 +530,13 @@ let o = class extends F {
|
|
|
500
530
|
.showPlaceType=${this.showPlaceType ?? "if-needed"}
|
|
501
531
|
itemStyle=${this.selectedItemIndex === t ? "selected" : this.picked?.id === e.id ? "picked" : "default"}
|
|
502
532
|
@pointerenter=${() => {
|
|
503
|
-
|
|
533
|
+
o(this, i, Pe).call(this, t);
|
|
504
534
|
}}
|
|
505
535
|
@select=${() => {
|
|
506
|
-
|
|
536
|
+
o(this, i, Ue).call(this, e);
|
|
507
537
|
}}
|
|
508
|
-
.missingIconsCache=${
|
|
509
|
-
.iconsBaseUrl=${this.iconsBaseUrl ?? "https://cdn.maptiler.com/maptiler-geocoding-control/v3.0.
|
|
538
|
+
.missingIconsCache=${_(this, ae)}
|
|
539
|
+
.iconsBaseUrl=${this.iconsBaseUrl ?? "https://cdn.maptiler.com/maptiler-geocoding-control/v3.1.0-rc.1/icons/"}
|
|
510
540
|
/>
|
|
511
541
|
`
|
|
512
542
|
)}
|
|
@@ -516,22 +546,19 @@ let o = class extends F {
|
|
|
516
546
|
`;
|
|
517
547
|
}
|
|
518
548
|
};
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
549
|
+
D = /* @__PURE__ */ new WeakMap();
|
|
550
|
+
A = /* @__PURE__ */ new WeakMap();
|
|
551
|
+
ae = /* @__PURE__ */ new WeakMap();
|
|
552
|
+
j = /* @__PURE__ */ new WeakMap();
|
|
553
|
+
i = /* @__PURE__ */ new WeakSet();
|
|
554
|
+
q = function() {
|
|
525
555
|
return this.listFeatures?.[this.selectedItemIndex];
|
|
526
556
|
};
|
|
527
|
-
|
|
528
|
-
return this.abortController !== void 0;
|
|
529
|
-
};
|
|
530
|
-
ae = function() {
|
|
557
|
+
he = function() {
|
|
531
558
|
return this.searchValue.length < (this.minLength ?? 2);
|
|
532
559
|
};
|
|
533
|
-
|
|
534
|
-
|
|
560
|
+
v = function(e, ...[t]) {
|
|
561
|
+
_(this, D) && this.dispatchEvent(
|
|
535
562
|
new CustomEvent(e, {
|
|
536
563
|
bubbles: !0,
|
|
537
564
|
composed: !0,
|
|
@@ -539,288 +566,333 @@ y = function(e, ...[t]) {
|
|
|
539
566
|
})
|
|
540
567
|
);
|
|
541
568
|
};
|
|
542
|
-
|
|
543
|
-
e?.preventDefault(), this.focused = !1, clearTimeout(
|
|
569
|
+
pe = function(e, { external: t = !1 } = {}) {
|
|
570
|
+
e?.preventDefault(), this.focused = !1, clearTimeout(_(this, A)), this.selectedItemIndex > -1 && this.listFeatures ? (this.picked = this.listFeatures[this.selectedItemIndex], this.searchValue = this.picked.place_type[0] === "reverse" ? this.picked.place_name : this.picked.place_name.replace(/,.*/, ""), this.error = void 0, this.selectedItemIndex = -1) : this.searchValue && o(this, i, Z).call(this, this.searchValue, { exact: !0, external: t }).then(() => {
|
|
544
571
|
this.picked = void 0;
|
|
545
|
-
}).catch((
|
|
572
|
+
}).catch((r) => this.error = r);
|
|
546
573
|
};
|
|
547
|
-
|
|
574
|
+
K = function(e) {
|
|
548
575
|
try {
|
|
549
|
-
return
|
|
576
|
+
return je(e, 6);
|
|
550
577
|
} catch {
|
|
551
578
|
return !1;
|
|
552
579
|
}
|
|
553
580
|
};
|
|
554
|
-
|
|
581
|
+
de = function() {
|
|
555
582
|
setTimeout(() => {
|
|
556
|
-
this.input
|
|
583
|
+
this.input?.focus(), this.focused = !0, this.input instanceof HTMLSelectElement ? this.input.showPicker() : this.input?.select();
|
|
557
584
|
});
|
|
558
585
|
};
|
|
559
|
-
|
|
560
|
-
if (this.searchValue = e,
|
|
561
|
-
if (clearTimeout(
|
|
586
|
+
ue = function(e, { external: t = !1 } = {}) {
|
|
587
|
+
if (this.searchValue = e, o(this, i, v).call(this, "querychange", { query: this.searchValue, reverseCoords: o(this, i, K).call(this, e) }), this.error = void 0, this.picked = void 0, this.showResultsWhileTyping !== !1) {
|
|
588
|
+
if (clearTimeout(_(this, A)), _(this, i, he))
|
|
562
589
|
return;
|
|
563
|
-
const
|
|
564
|
-
|
|
565
|
-
|
|
590
|
+
const r = this.searchValue;
|
|
591
|
+
oe(this, A, window.setTimeout(() => {
|
|
592
|
+
o(this, i, Z).call(this, r, { external: t }).catch((n) => this.error = n);
|
|
566
593
|
}, this.debounceSearch ?? 200));
|
|
567
594
|
} else
|
|
568
|
-
|
|
595
|
+
o(this, i, k).call(this);
|
|
569
596
|
};
|
|
570
597
|
k = function() {
|
|
571
|
-
this.listFeatures !== void 0 && (this.listFeatures = void 0,
|
|
598
|
+
this.listFeatures !== void 0 && (this.listFeatures = void 0, o(this, i, v).call(this, "featuresclear"));
|
|
572
599
|
};
|
|
573
|
-
|
|
574
|
-
this.searchValue = e,
|
|
600
|
+
fe = function(e, { external: t = !1 } = {}) {
|
|
601
|
+
this.searchValue = e, o(this, i, v).call(this, "querychange", { query: this.searchValue, reverseCoords: o(this, i, K).call(this, e) }), this.selectedItemIndex = -1, o(this, i, pe).call(this, void 0, { external: t });
|
|
575
602
|
};
|
|
576
|
-
|
|
603
|
+
Z = async function(e, { byId: t = !1, exact: r = !1, external: n = !1 } = {}) {
|
|
577
604
|
this.error = void 0, this.abortController?.abort();
|
|
578
|
-
const
|
|
579
|
-
this.abortController =
|
|
605
|
+
const l = new AbortController();
|
|
606
|
+
this.abortController = l;
|
|
580
607
|
try {
|
|
581
|
-
const p = this.apiUrl ?? "https://api.maptiler.com/geocoding",
|
|
608
|
+
const p = this.apiUrl ?? "https://api.maptiler.com/geocoding", c = o(this, i, K).call(this, e), w = new URL(p + "/" + encodeURIComponent(c ? `${c.decimalLongitude},${c.decimalLatitude}` : e) + ".json"), x = w.searchParams;
|
|
582
609
|
this.language !== void 0 && x.set("language", Array.isArray(this.language) ? this.language.join(",") : this.language ?? "");
|
|
583
|
-
const [
|
|
584
|
-
let
|
|
585
|
-
(
|
|
586
|
-
).filter((
|
|
587
|
-
|
|
588
|
-
const
|
|
589
|
-
if (
|
|
590
|
-
const
|
|
591
|
-
|
|
610
|
+
const [Q] = _(this, j) ?? [void 0];
|
|
611
|
+
let T = (!c || this.reverseGeocodingTypes === void 0 ? this.types : this.reverseGeocodingTypes)?.map(
|
|
612
|
+
(g) => typeof g == "string" ? g : Q === void 0 || (g[0] ?? 0) <= Q && Q < (g[1] ?? 1 / 0) ? g[2] : void 0
|
|
613
|
+
).filter((g) => g !== void 0);
|
|
614
|
+
T && (T = [...new Set(T)], x.set("types", T.join(",")));
|
|
615
|
+
const ge = !c || this.reverseGeocodingExcludeTypes === void 0 ? this.excludeTypes : this.reverseGeocodingExcludeTypes;
|
|
616
|
+
if (ge && x.set("excludeTypes", String(ge)), this.bbox && x.set("bbox", this.bbox.map((g) => g.toFixed(6)).join(",")), this.country && x.set("country", Array.isArray(this.country) ? this.country.join(",") : this.country), this.worldview && x.set("worldview", this.worldview), !t && !c) {
|
|
617
|
+
const g = this.proximity ?? [{ type: "server-geolocation" }], ye = await tt(_(this, j), g, l);
|
|
618
|
+
ye && x.set("proximity", ye), (r || this.showResultsWhileTyping === !1) && x.set("autocomplete", "false"), x.set("fuzzyMatch", String(this.fuzzyMatch !== !1));
|
|
592
619
|
}
|
|
593
|
-
const
|
|
594
|
-
|
|
595
|
-
const
|
|
596
|
-
if (
|
|
597
|
-
t ? (this.clearListOnPick &&
|
|
620
|
+
const ve = this.limit ?? 5, J = this.reverseGeocodingLimit ?? ve;
|
|
621
|
+
J > 1 && T?.length !== 1 && console.warn("[MapTilerGeocodingControl] Warning: For reverse geocoding when limit > 1 then types must contain single value."), c ? (J === 1 || this.exhaustiveReverseGeocoding || T?.length === 1) && x.set("limit", String(J)) : x.set("limit", String(ve)), this.apiKey && x.set("key", this.apiKey), this.adjustUrl?.(w);
|
|
622
|
+
const Ae = w.searchParams.get("types") === "" && w.searchParams.get("excludeTypes") !== "true", R = w.toString();
|
|
623
|
+
if (R === this.lastSearchUrl) {
|
|
624
|
+
t ? (this.clearListOnPick && o(this, i, k).call(this), this.picked = this.cachedFeatures[0]) : (this.listFeatures = this.cachedFeatures, o(this, i, v).call(this, "featureslisted", { features: this.listFeatures, external: n }), this.listFeatures[this.selectedItemIndex]?.id !== _(this, i, q)?.id && (this.selectedItemIndex = -1));
|
|
598
625
|
return;
|
|
599
626
|
}
|
|
600
|
-
|
|
601
|
-
let
|
|
602
|
-
if (
|
|
603
|
-
|
|
627
|
+
o(this, i, v).call(this, "request", { urlObj: w }), this.lastSearchUrl = R;
|
|
628
|
+
let U;
|
|
629
|
+
if (Ae)
|
|
630
|
+
U = { type: "FeatureCollection", features: [] };
|
|
604
631
|
else {
|
|
605
|
-
const
|
|
606
|
-
signal:
|
|
632
|
+
const g = await fetch(R, {
|
|
633
|
+
signal: l.signal,
|
|
607
634
|
...this.fetchParameters
|
|
608
635
|
});
|
|
609
|
-
if (!
|
|
610
|
-
throw new Error(await
|
|
611
|
-
|
|
636
|
+
if (!g.ok)
|
|
637
|
+
throw new Error(await g.text());
|
|
638
|
+
U = await g.json();
|
|
612
639
|
}
|
|
613
|
-
|
|
640
|
+
o(this, i, v).call(this, "response", { url: R, featureCollection: U }), t ? (this.clearListOnPick && o(this, i, k).call(this), this.picked = U.features[0], this.cachedFeatures = [this.picked]) : (this.listFeatures = U.features.filter(this.filter ?? (() => !0)), c && this.listFeatures.unshift({
|
|
614
641
|
type: "Feature",
|
|
615
642
|
properties: {},
|
|
616
643
|
/* eslint-disable @typescript-eslint/restrict-template-expressions */
|
|
617
|
-
id: `reverse_${
|
|
618
|
-
place_name: `${
|
|
619
|
-
text:
|
|
644
|
+
id: `reverse_${c.decimalLongitude}_${c.decimalLatitude}`,
|
|
645
|
+
place_name: `${c.decimalLatitude}, ${c.decimalLongitude}`,
|
|
646
|
+
text: c.toCoordinateFormat("DMS"),
|
|
620
647
|
/* eslint-enable @typescript-eslint/restrict-template-expressions */
|
|
621
648
|
place_type: ["reverse"],
|
|
622
649
|
place_type_name: ["reverse"],
|
|
623
|
-
center: [
|
|
624
|
-
bbox: [
|
|
650
|
+
center: [c.decimalLongitude, c.decimalLatitude],
|
|
651
|
+
bbox: [c.decimalLongitude, c.decimalLatitude, c.decimalLongitude, c.decimalLatitude],
|
|
625
652
|
geometry: {
|
|
626
653
|
type: "Point",
|
|
627
|
-
coordinates: [
|
|
654
|
+
coordinates: [c.decimalLongitude, c.decimalLatitude]
|
|
628
655
|
}
|
|
629
|
-
}),
|
|
656
|
+
}), o(this, i, v).call(this, "featureslisted", { features: this.listFeatures, external: n }), this.cachedFeatures = this.listFeatures, this.listFeatures[this.selectedItemIndex]?.id !== _(this, i, q)?.id && (this.selectedItemIndex = -1), c && this.input?.focus());
|
|
630
657
|
} catch (p) {
|
|
631
658
|
if (p && typeof p == "object" && "name" in p && p.name === "AbortError")
|
|
632
659
|
return;
|
|
633
660
|
throw p;
|
|
634
661
|
} finally {
|
|
635
|
-
|
|
662
|
+
l === this.abortController && (this.abortController = void 0);
|
|
636
663
|
}
|
|
637
664
|
};
|
|
638
|
-
|
|
639
|
-
this.reverseActive = this.enableReverse === "always",
|
|
665
|
+
Ee = function(e) {
|
|
666
|
+
this.reverseActive = this.enableReverse === "always", o(this, i, k).call(this), this.picked = void 0, o(this, i, fe).call(this, `${e[1].toFixed(6)}, ${et(e[0], [-180, 180], !0).toFixed(6)}`), o(this, i, de).call(this);
|
|
667
|
+
};
|
|
668
|
+
Oe = function(e) {
|
|
669
|
+
o(this, i, L).call(this, e.target) ? this.focused = !0 : o(this, i, z).call(this, e.target, this.searchButtonElements, this.searchIconElements, "search-button") ? this.input?.focus() : o(this, i, z).call(this, e.target, this.clearButtonElements, this.clearIconElements, "clear-button") ? o(this, i, We).call(this) : o(this, i, z).call(this, e.target, this.reverseButtonElements, this.reverseIconElements, "reverse-button") ? this.reverseActive = !this.reverseActive : o(this, i, z).call(this, e.target, this.clearErrorButtonElements, this.clearErrorIconElements, "clear-error-button") && (this.error = void 0);
|
|
640
670
|
};
|
|
641
|
-
|
|
671
|
+
le = function(e) {
|
|
642
672
|
if (!this.listFeatures)
|
|
643
673
|
return;
|
|
644
674
|
const t = e.key === "ArrowDown" ? 1 : e.key === "ArrowUp" ? -1 : 0;
|
|
645
|
-
t && (this.input
|
|
675
|
+
t && (this.input?.focus(), this.focused = !0, e.preventDefault(), this.picked && this.selectedItemIndex === -1 && (this.selectedItemIndex = this.listFeatures.findIndex((r) => r.id === this.picked?.id)), this.selectedItemIndex === (this.picked || this.selectFirst !== !1 ? 0 : -1) && t === -1 && (this.selectedItemIndex = this.listFeatures.length), this.selectedItemIndex += t, this.selectedItemIndex >= this.listFeatures.length && (this.selectedItemIndex = -1), this.selectedItemIndex < 0 && (this.picked || this.selectFirst !== !1) && (this.selectedItemIndex = 0));
|
|
676
|
+
};
|
|
677
|
+
Se = function(e) {
|
|
678
|
+
o(this, i, L).call(this, e.target) && o(this, i, ue).call(this, e.target.value);
|
|
679
|
+
};
|
|
680
|
+
Te = function(e) {
|
|
681
|
+
o(this, i, L).call(this, e.target) && (this.picked = void 0);
|
|
646
682
|
};
|
|
647
|
-
|
|
648
|
-
|
|
683
|
+
Ce = function(e) {
|
|
684
|
+
o(this, i, L).call(this, e.target) && (this.focused = !0);
|
|
649
685
|
};
|
|
650
|
-
|
|
686
|
+
Be = function(e) {
|
|
687
|
+
o(this, i, L).call(this, e.target) && (this.focused = !1);
|
|
688
|
+
};
|
|
689
|
+
Ue = function(e) {
|
|
651
690
|
(!this.picked || this.picked.id !== e.id) && (this.picked = e, this.searchValue = e.place_name);
|
|
652
691
|
};
|
|
653
|
-
|
|
692
|
+
Pe = function(e) {
|
|
654
693
|
this.selectedItemIndex = e;
|
|
655
694
|
};
|
|
656
|
-
|
|
695
|
+
Me = function() {
|
|
657
696
|
(!this.selectFirst || this.picked) && (this.selectedItemIndex = -1), this.isFeatureListInteractedWith && (this.isFeatureListInteractedWith = !1);
|
|
658
697
|
};
|
|
659
|
-
|
|
698
|
+
Ge = function() {
|
|
660
699
|
this.isFeatureListInteractedWith = !0;
|
|
661
700
|
};
|
|
662
|
-
|
|
701
|
+
ze = function() {
|
|
663
702
|
setTimeout(() => {
|
|
664
703
|
this.isFeatureListInteractedWith = !1;
|
|
665
704
|
});
|
|
666
705
|
};
|
|
667
|
-
|
|
668
|
-
this.searchValue = "",
|
|
706
|
+
We = function() {
|
|
707
|
+
this.searchValue = "", o(this, i, v).call(this, "queryclear"), this.picked = void 0, this.input?.focus();
|
|
708
|
+
};
|
|
709
|
+
L = function(e) {
|
|
710
|
+
return e instanceof HTMLElement && e.matches(me);
|
|
669
711
|
};
|
|
670
|
-
|
|
671
|
-
|
|
712
|
+
z = function(e, t, r, n) {
|
|
713
|
+
return e instanceof HTMLElement && ([...t, ...r].some((l) => l.contains(e)) || e.closest(`[data-${n}]`) !== null);
|
|
714
|
+
};
|
|
715
|
+
s.styles = E`
|
|
716
|
+
${xe(at)}
|
|
672
717
|
`;
|
|
673
718
|
a([
|
|
674
719
|
h({ attribute: !1 })
|
|
675
|
-
],
|
|
720
|
+
], s.prototype, "adjustUrl", 2);
|
|
676
721
|
a([
|
|
677
722
|
h({ type: String })
|
|
678
|
-
],
|
|
723
|
+
], s.prototype, "apiKey", 2);
|
|
679
724
|
a([
|
|
680
725
|
h({ type: String })
|
|
681
|
-
],
|
|
726
|
+
], s.prototype, "apiUrl", 2);
|
|
682
727
|
a([
|
|
683
728
|
h({ type: Array })
|
|
684
|
-
],
|
|
729
|
+
], s.prototype, "bbox", 2);
|
|
685
730
|
a([
|
|
686
731
|
h({ type: String })
|
|
687
|
-
],
|
|
732
|
+
], s.prototype, "clearButtonTitle", 2);
|
|
688
733
|
a([
|
|
689
734
|
h({ type: Boolean })
|
|
690
|
-
],
|
|
735
|
+
], s.prototype, "clearListOnPick", 2);
|
|
691
736
|
a([
|
|
692
737
|
h({ type: Boolean })
|
|
693
|
-
],
|
|
738
|
+
], s.prototype, "clearOnBlur", 2);
|
|
694
739
|
a([
|
|
695
740
|
h({ type: Boolean })
|
|
696
|
-
],
|
|
741
|
+
], s.prototype, "collapsed", 2);
|
|
697
742
|
a([
|
|
698
743
|
h({ attribute: !1 })
|
|
699
|
-
],
|
|
744
|
+
], s.prototype, "country", 2);
|
|
700
745
|
a([
|
|
701
746
|
h({ type: Number })
|
|
702
|
-
],
|
|
747
|
+
], s.prototype, "debounceSearch", 2);
|
|
703
748
|
a([
|
|
704
749
|
h({ type: String })
|
|
705
|
-
],
|
|
750
|
+
], s.prototype, "enableReverse", 2);
|
|
706
751
|
a([
|
|
707
752
|
h({ type: String })
|
|
708
|
-
],
|
|
753
|
+
], s.prototype, "errorMessage", 2);
|
|
709
754
|
a([
|
|
710
755
|
h({ type: Boolean })
|
|
711
|
-
],
|
|
756
|
+
], s.prototype, "excludeTypes", 2);
|
|
712
757
|
a([
|
|
713
758
|
h({ type: Boolean })
|
|
714
|
-
],
|
|
759
|
+
], s.prototype, "exhaustiveReverseGeocoding", 2);
|
|
715
760
|
a([
|
|
716
761
|
h({ type: Boolean })
|
|
717
|
-
],
|
|
762
|
+
], s.prototype, "fetchFullGeometryOnPick", 2);
|
|
718
763
|
a([
|
|
719
764
|
h({ type: Object })
|
|
720
|
-
],
|
|
765
|
+
], s.prototype, "fetchParameters", 2);
|
|
721
766
|
a([
|
|
722
767
|
h({ attribute: !1 })
|
|
723
|
-
],
|
|
768
|
+
], s.prototype, "filter", 2);
|
|
724
769
|
a([
|
|
725
770
|
h({ type: Object })
|
|
726
|
-
],
|
|
771
|
+
], s.prototype, "fuzzyMatch", 2);
|
|
727
772
|
a([
|
|
728
773
|
h({ type: String })
|
|
729
|
-
],
|
|
774
|
+
], s.prototype, "iconsBaseUrl", 2);
|
|
730
775
|
a([
|
|
731
776
|
h({ type: Boolean })
|
|
732
|
-
],
|
|
777
|
+
], s.prototype, "keepListOpen", 2);
|
|
733
778
|
a([
|
|
734
779
|
h({ attribute: !1 })
|
|
735
|
-
],
|
|
780
|
+
], s.prototype, "language", 2);
|
|
736
781
|
a([
|
|
737
782
|
h({ type: Number })
|
|
738
|
-
],
|
|
783
|
+
], s.prototype, "limit", 2);
|
|
739
784
|
a([
|
|
740
785
|
h({ type: Number })
|
|
741
|
-
],
|
|
786
|
+
], s.prototype, "minLength", 2);
|
|
742
787
|
a([
|
|
743
788
|
h({ type: String })
|
|
744
|
-
],
|
|
789
|
+
], s.prototype, "noResultsMessage", 2);
|
|
745
790
|
a([
|
|
746
791
|
h({ type: Boolean })
|
|
747
|
-
],
|
|
792
|
+
], s.prototype, "openListOnTop", 2);
|
|
748
793
|
a([
|
|
749
794
|
h({ type: String })
|
|
750
|
-
],
|
|
795
|
+
], s.prototype, "placeholder", 2);
|
|
751
796
|
a([
|
|
752
797
|
h({ type: Array })
|
|
753
|
-
],
|
|
798
|
+
], s.prototype, "proximity", 2);
|
|
754
799
|
a([
|
|
755
800
|
h({ type: Boolean })
|
|
756
|
-
],
|
|
801
|
+
], s.prototype, "reverseActive", 2);
|
|
757
802
|
a([
|
|
758
803
|
h({ type: String })
|
|
759
|
-
],
|
|
804
|
+
], s.prototype, "reverseButtonTitle", 2);
|
|
760
805
|
a([
|
|
761
806
|
h({ type: Object })
|
|
762
|
-
],
|
|
807
|
+
], s.prototype, "reverseGeocodingExcludeTypes", 2);
|
|
763
808
|
a([
|
|
764
809
|
h({ type: Number })
|
|
765
|
-
],
|
|
810
|
+
], s.prototype, "reverseGeocodingLimit", 2);
|
|
766
811
|
a([
|
|
767
812
|
h({ type: Array })
|
|
768
|
-
],
|
|
813
|
+
], s.prototype, "reverseGeocodingTypes", 2);
|
|
769
814
|
a([
|
|
770
815
|
h({ type: Object })
|
|
771
|
-
],
|
|
816
|
+
], s.prototype, "selectFirst", 2);
|
|
772
817
|
a([
|
|
773
818
|
h({ type: String })
|
|
774
|
-
],
|
|
819
|
+
], s.prototype, "showPlaceType", 2);
|
|
775
820
|
a([
|
|
776
821
|
h({ type: Object })
|
|
777
|
-
],
|
|
822
|
+
], s.prototype, "showResultsWhileTyping", 2);
|
|
778
823
|
a([
|
|
779
824
|
h({ type: Array })
|
|
780
|
-
],
|
|
825
|
+
], s.prototype, "types", 2);
|
|
781
826
|
a([
|
|
782
827
|
h({ type: String })
|
|
783
|
-
],
|
|
828
|
+
], s.prototype, "worldview", 2);
|
|
829
|
+
a([
|
|
830
|
+
I({ slot: "content", flatten: !1 })
|
|
831
|
+
], s.prototype, "contentSlotElements", 2);
|
|
832
|
+
a([
|
|
833
|
+
I({ slot: "input", flatten: !0, selector: me })
|
|
834
|
+
], s.prototype, "inputSlotElements", 2);
|
|
835
|
+
a([
|
|
836
|
+
I({ slot: "search-button", flatten: !0, selector: H })
|
|
837
|
+
], s.prototype, "searchButtonElements", 2);
|
|
838
|
+
a([
|
|
839
|
+
I({ slot: "clear-button", flatten: !0, selector: H })
|
|
840
|
+
], s.prototype, "clearButtonElements", 2);
|
|
841
|
+
a([
|
|
842
|
+
I({ slot: "reverse-button", flatten: !0, selector: H })
|
|
843
|
+
], s.prototype, "reverseButtonElements", 2);
|
|
844
|
+
a([
|
|
845
|
+
I({ slot: "clear-error-button", flatten: !0, selector: H })
|
|
846
|
+
], s.prototype, "clearErrorButtonElements", 2);
|
|
847
|
+
a([
|
|
848
|
+
I({ slot: "search-icon", flatten: !0 })
|
|
849
|
+
], s.prototype, "searchIconElements", 2);
|
|
850
|
+
a([
|
|
851
|
+
I({ slot: "clear-icon", flatten: !0 })
|
|
852
|
+
], s.prototype, "clearIconElements", 2);
|
|
853
|
+
a([
|
|
854
|
+
I({ slot: "reverse-icon", flatten: !0 })
|
|
855
|
+
], s.prototype, "reverseIconElements", 2);
|
|
784
856
|
a([
|
|
785
|
-
|
|
786
|
-
],
|
|
857
|
+
I({ slot: "clear-error-icon", flatten: !0 })
|
|
858
|
+
], s.prototype, "clearErrorIconElements", 2);
|
|
787
859
|
a([
|
|
788
|
-
|
|
789
|
-
],
|
|
860
|
+
y()
|
|
861
|
+
], s.prototype, "searchValue", 2);
|
|
790
862
|
a([
|
|
791
|
-
|
|
792
|
-
],
|
|
863
|
+
y()
|
|
864
|
+
], s.prototype, "listFeatures", 2);
|
|
793
865
|
a([
|
|
794
|
-
|
|
795
|
-
],
|
|
866
|
+
y()
|
|
867
|
+
], s.prototype, "selectedItemIndex", 2);
|
|
796
868
|
a([
|
|
797
|
-
|
|
798
|
-
],
|
|
869
|
+
y()
|
|
870
|
+
], s.prototype, "picked", 2);
|
|
799
871
|
a([
|
|
800
|
-
|
|
801
|
-
],
|
|
872
|
+
y()
|
|
873
|
+
], s.prototype, "cachedFeatures", 2);
|
|
802
874
|
a([
|
|
803
|
-
|
|
804
|
-
],
|
|
875
|
+
y()
|
|
876
|
+
], s.prototype, "lastSearchUrl", 2);
|
|
805
877
|
a([
|
|
806
|
-
|
|
807
|
-
],
|
|
878
|
+
y()
|
|
879
|
+
], s.prototype, "error", 2);
|
|
808
880
|
a([
|
|
809
|
-
|
|
810
|
-
],
|
|
881
|
+
y()
|
|
882
|
+
], s.prototype, "abortController", 2);
|
|
811
883
|
a([
|
|
812
|
-
|
|
813
|
-
],
|
|
884
|
+
y()
|
|
885
|
+
], s.prototype, "focused", 2);
|
|
814
886
|
a([
|
|
815
|
-
|
|
816
|
-
],
|
|
887
|
+
y()
|
|
888
|
+
], s.prototype, "isFeatureListVisible", 2);
|
|
817
889
|
a([
|
|
818
|
-
|
|
819
|
-
],
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
],
|
|
823
|
-
const
|
|
890
|
+
y()
|
|
891
|
+
], s.prototype, "isFeatureListInteractedWith", 2);
|
|
892
|
+
s = a([
|
|
893
|
+
S("maptiler-geocoder")
|
|
894
|
+
], s);
|
|
895
|
+
const ct = [
|
|
824
896
|
"adjustUrl",
|
|
825
897
|
"apiKey",
|
|
826
898
|
"apiUrl",
|
|
@@ -860,11 +932,11 @@ const it = [
|
|
|
860
932
|
"worldview"
|
|
861
933
|
];
|
|
862
934
|
export {
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
935
|
+
Y as MaptilerGeocodeClearIconElement,
|
|
936
|
+
ee as MaptilerGeocodeFailIconElement,
|
|
937
|
+
te as MaptilerGeocodeLoadingIconElement,
|
|
938
|
+
ie as MaptilerGeocodeReverseGeocodingIconElement,
|
|
939
|
+
se as MaptilerGeocodeSearchIconElement,
|
|
940
|
+
s as MaptilerGeocoderElement
|
|
869
941
|
};
|
|
870
942
|
//# sourceMappingURL=index.js.map
|