@maptiler/geocoding-control 1.4.2-dev.3 → 2.0.0
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/MapLibreBasedGeocodingControl.d.ts +70 -35
- package/leaflet-controller.d.ts +1 -1
- package/leaflet-controller.js +407 -398
- package/leaflet-controller.js.map +1 -1
- package/leaflet-controller.umd.js +3 -3
- package/leaflet-controller.umd.js.map +1 -1
- package/leaflet.d.ts +52 -16
- package/leaflet.js +654 -638
- package/leaflet.js.map +1 -1
- package/leaflet.umd.js +3 -3
- package/leaflet.umd.js.map +1 -1
- package/maplibregl-controller.d.ts +7 -7
- package/maplibregl-controller.js +421 -413
- package/maplibregl-controller.js.map +1 -1
- package/maplibregl-controller.umd.js +3 -3
- package/maplibregl-controller.umd.js.map +1 -1
- package/maplibregl.d.ts +29 -5
- package/maplibregl.js +1352 -1346
- package/maplibregl.js.map +1 -1
- package/maplibregl.umd.js +3 -3
- package/maplibregl.umd.js.map +1 -1
- package/maptilersdk.d.ts +29 -5
- package/maptilersdk.js +1315 -1303
- package/maptilersdk.js.map +1 -1
- package/maptilersdk.umd.js +3 -3
- package/maptilersdk.umd.js.map +1 -1
- package/openlayers.js +1 -1
- package/openlayers.js.map +1 -1
- package/openlayers.umd.js +1 -1
- package/openlayers.umd.js.map +1 -1
- package/package.json +5 -5
- package/react.js +1 -1
- package/react.js.map +1 -1
- package/react.umd.js +1 -1
- package/react.umd.js.map +1 -1
- package/svelte/GeocodingControl.svelte +1 -1
- package/svelte/MapLibreBasedGeocodingControl.d.ts +70 -35
- package/svelte/MapLibreBasedGeocodingControl.js +69 -66
- package/svelte/leaflet-controller.d.ts +1 -1
- package/svelte/leaflet-controller.js +47 -24
- package/svelte/leaflet.d.ts +52 -16
- package/svelte/leaflet.js +14 -2
- package/svelte/maplibregl-controller.d.ts +7 -7
- package/svelte/maplibregl-controller.js +55 -34
- package/svelte/maplibregl.d.ts +29 -5
- package/svelte/maplibregl.js +3 -8
- package/svelte/maptilersdk.d.ts +29 -5
- package/svelte/maptilersdk.js +15 -18
- package/vanilla.js +1 -1
- package/vanilla.js.map +1 -1
- package/vanilla.umd.js +1 -1
- package/vanilla.umd.js.map +1 -1
package/leaflet.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var dn = Object.defineProperty;
|
|
2
|
+
var Qt = (i) => {
|
|
3
3
|
throw TypeError(i);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var Et = (i, e, t) =>
|
|
7
|
-
var
|
|
8
|
-
import * as
|
|
5
|
+
var hn = (i, e, t) => e in i ? dn(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
|
|
6
|
+
var Et = (i, e, t) => hn(i, typeof e != "symbol" ? e + "" : e, t), Ht = (i, e, t) => e.has(i) || Qt("Cannot " + t);
|
|
7
|
+
var le = (i, e, t) => (Ht(i, e, "read from private field"), t ? t.call(i) : e.get(i)), Lt = (i, e, t) => e.has(i) ? Qt("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(i) : e.set(i, t), it = (i, e, t, n) => (Ht(i, e, "write to private field"), n ? n.call(i, t) : e.set(i, t), t);
|
|
8
|
+
import * as re from "leaflet";
|
|
9
9
|
function A() {
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function gn(i, e) {
|
|
12
12
|
for (const t in e) i[t] = e[t];
|
|
13
13
|
return (
|
|
14
14
|
/** @type {T & S} */
|
|
15
15
|
i
|
|
16
16
|
);
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function Ni(i) {
|
|
19
19
|
return i();
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function Vt() {
|
|
22
22
|
return /* @__PURE__ */ Object.create(null);
|
|
23
23
|
}
|
|
24
24
|
function ye(i) {
|
|
25
|
-
i.forEach(
|
|
25
|
+
i.forEach(Ni);
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function Pi(i) {
|
|
28
28
|
return typeof i == "function";
|
|
29
29
|
}
|
|
30
30
|
function Se(i, e) {
|
|
@@ -34,19 +34,19 @@ let nt;
|
|
|
34
34
|
function X(i, e) {
|
|
35
35
|
return i === e ? !0 : (nt || (nt = document.createElement("a")), nt.href = e, i === nt.href);
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function mn(i) {
|
|
38
38
|
return Object.keys(i).length === 0;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function yn(i, e, t, n) {
|
|
41
41
|
if (i) {
|
|
42
|
-
const r =
|
|
42
|
+
const r = Ti(i, e, t, n);
|
|
43
43
|
return i[0](r);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
return i[1] && n ?
|
|
46
|
+
function Ti(i, e, t, n) {
|
|
47
|
+
return i[1] && n ? gn(t.ctx.slice(), i[1](n(e))) : t.ctx;
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function pn(i, e, t, n) {
|
|
50
50
|
if (i[2] && n) {
|
|
51
51
|
const r = i[2](n(t));
|
|
52
52
|
if (e.dirty === void 0)
|
|
@@ -61,13 +61,13 @@ function mn(i, e, t, n) {
|
|
|
61
61
|
}
|
|
62
62
|
return e.dirty;
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function vn(i, e, t, n, r, o) {
|
|
65
65
|
if (r) {
|
|
66
|
-
const l =
|
|
66
|
+
const l = Ti(e, t, n, o);
|
|
67
67
|
i.p(l, r);
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function bn(i) {
|
|
71
71
|
if (i.ctx.length > 32) {
|
|
72
72
|
const e = [], t = i.ctx.length / 32;
|
|
73
73
|
for (let n = 0; n < t; n++)
|
|
@@ -76,13 +76,13 @@ function pn(i) {
|
|
|
76
76
|
}
|
|
77
77
|
return -1;
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function Yt(i) {
|
|
80
80
|
return i ?? "";
|
|
81
81
|
}
|
|
82
82
|
function T(i, e) {
|
|
83
83
|
i.appendChild(e);
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function F(i, e, t) {
|
|
86
86
|
i.insertBefore(e, t || null);
|
|
87
87
|
}
|
|
88
88
|
function B(i) {
|
|
@@ -91,7 +91,7 @@ function B(i) {
|
|
|
91
91
|
function W(i) {
|
|
92
92
|
return document.createElement(i);
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function ae(i) {
|
|
95
95
|
return document.createElementNS("http://www.w3.org/2000/svg", i);
|
|
96
96
|
}
|
|
97
97
|
function _e(i) {
|
|
@@ -100,13 +100,13 @@ function _e(i) {
|
|
|
100
100
|
function te() {
|
|
101
101
|
return _e(" ");
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function wn() {
|
|
104
104
|
return _e("");
|
|
105
105
|
}
|
|
106
106
|
function J(i, e, t, n) {
|
|
107
107
|
return i.addEventListener(e, t, n), () => i.removeEventListener(e, t, n);
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function _n(i) {
|
|
110
110
|
return function(e) {
|
|
111
111
|
return e.preventDefault(), i.call(this, e);
|
|
112
112
|
};
|
|
@@ -114,39 +114,39 @@ function bn(i) {
|
|
|
114
114
|
function y(i, e, t) {
|
|
115
115
|
t == null ? i.removeAttribute(e) : i.getAttribute(e) !== t && i.setAttribute(e, t);
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function En(i) {
|
|
118
118
|
return Array.from(i.childNodes);
|
|
119
119
|
}
|
|
120
120
|
function je(i, e) {
|
|
121
121
|
e = "" + e, i.data !== e && (i.data = /** @type {string} */
|
|
122
122
|
e);
|
|
123
123
|
}
|
|
124
|
-
function
|
|
124
|
+
function Xt(i, e) {
|
|
125
125
|
i.value = e ?? "";
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function oe(i, e, t) {
|
|
128
128
|
i.classList.toggle(e, !!t);
|
|
129
129
|
}
|
|
130
|
-
function
|
|
130
|
+
function Ln(i, e, { bubbles: t = !1, cancelable: n = !1 } = {}) {
|
|
131
131
|
return new CustomEvent(i, { detail: e, bubbles: t, cancelable: n });
|
|
132
132
|
}
|
|
133
133
|
let Ze;
|
|
134
134
|
function ze(i) {
|
|
135
135
|
Ze = i;
|
|
136
136
|
}
|
|
137
|
-
function
|
|
137
|
+
function Ri() {
|
|
138
138
|
if (!Ze) throw new Error("Function called outside component initialization");
|
|
139
139
|
return Ze;
|
|
140
140
|
}
|
|
141
|
-
function
|
|
142
|
-
|
|
141
|
+
function Sn(i) {
|
|
142
|
+
Ri().$$.on_destroy.push(i);
|
|
143
143
|
}
|
|
144
|
-
function
|
|
145
|
-
const i =
|
|
144
|
+
function xn() {
|
|
145
|
+
const i = Ri();
|
|
146
146
|
return (e, t, { cancelable: n = !1 } = {}) => {
|
|
147
147
|
const r = i.$$.callbacks[e];
|
|
148
148
|
if (r) {
|
|
149
|
-
const o =
|
|
149
|
+
const o = Ln(
|
|
150
150
|
/** @type {string} */
|
|
151
151
|
e,
|
|
152
152
|
t,
|
|
@@ -159,23 +159,23 @@ function Ln() {
|
|
|
159
159
|
return !0;
|
|
160
160
|
};
|
|
161
161
|
}
|
|
162
|
-
function
|
|
162
|
+
function Kt(i, e) {
|
|
163
163
|
const t = i.$$.callbacks[e.type];
|
|
164
164
|
t && t.slice().forEach((n) => n.call(this, e));
|
|
165
165
|
}
|
|
166
166
|
const Ae = [], Ct = [];
|
|
167
167
|
let Be = [];
|
|
168
|
-
const
|
|
168
|
+
const Jt = [], Mn = /* @__PURE__ */ Promise.resolve();
|
|
169
169
|
let kt = !1;
|
|
170
|
-
function
|
|
171
|
-
kt || (kt = !0,
|
|
170
|
+
function Cn() {
|
|
171
|
+
kt || (kt = !0, Mn.then(Ii));
|
|
172
172
|
}
|
|
173
173
|
function Nt(i) {
|
|
174
174
|
Be.push(i);
|
|
175
175
|
}
|
|
176
176
|
const St = /* @__PURE__ */ new Set();
|
|
177
177
|
let Oe = 0;
|
|
178
|
-
function
|
|
178
|
+
function Ii() {
|
|
179
179
|
if (Oe !== 0)
|
|
180
180
|
return;
|
|
181
181
|
const i = Ze;
|
|
@@ -183,7 +183,7 @@ function Ti() {
|
|
|
183
183
|
try {
|
|
184
184
|
for (; Oe < Ae.length; ) {
|
|
185
185
|
const e = Ae[Oe];
|
|
186
|
-
Oe++, ze(e),
|
|
186
|
+
Oe++, ze(e), kn(e.$$);
|
|
187
187
|
}
|
|
188
188
|
} catch (e) {
|
|
189
189
|
throw Ae.length = 0, Oe = 0, e;
|
|
@@ -195,18 +195,18 @@ function Ti() {
|
|
|
195
195
|
}
|
|
196
196
|
Be.length = 0;
|
|
197
197
|
} while (Ae.length);
|
|
198
|
-
for (;
|
|
199
|
-
|
|
198
|
+
for (; Jt.length; )
|
|
199
|
+
Jt.pop()();
|
|
200
200
|
kt = !1, St.clear(), ze(i);
|
|
201
201
|
}
|
|
202
|
-
function
|
|
202
|
+
function kn(i) {
|
|
203
203
|
if (i.fragment !== null) {
|
|
204
204
|
i.update(), ye(i.before_update);
|
|
205
205
|
const e = i.dirty;
|
|
206
206
|
i.dirty = [-1], i.fragment && i.fragment.p(i.ctx, e), i.after_update.forEach(Nt);
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
|
-
function
|
|
209
|
+
function Nn(i) {
|
|
210
210
|
const e = [], t = [];
|
|
211
211
|
Be.forEach((n) => i.indexOf(n) === -1 ? e.push(n) : t.push(n)), t.forEach((n) => n()), Be = e;
|
|
212
212
|
}
|
|
@@ -234,38 +234,38 @@ function V(i, e, t, n) {
|
|
|
234
234
|
}), i.o(e);
|
|
235
235
|
} else n && n();
|
|
236
236
|
}
|
|
237
|
-
function
|
|
237
|
+
function $t(i) {
|
|
238
238
|
return (i == null ? void 0 : i.length) !== void 0 ? i : Array.from(i);
|
|
239
239
|
}
|
|
240
|
-
function
|
|
240
|
+
function Pn(i, e) {
|
|
241
241
|
V(i, 1, 1, () => {
|
|
242
242
|
e.delete(i.key);
|
|
243
243
|
});
|
|
244
244
|
}
|
|
245
|
-
function
|
|
245
|
+
function Tn(i, e, t, n, r, o, l, s, c, u, h, a) {
|
|
246
246
|
let f = i.length, d = o.length, m = f;
|
|
247
|
-
const
|
|
248
|
-
for (; m--; )
|
|
249
|
-
const
|
|
247
|
+
const v = {};
|
|
248
|
+
for (; m--; ) v[i[m].key] = m;
|
|
249
|
+
const b = [], p = /* @__PURE__ */ new Map(), _ = /* @__PURE__ */ new Map(), E = [];
|
|
250
250
|
for (m = d; m--; ) {
|
|
251
251
|
const L = a(r, o, m), w = t(L);
|
|
252
|
-
let
|
|
253
|
-
|
|
252
|
+
let C = l.get(w);
|
|
253
|
+
C ? E.push(() => C.p(L, e)) : (C = u(w, L), C.c()), p.set(w, b[m] = C), w in v && _.set(w, Math.abs(m - v[w]));
|
|
254
254
|
}
|
|
255
|
-
const
|
|
255
|
+
const S = /* @__PURE__ */ new Set(), k = /* @__PURE__ */ new Set();
|
|
256
256
|
function x(L) {
|
|
257
257
|
Z(L, 1), L.m(s, h), l.set(L.key, L), h = L.first, d--;
|
|
258
258
|
}
|
|
259
259
|
for (; f && d; ) {
|
|
260
|
-
const L =
|
|
261
|
-
L === w ? (h = L.first, f--, d--) :
|
|
260
|
+
const L = b[d - 1], w = i[f - 1], C = L.key, I = w.key;
|
|
261
|
+
L === w ? (h = L.first, f--, d--) : p.has(I) ? !l.has(C) || S.has(C) ? x(L) : k.has(I) ? f-- : _.get(C) > _.get(I) ? (k.add(C), x(L)) : (S.add(I), f--) : (c(w, l), f--);
|
|
262
262
|
}
|
|
263
263
|
for (; f--; ) {
|
|
264
264
|
const L = i[f];
|
|
265
|
-
|
|
265
|
+
p.has(L.key) || c(L, l);
|
|
266
266
|
}
|
|
267
|
-
for (; d; ) x(
|
|
268
|
-
return ye(E),
|
|
267
|
+
for (; d; ) x(b[d - 1]);
|
|
268
|
+
return ye(E), b;
|
|
269
269
|
}
|
|
270
270
|
function Ee(i) {
|
|
271
271
|
i && i.c();
|
|
@@ -273,16 +273,16 @@ function Ee(i) {
|
|
|
273
273
|
function ge(i, e, t) {
|
|
274
274
|
const { fragment: n, after_update: r } = i.$$;
|
|
275
275
|
n && n.m(e, t), Nt(() => {
|
|
276
|
-
const o = i.$$.on_mount.map(
|
|
276
|
+
const o = i.$$.on_mount.map(Ni).filter(Pi);
|
|
277
277
|
i.$$.on_destroy ? i.$$.on_destroy.push(...o) : ye(o), i.$$.on_mount = [];
|
|
278
278
|
}), r.forEach(Nt);
|
|
279
279
|
}
|
|
280
280
|
function me(i, e) {
|
|
281
281
|
const t = i.$$;
|
|
282
|
-
t.fragment !== null && (
|
|
282
|
+
t.fragment !== null && (Nn(t.after_update), ye(t.on_destroy), t.fragment && t.fragment.d(e), t.on_destroy = t.fragment = null, t.ctx = []);
|
|
283
283
|
}
|
|
284
|
-
function
|
|
285
|
-
i.$$.dirty[0] === -1 && (Ae.push(i),
|
|
284
|
+
function Rn(i, e) {
|
|
285
|
+
i.$$.dirty[0] === -1 && (Ae.push(i), Cn(), i.$$.dirty.fill(0)), i.$$.dirty[e / 31 | 0] |= 1 << e % 31;
|
|
286
286
|
}
|
|
287
287
|
function xe(i, e, t, n, r, o, l = null, s = [-1]) {
|
|
288
288
|
const c = Ze;
|
|
@@ -294,7 +294,7 @@ function xe(i, e, t, n, r, o, l = null, s = [-1]) {
|
|
|
294
294
|
props: o,
|
|
295
295
|
update: A,
|
|
296
296
|
not_equal: r,
|
|
297
|
-
bound:
|
|
297
|
+
bound: Vt(),
|
|
298
298
|
// lifecycle
|
|
299
299
|
on_mount: [],
|
|
300
300
|
on_destroy: [],
|
|
@@ -303,7 +303,7 @@ function xe(i, e, t, n, r, o, l = null, s = [-1]) {
|
|
|
303
303
|
after_update: [],
|
|
304
304
|
context: new Map(e.context || (c ? c.$$.context : [])),
|
|
305
305
|
// everything else
|
|
306
|
-
callbacks:
|
|
306
|
+
callbacks: Vt(),
|
|
307
307
|
dirty: s,
|
|
308
308
|
skip_bound: !1,
|
|
309
309
|
root: e.target || c.$$.root
|
|
@@ -312,14 +312,14 @@ function xe(i, e, t, n, r, o, l = null, s = [-1]) {
|
|
|
312
312
|
let h = !1;
|
|
313
313
|
if (u.ctx = t ? t(i, e.props || {}, (a, f, ...d) => {
|
|
314
314
|
const m = d.length ? d[0] : f;
|
|
315
|
-
return u.ctx && r(u.ctx[a], u.ctx[a] = m) && (!u.skip_bound && u.bound[a] && u.bound[a](m), h &&
|
|
315
|
+
return u.ctx && r(u.ctx[a], u.ctx[a] = m) && (!u.skip_bound && u.bound[a] && u.bound[a](m), h && Rn(i, a)), f;
|
|
316
316
|
}) : [], u.update(), h = !0, ye(u.before_update), u.fragment = n ? n(u.ctx) : !1, e.target) {
|
|
317
317
|
if (e.hydrate) {
|
|
318
|
-
const a =
|
|
318
|
+
const a = En(e.target);
|
|
319
319
|
u.fragment && u.fragment.l(a), a.forEach(B);
|
|
320
320
|
} else
|
|
321
321
|
u.fragment && u.fragment.c();
|
|
322
|
-
e.intro && Z(i.$$.fragment), ge(i, e.target, e.anchor),
|
|
322
|
+
e.intro && Z(i.$$.fragment), ge(i, e.target, e.anchor), Ii();
|
|
323
323
|
}
|
|
324
324
|
ze(c);
|
|
325
325
|
}
|
|
@@ -353,7 +353,7 @@ class Me {
|
|
|
353
353
|
* @returns {() => void}
|
|
354
354
|
*/
|
|
355
355
|
$on(e, t) {
|
|
356
|
-
if (!
|
|
356
|
+
if (!Pi(t))
|
|
357
357
|
return A;
|
|
358
358
|
const n = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
|
|
359
359
|
return n.push(t), () => {
|
|
@@ -366,19 +366,19 @@ class Me {
|
|
|
366
366
|
* @returns {void}
|
|
367
367
|
*/
|
|
368
368
|
$set(e) {
|
|
369
|
-
this.$$set && !
|
|
369
|
+
this.$$set && !mn(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
|
|
370
370
|
}
|
|
371
371
|
}
|
|
372
|
-
const
|
|
373
|
-
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(
|
|
374
|
-
function
|
|
372
|
+
const In = "4";
|
|
373
|
+
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(In);
|
|
374
|
+
function On(i) {
|
|
375
375
|
let e, t;
|
|
376
376
|
return {
|
|
377
377
|
c() {
|
|
378
|
-
e =
|
|
378
|
+
e = ae("svg"), t = ae("path"), y(t, "d", "M13.12.706a.982.982 0 0 0-1.391 0L6.907 5.517 2.087.696a.982.982 0 1 0-1.391 1.39l4.821 4.821L.696 11.73a.982.982 0 1 0 1.39 1.39l4.821-4.821 4.822 4.821a.982.982 0 1 0 1.39-1.39L8.298 6.908l4.821-4.822a.988.988 0 0 0 0-1.38Z"), y(e, "viewBox", "0 0 14 14"), y(e, "width", "13"), y(e, "height", "13"), y(e, "class", "svelte-en2qvf");
|
|
379
379
|
},
|
|
380
380
|
m(n, r) {
|
|
381
|
-
|
|
381
|
+
F(n, e, r), T(e, t);
|
|
382
382
|
},
|
|
383
383
|
p: A,
|
|
384
384
|
i: A,
|
|
@@ -388,19 +388,19 @@ function Rn(i) {
|
|
|
388
388
|
}
|
|
389
389
|
};
|
|
390
390
|
}
|
|
391
|
-
class
|
|
391
|
+
class Oi extends Me {
|
|
392
392
|
constructor(e) {
|
|
393
|
-
super(), xe(this, e, null,
|
|
393
|
+
super(), xe(this, e, null, On, Se, {});
|
|
394
394
|
}
|
|
395
395
|
}
|
|
396
|
-
function
|
|
396
|
+
function Wn(i) {
|
|
397
397
|
let e, t;
|
|
398
398
|
return {
|
|
399
399
|
c() {
|
|
400
|
-
e =
|
|
400
|
+
e = ae("svg"), t = ae("path"), y(t, "d", "M15 0C6.705 0 0 6.705 0 15C0 23.295 6.705 30 15 30C23.295 30 30 23.295 30 15C30 6.705 23.295 0 15 0ZM22.5 20.385L20.385 22.5L15 17.115L9.615 22.5L7.5 20.385L12.885 15L7.5 9.615L9.615 7.5L15 12.885L20.385 7.5L22.5 9.615L17.115 15L22.5 20.385Z"), y(e, "viewBox", "0 0 30 30"), y(e, "fill", "none"), y(e, "xmlns", "http://www.w3.org/2000/svg"), y(e, "class", "svelte-d2loi5");
|
|
401
401
|
},
|
|
402
402
|
m(n, r) {
|
|
403
|
-
|
|
403
|
+
F(n, e, r), T(e, t);
|
|
404
404
|
},
|
|
405
405
|
p: A,
|
|
406
406
|
i: A,
|
|
@@ -410,12 +410,12 @@ function In(i) {
|
|
|
410
410
|
}
|
|
411
411
|
};
|
|
412
412
|
}
|
|
413
|
-
class
|
|
413
|
+
class Wi extends Me {
|
|
414
414
|
constructor(e) {
|
|
415
|
-
super(), xe(this, e, null,
|
|
415
|
+
super(), xe(this, e, null, Wn, Se, {});
|
|
416
416
|
}
|
|
417
417
|
}
|
|
418
|
-
function
|
|
418
|
+
function An(i) {
|
|
419
419
|
let e, t;
|
|
420
420
|
return {
|
|
421
421
|
c() {
|
|
@@ -428,7 +428,7 @@ function On(i) {
|
|
|
428
428
|
), y(e, "class", "svelte-ltkwvy");
|
|
429
429
|
},
|
|
430
430
|
m(n, r) {
|
|
431
|
-
|
|
431
|
+
F(n, e, r);
|
|
432
432
|
},
|
|
433
433
|
p(n, r) {
|
|
434
434
|
r & /*iconsBaseUrl*/
|
|
@@ -446,7 +446,7 @@ function On(i) {
|
|
|
446
446
|
}
|
|
447
447
|
};
|
|
448
448
|
}
|
|
449
|
-
function
|
|
449
|
+
function Bn(i) {
|
|
450
450
|
let e, t;
|
|
451
451
|
return {
|
|
452
452
|
c() {
|
|
@@ -459,7 +459,7 @@ function Wn(i) {
|
|
|
459
459
|
), y(e, "class", "svelte-ltkwvy");
|
|
460
460
|
},
|
|
461
461
|
m(n, r) {
|
|
462
|
-
|
|
462
|
+
F(n, e, r);
|
|
463
463
|
},
|
|
464
464
|
p(n, r) {
|
|
465
465
|
r & /*iconsBaseUrl*/
|
|
@@ -477,7 +477,7 @@ function Wn(i) {
|
|
|
477
477
|
}
|
|
478
478
|
};
|
|
479
479
|
}
|
|
480
|
-
function
|
|
480
|
+
function Dn(i) {
|
|
481
481
|
let e, t;
|
|
482
482
|
return {
|
|
483
483
|
c() {
|
|
@@ -490,7 +490,7 @@ function An(i) {
|
|
|
490
490
|
), y(e, "class", "svelte-ltkwvy");
|
|
491
491
|
},
|
|
492
492
|
m(n, r) {
|
|
493
|
-
|
|
493
|
+
F(n, e, r);
|
|
494
494
|
},
|
|
495
495
|
p(n, r) {
|
|
496
496
|
r & /*iconsBaseUrl*/
|
|
@@ -508,7 +508,7 @@ function An(i) {
|
|
|
508
508
|
}
|
|
509
509
|
};
|
|
510
510
|
}
|
|
511
|
-
function
|
|
511
|
+
function Un(i) {
|
|
512
512
|
let e, t;
|
|
513
513
|
return {
|
|
514
514
|
c() {
|
|
@@ -521,7 +521,7 @@ function Bn(i) {
|
|
|
521
521
|
), y(e, "class", "svelte-ltkwvy");
|
|
522
522
|
},
|
|
523
523
|
m(n, r) {
|
|
524
|
-
|
|
524
|
+
F(n, e, r);
|
|
525
525
|
},
|
|
526
526
|
p(n, r) {
|
|
527
527
|
r & /*iconsBaseUrl*/
|
|
@@ -539,7 +539,7 @@ function Bn(i) {
|
|
|
539
539
|
}
|
|
540
540
|
};
|
|
541
541
|
}
|
|
542
|
-
function
|
|
542
|
+
function Fn(i) {
|
|
543
543
|
let e, t;
|
|
544
544
|
return {
|
|
545
545
|
c() {
|
|
@@ -552,7 +552,7 @@ function Dn(i) {
|
|
|
552
552
|
), y(e, "class", "svelte-ltkwvy");
|
|
553
553
|
},
|
|
554
554
|
m(n, r) {
|
|
555
|
-
|
|
555
|
+
F(n, e, r);
|
|
556
556
|
},
|
|
557
557
|
p(n, r) {
|
|
558
558
|
r & /*iconsBaseUrl*/
|
|
@@ -570,7 +570,7 @@ function Dn(i) {
|
|
|
570
570
|
}
|
|
571
571
|
};
|
|
572
572
|
}
|
|
573
|
-
function
|
|
573
|
+
function Gn(i) {
|
|
574
574
|
let e, t;
|
|
575
575
|
return {
|
|
576
576
|
c() {
|
|
@@ -583,7 +583,7 @@ function Un(i) {
|
|
|
583
583
|
), y(e, "class", "svelte-ltkwvy");
|
|
584
584
|
},
|
|
585
585
|
m(n, r) {
|
|
586
|
-
|
|
586
|
+
F(n, e, r);
|
|
587
587
|
},
|
|
588
588
|
p(n, r) {
|
|
589
589
|
r & /*iconsBaseUrl*/
|
|
@@ -601,7 +601,7 @@ function Un(i) {
|
|
|
601
601
|
}
|
|
602
602
|
};
|
|
603
603
|
}
|
|
604
|
-
function
|
|
604
|
+
function zn(i) {
|
|
605
605
|
let e, t;
|
|
606
606
|
return {
|
|
607
607
|
c() {
|
|
@@ -614,7 +614,7 @@ function Gn(i) {
|
|
|
614
614
|
), y(e, "class", "svelte-ltkwvy");
|
|
615
615
|
},
|
|
616
616
|
m(n, r) {
|
|
617
|
-
|
|
617
|
+
F(n, e, r);
|
|
618
618
|
},
|
|
619
619
|
p(n, r) {
|
|
620
620
|
r & /*iconsBaseUrl*/
|
|
@@ -632,7 +632,7 @@ function Gn(i) {
|
|
|
632
632
|
}
|
|
633
633
|
};
|
|
634
634
|
}
|
|
635
|
-
function
|
|
635
|
+
function jn(i) {
|
|
636
636
|
let e, t, n, r;
|
|
637
637
|
return {
|
|
638
638
|
c() {
|
|
@@ -645,7 +645,7 @@ function Fn(i) {
|
|
|
645
645
|
), y(e, "class", "svelte-ltkwvy");
|
|
646
646
|
},
|
|
647
647
|
m(o, l) {
|
|
648
|
-
|
|
648
|
+
F(o, e, l), n || (r = J(
|
|
649
649
|
e,
|
|
650
650
|
"error",
|
|
651
651
|
/*error_handler*/
|
|
@@ -668,7 +668,7 @@ function Fn(i) {
|
|
|
668
668
|
}
|
|
669
669
|
};
|
|
670
670
|
}
|
|
671
|
-
function
|
|
671
|
+
function ei(i) {
|
|
672
672
|
let e, t;
|
|
673
673
|
return {
|
|
674
674
|
c() {
|
|
@@ -678,7 +678,7 @@ function $t(i) {
|
|
|
678
678
|
), y(e, "class", "secondary svelte-ltkwvy");
|
|
679
679
|
},
|
|
680
680
|
m(n, r) {
|
|
681
|
-
|
|
681
|
+
F(n, e, r), T(e, t);
|
|
682
682
|
},
|
|
683
683
|
p(n, r) {
|
|
684
684
|
r & /*placeType*/
|
|
@@ -693,7 +693,7 @@ function $t(i) {
|
|
|
693
693
|
}
|
|
694
694
|
};
|
|
695
695
|
}
|
|
696
|
-
function
|
|
696
|
+
function Zn(i) {
|
|
697
697
|
let e, t, n, r, o, l, s, c, u, h = (
|
|
698
698
|
/*isReverse*/
|
|
699
699
|
(i[7] ? (
|
|
@@ -714,48 +714,48 @@ function zn(i) {
|
|
|
714
714
|
i[0].id.startsWith("poi.") || !/*imageUrl*/
|
|
715
715
|
i[5]) && !/*isReverse*/
|
|
716
716
|
i[7]
|
|
717
|
-
), m,
|
|
717
|
+
), m, v, b = (
|
|
718
718
|
/*isReverse*/
|
|
719
719
|
(i[7] ? "" : (
|
|
720
720
|
/*feature*/
|
|
721
721
|
i[0].place_name.replace(/[^,]*,?\s*/, "")
|
|
722
722
|
)) + ""
|
|
723
|
-
),
|
|
724
|
-
function
|
|
725
|
-
return
|
|
726
|
-
1 && (t = null),
|
|
727
|
-
1 && (n = null),
|
|
728
|
-
1 && (r = null),
|
|
723
|
+
), p, _, E;
|
|
724
|
+
function S(w, C) {
|
|
725
|
+
return C & /*feature*/
|
|
726
|
+
1 && (t = null), C & /*feature*/
|
|
727
|
+
1 && (n = null), C & /*feature*/
|
|
728
|
+
1 && (r = null), C & /*feature*/
|
|
729
729
|
1 && (o = null), /*imageUrl*/
|
|
730
|
-
w[5] ?
|
|
730
|
+
w[5] ? jn : (
|
|
731
731
|
/*feature*/
|
|
732
|
-
w[0].address ?
|
|
733
|
-
w[0].id.startsWith("road.")), t ?
|
|
734
|
-
w[0].id.startsWith("address.")), n ?
|
|
735
|
-
w[0].id.startsWith("postal_code.")), r ?
|
|
736
|
-
w[0].id.startsWith("poi.")), o ?
|
|
732
|
+
w[0].address ? zn : (t == null && (t = !!/*feature*/
|
|
733
|
+
w[0].id.startsWith("road.")), t ? Gn : (n == null && (n = !!/*feature*/
|
|
734
|
+
w[0].id.startsWith("address.")), n ? Fn : (r == null && (r = !!/*feature*/
|
|
735
|
+
w[0].id.startsWith("postal_code.")), r ? Un : (o == null && (o = !!/*feature*/
|
|
736
|
+
w[0].id.startsWith("poi.")), o ? Dn : (
|
|
737
737
|
/*isReverse*/
|
|
738
|
-
w[7] ?
|
|
738
|
+
w[7] ? Bn : An
|
|
739
739
|
)))))
|
|
740
740
|
);
|
|
741
741
|
}
|
|
742
|
-
let
|
|
742
|
+
let k = S(i, -1), x = k(i), L = d && ei(i);
|
|
743
743
|
return {
|
|
744
744
|
c() {
|
|
745
|
-
e = W("li"), x.c(), l = te(), s = W("span"), c = W("span"), u = W("span"), a = _e(h), f = te(), L && L.c(), m = te(),
|
|
745
|
+
e = W("li"), x.c(), l = te(), s = W("span"), c = W("span"), u = W("span"), a = _e(h), f = te(), L && L.c(), m = te(), v = W("span"), p = _e(b), y(u, "class", "primary svelte-ltkwvy"), y(c, "class", "svelte-ltkwvy"), y(v, "class", "line2 svelte-ltkwvy"), y(s, "class", "texts svelte-ltkwvy"), y(e, "tabindex", "0"), y(
|
|
746
746
|
e,
|
|
747
747
|
"data-selected",
|
|
748
748
|
/*selected*/
|
|
749
749
|
i[1]
|
|
750
|
-
), y(e, "class", "svelte-ltkwvy"),
|
|
750
|
+
), y(e, "class", "svelte-ltkwvy"), oe(
|
|
751
751
|
e,
|
|
752
752
|
"selected",
|
|
753
753
|
/*selected*/
|
|
754
754
|
i[1]
|
|
755
755
|
);
|
|
756
756
|
},
|
|
757
|
-
m(w,
|
|
758
|
-
|
|
757
|
+
m(w, C) {
|
|
758
|
+
F(w, e, C), x.m(e, null), T(e, l), T(e, s), T(s, c), T(c, u), T(u, a), T(c, f), L && L.m(c, null), T(s, m), T(s, v), T(v, p), _ || (E = [
|
|
759
759
|
J(
|
|
760
760
|
e,
|
|
761
761
|
"mouseenter",
|
|
@@ -768,10 +768,10 @@ function zn(i) {
|
|
|
768
768
|
/*focus_handler*/
|
|
769
769
|
i[13]
|
|
770
770
|
)
|
|
771
|
-
],
|
|
771
|
+
], _ = !0);
|
|
772
772
|
},
|
|
773
|
-
p(w, [
|
|
774
|
-
|
|
773
|
+
p(w, [C]) {
|
|
774
|
+
k === (k = S(w, C)) && x ? x.p(w, C) : (x.d(1), x = k(w), x && (x.c(), x.m(e, l))), C & /*feature*/
|
|
775
775
|
1 && h !== (h = /*isReverse*/
|
|
776
776
|
(w[7] ? (
|
|
777
777
|
/*feature*/
|
|
@@ -779,7 +779,7 @@ function zn(i) {
|
|
|
779
779
|
) : (
|
|
780
780
|
/*feature*/
|
|
781
781
|
w[0].place_name.replace(/,.*/, "")
|
|
782
|
-
)) + "") && je(a, h),
|
|
782
|
+
)) + "") && je(a, h), C & /*showPlaceType, feature, imageUrl*/
|
|
783
783
|
37 && (d = /*showPlaceType*/
|
|
784
784
|
w[2] === "always" || /*showPlaceType*/
|
|
785
785
|
w[2] && !/*feature*/
|
|
@@ -789,19 +789,19 @@ function zn(i) {
|
|
|
789
789
|
w[0].id.startsWith("postal_code.") && (!/*feature*/
|
|
790
790
|
w[0].id.startsWith("poi.") || !/*imageUrl*/
|
|
791
791
|
w[5]) && !/*isReverse*/
|
|
792
|
-
w[7]), d ? L ? L.p(w,
|
|
793
|
-
1 &&
|
|
792
|
+
w[7]), d ? L ? L.p(w, C) : (L = ei(w), L.c(), L.m(c, null)) : L && (L.d(1), L = null), C & /*feature*/
|
|
793
|
+
1 && b !== (b = /*isReverse*/
|
|
794
794
|
(w[7] ? "" : (
|
|
795
795
|
/*feature*/
|
|
796
796
|
w[0].place_name.replace(/[^,]*,?\s*/, "")
|
|
797
|
-
)) + "") && je(
|
|
797
|
+
)) + "") && je(p, b), C & /*selected*/
|
|
798
798
|
2 && y(
|
|
799
799
|
e,
|
|
800
800
|
"data-selected",
|
|
801
801
|
/*selected*/
|
|
802
802
|
w[1]
|
|
803
|
-
),
|
|
804
|
-
2 &&
|
|
803
|
+
), C & /*selected*/
|
|
804
|
+
2 && oe(
|
|
805
805
|
e,
|
|
806
806
|
"selected",
|
|
807
807
|
/*selected*/
|
|
@@ -811,36 +811,36 @@ function zn(i) {
|
|
|
811
811
|
i: A,
|
|
812
812
|
o: A,
|
|
813
813
|
d(w) {
|
|
814
|
-
w && B(e), x.d(), L && L.d(),
|
|
814
|
+
w && B(e), x.d(), L && L.d(), _ = !1, ye(E);
|
|
815
815
|
}
|
|
816
816
|
};
|
|
817
817
|
}
|
|
818
|
-
function
|
|
818
|
+
function qn(i, e, t) {
|
|
819
819
|
var E;
|
|
820
820
|
let n, r, { feature: o } = e, { selected: l = !1 } = e, { showPlaceType: s } = e, { missingIconsCache: c } = e, { iconsBaseUrl: u } = e;
|
|
821
821
|
const h = (E = o.properties) == null ? void 0 : E.categories;
|
|
822
822
|
let a, f, d = 0, m = o.place_type[0] === "reverse";
|
|
823
|
-
function
|
|
823
|
+
function v() {
|
|
824
824
|
f && c.add(f), t(10, d++, d);
|
|
825
825
|
}
|
|
826
|
-
function
|
|
827
|
-
|
|
826
|
+
function b(S) {
|
|
827
|
+
Kt.call(this, i, S);
|
|
828
828
|
}
|
|
829
|
-
function
|
|
830
|
-
|
|
829
|
+
function p(S) {
|
|
830
|
+
Kt.call(this, i, S);
|
|
831
831
|
}
|
|
832
|
-
const
|
|
833
|
-
return i.$$set = (
|
|
834
|
-
"feature" in
|
|
832
|
+
const _ = () => v();
|
|
833
|
+
return i.$$set = (S) => {
|
|
834
|
+
"feature" in S && t(0, o = S.feature), "selected" in S && t(1, l = S.selected), "showPlaceType" in S && t(2, s = S.showPlaceType), "missingIconsCache" in S && t(9, c = S.missingIconsCache), "iconsBaseUrl" in S && t(3, u = S.iconsBaseUrl);
|
|
835
835
|
}, i.$$.update = () => {
|
|
836
|
-
var
|
|
836
|
+
var S, k, x, L;
|
|
837
837
|
if (i.$$.dirty & /*loadIconAttempt, index, category, iconsBaseUrl, imageUrl, missingIconsCache*/
|
|
838
838
|
3640)
|
|
839
839
|
do
|
|
840
840
|
t(11, n--, n), t(4, a = h == null ? void 0 : h[n]), t(5, f = a ? u + a.replace(/ /g, "_") + ".svg" : void 0);
|
|
841
841
|
while (n > -1 && (!f || c.has(f)));
|
|
842
842
|
i.$$.dirty & /*feature*/
|
|
843
|
-
1 && t(6, r = ((
|
|
843
|
+
1 && t(6, r = ((k = (S = o.properties) == null ? void 0 : S.categories) == null ? void 0 : k.join(", ")) ?? ((L = (x = o.properties) == null ? void 0 : x.place_type_name) == null ? void 0 : L[0]) ?? o.place_type[0]);
|
|
844
844
|
}, t(11, n = (h == null ? void 0 : h.length) ?? 0), [
|
|
845
845
|
o,
|
|
846
846
|
l,
|
|
@@ -850,18 +850,18 @@ function jn(i, e, t) {
|
|
|
850
850
|
f,
|
|
851
851
|
r,
|
|
852
852
|
m,
|
|
853
|
-
|
|
853
|
+
v,
|
|
854
854
|
c,
|
|
855
855
|
d,
|
|
856
856
|
n,
|
|
857
|
-
v,
|
|
858
857
|
b,
|
|
859
|
-
|
|
858
|
+
p,
|
|
859
|
+
_
|
|
860
860
|
];
|
|
861
861
|
}
|
|
862
|
-
class
|
|
862
|
+
class Qn extends Me {
|
|
863
863
|
constructor(e) {
|
|
864
|
-
super(), xe(this, e,
|
|
864
|
+
super(), xe(this, e, qn, Zn, Se, {
|
|
865
865
|
feature: 0,
|
|
866
866
|
selected: 1,
|
|
867
867
|
showPlaceType: 2,
|
|
@@ -870,14 +870,14 @@ class Zn extends Me {
|
|
|
870
870
|
});
|
|
871
871
|
}
|
|
872
872
|
}
|
|
873
|
-
function
|
|
873
|
+
function Hn(i) {
|
|
874
874
|
let e;
|
|
875
875
|
return {
|
|
876
876
|
c() {
|
|
877
877
|
e = W("div"), e.innerHTML = '<svg viewBox="0 0 18 18" width="24" height="24" class="svelte-7cmwmc"><path fill="#333" d="M4.4 4.4l.8.8c2.1-2.1 5.5-2.1 7.6 0l.8-.8c-2.5-2.5-6.7-2.5-9.2 0z"></path><path opacity=".1" d="M12.8 12.9c-2.1 2.1-5.5 2.1-7.6 0-2.1-2.1-2.1-5.5 0-7.7l-.8-.8c-2.5 2.5-2.5 6.7 0 9.2s6.6 2.5 9.2 0 2.5-6.6 0-9.2l-.8.8c2.2 2.1 2.2 5.6 0 7.7z"></path></svg>', y(e, "class", "svelte-7cmwmc");
|
|
878
878
|
},
|
|
879
879
|
m(t, n) {
|
|
880
|
-
|
|
880
|
+
F(t, e, n);
|
|
881
881
|
},
|
|
882
882
|
p: A,
|
|
883
883
|
i: A,
|
|
@@ -887,22 +887,22 @@ function qn(i) {
|
|
|
887
887
|
}
|
|
888
888
|
};
|
|
889
889
|
}
|
|
890
|
-
class
|
|
890
|
+
class Vn extends Me {
|
|
891
891
|
constructor(e) {
|
|
892
|
-
super(), xe(this, e, null,
|
|
892
|
+
super(), xe(this, e, null, Hn, Se, {});
|
|
893
893
|
}
|
|
894
894
|
}
|
|
895
|
-
function
|
|
895
|
+
function Yn(i) {
|
|
896
896
|
let e, t, n;
|
|
897
897
|
return {
|
|
898
898
|
c() {
|
|
899
|
-
e =
|
|
900
|
-
i[0] === "list" ? 20 : void 0), y(e, "viewBox", "0 0 70 85"), y(e, "fill", "none"), y(e, "class", "svelte-gzo3ar"),
|
|
899
|
+
e = ae("svg"), t = ae("path"), y(t, "stroke-width", "4"), y(t, "d", "M 5,33.103579 C 5,17.607779 18.457,5 35,5 C 51.543,5 65,17.607779 65,33.103579 C 65,56.388679 40.4668,76.048179 36.6112,79.137779 C 36.3714,79.329879 36.2116,79.457979 36.1427,79.518879 C 35.8203,79.800879 35.4102,79.942779 35,79.942779 C 34.5899,79.942779 34.1797,79.800879 33.8575,79.518879 C 33.7886,79.457979 33.6289,79.330079 33.3893,79.138079 C 29.5346,76.049279 5,56.389379 5,33.103579 Z M 35.0001,49.386379 C 43.1917,49.386379 49.8323,42.646079 49.8323,34.331379 C 49.8323,26.016779 43.1917,19.276479 35.0001,19.276479 C 26.8085,19.276479 20.1679,26.016779 20.1679,34.331379 C 20.1679,42.646079 26.8085,49.386379 35.0001,49.386379 Z"), y(t, "class", "svelte-gzo3ar"), y(e, "width", n = /*displayIn*/
|
|
900
|
+
i[0] === "list" ? 20 : void 0), y(e, "viewBox", "0 0 70 85"), y(e, "fill", "none"), y(e, "class", "svelte-gzo3ar"), oe(
|
|
901
901
|
e,
|
|
902
902
|
"in-map",
|
|
903
903
|
/*displayIn*/
|
|
904
904
|
i[0] !== "list"
|
|
905
|
-
),
|
|
905
|
+
), oe(
|
|
906
906
|
e,
|
|
907
907
|
"list-icon",
|
|
908
908
|
/*displayIn*/
|
|
@@ -910,19 +910,19 @@ function Hn(i) {
|
|
|
910
910
|
);
|
|
911
911
|
},
|
|
912
912
|
m(r, o) {
|
|
913
|
-
|
|
913
|
+
F(r, e, o), T(e, t);
|
|
914
914
|
},
|
|
915
915
|
p(r, [o]) {
|
|
916
916
|
o & /*displayIn*/
|
|
917
917
|
1 && n !== (n = /*displayIn*/
|
|
918
918
|
r[0] === "list" ? 20 : void 0) && y(e, "width", n), o & /*displayIn*/
|
|
919
|
-
1 &&
|
|
919
|
+
1 && oe(
|
|
920
920
|
e,
|
|
921
921
|
"in-map",
|
|
922
922
|
/*displayIn*/
|
|
923
923
|
r[0] !== "list"
|
|
924
924
|
), o & /*displayIn*/
|
|
925
|
-
1 &&
|
|
925
|
+
1 && oe(
|
|
926
926
|
e,
|
|
927
927
|
"list-icon",
|
|
928
928
|
/*displayIn*/
|
|
@@ -936,25 +936,25 @@ function Hn(i) {
|
|
|
936
936
|
}
|
|
937
937
|
};
|
|
938
938
|
}
|
|
939
|
-
function
|
|
939
|
+
function Xn(i, e, t) {
|
|
940
940
|
let { displayIn: n } = e;
|
|
941
941
|
return i.$$set = (r) => {
|
|
942
942
|
"displayIn" in r && t(0, n = r.displayIn);
|
|
943
943
|
}, [n];
|
|
944
944
|
}
|
|
945
|
-
class
|
|
945
|
+
class Kn extends Me {
|
|
946
946
|
constructor(e) {
|
|
947
|
-
super(), xe(this, e,
|
|
947
|
+
super(), xe(this, e, Xn, Yn, Se, { displayIn: 0 });
|
|
948
948
|
}
|
|
949
949
|
}
|
|
950
|
-
function
|
|
950
|
+
function Jn(i) {
|
|
951
951
|
let e, t;
|
|
952
952
|
return {
|
|
953
953
|
c() {
|
|
954
|
-
e =
|
|
954
|
+
e = ae("svg"), t = ae("path"), y(t, "d", "M30.003-26.765C13.46-26.765 0-14.158 0 1.337c0 23.286 24.535 42.952 28.39 46.04.24.192.402.316.471.376.323.282.732.424 1.142.424.41 0 .82-.142 1.142-.424.068-.06.231-.183.471-.376 3.856-3.09 28.39-22.754 28.39-46.04 0-15.495-13.46-28.102-30.003-28.102Zm1.757 12.469c4.38 0 7.858 1.052 10.431 3.158 2.595 2.105 3.89 4.913 3.89 8.422 0 2.34-.53 4.362-1.593 6.063-1.063 1.702-3.086 3.616-6.063 5.742-2.042 1.51-3.337 2.659-3.89 3.446-.532.787-.8 1.82-.8 3.096v1.914h-8.449V15.18c0-2.041.434-3.815 1.306-5.325.872-1.51 2.467-3.118 4.785-4.82 2.233-1.594 3.7-2.89 4.402-3.889a5.582 5.582 0 0 0 1.087-3.35c0-1.382-.51-2.435-1.531-3.158-1.02-.723-2.45-1.087-4.28-1.087-3.19 0-6.826 1.047-10.91 3.131l-3.472-6.986c4.742-2.659 9.77-3.992 15.087-3.992Zm-1.88 37.324c1.765 0 3.124.472 4.08 1.408.98.936 1.47 2.276 1.47 4.02 0 1.68-.49 3.007-1.47 3.985-.977.957-2.336 1.435-4.08 1.435-1.787 0-3.171-.465-4.15-1.4-.978-.958-1.47-2.298-1.47-4.02 0-1.787.48-3.14 1.436-4.054.957-.915 2.355-1.374 4.184-1.374Z"), y(e, "viewBox", "0 0 60.006 21.412"), y(e, "width", "14"), y(e, "height", "20"), y(e, "class", "svelte-en2qvf");
|
|
955
955
|
},
|
|
956
956
|
m(n, r) {
|
|
957
|
-
|
|
957
|
+
F(n, e, r), T(e, t);
|
|
958
958
|
},
|
|
959
959
|
p: A,
|
|
960
960
|
i: A,
|
|
@@ -964,19 +964,19 @@ function Xn(i) {
|
|
|
964
964
|
}
|
|
965
965
|
};
|
|
966
966
|
}
|
|
967
|
-
class
|
|
967
|
+
class $n extends Me {
|
|
968
968
|
constructor(e) {
|
|
969
|
-
super(), xe(this, e, null,
|
|
969
|
+
super(), xe(this, e, null, Jn, Se, {});
|
|
970
970
|
}
|
|
971
971
|
}
|
|
972
|
-
function
|
|
972
|
+
function er(i) {
|
|
973
973
|
let e, t, n;
|
|
974
974
|
return {
|
|
975
975
|
c() {
|
|
976
|
-
e =
|
|
976
|
+
e = ae("svg"), t = ae("circle"), n = ae("path"), y(t, "cx", "4.789"), y(t, "cy", "4.787"), y(t, "r", "3.85"), y(t, "class", "svelte-1aq105l"), y(n, "d", "M12.063 12.063 7.635 7.635"), y(n, "class", "svelte-1aq105l"), y(e, "xmlns", "http://www.w3.org/2000/svg"), y(e, "width", "13"), y(e, "height", "13"), y(e, "viewBox", "0 0 13 13"), y(e, "class", "svelte-1aq105l");
|
|
977
977
|
},
|
|
978
978
|
m(r, o) {
|
|
979
|
-
|
|
979
|
+
F(r, e, o), T(e, t), T(e, n);
|
|
980
980
|
},
|
|
981
981
|
p: A,
|
|
982
982
|
i: A,
|
|
@@ -986,12 +986,12 @@ function Jn(i) {
|
|
|
986
986
|
}
|
|
987
987
|
};
|
|
988
988
|
}
|
|
989
|
-
class
|
|
989
|
+
class tr extends Me {
|
|
990
990
|
constructor(e) {
|
|
991
|
-
super(), xe(this, e, null,
|
|
991
|
+
super(), xe(this, e, null, er, Se, {});
|
|
992
992
|
}
|
|
993
993
|
}
|
|
994
|
-
function
|
|
994
|
+
function ir(i, e, t) {
|
|
995
995
|
const n = e[1], r = e[0], o = n - r;
|
|
996
996
|
return i === n && t ? i : ((i - r) % o + o) % o + r;
|
|
997
997
|
}
|
|
@@ -1000,7 +1000,7 @@ function qe(i) {
|
|
|
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
1002
|
let Ue;
|
|
1003
|
-
async function
|
|
1003
|
+
async function nr(i, e, t) {
|
|
1004
1004
|
const n = i == null ? void 0 : i.getCenterAndZoom();
|
|
1005
1005
|
for (const r of e ?? [])
|
|
1006
1006
|
if (!(n && (r.minZoom != null && r.minZoom > n[0] || r.maxZoom != null && r.maxZoom < n[0]))) {
|
|
@@ -1045,8 +1045,8 @@ async function tr(i, e, t) {
|
|
|
1045
1045
|
return n[1].toFixed(6) + "," + n[2].toFixed(6);
|
|
1046
1046
|
}
|
|
1047
1047
|
}
|
|
1048
|
-
const
|
|
1049
|
-
function
|
|
1048
|
+
const rr = /^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([6-9][0-9])\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([6-9][0-9])\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*(EAST|WEST|[EW])?$/i, ti = /^([+-]?[0-8]?[0-9])\s+([0-5]?[0-9]\.\d{3,})[\s,]{1,}([+-]?[0-1]?[0-9]?[0-9])\s+([0-5]?[0-9]\.\d{3,})$/, ii = /^(NORTH|SOUTH|[NS])?[\s]*([+-]?[0-8]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(NORTH|SOUTH|[NS])?[\s]*[,/;]?[\s]*(EAST|WEST|[EW])?[\s]*([+-]?[0-1]?[0-9]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(EAST|WEST|[EW])?$/i, ni = /^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(EAST|WEST|[EW])?$/i, ri = /^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)\s*(EAST|WEST|[EW])?$/i, oi = /^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|’’|´´|["″”\.])?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|´´|’’|["″”\.])?\s*(EAST|WEST|[EW])?$/i;
|
|
1049
|
+
function or(i) {
|
|
1050
1050
|
if (!["DMS", "DM", "DD"].includes(i))
|
|
1051
1051
|
throw new Error("invalid format specified");
|
|
1052
1052
|
if (this.decimalCoordinates && this.decimalCoordinates.trim()) {
|
|
@@ -1055,35 +1055,35 @@ function nr(i) {
|
|
|
1055
1055
|
i == "DD" && (c = `${r}° ${l}, ${o}° ${s}`);
|
|
1056
1056
|
const u = Math.floor(r), h = Math.floor(o), a = (r - u) * 60, f = (o - h) * 60;
|
|
1057
1057
|
if (i == "DM") {
|
|
1058
|
-
let d =
|
|
1058
|
+
let d = si(a, 3).toFixed(3).padStart(6, "0"), m = si(f, 3).toFixed(3).padStart(6, "0");
|
|
1059
1059
|
d.endsWith(".000") && m.endsWith(".000") && (d = d.replace(/\.000$/, ""), m = m.replace(/\.000$/, "")), c = `${u}° ${d}' ${l}, ${h}° ${m}' ${s}`;
|
|
1060
1060
|
}
|
|
1061
1061
|
if (i == "DMS") {
|
|
1062
1062
|
const d = Math.floor(a), m = Math.floor(f);
|
|
1063
|
-
let
|
|
1064
|
-
const
|
|
1065
|
-
|
|
1063
|
+
let v = ((a - d) * 60).toFixed(1).padStart(4, "0"), b = ((f - m) * 60).toFixed(1).padStart(4, "0");
|
|
1064
|
+
const p = d.toString().padStart(2, "0"), _ = m.toString().padStart(2, "0");
|
|
1065
|
+
v.endsWith(".0") && b.endsWith(".0") && (v = v.replace(/\.0$/, ""), b = b.replace(/\.0$/, "")), c = `${u}° ${p}' ${v}" ${l}, ${h}° ${_}' ${b}" ${s}`;
|
|
1066
1066
|
}
|
|
1067
1067
|
return c;
|
|
1068
1068
|
} else
|
|
1069
1069
|
throw new Error("no decimal coordinates to convert");
|
|
1070
1070
|
}
|
|
1071
|
-
function
|
|
1071
|
+
function si(i, e) {
|
|
1072
1072
|
const t = Math.pow(10, e);
|
|
1073
1073
|
return Math.round((i + Number.EPSILON) * t) / t;
|
|
1074
1074
|
}
|
|
1075
1075
|
function At(i, e) {
|
|
1076
1076
|
e || (e = 5), i = i.replace(/\s+/g, " ").trim();
|
|
1077
1077
|
let t = null, n = null, r = "", o = "", l = null, s = [], c = !1;
|
|
1078
|
-
if (
|
|
1078
|
+
if (rr.test(i))
|
|
1079
1079
|
throw new Error("invalid coordinate value");
|
|
1080
|
-
if (
|
|
1081
|
-
if (s =
|
|
1080
|
+
if (ti.test(i))
|
|
1081
|
+
if (s = ti.exec(i), c = Fe(s), c)
|
|
1082
1082
|
t = Math.abs(s[1]) + s[2] / 60, Number(s[1]) < 0 && (t *= -1), n = Math.abs(s[3]) + s[4] / 60, Number(s[3]) < 0 && (n *= -1), l = "DM";
|
|
1083
1083
|
else
|
|
1084
1084
|
throw new Error("invalid coordinate format");
|
|
1085
|
-
else if (
|
|
1086
|
-
if (s =
|
|
1085
|
+
else if (ii.test(i))
|
|
1086
|
+
if (s = ii.exec(i), c = Fe(s), c) {
|
|
1087
1087
|
if (t = s[2], n = s[6], t.includes(",") && (t = t.replace(",", ".")), n.includes(",") && (n = n.replace(",", ".")), l = "DD", Number(Math.round(t)) == Number(t))
|
|
1088
1088
|
throw new Error("integer only coordinate provided");
|
|
1089
1089
|
if (Number(Math.round(n)) == Number(n))
|
|
@@ -1091,18 +1091,18 @@ function At(i, e) {
|
|
|
1091
1091
|
s[1] ? (r = s[1], o = s[5]) : s[4] && (r = s[4], o = s[8]);
|
|
1092
1092
|
} else
|
|
1093
1093
|
throw new Error("invalid decimal coordinate format");
|
|
1094
|
-
else if (
|
|
1095
|
-
if (s =
|
|
1094
|
+
else if (ni.test(i))
|
|
1095
|
+
if (s = ni.exec(i), c = Fe(s), c)
|
|
1096
1096
|
t = Math.abs(parseInt(s[2])), s[4] && (t += s[4] / 60, l = "DM"), s[6] && (t += s[6].replace(",", ".") / 3600, l = "DMS"), parseInt(s[2]) < 0 && (t = -1 * t), n = Math.abs(parseInt(s[9])), s[11] && (n += s[11] / 60), s[13] && (n += s[13].replace(",", ".") / 3600), parseInt(s[9]) < 0 && (n = -1 * n), s[1] ? (r = s[1], o = s[8]) : s[7] && (r = s[7], o = s[14]);
|
|
1097
1097
|
else
|
|
1098
1098
|
throw new Error("invalid DMS coordinates format");
|
|
1099
|
-
else if (
|
|
1100
|
-
if (s =
|
|
1099
|
+
else if (ri.test(i))
|
|
1100
|
+
if (s = ri.exec(i), c = Fe(s), c)
|
|
1101
1101
|
t = Math.abs(parseInt(s[2])), s[4] && (t += s[4] / 60, l = "DM"), s[6] && (t += s[6] / 3600, l = "DMS"), parseInt(s[2]) < 0 && (t = -1 * t), n = Math.abs(parseInt(s[10])), s[12] && (n += s[12] / 60), s[14] && (n += s[14] / 3600), parseInt(s[10]) < 0 && (n = -1 * n), s[1] ? (r = s[1], o = s[9]) : s[8] && (r = s[8], o = s[16]);
|
|
1102
1102
|
else
|
|
1103
1103
|
throw new Error("invalid DMS coordinates format");
|
|
1104
|
-
else if (
|
|
1105
|
-
if (s =
|
|
1104
|
+
else if (oi.test(i)) {
|
|
1105
|
+
if (s = oi.exec(i), c = Fe(s), s.filter((u) => u).length <= 5)
|
|
1106
1106
|
throw new Error("invalid coordinates format");
|
|
1107
1107
|
if (c)
|
|
1108
1108
|
t = Math.abs(parseInt(s[2])), s[4] && (t += s[4].replace(",", ".") / 60, l = "DM"), s[6] && (t += s[6].replace(",", ".") / 3600, l = "DMS"), parseInt(s[2]) < 0 && (t = -1 * t), n = Math.abs(parseInt(s[10])), s[12] && (n += s[12].replace(",", ".") / 60), s[14] && (n += s[14].replace(",", ".") / 3600), parseInt(s[10]) < 0 && (n = -1 * n), s[1] ? (r = s[1], o = s[9]) : s[8] && (r = s[8], o = s[16]);
|
|
@@ -1125,27 +1125,27 @@ function At(i, e) {
|
|
|
1125
1125
|
let a, f;
|
|
1126
1126
|
const d = /[,/;\u0020]/g, m = h.match(d);
|
|
1127
1127
|
if (m == null) {
|
|
1128
|
-
const
|
|
1129
|
-
a = h.substring(0,
|
|
1128
|
+
const p = Math.floor(i.length / 2);
|
|
1129
|
+
a = h.substring(0, p).trim(), f = h.substring(p).trim();
|
|
1130
1130
|
} else {
|
|
1131
|
-
let
|
|
1132
|
-
m.length % 2 == 1 ?
|
|
1133
|
-
let
|
|
1134
|
-
if (
|
|
1135
|
-
|
|
1131
|
+
let p;
|
|
1132
|
+
m.length % 2 == 1 ? p = Math.floor(m.length / 2) : p = m.length / 2 - 1;
|
|
1133
|
+
let _ = 0;
|
|
1134
|
+
if (p == 0)
|
|
1135
|
+
_ = h.indexOf(m[0]), a = h.substring(0, _).trim(), f = h.substring(_ + 1).trim();
|
|
1136
1136
|
else {
|
|
1137
|
-
let E = 0,
|
|
1138
|
-
for (; E <=
|
|
1139
|
-
|
|
1140
|
-
a = h.substring(0,
|
|
1137
|
+
let E = 0, S = 0;
|
|
1138
|
+
for (; E <= p; )
|
|
1139
|
+
_ = h.indexOf(m[E], S), S = _ + 1, E++;
|
|
1140
|
+
a = h.substring(0, _).trim(), f = h.substring(_ + 1).trim();
|
|
1141
1141
|
}
|
|
1142
1142
|
}
|
|
1143
|
-
const
|
|
1144
|
-
if (p.length == 2 && p[1] == 0 && p[1].length != 2)
|
|
1145
|
-
throw new Error("invalid coordinates format");
|
|
1146
|
-
const v = f.split(".");
|
|
1143
|
+
const v = a.split(".");
|
|
1147
1144
|
if (v.length == 2 && v[1] == 0 && v[1].length != 2)
|
|
1148
1145
|
throw new Error("invalid coordinates format");
|
|
1146
|
+
const b = f.split(".");
|
|
1147
|
+
if (b.length == 2 && b[1] == 0 && b[1].length != 2)
|
|
1148
|
+
throw new Error("invalid coordinates format");
|
|
1149
1149
|
if (/^\d+$/.test(a) || /^\d+$/.test(f))
|
|
1150
1150
|
throw new Error("degree only coordinate/s provided");
|
|
1151
1151
|
return t = Number(Number(t).toFixed(e)), n = Number(Number(n).toFixed(e)), Object.freeze({
|
|
@@ -1156,13 +1156,13 @@ function At(i, e) {
|
|
|
1156
1156
|
decimalLongitude: n,
|
|
1157
1157
|
decimalCoordinates: `${t},${n}`,
|
|
1158
1158
|
originalFormat: l,
|
|
1159
|
-
closeEnough:
|
|
1160
|
-
toCoordinateFormat:
|
|
1159
|
+
closeEnough: sr,
|
|
1160
|
+
toCoordinateFormat: or
|
|
1161
1161
|
});
|
|
1162
1162
|
} else
|
|
1163
1163
|
throw new Error("coordinates pattern match failed");
|
|
1164
1164
|
}
|
|
1165
|
-
function
|
|
1165
|
+
function Fe(i) {
|
|
1166
1166
|
if (!isNaN(i[0]))
|
|
1167
1167
|
return !1;
|
|
1168
1168
|
const e = [...i];
|
|
@@ -1181,28 +1181,28 @@ function Ge(i) {
|
|
|
1181
1181
|
}
|
|
1182
1182
|
return !0;
|
|
1183
1183
|
}
|
|
1184
|
-
function
|
|
1184
|
+
function li(i, e) {
|
|
1185
1185
|
const t = Math.abs(i - e);
|
|
1186
1186
|
return Number(t.toFixed(6)) <= 1e-5;
|
|
1187
1187
|
}
|
|
1188
|
-
function
|
|
1188
|
+
function sr(i) {
|
|
1189
1189
|
if (!i)
|
|
1190
1190
|
throw new Error("coords must be provided");
|
|
1191
1191
|
if (i.includes(",")) {
|
|
1192
1192
|
const e = i.split(",");
|
|
1193
1193
|
if (Number(e[0]) == NaN || Number(e[1]) == NaN)
|
|
1194
1194
|
throw new Error("coords are not valid decimals");
|
|
1195
|
-
return
|
|
1195
|
+
return li(this.decimalLatitude, Number(e[0])) && li(this.decimalLongitude, e[1]);
|
|
1196
1196
|
} else
|
|
1197
1197
|
throw new Error("coords being tested must be separated by a comma");
|
|
1198
1198
|
}
|
|
1199
|
-
const
|
|
1199
|
+
const lr = Object.freeze({
|
|
1200
1200
|
DMS: "DMS",
|
|
1201
1201
|
DM: "DM",
|
|
1202
1202
|
DD: "DD"
|
|
1203
1203
|
});
|
|
1204
|
-
At.to =
|
|
1205
|
-
const
|
|
1204
|
+
At.to = lr;
|
|
1205
|
+
const ur = [
|
|
1206
1206
|
{
|
|
1207
1207
|
verbatimCoordinates: "40.123, -74.123",
|
|
1208
1208
|
verbatimLatitude: "40.123",
|
|
@@ -1343,10 +1343,10 @@ const sr = [
|
|
|
1343
1343
|
verbatimLatitude: "40 7 22.8",
|
|
1344
1344
|
verbatimLongitude: "-74 7 22.8"
|
|
1345
1345
|
}
|
|
1346
|
-
],
|
|
1346
|
+
], ar = {
|
|
1347
1347
|
decimalLatitude: 40.123,
|
|
1348
1348
|
decimalLongitude: -74.123
|
|
1349
|
-
},
|
|
1349
|
+
}, cr = [
|
|
1350
1350
|
{
|
|
1351
1351
|
verbatimCoordinates: `50°4'17.698"south, 14°24'2.826"east`,
|
|
1352
1352
|
verbatimLatitude: `50°4'17.698"south`,
|
|
@@ -1431,7 +1431,7 @@ const sr = [
|
|
|
1431
1431
|
decimalLatitude: -18.4,
|
|
1432
1432
|
decimalLongitude: 22.75
|
|
1433
1433
|
}
|
|
1434
|
-
],
|
|
1434
|
+
], fr = [
|
|
1435
1435
|
{
|
|
1436
1436
|
verbatimCoordinates: "10.432342S 10.6345345E",
|
|
1437
1437
|
verbatimLatitude: "10.432342S",
|
|
@@ -1566,22 +1566,22 @@ const sr = [
|
|
|
1566
1566
|
decimalLongitude: 18.33453
|
|
1567
1567
|
}
|
|
1568
1568
|
];
|
|
1569
|
-
function
|
|
1569
|
+
function dr() {
|
|
1570
1570
|
const i = [];
|
|
1571
|
-
return
|
|
1572
|
-
e.decimalLatitude ? i.push(e) : i.push({ ...e, ...
|
|
1573
|
-
}), [...i, ...
|
|
1574
|
-
}
|
|
1575
|
-
const
|
|
1576
|
-
At.formats =
|
|
1577
|
-
const
|
|
1578
|
-
function
|
|
1571
|
+
return ur.forEach((e) => {
|
|
1572
|
+
e.decimalLatitude ? i.push(e) : i.push({ ...e, ...ar });
|
|
1573
|
+
}), [...i, ...cr, ...fr];
|
|
1574
|
+
}
|
|
1575
|
+
const hr = dr();
|
|
1576
|
+
At.formats = hr.map((i) => i.verbatimCoordinates);
|
|
1577
|
+
const gr = At;
|
|
1578
|
+
function ui(i, e, t) {
|
|
1579
1579
|
const n = i.slice();
|
|
1580
1580
|
return n[84] = e[t], n[86] = t, n;
|
|
1581
1581
|
}
|
|
1582
|
-
function
|
|
1582
|
+
function ai(i) {
|
|
1583
1583
|
let e, t;
|
|
1584
|
-
return e = new
|
|
1584
|
+
return e = new Vn({}), {
|
|
1585
1585
|
c() {
|
|
1586
1586
|
Ee(e.$$.fragment);
|
|
1587
1587
|
},
|
|
@@ -1599,16 +1599,16 @@ function ui(i) {
|
|
|
1599
1599
|
}
|
|
1600
1600
|
};
|
|
1601
1601
|
}
|
|
1602
|
-
function
|
|
1602
|
+
function ci(i) {
|
|
1603
1603
|
let e, t, n, r, o;
|
|
1604
|
-
return t = new
|
|
1604
|
+
return t = new $n({}), {
|
|
1605
1605
|
c() {
|
|
1606
1606
|
e = W("button"), Ee(t.$$.fragment), y(e, "type", "button"), y(
|
|
1607
1607
|
e,
|
|
1608
1608
|
"title",
|
|
1609
1609
|
/*reverseButtonTitle*/
|
|
1610
1610
|
i[9]
|
|
1611
|
-
), y(e, "class", "svelte-1uvos7g"),
|
|
1611
|
+
), y(e, "class", "svelte-1uvos7g"), oe(
|
|
1612
1612
|
e,
|
|
1613
1613
|
"active",
|
|
1614
1614
|
/*reverseActive*/
|
|
@@ -1616,7 +1616,7 @@ function ai(i) {
|
|
|
1616
1616
|
);
|
|
1617
1617
|
},
|
|
1618
1618
|
m(l, s) {
|
|
1619
|
-
|
|
1619
|
+
F(l, e, s), ge(t, e, null), n = !0, r || (o = J(
|
|
1620
1620
|
e,
|
|
1621
1621
|
"click",
|
|
1622
1622
|
/*click_handler_2*/
|
|
@@ -1631,7 +1631,7 @@ function ai(i) {
|
|
|
1631
1631
|
/*reverseButtonTitle*/
|
|
1632
1632
|
l[9]
|
|
1633
1633
|
), (!n || s[0] & /*reverseActive*/
|
|
1634
|
-
1) &&
|
|
1634
|
+
1) && oe(
|
|
1635
1635
|
e,
|
|
1636
1636
|
"active",
|
|
1637
1637
|
/*reverseActive*/
|
|
@@ -1649,8 +1649,8 @@ function ai(i) {
|
|
|
1649
1649
|
}
|
|
1650
1650
|
};
|
|
1651
1651
|
}
|
|
1652
|
-
function
|
|
1653
|
-
let e, t = [], n = /* @__PURE__ */ new Map(), r, o, l, s =
|
|
1652
|
+
function mr(i) {
|
|
1653
|
+
let e, t = [], n = /* @__PURE__ */ new Map(), r, o, l, s = $t(
|
|
1654
1654
|
/*listFeatures*/
|
|
1655
1655
|
i[14]
|
|
1656
1656
|
);
|
|
@@ -1661,8 +1661,8 @@ function hr(i) {
|
|
|
1661
1661
|
u[84].address : "")
|
|
1662
1662
|
);
|
|
1663
1663
|
for (let u = 0; u < s.length; u += 1) {
|
|
1664
|
-
let h =
|
|
1665
|
-
n.set(a, t[u] =
|
|
1664
|
+
let h = ui(i, s, u), a = c(h);
|
|
1665
|
+
n.set(a, t[u] = fi(a, h));
|
|
1666
1666
|
}
|
|
1667
1667
|
return {
|
|
1668
1668
|
c() {
|
|
@@ -1672,7 +1672,7 @@ function hr(i) {
|
|
|
1672
1672
|
y(e, "class", "svelte-1uvos7g");
|
|
1673
1673
|
},
|
|
1674
1674
|
m(u, h) {
|
|
1675
|
-
|
|
1675
|
+
F(u, e, h);
|
|
1676
1676
|
for (let a = 0; a < t.length; a += 1)
|
|
1677
1677
|
t[a] && t[a].m(e, null);
|
|
1678
1678
|
r = !0, o || (l = [
|
|
@@ -1692,10 +1692,10 @@ function hr(i) {
|
|
|
1692
1692
|
},
|
|
1693
1693
|
p(u, h) {
|
|
1694
1694
|
h[0] & /*listFeatures, showPlaceType, selectedItemIndex, missingIconsCache, iconsBaseUrl, pick*/
|
|
1695
|
-
17880064 && (s =
|
|
1695
|
+
17880064 && (s = $t(
|
|
1696
1696
|
/*listFeatures*/
|
|
1697
1697
|
u[14]
|
|
1698
|
-
), ot(), t =
|
|
1698
|
+
), ot(), t = Tn(t, h, c, 1, u, s, n, e, Pn, fi, null, ui), st());
|
|
1699
1699
|
},
|
|
1700
1700
|
i(u) {
|
|
1701
1701
|
if (!r) {
|
|
@@ -1717,9 +1717,9 @@ function hr(i) {
|
|
|
1717
1717
|
}
|
|
1718
1718
|
};
|
|
1719
1719
|
}
|
|
1720
|
-
function
|
|
1720
|
+
function yr(i) {
|
|
1721
1721
|
let e, t, n, r, o, l;
|
|
1722
|
-
return t = new
|
|
1722
|
+
return t = new Wi({}), {
|
|
1723
1723
|
c() {
|
|
1724
1724
|
e = W("div"), Ee(t.$$.fragment), n = te(), r = W("div"), o = _e(
|
|
1725
1725
|
/*noResultsMessage*/
|
|
@@ -1727,7 +1727,7 @@ function gr(i) {
|
|
|
1727
1727
|
), y(r, "class", "svelte-1uvos7g"), y(e, "class", "no-results svelte-1uvos7g");
|
|
1728
1728
|
},
|
|
1729
1729
|
m(s, c) {
|
|
1730
|
-
|
|
1730
|
+
F(s, e, c), ge(t, e, null), T(e, n), T(e, r), T(r, o), l = !0;
|
|
1731
1731
|
},
|
|
1732
1732
|
p(s, c) {
|
|
1733
1733
|
(!l || c[0] & /*noResultsMessage*/
|
|
@@ -1748,14 +1748,14 @@ function gr(i) {
|
|
|
1748
1748
|
}
|
|
1749
1749
|
};
|
|
1750
1750
|
}
|
|
1751
|
-
function
|
|
1751
|
+
function pr(i) {
|
|
1752
1752
|
let e = "", t;
|
|
1753
1753
|
return {
|
|
1754
1754
|
c() {
|
|
1755
1755
|
t = _e(e);
|
|
1756
1756
|
},
|
|
1757
1757
|
m(n, r) {
|
|
1758
|
-
|
|
1758
|
+
F(n, t, r);
|
|
1759
1759
|
},
|
|
1760
1760
|
p: A,
|
|
1761
1761
|
i: A,
|
|
@@ -1765,9 +1765,9 @@ function mr(i) {
|
|
|
1765
1765
|
}
|
|
1766
1766
|
};
|
|
1767
1767
|
}
|
|
1768
|
-
function
|
|
1768
|
+
function vr(i) {
|
|
1769
1769
|
let e, t, n, r, o, l, s, c, u, h, a;
|
|
1770
|
-
return t = new
|
|
1770
|
+
return t = new Wi({}), c = new Oi({}), {
|
|
1771
1771
|
c() {
|
|
1772
1772
|
e = W("div"), Ee(t.$$.fragment), n = te(), r = W("div"), o = _e(
|
|
1773
1773
|
/*errorMessage*/
|
|
@@ -1775,7 +1775,7 @@ function yr(i) {
|
|
|
1775
1775
|
), l = te(), s = W("button"), Ee(c.$$.fragment), y(r, "class", "svelte-1uvos7g"), y(s, "class", "svelte-1uvos7g"), y(e, "class", "error svelte-1uvos7g");
|
|
1776
1776
|
},
|
|
1777
1777
|
m(f, d) {
|
|
1778
|
-
|
|
1778
|
+
F(f, e, d), ge(t, e, null), T(e, n), T(e, r), T(r, o), T(e, l), T(e, s), ge(c, s, null), u = !0, h || (a = J(
|
|
1779
1779
|
s,
|
|
1780
1780
|
"click",
|
|
1781
1781
|
/*click_handler_3*/
|
|
@@ -1801,7 +1801,7 @@ function yr(i) {
|
|
|
1801
1801
|
}
|
|
1802
1802
|
};
|
|
1803
1803
|
}
|
|
1804
|
-
function
|
|
1804
|
+
function fi(i, e) {
|
|
1805
1805
|
let t, n, r;
|
|
1806
1806
|
function o() {
|
|
1807
1807
|
return (
|
|
@@ -1821,7 +1821,7 @@ function ci(i, e) {
|
|
|
1821
1821
|
)
|
|
1822
1822
|
);
|
|
1823
1823
|
}
|
|
1824
|
-
return n = new
|
|
1824
|
+
return n = new Qn({
|
|
1825
1825
|
props: {
|
|
1826
1826
|
feature: (
|
|
1827
1827
|
/*feature*/
|
|
@@ -1849,10 +1849,10 @@ function ci(i, e) {
|
|
|
1849
1849
|
key: i,
|
|
1850
1850
|
first: null,
|
|
1851
1851
|
c() {
|
|
1852
|
-
t =
|
|
1852
|
+
t = wn(), Ee(n.$$.fragment), this.first = t;
|
|
1853
1853
|
},
|
|
1854
1854
|
m(s, c) {
|
|
1855
|
-
|
|
1855
|
+
F(s, t, c), ge(n, s, c), r = !0;
|
|
1856
1856
|
},
|
|
1857
1857
|
p(s, c) {
|
|
1858
1858
|
e = s;
|
|
@@ -1879,28 +1879,28 @@ function ci(i, e) {
|
|
|
1879
1879
|
}
|
|
1880
1880
|
};
|
|
1881
1881
|
}
|
|
1882
|
-
function
|
|
1883
|
-
let e, t, n, r, o, l, s, c, u, h, a, f, d, m,
|
|
1884
|
-
o = new
|
|
1882
|
+
function br(i) {
|
|
1883
|
+
let e, t, n, r, o, l, s, c, u, h, a, f, d, m, v, b, p, _, E, S, k, x = !1;
|
|
1884
|
+
o = new tr({}), a = new Oi({});
|
|
1885
1885
|
let L = (
|
|
1886
1886
|
/*abortController*/
|
|
1887
|
-
i[19] &&
|
|
1887
|
+
i[19] && ai()
|
|
1888
1888
|
), w = (
|
|
1889
1889
|
/*enableReverse*/
|
|
1890
|
-
i[5] === !0 &&
|
|
1890
|
+
i[5] === !0 && ci(i)
|
|
1891
1891
|
);
|
|
1892
|
-
const
|
|
1892
|
+
const C = (
|
|
1893
1893
|
/*#slots*/
|
|
1894
1894
|
i[61].default
|
|
1895
|
-
), I =
|
|
1896
|
-
|
|
1895
|
+
), I = yn(
|
|
1896
|
+
C,
|
|
1897
1897
|
i,
|
|
1898
1898
|
/*$$scope*/
|
|
1899
1899
|
i[60],
|
|
1900
1900
|
null
|
|
1901
|
-
), D = [
|
|
1901
|
+
), D = [vr, pr, yr, mr], G = [];
|
|
1902
1902
|
function O(M, z) {
|
|
1903
|
-
var $,
|
|
1903
|
+
var $, se;
|
|
1904
1904
|
return (
|
|
1905
1905
|
/*error*/
|
|
1906
1906
|
M[18] ? 0 : (
|
|
@@ -1910,15 +1910,15 @@ function pr(i) {
|
|
|
1910
1910
|
(($ = M[14]) == null ? void 0 : $.length) === 0 ? 2 : (
|
|
1911
1911
|
/*focusedDelayed*/
|
|
1912
1912
|
M[16] && /*listFeatures*/
|
|
1913
|
-
((
|
|
1913
|
+
((se = M[14]) != null && se.length) ? 3 : -1
|
|
1914
1914
|
)
|
|
1915
1915
|
) : 1
|
|
1916
1916
|
)
|
|
1917
1917
|
);
|
|
1918
1918
|
}
|
|
1919
|
-
return ~(
|
|
1919
|
+
return ~(b = O(i)) && (p = G[b] = D[b](i)), {
|
|
1920
1920
|
c() {
|
|
1921
|
-
e = te(), t = W("form"), n = W("div"), r = W("button"), Ee(o.$$.fragment), l = te(), s = W("input"), c = te(), u = W("div"), h = W("button"), Ee(a.$$.fragment), f = te(), L && L.c(), d = te(), w && w.c(), m = te(), I && I.c(),
|
|
1921
|
+
e = te(), t = W("form"), n = W("div"), r = W("button"), Ee(o.$$.fragment), l = te(), s = W("input"), c = te(), u = W("div"), h = W("button"), Ee(a.$$.fragment), f = te(), L && L.c(), d = te(), w && w.c(), m = te(), I && I.c(), v = te(), p && p.c(), y(r, "class", "search-button svelte-1uvos7g"), y(r, "type", "button"), y(
|
|
1922
1922
|
s,
|
|
1923
1923
|
"placeholder",
|
|
1924
1924
|
/*placeholder*/
|
|
@@ -1933,15 +1933,15 @@ function pr(i) {
|
|
|
1933
1933
|
"title",
|
|
1934
1934
|
/*clearButtonTitle*/
|
|
1935
1935
|
i[3]
|
|
1936
|
-
), y(h, "class", "svelte-1uvos7g"), y(u, "class", "clear-button-container svelte-1uvos7g"),
|
|
1936
|
+
), y(h, "class", "svelte-1uvos7g"), y(u, "class", "clear-button-container svelte-1uvos7g"), oe(
|
|
1937
1937
|
u,
|
|
1938
1938
|
"displayable",
|
|
1939
1939
|
/*searchValue*/
|
|
1940
1940
|
i[1] !== ""
|
|
1941
|
-
), y(n, "class", "input-group svelte-1uvos7g"), y(t, "tabindex", "0"), y(t, "class",
|
|
1941
|
+
), y(n, "class", "input-group svelte-1uvos7g"), y(t, "tabindex", "0"), y(t, "class", _ = Yt(
|
|
1942
1942
|
/*className*/
|
|
1943
1943
|
i[2]
|
|
1944
|
-
) + " svelte-1uvos7g"),
|
|
1944
|
+
) + " svelte-1uvos7g"), oe(
|
|
1945
1945
|
t,
|
|
1946
1946
|
"can-collapse",
|
|
1947
1947
|
/*collapsed*/
|
|
@@ -1950,11 +1950,11 @@ function pr(i) {
|
|
|
1950
1950
|
);
|
|
1951
1951
|
},
|
|
1952
1952
|
m(M, z) {
|
|
1953
|
-
|
|
1953
|
+
F(M, e, z), F(M, t, z), T(t, n), T(n, r), ge(o, r, null), T(n, l), T(n, s), i[63](s), Xt(
|
|
1954
1954
|
s,
|
|
1955
1955
|
/*searchValue*/
|
|
1956
1956
|
i[1]
|
|
1957
|
-
), T(n, c), T(n, u), T(u, h), ge(a, h, null), T(u, f), L && L.m(u, null), T(n, d), w && w.m(n, null), T(n, m), I && I.m(n, null), T(t,
|
|
1957
|
+
), T(n, c), T(n, u), T(u, h), ge(a, h, null), T(u, f), L && L.m(u, null), T(n, d), w && w.m(n, null), T(n, m), I && I.m(n, null), T(t, v), ~b && G[b].m(t, null), E = !0, S || (k = [
|
|
1958
1958
|
J(
|
|
1959
1959
|
r,
|
|
1960
1960
|
"click",
|
|
@@ -1997,11 +1997,11 @@ function pr(i) {
|
|
|
1997
1997
|
/*click_handler_1*/
|
|
1998
1998
|
i[68]
|
|
1999
1999
|
),
|
|
2000
|
-
J(t, "submit",
|
|
2000
|
+
J(t, "submit", _n(
|
|
2001
2001
|
/*handleOnSubmit*/
|
|
2002
2002
|
i[21]
|
|
2003
2003
|
))
|
|
2004
|
-
],
|
|
2004
|
+
], S = !0);
|
|
2005
2005
|
},
|
|
2006
2006
|
p(M, z) {
|
|
2007
2007
|
(!E || z[0] & /*placeholder*/
|
|
@@ -2018,7 +2018,7 @@ function pr(i) {
|
|
|
2018
2018
|
M[8]
|
|
2019
2019
|
), z[0] & /*searchValue*/
|
|
2020
2020
|
2 && s.value !== /*searchValue*/
|
|
2021
|
-
M[1] &&
|
|
2021
|
+
M[1] && Xt(
|
|
2022
2022
|
s,
|
|
2023
2023
|
/*searchValue*/
|
|
2024
2024
|
M[1]
|
|
@@ -2030,46 +2030,46 @@ function pr(i) {
|
|
|
2030
2030
|
M[3]
|
|
2031
2031
|
), /*abortController*/
|
|
2032
2032
|
M[19] ? L ? z[0] & /*abortController*/
|
|
2033
|
-
524288 && Z(L, 1) : (L =
|
|
2033
|
+
524288 && Z(L, 1) : (L = ai(), L.c(), Z(L, 1), L.m(u, null)) : L && (ot(), V(L, 1, 1, () => {
|
|
2034
2034
|
L = null;
|
|
2035
2035
|
}), st()), (!E || z[0] & /*searchValue*/
|
|
2036
|
-
2) &&
|
|
2036
|
+
2) && oe(
|
|
2037
2037
|
u,
|
|
2038
2038
|
"displayable",
|
|
2039
2039
|
/*searchValue*/
|
|
2040
2040
|
M[1] !== ""
|
|
2041
2041
|
), /*enableReverse*/
|
|
2042
2042
|
M[5] === !0 ? w ? (w.p(M, z), z[0] & /*enableReverse*/
|
|
2043
|
-
32 && Z(w, 1)) : (w =
|
|
2043
|
+
32 && Z(w, 1)) : (w = ci(M), w.c(), Z(w, 1), w.m(n, m)) : w && (ot(), V(w, 1, 1, () => {
|
|
2044
2044
|
w = null;
|
|
2045
2045
|
}), st()), I && I.p && (!E || z[1] & /*$$scope*/
|
|
2046
|
-
536870912) &&
|
|
2046
|
+
536870912) && vn(
|
|
2047
2047
|
I,
|
|
2048
|
-
|
|
2048
|
+
C,
|
|
2049
2049
|
M,
|
|
2050
2050
|
/*$$scope*/
|
|
2051
2051
|
M[60],
|
|
2052
|
-
E ?
|
|
2053
|
-
|
|
2052
|
+
E ? pn(
|
|
2053
|
+
C,
|
|
2054
2054
|
/*$$scope*/
|
|
2055
2055
|
M[60],
|
|
2056
2056
|
z,
|
|
2057
2057
|
null
|
|
2058
|
-
) :
|
|
2058
|
+
) : bn(
|
|
2059
2059
|
/*$$scope*/
|
|
2060
2060
|
M[60]
|
|
2061
2061
|
),
|
|
2062
2062
|
null
|
|
2063
2063
|
);
|
|
2064
|
-
let $ =
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
}), st()), ~
|
|
2068
|
-
4 &&
|
|
2064
|
+
let $ = b;
|
|
2065
|
+
b = O(M), b === $ ? ~b && G[b].p(M, z) : (p && (ot(), V(G[$], 1, 1, () => {
|
|
2066
|
+
G[$] = null;
|
|
2067
|
+
}), st()), ~b ? (p = G[b], p ? p.p(M, z) : (p = G[b] = D[b](M), p.c()), Z(p, 1), p.m(t, null)) : p = null), (!E || z[0] & /*className*/
|
|
2068
|
+
4 && _ !== (_ = Yt(
|
|
2069
2069
|
/*className*/
|
|
2070
2070
|
M[2]
|
|
2071
|
-
) + " svelte-1uvos7g")) && y(t, "class",
|
|
2072
|
-
22) &&
|
|
2071
|
+
) + " svelte-1uvos7g")) && y(t, "class", _), (!E || z[0] & /*className, collapsed, searchValue*/
|
|
2072
|
+
22) && oe(
|
|
2073
2073
|
t,
|
|
2074
2074
|
"can-collapse",
|
|
2075
2075
|
/*collapsed*/
|
|
@@ -2078,17 +2078,17 @@ function pr(i) {
|
|
|
2078
2078
|
);
|
|
2079
2079
|
},
|
|
2080
2080
|
i(M) {
|
|
2081
|
-
E || (Z(x), Z(o.$$.fragment, M), Z(a.$$.fragment, M), Z(L), Z(w), Z(I, M), Z(
|
|
2081
|
+
E || (Z(x), Z(o.$$.fragment, M), Z(a.$$.fragment, M), Z(L), Z(w), Z(I, M), Z(p), E = !0);
|
|
2082
2082
|
},
|
|
2083
2083
|
o(M) {
|
|
2084
|
-
V(x), V(o.$$.fragment, M), V(a.$$.fragment, M), V(L), V(w), V(I, M), V(
|
|
2084
|
+
V(x), V(o.$$.fragment, M), V(a.$$.fragment, M), V(L), V(w), V(I, M), V(p), E = !1;
|
|
2085
2085
|
},
|
|
2086
2086
|
d(M) {
|
|
2087
|
-
M && (B(e), B(t)), me(o), i[63](null), me(a), L && L.d(), w && w.d(), I && I.d(M), ~
|
|
2087
|
+
M && (B(e), B(t)), me(o), i[63](null), me(a), L && L.d(), w && w.d(), I && I.d(M), ~b && G[b].d(), S = !1, ye(k);
|
|
2088
2088
|
}
|
|
2089
2089
|
};
|
|
2090
2090
|
}
|
|
2091
|
-
function
|
|
2091
|
+
function wr(i, e, t) {
|
|
2092
2092
|
let n, { $$slots: r = {}, $$scope: o } = e;
|
|
2093
2093
|
const l = {
|
|
2094
2094
|
continental_marine: 4,
|
|
@@ -2114,69 +2114,69 @@ function vr(i, e, t) {
|
|
|
2114
2114
|
"poi.restaurant": 18,
|
|
2115
2115
|
"poi.aerodrome": 13
|
|
2116
2116
|
};
|
|
2117
|
-
let { class: s = void 0 } = e, { apiKey: c } = e, { bbox: u = void 0 } = e, { clearButtonTitle: h = "clear" } = e, { clearOnBlur: a = !1 } = e, { collapsed: f = !1 } = e, { country: d = void 0 } = e, { debounceSearch: m = 200 } = e, { enableReverse:
|
|
2117
|
+
let { class: s = void 0 } = e, { apiKey: c } = e, { bbox: u = void 0 } = e, { clearButtonTitle: h = "clear" } = e, { clearOnBlur: a = !1 } = e, { collapsed: f = !1 } = e, { country: d = void 0 } = e, { debounceSearch: m = 200 } = e, { enableReverse: v = !1 } = e, { errorMessage: b = "Something went wrong…" } = e, { filter: p = () => !0 } = e, { flyTo: _ = !0 } = e, { fuzzyMatch: E = !0 } = e, { language: S = void 0 } = e, { limit: k = void 0 } = e, { mapController: x = void 0 } = e, { minLength: L = 2 } = e, { noResultsMessage: w = "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: C = "Search" } = e, { proximity: I = [{ type: "server-geolocation" }] } = e, { reverseActive: D = v === "always" } = e, { reverseButtonTitle: G = "toggle reverse geocoding" } = e, { searchValue: O = "" } = e, { showFullGeometry: M = !0 } = e, { showPlaceType: z = "ifNeeded" } = e, { showResultsWhileTyping: $ = !0 } = e, { selectFirst: se = !0 } = e, { flyToSelected: ct = !1 } = e, { markerOnSelected: Xe = !0 } = e, { types: Ce = void 0 } = e, { exhaustiveReverseGeocoding: ft = !1 } = e, { excludeTypes: Ke = !1 } = e, { zoom: Te = l } = e, { maxZoom: Je = void 0 } = e, { apiUrl: dt = "https://api.maptiler.com/geocoding" } = e, { fetchParameters: ht = {} } = e, { iconsBaseUrl: zt = "https://cdn.maptiler.com/maptiler-geocoding-control/v2.0.0/icons/" } = e, { adjustUrlQuery: gt = () => {
|
|
2118
2118
|
} } = e;
|
|
2119
|
-
function
|
|
2120
|
-
|
|
2119
|
+
function Zi() {
|
|
2120
|
+
ce.focus();
|
|
2121
2121
|
}
|
|
2122
|
-
function
|
|
2123
|
-
|
|
2122
|
+
function qi() {
|
|
2123
|
+
ce.blur();
|
|
2124
2124
|
}
|
|
2125
|
-
function
|
|
2126
|
-
t(1, O = g), j ? (t(15, U = -1),
|
|
2127
|
-
|
|
2125
|
+
function jt(g, j = !0, H = !1) {
|
|
2126
|
+
t(1, O = g), j ? (t(15, U = -1), qt()) : (vt(!H, H), setTimeout(() => {
|
|
2127
|
+
ce.focus(), ce.select();
|
|
2128
2128
|
}));
|
|
2129
2129
|
}
|
|
2130
|
-
function
|
|
2130
|
+
function Qi() {
|
|
2131
2131
|
t(14, R = void 0), t(57, N = void 0), t(15, U = -1);
|
|
2132
2132
|
}
|
|
2133
|
-
function
|
|
2133
|
+
function Hi() {
|
|
2134
2134
|
t(56, q = []), t(57, N = void 0);
|
|
2135
2135
|
}
|
|
2136
|
-
let Re = !1, R, q, N,
|
|
2137
|
-
const
|
|
2138
|
-
|
|
2136
|
+
let Re = !1, R, q, N, Zt = "", ce, U = -1, fe, $e = [], ke, Ie, et, mt;
|
|
2137
|
+
const Vi = /* @__PURE__ */ new Set(), pe = xn();
|
|
2138
|
+
Sn(() => {
|
|
2139
2139
|
x && (x.setEventHandler(void 0), x.indicateReverse(!1), x.setSelectedMarker(-1), x.setMarkers(void 0, void 0));
|
|
2140
2140
|
});
|
|
2141
|
-
function
|
|
2141
|
+
function qt(g) {
|
|
2142
2142
|
if (Ie && (clearTimeout(Ie), Ie = void 0), U > -1 && R)
|
|
2143
|
-
t(57, N = R[U]), t(1, O = N.place_type[0] === "reverse" ? N.place_name : N.place_name.replace(/,.*/, "")), t(18,
|
|
2143
|
+
t(57, N = R[U]), t(1, O = N.place_type[0] === "reverse" ? N.place_name : N.place_name.replace(/,.*/, "")), t(18, fe = void 0), t(56, q = void 0), t(15, U = -1);
|
|
2144
2144
|
else if (O) {
|
|
2145
2145
|
const j = g || !yt(O);
|
|
2146
2146
|
pt(O, { exact: !0 }).then(() => {
|
|
2147
|
-
t(56, q = R), t(57, N = void 0), j &&
|
|
2148
|
-
}).catch((H) => t(18,
|
|
2147
|
+
t(56, q = R), t(57, N = void 0), j && Yi();
|
|
2148
|
+
}).catch((H) => t(18, fe = H));
|
|
2149
2149
|
}
|
|
2150
2150
|
}
|
|
2151
2151
|
function yt(g) {
|
|
2152
2152
|
try {
|
|
2153
|
-
return
|
|
2153
|
+
return gr(g, 6);
|
|
2154
2154
|
} catch {
|
|
2155
2155
|
return !1;
|
|
2156
2156
|
}
|
|
2157
2157
|
}
|
|
2158
2158
|
async function pt(g, { byId: j = !1, exact: H = !1 } = {}) {
|
|
2159
|
-
t(18,
|
|
2159
|
+
t(18, fe = void 0), ke == null || ke.abort();
|
|
2160
2160
|
const ee = new AbortController();
|
|
2161
2161
|
t(19, ke = ee);
|
|
2162
2162
|
try {
|
|
2163
2163
|
const P = yt(g), Q = new URLSearchParams();
|
|
2164
|
-
if (
|
|
2165
|
-
const tt = await
|
|
2164
|
+
if (S !== void 0 && Q.set("language", Array.isArray(S) ? S.join(",") : S ?? ""), Ce && Q.set("types", Ce.join(",")), Ke && Q.set("excludeTypes", String(Ke)), u && Q.set("bbox", u.map((tt) => tt.toFixed(6)).join(",")), d && Q.set("country", Array.isArray(d) ? d.join(",") : d), !j && !P) {
|
|
2165
|
+
const tt = await nr(x, I, ee);
|
|
2166
2166
|
tt && Q.set("proximity", tt), (H || !$) && Q.set("autocomplete", "false"), Q.set("fuzzyMatch", String(E));
|
|
2167
2167
|
}
|
|
2168
|
-
|
|
2169
|
-
const
|
|
2170
|
-
if (
|
|
2168
|
+
k !== void 0 && (ft || !P || (Ce == null ? void 0 : Ce.length) === 1) && Q.set("limit", String(k)), Q.set("key", c), gt(Q);
|
|
2169
|
+
const de = dt + "/" + encodeURIComponent(P ? P.decimalLongitude + "," + P.decimalLatitude : g) + ".json?" + Q.toString();
|
|
2170
|
+
if (de === Zt) {
|
|
2171
2171
|
j ? (t(14, R = void 0), t(57, N = $e[0])) : t(14, R = $e);
|
|
2172
2172
|
return;
|
|
2173
2173
|
}
|
|
2174
|
-
|
|
2175
|
-
const wt = await fetch(
|
|
2174
|
+
Zt = de;
|
|
2175
|
+
const wt = await fetch(de, { signal: ee.signal, ...ht });
|
|
2176
2176
|
if (!wt.ok)
|
|
2177
2177
|
throw new Error(await wt.text());
|
|
2178
2178
|
const _t = await wt.json();
|
|
2179
|
-
pe("response", { url:
|
|
2179
|
+
pe("response", { url: de, featureCollection: _t }), j ? (t(14, R = void 0), t(57, N = _t.features[0]), $e = [N]) : (t(14, R = _t.features.filter(p)), P && R.unshift({
|
|
2180
2180
|
type: "Feature",
|
|
2181
2181
|
properties: {},
|
|
2182
2182
|
id: "reverse_" + P.decimalLongitude + "_" + P.decimalLatitude,
|
|
@@ -2194,7 +2194,7 @@ function vr(i, e, t) {
|
|
|
2194
2194
|
type: "Point",
|
|
2195
2195
|
coordinates: [P.decimalLongitude, P.decimalLatitude]
|
|
2196
2196
|
}
|
|
2197
|
-
}), $e = R, P &&
|
|
2197
|
+
}), $e = R, P && ce.focus());
|
|
2198
2198
|
} catch (P) {
|
|
2199
2199
|
if (P && typeof P == "object" && "name" in P && P.name === "AbortError")
|
|
2200
2200
|
return;
|
|
@@ -2203,17 +2203,17 @@ function vr(i, e, t) {
|
|
|
2203
2203
|
ee === ke && t(19, ke = void 0);
|
|
2204
2204
|
}
|
|
2205
2205
|
}
|
|
2206
|
-
function
|
|
2206
|
+
function Yi() {
|
|
2207
2207
|
var ee;
|
|
2208
|
-
if (!(q != null && q.length) || !
|
|
2208
|
+
if (!(q != null && q.length) || !_)
|
|
2209
2209
|
return;
|
|
2210
2210
|
const g = [180, 90, -180, -90], j = !q.some((P) => !P.matching_text);
|
|
2211
2211
|
let H;
|
|
2212
2212
|
for (const P of q) {
|
|
2213
2213
|
const Q = De(P);
|
|
2214
2214
|
if (H = Je ?? (H === void 0 ? Q : Q === void 0 ? H : Math.max(H, Q)), j || !P.matching_text)
|
|
2215
|
-
for (const
|
|
2216
|
-
g[
|
|
2215
|
+
for (const de of [0, 1, 2, 3])
|
|
2216
|
+
g[de] = Math[de < 2 ? "min" : "max"](g[de], ((ee = P.bbox) == null ? void 0 : ee[de]) ?? P.center[de % 2]);
|
|
2217
2217
|
}
|
|
2218
2218
|
x && q.length > 0 && (N && g[0] === g[2] && g[1] === g[3] ? x.flyTo(N.center, De(N)) : x.fitBounds(qe(g), 50, H));
|
|
2219
2219
|
}
|
|
@@ -2232,60 +2232,60 @@ function vr(i, e, t) {
|
|
|
2232
2232
|
void 0
|
|
2233
2233
|
) : void 0) ?? Te[j];
|
|
2234
2234
|
}
|
|
2235
|
-
function
|
|
2236
|
-
t(0, D =
|
|
2235
|
+
function Xi(g) {
|
|
2236
|
+
t(0, D = v === "always"), t(14, R = void 0), t(57, N = void 0), t(15, U = -1), jt(g[1].toFixed(6) + ", " + ir(g[0], [-180, 180], !0).toFixed(6), !1, !0);
|
|
2237
2237
|
}
|
|
2238
|
-
function
|
|
2238
|
+
function Ki(g) {
|
|
2239
2239
|
if (!R)
|
|
2240
2240
|
return;
|
|
2241
2241
|
let j = g.key === "ArrowDown" ? 1 : g.key === "ArrowUp" ? -1 : 0;
|
|
2242
|
-
j && (U === (
|
|
2242
|
+
j && (U === (se ? 0 : -1) && j === -1 && t(15, U = R.length), t(15, U += j), U >= R.length && t(15, U = -1), U < 0 && se && t(15, U = 0), g.preventDefault());
|
|
2243
2243
|
}
|
|
2244
2244
|
function vt(g = !0, j = !1) {
|
|
2245
|
-
if (t(18,
|
|
2245
|
+
if (t(18, fe = void 0), $ || j) {
|
|
2246
2246
|
if (Ie && clearTimeout(Ie), O.length < L)
|
|
2247
2247
|
return;
|
|
2248
2248
|
const H = O;
|
|
2249
2249
|
Ie = window.setTimeout(
|
|
2250
2250
|
() => {
|
|
2251
|
-
pt(H).catch((ee) => t(18,
|
|
2251
|
+
pt(H).catch((ee) => t(18, fe = ee));
|
|
2252
2252
|
},
|
|
2253
2253
|
g ? m : 0
|
|
2254
2254
|
);
|
|
2255
2255
|
} else
|
|
2256
|
-
t(14, R = void 0), t(18,
|
|
2256
|
+
t(14, R = void 0), t(18, fe = void 0);
|
|
2257
2257
|
}
|
|
2258
2258
|
function bt(g) {
|
|
2259
2259
|
t(57, N = g), t(1, O = g.place_name), t(15, U = -1);
|
|
2260
2260
|
}
|
|
2261
|
-
const
|
|
2262
|
-
function
|
|
2261
|
+
const Ji = () => ce.focus();
|
|
2262
|
+
function $i(g) {
|
|
2263
2263
|
Ct[g ? "unshift" : "push"](() => {
|
|
2264
|
-
|
|
2264
|
+
ce = g, t(17, ce);
|
|
2265
2265
|
});
|
|
2266
2266
|
}
|
|
2267
|
-
function
|
|
2267
|
+
function en() {
|
|
2268
2268
|
O = this.value, t(1, O), t(13, Re), t(28, a);
|
|
2269
2269
|
}
|
|
2270
|
-
const
|
|
2271
|
-
t(1, O = ""),
|
|
2272
|
-
},
|
|
2273
|
-
|
|
2274
|
-
},
|
|
2270
|
+
const tn = () => t(13, Re = !0), nn = () => t(13, Re = !1), rn = () => vt(), on = () => {
|
|
2271
|
+
t(1, O = ""), ce.focus();
|
|
2272
|
+
}, sn = () => t(0, D = !D), ln = () => t(18, fe = void 0), un = (g) => t(15, U = g), an = (g) => bt(g), cn = () => {
|
|
2273
|
+
se || t(15, U = -1);
|
|
2274
|
+
}, fn = () => {
|
|
2275
2275
|
};
|
|
2276
2276
|
return i.$$set = (g) => {
|
|
2277
|
-
"class" in g && t(2, s = g.class), "apiKey" in g && t(26, c = g.apiKey), "bbox" in g && t(27, u = g.bbox), "clearButtonTitle" in g && t(3, h = g.clearButtonTitle), "clearOnBlur" in g && t(28, a = g.clearOnBlur), "collapsed" in g && t(4, f = g.collapsed), "country" in g && t(29, d = g.country), "debounceSearch" in g && t(30, m = g.debounceSearch), "enableReverse" in g && t(5,
|
|
2277
|
+
"class" in g && t(2, s = g.class), "apiKey" in g && t(26, c = g.apiKey), "bbox" in g && t(27, u = g.bbox), "clearButtonTitle" in g && t(3, h = g.clearButtonTitle), "clearOnBlur" in g && t(28, a = g.clearOnBlur), "collapsed" in g && t(4, f = g.collapsed), "country" in g && t(29, d = g.country), "debounceSearch" in g && t(30, m = g.debounceSearch), "enableReverse" in g && t(5, v = g.enableReverse), "errorMessage" in g && t(6, b = g.errorMessage), "filter" in g && t(31, p = g.filter), "flyTo" in g && t(32, _ = g.flyTo), "fuzzyMatch" in g && t(33, E = g.fuzzyMatch), "language" in g && t(34, S = g.language), "limit" in g && t(35, k = g.limit), "mapController" in g && t(36, x = g.mapController), "minLength" in g && t(37, L = g.minLength), "noResultsMessage" in g && t(7, w = g.noResultsMessage), "placeholder" in g && t(8, C = g.placeholder), "proximity" in g && t(38, I = g.proximity), "reverseActive" in g && t(0, D = g.reverseActive), "reverseButtonTitle" in g && t(9, G = g.reverseButtonTitle), "searchValue" in g && t(1, O = g.searchValue), "showFullGeometry" in g && t(39, M = g.showFullGeometry), "showPlaceType" in g && t(10, z = g.showPlaceType), "showResultsWhileTyping" in g && t(40, $ = g.showResultsWhileTyping), "selectFirst" in g && t(11, se = g.selectFirst), "flyToSelected" in g && t(41, ct = g.flyToSelected), "markerOnSelected" in g && t(42, Xe = g.markerOnSelected), "types" in g && t(43, Ce = g.types), "exhaustiveReverseGeocoding" in g && t(44, ft = g.exhaustiveReverseGeocoding), "excludeTypes" in g && t(45, Ke = g.excludeTypes), "zoom" in g && t(46, Te = g.zoom), "maxZoom" in g && t(47, Je = g.maxZoom), "apiUrl" in g && t(48, dt = g.apiUrl), "fetchParameters" in g && t(49, ht = g.fetchParameters), "iconsBaseUrl" in g && t(12, zt = g.iconsBaseUrl), "adjustUrlQuery" in g && t(50, gt = g.adjustUrlQuery), "$$scope" in g && t(60, o = g.$$scope);
|
|
2278
2278
|
}, i.$$.update = () => {
|
|
2279
2279
|
if (i.$$.dirty[0] & /*enableReverse*/
|
|
2280
|
-
32 && t(0, D =
|
|
2280
|
+
32 && t(0, D = v === "always"), i.$$.dirty[0] & /*focused, clearOnBlur*/
|
|
2281
2281
|
268443648 && setTimeout(() => {
|
|
2282
2282
|
t(16, et = Re), a && !Re && t(1, O = "");
|
|
2283
2283
|
}), i.$$.dirty[0] & /*searchValue, listFeatures*/
|
|
2284
2284
|
16386 | i.$$.dirty[1] & /*minLength*/
|
|
2285
|
-
64 && O.length < L && (t(57, N = void 0), t(14, R = void 0), t(18,
|
|
2286
|
-
67109120 && M && N && !N.address && N.geometry.type === "Point" && N.place_type[0] !== "reverse" && pt(N.id, { byId: !0 }).catch((g) => t(18,
|
|
2287
|
-
201326626 && (x && N && N.id !== mt &&
|
|
2288
|
-
18432 &&
|
|
2285
|
+
64 && O.length < L && (t(57, N = void 0), t(14, R = void 0), t(18, fe = void 0), t(56, q = R)), i.$$.dirty[1] & /*showFullGeometry, picked*/
|
|
2286
|
+
67109120 && M && N && !N.address && N.geometry.type === "Point" && N.place_type[0] !== "reverse" && pt(N.id, { byId: !0 }).catch((g) => t(18, fe = g)), i.$$.dirty[1] & /*mapController, picked, prevIdToFly, flyTo*/
|
|
2287
|
+
201326626 && (x && N && N.id !== mt && _ && (!N.bbox || N.bbox[0] === N.bbox[2] && N.bbox[1] === N.bbox[3] ? x.flyTo(N.center, De(N)) : x.fitBounds(qe(N.bbox), 50, De(N)), t(14, R = void 0), t(56, q = void 0), t(15, U = -1)), t(58, mt = N == null ? void 0 : N.id)), i.$$.dirty[0] & /*selectFirst, listFeatures*/
|
|
2288
|
+
18432 && se && R != null && R.length && t(15, U = 0), i.$$.dirty[0] & /*searchValue*/
|
|
2289
2289
|
2 && t(15, U = -1), i.$$.dirty[0] & /*listFeatures*/
|
|
2290
2290
|
16384 | i.$$.dirty[1] & /*markedFeatures*/
|
|
2291
2291
|
33554432 && q !== R && t(56, q = void 0), i.$$.dirty[0] & /*reverseActive, listFeatures, focusedDelayed*/
|
|
@@ -2293,7 +2293,7 @@ function vr(i, e, t) {
|
|
|
2293
2293
|
33554464 && x && x.setEventHandler((g) => {
|
|
2294
2294
|
switch (g.type) {
|
|
2295
2295
|
case "mapClick":
|
|
2296
|
-
D &&
|
|
2296
|
+
D && Xi(g.coordinates);
|
|
2297
2297
|
break;
|
|
2298
2298
|
case "markerClick":
|
|
2299
2299
|
{
|
|
@@ -2310,7 +2310,7 @@ function vr(i, e, t) {
|
|
|
2310
2310
|
}
|
|
2311
2311
|
}), i.$$.dirty[0] & /*listFeatures, selectedItemIndex*/
|
|
2312
2312
|
49152 && t(59, n = R == null ? void 0 : R[U]), i.$$.dirty[1] & /*mapController, selected, flyTo, flyToSelected*/
|
|
2313
|
-
268436514 && x && n &&
|
|
2313
|
+
268436514 && x && n && _ && ct && x.flyTo(n.center, De(n)), i.$$.dirty[1] & /*markerOnSelected, mapController*/
|
|
2314
2314
|
2080 && (Xe || x == null || x.setMarkers(void 0, void 0)), i.$$.dirty[1] & /*mapController, markerOnSelected, markedFeatures, selected*/
|
|
2315
2315
|
301991968 && x && Xe && !q && (x.setMarkers(n ? [n] : void 0, void 0), x.setSelectedMarker(n ? 0 : -1)), i.$$.dirty[1] & /*mapController, markedFeatures, picked*/
|
|
2316
2316
|
100663328 && x && x.setMarkers(q, N), i.$$.dirty[0] & /*selectedItemIndex*/
|
|
@@ -2337,24 +2337,24 @@ function vr(i, e, t) {
|
|
|
2337
2337
|
s,
|
|
2338
2338
|
h,
|
|
2339
2339
|
f,
|
|
2340
|
-
p,
|
|
2341
2340
|
v,
|
|
2341
|
+
b,
|
|
2342
2342
|
w,
|
|
2343
|
-
|
|
2344
|
-
|
|
2343
|
+
C,
|
|
2344
|
+
G,
|
|
2345
2345
|
z,
|
|
2346
|
-
|
|
2347
|
-
|
|
2346
|
+
se,
|
|
2347
|
+
zt,
|
|
2348
2348
|
Re,
|
|
2349
2349
|
R,
|
|
2350
2350
|
U,
|
|
2351
2351
|
et,
|
|
2352
|
-
ae,
|
|
2353
2352
|
ce,
|
|
2353
|
+
fe,
|
|
2354
2354
|
ke,
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2355
|
+
Vi,
|
|
2356
|
+
qt,
|
|
2357
|
+
Ki,
|
|
2358
2358
|
vt,
|
|
2359
2359
|
bt,
|
|
2360
2360
|
l,
|
|
@@ -2363,11 +2363,11 @@ function vr(i, e, t) {
|
|
|
2363
2363
|
a,
|
|
2364
2364
|
d,
|
|
2365
2365
|
m,
|
|
2366
|
-
|
|
2367
|
-
S,
|
|
2368
|
-
E,
|
|
2366
|
+
p,
|
|
2369
2367
|
_,
|
|
2370
|
-
|
|
2368
|
+
E,
|
|
2369
|
+
S,
|
|
2370
|
+
k,
|
|
2371
2371
|
x,
|
|
2372
2372
|
L,
|
|
2373
2373
|
I,
|
|
@@ -2383,19 +2383,17 @@ function vr(i, e, t) {
|
|
|
2383
2383
|
dt,
|
|
2384
2384
|
ht,
|
|
2385
2385
|
gt,
|
|
2386
|
-
zi,
|
|
2387
|
-
ji,
|
|
2388
|
-
zt,
|
|
2389
2386
|
Zi,
|
|
2390
2387
|
qi,
|
|
2388
|
+
jt,
|
|
2389
|
+
Qi,
|
|
2390
|
+
Hi,
|
|
2391
2391
|
q,
|
|
2392
2392
|
N,
|
|
2393
2393
|
mt,
|
|
2394
2394
|
n,
|
|
2395
2395
|
o,
|
|
2396
2396
|
r,
|
|
2397
|
-
Xi,
|
|
2398
|
-
Ki,
|
|
2399
2397
|
Ji,
|
|
2400
2398
|
$i,
|
|
2401
2399
|
en,
|
|
@@ -2406,16 +2404,18 @@ function vr(i, e, t) {
|
|
|
2406
2404
|
sn,
|
|
2407
2405
|
ln,
|
|
2408
2406
|
un,
|
|
2409
|
-
an
|
|
2407
|
+
an,
|
|
2408
|
+
cn,
|
|
2409
|
+
fn
|
|
2410
2410
|
];
|
|
2411
2411
|
}
|
|
2412
|
-
let
|
|
2412
|
+
let _r = class extends Me {
|
|
2413
2413
|
constructor(e) {
|
|
2414
2414
|
super(), xe(
|
|
2415
2415
|
this,
|
|
2416
2416
|
e,
|
|
2417
|
-
|
|
2418
|
-
|
|
2417
|
+
wr,
|
|
2418
|
+
br,
|
|
2419
2419
|
Se,
|
|
2420
2420
|
{
|
|
2421
2421
|
ZOOM_DEFAULTS: 25,
|
|
@@ -2511,31 +2511,31 @@ function He(i, e = {}) {
|
|
|
2511
2511
|
const t = { type: "FeatureCollection" };
|
|
2512
2512
|
return e.id && (t.id = e.id), e.bbox && (t.bbox = e.bbox), t.features = i, t;
|
|
2513
2513
|
}
|
|
2514
|
-
function
|
|
2514
|
+
function Ai(i, e, t = {}) {
|
|
2515
2515
|
return Qe({
|
|
2516
2516
|
type: "MultiPolygon",
|
|
2517
2517
|
coordinates: i
|
|
2518
2518
|
}, e, t);
|
|
2519
2519
|
}
|
|
2520
|
-
function
|
|
2520
|
+
function Bi(i, e, t) {
|
|
2521
2521
|
if (i !== null)
|
|
2522
|
-
for (var n, r, o, l, s, c, u, h = 0, a = 0, f, d = i.type, m = d === "FeatureCollection",
|
|
2523
|
-
u = m ? i.features[
|
|
2524
|
-
for (var
|
|
2525
|
-
var E = 0,
|
|
2526
|
-
if (l = f ? u.geometries[
|
|
2522
|
+
for (var n, r, o, l, s, c, u, h = 0, a = 0, f, d = i.type, m = d === "FeatureCollection", v = d === "Feature", b = m ? i.features.length : 1, p = 0; p < b; p++) {
|
|
2523
|
+
u = m ? i.features[p].geometry : v ? i.geometry : i, f = u ? u.type === "GeometryCollection" : !1, s = f ? u.geometries.length : 1;
|
|
2524
|
+
for (var _ = 0; _ < s; _++) {
|
|
2525
|
+
var E = 0, S = 0;
|
|
2526
|
+
if (l = f ? u.geometries[_] : u, l !== null) {
|
|
2527
2527
|
c = l.coordinates;
|
|
2528
|
-
var
|
|
2529
|
-
switch (h = 0,
|
|
2528
|
+
var k = l.type;
|
|
2529
|
+
switch (h = 0, k) {
|
|
2530
2530
|
case null:
|
|
2531
2531
|
break;
|
|
2532
2532
|
case "Point":
|
|
2533
2533
|
if (e(
|
|
2534
2534
|
c,
|
|
2535
2535
|
a,
|
|
2536
|
-
|
|
2536
|
+
p,
|
|
2537
2537
|
E,
|
|
2538
|
-
|
|
2538
|
+
S
|
|
2539
2539
|
) === !1)
|
|
2540
2540
|
return !1;
|
|
2541
2541
|
a++, E++;
|
|
@@ -2546,14 +2546,14 @@ function Wi(i, e, t) {
|
|
|
2546
2546
|
if (e(
|
|
2547
2547
|
c[n],
|
|
2548
2548
|
a,
|
|
2549
|
-
|
|
2549
|
+
p,
|
|
2550
2550
|
E,
|
|
2551
|
-
|
|
2551
|
+
S
|
|
2552
2552
|
) === !1)
|
|
2553
2553
|
return !1;
|
|
2554
|
-
a++,
|
|
2554
|
+
a++, k === "MultiPoint" && E++;
|
|
2555
2555
|
}
|
|
2556
|
-
|
|
2556
|
+
k === "LineString" && E++;
|
|
2557
2557
|
break;
|
|
2558
2558
|
case "Polygon":
|
|
2559
2559
|
case "MultiLineString":
|
|
@@ -2562,39 +2562,39 @@ function Wi(i, e, t) {
|
|
|
2562
2562
|
if (e(
|
|
2563
2563
|
c[n][r],
|
|
2564
2564
|
a,
|
|
2565
|
-
|
|
2565
|
+
p,
|
|
2566
2566
|
E,
|
|
2567
|
-
|
|
2567
|
+
S
|
|
2568
2568
|
) === !1)
|
|
2569
2569
|
return !1;
|
|
2570
2570
|
a++;
|
|
2571
2571
|
}
|
|
2572
|
-
|
|
2572
|
+
k === "MultiLineString" && E++, k === "Polygon" && S++;
|
|
2573
2573
|
}
|
|
2574
|
-
|
|
2574
|
+
k === "Polygon" && E++;
|
|
2575
2575
|
break;
|
|
2576
2576
|
case "MultiPolygon":
|
|
2577
2577
|
for (n = 0; n < c.length; n++) {
|
|
2578
|
-
for (
|
|
2578
|
+
for (S = 0, r = 0; r < c[n].length; r++) {
|
|
2579
2579
|
for (o = 0; o < c[n][r].length - h; o++) {
|
|
2580
2580
|
if (e(
|
|
2581
2581
|
c[n][r][o],
|
|
2582
2582
|
a,
|
|
2583
|
-
|
|
2583
|
+
p,
|
|
2584
2584
|
E,
|
|
2585
|
-
|
|
2585
|
+
S
|
|
2586
2586
|
) === !1)
|
|
2587
2587
|
return !1;
|
|
2588
2588
|
a++;
|
|
2589
2589
|
}
|
|
2590
|
-
|
|
2590
|
+
S++;
|
|
2591
2591
|
}
|
|
2592
2592
|
E++;
|
|
2593
2593
|
}
|
|
2594
2594
|
break;
|
|
2595
2595
|
case "GeometryCollection":
|
|
2596
2596
|
for (n = 0; n < l.geometries.length; n++)
|
|
2597
|
-
if (
|
|
2597
|
+
if (Bi(l.geometries[n], e) === !1)
|
|
2598
2598
|
return !1;
|
|
2599
2599
|
break;
|
|
2600
2600
|
default:
|
|
@@ -2605,8 +2605,8 @@ function Wi(i, e, t) {
|
|
|
2605
2605
|
}
|
|
2606
2606
|
}
|
|
2607
2607
|
function Dt(i, e) {
|
|
2608
|
-
var t, n, r, o, l, s, c, u, h, a, f = 0, d = i.type === "FeatureCollection", m = i.type === "Feature",
|
|
2609
|
-
for (t = 0; t <
|
|
2608
|
+
var t, n, r, o, l, s, c, u, h, a, f = 0, d = i.type === "FeatureCollection", m = i.type === "Feature", v = d ? i.features.length : 1;
|
|
2609
|
+
for (t = 0; t < v; t++) {
|
|
2610
2610
|
for (s = d ? i.features[t].geometry : m ? i.geometry : i, u = d ? i.features[t].properties : m ? i.properties : {}, h = d ? i.features[t].bbox : m ? i.bbox : void 0, a = d ? i.features[t].id : m ? i.id : void 0, c = s ? s.type === "GeometryCollection" : !1, l = c ? s.geometries.length : 1, r = 0; r < l; r++) {
|
|
2611
2611
|
if (o = c ? s.geometries[r] : s, o === null) {
|
|
2612
2612
|
if (e(
|
|
@@ -2655,7 +2655,7 @@ function Dt(i, e) {
|
|
|
2655
2655
|
f++;
|
|
2656
2656
|
}
|
|
2657
2657
|
}
|
|
2658
|
-
function
|
|
2658
|
+
function Er(i, e) {
|
|
2659
2659
|
Dt(i, function(t, n, r, o, l) {
|
|
2660
2660
|
var s = t === null ? null : t.type;
|
|
2661
2661
|
switch (s) {
|
|
@@ -2691,23 +2691,23 @@ function wr(i, e) {
|
|
|
2691
2691
|
}
|
|
2692
2692
|
});
|
|
2693
2693
|
}
|
|
2694
|
-
function
|
|
2694
|
+
function Lr(i, e = {}) {
|
|
2695
2695
|
if (i.bbox != null && e.recompute !== !0)
|
|
2696
2696
|
return i.bbox;
|
|
2697
2697
|
const t = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
|
|
2698
|
-
return
|
|
2698
|
+
return Bi(i, (n) => {
|
|
2699
2699
|
t[0] > n[0] && (t[0] = n[0]), t[1] > n[1] && (t[1] = n[1]), t[2] < n[0] && (t[2] = n[0]), t[3] < n[1] && (t[3] = n[1]);
|
|
2700
2700
|
}), t;
|
|
2701
2701
|
}
|
|
2702
|
-
var Pt =
|
|
2703
|
-
function
|
|
2702
|
+
var Pt = Lr;
|
|
2703
|
+
function Sr(i) {
|
|
2704
2704
|
if (!i)
|
|
2705
2705
|
throw new Error("geojson is required");
|
|
2706
2706
|
switch (i.type) {
|
|
2707
2707
|
case "Feature":
|
|
2708
|
-
return
|
|
2708
|
+
return Di(i);
|
|
2709
2709
|
case "FeatureCollection":
|
|
2710
|
-
return
|
|
2710
|
+
return xr(i);
|
|
2711
2711
|
case "Point":
|
|
2712
2712
|
case "LineString":
|
|
2713
2713
|
case "Polygon":
|
|
@@ -2720,7 +2720,7 @@ function Er(i) {
|
|
|
2720
2720
|
throw new Error("unknown GeoJSON type");
|
|
2721
2721
|
}
|
|
2722
2722
|
}
|
|
2723
|
-
function
|
|
2723
|
+
function Di(i) {
|
|
2724
2724
|
const e = { type: "Feature" };
|
|
2725
2725
|
return Object.keys(i).forEach((t) => {
|
|
2726
2726
|
switch (t) {
|
|
@@ -2731,16 +2731,16 @@ function Ai(i) {
|
|
|
2731
2731
|
default:
|
|
2732
2732
|
e[t] = i[t];
|
|
2733
2733
|
}
|
|
2734
|
-
}), e.properties =
|
|
2734
|
+
}), e.properties = Ui(i.properties), i.geometry == null ? e.geometry = null : e.geometry = Ut(i.geometry), e;
|
|
2735
2735
|
}
|
|
2736
|
-
function
|
|
2736
|
+
function Ui(i) {
|
|
2737
2737
|
const e = {};
|
|
2738
2738
|
return i && Object.keys(i).forEach((t) => {
|
|
2739
2739
|
const n = i[t];
|
|
2740
|
-
typeof n == "object" ? n === null ? e[t] = null : Array.isArray(n) ? e[t] = n.map((r) => r) : e[t] =
|
|
2740
|
+
typeof n == "object" ? n === null ? e[t] = null : Array.isArray(n) ? e[t] = n.map((r) => r) : e[t] = Ui(n) : e[t] = n;
|
|
2741
2741
|
}), e;
|
|
2742
2742
|
}
|
|
2743
|
-
function
|
|
2743
|
+
function xr(i) {
|
|
2744
2744
|
const e = { type: "FeatureCollection" };
|
|
2745
2745
|
return Object.keys(i).forEach((t) => {
|
|
2746
2746
|
switch (t) {
|
|
@@ -2750,17 +2750,17 @@ function Lr(i) {
|
|
|
2750
2750
|
default:
|
|
2751
2751
|
e[t] = i[t];
|
|
2752
2752
|
}
|
|
2753
|
-
}), e.features = i.features.map((t) =>
|
|
2753
|
+
}), e.features = i.features.map((t) => Di(t)), e;
|
|
2754
2754
|
}
|
|
2755
2755
|
function Ut(i) {
|
|
2756
2756
|
const e = { type: i.type };
|
|
2757
|
-
return i.bbox && (e.bbox = i.bbox), i.type === "GeometryCollection" ? (e.geometries = i.geometries.map((t) => Ut(t)), e) : (e.coordinates =
|
|
2757
|
+
return i.bbox && (e.bbox = i.bbox), i.type === "GeometryCollection" ? (e.geometries = i.geometries.map((t) => Ut(t)), e) : (e.coordinates = Fi(i.coordinates), e);
|
|
2758
2758
|
}
|
|
2759
|
-
function
|
|
2759
|
+
function Fi(i) {
|
|
2760
2760
|
const e = i;
|
|
2761
|
-
return typeof e[0] != "object" ? e.slice() : e.map((t) =>
|
|
2761
|
+
return typeof e[0] != "object" ? e.slice() : e.map((t) => Fi(t));
|
|
2762
2762
|
}
|
|
2763
|
-
var
|
|
2763
|
+
var Mr = Sr;
|
|
2764
2764
|
/**
|
|
2765
2765
|
* splaytree v3.1.2
|
|
2766
2766
|
* Fast Splay tree for Node and browser
|
|
@@ -2783,7 +2783,7 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
|
2783
2783
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
2784
2784
|
and limitations under the License.
|
|
2785
2785
|
***************************************************************************** */
|
|
2786
|
-
function
|
|
2786
|
+
function Cr(i, e) {
|
|
2787
2787
|
var t = { label: 0, sent: function() {
|
|
2788
2788
|
if (o[0] & 1) throw o[1];
|
|
2789
2789
|
return o[1];
|
|
@@ -2852,7 +2852,7 @@ var Le = (
|
|
|
2852
2852
|
return i;
|
|
2853
2853
|
}()
|
|
2854
2854
|
);
|
|
2855
|
-
function
|
|
2855
|
+
function kr(i, e) {
|
|
2856
2856
|
return i > e ? 1 : i < e ? -1 : 0;
|
|
2857
2857
|
}
|
|
2858
2858
|
function ve(i, e, t) {
|
|
@@ -2889,7 +2889,7 @@ function xt(i, e, t, n) {
|
|
|
2889
2889
|
var o = n(i, t.key);
|
|
2890
2890
|
return o < 0 ? (r.left = t.left, r.right = t, t.left = null) : o >= 0 && (r.right = t.right, r.left = t, t.right = null), r;
|
|
2891
2891
|
}
|
|
2892
|
-
function
|
|
2892
|
+
function di(i, e, t) {
|
|
2893
2893
|
var n = null, r = null;
|
|
2894
2894
|
if (e) {
|
|
2895
2895
|
e = ve(i, e, t);
|
|
@@ -2898,7 +2898,7 @@ function fi(i, e, t) {
|
|
|
2898
2898
|
}
|
|
2899
2899
|
return { left: n, right: r };
|
|
2900
2900
|
}
|
|
2901
|
-
function
|
|
2901
|
+
function Nr(i, e, t) {
|
|
2902
2902
|
return e === null ? i : (i === null || (e = ve(i.key, e, t), e.left = i), e);
|
|
2903
2903
|
}
|
|
2904
2904
|
function Tt(i, e, t, n, r) {
|
|
@@ -2909,11 +2909,11 @@ function Tt(i, e, t, n, r) {
|
|
|
2909
2909
|
i.left && Tt(i.left, o, !1, n, r), i.right && Tt(i.right, o, !0, n, r);
|
|
2910
2910
|
}
|
|
2911
2911
|
}
|
|
2912
|
-
var
|
|
2912
|
+
var Ft = (
|
|
2913
2913
|
/** @class */
|
|
2914
2914
|
function() {
|
|
2915
2915
|
function i(e) {
|
|
2916
|
-
e === void 0 && (e =
|
|
2916
|
+
e === void 0 && (e = kr), this._root = null, this._size = 0, this._comparator = e;
|
|
2917
2917
|
}
|
|
2918
2918
|
return i.prototype.insert = function(e, t) {
|
|
2919
2919
|
return this._size++, this._root = xt(e, t, this._root, this._comparator);
|
|
@@ -3041,14 +3041,14 @@ var Gt = (
|
|
|
3041
3041
|
}, i.prototype.clear = function() {
|
|
3042
3042
|
return this._root = null, this._size = 0, this;
|
|
3043
3043
|
}, i.prototype.toList = function() {
|
|
3044
|
-
return
|
|
3044
|
+
return Tr(this._root);
|
|
3045
3045
|
}, i.prototype.load = function(e, t, n) {
|
|
3046
3046
|
t === void 0 && (t = []), n === void 0 && (n = !1);
|
|
3047
3047
|
var r = e.length, o = this._comparator;
|
|
3048
3048
|
if (n && Ot(e, t, 0, r - 1, o), this._root === null)
|
|
3049
3049
|
this._root = Rt(e, t, 0, r), this._size = r;
|
|
3050
3050
|
else {
|
|
3051
|
-
var l =
|
|
3051
|
+
var l = Rr(this.toList(), Pr(e, t), o);
|
|
3052
3052
|
r = this._size + r, this._root = It({ head: l }, 0, r);
|
|
3053
3053
|
}
|
|
3054
3054
|
return this;
|
|
@@ -3075,13 +3075,13 @@ var Gt = (
|
|
|
3075
3075
|
return t.push(n);
|
|
3076
3076
|
}, e), t.join("");
|
|
3077
3077
|
}, i.prototype.update = function(e, t, n) {
|
|
3078
|
-
var r = this._comparator, o =
|
|
3079
|
-
r(e, t) < 0 ? s = xt(t, n, s, r) : l = xt(t, n, l, r), this._root =
|
|
3078
|
+
var r = this._comparator, o = di(e, this._root, r), l = o.left, s = o.right;
|
|
3079
|
+
r(e, t) < 0 ? s = xt(t, n, s, r) : l = xt(t, n, l, r), this._root = Nr(l, s, r);
|
|
3080
3080
|
}, i.prototype.split = function(e) {
|
|
3081
|
-
return
|
|
3081
|
+
return di(e, this._root, this._comparator);
|
|
3082
3082
|
}, i.prototype[Symbol.iterator] = function() {
|
|
3083
3083
|
var e, t, n;
|
|
3084
|
-
return
|
|
3084
|
+
return Cr(this, function(r) {
|
|
3085
3085
|
switch (r.label) {
|
|
3086
3086
|
case 0:
|
|
3087
3087
|
e = this._root, t = [], n = !1, r.label = 1;
|
|
@@ -3113,12 +3113,12 @@ function Rt(i, e, t, n) {
|
|
|
3113
3113
|
}
|
|
3114
3114
|
return null;
|
|
3115
3115
|
}
|
|
3116
|
-
function
|
|
3116
|
+
function Pr(i, e) {
|
|
3117
3117
|
for (var t = new Le(null, null), n = t, r = 0; r < i.length; r++)
|
|
3118
3118
|
n = n.next = new Le(i[r], e[r]);
|
|
3119
3119
|
return n.next = null, t.next;
|
|
3120
3120
|
}
|
|
3121
|
-
function
|
|
3121
|
+
function Tr(i) {
|
|
3122
3122
|
for (var e = i, t = [], n = !1, r = new Le(null, null), o = r; !n; )
|
|
3123
3123
|
e ? (t.push(e), e = e.left) : t.length > 0 ? (e = o = o.next = t.pop(), e = e.right) : n = !0;
|
|
3124
3124
|
return o.next = null, r.next;
|
|
@@ -3131,7 +3131,7 @@ function It(i, e, t) {
|
|
|
3131
3131
|
}
|
|
3132
3132
|
return null;
|
|
3133
3133
|
}
|
|
3134
|
-
function
|
|
3134
|
+
function Rr(i, e, t) {
|
|
3135
3135
|
for (var n = new Le(null, null), r = n, o = i, l = e; o !== null && l !== null; )
|
|
3136
3136
|
t(o.key, l.key) < 0 ? (r.next = o, o = o.next) : (r.next = l, l = l.next), r = r.next;
|
|
3137
3137
|
return o !== null ? r.next = o : l !== null && (r.next = l), n.next;
|
|
@@ -3153,7 +3153,7 @@ function Ot(i, e, t, n, r) {
|
|
|
3153
3153
|
Ot(i, e, t, s, r), Ot(i, e, s + 1, n, r);
|
|
3154
3154
|
}
|
|
3155
3155
|
}
|
|
3156
|
-
const he = 11102230246251565e-32, Y = 134217729,
|
|
3156
|
+
const he = 11102230246251565e-32, Y = 134217729, Ir = (3 + 8 * he) * he;
|
|
3157
3157
|
function Mt(i, e, t, n, r) {
|
|
3158
3158
|
let o, l, s, c, u = e[0], h = n[0], a = 0, f = 0;
|
|
3159
3159
|
h > u == h > -u ? (o = u, u = e[++a]) : (o = h, h = n[++f]);
|
|
@@ -3167,7 +3167,7 @@ function Mt(i, e, t, n, r) {
|
|
|
3167
3167
|
l = o + h, c = l - o, s = o - (l - c) + (h - c), h = n[++f], o = l, s !== 0 && (r[d++] = s);
|
|
3168
3168
|
return (o !== 0 || d === 0) && (r[d++] = o), d;
|
|
3169
3169
|
}
|
|
3170
|
-
function
|
|
3170
|
+
function Or(i, e) {
|
|
3171
3171
|
let t = e[0];
|
|
3172
3172
|
for (let n = 1; n < i; n++) t += e[n];
|
|
3173
3173
|
return t;
|
|
@@ -3175,26 +3175,26 @@ function Rr(i, e) {
|
|
|
3175
3175
|
function Ye(i) {
|
|
3176
3176
|
return new Float64Array(i);
|
|
3177
3177
|
}
|
|
3178
|
-
const
|
|
3179
|
-
function
|
|
3180
|
-
let s, c, u, h, a, f, d, m,
|
|
3181
|
-
const
|
|
3182
|
-
|
|
3183
|
-
let O =
|
|
3184
|
-
if (O >= M || -O >= M || (a = i -
|
|
3185
|
-
|
|
3186
|
-
const z = Mt(4, We, 4, K,
|
|
3187
|
-
|
|
3188
|
-
const $ = Mt(z,
|
|
3189
|
-
|
|
3190
|
-
const
|
|
3191
|
-
return
|
|
3192
|
-
}
|
|
3193
|
-
function
|
|
3178
|
+
const Wr = (3 + 16 * he) * he, Ar = (2 + 12 * he) * he, Br = (9 + 64 * he) * he * he, We = Ye(4), hi = Ye(8), gi = Ye(12), mi = Ye(16), K = Ye(4);
|
|
3179
|
+
function Dr(i, e, t, n, r, o, l) {
|
|
3180
|
+
let s, c, u, h, a, f, d, m, v, b, p, _, E, S, k, x, L, w;
|
|
3181
|
+
const C = i - r, I = t - r, D = e - o, G = n - o;
|
|
3182
|
+
S = C * G, f = Y * C, d = f - (f - C), m = C - d, f = Y * G, v = f - (f - G), b = G - v, k = m * b - (S - d * v - m * v - d * b), x = D * I, f = Y * D, d = f - (f - D), m = D - d, f = Y * I, v = f - (f - I), b = I - v, L = m * b - (x - d * v - m * v - d * b), p = k - L, a = k - p, We[0] = k - (p + a) + (a - L), _ = S + p, a = _ - S, E = S - (_ - a) + (p - a), p = E - x, a = E - p, We[1] = E - (p + a) + (a - x), w = _ + p, a = w - _, We[2] = _ - (w - a) + (p - a), We[3] = w;
|
|
3183
|
+
let O = Or(4, We), M = Ar * l;
|
|
3184
|
+
if (O >= M || -O >= M || (a = i - C, s = i - (C + a) + (a - r), a = t - I, u = t - (I + a) + (a - r), a = e - D, c = e - (D + a) + (a - o), a = n - G, h = n - (G + a) + (a - o), s === 0 && c === 0 && u === 0 && h === 0) || (M = Br * l + Ir * Math.abs(O), O += C * h + G * s - (D * u + I * c), O >= M || -O >= M)) return O;
|
|
3185
|
+
S = s * G, f = Y * s, d = f - (f - s), m = s - d, f = Y * G, v = f - (f - G), b = G - v, k = m * b - (S - d * v - m * v - d * b), x = c * I, f = Y * c, d = f - (f - c), m = c - d, f = Y * I, v = f - (f - I), b = I - v, L = m * b - (x - d * v - m * v - d * b), p = k - L, a = k - p, K[0] = k - (p + a) + (a - L), _ = S + p, a = _ - S, E = S - (_ - a) + (p - a), p = E - x, a = E - p, K[1] = E - (p + a) + (a - x), w = _ + p, a = w - _, K[2] = _ - (w - a) + (p - a), K[3] = w;
|
|
3186
|
+
const z = Mt(4, We, 4, K, hi);
|
|
3187
|
+
S = C * h, f = Y * C, d = f - (f - C), m = C - d, f = Y * h, v = f - (f - h), b = h - v, k = m * b - (S - d * v - m * v - d * b), x = D * u, f = Y * D, d = f - (f - D), m = D - d, f = Y * u, v = f - (f - u), b = u - v, L = m * b - (x - d * v - m * v - d * b), p = k - L, a = k - p, K[0] = k - (p + a) + (a - L), _ = S + p, a = _ - S, E = S - (_ - a) + (p - a), p = E - x, a = E - p, K[1] = E - (p + a) + (a - x), w = _ + p, a = w - _, K[2] = _ - (w - a) + (p - a), K[3] = w;
|
|
3188
|
+
const $ = Mt(z, hi, 4, K, gi);
|
|
3189
|
+
S = s * h, f = Y * s, d = f - (f - s), m = s - d, f = Y * h, v = f - (f - h), b = h - v, k = m * b - (S - d * v - m * v - d * b), x = c * u, f = Y * c, d = f - (f - c), m = c - d, f = Y * u, v = f - (f - u), b = u - v, L = m * b - (x - d * v - m * v - d * b), p = k - L, a = k - p, K[0] = k - (p + a) + (a - L), _ = S + p, a = _ - S, E = S - (_ - a) + (p - a), p = E - x, a = E - p, K[1] = E - (p + a) + (a - x), w = _ + p, a = w - _, K[2] = _ - (w - a) + (p - a), K[3] = w;
|
|
3190
|
+
const se = Mt($, gi, 4, K, mi);
|
|
3191
|
+
return mi[se - 1];
|
|
3192
|
+
}
|
|
3193
|
+
function Ur(i, e, t, n, r, o) {
|
|
3194
3194
|
const l = (e - o) * (t - r), s = (i - r) * (n - o), c = l - s, u = Math.abs(l + s);
|
|
3195
|
-
return Math.abs(c) >=
|
|
3195
|
+
return Math.abs(c) >= Wr * u ? c : -Dr(i, e, t, n, r, o, u);
|
|
3196
3196
|
}
|
|
3197
|
-
const
|
|
3197
|
+
const Ge = (i, e) => i.ll.x <= e.x && e.x <= i.ur.x && i.ll.y <= e.y && e.y <= i.ur.y, Wt = (i, e) => {
|
|
3198
3198
|
if (e.ur.x < i.ll.x || i.ur.x < e.ll.x || e.ur.y < i.ll.y || i.ur.y < e.ll.y) return null;
|
|
3199
3199
|
const t = i.ll.x < e.ll.x ? e.ll.x : i.ll.x, n = i.ur.x < e.ur.x ? i.ur.x : e.ur.x, r = i.ll.y < e.ll.y ? e.ll.y : i.ll.y, o = i.ur.y < e.ur.y ? i.ur.y : e.ur.y;
|
|
3200
3200
|
return {
|
|
@@ -3210,18 +3210,18 @@ const Fe = (i, e) => i.ll.x <= e.x && e.x <= i.ur.x && i.ll.y <= e.y && e.y <= i
|
|
|
3210
3210
|
};
|
|
3211
3211
|
let be = Number.EPSILON;
|
|
3212
3212
|
be === void 0 && (be = Math.pow(2, -52));
|
|
3213
|
-
const
|
|
3213
|
+
const Fr = be * be, yi = (i, e) => {
|
|
3214
3214
|
if (-be < i && i < be && -be < e && e < be)
|
|
3215
3215
|
return 0;
|
|
3216
3216
|
const t = i - e;
|
|
3217
|
-
return t * t <
|
|
3217
|
+
return t * t < Fr * i * e ? 0 : i < e ? -1 : 1;
|
|
3218
3218
|
};
|
|
3219
|
-
class
|
|
3219
|
+
class Gr {
|
|
3220
3220
|
constructor() {
|
|
3221
3221
|
this.reset();
|
|
3222
3222
|
}
|
|
3223
3223
|
reset() {
|
|
3224
|
-
this.xRounder = new
|
|
3224
|
+
this.xRounder = new pi(), this.yRounder = new pi();
|
|
3225
3225
|
}
|
|
3226
3226
|
round(e, t) {
|
|
3227
3227
|
return {
|
|
@@ -3230,9 +3230,9 @@ class Ur {
|
|
|
3230
3230
|
};
|
|
3231
3231
|
}
|
|
3232
3232
|
}
|
|
3233
|
-
class
|
|
3233
|
+
class pi {
|
|
3234
3234
|
constructor() {
|
|
3235
|
-
this.tree = new
|
|
3235
|
+
this.tree = new Ft(), this.round(0);
|
|
3236
3236
|
}
|
|
3237
3237
|
// Note: this can rounds input values backwards or forwards.
|
|
3238
3238
|
// You might ask, why not restrict this to just rounding
|
|
@@ -3243,16 +3243,16 @@ class yi {
|
|
|
3243
3243
|
// angle for t-intersections).
|
|
3244
3244
|
round(e) {
|
|
3245
3245
|
const t = this.tree.add(e), n = this.tree.prev(t);
|
|
3246
|
-
if (n !== null &&
|
|
3246
|
+
if (n !== null && yi(t.key, n.key) === 0)
|
|
3247
3247
|
return this.tree.remove(e), n.key;
|
|
3248
3248
|
const r = this.tree.next(t);
|
|
3249
|
-
return r !== null &&
|
|
3249
|
+
return r !== null && yi(t.key, r.key) === 0 ? (this.tree.remove(e), r.key) : e;
|
|
3250
3250
|
}
|
|
3251
3251
|
}
|
|
3252
|
-
const Ve = new
|
|
3253
|
-
const n =
|
|
3252
|
+
const Ve = new Gr(), lt = (i, e) => i.x * e.y - i.y * e.x, Gi = (i, e) => i.x * e.x + i.y * e.y, vi = (i, e, t) => {
|
|
3253
|
+
const n = Ur(i.x, i.y, e.x, e.y, t.x, t.y);
|
|
3254
3254
|
return n > 0 ? -1 : n < 0 ? 1 : 0;
|
|
3255
|
-
}, ut = (i) => Math.sqrt(
|
|
3255
|
+
}, ut = (i) => Math.sqrt(Gi(i, i)), zr = (i, e, t) => {
|
|
3256
3256
|
const n = {
|
|
3257
3257
|
x: e.x - i.x,
|
|
3258
3258
|
y: e.y - i.y
|
|
@@ -3261,7 +3261,7 @@ const Ve = new Ur(), lt = (i, e) => i.x * e.y - i.y * e.x, Ui = (i, e) => i.x *
|
|
|
3261
3261
|
y: t.y - i.y
|
|
3262
3262
|
};
|
|
3263
3263
|
return lt(r, n) / ut(r) / ut(n);
|
|
3264
|
-
},
|
|
3264
|
+
}, jr = (i, e, t) => {
|
|
3265
3265
|
const n = {
|
|
3266
3266
|
x: e.x - i.x,
|
|
3267
3267
|
y: e.y - i.y
|
|
@@ -3269,18 +3269,18 @@ const Ve = new Ur(), lt = (i, e) => i.x * e.y - i.y * e.x, Ui = (i, e) => i.x *
|
|
|
3269
3269
|
x: t.x - i.x,
|
|
3270
3270
|
y: t.y - i.y
|
|
3271
3271
|
};
|
|
3272
|
-
return
|
|
3273
|
-
},
|
|
3272
|
+
return Gi(r, n) / ut(r) / ut(n);
|
|
3273
|
+
}, bi = (i, e, t) => e.y === 0 ? null : {
|
|
3274
3274
|
x: i.x + e.x / e.y * (t - i.y),
|
|
3275
3275
|
y: t
|
|
3276
|
-
},
|
|
3276
|
+
}, wi = (i, e, t) => e.x === 0 ? null : {
|
|
3277
3277
|
x: t,
|
|
3278
3278
|
y: i.y + e.y / e.x * (t - i.x)
|
|
3279
|
-
},
|
|
3280
|
-
if (e.x === 0) return
|
|
3281
|
-
if (n.x === 0) return
|
|
3282
|
-
if (e.y === 0) return
|
|
3283
|
-
if (n.y === 0) return
|
|
3279
|
+
}, Zr = (i, e, t, n) => {
|
|
3280
|
+
if (e.x === 0) return wi(t, n, i.x);
|
|
3281
|
+
if (n.x === 0) return wi(i, e, t.x);
|
|
3282
|
+
if (e.y === 0) return bi(t, n, i.y);
|
|
3283
|
+
if (n.y === 0) return bi(i, e, t.y);
|
|
3284
3284
|
const r = lt(e, n);
|
|
3285
3285
|
if (r == 0) return null;
|
|
3286
3286
|
const o = {
|
|
@@ -3351,8 +3351,8 @@ class ne {
|
|
|
3351
3351
|
const t = /* @__PURE__ */ new Map(), n = (r) => {
|
|
3352
3352
|
const o = r.otherSE;
|
|
3353
3353
|
t.set(r, {
|
|
3354
|
-
sine:
|
|
3355
|
-
cosine:
|
|
3354
|
+
sine: zr(this.point, e.point, o.point),
|
|
3355
|
+
cosine: jr(this.point, e.point, o.point)
|
|
3356
3356
|
});
|
|
3357
3357
|
};
|
|
3358
3358
|
return (r, o) => {
|
|
@@ -3368,7 +3368,7 @@ class ne {
|
|
|
3368
3368
|
};
|
|
3369
3369
|
}
|
|
3370
3370
|
}
|
|
3371
|
-
let
|
|
3371
|
+
let qr = 0;
|
|
3372
3372
|
class we {
|
|
3373
3373
|
/* This compare() function is for ordering segments in the sweep
|
|
3374
3374
|
* line tree, and does so according to the following criteria:
|
|
@@ -3426,7 +3426,7 @@ class we {
|
|
|
3426
3426
|
/* Warning: a reference to ringWindings input will be stored,
|
|
3427
3427
|
* and possibly will be later modified */
|
|
3428
3428
|
constructor(e, t, n, r) {
|
|
3429
|
-
this.id = ++
|
|
3429
|
+
this.id = ++qr, this.leftSE = e, e.segment = this, e.otherSE = t, this.rightSE = t, t.segment = this, t.otherSE = e, this.rings = n, this.windings = r;
|
|
3430
3430
|
}
|
|
3431
3431
|
static fromRing(e, t, n) {
|
|
3432
3432
|
let r, o, l;
|
|
@@ -3507,7 +3507,7 @@ class we {
|
|
|
3507
3507
|
getIntersection(e) {
|
|
3508
3508
|
const t = this.bbox(), n = e.bbox(), r = Wt(t, n);
|
|
3509
3509
|
if (r === null) return null;
|
|
3510
|
-
const o = this.leftSE.point, l = this.rightSE.point, s = e.leftSE.point, c = e.rightSE.point, u =
|
|
3510
|
+
const o = this.leftSE.point, l = this.rightSE.point, s = e.leftSE.point, c = e.rightSE.point, u = Ge(t, s) && this.comparePoint(s) === 0, h = Ge(n, o) && e.comparePoint(o) === 0, a = Ge(t, c) && this.comparePoint(c) === 0, f = Ge(n, l) && e.comparePoint(l) === 0;
|
|
3511
3511
|
if (h && u)
|
|
3512
3512
|
return f && !a ? l : !f && a ? c : null;
|
|
3513
3513
|
if (h)
|
|
@@ -3517,8 +3517,8 @@ class we {
|
|
|
3517
3517
|
if (f && a) return null;
|
|
3518
3518
|
if (f) return l;
|
|
3519
3519
|
if (a) return c;
|
|
3520
|
-
const d =
|
|
3521
|
-
return d === null || !
|
|
3520
|
+
const d = Zr(o, this.vector(), s, e.vector());
|
|
3521
|
+
return d === null || !Ge(r, d) ? null : Ve.round(d.x, d.y);
|
|
3522
3522
|
}
|
|
3523
3523
|
/**
|
|
3524
3524
|
* Split the given segment into multiple segments on the given points.
|
|
@@ -3621,7 +3621,7 @@ class we {
|
|
|
3621
3621
|
if (this.consumedBy) return !1;
|
|
3622
3622
|
if (this._isInResult !== void 0) return this._isInResult;
|
|
3623
3623
|
const e = this.beforeState().multiPolys, t = this.afterState().multiPolys;
|
|
3624
|
-
switch (
|
|
3624
|
+
switch (ue.type) {
|
|
3625
3625
|
case "union": {
|
|
3626
3626
|
const n = e.length === 0, r = t.length === 0;
|
|
3627
3627
|
this._isInResult = n !== r;
|
|
@@ -3629,7 +3629,7 @@ class we {
|
|
|
3629
3629
|
}
|
|
3630
3630
|
case "intersection": {
|
|
3631
3631
|
let n, r;
|
|
3632
|
-
e.length < t.length ? (n = e.length, r = t.length) : (n = t.length, r = e.length), this._isInResult = r ===
|
|
3632
|
+
e.length < t.length ? (n = e.length, r = t.length) : (n = t.length, r = e.length), this._isInResult = r === ue.numMultiPolys && n < r;
|
|
3633
3633
|
break;
|
|
3634
3634
|
}
|
|
3635
3635
|
case "xor": {
|
|
@@ -3643,12 +3643,12 @@ class we {
|
|
|
3643
3643
|
break;
|
|
3644
3644
|
}
|
|
3645
3645
|
default:
|
|
3646
|
-
throw new Error(`Unrecognized operation type found ${
|
|
3646
|
+
throw new Error(`Unrecognized operation type found ${ue.type}`);
|
|
3647
3647
|
}
|
|
3648
3648
|
return this._isInResult;
|
|
3649
3649
|
}
|
|
3650
3650
|
}
|
|
3651
|
-
class
|
|
3651
|
+
class _i {
|
|
3652
3652
|
constructor(e, t, n) {
|
|
3653
3653
|
if (!Array.isArray(e) || e.length === 0)
|
|
3654
3654
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
@@ -3683,11 +3683,11 @@ class wi {
|
|
|
3683
3683
|
return e;
|
|
3684
3684
|
}
|
|
3685
3685
|
}
|
|
3686
|
-
class
|
|
3686
|
+
class Qr {
|
|
3687
3687
|
constructor(e, t) {
|
|
3688
3688
|
if (!Array.isArray(e))
|
|
3689
3689
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
3690
|
-
this.exteriorRing = new
|
|
3690
|
+
this.exteriorRing = new _i(e[0], this, !0), this.bbox = {
|
|
3691
3691
|
ll: {
|
|
3692
3692
|
x: this.exteriorRing.bbox.ll.x,
|
|
3693
3693
|
y: this.exteriorRing.bbox.ll.y
|
|
@@ -3698,7 +3698,7 @@ class Zr {
|
|
|
3698
3698
|
}
|
|
3699
3699
|
}, this.interiorRings = [];
|
|
3700
3700
|
for (let n = 1, r = e.length; n < r; n++) {
|
|
3701
|
-
const o = new
|
|
3701
|
+
const o = new _i(e[n], this, !1);
|
|
3702
3702
|
o.bbox.ll.x < this.bbox.ll.x && (this.bbox.ll.x = o.bbox.ll.x), o.bbox.ll.y < this.bbox.ll.y && (this.bbox.ll.y = o.bbox.ll.y), o.bbox.ur.x > this.bbox.ur.x && (this.bbox.ur.x = o.bbox.ur.x), o.bbox.ur.y > this.bbox.ur.y && (this.bbox.ur.y = o.bbox.ur.y), this.interiorRings.push(o);
|
|
3703
3703
|
}
|
|
3704
3704
|
this.multiPoly = t;
|
|
@@ -3713,7 +3713,7 @@ class Zr {
|
|
|
3713
3713
|
return e;
|
|
3714
3714
|
}
|
|
3715
3715
|
}
|
|
3716
|
-
class
|
|
3716
|
+
class Ei {
|
|
3717
3717
|
constructor(e, t) {
|
|
3718
3718
|
if (!Array.isArray(e))
|
|
3719
3719
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
@@ -3732,7 +3732,7 @@ class _i {
|
|
|
3732
3732
|
}
|
|
3733
3733
|
};
|
|
3734
3734
|
for (let n = 0, r = e.length; n < r; n++) {
|
|
3735
|
-
const o = new
|
|
3735
|
+
const o = new Qr(e[n], this);
|
|
3736
3736
|
o.bbox.ll.x < this.bbox.ll.x && (this.bbox.ll.x = o.bbox.ll.x), o.bbox.ll.y < this.bbox.ll.y && (this.bbox.ll.y = o.bbox.ll.y), o.bbox.ur.x > this.bbox.ur.x && (this.bbox.ur.x = o.bbox.ur.x), o.bbox.ur.y > this.bbox.ur.y && (this.bbox.ur.y = o.bbox.ur.y), this.polys.push(o);
|
|
3737
3737
|
}
|
|
3738
3738
|
this.isSubject = t;
|
|
@@ -3761,22 +3761,22 @@ class at {
|
|
|
3761
3761
|
for (; ; ) {
|
|
3762
3762
|
const f = s.getAvailableLinkedEvents();
|
|
3763
3763
|
if (f.length === 0) {
|
|
3764
|
-
const
|
|
3765
|
-
throw new Error(`Unable to complete output ring starting at [${
|
|
3764
|
+
const v = u[0].point, b = u[u.length - 1].point;
|
|
3765
|
+
throw new Error(`Unable to complete output ring starting at [${v.x}, ${v.y}]. Last matching segment found ends at [${b.x}, ${b.y}].`);
|
|
3766
3766
|
}
|
|
3767
3767
|
if (f.length === 1) {
|
|
3768
3768
|
c = f[0].otherSE;
|
|
3769
3769
|
break;
|
|
3770
3770
|
}
|
|
3771
3771
|
let d = null;
|
|
3772
|
-
for (let
|
|
3773
|
-
if (a[
|
|
3774
|
-
d =
|
|
3772
|
+
for (let v = 0, b = a.length; v < b; v++)
|
|
3773
|
+
if (a[v].point === s.point) {
|
|
3774
|
+
d = v;
|
|
3775
3775
|
break;
|
|
3776
3776
|
}
|
|
3777
3777
|
if (d !== null) {
|
|
3778
|
-
const
|
|
3779
|
-
|
|
3778
|
+
const v = a.splice(d)[0], b = u.splice(v.index);
|
|
3779
|
+
b.unshift(b[0].otherSE), t.push(new at(b.reverse()));
|
|
3780
3780
|
continue;
|
|
3781
3781
|
}
|
|
3782
3782
|
a.push({
|
|
@@ -3802,11 +3802,11 @@ class at {
|
|
|
3802
3802
|
const t = [e];
|
|
3803
3803
|
for (let u = 1, h = this.events.length - 1; u < h; u++) {
|
|
3804
3804
|
const a = this.events[u].point, f = this.events[u + 1].point;
|
|
3805
|
-
|
|
3805
|
+
vi(a, e, f) !== 0 && (t.push(a), e = a);
|
|
3806
3806
|
}
|
|
3807
3807
|
if (t.length === 1) return null;
|
|
3808
3808
|
const n = t[0], r = t[1];
|
|
3809
|
-
|
|
3809
|
+
vi(n, e, r) === 0 && t.shift(), t.push(t[0]);
|
|
3810
3810
|
const o = this.isExteriorRing() ? 1 : -1, l = this.isExteriorRing() ? 0 : t.length - 1, s = this.isExteriorRing() ? t.length : -1, c = [];
|
|
3811
3811
|
for (let u = l; u != s; u += o) c.push([t[u].x, t[u].y]);
|
|
3812
3812
|
return c;
|
|
@@ -3838,7 +3838,7 @@ class at {
|
|
|
3838
3838
|
}
|
|
3839
3839
|
}
|
|
3840
3840
|
}
|
|
3841
|
-
class
|
|
3841
|
+
class Li {
|
|
3842
3842
|
constructor(e) {
|
|
3843
3843
|
this.exteriorRing = e, e.poly = this, this.interiorRings = [];
|
|
3844
3844
|
}
|
|
@@ -3855,7 +3855,7 @@ class Ei {
|
|
|
3855
3855
|
return e;
|
|
3856
3856
|
}
|
|
3857
3857
|
}
|
|
3858
|
-
class
|
|
3858
|
+
class Hr {
|
|
3859
3859
|
constructor(e) {
|
|
3860
3860
|
this.rings = e, this.polys = this._composePolys(e);
|
|
3861
3861
|
}
|
|
@@ -3872,19 +3872,19 @@ class qr {
|
|
|
3872
3872
|
for (let n = 0, r = e.length; n < r; n++) {
|
|
3873
3873
|
const o = e[n];
|
|
3874
3874
|
if (!o.poly)
|
|
3875
|
-
if (o.isExteriorRing()) t.push(new
|
|
3875
|
+
if (o.isExteriorRing()) t.push(new Li(o));
|
|
3876
3876
|
else {
|
|
3877
3877
|
const l = o.enclosingRing();
|
|
3878
|
-
l.poly || t.push(new
|
|
3878
|
+
l.poly || t.push(new Li(l)), l.poly.addInterior(o);
|
|
3879
3879
|
}
|
|
3880
3880
|
}
|
|
3881
3881
|
return t;
|
|
3882
3882
|
}
|
|
3883
3883
|
}
|
|
3884
|
-
class
|
|
3884
|
+
class Vr {
|
|
3885
3885
|
constructor(e) {
|
|
3886
3886
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : we.compare;
|
|
3887
|
-
this.queue = e, this.tree = new
|
|
3887
|
+
this.queue = e, this.tree = new Ft(t), this.segments = [];
|
|
3888
3888
|
}
|
|
3889
3889
|
process(e) {
|
|
3890
3890
|
const t = e.segment, n = [];
|
|
@@ -3954,33 +3954,33 @@ class Qr {
|
|
|
3954
3954
|
return r.push(n), e.consumedBy === void 0 && this.tree.add(e), r;
|
|
3955
3955
|
}
|
|
3956
3956
|
}
|
|
3957
|
-
const
|
|
3958
|
-
class
|
|
3957
|
+
const Si = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE || 1e6, Yr = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS || 1e6;
|
|
3958
|
+
class Xr {
|
|
3959
3959
|
run(e, t, n) {
|
|
3960
|
-
|
|
3961
|
-
const r = [new
|
|
3960
|
+
ue.type = e, Ve.reset();
|
|
3961
|
+
const r = [new Ei(t, !0)];
|
|
3962
3962
|
for (let a = 0, f = n.length; a < f; a++)
|
|
3963
|
-
r.push(new
|
|
3964
|
-
if (
|
|
3963
|
+
r.push(new Ei(n[a], !1));
|
|
3964
|
+
if (ue.numMultiPolys = r.length, ue.type === "difference") {
|
|
3965
3965
|
const a = r[0];
|
|
3966
3966
|
let f = 1;
|
|
3967
3967
|
for (; f < r.length; )
|
|
3968
3968
|
Wt(r[f].bbox, a.bbox) !== null ? f++ : r.splice(f, 1);
|
|
3969
3969
|
}
|
|
3970
|
-
if (
|
|
3970
|
+
if (ue.type === "intersection")
|
|
3971
3971
|
for (let a = 0, f = r.length; a < f; a++) {
|
|
3972
3972
|
const d = r[a];
|
|
3973
|
-
for (let m = a + 1,
|
|
3973
|
+
for (let m = a + 1, v = r.length; m < v; m++)
|
|
3974
3974
|
if (Wt(d.bbox, r[m].bbox) === null) return [];
|
|
3975
3975
|
}
|
|
3976
|
-
const o = new
|
|
3976
|
+
const o = new Ft(ne.compare);
|
|
3977
3977
|
for (let a = 0, f = r.length; a < f; a++) {
|
|
3978
3978
|
const d = r[a].getSweepEvents();
|
|
3979
|
-
for (let m = 0,
|
|
3980
|
-
if (o.insert(d[m]), o.size >
|
|
3979
|
+
for (let m = 0, v = d.length; m < v; m++)
|
|
3980
|
+
if (o.insert(d[m]), o.size > Si)
|
|
3981
3981
|
throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).");
|
|
3982
3982
|
}
|
|
3983
|
-
const l = new
|
|
3983
|
+
const l = new Vr(o);
|
|
3984
3984
|
let s = o.size, c = o.pop();
|
|
3985
3985
|
for (; c; ) {
|
|
3986
3986
|
const a = c.key;
|
|
@@ -3988,76 +3988,76 @@ class Vr {
|
|
|
3988
3988
|
const d = a.segment;
|
|
3989
3989
|
throw new Error(`Unable to pop() ${a.isLeft ? "left" : "right"} SweepEvent [${a.point.x}, ${a.point.y}] from segment #${d.id} [${d.leftSE.point.x}, ${d.leftSE.point.y}] -> [${d.rightSE.point.x}, ${d.rightSE.point.y}] from queue.`);
|
|
3990
3990
|
}
|
|
3991
|
-
if (o.size >
|
|
3991
|
+
if (o.size > Si)
|
|
3992
3992
|
throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");
|
|
3993
|
-
if (l.segments.length >
|
|
3993
|
+
if (l.segments.length > Yr)
|
|
3994
3994
|
throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");
|
|
3995
3995
|
const f = l.process(a);
|
|
3996
3996
|
for (let d = 0, m = f.length; d < m; d++) {
|
|
3997
|
-
const
|
|
3998
|
-
|
|
3997
|
+
const v = f[d];
|
|
3998
|
+
v.consumedBy === void 0 && o.insert(v);
|
|
3999
3999
|
}
|
|
4000
4000
|
s = o.size, c = o.pop();
|
|
4001
4001
|
}
|
|
4002
4002
|
Ve.reset();
|
|
4003
4003
|
const u = at.factory(l.segments);
|
|
4004
|
-
return new
|
|
4004
|
+
return new Hr(u).getGeom();
|
|
4005
4005
|
}
|
|
4006
4006
|
}
|
|
4007
|
-
const
|
|
4007
|
+
const ue = new Xr(), Kr = function(i) {
|
|
4008
4008
|
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), n = 1; n < e; n++)
|
|
4009
4009
|
t[n - 1] = arguments[n];
|
|
4010
|
-
return
|
|
4011
|
-
},
|
|
4010
|
+
return ue.run("union", i, t);
|
|
4011
|
+
}, Jr = function(i) {
|
|
4012
4012
|
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), n = 1; n < e; n++)
|
|
4013
4013
|
t[n - 1] = arguments[n];
|
|
4014
|
-
return
|
|
4015
|
-
},
|
|
4014
|
+
return ue.run("intersection", i, t);
|
|
4015
|
+
}, $r = function(i) {
|
|
4016
4016
|
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), n = 1; n < e; n++)
|
|
4017
4017
|
t[n - 1] = arguments[n];
|
|
4018
|
-
return
|
|
4019
|
-
},
|
|
4018
|
+
return ue.run("xor", i, t);
|
|
4019
|
+
}, eo = function(i) {
|
|
4020
4020
|
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), n = 1; n < e; n++)
|
|
4021
4021
|
t[n - 1] = arguments[n];
|
|
4022
|
-
return
|
|
4022
|
+
return ue.run("difference", i, t);
|
|
4023
4023
|
};
|
|
4024
|
-
var
|
|
4025
|
-
union:
|
|
4026
|
-
intersection:
|
|
4027
|
-
xor:
|
|
4028
|
-
difference:
|
|
4024
|
+
var zi = {
|
|
4025
|
+
union: Kr,
|
|
4026
|
+
intersection: Jr,
|
|
4027
|
+
xor: $r,
|
|
4028
|
+
difference: eo
|
|
4029
4029
|
};
|
|
4030
|
-
function
|
|
4030
|
+
function to(i, e = {}) {
|
|
4031
4031
|
const t = [];
|
|
4032
4032
|
if (Dt(i, (r) => {
|
|
4033
4033
|
t.push(r.coordinates);
|
|
4034
4034
|
}), t.length < 2)
|
|
4035
4035
|
throw new Error("Must have at least 2 geometries");
|
|
4036
|
-
const n =
|
|
4037
|
-
return n.length === 0 ? null : n.length === 1 ? Bt(n[0], e.properties) :
|
|
4036
|
+
const n = zi.union(t[0], ...t.slice(1));
|
|
4037
|
+
return n.length === 0 ? null : n.length === 1 ? Bt(n[0], e.properties) : Ai(n, e.properties);
|
|
4038
4038
|
}
|
|
4039
|
-
var
|
|
4040
|
-
function
|
|
4039
|
+
var ji = to;
|
|
4040
|
+
function io(i) {
|
|
4041
4041
|
const e = [];
|
|
4042
4042
|
if (Dt(i, (r) => {
|
|
4043
4043
|
e.push(r.coordinates);
|
|
4044
4044
|
}), e.length < 2)
|
|
4045
4045
|
throw new Error("Must have at least two features");
|
|
4046
|
-
const t = i.features[0].properties || {}, n =
|
|
4047
|
-
return n.length === 0 ? null : n.length === 1 ? Bt(n[0], t) :
|
|
4046
|
+
const t = i.features[0].properties || {}, n = zi.difference(e[0], ...e.slice(1));
|
|
4047
|
+
return n.length === 0 ? null : n.length === 1 ? Bt(n[0], t) : Ai(n, t);
|
|
4048
4048
|
}
|
|
4049
|
-
var
|
|
4050
|
-
function
|
|
4049
|
+
var no = io;
|
|
4050
|
+
function ro(i) {
|
|
4051
4051
|
if (!i)
|
|
4052
4052
|
throw new Error("geojson is required");
|
|
4053
4053
|
var e = [];
|
|
4054
|
-
return
|
|
4054
|
+
return Er(i, function(t) {
|
|
4055
4055
|
e.push(t);
|
|
4056
4056
|
}), He(e);
|
|
4057
4057
|
}
|
|
4058
|
-
var
|
|
4059
|
-
function
|
|
4060
|
-
const t =
|
|
4058
|
+
var oo = ro;
|
|
4059
|
+
function xi(i, e) {
|
|
4060
|
+
const t = no(
|
|
4061
4061
|
He([
|
|
4062
4062
|
Bt([
|
|
4063
4063
|
[
|
|
@@ -4074,7 +4074,7 @@ function Si(i, e) {
|
|
|
4074
4074
|
if (!t)
|
|
4075
4075
|
return;
|
|
4076
4076
|
t.properties = { isMask: !0 };
|
|
4077
|
-
const n = qe(Pt(i)), r = (n[2] - n[0]) / 360 / 1e3, o = n[0] < -180, l = n[2] > 180, s =
|
|
4077
|
+
const n = qe(Pt(i)), r = (n[2] - n[0]) / 360 / 1e3, o = n[0] < -180, l = n[2] > 180, s = oo(i);
|
|
4078
4078
|
if (s.features.length > 1 && (o || l))
|
|
4079
4079
|
for (const c of s.features) {
|
|
4080
4080
|
const u = qe(Pt(c));
|
|
@@ -4089,28 +4089,29 @@ function Si(i, e) {
|
|
|
4089
4089
|
}
|
|
4090
4090
|
e(
|
|
4091
4091
|
He([
|
|
4092
|
-
s.features.length < 2 ? i :
|
|
4092
|
+
s.features.length < 2 ? i : ji(s) ?? i,
|
|
4093
4093
|
t
|
|
4094
4094
|
])
|
|
4095
4095
|
);
|
|
4096
4096
|
}
|
|
4097
|
-
|
|
4098
|
-
var
|
|
4099
|
-
const
|
|
4097
|
+
const Mi = (i) => {
|
|
4098
|
+
var n, r, o;
|
|
4099
|
+
const e = (n = i == null ? void 0 : i.geometry) == null ? void 0 : n.type, t = (r = i == null ? void 0 : i.properties) != null && r.isMask ? 0 : e === "LineString" || e === "MultiLineString" ? 3 : 2;
|
|
4100
4100
|
return {
|
|
4101
4101
|
color: "#3170fe",
|
|
4102
4102
|
fillColor: "#000",
|
|
4103
|
-
fillOpacity: (
|
|
4104
|
-
weight:
|
|
4105
|
-
dashArray: [
|
|
4103
|
+
fillOpacity: (o = i == null ? void 0 : i.properties) != null && o.isMask ? 0.1 : 0,
|
|
4104
|
+
weight: t,
|
|
4105
|
+
dashArray: [t, t],
|
|
4106
4106
|
lineCap: "butt"
|
|
4107
4107
|
};
|
|
4108
|
-
}
|
|
4108
|
+
};
|
|
4109
|
+
function so(i, e = !0, t = !0, n = {}, r = {}, o = Mi) {
|
|
4109
4110
|
let l;
|
|
4110
4111
|
const s = [];
|
|
4111
4112
|
let c, u;
|
|
4112
|
-
const h =
|
|
4113
|
-
style: o,
|
|
4113
|
+
const h = re.geoJSON(void 0, {
|
|
4114
|
+
style: o === !0 ? Mi : o === !1 ? void 0 : o ?? void 0,
|
|
4114
4115
|
interactive: !1
|
|
4115
4116
|
}).addTo(i), a = (d) => {
|
|
4116
4117
|
l == null || l({
|
|
@@ -4119,11 +4120,11 @@ function ro(i, e = !0, t = !0, n = {}, r = {}, o = (l) => {
|
|
|
4119
4120
|
});
|
|
4120
4121
|
};
|
|
4121
4122
|
function f(d, m = !1) {
|
|
4122
|
-
const
|
|
4123
|
-
return new
|
|
4123
|
+
const v = document.createElement("div");
|
|
4124
|
+
return new Kn({ props: { displayIn: "leaflet" }, target: v }), new re.Marker(d, {
|
|
4124
4125
|
interactive: m,
|
|
4125
|
-
icon: new
|
|
4126
|
-
html:
|
|
4126
|
+
icon: new re.DivIcon({
|
|
4127
|
+
html: v,
|
|
4127
4128
|
className: "",
|
|
4128
4129
|
iconAnchor: [12, 26],
|
|
4129
4130
|
iconSize: [25, 30],
|
|
@@ -4138,7 +4139,7 @@ function ro(i, e = !0, t = !0, n = {}, r = {}, o = (l) => {
|
|
|
4138
4139
|
flyTo(d, m) {
|
|
4139
4140
|
i.flyTo([d[1], d[0]], m, { duration: 2, ...n });
|
|
4140
4141
|
},
|
|
4141
|
-
fitBounds(d, m,
|
|
4142
|
+
fitBounds(d, m, v) {
|
|
4142
4143
|
i.flyToBounds(
|
|
4143
4144
|
[
|
|
4144
4145
|
[d[1], d[0]],
|
|
@@ -4147,7 +4148,7 @@ function ro(i, e = !0, t = !0, n = {}, r = {}, o = (l) => {
|
|
|
4147
4148
|
{
|
|
4148
4149
|
padding: [m, m],
|
|
4149
4150
|
duration: 2,
|
|
4150
|
-
...
|
|
4151
|
+
...v ? { maxZoom: v } : {},
|
|
4151
4152
|
...r
|
|
4152
4153
|
}
|
|
4153
4154
|
);
|
|
@@ -4156,94 +4157,102 @@ function ro(i, e = !0, t = !0, n = {}, r = {}, o = (l) => {
|
|
|
4156
4157
|
i.getContainer().style.cursor = d ? "crosshair" : "";
|
|
4157
4158
|
},
|
|
4158
4159
|
setReverseMarker(d) {
|
|
4159
|
-
var
|
|
4160
|
+
var v;
|
|
4160
4161
|
if (!e)
|
|
4161
4162
|
return;
|
|
4162
4163
|
const m = d && [d[1], d[0]];
|
|
4163
|
-
u ? m ? u.setLatLng(m) : (u.remove(), u = void 0) : m && (u = (typeof e == "object" ? new
|
|
4164
|
+
u ? m ? u.setLatLng(m) : (u.remove(), u = void 0) : m && (e instanceof Function ? u = e(i) ?? void 0 : (u = (typeof e == "object" ? new re.Marker(m, e) : f(m)).addTo(i), (v = u.getElement()) == null || v.classList.add("marker-reverse")));
|
|
4164
4165
|
},
|
|
4165
4166
|
setMarkers(d, m) {
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
function p(v) {
|
|
4169
|
-
h.clearLayers(), v && h.addData(v);
|
|
4167
|
+
function v(b) {
|
|
4168
|
+
h.clearLayers(), b && h.addData(b);
|
|
4170
4169
|
}
|
|
4171
|
-
for (const
|
|
4172
|
-
|
|
4173
|
-
if (s.length = 0,
|
|
4174
|
-
let
|
|
4170
|
+
for (const b of s)
|
|
4171
|
+
b.remove();
|
|
4172
|
+
if (s.length = 0, v(), m) {
|
|
4173
|
+
let b = !1;
|
|
4175
4174
|
if (m.geometry.type === "GeometryCollection") {
|
|
4176
|
-
const
|
|
4177
|
-
(
|
|
4175
|
+
const p = m.geometry.geometries.filter(
|
|
4176
|
+
(_) => _.type === "Polygon" || _.type === "MultiPolygon"
|
|
4178
4177
|
);
|
|
4179
|
-
e: if (
|
|
4180
|
-
const
|
|
4181
|
-
He(
|
|
4178
|
+
e: if (p.length > 0) {
|
|
4179
|
+
const _ = ji(
|
|
4180
|
+
He(p.map((E) => Qe(E)))
|
|
4182
4181
|
);
|
|
4183
|
-
if (!
|
|
4182
|
+
if (!_)
|
|
4184
4183
|
break e;
|
|
4185
|
-
|
|
4184
|
+
xi(
|
|
4186
4185
|
{
|
|
4187
4186
|
...m,
|
|
4188
|
-
geometry:
|
|
4187
|
+
geometry: _.geometry
|
|
4189
4188
|
},
|
|
4190
|
-
|
|
4191
|
-
),
|
|
4189
|
+
v
|
|
4190
|
+
), b = !0;
|
|
4192
4191
|
} else {
|
|
4193
|
-
const
|
|
4194
|
-
(
|
|
4192
|
+
const _ = m.geometry.geometries.filter(
|
|
4193
|
+
(E) => E.type === "LineString" || E.type === "MultiLineString"
|
|
4195
4194
|
);
|
|
4196
|
-
|
|
4195
|
+
_.length > 0 && (v({
|
|
4197
4196
|
...m,
|
|
4198
|
-
geometry: { type: "GeometryCollection", geometries:
|
|
4199
|
-
}),
|
|
4197
|
+
geometry: { type: "GeometryCollection", geometries: _ }
|
|
4198
|
+
}), b = !0);
|
|
4200
4199
|
}
|
|
4201
4200
|
}
|
|
4202
|
-
if (!
|
|
4201
|
+
if (!b) {
|
|
4203
4202
|
if (m.geometry.type === "Polygon" || m.geometry.type === "MultiPolygon")
|
|
4204
|
-
|
|
4205
|
-
if (!
|
|
4203
|
+
xi(m, (p) => {
|
|
4204
|
+
if (!p)
|
|
4206
4205
|
return;
|
|
4207
|
-
const
|
|
4208
|
-
|
|
4206
|
+
const _ = [...p.features], E = qe(Pt(m)), S = E[2] - E[0];
|
|
4207
|
+
E[0] - S / 4 < -180 && _.push(...Ci(p, -360).features), E[2] + S / 4 > 180 && _.push(...Ci(p, 360).features), v(He(_));
|
|
4209
4208
|
});
|
|
4210
4209
|
else if (m.geometry.type === "LineString" || m.geometry.type === "MultiLineString") {
|
|
4211
|
-
|
|
4210
|
+
v(m);
|
|
4212
4211
|
return;
|
|
4213
4212
|
}
|
|
4214
4213
|
}
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
)
|
|
4214
|
+
if (e instanceof Function) {
|
|
4215
|
+
const p = e(i, m);
|
|
4216
|
+
p && s.push(p.addTo(i));
|
|
4217
|
+
} else if (e) {
|
|
4218
|
+
const p = [m.center[1], m.center[0]];
|
|
4219
|
+
s.push(
|
|
4220
|
+
typeof e == "object" ? new re.Marker(p, e) : f(p).addTo(i)
|
|
4221
|
+
);
|
|
4222
|
+
}
|
|
4219
4223
|
}
|
|
4220
4224
|
if (t)
|
|
4221
|
-
for (const
|
|
4222
|
-
if (
|
|
4225
|
+
for (const b of d ?? []) {
|
|
4226
|
+
if (b === m)
|
|
4223
4227
|
continue;
|
|
4224
|
-
const
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
]
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4228
|
+
const p = [
|
|
4229
|
+
b.center[1],
|
|
4230
|
+
b.center[0]
|
|
4231
|
+
];
|
|
4232
|
+
let _;
|
|
4233
|
+
if (t instanceof Function) {
|
|
4234
|
+
if (_ = t(i, b), !_)
|
|
4235
|
+
continue;
|
|
4236
|
+
} else
|
|
4237
|
+
_ = (typeof t == "object" ? new re.Marker(p, t) : f(p, !0)).addTo(i).bindTooltip(
|
|
4238
|
+
b.place_type[0] === "reverse" ? b.place_name : b.place_name.replace(/,.*/, ""),
|
|
4239
|
+
{
|
|
4240
|
+
direction: "top"
|
|
4241
|
+
}
|
|
4242
|
+
);
|
|
4243
|
+
const E = _.getElement();
|
|
4244
|
+
E && (E.addEventListener("click", (S) => {
|
|
4245
|
+
S.stopPropagation(), l == null || l({ type: "markerClick", id: b.id });
|
|
4237
4246
|
}), E.addEventListener("mouseenter", () => {
|
|
4238
|
-
l == null || l({ type: "markerMouseEnter", id:
|
|
4247
|
+
l == null || l({ type: "markerMouseEnter", id: b.id });
|
|
4239
4248
|
}), E.addEventListener("mouseleave", () => {
|
|
4240
|
-
l == null || l({ type: "markerMouseLeave", id:
|
|
4241
|
-
}), E.classList.toggle("marker-fuzzy", !!
|
|
4249
|
+
l == null || l({ type: "markerMouseLeave", id: b.id });
|
|
4250
|
+
}), E.classList.toggle("marker-fuzzy", !!b.matching_text)), s.push(_);
|
|
4242
4251
|
}
|
|
4243
4252
|
},
|
|
4244
4253
|
setSelectedMarker(d) {
|
|
4245
|
-
var m,
|
|
4246
|
-
c && ((m = c.getElement()) == null || m.classList.toggle("marker-selected", !1)), c = d > -1 ? s[d] : void 0, (
|
|
4254
|
+
var m, v;
|
|
4255
|
+
c && ((m = c.getElement()) == null || m.classList.toggle("marker-selected", !1)), c = d > -1 ? s[d] : void 0, (v = c == null ? void 0 : c.getElement()) == null || v.classList.toggle("marker-selected", !0);
|
|
4247
4256
|
},
|
|
4248
4257
|
getCenterAndZoom() {
|
|
4249
4258
|
const d = i.getCenter();
|
|
@@ -4251,23 +4260,30 @@ function ro(i, e = !0, t = !0, n = {}, r = {}, o = (l) => {
|
|
|
4251
4260
|
}
|
|
4252
4261
|
};
|
|
4253
4262
|
}
|
|
4254
|
-
function
|
|
4255
|
-
const t =
|
|
4263
|
+
function Ci(i, e) {
|
|
4264
|
+
const t = Mr(i);
|
|
4256
4265
|
for (const n of t.features)
|
|
4257
4266
|
if (n.geometry.type == "MultiPolygon")
|
|
4258
4267
|
for (const r of n.geometry.coordinates)
|
|
4259
|
-
|
|
4268
|
+
ki(r, e);
|
|
4260
4269
|
else
|
|
4261
|
-
|
|
4270
|
+
ki(n.geometry.coordinates, e);
|
|
4262
4271
|
return t;
|
|
4263
4272
|
}
|
|
4264
|
-
function
|
|
4273
|
+
function ki(i, e) {
|
|
4265
4274
|
for (const t of i)
|
|
4266
4275
|
for (const n of t)
|
|
4267
4276
|
n[0] += e;
|
|
4268
4277
|
}
|
|
4278
|
+
class Gt {
|
|
4279
|
+
// eslint-disable-next-line @typescript-eslint/no-useless-constructor, @typescript-eslint/no-unused-vars
|
|
4280
|
+
constructor(...e) {
|
|
4281
|
+
}
|
|
4282
|
+
}
|
|
4283
|
+
re.Util.extend(Gt.prototype, re.Control.prototype);
|
|
4284
|
+
re.Util.extend(Gt.prototype, re.Evented.prototype);
|
|
4269
4285
|
var ie, Pe;
|
|
4270
|
-
class
|
|
4286
|
+
class lo extends Gt {
|
|
4271
4287
|
constructor(t) {
|
|
4272
4288
|
super();
|
|
4273
4289
|
Lt(this, ie);
|
|
@@ -4276,14 +4292,14 @@ class oo extends de.Control {
|
|
|
4276
4292
|
}
|
|
4277
4293
|
onAdd(t) {
|
|
4278
4294
|
const n = document.createElement("div");
|
|
4279
|
-
n.className = "leaflet-ctrl-geocoder",
|
|
4295
|
+
n.className = "leaflet-ctrl-geocoder", re.DomEvent.disableClickPropagation(n), re.DomEvent.disableScrollPropagation(n);
|
|
4280
4296
|
const {
|
|
4281
4297
|
marker: r,
|
|
4282
4298
|
showResultMarkers: o,
|
|
4283
4299
|
flyTo: l,
|
|
4284
4300
|
fullGeometryStyle: s,
|
|
4285
4301
|
...c
|
|
4286
|
-
} =
|
|
4302
|
+
} = le(this, Pe), u = typeof l == "boolean" ? {} : l, h = so(
|
|
4287
4303
|
t,
|
|
4288
4304
|
r,
|
|
4289
4305
|
o,
|
|
@@ -4291,7 +4307,7 @@ class oo extends de.Control {
|
|
|
4291
4307
|
u,
|
|
4292
4308
|
s
|
|
4293
4309
|
);
|
|
4294
|
-
it(this, ie, new
|
|
4310
|
+
it(this, ie, new _r({
|
|
4295
4311
|
target: n,
|
|
4296
4312
|
props: {
|
|
4297
4313
|
mapController: h,
|
|
@@ -4309,9 +4325,9 @@ class oo extends de.Control {
|
|
|
4309
4325
|
"reverseToggle",
|
|
4310
4326
|
"queryChange"
|
|
4311
4327
|
])
|
|
4312
|
-
|
|
4328
|
+
le(this, ie).$on(
|
|
4313
4329
|
a,
|
|
4314
|
-
(f) =>
|
|
4330
|
+
(f) => this.fire(a.toLowerCase(), f.detail)
|
|
4315
4331
|
);
|
|
4316
4332
|
return n;
|
|
4317
4333
|
}
|
|
@@ -4324,41 +4340,41 @@ class oo extends de.Control {
|
|
|
4324
4340
|
flyTo: o,
|
|
4325
4341
|
fullGeometryStyle: l,
|
|
4326
4342
|
...s
|
|
4327
|
-
} =
|
|
4328
|
-
(c =
|
|
4343
|
+
} = le(this, Pe);
|
|
4344
|
+
(c = le(this, ie)) == null || c.$set(s);
|
|
4329
4345
|
}
|
|
4330
4346
|
setQuery(t, n = !0) {
|
|
4331
4347
|
var r;
|
|
4332
|
-
(r =
|
|
4348
|
+
(r = le(this, ie)) == null || r.setQuery(t, n);
|
|
4333
4349
|
}
|
|
4334
4350
|
clearMap() {
|
|
4335
4351
|
var t;
|
|
4336
|
-
(t =
|
|
4352
|
+
(t = le(this, ie)) == null || t.clearMap();
|
|
4337
4353
|
}
|
|
4338
4354
|
clearList() {
|
|
4339
4355
|
var t;
|
|
4340
|
-
(t =
|
|
4356
|
+
(t = le(this, ie)) == null || t.clearList();
|
|
4341
4357
|
}
|
|
4342
4358
|
focus() {
|
|
4343
4359
|
var t;
|
|
4344
|
-
(t =
|
|
4360
|
+
(t = le(this, ie)) == null || t.focus();
|
|
4345
4361
|
}
|
|
4346
4362
|
blur() {
|
|
4347
4363
|
var t;
|
|
4348
|
-
(t =
|
|
4364
|
+
(t = le(this, ie)) == null || t.blur();
|
|
4349
4365
|
}
|
|
4350
4366
|
onRemove() {
|
|
4351
4367
|
var t;
|
|
4352
|
-
(t =
|
|
4368
|
+
(t = le(this, ie)) == null || t.$destroy();
|
|
4353
4369
|
}
|
|
4354
4370
|
}
|
|
4355
4371
|
ie = new WeakMap(), Pe = new WeakMap();
|
|
4356
|
-
function
|
|
4357
|
-
return new
|
|
4372
|
+
function uo(...i) {
|
|
4373
|
+
return new lo(...i);
|
|
4358
4374
|
}
|
|
4359
|
-
window.L && typeof window.L == "object" && typeof window.L.control == "function" && (window.L.control.maptilerGeocoding =
|
|
4375
|
+
window.L && typeof window.L == "object" && typeof window.L.control == "function" && (window.L.control.maptilerGeocoding = uo);
|
|
4360
4376
|
export {
|
|
4361
|
-
|
|
4362
|
-
|
|
4377
|
+
lo as GeocodingControl,
|
|
4378
|
+
so as createLeafletMapController
|
|
4363
4379
|
};
|
|
4364
4380
|
//# sourceMappingURL=leaflet.js.map
|