@maptiler/geocoding-control 1.4.2-dev.1 → 1.4.2-dev.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/leaflet.js +316 -316
- package/leaflet.js.map +1 -1
- package/leaflet.umd.js +2 -2
- package/leaflet.umd.js.map +1 -1
- package/maplibregl.js +213 -213
- package/maplibregl.js.map +1 -1
- package/maplibregl.umd.js +2 -2
- package/maplibregl.umd.js.map +1 -1
- package/maptilersdk.js +213 -213
- package/maptilersdk.js.map +1 -1
- package/maptilersdk.umd.js +2 -2
- package/maptilersdk.umd.js.map +1 -1
- package/openlayers.js +461 -461
- package/openlayers.js.map +1 -1
- package/openlayers.umd.js +2 -2
- package/openlayers.umd.js.map +1 -1
- package/package.json +9 -9
- package/react.js +474 -474
- package/react.js.map +1 -1
- package/react.umd.js +1 -1
- package/react.umd.js.map +1 -1
- package/style.css +1 -1
- package/svelte/GeocodingControl.svelte +4 -3
- package/svelte/types.d.ts +2 -2
- package/types.d.ts +2 -2
- package/vanilla.js +227 -227
- package/vanilla.js.map +1 -1
- package/vanilla.umd.js +1 -1
- package/vanilla.umd.js.map +1 -1
package/vanilla.js
CHANGED
|
@@ -26,7 +26,7 @@ function ue(i) {
|
|
|
26
26
|
function Rt(i) {
|
|
27
27
|
return typeof i == "function";
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function be(i, e) {
|
|
30
30
|
return i != i ? e == e : i !== e || i && typeof i == "object" || typeof i == "function";
|
|
31
31
|
}
|
|
32
32
|
let Fe;
|
|
@@ -116,7 +116,7 @@ function a(i, e, t) {
|
|
|
116
116
|
function bi(i) {
|
|
117
117
|
return Array.from(i.childNodes);
|
|
118
118
|
}
|
|
119
|
-
function
|
|
119
|
+
function Ce(i, e) {
|
|
120
120
|
e = "" + e, i.data !== e && (i.data = /** @type {string} */
|
|
121
121
|
e);
|
|
122
122
|
}
|
|
@@ -129,13 +129,13 @@ function de(i, e, t) {
|
|
|
129
129
|
function vi(i, e, { bubbles: t = !1, cancelable: n = !1 } = {}) {
|
|
130
130
|
return new CustomEvent(i, { detail: e, bubbles: t, cancelable: n });
|
|
131
131
|
}
|
|
132
|
-
let
|
|
133
|
-
function
|
|
134
|
-
|
|
132
|
+
let We;
|
|
133
|
+
function ke(i) {
|
|
134
|
+
We = i;
|
|
135
135
|
}
|
|
136
136
|
function It() {
|
|
137
|
-
if (!
|
|
138
|
-
return
|
|
137
|
+
if (!We) throw new Error("Function called outside component initialization");
|
|
138
|
+
return We;
|
|
139
139
|
}
|
|
140
140
|
function Li(i) {
|
|
141
141
|
It().$$.on_destroy.push(i);
|
|
@@ -162,41 +162,41 @@ function bt(i, e) {
|
|
|
162
162
|
const t = i.$$.callbacks[e.type];
|
|
163
163
|
t && t.slice().forEach((n) => n.call(this, e));
|
|
164
164
|
}
|
|
165
|
-
const
|
|
166
|
-
let
|
|
165
|
+
const Se = [], tt = [];
|
|
166
|
+
let pe = [];
|
|
167
167
|
const vt = [], yi = /* @__PURE__ */ Promise.resolve();
|
|
168
168
|
let it = !1;
|
|
169
169
|
function wi() {
|
|
170
170
|
it || (it = !0, yi.then(At));
|
|
171
171
|
}
|
|
172
172
|
function nt(i) {
|
|
173
|
-
|
|
173
|
+
pe.push(i);
|
|
174
174
|
}
|
|
175
175
|
const et = /* @__PURE__ */ new Set();
|
|
176
|
-
let
|
|
176
|
+
let Ee = 0;
|
|
177
177
|
function At() {
|
|
178
|
-
if (
|
|
178
|
+
if (Ee !== 0)
|
|
179
179
|
return;
|
|
180
|
-
const i =
|
|
180
|
+
const i = We;
|
|
181
181
|
do {
|
|
182
182
|
try {
|
|
183
|
-
for (;
|
|
184
|
-
const e =
|
|
185
|
-
|
|
183
|
+
for (; Ee < Se.length; ) {
|
|
184
|
+
const e = Se[Ee];
|
|
185
|
+
Ee++, ke(e), Ei(e.$$);
|
|
186
186
|
}
|
|
187
187
|
} catch (e) {
|
|
188
|
-
throw
|
|
188
|
+
throw Se.length = 0, Ee = 0, e;
|
|
189
189
|
}
|
|
190
|
-
for (
|
|
191
|
-
for (let e = 0; e <
|
|
192
|
-
const t =
|
|
190
|
+
for (ke(null), Se.length = 0, Ee = 0; tt.length; ) tt.pop()();
|
|
191
|
+
for (let e = 0; e < pe.length; e += 1) {
|
|
192
|
+
const t = pe[e];
|
|
193
193
|
et.has(t) || (et.add(t), t());
|
|
194
194
|
}
|
|
195
|
-
|
|
196
|
-
} while (
|
|
195
|
+
pe.length = 0;
|
|
196
|
+
} while (Se.length);
|
|
197
197
|
for (; vt.length; )
|
|
198
198
|
vt.pop()();
|
|
199
|
-
it = !1, et.clear(),
|
|
199
|
+
it = !1, et.clear(), ke(i);
|
|
200
200
|
}
|
|
201
201
|
function Ei(i) {
|
|
202
202
|
if (i.fragment !== null) {
|
|
@@ -207,29 +207,29 @@ function Ei(i) {
|
|
|
207
207
|
}
|
|
208
208
|
function Si(i) {
|
|
209
209
|
const e = [], t = [];
|
|
210
|
-
|
|
210
|
+
pe.forEach((n) => i.indexOf(n) === -1 ? e.push(n) : t.push(n)), t.forEach((n) => n()), pe = e;
|
|
211
211
|
}
|
|
212
|
-
const
|
|
213
|
-
let
|
|
214
|
-
function
|
|
215
|
-
|
|
212
|
+
const ze = /* @__PURE__ */ new Set();
|
|
213
|
+
let he;
|
|
214
|
+
function He() {
|
|
215
|
+
he = {
|
|
216
216
|
r: 0,
|
|
217
217
|
c: [],
|
|
218
|
-
p:
|
|
218
|
+
p: he
|
|
219
219
|
// parent group
|
|
220
220
|
};
|
|
221
221
|
}
|
|
222
|
-
function
|
|
223
|
-
|
|
222
|
+
function je() {
|
|
223
|
+
he.r || ue(he.c), he = he.p;
|
|
224
224
|
}
|
|
225
|
-
function
|
|
226
|
-
i && i.i && (
|
|
225
|
+
function z(i, e) {
|
|
226
|
+
i && i.i && (ze.delete(i), i.i(e));
|
|
227
227
|
}
|
|
228
228
|
function Q(i, e, t, n) {
|
|
229
229
|
if (i && i.o) {
|
|
230
|
-
if (
|
|
231
|
-
|
|
232
|
-
|
|
230
|
+
if (ze.has(i)) return;
|
|
231
|
+
ze.add(i), he.c.push(() => {
|
|
232
|
+
ze.delete(i), n && (t && i.d(1), n());
|
|
233
233
|
}), i.o(e);
|
|
234
234
|
} else n && n();
|
|
235
235
|
}
|
|
@@ -251,13 +251,13 @@ function Ni(i, e, t, n, o, l, c, r, d, u, f, h) {
|
|
|
251
251
|
let k = c.get(m);
|
|
252
252
|
k ? O.push(() => k.p(g, e)) : (k = u(m, g), k.c()), E.set(m, y[w] = k), m in W && C.set(m, Math.abs(w - W[m]));
|
|
253
253
|
}
|
|
254
|
-
const p = /* @__PURE__ */ new Set(),
|
|
254
|
+
const p = /* @__PURE__ */ new Set(), q = /* @__PURE__ */ new Set();
|
|
255
255
|
function b(g) {
|
|
256
|
-
|
|
256
|
+
z(g, 1), g.m(r, f), c.set(g.key, g), f = g.first, _--;
|
|
257
257
|
}
|
|
258
258
|
for (; v && _; ) {
|
|
259
|
-
const g = y[_ - 1], m = i[v - 1], k = g.key,
|
|
260
|
-
g === m ? (f = g.first, v--, _--) : E.has(
|
|
259
|
+
const g = y[_ - 1], m = i[v - 1], k = g.key, H = m.key;
|
|
260
|
+
g === m ? (f = g.first, v--, _--) : E.has(H) ? !c.has(k) || p.has(k) ? b(g) : q.has(H) ? v-- : C.get(k) > C.get(H) ? (q.add(k), b(g)) : (p.add(H), v--) : (d(m, c), v--);
|
|
261
261
|
}
|
|
262
262
|
for (; v--; ) {
|
|
263
263
|
const g = i[v];
|
|
@@ -281,11 +281,11 @@ function le(i, e) {
|
|
|
281
281
|
t.fragment !== null && (Si(t.after_update), ue(t.on_destroy), t.fragment && t.fragment.d(e), t.on_destroy = t.fragment = null, t.ctx = []);
|
|
282
282
|
}
|
|
283
283
|
function Mi(i, e) {
|
|
284
|
-
i.$$.dirty[0] === -1 && (
|
|
284
|
+
i.$$.dirty[0] === -1 && (Se.push(i), wi(), i.$$.dirty.fill(0)), i.$$.dirty[e / 31 | 0] |= 1 << e % 31;
|
|
285
285
|
}
|
|
286
|
-
function
|
|
287
|
-
const d =
|
|
288
|
-
|
|
286
|
+
function ve(i, e, t, n, o, l, c = null, r = [-1]) {
|
|
287
|
+
const d = We;
|
|
288
|
+
ke(i);
|
|
289
289
|
const u = i.$$ = {
|
|
290
290
|
fragment: null,
|
|
291
291
|
ctx: [],
|
|
@@ -318,11 +318,11 @@ function Le(i, e, t, n, o, l, c = null, r = [-1]) {
|
|
|
318
318
|
u.fragment && u.fragment.l(h), h.forEach(U);
|
|
319
319
|
} else
|
|
320
320
|
u.fragment && u.fragment.c();
|
|
321
|
-
e.intro &&
|
|
321
|
+
e.intro && z(i.$$.fragment), ae(i, e.target, e.anchor), At();
|
|
322
322
|
}
|
|
323
|
-
|
|
323
|
+
ke(d);
|
|
324
324
|
}
|
|
325
|
-
class
|
|
325
|
+
class Le {
|
|
326
326
|
constructor() {
|
|
327
327
|
/**
|
|
328
328
|
* ### PRIVATE API
|
|
@@ -387,9 +387,9 @@ function ki(i) {
|
|
|
387
387
|
}
|
|
388
388
|
};
|
|
389
389
|
}
|
|
390
|
-
class Bt extends
|
|
390
|
+
class Bt extends Le {
|
|
391
391
|
constructor(e) {
|
|
392
|
-
super(),
|
|
392
|
+
super(), ve(this, e, null, ki, be, {});
|
|
393
393
|
}
|
|
394
394
|
}
|
|
395
395
|
function Ci(i) {
|
|
@@ -409,9 +409,9 @@ function Ci(i) {
|
|
|
409
409
|
}
|
|
410
410
|
};
|
|
411
411
|
}
|
|
412
|
-
class Ft extends
|
|
412
|
+
class Ft extends Le {
|
|
413
413
|
constructor(e) {
|
|
414
|
-
super(),
|
|
414
|
+
super(), ve(this, e, null, Ci, be, {});
|
|
415
415
|
}
|
|
416
416
|
}
|
|
417
417
|
function Wi(i) {
|
|
@@ -681,7 +681,7 @@ function _t(i) {
|
|
|
681
681
|
},
|
|
682
682
|
p(n, o) {
|
|
683
683
|
o & /*placeType*/
|
|
684
|
-
64 &&
|
|
684
|
+
64 && Ce(
|
|
685
685
|
t,
|
|
686
686
|
/*placeType*/
|
|
687
687
|
n[6]
|
|
@@ -738,7 +738,7 @@ function Fi(i) {
|
|
|
738
738
|
)))))
|
|
739
739
|
);
|
|
740
740
|
}
|
|
741
|
-
let
|
|
741
|
+
let q = p(i, -1), b = q(i), g = _ && _t(i);
|
|
742
742
|
return {
|
|
743
743
|
c() {
|
|
744
744
|
e = D("li"), b.c(), c = J(), r = D("span"), d = D("span"), u = D("span"), h = fe(f), v = J(), g && g.c(), w = J(), W = D("span"), E = fe(y), a(u, "class", "primary svelte-ltkwvy"), a(d, "class", "svelte-ltkwvy"), a(W, "class", "line2 svelte-ltkwvy"), a(r, "class", "texts svelte-ltkwvy"), a(e, "tabindex", "0"), a(
|
|
@@ -770,7 +770,7 @@ function Fi(i) {
|
|
|
770
770
|
], C = !0);
|
|
771
771
|
},
|
|
772
772
|
p(m, [k]) {
|
|
773
|
-
|
|
773
|
+
q === (q = p(m, k)) && b ? b.p(m, k) : (b.d(1), b = q(m), b && (b.c(), b.m(e, c))), k & /*feature*/
|
|
774
774
|
1 && f !== (f = /*isReverse*/
|
|
775
775
|
(m[7] ? (
|
|
776
776
|
/*feature*/
|
|
@@ -778,7 +778,7 @@ function Fi(i) {
|
|
|
778
778
|
) : (
|
|
779
779
|
/*feature*/
|
|
780
780
|
m[0].place_name.replace(/,.*/, "")
|
|
781
|
-
)) + "") &&
|
|
781
|
+
)) + "") && Ce(h, f), k & /*showPlaceType, feature, imageUrl*/
|
|
782
782
|
37 && (_ = /*showPlaceType*/
|
|
783
783
|
m[2] === "always" || /*showPlaceType*/
|
|
784
784
|
m[2] && !/*feature*/
|
|
@@ -793,7 +793,7 @@ function Fi(i) {
|
|
|
793
793
|
(m[7] ? "" : (
|
|
794
794
|
/*feature*/
|
|
795
795
|
m[0].place_name.replace(/[^,]*,?\s*/, "")
|
|
796
|
-
)) + "") &&
|
|
796
|
+
)) + "") && Ce(E, y), k & /*selected*/
|
|
797
797
|
2 && a(
|
|
798
798
|
e,
|
|
799
799
|
"data-selected",
|
|
@@ -814,7 +814,7 @@ function Fi(i) {
|
|
|
814
814
|
}
|
|
815
815
|
};
|
|
816
816
|
}
|
|
817
|
-
function
|
|
817
|
+
function zi(i, e, t) {
|
|
818
818
|
var O;
|
|
819
819
|
let n, o, { feature: l } = e, { selected: c = !1 } = e, { showPlaceType: r } = e, { missingIconsCache: d } = e, { iconsBaseUrl: u } = e;
|
|
820
820
|
const f = (O = l.properties) == null ? void 0 : O.categories;
|
|
@@ -832,14 +832,14 @@ function qi(i, e, t) {
|
|
|
832
832
|
return i.$$set = (p) => {
|
|
833
833
|
"feature" in p && t(0, l = p.feature), "selected" in p && t(1, c = p.selected), "showPlaceType" in p && t(2, r = p.showPlaceType), "missingIconsCache" in p && t(9, d = p.missingIconsCache), "iconsBaseUrl" in p && t(3, u = p.iconsBaseUrl);
|
|
834
834
|
}, i.$$.update = () => {
|
|
835
|
-
var p,
|
|
835
|
+
var p, q, b, g;
|
|
836
836
|
if (i.$$.dirty & /*loadIconAttempt, index, category, iconsBaseUrl, imageUrl, missingIconsCache*/
|
|
837
837
|
3640)
|
|
838
838
|
do
|
|
839
839
|
t(11, n--, n), t(4, h = f == null ? void 0 : f[n]), t(5, v = h ? u + h.replace(/ /g, "_") + ".svg" : void 0);
|
|
840
840
|
while (n > -1 && (!v || d.has(v)));
|
|
841
841
|
i.$$.dirty & /*feature*/
|
|
842
|
-
1 && t(6, o = ((
|
|
842
|
+
1 && t(6, o = ((q = (p = l.properties) == null ? void 0 : p.categories) == null ? void 0 : q.join(", ")) ?? ((g = (b = l.properties) == null ? void 0 : b.place_type_name) == null ? void 0 : g[0]) ?? l.place_type[0]);
|
|
843
843
|
}, t(11, n = (f == null ? void 0 : f.length) ?? 0), [
|
|
844
844
|
l,
|
|
845
845
|
c,
|
|
@@ -858,9 +858,9 @@ function qi(i, e, t) {
|
|
|
858
858
|
C
|
|
859
859
|
];
|
|
860
860
|
}
|
|
861
|
-
class
|
|
861
|
+
class Hi extends Le {
|
|
862
862
|
constructor(e) {
|
|
863
|
-
super(),
|
|
863
|
+
super(), ve(this, e, zi, Fi, be, {
|
|
864
864
|
feature: 0,
|
|
865
865
|
selected: 1,
|
|
866
866
|
showPlaceType: 2,
|
|
@@ -869,7 +869,7 @@ class zi extends _e {
|
|
|
869
869
|
});
|
|
870
870
|
}
|
|
871
871
|
}
|
|
872
|
-
function
|
|
872
|
+
function ji(i) {
|
|
873
873
|
let e;
|
|
874
874
|
return {
|
|
875
875
|
c() {
|
|
@@ -886,12 +886,12 @@ function Hi(i) {
|
|
|
886
886
|
}
|
|
887
887
|
};
|
|
888
888
|
}
|
|
889
|
-
class
|
|
889
|
+
class Pi extends Le {
|
|
890
890
|
constructor(e) {
|
|
891
|
-
super(),
|
|
891
|
+
super(), ve(this, e, null, ji, be, {});
|
|
892
892
|
}
|
|
893
893
|
}
|
|
894
|
-
function
|
|
894
|
+
function Zi(i) {
|
|
895
895
|
let e, t;
|
|
896
896
|
return {
|
|
897
897
|
c() {
|
|
@@ -908,12 +908,12 @@ function Pi(i) {
|
|
|
908
908
|
}
|
|
909
909
|
};
|
|
910
910
|
}
|
|
911
|
-
class
|
|
911
|
+
class Gi extends Le {
|
|
912
912
|
constructor(e) {
|
|
913
|
-
super(),
|
|
913
|
+
super(), ve(this, e, null, Zi, be, {});
|
|
914
914
|
}
|
|
915
915
|
}
|
|
916
|
-
function
|
|
916
|
+
function qi(i) {
|
|
917
917
|
let e, t, n;
|
|
918
918
|
return {
|
|
919
919
|
c() {
|
|
@@ -930,9 +930,9 @@ function Gi(i) {
|
|
|
930
930
|
}
|
|
931
931
|
};
|
|
932
932
|
}
|
|
933
|
-
class Qi extends
|
|
933
|
+
class Qi extends Le {
|
|
934
934
|
constructor(e) {
|
|
935
|
-
super(),
|
|
935
|
+
super(), ve(this, e, null, qi, be, {});
|
|
936
936
|
}
|
|
937
937
|
}
|
|
938
938
|
function Vi(i, e, t) {
|
|
@@ -943,7 +943,7 @@ function yt(i) {
|
|
|
943
943
|
const e = [...i];
|
|
944
944
|
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;
|
|
945
945
|
}
|
|
946
|
-
let
|
|
946
|
+
let Me;
|
|
947
947
|
async function Ki(i, e, t) {
|
|
948
948
|
const n = i == null ? void 0 : i.getCenterAndZoom();
|
|
949
949
|
for (const o of e ?? [])
|
|
@@ -951,10 +951,10 @@ async function Ki(i, e, t) {
|
|
|
951
951
|
if (o.type === "fixed")
|
|
952
952
|
return o.coordinates.join(",");
|
|
953
953
|
e: if (o.type === "client-geolocation") {
|
|
954
|
-
if (
|
|
955
|
-
if (!
|
|
954
|
+
if (Me && o.cachedLocationExpiry && Me.time + o.cachedLocationExpiry > Date.now()) {
|
|
955
|
+
if (!Me.coords)
|
|
956
956
|
break e;
|
|
957
|
-
return
|
|
957
|
+
return Me.coords;
|
|
958
958
|
}
|
|
959
959
|
let l;
|
|
960
960
|
try {
|
|
@@ -975,7 +975,7 @@ async function Ki(i, e, t) {
|
|
|
975
975
|
}), l;
|
|
976
976
|
} catch {
|
|
977
977
|
} finally {
|
|
978
|
-
o.cachedLocationExpiry && (
|
|
978
|
+
o.cachedLocationExpiry && (Me = {
|
|
979
979
|
time: Date.now(),
|
|
980
980
|
coords: l
|
|
981
981
|
});
|
|
@@ -1022,12 +1022,12 @@ function rt(i, e) {
|
|
|
1022
1022
|
if (xi.test(i))
|
|
1023
1023
|
throw new Error("invalid coordinate value");
|
|
1024
1024
|
if (wt.test(i))
|
|
1025
|
-
if (r = wt.exec(i), d =
|
|
1025
|
+
if (r = wt.exec(i), d = Te(r), d)
|
|
1026
1026
|
t = Math.abs(r[1]) + r[2] / 60, Number(r[1]) < 0 && (t *= -1), n = Math.abs(r[3]) + r[4] / 60, Number(r[3]) < 0 && (n *= -1), c = "DM";
|
|
1027
1027
|
else
|
|
1028
1028
|
throw new Error("invalid coordinate format");
|
|
1029
1029
|
else if (Et.test(i))
|
|
1030
|
-
if (r = Et.exec(i), d =
|
|
1030
|
+
if (r = Et.exec(i), d = Te(r), d) {
|
|
1031
1031
|
if (t = r[2], n = r[6], t.includes(",") && (t = t.replace(",", ".")), n.includes(",") && (n = n.replace(",", ".")), c = "DD", Number(Math.round(t)) == Number(t))
|
|
1032
1032
|
throw new Error("integer only coordinate provided");
|
|
1033
1033
|
if (Number(Math.round(n)) == Number(n))
|
|
@@ -1036,17 +1036,17 @@ function rt(i, e) {
|
|
|
1036
1036
|
} else
|
|
1037
1037
|
throw new Error("invalid decimal coordinate format");
|
|
1038
1038
|
else if (St.test(i))
|
|
1039
|
-
if (r = St.exec(i), d =
|
|
1039
|
+
if (r = St.exec(i), d = Te(r), d)
|
|
1040
1040
|
t = Math.abs(parseInt(r[2])), r[4] && (t += r[4] / 60, c = "DM"), r[6] && (t += r[6].replace(",", ".") / 3600, c = "DMS"), parseInt(r[2]) < 0 && (t = -1 * t), n = Math.abs(parseInt(r[9])), r[11] && (n += r[11] / 60), r[13] && (n += r[13].replace(",", ".") / 3600), parseInt(r[9]) < 0 && (n = -1 * n), r[1] ? (o = r[1], l = r[8]) : r[7] && (o = r[7], l = r[14]);
|
|
1041
1041
|
else
|
|
1042
1042
|
throw new Error("invalid DMS coordinates format");
|
|
1043
1043
|
else if (pt.test(i))
|
|
1044
|
-
if (r = pt.exec(i), d =
|
|
1044
|
+
if (r = pt.exec(i), d = Te(r), d)
|
|
1045
1045
|
t = Math.abs(parseInt(r[2])), r[4] && (t += r[4] / 60, c = "DM"), r[6] && (t += r[6] / 3600, c = "DMS"), parseInt(r[2]) < 0 && (t = -1 * t), n = Math.abs(parseInt(r[10])), r[12] && (n += r[12] / 60), r[14] && (n += r[14] / 3600), parseInt(r[10]) < 0 && (n = -1 * n), r[1] ? (o = r[1], l = r[9]) : r[8] && (o = r[8], l = r[16]);
|
|
1046
1046
|
else
|
|
1047
1047
|
throw new Error("invalid DMS coordinates format");
|
|
1048
1048
|
else if (Nt.test(i)) {
|
|
1049
|
-
if (r = Nt.exec(i), d =
|
|
1049
|
+
if (r = Nt.exec(i), d = Te(r), r.filter((u) => u).length <= 5)
|
|
1050
1050
|
throw new Error("invalid coordinates format");
|
|
1051
1051
|
if (d)
|
|
1052
1052
|
t = Math.abs(parseInt(r[2])), r[4] && (t += r[4].replace(",", ".") / 60, c = "DM"), r[6] && (t += r[6].replace(",", ".") / 3600, c = "DMS"), parseInt(r[2]) < 0 && (t = -1 * t), n = Math.abs(parseInt(r[10])), r[12] && (n += r[12].replace(",", ".") / 60), r[14] && (n += r[14].replace(",", ".") / 3600), parseInt(r[10]) < 0 && (n = -1 * n), r[1] ? (o = r[1], l = r[9]) : r[8] && (o = r[8], l = r[16]);
|
|
@@ -1106,7 +1106,7 @@ function rt(i, e) {
|
|
|
1106
1106
|
} else
|
|
1107
1107
|
throw new Error("coordinates pattern match failed");
|
|
1108
1108
|
}
|
|
1109
|
-
function
|
|
1109
|
+
function Te(i) {
|
|
1110
1110
|
if (!isNaN(i[0]))
|
|
1111
1111
|
return !1;
|
|
1112
1112
|
const e = [...i];
|
|
@@ -1525,7 +1525,7 @@ function kt(i, e, t) {
|
|
|
1525
1525
|
}
|
|
1526
1526
|
function Ct(i) {
|
|
1527
1527
|
let e, t;
|
|
1528
|
-
return e = new
|
|
1528
|
+
return e = new Pi({}), {
|
|
1529
1529
|
c() {
|
|
1530
1530
|
me(e.$$.fragment);
|
|
1531
1531
|
},
|
|
@@ -1533,7 +1533,7 @@ function Ct(i) {
|
|
|
1533
1533
|
ae(e, n, o), t = !0;
|
|
1534
1534
|
},
|
|
1535
1535
|
i(n) {
|
|
1536
|
-
t || (
|
|
1536
|
+
t || (z(e.$$.fragment, n), t = !0);
|
|
1537
1537
|
},
|
|
1538
1538
|
o(n) {
|
|
1539
1539
|
Q(e.$$.fragment, n), t = !1;
|
|
@@ -1545,14 +1545,14 @@ function Ct(i) {
|
|
|
1545
1545
|
}
|
|
1546
1546
|
function Wt(i) {
|
|
1547
1547
|
let e, t, n, o, l;
|
|
1548
|
-
return t = new
|
|
1548
|
+
return t = new Gi({}), {
|
|
1549
1549
|
c() {
|
|
1550
1550
|
e = D("button"), me(t.$$.fragment), a(e, "type", "button"), a(
|
|
1551
1551
|
e,
|
|
1552
1552
|
"title",
|
|
1553
1553
|
/*reverseButtonTitle*/
|
|
1554
1554
|
i[9]
|
|
1555
|
-
), a(e, "class", "svelte-
|
|
1555
|
+
), a(e, "class", "svelte-1uvos7g"), de(
|
|
1556
1556
|
e,
|
|
1557
1557
|
"active",
|
|
1558
1558
|
/*reverseActive*/
|
|
@@ -1583,7 +1583,7 @@ function Wt(i) {
|
|
|
1583
1583
|
);
|
|
1584
1584
|
},
|
|
1585
1585
|
i(c) {
|
|
1586
|
-
n || (
|
|
1586
|
+
n || (z(t.$$.fragment, c), n = !0);
|
|
1587
1587
|
},
|
|
1588
1588
|
o(c) {
|
|
1589
1589
|
Q(t.$$.fragment, c), n = !1;
|
|
@@ -1613,7 +1613,7 @@ function an(i) {
|
|
|
1613
1613
|
e = D("ul");
|
|
1614
1614
|
for (let u = 0; u < t.length; u += 1)
|
|
1615
1615
|
t[u].c();
|
|
1616
|
-
a(e, "class", "svelte-
|
|
1616
|
+
a(e, "class", "svelte-1uvos7g");
|
|
1617
1617
|
},
|
|
1618
1618
|
m(u, f) {
|
|
1619
1619
|
B(u, e, f);
|
|
@@ -1639,12 +1639,12 @@ function an(i) {
|
|
|
1639
1639
|
17880064 && (r = Lt(
|
|
1640
1640
|
/*listFeatures*/
|
|
1641
1641
|
u[14]
|
|
1642
|
-
),
|
|
1642
|
+
), He(), t = Ni(t, f, d, 1, u, r, n, e, pi, Ot, null, kt), je());
|
|
1643
1643
|
},
|
|
1644
1644
|
i(u) {
|
|
1645
1645
|
if (!o) {
|
|
1646
1646
|
for (let f = 0; f < r.length; f += 1)
|
|
1647
|
-
|
|
1647
|
+
z(t[f]);
|
|
1648
1648
|
o = !0;
|
|
1649
1649
|
}
|
|
1650
1650
|
},
|
|
@@ -1668,21 +1668,21 @@ function ln(i) {
|
|
|
1668
1668
|
e = D("div"), me(t.$$.fragment), n = J(), o = D("div"), l = fe(
|
|
1669
1669
|
/*noResultsMessage*/
|
|
1670
1670
|
i[7]
|
|
1671
|
-
), a(o, "class", "svelte-
|
|
1671
|
+
), a(o, "class", "svelte-1uvos7g"), a(e, "class", "no-results svelte-1uvos7g");
|
|
1672
1672
|
},
|
|
1673
1673
|
m(r, d) {
|
|
1674
1674
|
B(r, e, d), ae(t, e, null), T(e, n), T(e, o), T(o, l), c = !0;
|
|
1675
1675
|
},
|
|
1676
1676
|
p(r, d) {
|
|
1677
1677
|
(!c || d[0] & /*noResultsMessage*/
|
|
1678
|
-
128) &&
|
|
1678
|
+
128) && Ce(
|
|
1679
1679
|
l,
|
|
1680
1680
|
/*noResultsMessage*/
|
|
1681
1681
|
r[7]
|
|
1682
1682
|
);
|
|
1683
1683
|
},
|
|
1684
1684
|
i(r) {
|
|
1685
|
-
c || (
|
|
1685
|
+
c || (z(t.$$.fragment, r), c = !0);
|
|
1686
1686
|
},
|
|
1687
1687
|
o(r) {
|
|
1688
1688
|
Q(t.$$.fragment, r), c = !1;
|
|
@@ -1716,7 +1716,7 @@ function cn(i) {
|
|
|
1716
1716
|
e = D("div"), me(t.$$.fragment), n = J(), o = D("div"), l = fe(
|
|
1717
1717
|
/*errorMessage*/
|
|
1718
1718
|
i[6]
|
|
1719
|
-
), c = J(), r = D("button"), me(d.$$.fragment), a(o, "class", "svelte-
|
|
1719
|
+
), c = J(), r = D("button"), me(d.$$.fragment), a(o, "class", "svelte-1uvos7g"), a(r, "class", "svelte-1uvos7g"), a(e, "class", "error svelte-1uvos7g");
|
|
1720
1720
|
},
|
|
1721
1721
|
m(v, _) {
|
|
1722
1722
|
B(v, e, _), ae(t, e, null), T(e, n), T(e, o), T(o, l), T(e, c), T(e, r), ae(d, r, null), u = !0, f || (h = K(
|
|
@@ -1728,14 +1728,14 @@ function cn(i) {
|
|
|
1728
1728
|
},
|
|
1729
1729
|
p(v, _) {
|
|
1730
1730
|
(!u || _[0] & /*errorMessage*/
|
|
1731
|
-
64) &&
|
|
1731
|
+
64) && Ce(
|
|
1732
1732
|
l,
|
|
1733
1733
|
/*errorMessage*/
|
|
1734
1734
|
v[6]
|
|
1735
1735
|
);
|
|
1736
1736
|
},
|
|
1737
1737
|
i(v) {
|
|
1738
|
-
u || (
|
|
1738
|
+
u || (z(t.$$.fragment, v), z(d.$$.fragment, v), u = !0);
|
|
1739
1739
|
},
|
|
1740
1740
|
o(v) {
|
|
1741
1741
|
Q(t.$$.fragment, v), Q(d.$$.fragment, v), u = !1;
|
|
@@ -1765,7 +1765,7 @@ function Ot(i, e) {
|
|
|
1765
1765
|
)
|
|
1766
1766
|
);
|
|
1767
1767
|
}
|
|
1768
|
-
return n = new
|
|
1768
|
+
return n = new Hi({
|
|
1769
1769
|
props: {
|
|
1770
1770
|
feature: (
|
|
1771
1771
|
/*feature*/
|
|
@@ -1813,7 +1813,7 @@ function Ot(i, e) {
|
|
|
1813
1813
|
e[12]), n.$set(u);
|
|
1814
1814
|
},
|
|
1815
1815
|
i(r) {
|
|
1816
|
-
o || (
|
|
1816
|
+
o || (z(n.$$.fragment, r), o = !0);
|
|
1817
1817
|
},
|
|
1818
1818
|
o(r) {
|
|
1819
1819
|
Q(n.$$.fragment, r), o = !1;
|
|
@@ -1824,7 +1824,7 @@ function Ot(i, e) {
|
|
|
1824
1824
|
};
|
|
1825
1825
|
}
|
|
1826
1826
|
function dn(i) {
|
|
1827
|
-
let e, t, n, o, l, c, r, d, u, f, h, v, _, w, W, y, E, C, O, p,
|
|
1827
|
+
let e, t, n, o, l, c, r, d, u, f, h, v, _, w, W, y, E, C, O, p, q, b = !1;
|
|
1828
1828
|
l = new Qi({}), h = new Bt({});
|
|
1829
1829
|
let g = (
|
|
1830
1830
|
/*abortController*/
|
|
@@ -1836,15 +1836,15 @@ function dn(i) {
|
|
|
1836
1836
|
const k = (
|
|
1837
1837
|
/*#slots*/
|
|
1838
1838
|
i[60].default
|
|
1839
|
-
),
|
|
1839
|
+
), H = ci(
|
|
1840
1840
|
k,
|
|
1841
1841
|
i,
|
|
1842
1842
|
/*$$scope*/
|
|
1843
1843
|
i[59],
|
|
1844
1844
|
null
|
|
1845
1845
|
), X = [cn, un, ln, an], $ = [];
|
|
1846
|
-
function
|
|
1847
|
-
var ee,
|
|
1846
|
+
function j(L, F) {
|
|
1847
|
+
var ee, re;
|
|
1848
1848
|
return (
|
|
1849
1849
|
/*error*/
|
|
1850
1850
|
L[18] ? 0 : (
|
|
@@ -1854,15 +1854,15 @@ function dn(i) {
|
|
|
1854
1854
|
((ee = L[14]) == null ? void 0 : ee.length) === 0 ? 2 : (
|
|
1855
1855
|
/*focusedDelayed*/
|
|
1856
1856
|
L[16] && /*listFeatures*/
|
|
1857
|
-
((
|
|
1857
|
+
((re = L[14]) != null && re.length) ? 3 : -1
|
|
1858
1858
|
)
|
|
1859
1859
|
) : 1
|
|
1860
1860
|
)
|
|
1861
1861
|
);
|
|
1862
1862
|
}
|
|
1863
|
-
return ~(y =
|
|
1863
|
+
return ~(y = j(i)) && (E = $[y] = X[y](i)), {
|
|
1864
1864
|
c() {
|
|
1865
|
-
e = J(), t = D("form"), n = D("div"), o = D("button"), me(l.$$.fragment), c = J(), r = D("input"), d = J(), u = D("div"), f = D("button"), me(h.$$.fragment), v = J(), g && g.c(), _ = J(), m && m.c(), w = J(),
|
|
1865
|
+
e = J(), t = D("form"), n = D("div"), o = D("button"), me(l.$$.fragment), c = J(), r = D("input"), d = J(), u = D("div"), f = D("button"), me(h.$$.fragment), v = J(), g && g.c(), _ = J(), m && m.c(), w = J(), H && H.c(), W = J(), E && E.c(), a(o, "class", "search-button svelte-1uvos7g"), a(o, "type", "button"), a(
|
|
1866
1866
|
r,
|
|
1867
1867
|
"placeholder",
|
|
1868
1868
|
/*placeholder*/
|
|
@@ -1872,20 +1872,20 @@ function dn(i) {
|
|
|
1872
1872
|
"aria-label",
|
|
1873
1873
|
/*placeholder*/
|
|
1874
1874
|
i[8]
|
|
1875
|
-
), a(r, "class", "svelte-
|
|
1875
|
+
), a(r, "class", "svelte-1uvos7g"), a(f, "type", "button"), a(
|
|
1876
1876
|
f,
|
|
1877
1877
|
"title",
|
|
1878
1878
|
/*clearButtonTitle*/
|
|
1879
1879
|
i[3]
|
|
1880
|
-
), a(f, "class", "svelte-
|
|
1880
|
+
), a(f, "class", "svelte-1uvos7g"), a(u, "class", "clear-button-container svelte-1uvos7g"), de(
|
|
1881
1881
|
u,
|
|
1882
1882
|
"displayable",
|
|
1883
1883
|
/*searchValue*/
|
|
1884
1884
|
i[1] !== ""
|
|
1885
|
-
), a(n, "class", "input-group svelte-
|
|
1885
|
+
), a(n, "class", "input-group svelte-1uvos7g"), a(t, "tabindex", "0"), a(t, "class", C = gt(
|
|
1886
1886
|
/*className*/
|
|
1887
1887
|
i[2]
|
|
1888
|
-
) + " svelte-
|
|
1888
|
+
) + " svelte-1uvos7g"), de(
|
|
1889
1889
|
t,
|
|
1890
1890
|
"can-collapse",
|
|
1891
1891
|
/*collapsed*/
|
|
@@ -1898,7 +1898,7 @@ function dn(i) {
|
|
|
1898
1898
|
r,
|
|
1899
1899
|
/*searchValue*/
|
|
1900
1900
|
i[1]
|
|
1901
|
-
), T(n, d), T(n, u), T(u, f), ae(h, f, null), T(u, v), g && g.m(u, null), T(n, _), m && m.m(n, null), T(n, w),
|
|
1901
|
+
), T(n, d), T(n, u), T(u, f), ae(h, f, null), T(u, v), g && g.m(u, null), T(n, _), m && m.m(n, null), T(n, w), H && H.m(n, null), T(t, W), ~y && $[y].m(t, null), O = !0, p || (q = [
|
|
1902
1902
|
K(
|
|
1903
1903
|
o,
|
|
1904
1904
|
"click",
|
|
@@ -1974,9 +1974,9 @@ function dn(i) {
|
|
|
1974
1974
|
L[3]
|
|
1975
1975
|
), /*abortController*/
|
|
1976
1976
|
L[19] ? g ? F[0] & /*abortController*/
|
|
1977
|
-
524288 &&
|
|
1977
|
+
524288 && z(g, 1) : (g = Ct(), g.c(), z(g, 1), g.m(u, null)) : g && (He(), Q(g, 1, 1, () => {
|
|
1978
1978
|
g = null;
|
|
1979
|
-
}),
|
|
1979
|
+
}), je()), (!O || F[0] & /*searchValue*/
|
|
1980
1980
|
2) && de(
|
|
1981
1981
|
u,
|
|
1982
1982
|
"displayable",
|
|
@@ -1984,11 +1984,11 @@ function dn(i) {
|
|
|
1984
1984
|
L[1] !== ""
|
|
1985
1985
|
), /*enableReverse*/
|
|
1986
1986
|
L[5] === !0 ? m ? (m.p(L, F), F[0] & /*enableReverse*/
|
|
1987
|
-
32 &&
|
|
1987
|
+
32 && z(m, 1)) : (m = Wt(L), m.c(), z(m, 1), m.m(n, w)) : m && (He(), Q(m, 1, 1, () => {
|
|
1988
1988
|
m = null;
|
|
1989
|
-
}),
|
|
1989
|
+
}), je()), H && H.p && (!O || F[1] & /*$$scope*/
|
|
1990
1990
|
268435456) && fi(
|
|
1991
|
-
|
|
1991
|
+
H,
|
|
1992
1992
|
k,
|
|
1993
1993
|
L,
|
|
1994
1994
|
/*$$scope*/
|
|
@@ -2006,13 +2006,13 @@ function dn(i) {
|
|
|
2006
2006
|
null
|
|
2007
2007
|
);
|
|
2008
2008
|
let ee = y;
|
|
2009
|
-
y =
|
|
2009
|
+
y = j(L), y === ee ? ~y && $[y].p(L, F) : (E && (He(), Q($[ee], 1, 1, () => {
|
|
2010
2010
|
$[ee] = null;
|
|
2011
|
-
}),
|
|
2011
|
+
}), je()), ~y ? (E = $[y], E ? E.p(L, F) : (E = $[y] = X[y](L), E.c()), z(E, 1), E.m(t, null)) : E = null), (!O || F[0] & /*className*/
|
|
2012
2012
|
4 && C !== (C = gt(
|
|
2013
2013
|
/*className*/
|
|
2014
2014
|
L[2]
|
|
2015
|
-
) + " svelte-
|
|
2015
|
+
) + " svelte-1uvos7g")) && a(t, "class", C), (!O || F[0] & /*className, collapsed, searchValue*/
|
|
2016
2016
|
22) && de(
|
|
2017
2017
|
t,
|
|
2018
2018
|
"can-collapse",
|
|
@@ -2022,13 +2022,13 @@ function dn(i) {
|
|
|
2022
2022
|
);
|
|
2023
2023
|
},
|
|
2024
2024
|
i(L) {
|
|
2025
|
-
O || (
|
|
2025
|
+
O || (z(b), z(l.$$.fragment, L), z(h.$$.fragment, L), z(g), z(m), z(H, L), z(E), O = !0);
|
|
2026
2026
|
},
|
|
2027
2027
|
o(L) {
|
|
2028
|
-
Q(b), Q(l.$$.fragment, L), Q(h.$$.fragment, L), Q(g), Q(m), Q(
|
|
2028
|
+
Q(b), Q(l.$$.fragment, L), Q(h.$$.fragment, L), Q(g), Q(m), Q(H, L), Q(E), O = !1;
|
|
2029
2029
|
},
|
|
2030
2030
|
d(L) {
|
|
2031
|
-
L && (U(e), U(t)), le(l), i[62](null), le(h), g && g.d(), m && m.d(),
|
|
2031
|
+
L && (U(e), U(t)), le(l), i[62](null), le(h), g && g.d(), m && m.d(), H && H.d(L), ~y && $[y].d(), p = !1, ue(q);
|
|
2032
2032
|
}
|
|
2033
2033
|
};
|
|
2034
2034
|
}
|
|
@@ -2058,38 +2058,38 @@ function fn(i, e, t) {
|
|
|
2058
2058
|
"poi.restaurant": 18,
|
|
2059
2059
|
"poi.aerodrome": 13
|
|
2060
2060
|
};
|
|
2061
|
-
let { class: r = void 0 } = e, { apiKey: d } = e, { bbox: u = void 0 } = e, { clearButtonTitle: f = "clear" } = e, { clearOnBlur: h = !1 } = e, { collapsed: v = !1 } = e, { country: _ = void 0 } = e, { debounceSearch: w = 200 } = e, { enableReverse: W = !1 } = e, { errorMessage: y = "Something went wrong…" } = e, { filter: E = () => !0 } = e, { flyTo: C = !0 } = e, { fuzzyMatch: O = !0 } = e, { language: p = void 0 } = e, { limit:
|
|
2061
|
+
let { class: r = void 0 } = e, { apiKey: d } = e, { bbox: u = void 0 } = e, { clearButtonTitle: f = "clear" } = e, { clearOnBlur: h = !1 } = e, { collapsed: v = !1 } = e, { country: _ = void 0 } = e, { debounceSearch: w = 200 } = e, { enableReverse: W = !1 } = e, { errorMessage: y = "Something went wrong…" } = e, { filter: E = () => !0 } = e, { flyTo: C = !0 } = e, { fuzzyMatch: O = !0 } = e, { language: p = void 0 } = e, { limit: q = void 0 } = e, { mapController: b = void 0 } = e, { minLength: g = 2 } = e, { noResultsMessage: m = "Oops! Looks like you're trying to predict something that's not quite right. We can't seem to find what you're looking for. Maybe try double-checking your spelling or try a different search term. Keep on typing - we'll do our best to get you where you need to go!" } = e, { placeholder: k = "Search" } = e, { proximity: H = [{ type: "server-geolocation" }] } = e, { reverseActive: X = W === "always" } = e, { reverseButtonTitle: $ = "toggle reverse geocoding" } = e, { searchValue: j = "" } = e, { showFullGeometry: L = !0 } = e, { showPlaceType: F = "ifNeeded" } = e, { showResultsWhileTyping: ee = !0 } = e, { selectFirst: re = !0 } = e, { flyToSelected: Pe = !1 } = e, { markerOnSelected: Oe = !0 } = e, { types: De = void 0 } = e, { excludeTypes: Re = !1 } = e, { zoom: _e = c } = e, { maxZoom: Ue = void 0 } = e, { apiUrl: Ze = "https://api.maptiler.com/geocoding" } = e, { fetchParameters: Ge = {} } = e, { iconsBaseUrl: ot = "https://cdn.maptiler.com/maptiler-geocoding-control/v1.4.2-dev.2/icons/" } = e, { adjustUrlQuery: qe = () => {
|
|
2062
2062
|
} } = e;
|
|
2063
|
-
function qt() {
|
|
2064
|
-
ie.focus();
|
|
2065
|
-
}
|
|
2066
2063
|
function zt() {
|
|
2067
|
-
|
|
2064
|
+
te.focus();
|
|
2065
|
+
}
|
|
2066
|
+
function Ht() {
|
|
2067
|
+
te.blur();
|
|
2068
2068
|
}
|
|
2069
|
-
function st(s, I = !0,
|
|
2070
|
-
t(1,
|
|
2071
|
-
|
|
2069
|
+
function st(s, I = !0, G = !1) {
|
|
2070
|
+
t(1, j = s), I ? (t(15, R = -1), lt()) : (xe(!G, G), setTimeout(() => {
|
|
2071
|
+
te.focus(), te.select();
|
|
2072
2072
|
}));
|
|
2073
2073
|
}
|
|
2074
|
-
function
|
|
2074
|
+
function jt() {
|
|
2075
2075
|
t(14, M = void 0), t(56, S = void 0), t(15, R = -1);
|
|
2076
2076
|
}
|
|
2077
|
-
function
|
|
2078
|
-
t(55,
|
|
2077
|
+
function Pt() {
|
|
2078
|
+
t(55, P = []), t(56, S = void 0);
|
|
2079
2079
|
}
|
|
2080
|
-
let
|
|
2081
|
-
const
|
|
2080
|
+
let ye = !1, M, P, S, at = "", te, R = -1, ie, Ie = [], ge, we, Ae, Qe;
|
|
2081
|
+
const Zt = /* @__PURE__ */ new Set(), ce = _i();
|
|
2082
2082
|
Li(() => {
|
|
2083
2083
|
b && (b.setEventHandler(void 0), b.indicateReverse(!1), b.setSelectedMarker(-1), b.setMarkers(void 0, void 0));
|
|
2084
2084
|
});
|
|
2085
2085
|
function lt(s) {
|
|
2086
|
-
if (
|
|
2087
|
-
t(56, S = M[R]), t(1,
|
|
2088
|
-
else if (
|
|
2089
|
-
const I = s || !Ve(
|
|
2090
|
-
Ke(
|
|
2091
|
-
t(55,
|
|
2092
|
-
}).catch((
|
|
2086
|
+
if (we && (clearTimeout(we), we = void 0), R > -1 && M)
|
|
2087
|
+
t(56, S = M[R]), t(1, j = S.place_type[0] === "reverse" ? S.place_name : S.place_name.replace(/,.*/, "")), t(18, ie = void 0), t(55, P = void 0), t(15, R = -1);
|
|
2088
|
+
else if (j) {
|
|
2089
|
+
const I = s || !Ve(j);
|
|
2090
|
+
Ke(j, { exact: !0 }).then(() => {
|
|
2091
|
+
t(55, P = M), t(56, S = void 0), I && Gt();
|
|
2092
|
+
}).catch((G) => t(18, ie = G));
|
|
2093
2093
|
}
|
|
2094
2094
|
}
|
|
2095
2095
|
function Ve(s) {
|
|
@@ -2099,28 +2099,28 @@ function fn(i, e, t) {
|
|
|
2099
2099
|
return !1;
|
|
2100
2100
|
}
|
|
2101
2101
|
}
|
|
2102
|
-
async function Ke(s, { byId: I = !1, exact:
|
|
2103
|
-
t(18,
|
|
2102
|
+
async function Ke(s, { byId: I = !1, exact: G = !1 } = {}) {
|
|
2103
|
+
t(18, ie = void 0), ge == null || ge.abort();
|
|
2104
2104
|
const x = new AbortController();
|
|
2105
|
-
t(19,
|
|
2105
|
+
t(19, ge = x);
|
|
2106
2106
|
try {
|
|
2107
|
-
const N = Ve(s),
|
|
2108
|
-
if (p !== void 0 &&
|
|
2109
|
-
const Be = await Ki(b,
|
|
2110
|
-
Be &&
|
|
2107
|
+
const N = Ve(s), Z = new URLSearchParams();
|
|
2108
|
+
if (p !== void 0 && Z.set("language", Array.isArray(p) ? p.join(",") : p ?? ""), De && Z.set("types", De.join(",")), Re && Z.set("excludeTypes", String(Re)), u && Z.set("bbox", u.map((Be) => Be.toFixed(6)).join(",")), _ && Z.set("country", Array.isArray(_) ? _.join(",") : _), !I && !N) {
|
|
2109
|
+
const Be = await Ki(b, H, x);
|
|
2110
|
+
Be && Z.set("proximity", Be), (G || !ee) && Z.set("autocomplete", "false"), Z.set("fuzzyMatch", String(O));
|
|
2111
2111
|
}
|
|
2112
|
-
|
|
2113
|
-
const
|
|
2114
|
-
if (
|
|
2112
|
+
q !== void 0 && Z.set("limit", String(q)), Z.set("key", d), qe(Z);
|
|
2113
|
+
const ne = Ze + "/" + encodeURIComponent(N ? N.decimalLongitude + "," + N.decimalLatitude : s) + ".json?" + Z.toString();
|
|
2114
|
+
if (ne === at) {
|
|
2115
2115
|
I ? (t(14, M = void 0), t(56, S = Ie[0])) : t(14, M = Ie);
|
|
2116
2116
|
return;
|
|
2117
2117
|
}
|
|
2118
|
-
at =
|
|
2119
|
-
const Xe = await fetch(
|
|
2118
|
+
at = ne;
|
|
2119
|
+
const Xe = await fetch(ne, { signal: x.signal, ...Ge });
|
|
2120
2120
|
if (!Xe.ok)
|
|
2121
2121
|
throw new Error(await Xe.text());
|
|
2122
2122
|
const Ye = await Xe.json();
|
|
2123
|
-
ce("response", { url:
|
|
2123
|
+
ce("response", { url: ne, featureCollection: Ye }), I ? (t(14, M = void 0), t(56, S = Ye.features[0]), Ie = [S]) : (t(14, M = Ye.features.filter(E)), N && M.unshift({
|
|
2124
2124
|
type: "Feature",
|
|
2125
2125
|
properties: {},
|
|
2126
2126
|
id: "reverse_" + N.decimalLongitude + "_" + N.decimalLatitude,
|
|
@@ -2138,131 +2138,131 @@ function fn(i, e, t) {
|
|
|
2138
2138
|
type: "Point",
|
|
2139
2139
|
coordinates: [N.decimalLongitude, N.decimalLatitude]
|
|
2140
2140
|
}
|
|
2141
|
-
}), Ie = M, N &&
|
|
2141
|
+
}), Ie = M, N && te.focus());
|
|
2142
2142
|
} catch (N) {
|
|
2143
2143
|
if (N && typeof N == "object" && "name" in N && N.name === "AbortError")
|
|
2144
2144
|
return;
|
|
2145
2145
|
throw N;
|
|
2146
2146
|
} finally {
|
|
2147
|
-
x ===
|
|
2147
|
+
x === ge && t(19, ge = void 0);
|
|
2148
2148
|
}
|
|
2149
2149
|
}
|
|
2150
|
-
function
|
|
2150
|
+
function Gt() {
|
|
2151
2151
|
var x;
|
|
2152
|
-
if (!(
|
|
2152
|
+
if (!(P != null && P.length) || !C)
|
|
2153
2153
|
return;
|
|
2154
|
-
const s = [180, 90, -180, -90], I = !
|
|
2155
|
-
let
|
|
2156
|
-
for (const N of
|
|
2157
|
-
const
|
|
2158
|
-
if (
|
|
2159
|
-
for (const
|
|
2160
|
-
s[
|
|
2154
|
+
const s = [180, 90, -180, -90], I = !P.some((N) => !N.matching_text);
|
|
2155
|
+
let G;
|
|
2156
|
+
for (const N of P) {
|
|
2157
|
+
const Z = Ne(N);
|
|
2158
|
+
if (G = Ue ?? (G === void 0 ? Z : Z === void 0 ? G : Math.max(G, Z)), I || !N.matching_text)
|
|
2159
|
+
for (const ne of [0, 1, 2, 3])
|
|
2160
|
+
s[ne] = Math[ne < 2 ? "min" : "max"](s[ne], ((x = N.bbox) == null ? void 0 : x[ne]) ?? N.center[ne % 2]);
|
|
2161
2161
|
}
|
|
2162
|
-
b &&
|
|
2162
|
+
b && P.length > 0 && (S && s[0] === s[2] && s[1] === s[3] ? b.flyTo(S.center, Ne(S)) : b.fitBounds(yt(s), 50, G));
|
|
2163
2163
|
}
|
|
2164
|
-
function
|
|
2165
|
-
var
|
|
2164
|
+
function Ne(s) {
|
|
2165
|
+
var G;
|
|
2166
2166
|
if (!s.bbox || s.bbox[0] !== s.bbox[2] && s.bbox[1] !== s.bbox[3])
|
|
2167
2167
|
return;
|
|
2168
|
-
if (typeof
|
|
2169
|
-
return s.id.startsWith("poi.") || s.id.startsWith("address.") ? Ue :
|
|
2168
|
+
if (typeof _e == "number")
|
|
2169
|
+
return s.id.startsWith("poi.") || s.id.startsWith("address.") ? Ue : _e;
|
|
2170
2170
|
const I = s.id.replace(/\..*/, "");
|
|
2171
|
-
return (Array.isArray((
|
|
2171
|
+
return (Array.isArray((G = s.properties) == null ? void 0 : G.categories) ? s.properties.categories.reduce(
|
|
2172
2172
|
(x, N) => {
|
|
2173
|
-
const
|
|
2174
|
-
return x === void 0 ?
|
|
2173
|
+
const Z = _e[I + "." + N];
|
|
2174
|
+
return x === void 0 ? Z : Z === void 0 ? x : Math.max(x, Z);
|
|
2175
2175
|
},
|
|
2176
2176
|
void 0
|
|
2177
|
-
) : void 0) ??
|
|
2177
|
+
) : void 0) ?? _e[I];
|
|
2178
2178
|
}
|
|
2179
|
-
function
|
|
2179
|
+
function qt(s) {
|
|
2180
2180
|
t(0, X = W === "always"), t(14, M = void 0), t(56, S = void 0), t(15, R = -1), st(s[1].toFixed(6) + ", " + Vi(s[0], [-180, 180], !0).toFixed(6), !1, !0);
|
|
2181
2181
|
}
|
|
2182
2182
|
function Qt(s) {
|
|
2183
2183
|
if (!M)
|
|
2184
2184
|
return;
|
|
2185
2185
|
let I = s.key === "ArrowDown" ? 1 : s.key === "ArrowUp" ? -1 : 0;
|
|
2186
|
-
I && (R === (
|
|
2186
|
+
I && (R === (re ? 0 : -1) && I === -1 && t(15, R = M.length), t(15, R += I), R >= M.length && t(15, R = -1), R < 0 && re && t(15, R = 0), s.preventDefault());
|
|
2187
2187
|
}
|
|
2188
2188
|
function xe(s = !0, I = !1) {
|
|
2189
|
-
if (t(18,
|
|
2190
|
-
if (
|
|
2189
|
+
if (t(18, ie = void 0), ee || I) {
|
|
2190
|
+
if (we && clearTimeout(we), j.length < g)
|
|
2191
2191
|
return;
|
|
2192
|
-
const
|
|
2193
|
-
|
|
2192
|
+
const G = j;
|
|
2193
|
+
we = window.setTimeout(
|
|
2194
2194
|
() => {
|
|
2195
|
-
Ke(
|
|
2195
|
+
Ke(G).catch((x) => t(18, ie = x));
|
|
2196
2196
|
},
|
|
2197
2197
|
s ? w : 0
|
|
2198
2198
|
);
|
|
2199
2199
|
} else
|
|
2200
|
-
t(14, M = void 0), t(18,
|
|
2200
|
+
t(14, M = void 0), t(18, ie = void 0);
|
|
2201
2201
|
}
|
|
2202
2202
|
function Je(s) {
|
|
2203
|
-
t(56, S = s), t(1,
|
|
2203
|
+
t(56, S = s), t(1, j = s.place_name), t(15, R = -1);
|
|
2204
2204
|
}
|
|
2205
|
-
const Vt = () =>
|
|
2205
|
+
const Vt = () => te.focus();
|
|
2206
2206
|
function Kt(s) {
|
|
2207
2207
|
tt[s ? "unshift" : "push"](() => {
|
|
2208
|
-
|
|
2208
|
+
te = s, t(17, te);
|
|
2209
2209
|
});
|
|
2210
2210
|
}
|
|
2211
2211
|
function xt() {
|
|
2212
|
-
|
|
2212
|
+
j = this.value, t(1, j), t(13, ye), t(28, h);
|
|
2213
2213
|
}
|
|
2214
|
-
const Jt = () => t(13,
|
|
2215
|
-
t(1,
|
|
2216
|
-
}, ei = () => t(0, X = !X), ti = () => t(18,
|
|
2217
|
-
|
|
2214
|
+
const Jt = () => t(13, ye = !0), Xt = () => t(13, ye = !1), Yt = () => xe(), $t = () => {
|
|
2215
|
+
t(1, j = ""), te.focus();
|
|
2216
|
+
}, ei = () => t(0, X = !X), ti = () => t(18, ie = void 0), ii = (s) => t(15, R = s), ni = (s) => Je(s), ri = () => {
|
|
2217
|
+
re || t(15, R = -1);
|
|
2218
2218
|
}, oi = () => {
|
|
2219
2219
|
};
|
|
2220
2220
|
return i.$$set = (s) => {
|
|
2221
|
-
"class" in s && t(2, r = s.class), "apiKey" in s && t(26, d = s.apiKey), "bbox" in s && t(27, u = s.bbox), "clearButtonTitle" in s && t(3, f = s.clearButtonTitle), "clearOnBlur" in s && t(28, h = s.clearOnBlur), "collapsed" in s && t(4, v = s.collapsed), "country" in s && t(29, _ = s.country), "debounceSearch" in s && t(30, w = s.debounceSearch), "enableReverse" in s && t(5, W = s.enableReverse), "errorMessage" in s && t(6, y = s.errorMessage), "filter" in s && t(31, E = s.filter), "flyTo" in s && t(32, C = s.flyTo), "fuzzyMatch" in s && t(33, O = s.fuzzyMatch), "language" in s && t(34, p = s.language), "limit" in s && t(35,
|
|
2221
|
+
"class" in s && t(2, r = s.class), "apiKey" in s && t(26, d = s.apiKey), "bbox" in s && t(27, u = s.bbox), "clearButtonTitle" in s && t(3, f = s.clearButtonTitle), "clearOnBlur" in s && t(28, h = s.clearOnBlur), "collapsed" in s && t(4, v = s.collapsed), "country" in s && t(29, _ = s.country), "debounceSearch" in s && t(30, w = s.debounceSearch), "enableReverse" in s && t(5, W = s.enableReverse), "errorMessage" in s && t(6, y = s.errorMessage), "filter" in s && t(31, E = s.filter), "flyTo" in s && t(32, C = s.flyTo), "fuzzyMatch" in s && t(33, O = s.fuzzyMatch), "language" in s && t(34, p = s.language), "limit" in s && t(35, q = s.limit), "mapController" in s && t(36, b = s.mapController), "minLength" in s && t(37, g = s.minLength), "noResultsMessage" in s && t(7, m = s.noResultsMessage), "placeholder" in s && t(8, k = s.placeholder), "proximity" in s && t(38, H = s.proximity), "reverseActive" in s && t(0, X = s.reverseActive), "reverseButtonTitle" in s && t(9, $ = s.reverseButtonTitle), "searchValue" in s && t(1, j = s.searchValue), "showFullGeometry" in s && t(39, L = s.showFullGeometry), "showPlaceType" in s && t(10, F = s.showPlaceType), "showResultsWhileTyping" in s && t(40, ee = s.showResultsWhileTyping), "selectFirst" in s && t(11, re = s.selectFirst), "flyToSelected" in s && t(41, Pe = s.flyToSelected), "markerOnSelected" in s && t(42, Oe = s.markerOnSelected), "types" in s && t(43, De = s.types), "excludeTypes" in s && t(44, Re = s.excludeTypes), "zoom" in s && t(45, _e = s.zoom), "maxZoom" in s && t(46, Ue = s.maxZoom), "apiUrl" in s && t(47, Ze = s.apiUrl), "fetchParameters" in s && t(48, Ge = s.fetchParameters), "iconsBaseUrl" in s && t(12, ot = s.iconsBaseUrl), "adjustUrlQuery" in s && t(49, qe = s.adjustUrlQuery), "$$scope" in s && t(59, l = s.$$scope);
|
|
2222
2222
|
}, i.$$.update = () => {
|
|
2223
2223
|
if (i.$$.dirty[0] & /*enableReverse*/
|
|
2224
2224
|
32 && t(0, X = W === "always"), i.$$.dirty[0] & /*focused, clearOnBlur*/
|
|
2225
2225
|
268443648 && setTimeout(() => {
|
|
2226
|
-
t(16, Ae =
|
|
2226
|
+
t(16, Ae = ye), h && !ye && t(1, j = "");
|
|
2227
2227
|
}), i.$$.dirty[0] & /*searchValue, listFeatures*/
|
|
2228
2228
|
16386 | i.$$.dirty[1] & /*minLength*/
|
|
2229
|
-
64 &&
|
|
2230
|
-
33554688 && L && S && !S.address && S.geometry.type === "Point" && S.place_type[0] !== "reverse" && Ke(S.id, { byId: !0 }).catch((s) => t(18,
|
|
2231
|
-
100663330 && (b && S && S.id !== Qe && C && (!S.bbox || S.bbox[0] === S.bbox[2] && S.bbox[1] === S.bbox[3] ? b.flyTo(S.center,
|
|
2232
|
-
18432 &&
|
|
2233
|
-
|
|
2229
|
+
64 && j.length < g && (t(56, S = void 0), t(14, M = void 0), t(18, ie = void 0), t(55, P = M)), i.$$.dirty[1] & /*showFullGeometry, picked*/
|
|
2230
|
+
33554688 && L && S && !S.address && S.geometry.type === "Point" && S.place_type[0] !== "reverse" && Ke(S.id, { byId: !0 }).catch((s) => t(18, ie = s)), i.$$.dirty[1] & /*mapController, picked, prevIdToFly, flyTo*/
|
|
2231
|
+
100663330 && (b && S && S.id !== Qe && C && (!S.bbox || S.bbox[0] === S.bbox[2] && S.bbox[1] === S.bbox[3] ? b.flyTo(S.center, Ne(S)) : b.fitBounds(yt(S.bbox), 50, Ne(S)), t(14, M = void 0), t(55, P = void 0), t(15, R = -1)), t(57, Qe = S == null ? void 0 : S.id)), i.$$.dirty[0] & /*selectFirst, listFeatures*/
|
|
2232
|
+
18432 && re && M != null && M.length && t(15, R = 0), i.$$.dirty[0] & /*searchValue*/
|
|
2233
|
+
2 && t(15, R = -1), i.$$.dirty[0] & /*listFeatures*/
|
|
2234
2234
|
16384 | i.$$.dirty[1] & /*markedFeatures*/
|
|
2235
|
-
16777216 &&
|
|
2235
|
+
16777216 && P !== M && t(55, P = void 0), i.$$.dirty[0] & /*reverseActive, listFeatures, focusedDelayed*/
|
|
2236
2236
|
81921 | i.$$.dirty[1] & /*mapController, markedFeatures*/
|
|
2237
2237
|
16777248 && b && b.setEventHandler((s) => {
|
|
2238
2238
|
switch (s.type) {
|
|
2239
2239
|
case "mapClick":
|
|
2240
|
-
X &&
|
|
2240
|
+
X && qt(s.coordinates);
|
|
2241
2241
|
break;
|
|
2242
2242
|
case "markerClick":
|
|
2243
2243
|
{
|
|
2244
|
-
const I = M == null ? void 0 : M.find((
|
|
2244
|
+
const I = M == null ? void 0 : M.find((G) => G.id === s.id);
|
|
2245
2245
|
I && Je(I);
|
|
2246
2246
|
}
|
|
2247
2247
|
break;
|
|
2248
2248
|
case "markerMouseEnter":
|
|
2249
|
-
|
|
2249
|
+
P && t(15, R = Ae ? (M == null ? void 0 : M.findIndex((I) => I.id === s.id)) ?? -1 : -1);
|
|
2250
2250
|
break;
|
|
2251
2251
|
case "markerMouseLeave":
|
|
2252
|
-
|
|
2252
|
+
P && t(15, R = -1);
|
|
2253
2253
|
break;
|
|
2254
2254
|
}
|
|
2255
2255
|
}), i.$$.dirty[0] & /*listFeatures, selectedItemIndex*/
|
|
2256
2256
|
49152 && t(58, n = M == null ? void 0 : M[R]), i.$$.dirty[1] & /*mapController, selected, flyTo, flyToSelected*/
|
|
2257
|
-
134218786 && b && n && C &&
|
|
2258
|
-
2080 && (
|
|
2259
|
-
150997024 && b &&
|
|
2260
|
-
50331680 && b && b.setMarkers(
|
|
2257
|
+
134218786 && b && n && C && Pe && b.flyTo(n.center, Ne(n)), i.$$.dirty[1] & /*markerOnSelected, mapController*/
|
|
2258
|
+
2080 && (Oe || b == null || b.setMarkers(void 0, void 0)), i.$$.dirty[1] & /*mapController, markerOnSelected, markedFeatures, selected*/
|
|
2259
|
+
150997024 && b && Oe && !P && (b.setMarkers(n ? [n] : void 0, void 0), b.setSelectedMarker(n ? 0 : -1)), i.$$.dirty[1] & /*mapController, markedFeatures, picked*/
|
|
2260
|
+
50331680 && b && b.setMarkers(P, S), i.$$.dirty[0] & /*selectedItemIndex*/
|
|
2261
2261
|
32768 | i.$$.dirty[1] & /*markedFeatures, mapController*/
|
|
2262
|
-
16777248 &&
|
|
2262
|
+
16777248 && P && b && b.setSelectedMarker(R), i.$$.dirty[0] & /*searchValue*/
|
|
2263
2263
|
2 | i.$$.dirty[1] & /*mapController*/
|
|
2264
2264
|
32 && b) {
|
|
2265
|
-
const s = Ve(
|
|
2265
|
+
const s = Ve(j);
|
|
2266
2266
|
b.setReverseMarker(s ? [s.decimalLongitude, s.decimalLatitude] : void 0);
|
|
2267
2267
|
}
|
|
2268
2268
|
i.$$.dirty[1] & /*selected*/
|
|
@@ -2270,14 +2270,14 @@ function fn(i, e, t) {
|
|
|
2270
2270
|
33554432 && ce("pick", S), i.$$.dirty[0] & /*focusedDelayed, listFeatures*/
|
|
2271
2271
|
81920 && ce("optionsVisibilityChange", Ae && !!M), i.$$.dirty[0] & /*listFeatures*/
|
|
2272
2272
|
16384 && ce("featuresListed", M), i.$$.dirty[1] & /*markedFeatures*/
|
|
2273
|
-
16777216 && ce("featuresMarked",
|
|
2273
|
+
16777216 && ce("featuresMarked", P), i.$$.dirty[0] & /*reverseActive*/
|
|
2274
2274
|
1 && ce("reverseToggle", X), i.$$.dirty[0] & /*searchValue*/
|
|
2275
|
-
2 && ce("queryChange",
|
|
2275
|
+
2 && ce("queryChange", j), i.$$.dirty[0] & /*reverseActive*/
|
|
2276
2276
|
1 | i.$$.dirty[1] & /*mapController*/
|
|
2277
2277
|
32 && b && b.indicateReverse(X);
|
|
2278
2278
|
}, [
|
|
2279
2279
|
X,
|
|
2280
|
-
|
|
2280
|
+
j,
|
|
2281
2281
|
r,
|
|
2282
2282
|
f,
|
|
2283
2283
|
v,
|
|
@@ -2287,16 +2287,16 @@ function fn(i, e, t) {
|
|
|
2287
2287
|
k,
|
|
2288
2288
|
$,
|
|
2289
2289
|
F,
|
|
2290
|
-
|
|
2290
|
+
re,
|
|
2291
2291
|
ot,
|
|
2292
|
-
|
|
2292
|
+
ye,
|
|
2293
2293
|
M,
|
|
2294
2294
|
R,
|
|
2295
2295
|
Ae,
|
|
2296
|
+
te,
|
|
2296
2297
|
ie,
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
Pt,
|
|
2298
|
+
ge,
|
|
2299
|
+
Zt,
|
|
2300
2300
|
lt,
|
|
2301
2301
|
Qt,
|
|
2302
2302
|
xe,
|
|
@@ -2311,27 +2311,27 @@ function fn(i, e, t) {
|
|
|
2311
2311
|
C,
|
|
2312
2312
|
O,
|
|
2313
2313
|
p,
|
|
2314
|
-
|
|
2314
|
+
q,
|
|
2315
2315
|
b,
|
|
2316
2316
|
g,
|
|
2317
|
-
|
|
2317
|
+
H,
|
|
2318
2318
|
L,
|
|
2319
2319
|
ee,
|
|
2320
|
-
|
|
2320
|
+
Pe,
|
|
2321
|
+
Oe,
|
|
2321
2322
|
De,
|
|
2322
|
-
ge,
|
|
2323
2323
|
Re,
|
|
2324
|
-
|
|
2324
|
+
_e,
|
|
2325
2325
|
Ue,
|
|
2326
|
-
Pe,
|
|
2327
2326
|
Ze,
|
|
2328
2327
|
Ge,
|
|
2329
|
-
|
|
2328
|
+
qe,
|
|
2330
2329
|
zt,
|
|
2331
|
-
st,
|
|
2332
2330
|
Ht,
|
|
2331
|
+
st,
|
|
2333
2332
|
jt,
|
|
2334
|
-
|
|
2333
|
+
Pt,
|
|
2334
|
+
P,
|
|
2335
2335
|
S,
|
|
2336
2336
|
Qe,
|
|
2337
2337
|
n,
|
|
@@ -2352,14 +2352,14 @@ function fn(i, e, t) {
|
|
|
2352
2352
|
oi
|
|
2353
2353
|
];
|
|
2354
2354
|
}
|
|
2355
|
-
let mn = class extends
|
|
2355
|
+
let mn = class extends Le {
|
|
2356
2356
|
constructor(e) {
|
|
2357
|
-
super(),
|
|
2357
|
+
super(), ve(
|
|
2358
2358
|
this,
|
|
2359
2359
|
e,
|
|
2360
2360
|
fn,
|
|
2361
2361
|
dn,
|
|
2362
|
-
|
|
2362
|
+
be,
|
|
2363
2363
|
{
|
|
2364
2364
|
ZOOM_DEFAULTS: 25,
|
|
2365
2365
|
class: 2,
|