@maptiler/geocoding-control 0.0.86 → 0.0.87
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/GeocodingControl.svelte +1 -1
- package/MapLibreBasedGeocodingControl.d.ts +5 -9
- package/MapTilerSdkGeocodingControl.d.ts +3 -3
- package/leaflet.js +13 -13
- package/leaflet.js.map +1 -1
- package/leaflet.umd.js +1 -1
- package/leaflet.umd.js.map +1 -1
- package/maplibregl.d.ts +9 -3
- package/maplibregl.js +16 -16
- package/maplibregl.js.map +1 -1
- package/maplibregl.umd.js +2 -2
- package/maplibregl.umd.js.map +1 -1
- package/maptilersdk.js +16 -16
- package/maptilersdk.js.map +1 -1
- package/maptilersdk.umd.js +4 -4
- package/maptilersdk.umd.js.map +1 -1
- package/package.json +1 -1
- package/react.js +107 -107
- 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/package.json
CHANGED
package/react.js
CHANGED
|
@@ -18,7 +18,7 @@ function Y(t) {
|
|
|
18
18
|
function it(t) {
|
|
19
19
|
return typeof t == "function";
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function ye(t, e) {
|
|
22
22
|
return t != t ? e == e : t !== e || t && typeof t == "object" || typeof t == "function";
|
|
23
23
|
}
|
|
24
24
|
function St(t) {
|
|
@@ -227,7 +227,7 @@ function _e(t, e, n, r) {
|
|
|
227
227
|
t.$$.on_destroy ? t.$$.on_destroy.push(...c) : Y(c), t.$$.on_mount = [];
|
|
228
228
|
}), u.forEach(Ge);
|
|
229
229
|
}
|
|
230
|
-
function
|
|
230
|
+
function ge(t, e) {
|
|
231
231
|
const n = t.$$;
|
|
232
232
|
n.fragment !== null && (Qt(n.after_update), Y(n.on_destroy), n.fragment && n.fragment.d(e), n.on_destroy = n.fragment = null, n.ctx = []);
|
|
233
233
|
}
|
|
@@ -275,7 +275,7 @@ function be(t, e, n, r, i, u, c, d = [-1]) {
|
|
|
275
275
|
}
|
|
276
276
|
class we {
|
|
277
277
|
$destroy() {
|
|
278
|
-
|
|
278
|
+
ge(this, 1), this.$destroy = C;
|
|
279
279
|
}
|
|
280
280
|
$on(e, n) {
|
|
281
281
|
if (!it(n))
|
|
@@ -309,7 +309,7 @@ function Ut(t) {
|
|
|
309
309
|
}
|
|
310
310
|
class Wt extends we {
|
|
311
311
|
constructor(e) {
|
|
312
|
-
super(), be(this, e, null, Ut,
|
|
312
|
+
super(), be(this, e, null, Ut, ye, {});
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
function Zt(t) {
|
|
@@ -331,7 +331,7 @@ function Zt(t) {
|
|
|
331
331
|
}
|
|
332
332
|
class Jt extends we {
|
|
333
333
|
constructor(e) {
|
|
334
|
-
super(), be(this, e, null, Zt,
|
|
334
|
+
super(), be(this, e, null, Zt, ye, {});
|
|
335
335
|
}
|
|
336
336
|
}
|
|
337
337
|
function Xt(t) {
|
|
@@ -353,7 +353,7 @@ function Xt(t) {
|
|
|
353
353
|
}
|
|
354
354
|
class Yt extends we {
|
|
355
355
|
constructor(e) {
|
|
356
|
-
super(), be(this, e, null, Xt,
|
|
356
|
+
super(), be(this, e, null, Xt, ye, {});
|
|
357
357
|
}
|
|
358
358
|
}
|
|
359
359
|
function $t(t) {
|
|
@@ -375,7 +375,7 @@ function $t(t) {
|
|
|
375
375
|
}
|
|
376
376
|
class en extends we {
|
|
377
377
|
constructor(e) {
|
|
378
|
-
super(), be(this, e, null, $t,
|
|
378
|
+
super(), be(this, e, null, $t, ye, {});
|
|
379
379
|
}
|
|
380
380
|
}
|
|
381
381
|
function Xe(t, e, n) {
|
|
@@ -398,7 +398,7 @@ function Ye(t) {
|
|
|
398
398
|
Q(e.$$.fragment, r), n = !1;
|
|
399
399
|
},
|
|
400
400
|
d(r) {
|
|
401
|
-
|
|
401
|
+
ge(e, r);
|
|
402
402
|
}
|
|
403
403
|
};
|
|
404
404
|
}
|
|
@@ -411,7 +411,7 @@ function $e(t) {
|
|
|
411
411
|
"title",
|
|
412
412
|
/*reverseButtonTitle*/
|
|
413
413
|
t[9]
|
|
414
|
-
), s(e, "class", "svelte-
|
|
414
|
+
), s(e, "class", "svelte-p509gh"), X(
|
|
415
415
|
e,
|
|
416
416
|
"active",
|
|
417
417
|
/*reverseActive*/
|
|
@@ -448,7 +448,7 @@ function $e(t) {
|
|
|
448
448
|
Q(n.$$.fragment, c), r = !1;
|
|
449
449
|
},
|
|
450
450
|
d(c) {
|
|
451
|
-
c && I(e),
|
|
451
|
+
c && I(e), ge(n), i = !1, u();
|
|
452
452
|
}
|
|
453
453
|
};
|
|
454
454
|
}
|
|
@@ -464,7 +464,7 @@ function tn(t) {
|
|
|
464
464
|
e = z("ul");
|
|
465
465
|
for (let c = 0; c < u.length; c += 1)
|
|
466
466
|
u[c].c();
|
|
467
|
-
s(e, "class", "svelte-
|
|
467
|
+
s(e, "class", "svelte-p509gh");
|
|
468
468
|
},
|
|
469
469
|
m(c, d) {
|
|
470
470
|
O(c, e, d);
|
|
@@ -512,7 +512,7 @@ function nn(t) {
|
|
|
512
512
|
e = z("div"), n = ne(
|
|
513
513
|
/*noResultsMessage*/
|
|
514
514
|
t[7]
|
|
515
|
-
), s(e, "class", "no-results svelte-
|
|
515
|
+
), s(e, "class", "no-results svelte-p509gh");
|
|
516
516
|
},
|
|
517
517
|
m(r, i) {
|
|
518
518
|
O(r, e, i), b(e, n);
|
|
@@ -552,7 +552,7 @@ function ln(t) {
|
|
|
552
552
|
e = z("div"), n = ne(
|
|
553
553
|
/*errorMessage*/
|
|
554
554
|
t[6]
|
|
555
|
-
), s(e, "class", "error svelte-
|
|
555
|
+
), s(e, "class", "error svelte-p509gh");
|
|
556
556
|
},
|
|
557
557
|
m(r, i) {
|
|
558
558
|
O(r, e, i), b(e, n);
|
|
@@ -579,7 +579,7 @@ function et(t) {
|
|
|
579
579
|
), r;
|
|
580
580
|
return {
|
|
581
581
|
c() {
|
|
582
|
-
e = z("span"), r = ne(n), s(e, "class", "line2 svelte-
|
|
582
|
+
e = z("span"), r = ne(n), s(e, "class", "line2 svelte-p509gh");
|
|
583
583
|
},
|
|
584
584
|
m(c, d) {
|
|
585
585
|
O(c, e, d), b(e, r);
|
|
@@ -627,9 +627,9 @@ function tt(t) {
|
|
|
627
627
|
}
|
|
628
628
|
return {
|
|
629
629
|
c() {
|
|
630
|
-
e = z("li"), n = z("span"), r = z("span"), i = z("span"), c = ne(u), d = q(), o = z("span"), R = ne(a), E = q(), h && h.c(), B = q(), s(i, "class", "primary svelte-
|
|
630
|
+
e = z("li"), n = z("span"), r = z("span"), i = z("span"), c = ne(u), d = q(), o = z("span"), R = ne(a), E = q(), h && h.c(), B = q(), s(i, "class", "primary svelte-p509gh"), s(o, "class", "secondary svelte-p509gh"), s(r, "class", "line1 svelte-p509gh"), s(n, "class", "texts svelte-p509gh"), s(e, "tabindex", "0"), s(e, "data-selected", L = /*selectedItemIndex*/
|
|
631
631
|
t[13] === /*i*/
|
|
632
|
-
t[71]), s(e, "class", "svelte-
|
|
632
|
+
t[71]), s(e, "class", "svelte-p509gh"), X(
|
|
633
633
|
e,
|
|
634
634
|
"selected",
|
|
635
635
|
/*selectedItemIndex*/
|
|
@@ -676,18 +676,18 @@ function cn(t) {
|
|
|
676
676
|
/*enableReverse*/
|
|
677
677
|
t[5] === !0 && $e(t)
|
|
678
678
|
);
|
|
679
|
-
const
|
|
679
|
+
const g = (
|
|
680
680
|
/*#slots*/
|
|
681
681
|
t[48].default
|
|
682
682
|
), S = At(
|
|
683
|
-
|
|
683
|
+
g,
|
|
684
684
|
t,
|
|
685
685
|
/*$$scope*/
|
|
686
686
|
t[47],
|
|
687
687
|
null
|
|
688
688
|
);
|
|
689
|
-
function se(f,
|
|
690
|
-
var
|
|
689
|
+
function se(f, M) {
|
|
690
|
+
var p, re;
|
|
691
691
|
if (
|
|
692
692
|
/*error*/
|
|
693
693
|
f[16]
|
|
@@ -698,7 +698,7 @@ function cn(t) {
|
|
|
698
698
|
return rn;
|
|
699
699
|
if (
|
|
700
700
|
/*listFeatures*/
|
|
701
|
-
((
|
|
701
|
+
((p = f[12]) == null ? void 0 : p.length) === 0
|
|
702
702
|
)
|
|
703
703
|
return nn;
|
|
704
704
|
if (
|
|
@@ -711,7 +711,7 @@ function cn(t) {
|
|
|
711
711
|
let K = se(t), k = K && K(t);
|
|
712
712
|
return {
|
|
713
713
|
c() {
|
|
714
|
-
e = z("form"), n = z("div"), r = z("button"), ze(i.$$.fragment), u = q(), c = z("input"), d = q(), o = z("div"), a = z("button"), ze(R.$$.fragment), E = q(), _ && _.c(), B = q(), m && m.c(), L = q(), S && S.c(), N = q(), k && k.c(), s(r, "type", "button"), s(r, "class", "svelte-
|
|
714
|
+
e = z("form"), n = z("div"), r = z("button"), ze(i.$$.fragment), u = q(), c = z("input"), d = q(), o = z("div"), a = z("button"), ze(R.$$.fragment), E = q(), _ && _.c(), B = q(), m && m.c(), L = q(), S && S.c(), N = q(), k && k.c(), s(r, "type", "button"), s(r, "class", "svelte-p509gh"), s(
|
|
715
715
|
c,
|
|
716
716
|
"placeholder",
|
|
717
717
|
/*placeholder*/
|
|
@@ -721,20 +721,20 @@ function cn(t) {
|
|
|
721
721
|
"aria-label",
|
|
722
722
|
/*placeholder*/
|
|
723
723
|
t[8]
|
|
724
|
-
), s(c, "class", "svelte-
|
|
724
|
+
), s(c, "class", "svelte-p509gh"), s(a, "type", "button"), s(
|
|
725
725
|
a,
|
|
726
726
|
"title",
|
|
727
727
|
/*clearButtonTitle*/
|
|
728
728
|
t[3]
|
|
729
|
-
), s(a, "class", "svelte-
|
|
729
|
+
), s(a, "class", "svelte-p509gh"), s(o, "class", "clear-button-container svelte-p509gh"), X(
|
|
730
730
|
o,
|
|
731
731
|
"displayable",
|
|
732
732
|
/*searchValue*/
|
|
733
733
|
t[1] !== ""
|
|
734
|
-
), s(n, "class", "input-group svelte-
|
|
734
|
+
), s(n, "class", "input-group svelte-p509gh"), s(e, "tabindex", "0"), s(e, "class", D = qe(
|
|
735
735
|
/*className*/
|
|
736
736
|
t[2]
|
|
737
|
-
) + " svelte-
|
|
737
|
+
) + " svelte-p509gh"), X(
|
|
738
738
|
e,
|
|
739
739
|
"can-collapse",
|
|
740
740
|
/*collapsed*/
|
|
@@ -742,8 +742,8 @@ function cn(t) {
|
|
|
742
742
|
t[1] === ""
|
|
743
743
|
);
|
|
744
744
|
},
|
|
745
|
-
m(f,
|
|
746
|
-
O(f, e,
|
|
745
|
+
m(f, M) {
|
|
746
|
+
O(f, e, M), b(e, n), b(n, r), _e(i, r, null), b(n, u), b(n, c), t[50](c), Ue(
|
|
747
747
|
c,
|
|
748
748
|
/*searchValue*/
|
|
749
749
|
t[1]
|
|
@@ -796,68 +796,68 @@ function cn(t) {
|
|
|
796
796
|
))
|
|
797
797
|
], F = !0);
|
|
798
798
|
},
|
|
799
|
-
p(f,
|
|
800
|
-
(!h ||
|
|
799
|
+
p(f, M) {
|
|
800
|
+
(!h || M[0] & /*placeholder*/
|
|
801
801
|
256) && s(
|
|
802
802
|
c,
|
|
803
803
|
"placeholder",
|
|
804
804
|
/*placeholder*/
|
|
805
805
|
f[8]
|
|
806
|
-
), (!h ||
|
|
806
|
+
), (!h || M[0] & /*placeholder*/
|
|
807
807
|
256) && s(
|
|
808
808
|
c,
|
|
809
809
|
"aria-label",
|
|
810
810
|
/*placeholder*/
|
|
811
811
|
f[8]
|
|
812
|
-
),
|
|
812
|
+
), M[0] & /*searchValue*/
|
|
813
813
|
2 && c.value !== /*searchValue*/
|
|
814
814
|
f[1] && Ue(
|
|
815
815
|
c,
|
|
816
816
|
/*searchValue*/
|
|
817
817
|
f[1]
|
|
818
|
-
), (!h ||
|
|
818
|
+
), (!h || M[0] & /*clearButtonTitle*/
|
|
819
819
|
8) && s(
|
|
820
820
|
a,
|
|
821
821
|
"title",
|
|
822
822
|
/*clearButtonTitle*/
|
|
823
823
|
f[3]
|
|
824
824
|
), /*abortController*/
|
|
825
|
-
f[17] ? _ ?
|
|
825
|
+
f[17] ? _ ? M[0] & /*abortController*/
|
|
826
826
|
131072 && G(_, 1) : (_ = Ye(), _.c(), G(_, 1), _.m(o, null)) : _ && (Ze(), Q(_, 1, 1, () => {
|
|
827
827
|
_ = null;
|
|
828
|
-
}), Je()), (!h ||
|
|
828
|
+
}), Je()), (!h || M[0] & /*searchValue*/
|
|
829
829
|
2) && X(
|
|
830
830
|
o,
|
|
831
831
|
"displayable",
|
|
832
832
|
/*searchValue*/
|
|
833
833
|
f[1] !== ""
|
|
834
834
|
), /*enableReverse*/
|
|
835
|
-
f[5] === !0 ? m ? (m.p(f,
|
|
835
|
+
f[5] === !0 ? m ? (m.p(f, M), M[0] & /*enableReverse*/
|
|
836
836
|
32 && G(m, 1)) : (m = $e(f), m.c(), G(m, 1), m.m(n, L)) : m && (Ze(), Q(m, 1, 1, () => {
|
|
837
837
|
m = null;
|
|
838
|
-
}), Je()), S && S.p && (!h ||
|
|
838
|
+
}), Je()), S && S.p && (!h || M[1] & /*$$scope*/
|
|
839
839
|
65536) && Nt(
|
|
840
840
|
S,
|
|
841
|
-
|
|
841
|
+
g,
|
|
842
842
|
f,
|
|
843
843
|
/*$$scope*/
|
|
844
844
|
f[47],
|
|
845
845
|
h ? Pt(
|
|
846
|
-
|
|
846
|
+
g,
|
|
847
847
|
/*$$scope*/
|
|
848
848
|
f[47],
|
|
849
|
-
|
|
849
|
+
M,
|
|
850
850
|
null
|
|
851
851
|
) : xt(
|
|
852
852
|
/*$$scope*/
|
|
853
853
|
f[47]
|
|
854
854
|
),
|
|
855
855
|
null
|
|
856
|
-
), K === (K = se(f)) && k ? k.p(f,
|
|
856
|
+
), K === (K = se(f)) && k ? k.p(f, M) : (k && k.d(1), k = K && K(f), k && (k.c(), k.m(e, null))), (!h || M[0] & /*className*/
|
|
857
857
|
4 && D !== (D = qe(
|
|
858
858
|
/*className*/
|
|
859
859
|
f[2]
|
|
860
|
-
) + " svelte-
|
|
860
|
+
) + " svelte-p509gh")) && s(e, "class", D), (!h || M[0] & /*className, collapsed, searchValue*/
|
|
861
861
|
22) && X(
|
|
862
862
|
e,
|
|
863
863
|
"can-collapse",
|
|
@@ -873,7 +873,7 @@ function cn(t) {
|
|
|
873
873
|
Q(i.$$.fragment, f), Q(R.$$.fragment, f), Q(_), Q(m), Q(S, f), h = !1;
|
|
874
874
|
},
|
|
875
875
|
d(f) {
|
|
876
|
-
f && I(e),
|
|
876
|
+
f && I(e), ge(i), t[50](null), ge(R), _ && _.d(), m && m.d(), S && S.d(f), k && k.d(), F = !1, Y(U);
|
|
877
877
|
}
|
|
878
878
|
};
|
|
879
879
|
}
|
|
@@ -886,43 +886,43 @@ function nt(t) {
|
|
|
886
886
|
return e[2] < e[0] && (e[2] += 360), e;
|
|
887
887
|
}
|
|
888
888
|
function on(t, e, n) {
|
|
889
|
-
let r, { $$slots: i = {}, $$scope: u } = e, { class: c = void 0 } = e, { apiKey: d } = e, { bbox: o = void 0 } = e, { clearButtonTitle: a = "clear" } = e, { clearOnBlur: R = !1 } = e, { collapsed: E = !1 } = e, { country: B = void 0 } = e, { debounceSearch: L = 200 } = e, { enableReverse: N = !1 } = e, { errorMessage: D = "Searching failed" } = e, { filter: h = () => !0 } = e, { flyTo: F = !0 } = e, { fuzzyMatch: U = !0 } = e, { language: _ = void 0 } = e, { limit: m = void 0 } = e, { mapController:
|
|
889
|
+
let r, { $$slots: i = {}, $$scope: u } = e, { class: c = void 0 } = e, { apiKey: d } = e, { bbox: o = void 0 } = e, { clearButtonTitle: a = "clear" } = e, { clearOnBlur: R = !1 } = e, { collapsed: E = !1 } = e, { country: B = void 0 } = e, { debounceSearch: L = 200 } = e, { enableReverse: N = !1 } = e, { errorMessage: D = "Searching failed" } = e, { filter: h = () => !0 } = e, { flyTo: F = !0 } = e, { fuzzyMatch: U = !0 } = e, { language: _ = void 0 } = e, { limit: m = void 0 } = e, { mapController: g = void 0 } = e, { minLength: S = 2 } = e, { noResultsMessage: se = "No results found" } = e, { placeholder: K = "Search" } = e, { proximity: k = void 0 } = e, { reverseActive: f = N === "always" } = e, { reverseButtonTitle: M = "toggle reverse geocoding" } = e, { searchValue: p = "" } = e, { showFullGeometry: re = !0 } = e, { showPlaceType: Oe = !1 } = e, { showResultsWhileTyping: ke = !0 } = e, { trackProximity: pe = !0 } = e, { types: ve = void 0 } = e, { zoom: Te = 16 } = e, { fetchParameters: Ce = {} } = e;
|
|
890
890
|
function st() {
|
|
891
891
|
V.focus();
|
|
892
892
|
}
|
|
893
893
|
function at() {
|
|
894
894
|
V.blur();
|
|
895
895
|
}
|
|
896
|
-
function De(l,
|
|
897
|
-
n(1,
|
|
896
|
+
function De(l, T = !0) {
|
|
897
|
+
n(1, p = l), T ? (n(13, v = -1), Ve()) : (Le(), setTimeout(() => {
|
|
898
898
|
V.focus(), V.select();
|
|
899
899
|
}));
|
|
900
900
|
}
|
|
901
|
-
let le = !1,
|
|
901
|
+
let le = !1, y, A, w, Fe = "", V, v = -1, W, Me = [], $, ce, Re;
|
|
902
902
|
const Z = Ft();
|
|
903
903
|
Dt(() => {
|
|
904
|
-
|
|
904
|
+
g && (g.setEventHandler(void 0), g.indicateReverse(!1), g.setSelectedMarker(-1), g.setMarkers(void 0, void 0));
|
|
905
905
|
});
|
|
906
906
|
function Ve(l) {
|
|
907
|
-
if (ce && (clearTimeout(ce), ce = void 0),
|
|
908
|
-
n(45, w =
|
|
909
|
-
else if (
|
|
910
|
-
const
|
|
911
|
-
Be(
|
|
912
|
-
n(44, A =
|
|
907
|
+
if (ce && (clearTimeout(ce), ce = void 0), v > -1 && y)
|
|
908
|
+
n(45, w = y[v]), n(1, p = w.place_name.replace(/,.*/, "")), n(16, W = void 0), n(44, A = void 0), n(13, v = -1);
|
|
909
|
+
else if (p) {
|
|
910
|
+
const T = l || !He();
|
|
911
|
+
Be(p, { exact: !0 }).then(() => {
|
|
912
|
+
n(44, A = y), n(45, w = void 0), T && dt();
|
|
913
913
|
}).catch((H) => n(16, W = H));
|
|
914
914
|
}
|
|
915
915
|
}
|
|
916
916
|
function He() {
|
|
917
|
-
return /^-?\d+(\.\d+)?,-?\d+(\.\d+)?$/.test(
|
|
917
|
+
return /^-?\d+(\.\d+)?,-?\d+(\.\d+)?$/.test(p);
|
|
918
918
|
}
|
|
919
|
-
async function Be(l, { byId:
|
|
919
|
+
async function Be(l, { byId: T = !1, exact: H = !1 } = {}) {
|
|
920
920
|
n(16, W = void 0);
|
|
921
921
|
const ae = He(), x = new URLSearchParams();
|
|
922
|
-
_ != null && x.set("language", Array.isArray(_) ? _.join(",") : _),
|
|
922
|
+
_ != null && x.set("language", Array.isArray(_) ? _.join(",") : _), ve && x.set("types", ve.join(",")), ae || (o && x.set("bbox", o.map((J) => J.toFixed(6)).join(",")), B && x.set("country", Array.isArray(B) ? B.join(",") : B)), T || (k && x.set("proximity", k.map((J) => J.toFixed(6)).join(",")), (H || !ke) && x.set("autocomplete", "false"), x.set("fuzzyMatch", String(U))), m !== void 0 && x.set("limit", String(m)), x.set("key", d);
|
|
923
923
|
const ee = "https://api.maptiler.com/geocoding/" + encodeURIComponent(l) + ".json?" + x.toString();
|
|
924
924
|
if (ee === Fe) {
|
|
925
|
-
|
|
925
|
+
T ? (n(12, y = void 0), n(45, w = Me[0])) : n(12, y = Me);
|
|
926
926
|
return;
|
|
927
927
|
}
|
|
928
928
|
Fe = ee, $ == null || $.abort();
|
|
@@ -941,115 +941,115 @@ function on(t, e, n) {
|
|
|
941
941
|
if (!Ae.ok)
|
|
942
942
|
throw new Error();
|
|
943
943
|
const Pe = await Ae.json();
|
|
944
|
-
Z("response", { url: ee, featureCollection: Pe }),
|
|
944
|
+
Z("response", { url: ee, featureCollection: Pe }), T ? (n(12, y = void 0), n(45, w = Pe.features[0]), Me = [w]) : (n(12, y = Pe.features.filter(h)), Me = y, ae && V.focus());
|
|
945
945
|
}
|
|
946
946
|
function dt() {
|
|
947
947
|
var H, ae, x, ee;
|
|
948
948
|
if (!(A != null && A.length) || !F)
|
|
949
949
|
return;
|
|
950
|
-
const l = [180, 90, -180, -90],
|
|
950
|
+
const l = [180, 90, -180, -90], T = !A.some((P) => !P.matching_text);
|
|
951
951
|
for (const P of A)
|
|
952
|
-
(
|
|
953
|
-
|
|
952
|
+
(T || !P.matching_text) && (l[0] = Math.min(l[0], ((H = P.bbox) == null ? void 0 : H[0]) ?? P.center[0]), l[1] = Math.min(l[1], ((ae = P.bbox) == null ? void 0 : ae[1]) ?? P.center[1]), l[2] = Math.max(l[2], ((x = P.bbox) == null ? void 0 : x[2]) ?? P.center[0]), l[3] = Math.max(l[3], ((ee = P.bbox) == null ? void 0 : ee[3]) ?? P.center[1]));
|
|
953
|
+
g && A.length > 0 && (w && l[0] === l[2] && l[1] === l[3] ? g.flyTo(w.center, Te) : g.fitBounds(nt(l), 50));
|
|
954
954
|
}
|
|
955
955
|
function ht(l) {
|
|
956
956
|
n(0, f = N === "always"), De(un(l[0], [-180, 180], !0).toFixed(6) + "," + l[1].toFixed(6));
|
|
957
957
|
}
|
|
958
958
|
function mt(l) {
|
|
959
|
-
if (!
|
|
959
|
+
if (!y)
|
|
960
960
|
return;
|
|
961
|
-
let
|
|
962
|
-
|
|
961
|
+
let T = l.key === "ArrowDown" ? 1 : l.key === "ArrowUp" ? -1 : 0;
|
|
962
|
+
T ? (v === -1 && T === -1 && n(13, v = y.length), n(13, v += T), v >= y.length && n(13, v = -1), l.preventDefault()) : ["ArrowLeft", "ArrowRight", "Home", "End"].includes(l.key) && n(13, v = -1);
|
|
963
963
|
}
|
|
964
964
|
function Le(l = !0) {
|
|
965
|
-
if (ke &&
|
|
965
|
+
if (ke && p.length > S) {
|
|
966
966
|
ce && clearTimeout(ce);
|
|
967
|
-
const
|
|
967
|
+
const T = p;
|
|
968
968
|
ce = window.setTimeout(
|
|
969
969
|
() => {
|
|
970
|
-
Be(
|
|
970
|
+
Be(T).catch((H) => n(16, W = H));
|
|
971
971
|
},
|
|
972
972
|
l ? L : 0
|
|
973
973
|
);
|
|
974
974
|
} else
|
|
975
|
-
n(12,
|
|
975
|
+
n(12, y = void 0), n(16, W = void 0);
|
|
976
976
|
}
|
|
977
977
|
function Se(l) {
|
|
978
|
-
n(45, w = l), n(1,
|
|
978
|
+
n(45, w = l), n(1, p = l.place_name), n(13, v = -1);
|
|
979
979
|
}
|
|
980
980
|
const _t = () => V.focus();
|
|
981
|
-
function
|
|
981
|
+
function gt(l) {
|
|
982
982
|
je[l ? "unshift" : "push"](() => {
|
|
983
983
|
V = l, n(15, V);
|
|
984
984
|
});
|
|
985
985
|
}
|
|
986
|
-
function
|
|
987
|
-
|
|
986
|
+
function yt() {
|
|
987
|
+
p = this.value, n(1, p), n(11, le), n(25, R);
|
|
988
988
|
}
|
|
989
|
-
const bt = () => n(11, le = !0), wt = () => n(11, le = !1), kt = () => Le(),
|
|
990
|
-
n(1,
|
|
991
|
-
},
|
|
989
|
+
const bt = () => n(11, le = !0), wt = () => n(11, le = !1), kt = () => Le(), pt = () => {
|
|
990
|
+
n(1, p = ""), V.focus();
|
|
991
|
+
}, vt = () => n(0, f = !f), Tt = (l) => n(13, v = l), Mt = (l) => Se(l), Rt = () => n(13, v = -1), Et = () => {
|
|
992
992
|
};
|
|
993
993
|
return t.$$set = (l) => {
|
|
994
|
-
"class" in l && n(2, c = l.class), "apiKey" in l && n(23, d = l.apiKey), "bbox" in l && n(24, o = l.bbox), "clearButtonTitle" in l && n(3, a = l.clearButtonTitle), "clearOnBlur" in l && n(25, R = l.clearOnBlur), "collapsed" in l && n(4, E = l.collapsed), "country" in l && n(26, B = l.country), "debounceSearch" in l && n(27, L = l.debounceSearch), "enableReverse" in l && n(5, N = l.enableReverse), "errorMessage" in l && n(6, D = l.errorMessage), "filter" in l && n(28, h = l.filter), "flyTo" in l && n(29, F = l.flyTo), "fuzzyMatch" in l && n(30, U = l.fuzzyMatch), "language" in l && n(31, _ = l.language), "limit" in l && n(32, m = l.limit), "mapController" in l && n(33,
|
|
994
|
+
"class" in l && n(2, c = l.class), "apiKey" in l && n(23, d = l.apiKey), "bbox" in l && n(24, o = l.bbox), "clearButtonTitle" in l && n(3, a = l.clearButtonTitle), "clearOnBlur" in l && n(25, R = l.clearOnBlur), "collapsed" in l && n(4, E = l.collapsed), "country" in l && n(26, B = l.country), "debounceSearch" in l && n(27, L = l.debounceSearch), "enableReverse" in l && n(5, N = l.enableReverse), "errorMessage" in l && n(6, D = l.errorMessage), "filter" in l && n(28, h = l.filter), "flyTo" in l && n(29, F = l.flyTo), "fuzzyMatch" in l && n(30, U = l.fuzzyMatch), "language" in l && n(31, _ = l.language), "limit" in l && n(32, m = l.limit), "mapController" in l && n(33, g = l.mapController), "minLength" in l && n(34, S = l.minLength), "noResultsMessage" in l && n(7, se = l.noResultsMessage), "placeholder" in l && n(8, K = l.placeholder), "proximity" in l && n(22, k = l.proximity), "reverseActive" in l && n(0, f = l.reverseActive), "reverseButtonTitle" in l && n(9, M = l.reverseButtonTitle), "searchValue" in l && n(1, p = l.searchValue), "showFullGeometry" in l && n(35, re = l.showFullGeometry), "showPlaceType" in l && n(10, Oe = l.showPlaceType), "showResultsWhileTyping" in l && n(36, ke = l.showResultsWhileTyping), "trackProximity" in l && n(37, pe = l.trackProximity), "types" in l && n(38, ve = l.types), "zoom" in l && n(39, Te = l.zoom), "fetchParameters" in l && n(40, Ce = l.fetchParameters), "$$scope" in l && n(47, u = l.$$scope);
|
|
995
995
|
}, t.$$.update = () => {
|
|
996
996
|
if (t.$$.dirty[1] & /*trackProximity*/
|
|
997
|
-
64 && (
|
|
997
|
+
64 && (pe || n(22, k = void 0)), t.$$.dirty[0] & /*focused, clearOnBlur*/
|
|
998
998
|
33556480 && setTimeout(() => {
|
|
999
|
-
n(14, Re = le), R && !le && n(1,
|
|
999
|
+
n(14, Re = le), R && !le && n(1, p = "");
|
|
1000
1000
|
}), t.$$.dirty[0] & /*searchValue, listFeatures*/
|
|
1001
|
-
4098 && (
|
|
1001
|
+
4098 && (p || (n(45, w = void 0), n(12, y = void 0), n(16, W = void 0), n(44, A = y))), t.$$.dirty[1] & /*showFullGeometry, picked*/
|
|
1002
1002
|
16400 && re && w && !w.address && w.geometry.type === "Point" && Be(w.id, { byId: !0 }).catch((l) => n(16, W = l)), t.$$.dirty[0] & /*flyTo*/
|
|
1003
1003
|
536870912 | t.$$.dirty[1] & /*mapController, picked, zoom*/
|
|
1004
|
-
16644 &&
|
|
1004
|
+
16644 && g && w && F && (!w.bbox || w.bbox[0] === w.bbox[2] && w.bbox[1] === w.bbox[3] ? g.flyTo(w.center, Te) : g.fitBounds(nt(w.bbox), 50), n(12, y = void 0), n(44, A = void 0), n(13, v = -1)), t.$$.dirty[0] & /*listFeatures*/
|
|
1005
1005
|
4096 | t.$$.dirty[1] & /*markedFeatures*/
|
|
1006
|
-
8192 && A !==
|
|
1007
|
-
24580 &&
|
|
1008
|
-
2 && n(13,
|
|
1006
|
+
8192 && A !== y && n(44, A = void 0), t.$$.dirty[1] & /*mapController, markedFeatures, picked*/
|
|
1007
|
+
24580 && g && g.setMarkers(A, w), t.$$.dirty[0] & /*searchValue*/
|
|
1008
|
+
2 && n(13, v = -1), t.$$.dirty[0] & /*reverseActive, listFeatures, focusedDelayed*/
|
|
1009
1009
|
20481 | t.$$.dirty[1] & /*mapController, trackProximity*/
|
|
1010
|
-
68 &&
|
|
1010
|
+
68 && g && g.setEventHandler((l) => {
|
|
1011
1011
|
switch (l.type) {
|
|
1012
1012
|
case "mapClick":
|
|
1013
1013
|
f && ht(l.coordinates);
|
|
1014
1014
|
break;
|
|
1015
1015
|
case "proximityChange":
|
|
1016
|
-
n(22, k =
|
|
1016
|
+
n(22, k = pe ? l.proximity : void 0);
|
|
1017
1017
|
break;
|
|
1018
1018
|
case "markerClick":
|
|
1019
1019
|
{
|
|
1020
|
-
const
|
|
1021
|
-
|
|
1020
|
+
const T = y == null ? void 0 : y.find((H) => H.id === l.id);
|
|
1021
|
+
T && Se(T);
|
|
1022
1022
|
}
|
|
1023
1023
|
break;
|
|
1024
1024
|
case "markerMouseEnter":
|
|
1025
|
-
n(13,
|
|
1025
|
+
n(13, v = Re ? (y == null ? void 0 : y.findIndex((T) => T.id === l.id)) ?? -1 : -1);
|
|
1026
1026
|
break;
|
|
1027
1027
|
case "markerMouseLeave":
|
|
1028
|
-
n(13,
|
|
1028
|
+
n(13, v = -1);
|
|
1029
1029
|
break;
|
|
1030
1030
|
}
|
|
1031
1031
|
}), t.$$.dirty[0] & /*selectedItemIndex*/
|
|
1032
1032
|
8192 | t.$$.dirty[1] & /*mapController*/
|
|
1033
|
-
4 && (
|
|
1034
|
-
12288 && n(46, r =
|
|
1033
|
+
4 && (g == null || g.setSelectedMarker(v)), t.$$.dirty[0] & /*listFeatures, selectedItemIndex*/
|
|
1034
|
+
12288 && n(46, r = y == null ? void 0 : y[v]), t.$$.dirty[0] & /*searchValue*/
|
|
1035
1035
|
2 | t.$$.dirty[1] & /*mapController*/
|
|
1036
1036
|
4) {
|
|
1037
|
-
const l = /^(-?\d+(?:\.\d*)?),(-?\d+(?:\.\d*)?)$/.exec(
|
|
1038
|
-
|
|
1037
|
+
const l = /^(-?\d+(?:\.\d*)?),(-?\d+(?:\.\d*)?)$/.exec(p);
|
|
1038
|
+
g == null || g.setReverseMarker(l ? [Number(l[1]), Number(l[2])] : void 0);
|
|
1039
1039
|
}
|
|
1040
1040
|
t.$$.dirty[1] & /*selected*/
|
|
1041
1041
|
32768 && Z("select", r), t.$$.dirty[1] & /*picked*/
|
|
1042
1042
|
16384 && Z("pick", w), t.$$.dirty[0] & /*focusedDelayed, listFeatures*/
|
|
1043
|
-
20480 && Z("optionsVisibilityChange", Re && !!
|
|
1044
|
-
4096 && Z("featuresListed",
|
|
1043
|
+
20480 && Z("optionsVisibilityChange", Re && !!y), t.$$.dirty[0] & /*listFeatures*/
|
|
1044
|
+
4096 && Z("featuresListed", y), t.$$.dirty[1] & /*markedFeatures*/
|
|
1045
1045
|
8192 && Z("featuresMarked", A), t.$$.dirty[0] & /*reverseActive*/
|
|
1046
1046
|
1 && Z("reverseToggle", f), t.$$.dirty[0] & /*searchValue*/
|
|
1047
|
-
2 && Z("queryChange",
|
|
1047
|
+
2 && Z("queryChange", p), t.$$.dirty[0] & /*reverseActive*/
|
|
1048
1048
|
1 | t.$$.dirty[1] & /*mapController*/
|
|
1049
|
-
4 &&
|
|
1049
|
+
4 && g && g.indicateReverse(f);
|
|
1050
1050
|
}, [
|
|
1051
1051
|
f,
|
|
1052
|
-
|
|
1052
|
+
p,
|
|
1053
1053
|
c,
|
|
1054
1054
|
a,
|
|
1055
1055
|
E,
|
|
@@ -1057,11 +1057,11 @@ function on(t, e, n) {
|
|
|
1057
1057
|
D,
|
|
1058
1058
|
se,
|
|
1059
1059
|
K,
|
|
1060
|
-
|
|
1060
|
+
M,
|
|
1061
1061
|
Oe,
|
|
1062
1062
|
le,
|
|
1063
|
-
|
|
1064
|
-
|
|
1063
|
+
y,
|
|
1064
|
+
v,
|
|
1065
1065
|
Re,
|
|
1066
1066
|
V,
|
|
1067
1067
|
W,
|
|
@@ -1081,13 +1081,13 @@ function on(t, e, n) {
|
|
|
1081
1081
|
U,
|
|
1082
1082
|
_,
|
|
1083
1083
|
m,
|
|
1084
|
-
|
|
1084
|
+
g,
|
|
1085
1085
|
S,
|
|
1086
1086
|
re,
|
|
1087
1087
|
ke,
|
|
1088
|
+
pe,
|
|
1088
1089
|
ve,
|
|
1089
1090
|
Te,
|
|
1090
|
-
Me,
|
|
1091
1091
|
Ce,
|
|
1092
1092
|
st,
|
|
1093
1093
|
at,
|
|
@@ -1098,15 +1098,15 @@ function on(t, e, n) {
|
|
|
1098
1098
|
u,
|
|
1099
1099
|
i,
|
|
1100
1100
|
_t,
|
|
1101
|
-
yt,
|
|
1102
1101
|
gt,
|
|
1102
|
+
yt,
|
|
1103
1103
|
bt,
|
|
1104
1104
|
wt,
|
|
1105
1105
|
kt,
|
|
1106
|
+
pt,
|
|
1106
1107
|
vt,
|
|
1107
1108
|
Tt,
|
|
1108
1109
|
Mt,
|
|
1109
|
-
pt,
|
|
1110
1110
|
Rt,
|
|
1111
1111
|
Et
|
|
1112
1112
|
];
|
|
@@ -1118,7 +1118,7 @@ class fn extends we {
|
|
|
1118
1118
|
e,
|
|
1119
1119
|
on,
|
|
1120
1120
|
cn,
|
|
1121
|
-
|
|
1121
|
+
ye,
|
|
1122
1122
|
{
|
|
1123
1123
|
class: 2,
|
|
1124
1124
|
apiKey: 23,
|