@maptiler/geocoding-control 2.0.0-rc.5 → 2.0.0-rc.6
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 +293 -293
- package/leaflet.js.map +1 -1
- package/leaflet.umd.js +2 -2
- package/leaflet.umd.js.map +1 -1
- package/maplibregl.js +129 -129
- package/maplibregl.js.map +1 -1
- package/maplibregl.umd.js +2 -2
- package/maplibregl.umd.js.map +1 -1
- package/maptilersdk.js +129 -129
- package/maptilersdk.js.map +1 -1
- package/maptilersdk.umd.js +2 -2
- package/maptilersdk.umd.js.map +1 -1
- package/openlayers.js +178 -178
- package/openlayers.js.map +1 -1
- package/openlayers.umd.js +3 -3
- package/openlayers.umd.js.map +1 -1
- package/package.json +1 -1
- package/react.js +1 -1
- package/react.umd.js +1 -1
- package/svelte/GeocodingControl.svelte +1 -1
- package/svelte/MapLibreBasedGeocodingControl.js +2 -2
- package/svelte/leaflet.js +2 -2
- package/svelte/openlayers.js +2 -2
- package/vanilla.js +1 -1
- package/vanilla.umd.js +1 -1
package/maptilersdk.js
CHANGED
|
@@ -4,7 +4,7 @@ var Ft = (n) => {
|
|
|
4
4
|
};
|
|
5
5
|
var ln = (n, e, t) => e in n ? on(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
6
6
|
var ee = (n, e, t) => ln(n, typeof e != "symbol" ? e + "" : e, t), Gt = (n, e, t) => e.has(n) || Ft("Cannot " + t);
|
|
7
|
-
var
|
|
7
|
+
var q = (n, e, t) => (Gt(n, e, "read from private field"), t ? t.call(n) : e.get(n)), $e = (n, e, t) => e.has(n) ? Ft("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(n) : e.set(n, t), et = (n, e, t, i) => (Gt(n, e, "write to private field"), i ? i.call(n, t) : e.set(n, t), t);
|
|
8
8
|
import * as jt from "@maptiler/sdk";
|
|
9
9
|
function B() {
|
|
10
10
|
}
|
|
@@ -117,7 +117,7 @@ function b(n, e, t) {
|
|
|
117
117
|
function yn(n) {
|
|
118
118
|
return Array.from(n.childNodes);
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function Fe(n, e) {
|
|
121
121
|
e = "" + e, n.data !== e && (n.data = /** @type {string} */
|
|
122
122
|
e);
|
|
123
123
|
}
|
|
@@ -130,13 +130,13 @@ function se(n, e, t) {
|
|
|
130
130
|
function vn(n, e, { bubbles: t = !1, cancelable: i = !1 } = {}) {
|
|
131
131
|
return new CustomEvent(n, { detail: e, bubbles: t, cancelable: i });
|
|
132
132
|
}
|
|
133
|
-
let
|
|
134
|
-
function
|
|
135
|
-
|
|
133
|
+
let Ge;
|
|
134
|
+
function Ue(n) {
|
|
135
|
+
Ge = n;
|
|
136
136
|
}
|
|
137
137
|
function Ni() {
|
|
138
|
-
if (!
|
|
139
|
-
return
|
|
138
|
+
if (!Ge) throw new Error("Function called outside component initialization");
|
|
139
|
+
return Ge;
|
|
140
140
|
}
|
|
141
141
|
function pn(n) {
|
|
142
142
|
Ni().$$.on_destroy.push(n);
|
|
@@ -178,17 +178,17 @@ let Pe = 0;
|
|
|
178
178
|
function Ri() {
|
|
179
179
|
if (Pe !== 0)
|
|
180
180
|
return;
|
|
181
|
-
const n =
|
|
181
|
+
const n = Ge;
|
|
182
182
|
do {
|
|
183
183
|
try {
|
|
184
184
|
for (; Pe < Oe.length; ) {
|
|
185
185
|
const e = Oe[Pe];
|
|
186
|
-
Pe++,
|
|
186
|
+
Pe++, Ue(e), _n(e.$$);
|
|
187
187
|
}
|
|
188
188
|
} catch (e) {
|
|
189
189
|
throw Oe.length = 0, Pe = 0, e;
|
|
190
190
|
}
|
|
191
|
-
for (
|
|
191
|
+
for (Ue(null), Oe.length = 0, Pe = 0; xt.length; ) xt.pop()();
|
|
192
192
|
for (let e = 0; e < Ae.length; e += 1) {
|
|
193
193
|
const t = Ae[e];
|
|
194
194
|
_t.has(t) || (_t.add(t), t());
|
|
@@ -197,7 +197,7 @@ function Ri() {
|
|
|
197
197
|
} while (Oe.length);
|
|
198
198
|
for (; Vt.length; )
|
|
199
199
|
Vt.pop()();
|
|
200
|
-
Mt = !1, _t.clear(),
|
|
200
|
+
Mt = !1, _t.clear(), Ue(n);
|
|
201
201
|
}
|
|
202
202
|
function _n(n) {
|
|
203
203
|
if (n.fragment !== null) {
|
|
@@ -223,7 +223,7 @@ function rt() {
|
|
|
223
223
|
function st() {
|
|
224
224
|
Ne.r || me(Ne.c), Ne = Ne.p;
|
|
225
225
|
}
|
|
226
|
-
function
|
|
226
|
+
function Q(n, e) {
|
|
227
227
|
n && n.i && (nt.delete(n), n.i(e));
|
|
228
228
|
}
|
|
229
229
|
function Y(n, e, t, i) {
|
|
@@ -254,7 +254,7 @@ function xn(n, e, t, i, r, s, u, o, c, l, d, a) {
|
|
|
254
254
|
}
|
|
255
255
|
const p = /* @__PURE__ */ new Set(), M = /* @__PURE__ */ new Set();
|
|
256
256
|
function L(x) {
|
|
257
|
-
|
|
257
|
+
Q(x, 1), x.m(o, d), u.set(x.key, x), d = x.first, h--;
|
|
258
258
|
}
|
|
259
259
|
for (; f && h; ) {
|
|
260
260
|
const x = S[h - 1], _ = n[f - 1], k = x.key, R = _.key;
|
|
@@ -285,8 +285,8 @@ function Mn(n, e) {
|
|
|
285
285
|
n.$$.dirty[0] === -1 && (Oe.push(n), En(), n.$$.dirty.fill(0)), n.$$.dirty[e / 31 | 0] |= 1 << e % 31;
|
|
286
286
|
}
|
|
287
287
|
function Se(n, e, t, i, r, s, u = null, o = [-1]) {
|
|
288
|
-
const c =
|
|
289
|
-
|
|
288
|
+
const c = Ge;
|
|
289
|
+
Ue(n);
|
|
290
290
|
const l = n.$$ = {
|
|
291
291
|
fragment: null,
|
|
292
292
|
ctx: [],
|
|
@@ -319,9 +319,9 @@ function Se(n, e, t, i, r, s, u = null, o = [-1]) {
|
|
|
319
319
|
l.fragment && l.fragment.l(a), a.forEach(D);
|
|
320
320
|
} else
|
|
321
321
|
l.fragment && l.fragment.c();
|
|
322
|
-
e.intro &&
|
|
322
|
+
e.intro && Q(n.$$.fragment), he(n, e.target, e.anchor), Ri();
|
|
323
323
|
}
|
|
324
|
-
|
|
324
|
+
Ue(c);
|
|
325
325
|
}
|
|
326
326
|
class xe {
|
|
327
327
|
constructor() {
|
|
@@ -682,7 +682,7 @@ function Kt(n) {
|
|
|
682
682
|
},
|
|
683
683
|
p(i, r) {
|
|
684
684
|
r & /*placeType*/
|
|
685
|
-
64 &&
|
|
685
|
+
64 && Fe(
|
|
686
686
|
t,
|
|
687
687
|
/*placeType*/
|
|
688
688
|
i[6]
|
|
@@ -779,7 +779,7 @@ function Bn(n) {
|
|
|
779
779
|
) : (
|
|
780
780
|
/*feature*/
|
|
781
781
|
_[0].place_name.replace(/,.*/, "")
|
|
782
|
-
)) + "") &&
|
|
782
|
+
)) + "") && Fe(a, d), k & /*showPlaceType, feature, imageUrl*/
|
|
783
783
|
37 && (h = /*showPlaceType*/
|
|
784
784
|
_[2] === "always" || /*showPlaceType*/
|
|
785
785
|
_[2] !== "never" && !/*feature*/
|
|
@@ -794,7 +794,7 @@ function Bn(n) {
|
|
|
794
794
|
(_[7] ? "" : (
|
|
795
795
|
/*feature*/
|
|
796
796
|
_[0].place_name.replace(/[^,]*,?\s*/, "")
|
|
797
|
-
)) + "") &&
|
|
797
|
+
)) + "") && Fe(w, S), k & /*selected*/
|
|
798
798
|
2 && b(
|
|
799
799
|
e,
|
|
800
800
|
"data-selected",
|
|
@@ -999,7 +999,7 @@ function lt(n) {
|
|
|
999
999
|
const e = [...n];
|
|
1000
1000
|
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;
|
|
1001
1001
|
}
|
|
1002
|
-
let
|
|
1002
|
+
let ze;
|
|
1003
1003
|
async function Xn(n, e, t) {
|
|
1004
1004
|
const i = n == null ? void 0 : n.getCenterAndZoom();
|
|
1005
1005
|
for (const r of e ?? [])
|
|
@@ -1007,10 +1007,10 @@ async function Xn(n, e, t) {
|
|
|
1007
1007
|
if (r.type === "fixed")
|
|
1008
1008
|
return r.coordinates.join(",");
|
|
1009
1009
|
e: if (r.type === "client-geolocation") {
|
|
1010
|
-
if (
|
|
1011
|
-
if (!
|
|
1010
|
+
if (ze && r.cachedLocationExpiry && ze.time + r.cachedLocationExpiry > Date.now()) {
|
|
1011
|
+
if (!ze.coords)
|
|
1012
1012
|
break e;
|
|
1013
|
-
return
|
|
1013
|
+
return ze.coords;
|
|
1014
1014
|
}
|
|
1015
1015
|
let s;
|
|
1016
1016
|
try {
|
|
@@ -1031,7 +1031,7 @@ async function Xn(n, e, t) {
|
|
|
1031
1031
|
}), s;
|
|
1032
1032
|
} catch {
|
|
1033
1033
|
} finally {
|
|
1034
|
-
r.cachedLocationExpiry && (
|
|
1034
|
+
r.cachedLocationExpiry && (ze = {
|
|
1035
1035
|
time: Date.now(),
|
|
1036
1036
|
coords: s
|
|
1037
1037
|
});
|
|
@@ -1078,12 +1078,12 @@ function It(n, e) {
|
|
|
1078
1078
|
if (Jn.test(n))
|
|
1079
1079
|
throw new Error("invalid coordinate value");
|
|
1080
1080
|
if (Xt.test(n))
|
|
1081
|
-
if (o = Xt.exec(n), c =
|
|
1081
|
+
if (o = Xt.exec(n), c = Be(o), c)
|
|
1082
1082
|
t = Math.abs(o[1]) + o[2] / 60, Number(o[1]) < 0 && (t *= -1), i = Math.abs(o[3]) + o[4] / 60, Number(o[3]) < 0 && (i *= -1), u = "DM";
|
|
1083
1083
|
else
|
|
1084
1084
|
throw new Error("invalid coordinate format");
|
|
1085
1085
|
else if (Jt.test(n))
|
|
1086
|
-
if (o = Jt.exec(n), c =
|
|
1086
|
+
if (o = Jt.exec(n), c = Be(o), c) {
|
|
1087
1087
|
if (t = o[2], i = o[6], t.includes(",") && (t = t.replace(",", ".")), i.includes(",") && (i = i.replace(",", ".")), u = "DD", Number(Math.round(t)) == Number(t))
|
|
1088
1088
|
throw new Error("integer only coordinate provided");
|
|
1089
1089
|
if (Number(Math.round(i)) == Number(i))
|
|
@@ -1092,17 +1092,17 @@ function It(n, e) {
|
|
|
1092
1092
|
} else
|
|
1093
1093
|
throw new Error("invalid decimal coordinate format");
|
|
1094
1094
|
else if ($t.test(n))
|
|
1095
|
-
if (o = $t.exec(n), c =
|
|
1095
|
+
if (o = $t.exec(n), c = Be(o), c)
|
|
1096
1096
|
t = Math.abs(parseInt(o[2])), o[4] && (t += o[4] / 60, u = "DM"), o[6] && (t += o[6].replace(",", ".") / 3600, u = "DMS"), parseInt(o[2]) < 0 && (t = -1 * t), i = Math.abs(parseInt(o[9])), o[11] && (i += o[11] / 60), o[13] && (i += o[13].replace(",", ".") / 3600), parseInt(o[9]) < 0 && (i = -1 * i), o[1] ? (r = o[1], s = o[8]) : o[7] && (r = o[7], s = o[14]);
|
|
1097
1097
|
else
|
|
1098
1098
|
throw new Error("invalid DMS coordinates format");
|
|
1099
1099
|
else if (ei.test(n))
|
|
1100
|
-
if (o = ei.exec(n), c =
|
|
1100
|
+
if (o = ei.exec(n), c = Be(o), c)
|
|
1101
1101
|
t = Math.abs(parseInt(o[2])), o[4] && (t += o[4] / 60, u = "DM"), o[6] && (t += o[6] / 3600, u = "DMS"), parseInt(o[2]) < 0 && (t = -1 * t), i = Math.abs(parseInt(o[10])), o[12] && (i += o[12] / 60), o[14] && (i += o[14] / 3600), parseInt(o[10]) < 0 && (i = -1 * i), o[1] ? (r = o[1], s = o[9]) : o[8] && (r = o[8], s = o[16]);
|
|
1102
1102
|
else
|
|
1103
1103
|
throw new Error("invalid DMS coordinates format");
|
|
1104
1104
|
else if (ti.test(n)) {
|
|
1105
|
-
if (o = ti.exec(n), c =
|
|
1105
|
+
if (o = ti.exec(n), c = Be(o), o.filter((l) => l).length <= 5)
|
|
1106
1106
|
throw new Error("invalid coordinates format");
|
|
1107
1107
|
if (c)
|
|
1108
1108
|
t = Math.abs(parseInt(o[2])), o[4] && (t += o[4].replace(",", ".") / 60, u = "DM"), o[6] && (t += o[6].replace(",", ".") / 3600, u = "DMS"), parseInt(o[2]) < 0 && (t = -1 * t), i = Math.abs(parseInt(o[10])), o[12] && (i += o[12].replace(",", ".") / 60), o[14] && (i += o[14].replace(",", ".") / 3600), parseInt(o[10]) < 0 && (i = -1 * i), o[1] ? (r = o[1], s = o[9]) : o[8] && (r = o[8], s = o[16]);
|
|
@@ -1162,7 +1162,7 @@ function It(n, e) {
|
|
|
1162
1162
|
} else
|
|
1163
1163
|
throw new Error("coordinates pattern match failed");
|
|
1164
1164
|
}
|
|
1165
|
-
function
|
|
1165
|
+
function Be(n) {
|
|
1166
1166
|
if (!isNaN(n[0]))
|
|
1167
1167
|
return !1;
|
|
1168
1168
|
const e = [...n];
|
|
@@ -1589,7 +1589,7 @@ function si(n) {
|
|
|
1589
1589
|
he(e, i, r), t = !0;
|
|
1590
1590
|
},
|
|
1591
1591
|
i(i) {
|
|
1592
|
-
t || (
|
|
1592
|
+
t || (Q(e.$$.fragment, i), t = !0);
|
|
1593
1593
|
},
|
|
1594
1594
|
o(i) {
|
|
1595
1595
|
Y(e.$$.fragment, i), t = !1;
|
|
@@ -1639,7 +1639,7 @@ function oi(n) {
|
|
|
1639
1639
|
);
|
|
1640
1640
|
},
|
|
1641
1641
|
i(u) {
|
|
1642
|
-
i || (
|
|
1642
|
+
i || (Q(t.$$.fragment, u), i = !0);
|
|
1643
1643
|
},
|
|
1644
1644
|
o(u) {
|
|
1645
1645
|
Y(t.$$.fragment, u), i = !1;
|
|
@@ -1700,7 +1700,7 @@ function ar(n) {
|
|
|
1700
1700
|
i(l) {
|
|
1701
1701
|
if (!r) {
|
|
1702
1702
|
for (let d = 0; d < o.length; d += 1)
|
|
1703
|
-
|
|
1703
|
+
Q(t[d]);
|
|
1704
1704
|
r = !0;
|
|
1705
1705
|
}
|
|
1706
1706
|
},
|
|
@@ -1731,14 +1731,14 @@ function cr(n) {
|
|
|
1731
1731
|
},
|
|
1732
1732
|
p(o, c) {
|
|
1733
1733
|
(!u || c[0] & /*noResultsMessage*/
|
|
1734
|
-
128) &&
|
|
1734
|
+
128) && Fe(
|
|
1735
1735
|
s,
|
|
1736
1736
|
/*noResultsMessage*/
|
|
1737
1737
|
o[7]
|
|
1738
1738
|
);
|
|
1739
1739
|
},
|
|
1740
1740
|
i(o) {
|
|
1741
|
-
u || (
|
|
1741
|
+
u || (Q(t.$$.fragment, o), u = !0);
|
|
1742
1742
|
},
|
|
1743
1743
|
o(o) {
|
|
1744
1744
|
Y(t.$$.fragment, o), u = !1;
|
|
@@ -1784,14 +1784,14 @@ function dr(n) {
|
|
|
1784
1784
|
},
|
|
1785
1785
|
p(f, h) {
|
|
1786
1786
|
(!l || h[0] & /*errorMessage*/
|
|
1787
|
-
64) &&
|
|
1787
|
+
64) && Fe(
|
|
1788
1788
|
s,
|
|
1789
1789
|
/*errorMessage*/
|
|
1790
1790
|
f[6]
|
|
1791
1791
|
);
|
|
1792
1792
|
},
|
|
1793
1793
|
i(f) {
|
|
1794
|
-
l || (
|
|
1794
|
+
l || (Q(t.$$.fragment, f), Q(c.$$.fragment, f), l = !0);
|
|
1795
1795
|
},
|
|
1796
1796
|
o(f) {
|
|
1797
1797
|
Y(t.$$.fragment, f), Y(c.$$.fragment, f), l = !1;
|
|
@@ -1869,7 +1869,7 @@ function li(n, e) {
|
|
|
1869
1869
|
e[12]), i.$set(l);
|
|
1870
1870
|
},
|
|
1871
1871
|
i(o) {
|
|
1872
|
-
r || (
|
|
1872
|
+
r || (Q(i.$$.fragment, o), r = !0);
|
|
1873
1873
|
},
|
|
1874
1874
|
o(o) {
|
|
1875
1875
|
Y(i.$$.fragment, o), r = !1;
|
|
@@ -2030,7 +2030,7 @@ function hr(n) {
|
|
|
2030
2030
|
C[3]
|
|
2031
2031
|
), /*abortController*/
|
|
2032
2032
|
C[19] ? x ? G[0] & /*abortController*/
|
|
2033
|
-
524288 &&
|
|
2033
|
+
524288 && Q(x, 1) : (x = si(), x.c(), Q(x, 1), x.m(l, null)) : x && (rt(), Y(x, 1, 1, () => {
|
|
2034
2034
|
x = null;
|
|
2035
2035
|
}), st()), (!g || G[0] & /*searchValue*/
|
|
2036
2036
|
2) && se(
|
|
@@ -2040,7 +2040,7 @@ function hr(n) {
|
|
|
2040
2040
|
C[1] !== ""
|
|
2041
2041
|
), /*enableReverse*/
|
|
2042
2042
|
C[5] === "button" ? _ ? (_.p(C, G), G[0] & /*enableReverse*/
|
|
2043
|
-
32 &&
|
|
2043
|
+
32 && Q(_, 1)) : (_ = oi(C), _.c(), Q(_, 1), _.m(i, v)) : _ && (rt(), Y(_, 1, 1, () => {
|
|
2044
2044
|
_ = null;
|
|
2045
2045
|
}), st()), R && R.p && (!g || G[1] & /*$$scope*/
|
|
2046
2046
|
268435456) && dn(
|
|
@@ -2064,7 +2064,7 @@ function hr(n) {
|
|
|
2064
2064
|
let te = S;
|
|
2065
2065
|
S = N(C), S === te ? ~S && z[S].p(C, G) : (w && (rt(), Y(z[te], 1, 1, () => {
|
|
2066
2066
|
z[te] = null;
|
|
2067
|
-
}), st()), ~S ? (w = z[S], w ? w.p(C, G) : (w = z[S] = W[S](C), w.c()),
|
|
2067
|
+
}), st()), ~S ? (w = z[S], w ? w.p(C, G) : (w = z[S] = W[S](C), w.c()), Q(w, 1), w.m(t, null)) : w = null), (!g || G[0] & /*className*/
|
|
2068
2068
|
4 && y !== (y = Qt(
|
|
2069
2069
|
/*className*/
|
|
2070
2070
|
C[2]
|
|
@@ -2078,7 +2078,7 @@ function hr(n) {
|
|
|
2078
2078
|
);
|
|
2079
2079
|
},
|
|
2080
2080
|
i(C) {
|
|
2081
|
-
g || (
|
|
2081
|
+
g || (Q(L), Q(s.$$.fragment, C), Q(a.$$.fragment, C), Q(x), Q(_), Q(R, C), Q(w), g = !0);
|
|
2082
2082
|
},
|
|
2083
2083
|
o(C) {
|
|
2084
2084
|
Y(L), Y(s.$$.fragment, C), Y(a.$$.fragment, C), Y(x), Y(_), Y(R, C), Y(w), g = !1;
|
|
@@ -2114,7 +2114,7 @@ function gr(n, e, t) {
|
|
|
2114
2114
|
"poi.restaurant": 18,
|
|
2115
2115
|
"poi.aerodrome": 13
|
|
2116
2116
|
};
|
|
2117
|
-
let { class: o = void 0 } = e, { apiKey: c } = e, { bbox: l = void 0 } = e, { clearButtonTitle: d = "clear" } = e, { clearOnBlur: a = !1 } = e, { collapsed: f = !1 } = e, { country: h = void 0 } = e, { debounceSearch: v = 200 } = e, { enableReverse: E = "never" } = e, { errorMessage: S = "Something went wrong…" } = e, { filter: w = () => !0 } = e, { flyTo: y = !0 } = e, { fuzzyMatch: g = !0 } = e, { language: p = void 0 } = e, { limit: M = void 0 } = e, { mapController: L = void 0 } = e, { minLength: x = 2 } = e, { 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!" } = e, { placeholder: k = "Search" } = e, { proximity: R = [{ type: "server-geolocation" }] } = e, { reverseActive: W = E === "always" } = e, { reverseButtonTitle: z = "toggle reverse geocoding" } = e, { searchValue: N = "" } = e, { pickedResultStyle: C = "full-geometry" } = e, { showPlaceType: G = "if-needed" } = e, { showResultsWhileTyping: te = !0 } = e, { selectFirst: oe = !0 } = e, { flyToSelected: ct = !1 } = e, { markerOnSelected:
|
|
2117
|
+
let { class: o = void 0 } = e, { apiKey: c } = e, { bbox: l = void 0 } = e, { clearButtonTitle: d = "clear" } = e, { clearOnBlur: a = !1 } = e, { collapsed: f = !1 } = e, { country: h = void 0 } = e, { debounceSearch: v = 200 } = e, { enableReverse: E = "never" } = e, { errorMessage: S = "Something went wrong…" } = e, { filter: w = () => !0 } = e, { flyTo: y = !0 } = e, { fuzzyMatch: g = !0 } = e, { language: p = void 0 } = e, { limit: M = void 0 } = e, { mapController: L = void 0 } = e, { minLength: x = 2 } = e, { 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!" } = e, { placeholder: k = "Search" } = e, { proximity: R = [{ type: "server-geolocation" }] } = e, { reverseActive: W = E === "always" } = e, { reverseButtonTitle: z = "toggle reverse geocoding" } = e, { searchValue: N = "" } = e, { pickedResultStyle: C = "full-geometry" } = e, { showPlaceType: G = "if-needed" } = e, { showResultsWhileTyping: te = !0 } = e, { selectFirst: oe = !0 } = e, { flyToSelected: ct = !1 } = e, { markerOnSelected: He = !0 } = e, { types: ke = void 0 } = e, { exhaustiveReverseGeocoding: ft = !1 } = e, { excludeTypes: Ve = !1 } = e, { zoom: Ye = u } = e, { apiUrl: dt = "https://api.maptiler.com/geocoding" } = e, { fetchParameters: ht = {} } = e, { iconsBaseUrl: zt = "https://cdn.maptiler.com/maptiler-geocoding-control/v2.0.0-rc.6/icons/" } = e, { adjustUrlQuery: gt = () => {
|
|
2118
2118
|
} } = e;
|
|
2119
2119
|
function Bi() {
|
|
2120
2120
|
ae.focus();
|
|
@@ -2131,20 +2131,20 @@ function gr(n, e, t) {
|
|
|
2131
2131
|
t(14, O = void 0), t(56, T = void 0), t(15, U = -1);
|
|
2132
2132
|
}
|
|
2133
2133
|
function Fi() {
|
|
2134
|
-
t(55,
|
|
2134
|
+
t(55, Z = []), t(56, T = void 0);
|
|
2135
2135
|
}
|
|
2136
|
-
let Re = !1, O,
|
|
2136
|
+
let Re = !1, O, Z, T, Dt = "", ae, U = -1, ce, Ke = [], Ce, Te, Xe, mt;
|
|
2137
2137
|
const Gi = /* @__PURE__ */ new Set(), ye = bn();
|
|
2138
2138
|
pn(() => {
|
|
2139
2139
|
L && (L.setEventHandler(void 0), L.indicateReverse(!1), L.setSelectedMarker(-1), L.setMarkers(void 0, void 0));
|
|
2140
2140
|
});
|
|
2141
2141
|
function Ut(m) {
|
|
2142
2142
|
if (Te && (clearTimeout(Te), Te = void 0), U > -1 && O)
|
|
2143
|
-
t(56, T = O[U]), t(1, N = T.place_type[0] === "reverse" ? T.place_name : T.place_name.replace(/,.*/, "")), t(18, ce = void 0), t(55,
|
|
2143
|
+
t(56, T = O[U]), t(1, N = T.place_type[0] === "reverse" ? T.place_name : T.place_name.replace(/,.*/, "")), t(18, ce = void 0), t(55, Z = void 0), t(15, U = -1);
|
|
2144
2144
|
else if (N) {
|
|
2145
2145
|
const j = m || !yt(N);
|
|
2146
2146
|
vt(N, { exact: !0 }).then(() => {
|
|
2147
|
-
t(55,
|
|
2147
|
+
t(55, Z = O), t(56, T = void 0), j && ji();
|
|
2148
2148
|
}).catch((V) => t(18, ce = V));
|
|
2149
2149
|
}
|
|
2150
2150
|
}
|
|
@@ -2160,15 +2160,15 @@ function gr(n, e, t) {
|
|
|
2160
2160
|
const ie = new AbortController();
|
|
2161
2161
|
t(19, Ce = ie);
|
|
2162
2162
|
try {
|
|
2163
|
-
const P = yt(m),
|
|
2164
|
-
if (p !== void 0 &&
|
|
2165
|
-
const
|
|
2166
|
-
|
|
2163
|
+
const P = yt(m), H = new URLSearchParams();
|
|
2164
|
+
if (p !== void 0 && H.set("language", Array.isArray(p) ? p.join(",") : p ?? ""), ke && H.set("types", ke.join(",")), Ve && H.set("excludeTypes", String(Ve)), l && H.set("bbox", l.map((Je) => Je.toFixed(6)).join(",")), h && H.set("country", Array.isArray(h) ? h.join(",") : h), !j && !P) {
|
|
2165
|
+
const Je = await Xn(L, R, ie);
|
|
2166
|
+
Je && H.set("proximity", Je), (V || !te) && H.set("autocomplete", "false"), H.set("fuzzyMatch", String(g));
|
|
2167
2167
|
}
|
|
2168
|
-
M !== void 0 && (ft || !P || (ke == null ? void 0 : ke.length) === 1) &&
|
|
2169
|
-
const fe = dt + "/" + encodeURIComponent(P ? P.decimalLongitude + "," + P.decimalLatitude : m) + ".json?" +
|
|
2168
|
+
M !== void 0 && (ft || !P || (ke == null ? void 0 : ke.length) === 1) && H.set("limit", String(M)), H.set("key", c), gt(H);
|
|
2169
|
+
const fe = dt + "/" + encodeURIComponent(P ? P.decimalLongitude + "," + P.decimalLatitude : m) + ".json?" + H.toString();
|
|
2170
2170
|
if (fe === Dt) {
|
|
2171
|
-
j ? (t(14, O = void 0), t(56, T =
|
|
2171
|
+
j ? (t(14, O = void 0), t(56, T = Ke[0])) : t(14, O = Ke);
|
|
2172
2172
|
return;
|
|
2173
2173
|
}
|
|
2174
2174
|
Dt = fe;
|
|
@@ -2176,7 +2176,7 @@ function gr(n, e, t) {
|
|
|
2176
2176
|
if (!wt.ok)
|
|
2177
2177
|
throw new Error(await wt.text());
|
|
2178
2178
|
const Et = await wt.json();
|
|
2179
|
-
ye("response", { url: fe, featureCollection: Et }), j ? (t(14, O = void 0), t(56, T = Et.features[0]),
|
|
2179
|
+
ye("response", { url: fe, featureCollection: Et }), j ? (t(14, O = void 0), t(56, T = Et.features[0]), Ke = [T]) : (t(14, O = Et.features.filter(w)), P && O.unshift({
|
|
2180
2180
|
type: "Feature",
|
|
2181
2181
|
properties: {},
|
|
2182
2182
|
id: "reverse_" + P.decimalLongitude + "_" + P.decimalLatitude,
|
|
@@ -2194,7 +2194,7 @@ function gr(n, e, t) {
|
|
|
2194
2194
|
type: "Point",
|
|
2195
2195
|
coordinates: [P.decimalLongitude, P.decimalLatitude]
|
|
2196
2196
|
}
|
|
2197
|
-
}),
|
|
2197
|
+
}), Ke = O, P && ae.focus());
|
|
2198
2198
|
} catch (P) {
|
|
2199
2199
|
if (P && typeof P == "object" && "name" in P && P.name === "AbortError")
|
|
2200
2200
|
return;
|
|
@@ -2205,17 +2205,17 @@ function gr(n, e, t) {
|
|
|
2205
2205
|
}
|
|
2206
2206
|
function ji() {
|
|
2207
2207
|
var ie;
|
|
2208
|
-
if (!(
|
|
2208
|
+
if (!(Z != null && Z.length) || !y)
|
|
2209
2209
|
return;
|
|
2210
|
-
const m = [180, 90, -180, -90], j = !
|
|
2210
|
+
const m = [180, 90, -180, -90], j = !Z.some((P) => !P.matching_text);
|
|
2211
2211
|
let V;
|
|
2212
|
-
for (const P of
|
|
2213
|
-
const
|
|
2214
|
-
if (V = V === void 0 ?
|
|
2212
|
+
for (const P of Z) {
|
|
2213
|
+
const H = We(P);
|
|
2214
|
+
if (V = V === void 0 ? H : H === void 0 ? V : Math.max(V, H), j || !P.matching_text)
|
|
2215
2215
|
for (const fe of [0, 1, 2, 3])
|
|
2216
2216
|
m[fe] = Math[fe < 2 ? "min" : "max"](m[fe], ((ie = P.bbox) == null ? void 0 : ie[fe]) ?? P.center[fe % 2]);
|
|
2217
2217
|
}
|
|
2218
|
-
L &&
|
|
2218
|
+
L && Z.length > 0 && (T && m[0] === m[2] && m[1] === m[3] ? L.flyTo(T.center, We(T)) : L.fitBounds(lt(m), 50, V));
|
|
2219
2219
|
}
|
|
2220
2220
|
function We(m) {
|
|
2221
2221
|
var V;
|
|
@@ -2224,11 +2224,11 @@ function gr(n, e, t) {
|
|
|
2224
2224
|
const j = m.id.replace(/\..*/, "");
|
|
2225
2225
|
return (Array.isArray((V = m.properties) == null ? void 0 : V.categories) ? m.properties.categories.reduce(
|
|
2226
2226
|
(ie, P) => {
|
|
2227
|
-
const
|
|
2228
|
-
return ie === void 0 ?
|
|
2227
|
+
const H = Ye[j + "." + P];
|
|
2228
|
+
return ie === void 0 ? H : H === void 0 ? ie : Math.max(ie, H);
|
|
2229
2229
|
},
|
|
2230
2230
|
void 0
|
|
2231
|
-
) : void 0) ??
|
|
2231
|
+
) : void 0) ?? Ye[j];
|
|
2232
2232
|
}
|
|
2233
2233
|
function qi(m) {
|
|
2234
2234
|
t(0, W = E === "always"), t(14, O = void 0), t(56, T = void 0), t(15, U = -1), Bt(m[1].toFixed(6) + ", " + Kn(m[0], [-180, 180], !0).toFixed(6), !1, !0);
|
|
@@ -2272,21 +2272,21 @@ function gr(n, e, t) {
|
|
|
2272
2272
|
}, sn = () => {
|
|
2273
2273
|
};
|
|
2274
2274
|
return n.$$set = (m) => {
|
|
2275
|
-
"class" in m && t(2, o = m.class), "apiKey" in m && t(26, c = m.apiKey), "bbox" in m && t(27, l = m.bbox), "clearButtonTitle" in m && t(3, d = m.clearButtonTitle), "clearOnBlur" in m && t(28, a = m.clearOnBlur), "collapsed" in m && t(4, f = m.collapsed), "country" in m && t(29, h = m.country), "debounceSearch" in m && t(30, v = m.debounceSearch), "enableReverse" in m && t(5, E = m.enableReverse), "errorMessage" in m && t(6, S = m.errorMessage), "filter" in m && t(31, w = m.filter), "flyTo" in m && t(32, y = m.flyTo), "fuzzyMatch" in m && t(33, g = m.fuzzyMatch), "language" in m && t(34, p = m.language), "limit" in m && t(35, M = m.limit), "mapController" in m && t(36, L = m.mapController), "minLength" in m && t(37, x = m.minLength), "noResultsMessage" in m && t(7, _ = m.noResultsMessage), "placeholder" in m && t(8, k = m.placeholder), "proximity" in m && t(38, R = m.proximity), "reverseActive" in m && t(0, W = m.reverseActive), "reverseButtonTitle" in m && t(9, z = m.reverseButtonTitle), "searchValue" in m && t(1, N = m.searchValue), "pickedResultStyle" in m && t(39, C = m.pickedResultStyle), "showPlaceType" in m && t(10, G = m.showPlaceType), "showResultsWhileTyping" in m && t(40, te = m.showResultsWhileTyping), "selectFirst" in m && t(11, oe = m.selectFirst), "flyToSelected" in m && t(41, ct = m.flyToSelected), "markerOnSelected" in m && t(42,
|
|
2275
|
+
"class" in m && t(2, o = m.class), "apiKey" in m && t(26, c = m.apiKey), "bbox" in m && t(27, l = m.bbox), "clearButtonTitle" in m && t(3, d = m.clearButtonTitle), "clearOnBlur" in m && t(28, a = m.clearOnBlur), "collapsed" in m && t(4, f = m.collapsed), "country" in m && t(29, h = m.country), "debounceSearch" in m && t(30, v = m.debounceSearch), "enableReverse" in m && t(5, E = m.enableReverse), "errorMessage" in m && t(6, S = m.errorMessage), "filter" in m && t(31, w = m.filter), "flyTo" in m && t(32, y = m.flyTo), "fuzzyMatch" in m && t(33, g = m.fuzzyMatch), "language" in m && t(34, p = m.language), "limit" in m && t(35, M = m.limit), "mapController" in m && t(36, L = m.mapController), "minLength" in m && t(37, x = m.minLength), "noResultsMessage" in m && t(7, _ = m.noResultsMessage), "placeholder" in m && t(8, k = m.placeholder), "proximity" in m && t(38, R = m.proximity), "reverseActive" in m && t(0, W = m.reverseActive), "reverseButtonTitle" in m && t(9, z = m.reverseButtonTitle), "searchValue" in m && t(1, N = m.searchValue), "pickedResultStyle" in m && t(39, C = m.pickedResultStyle), "showPlaceType" in m && t(10, G = m.showPlaceType), "showResultsWhileTyping" in m && t(40, te = m.showResultsWhileTyping), "selectFirst" in m && t(11, oe = m.selectFirst), "flyToSelected" in m && t(41, ct = m.flyToSelected), "markerOnSelected" in m && t(42, He = m.markerOnSelected), "types" in m && t(43, ke = m.types), "exhaustiveReverseGeocoding" in m && t(44, ft = m.exhaustiveReverseGeocoding), "excludeTypes" in m && t(45, Ve = m.excludeTypes), "zoom" in m && t(46, Ye = m.zoom), "apiUrl" in m && t(47, dt = m.apiUrl), "fetchParameters" in m && t(48, ht = m.fetchParameters), "iconsBaseUrl" in m && t(12, zt = m.iconsBaseUrl), "adjustUrlQuery" in m && t(49, gt = m.adjustUrlQuery), "$$scope" in m && t(59, s = m.$$scope);
|
|
2276
2276
|
}, n.$$.update = () => {
|
|
2277
2277
|
if (n.$$.dirty[0] & /*enableReverse*/
|
|
2278
2278
|
32 && t(0, W = E === "always"), n.$$.dirty[0] & /*focused, clearOnBlur*/
|
|
2279
2279
|
268443648 && setTimeout(() => {
|
|
2280
|
-
t(16,
|
|
2280
|
+
t(16, Xe = Re), a && !Re && t(1, N = "");
|
|
2281
2281
|
}), n.$$.dirty[0] & /*searchValue, listFeatures*/
|
|
2282
2282
|
16386 | n.$$.dirty[1] & /*minLength*/
|
|
2283
|
-
64 && N.length < x && (t(56, T = void 0), t(14, O = void 0), t(18, ce = void 0), t(55,
|
|
2283
|
+
64 && N.length < x && (t(56, T = void 0), t(14, O = void 0), t(18, ce = void 0), t(55, Z = O)), n.$$.dirty[1] & /*pickedResultStyle, picked*/
|
|
2284
2284
|
33554688 && C !== "marker-only" && T && !T.address && T.geometry.type === "Point" && T.place_type[0] !== "reverse" && vt(T.id, { byId: !0 }).catch((m) => t(18, ce = m)), n.$$.dirty[1] & /*mapController, picked, prevIdToFly, flyTo*/
|
|
2285
|
-
100663330 && (L && T && T.id !== mt && y && (!T.bbox || T.bbox[0] === T.bbox[2] && T.bbox[1] === T.bbox[3] ? L.flyTo(T.center, We(T)) : L.fitBounds(lt(T.bbox), 50, We(T)), t(14, O = void 0), t(55,
|
|
2285
|
+
100663330 && (L && T && T.id !== mt && y && (!T.bbox || T.bbox[0] === T.bbox[2] && T.bbox[1] === T.bbox[3] ? L.flyTo(T.center, We(T)) : L.fitBounds(lt(T.bbox), 50, We(T)), t(14, O = void 0), t(55, Z = void 0), t(15, U = -1)), t(57, mt = T == null ? void 0 : T.id)), n.$$.dirty[0] & /*selectFirst, listFeatures*/
|
|
2286
2286
|
18432 && oe && O != null && O.length && t(15, U = 0), n.$$.dirty[0] & /*searchValue*/
|
|
2287
2287
|
2 && t(15, U = -1), n.$$.dirty[0] & /*listFeatures*/
|
|
2288
2288
|
16384 | n.$$.dirty[1] & /*markedFeatures*/
|
|
2289
|
-
16777216 &&
|
|
2289
|
+
16777216 && Z !== O && t(55, Z = void 0), n.$$.dirty[0] & /*reverseActive, listFeatures, focusedDelayed*/
|
|
2290
2290
|
81921 | n.$$.dirty[1] & /*mapController, markedFeatures*/
|
|
2291
2291
|
16777248 && L && L.setEventHandler((m) => {
|
|
2292
2292
|
switch (m.type) {
|
|
@@ -2300,20 +2300,20 @@ function gr(n, e, t) {
|
|
|
2300
2300
|
}
|
|
2301
2301
|
break;
|
|
2302
2302
|
case "markerMouseEnter":
|
|
2303
|
-
|
|
2303
|
+
Z && t(15, U = Xe ? (O == null ? void 0 : O.findIndex((j) => j.id === m.id)) ?? -1 : -1);
|
|
2304
2304
|
break;
|
|
2305
2305
|
case "markerMouseLeave":
|
|
2306
|
-
|
|
2306
|
+
Z && t(15, U = -1);
|
|
2307
2307
|
break;
|
|
2308
2308
|
}
|
|
2309
2309
|
}), n.$$.dirty[0] & /*listFeatures, selectedItemIndex*/
|
|
2310
2310
|
49152 && t(58, i = O == null ? void 0 : O[U]), n.$$.dirty[1] & /*mapController, selected, flyTo, flyToSelected*/
|
|
2311
2311
|
134218786 && L && i && y && ct && L.flyTo(i.center, We(i)), n.$$.dirty[1] & /*markerOnSelected, mapController*/
|
|
2312
|
-
2080 && (
|
|
2313
|
-
150997024 && L &&
|
|
2314
|
-
50331680 && L && L.setMarkers(
|
|
2312
|
+
2080 && (He || L == null || L.setMarkers(void 0, void 0)), n.$$.dirty[1] & /*mapController, markerOnSelected, markedFeatures, selected*/
|
|
2313
|
+
150997024 && L && He && !Z && (L.setMarkers(i ? [i] : void 0, void 0), L.setSelectedMarker(i ? 0 : -1)), n.$$.dirty[1] & /*mapController, markedFeatures, picked*/
|
|
2314
|
+
50331680 && L && L.setMarkers(Z, T), n.$$.dirty[0] & /*selectedItemIndex*/
|
|
2315
2315
|
32768 | n.$$.dirty[1] & /*markedFeatures, mapController*/
|
|
2316
|
-
16777248 &&
|
|
2316
|
+
16777248 && Z && L && L.setSelectedMarker(U), n.$$.dirty[0] & /*searchValue*/
|
|
2317
2317
|
2 | n.$$.dirty[1] & /*mapController*/
|
|
2318
2318
|
32 && L) {
|
|
2319
2319
|
const m = yt(N);
|
|
@@ -2323,10 +2323,10 @@ function gr(n, e, t) {
|
|
|
2323
2323
|
134217728 && ye("select", { feature: i }), n.$$.dirty[1] & /*picked*/
|
|
2324
2324
|
33554432 && ye("pick", { feature: T }), n.$$.dirty[0] & /*focusedDelayed, listFeatures*/
|
|
2325
2325
|
81920 && ye("optionsvisibilitychange", {
|
|
2326
|
-
optionsVisible:
|
|
2326
|
+
optionsVisible: Xe && !!O
|
|
2327
2327
|
}), n.$$.dirty[0] & /*listFeatures*/
|
|
2328
2328
|
16384 && ye("featureslisted", { features: O }), n.$$.dirty[1] & /*markedFeatures*/
|
|
2329
|
-
16777216 && ye("featuresmarked", { features:
|
|
2329
|
+
16777216 && ye("featuresmarked", { features: Z }), n.$$.dirty[0] & /*reverseActive*/
|
|
2330
2330
|
1 && ye("reversetoggle", { reverse: W }), n.$$.dirty[0] & /*searchValue*/
|
|
2331
2331
|
2 && ye("querychange", { query: N }), n.$$.dirty[0] & /*reverseActive*/
|
|
2332
2332
|
1 | n.$$.dirty[1] & /*mapController*/
|
|
@@ -2348,7 +2348,7 @@ function gr(n, e, t) {
|
|
|
2348
2348
|
Re,
|
|
2349
2349
|
O,
|
|
2350
2350
|
U,
|
|
2351
|
-
|
|
2351
|
+
Xe,
|
|
2352
2352
|
ae,
|
|
2353
2353
|
ce,
|
|
2354
2354
|
Ce,
|
|
@@ -2374,11 +2374,11 @@ function gr(n, e, t) {
|
|
|
2374
2374
|
C,
|
|
2375
2375
|
te,
|
|
2376
2376
|
ct,
|
|
2377
|
-
|
|
2377
|
+
He,
|
|
2378
2378
|
ke,
|
|
2379
2379
|
ft,
|
|
2380
|
+
Ve,
|
|
2380
2381
|
Ye,
|
|
2381
|
-
Ke,
|
|
2382
2382
|
dt,
|
|
2383
2383
|
ht,
|
|
2384
2384
|
gt,
|
|
@@ -2387,7 +2387,7 @@ function gr(n, e, t) {
|
|
|
2387
2387
|
Bt,
|
|
2388
2388
|
Ui,
|
|
2389
2389
|
Fi,
|
|
2390
|
-
|
|
2390
|
+
Z,
|
|
2391
2391
|
T,
|
|
2392
2392
|
mt,
|
|
2393
2393
|
i,
|
|
@@ -2484,7 +2484,7 @@ let mr = class extends xe {
|
|
|
2484
2484
|
return this.$$.ctx[54];
|
|
2485
2485
|
}
|
|
2486
2486
|
};
|
|
2487
|
-
function
|
|
2487
|
+
function je(n, e, t = {}) {
|
|
2488
2488
|
const i = { type: "Feature" };
|
|
2489
2489
|
return (t.id === 0 || t.id) && (i.id = t.id), t.bbox && (i.bbox = t.bbox), i.properties = e || {}, i.geometry = n, i;
|
|
2490
2490
|
}
|
|
@@ -2500,17 +2500,17 @@ function Ot(n, e, t = {}) {
|
|
|
2500
2500
|
if (r[r.length - 1][s] !== r[0][s])
|
|
2501
2501
|
throw new Error("First and last Position are not equivalent.");
|
|
2502
2502
|
}
|
|
2503
|
-
return
|
|
2503
|
+
return je({
|
|
2504
2504
|
type: "Polygon",
|
|
2505
2505
|
coordinates: n
|
|
2506
2506
|
}, e, t);
|
|
2507
2507
|
}
|
|
2508
|
-
function
|
|
2508
|
+
function qe(n, e = {}) {
|
|
2509
2509
|
const t = { type: "FeatureCollection" };
|
|
2510
2510
|
return e.id && (t.id = e.id), e.bbox && (t.bbox = e.bbox), t.features = n, t;
|
|
2511
2511
|
}
|
|
2512
2512
|
function Ii(n, e, t = {}) {
|
|
2513
|
-
return
|
|
2513
|
+
return je({
|
|
2514
2514
|
type: "MultiPolygon",
|
|
2515
2515
|
coordinates: n
|
|
2516
2516
|
}, e, t);
|
|
@@ -2926,10 +2926,10 @@ function Lr(n, e) {
|
|
|
2926
2926
|
for (let i = 1; i < n; i++) t += e[i];
|
|
2927
2927
|
return t;
|
|
2928
2928
|
}
|
|
2929
|
-
function
|
|
2929
|
+
function Ze(n) {
|
|
2930
2930
|
return new Float64Array(n);
|
|
2931
2931
|
}
|
|
2932
|
-
const Sr = (3 + 16 * de) * de, xr = (2 + 12 * de) * de, Mr = (9 + 64 * de) * de * de, Ie =
|
|
2932
|
+
const Sr = (3 + 16 * de) * de, xr = (2 + 12 * de) * de, Mr = (9 + 64 * de) * de * de, Ie = Ze(4), ai = Ze(8), ci = Ze(12), fi = Ze(16), J = Ze(4);
|
|
2933
2933
|
function kr(n, e, t, i, r, s, u) {
|
|
2934
2934
|
let o, c, l, d, a, f, h, v, E, S, w, y, g, p, M, L, x, _;
|
|
2935
2935
|
const k = n - r, R = t - r, W = e - s, z = i - s;
|
|
@@ -2948,7 +2948,7 @@ function Cr(n, e, t, i, r, s) {
|
|
|
2948
2948
|
const u = (e - s) * (t - r), o = (n - r) * (i - s), c = u - o, l = Math.abs(u + o);
|
|
2949
2949
|
return Math.abs(c) >= Sr * l ? c : -kr(n, e, t, i, r, s, l);
|
|
2950
2950
|
}
|
|
2951
|
-
const
|
|
2951
|
+
const De = (n, e) => n.ll.x <= e.x && e.x <= n.ur.x && n.ll.y <= e.y && e.y <= n.ur.y, Pt = (n, e) => {
|
|
2952
2952
|
if (e.ur.x < n.ll.x || n.ur.x < e.ll.x || e.ur.y < n.ll.y || n.ur.y < e.ll.y) return null;
|
|
2953
2953
|
const t = n.ll.x < e.ll.x ? e.ll.x : n.ll.x, i = n.ur.x < e.ur.x ? n.ur.x : e.ur.x, r = n.ll.y < e.ll.y ? e.ll.y : n.ll.y, s = n.ur.y < e.ur.y ? n.ur.y : e.ur.y;
|
|
2954
2954
|
return {
|
|
@@ -3003,7 +3003,7 @@ class hi {
|
|
|
3003
3003
|
return r !== null && di(t.key, r.key) === 0 ? (this.tree.remove(e), r.key) : e;
|
|
3004
3004
|
}
|
|
3005
3005
|
}
|
|
3006
|
-
const
|
|
3006
|
+
const Qe = new Rr(), ot = (n, e) => n.x * e.y - n.y * e.x, Oi = (n, e) => n.x * e.x + n.y * e.y, gi = (n, e, t) => {
|
|
3007
3007
|
const i = Cr(n.x, n.y, e.x, e.y, t.x, t.y);
|
|
3008
3008
|
return i > 0 ? -1 : i < 0 ? 1 : 0;
|
|
3009
3009
|
}, ut = (n) => Math.sqrt(Oi(n, n)), Tr = (n, e, t) => {
|
|
@@ -3261,7 +3261,7 @@ class be {
|
|
|
3261
3261
|
getIntersection(e) {
|
|
3262
3262
|
const t = this.bbox(), i = e.bbox(), r = Pt(t, i);
|
|
3263
3263
|
if (r === null) return null;
|
|
3264
|
-
const s = this.leftSE.point, u = this.rightSE.point, o = e.leftSE.point, c = e.rightSE.point, l =
|
|
3264
|
+
const s = this.leftSE.point, u = this.rightSE.point, o = e.leftSE.point, c = e.rightSE.point, l = De(t, o) && this.comparePoint(o) === 0, d = De(i, s) && e.comparePoint(s) === 0, a = De(t, c) && this.comparePoint(c) === 0, f = De(i, u) && e.comparePoint(u) === 0;
|
|
3265
3265
|
if (d && l)
|
|
3266
3266
|
return f && !a ? u : !f && a ? c : null;
|
|
3267
3267
|
if (d)
|
|
@@ -3272,7 +3272,7 @@ class be {
|
|
|
3272
3272
|
if (f) return u;
|
|
3273
3273
|
if (a) return c;
|
|
3274
3274
|
const h = Ir(s, this.vector(), o, e.vector());
|
|
3275
|
-
return h === null || !
|
|
3275
|
+
return h === null || !De(r, h) ? null : Qe.round(h.x, h.y);
|
|
3276
3276
|
}
|
|
3277
3277
|
/**
|
|
3278
3278
|
* Split the given segment into multiple segments on the given points.
|
|
@@ -3408,7 +3408,7 @@ class vi {
|
|
|
3408
3408
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
3409
3409
|
if (this.poly = t, this.isExterior = i, this.segments = [], typeof e[0][0] != "number" || typeof e[0][1] != "number")
|
|
3410
3410
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
3411
|
-
const r =
|
|
3411
|
+
const r = Qe.round(e[0][0], e[0][1]);
|
|
3412
3412
|
this.bbox = {
|
|
3413
3413
|
ll: {
|
|
3414
3414
|
x: r.x,
|
|
@@ -3423,7 +3423,7 @@ class vi {
|
|
|
3423
3423
|
for (let u = 1, o = e.length; u < o; u++) {
|
|
3424
3424
|
if (typeof e[u][0] != "number" || typeof e[u][1] != "number")
|
|
3425
3425
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
3426
|
-
let c =
|
|
3426
|
+
let c = Qe.round(e[u][0], e[u][1]);
|
|
3427
3427
|
c.x === s.x && c.y === s.y || (this.segments.push(be.fromRing(s, c, this)), c.x < this.bbox.ll.x && (this.bbox.ll.x = c.x), c.y < this.bbox.ll.y && (this.bbox.ll.y = c.y), c.x > this.bbox.ur.x && (this.bbox.ur.x = c.x), c.y > this.bbox.ur.y && (this.bbox.ur.y = c.y), s = c);
|
|
3428
3428
|
}
|
|
3429
3429
|
(r.x !== s.x || r.y !== s.y) && this.segments.push(be.fromRing(s, r, this));
|
|
@@ -3711,7 +3711,7 @@ class zr {
|
|
|
3711
3711
|
const wi = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE || 1e6, Br = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS || 1e6;
|
|
3712
3712
|
class Dr {
|
|
3713
3713
|
run(e, t, i) {
|
|
3714
|
-
le.type = e,
|
|
3714
|
+
le.type = e, Qe.reset();
|
|
3715
3715
|
const r = [new pi(t, !0)];
|
|
3716
3716
|
for (let a = 0, f = i.length; a < f; a++)
|
|
3717
3717
|
r.push(new pi(i[a], !1));
|
|
@@ -3753,7 +3753,7 @@ class Dr {
|
|
|
3753
3753
|
}
|
|
3754
3754
|
o = s.size, c = s.pop();
|
|
3755
3755
|
}
|
|
3756
|
-
|
|
3756
|
+
Qe.reset();
|
|
3757
3757
|
const l = at.factory(u.segments);
|
|
3758
3758
|
return new Wr(l).getGeom();
|
|
3759
3759
|
}
|
|
@@ -3928,7 +3928,7 @@ function qr(n, e) {
|
|
|
3928
3928
|
case "LineString":
|
|
3929
3929
|
case "Polygon":
|
|
3930
3930
|
return e(
|
|
3931
|
-
|
|
3931
|
+
je(t, r, { bbox: s, id: u }),
|
|
3932
3932
|
i,
|
|
3933
3933
|
0
|
|
3934
3934
|
) === !1 ? !1 : void 0;
|
|
@@ -3950,7 +3950,7 @@ function qr(n, e) {
|
|
|
3950
3950
|
type: c,
|
|
3951
3951
|
coordinates: d
|
|
3952
3952
|
};
|
|
3953
|
-
if (e(
|
|
3953
|
+
if (e(je(a, r), i, l) === !1)
|
|
3954
3954
|
return !1;
|
|
3955
3955
|
}
|
|
3956
3956
|
});
|
|
@@ -3990,12 +3990,12 @@ function Yr(n) {
|
|
|
3990
3990
|
var e = [];
|
|
3991
3991
|
return qr(n, function(t) {
|
|
3992
3992
|
e.push(t);
|
|
3993
|
-
}),
|
|
3993
|
+
}), qe(e);
|
|
3994
3994
|
}
|
|
3995
3995
|
var Kr = Yr;
|
|
3996
3996
|
function _i(n, e) {
|
|
3997
3997
|
const t = Vr(
|
|
3998
|
-
|
|
3998
|
+
qe([
|
|
3999
3999
|
Ot([
|
|
4000
4000
|
[
|
|
4001
4001
|
[180, 90],
|
|
@@ -4025,7 +4025,7 @@ function _i(n, e) {
|
|
|
4025
4025
|
a[0] -= 360 - r;
|
|
4026
4026
|
}
|
|
4027
4027
|
e(
|
|
4028
|
-
|
|
4028
|
+
qe([
|
|
4029
4029
|
o.features.length < 2 ? n : zi(o) ?? n,
|
|
4030
4030
|
t
|
|
4031
4031
|
])
|
|
@@ -4065,7 +4065,7 @@ function Xr(n, e, t = !0, i = !0, r = {}, s = {}, u = Li, o = !1) {
|
|
|
4065
4065
|
return;
|
|
4066
4066
|
const g = n.getSource(it);
|
|
4067
4067
|
if (g)
|
|
4068
|
-
g.setData(f ??
|
|
4068
|
+
g.setData(f ?? qe([]));
|
|
4069
4069
|
else if (f)
|
|
4070
4070
|
n.addSource(it, {
|
|
4071
4071
|
type: "geojson",
|
|
@@ -4142,7 +4142,7 @@ function Xr(n, e, t = !0, i = !0, r = {}, s = {}, u = Li, o = !1) {
|
|
|
4142
4142
|
);
|
|
4143
4143
|
e: if (M.length > 0) {
|
|
4144
4144
|
const L = zi(
|
|
4145
|
-
|
|
4145
|
+
qe(M.map((x) => je(x)))
|
|
4146
4146
|
);
|
|
4147
4147
|
if (!L)
|
|
4148
4148
|
break e;
|
|
@@ -4291,10 +4291,10 @@ function Jr(n, e, t) {
|
|
|
4291
4291
|
class f extends n {
|
|
4292
4292
|
constructor(g = {}) {
|
|
4293
4293
|
super();
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
|
|
4297
|
-
|
|
4294
|
+
$e(this, v);
|
|
4295
|
+
$e(this, E);
|
|
4296
|
+
$e(this, S);
|
|
4297
|
+
et(this, E, g);
|
|
4298
4298
|
}
|
|
4299
4299
|
onAddInt(g) {
|
|
4300
4300
|
const p = document.createElement("div");
|
|
@@ -4305,7 +4305,7 @@ function Jr(n, e, t) {
|
|
|
4305
4305
|
flyTo: x,
|
|
4306
4306
|
fullGeometryStyle: _,
|
|
4307
4307
|
...k
|
|
4308
|
-
} =
|
|
4308
|
+
} = q(this, E), R = typeof x == "boolean" ? {} : x, W = Xr(
|
|
4309
4309
|
g,
|
|
4310
4310
|
e,
|
|
4311
4311
|
M,
|
|
@@ -4315,7 +4315,7 @@ function Jr(n, e, t) {
|
|
|
4315
4315
|
_,
|
|
4316
4316
|
k.pickedResultStyle === "full-geometry-including-polygon-center-marker"
|
|
4317
4317
|
);
|
|
4318
|
-
|
|
4318
|
+
et(this, S, W);
|
|
4319
4319
|
const z = {
|
|
4320
4320
|
mapController: W,
|
|
4321
4321
|
flyTo: x === void 0 ? !0 : !!x,
|
|
@@ -4326,15 +4326,15 @@ function Jr(n, e, t) {
|
|
|
4326
4326
|
};
|
|
4327
4327
|
if (!z.apiKey)
|
|
4328
4328
|
throw new Error("no apiKey provided");
|
|
4329
|
-
return
|
|
4329
|
+
return et(this, v, new mr({ target: p, props: z })), q(this, v).$on("select", (N) => {
|
|
4330
4330
|
this.fire(new r(this, N.detail));
|
|
4331
|
-
}),
|
|
4331
|
+
}), q(this, v).$on("pick", (N) => {
|
|
4332
4332
|
this.fire(new c(this, N.detail.feature));
|
|
4333
|
-
}),
|
|
4333
|
+
}), q(this, v).$on("featureslisted", (N) => {
|
|
4334
4334
|
this.fire(new s(this, N.detail.features));
|
|
4335
|
-
}),
|
|
4335
|
+
}), q(this, v).$on("featuresmarked", (N) => {
|
|
4336
4336
|
this.fire(new u(this, N.detail.features));
|
|
4337
|
-
}),
|
|
4337
|
+
}), q(this, v).$on("response", (N) => {
|
|
4338
4338
|
this.fire(
|
|
4339
4339
|
new d(
|
|
4340
4340
|
this,
|
|
@@ -4342,13 +4342,13 @@ function Jr(n, e, t) {
|
|
|
4342
4342
|
N.detail.featureCollection
|
|
4343
4343
|
)
|
|
4344
4344
|
);
|
|
4345
|
-
}),
|
|
4345
|
+
}), q(this, v).$on("optionsvisibilitychange", (N) => {
|
|
4346
4346
|
this.fire(
|
|
4347
4347
|
new o(this, N.detail.optionsVisible)
|
|
4348
4348
|
);
|
|
4349
|
-
}),
|
|
4349
|
+
}), q(this, v).$on("reversetoggle", (N) => {
|
|
4350
4350
|
this.fire(new a(this, N.detail.reverse));
|
|
4351
|
-
}),
|
|
4351
|
+
}), q(this, v).$on("querychange", (N) => {
|
|
4352
4352
|
this.fire(new l(this, N.detail.query));
|
|
4353
4353
|
}), p;
|
|
4354
4354
|
}
|
|
@@ -4366,45 +4366,45 @@ function Jr(n, e, t) {
|
|
|
4366
4366
|
}
|
|
4367
4367
|
setOptions(g) {
|
|
4368
4368
|
var k, R;
|
|
4369
|
-
|
|
4369
|
+
Object.assign(q(this, E), g);
|
|
4370
4370
|
const {
|
|
4371
4371
|
marker: p,
|
|
4372
4372
|
showResultMarkers: M,
|
|
4373
4373
|
flyTo: L,
|
|
4374
4374
|
fullGeometryStyle: x,
|
|
4375
4375
|
..._
|
|
4376
|
-
} =
|
|
4377
|
-
(k =
|
|
4378
|
-
|
|
4376
|
+
} = q(this, E);
|
|
4377
|
+
(k = q(this, v)) == null || k.$set(_), (R = q(this, S)) == null || R.setShowPolygonMarker(
|
|
4378
|
+
q(this, E).pickedResultStyle === "full-geometry-including-polygon-center-marker"
|
|
4379
4379
|
);
|
|
4380
4380
|
}
|
|
4381
4381
|
setQuery(g, p = !0) {
|
|
4382
4382
|
var M;
|
|
4383
|
-
(M =
|
|
4383
|
+
(M = q(this, v)) == null || M.setQuery(g, p);
|
|
4384
4384
|
}
|
|
4385
4385
|
clearMap() {
|
|
4386
4386
|
var g;
|
|
4387
|
-
(g =
|
|
4387
|
+
(g = q(this, v)) == null || g.clearMap();
|
|
4388
4388
|
}
|
|
4389
4389
|
clearList() {
|
|
4390
4390
|
var g;
|
|
4391
|
-
(g =
|
|
4391
|
+
(g = q(this, v)) == null || g.clearList();
|
|
4392
4392
|
}
|
|
4393
4393
|
setReverseMode(g) {
|
|
4394
4394
|
var p;
|
|
4395
|
-
(p =
|
|
4395
|
+
(p = q(this, v)) == null || p.$set({ reverseActive: g });
|
|
4396
4396
|
}
|
|
4397
4397
|
focus() {
|
|
4398
4398
|
var g;
|
|
4399
|
-
(g =
|
|
4399
|
+
(g = q(this, v)) == null || g.focus();
|
|
4400
4400
|
}
|
|
4401
4401
|
blur() {
|
|
4402
4402
|
var g;
|
|
4403
|
-
(g =
|
|
4403
|
+
(g = q(this, v)) == null || g.blur();
|
|
4404
4404
|
}
|
|
4405
4405
|
onRemove() {
|
|
4406
4406
|
var g;
|
|
4407
|
-
(g =
|
|
4407
|
+
(g = q(this, v)) == null || g.$destroy();
|
|
4408
4408
|
}
|
|
4409
4409
|
}
|
|
4410
4410
|
return v = new WeakMap(), E = new WeakMap(), S = new WeakMap(), {
|