@maptiler/geocoding-control 2.0.0-rc.9 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/leaflet.js +784 -799
- package/leaflet.js.map +1 -1
- package/leaflet.umd.js +3 -3
- package/leaflet.umd.js.map +1 -1
- package/maplibregl.js +1180 -1195
- package/maplibregl.js.map +1 -1
- package/maplibregl.umd.js +3 -3
- package/maplibregl.umd.js.map +1 -1
- package/maptilersdk.js +1155 -1170
- package/maptilersdk.js.map +1 -1
- package/maptilersdk.umd.js +3 -3
- package/maptilersdk.umd.js.map +1 -1
- package/openlayers.js +1405 -1420
- package/openlayers.js.map +1 -1
- package/openlayers.umd.js +3 -3
- package/openlayers.umd.js.map +1 -1
- package/package.json +2 -2
- package/react.js +783 -798
- package/react.js.map +1 -1
- package/react.umd.js +1 -1
- package/react.umd.js.map +1 -1
- package/svelte/GeocodingControl.svelte +21 -46
- package/svelte/GeocodingControl.svelte.d.ts +0 -1
- package/svelte/types.d.ts +0 -1
- package/types.d.ts +0 -1
- package/vanilla.js +590 -605
- package/vanilla.js.map +1 -1
- package/vanilla.umd.js +1 -1
- package/vanilla.umd.js.map +1 -1
package/leaflet.js
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var dn = Object.defineProperty;
|
|
2
|
+
var Zt = (i) => {
|
|
3
3
|
throw TypeError(i);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
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 _t = (i, e, t) => hn(i, typeof e != "symbol" ? e + "" : e, t), Qt = (i, e, t) => e.has(i) || Zt("Cannot " + t);
|
|
7
|
+
var te = (i, e, t) => (Qt(i, e, "read from private field"), t ? t.call(i) : e.get(i)), Et = (i, e, t) => e.has(i) ? Zt("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(i) : e.set(i, t), Lt = (i, e, t, n) => (Qt(i, e, "write to private field"), n ? n.call(i, t) : e.set(i, t), t);
|
|
8
|
+
import * as se from "leaflet";
|
|
9
9
|
function z() {
|
|
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 ki(i) {
|
|
19
19
|
return i();
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function Ht() {
|
|
22
22
|
return /* @__PURE__ */ Object.create(null);
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
i.forEach(
|
|
24
|
+
function ye(i) {
|
|
25
|
+
i.forEach(ki);
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function Ni(i) {
|
|
28
28
|
return typeof i == "function";
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function Se(i, e) {
|
|
31
31
|
return i != i ? e == e : i !== e || i && typeof i == "object" || typeof i == "function";
|
|
32
32
|
}
|
|
33
|
-
let
|
|
33
|
+
let it;
|
|
34
34
|
function Y(i, e) {
|
|
35
|
-
return i === e ? !0 : (
|
|
35
|
+
return i === e ? !0 : (it || (it = document.createElement("a")), it.href = e, i === it.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 = Pi(i, e, t, n);
|
|
43
43
|
return i[0](r);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
return i[1] && n ?
|
|
46
|
+
function Pi(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 _n(i, e, t, n) {
|
|
|
61
61
|
}
|
|
62
62
|
return e.dirty;
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function bn(i, e, t, n, r, o) {
|
|
65
65
|
if (r) {
|
|
66
|
-
const l =
|
|
66
|
+
const l = Pi(e, t, n, o);
|
|
67
67
|
i.p(l, r);
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function vn(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,10 +76,10 @@ function Ln(i) {
|
|
|
76
76
|
}
|
|
77
77
|
return -1;
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function Vt(i) {
|
|
80
80
|
return i ?? "";
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function T(i, e) {
|
|
83
83
|
i.appendChild(e);
|
|
84
84
|
}
|
|
85
85
|
function F(i, e, t) {
|
|
@@ -91,22 +91,22 @@ function B(i) {
|
|
|
91
91
|
function A(i) {
|
|
92
92
|
return document.createElement(i);
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function ue(i) {
|
|
95
95
|
return document.createElementNS("http://www.w3.org/2000/svg", i);
|
|
96
96
|
}
|
|
97
|
-
function
|
|
97
|
+
function _e(i) {
|
|
98
98
|
return document.createTextNode(i);
|
|
99
99
|
}
|
|
100
100
|
function ee() {
|
|
101
|
-
return
|
|
101
|
+
return _e(" ");
|
|
102
102
|
}
|
|
103
|
-
function
|
|
104
|
-
return
|
|
103
|
+
function wn() {
|
|
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 xn(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
|
-
function
|
|
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 Yt(i, e) {
|
|
125
125
|
i.value = e ?? "";
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function re(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
|
-
let
|
|
134
|
-
function
|
|
135
|
-
|
|
133
|
+
let qe;
|
|
134
|
+
function Ge(i) {
|
|
135
|
+
qe = i;
|
|
136
136
|
}
|
|
137
|
-
function
|
|
138
|
-
if (!
|
|
139
|
-
return
|
|
137
|
+
function Ti() {
|
|
138
|
+
if (!qe) throw new Error("Function called outside component initialization");
|
|
139
|
+
return qe;
|
|
140
140
|
}
|
|
141
|
-
function
|
|
142
|
-
|
|
141
|
+
function Sn(i) {
|
|
142
|
+
Ti().$$.on_destroy.push(i);
|
|
143
143
|
}
|
|
144
|
-
function
|
|
145
|
-
const i =
|
|
144
|
+
function xn() {
|
|
145
|
+
const i = Ti();
|
|
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,90 +159,90 @@ function Nn() {
|
|
|
159
159
|
return !0;
|
|
160
160
|
};
|
|
161
161
|
}
|
|
162
|
-
function
|
|
162
|
+
function Xt(i, e) {
|
|
163
163
|
const t = i.$$.callbacks[e.type];
|
|
164
164
|
t && t.slice().forEach((n) => n.call(this, e));
|
|
165
165
|
}
|
|
166
|
-
const
|
|
167
|
-
let
|
|
168
|
-
const
|
|
169
|
-
let
|
|
170
|
-
function
|
|
171
|
-
|
|
166
|
+
const We = [], Ct = [];
|
|
167
|
+
let ze = [];
|
|
168
|
+
const Kt = [], Mn = /* @__PURE__ */ Promise.resolve();
|
|
169
|
+
let kt = !1;
|
|
170
|
+
function Cn() {
|
|
171
|
+
kt || (kt = !0, Mn.then(Ri));
|
|
172
172
|
}
|
|
173
|
-
function
|
|
174
|
-
|
|
173
|
+
function Nt(i) {
|
|
174
|
+
ze.push(i);
|
|
175
175
|
}
|
|
176
|
-
const
|
|
177
|
-
let
|
|
178
|
-
function
|
|
179
|
-
if (
|
|
176
|
+
const St = /* @__PURE__ */ new Set();
|
|
177
|
+
let Oe = 0;
|
|
178
|
+
function Ri() {
|
|
179
|
+
if (Oe !== 0)
|
|
180
180
|
return;
|
|
181
|
-
const i =
|
|
181
|
+
const i = qe;
|
|
182
182
|
do {
|
|
183
183
|
try {
|
|
184
|
-
for (;
|
|
185
|
-
const e =
|
|
186
|
-
|
|
184
|
+
for (; Oe < We.length; ) {
|
|
185
|
+
const e = We[Oe];
|
|
186
|
+
Oe++, Ge(e), kn(e.$$);
|
|
187
187
|
}
|
|
188
188
|
} catch (e) {
|
|
189
|
-
throw
|
|
189
|
+
throw We.length = 0, Oe = 0, e;
|
|
190
190
|
}
|
|
191
|
-
for (
|
|
192
|
-
for (let e = 0; e <
|
|
193
|
-
const t =
|
|
194
|
-
|
|
191
|
+
for (Ge(null), We.length = 0, Oe = 0; Ct.length; ) Ct.pop()();
|
|
192
|
+
for (let e = 0; e < ze.length; e += 1) {
|
|
193
|
+
const t = ze[e];
|
|
194
|
+
St.has(t) || (St.add(t), t());
|
|
195
195
|
}
|
|
196
|
-
|
|
197
|
-
} while (
|
|
198
|
-
for (;
|
|
199
|
-
|
|
200
|
-
|
|
196
|
+
ze.length = 0;
|
|
197
|
+
} while (We.length);
|
|
198
|
+
for (; Kt.length; )
|
|
199
|
+
Kt.pop()();
|
|
200
|
+
kt = !1, St.clear(), Ge(i);
|
|
201
201
|
}
|
|
202
|
-
function
|
|
202
|
+
function kn(i) {
|
|
203
203
|
if (i.fragment !== null) {
|
|
204
|
-
i.update(),
|
|
204
|
+
i.update(), ye(i.before_update);
|
|
205
205
|
const e = i.dirty;
|
|
206
|
-
i.dirty = [-1], i.fragment && i.fragment.p(i.ctx, e), i.after_update.forEach(
|
|
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
|
+
ze.forEach((n) => i.indexOf(n) === -1 ? e.push(n) : t.push(n)), t.forEach((n) => n()), ze = e;
|
|
212
212
|
}
|
|
213
|
-
const
|
|
214
|
-
let
|
|
215
|
-
function
|
|
216
|
-
|
|
213
|
+
const nt = /* @__PURE__ */ new Set();
|
|
214
|
+
let Ne;
|
|
215
|
+
function rt() {
|
|
216
|
+
Ne = {
|
|
217
217
|
r: 0,
|
|
218
218
|
c: [],
|
|
219
|
-
p:
|
|
219
|
+
p: Ne
|
|
220
220
|
// parent group
|
|
221
221
|
};
|
|
222
222
|
}
|
|
223
|
-
function
|
|
224
|
-
|
|
223
|
+
function ot() {
|
|
224
|
+
Ne.r || ye(Ne.c), Ne = Ne.p;
|
|
225
225
|
}
|
|
226
226
|
function G(i, e) {
|
|
227
|
-
i && i.i && (
|
|
227
|
+
i && i.i && (nt.delete(i), i.i(e));
|
|
228
228
|
}
|
|
229
229
|
function H(i, e, t, n) {
|
|
230
230
|
if (i && i.o) {
|
|
231
|
-
if (
|
|
232
|
-
|
|
233
|
-
|
|
231
|
+
if (nt.has(i)) return;
|
|
232
|
+
nt.add(i), Ne.c.push(() => {
|
|
233
|
+
nt.delete(i), n && (t && i.d(1), n());
|
|
234
234
|
}), i.o(e);
|
|
235
235
|
} else n && n();
|
|
236
236
|
}
|
|
237
|
-
function
|
|
237
|
+
function Jt(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
|
H(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, d, a) {
|
|
246
246
|
let f = i.length, h = o.length, g = f;
|
|
247
247
|
const v = {};
|
|
248
248
|
for (; g--; ) v[i[g].key] = g;
|
|
@@ -265,28 +265,28 @@ function An(i, e, t, n, r, o, l, s, c, u, d, a) {
|
|
|
265
265
|
p.has(b.key) || c(b, l);
|
|
266
266
|
}
|
|
267
267
|
for (; h; ) k(w[h - 1]);
|
|
268
|
-
return
|
|
268
|
+
return ye(L), w;
|
|
269
269
|
}
|
|
270
|
-
function
|
|
270
|
+
function Ee(i) {
|
|
271
271
|
i && i.c();
|
|
272
272
|
}
|
|
273
273
|
function ge(i, e, t) {
|
|
274
274
|
const { fragment: n, after_update: r } = i.$$;
|
|
275
|
-
n && n.m(e, t),
|
|
276
|
-
const o = i.$$.on_mount.map(
|
|
277
|
-
i.$$.on_destroy ? i.$$.on_destroy.push(...o) :
|
|
278
|
-
}), r.forEach(
|
|
275
|
+
n && n.m(e, t), Nt(() => {
|
|
276
|
+
const o = i.$$.on_mount.map(ki).filter(Ni);
|
|
277
|
+
i.$$.on_destroy ? i.$$.on_destroy.push(...o) : ye(o), i.$$.on_mount = [];
|
|
278
|
+
}), r.forEach(Nt);
|
|
279
279
|
}
|
|
280
|
-
function
|
|
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 && (
|
|
284
|
+
function Rn(i, e) {
|
|
285
|
+
i.$$.dirty[0] === -1 && (We.push(i), Cn(), i.$$.dirty.fill(0)), i.$$.dirty[e / 31 | 0] |= 1 << e % 31;
|
|
286
286
|
}
|
|
287
|
-
function
|
|
288
|
-
const c =
|
|
289
|
-
|
|
287
|
+
function xe(i, e, t, n, r, o, l = null, s = [-1]) {
|
|
288
|
+
const c = qe;
|
|
289
|
+
Ge(i);
|
|
290
290
|
const u = i.$$ = {
|
|
291
291
|
fragment: null,
|
|
292
292
|
ctx: [],
|
|
@@ -294,7 +294,7 @@ function Ce(i, e, t, n, r, o, l = null, s = [-1]) {
|
|
|
294
294
|
props: o,
|
|
295
295
|
update: z,
|
|
296
296
|
not_equal: r,
|
|
297
|
-
bound:
|
|
297
|
+
bound: Ht(),
|
|
298
298
|
// lifecycle
|
|
299
299
|
on_mount: [],
|
|
300
300
|
on_destroy: [],
|
|
@@ -303,7 +303,7 @@ function Ce(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: Ht(),
|
|
307
307
|
dirty: s,
|
|
308
308
|
skip_bound: !1,
|
|
309
309
|
root: e.target || c.$$.root
|
|
@@ -312,18 +312,18 @@ function Ce(i, e, t, n, r, o, l = null, s = [-1]) {
|
|
|
312
312
|
let d = !1;
|
|
313
313
|
if (u.ctx = t ? t(i, e.props || {}, (a, f, ...h) => {
|
|
314
314
|
const g = h.length ? h[0] : f;
|
|
315
|
-
return u.ctx && r(u.ctx[a], u.ctx[a] = g) && (!u.skip_bound && u.bound[a] && u.bound[a](g), d &&
|
|
316
|
-
}) : [], u.update(), d = !0,
|
|
315
|
+
return u.ctx && r(u.ctx[a], u.ctx[a] = g) && (!u.skip_bound && u.bound[a] && u.bound[a](g), d && Rn(i, a)), f;
|
|
316
|
+
}) : [], u.update(), d = !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 && G(i.$$.fragment), ge(i, e.target, e.anchor),
|
|
322
|
+
e.intro && G(i.$$.fragment), ge(i, e.target, e.anchor), Ri();
|
|
323
323
|
}
|
|
324
|
-
|
|
324
|
+
Ge(c);
|
|
325
325
|
}
|
|
326
|
-
class
|
|
326
|
+
class Me {
|
|
327
327
|
constructor() {
|
|
328
328
|
/**
|
|
329
329
|
* ### PRIVATE API
|
|
@@ -332,7 +332,7 @@ class ke {
|
|
|
332
332
|
*
|
|
333
333
|
* @type {any}
|
|
334
334
|
*/
|
|
335
|
-
|
|
335
|
+
_t(this, "$$");
|
|
336
336
|
/**
|
|
337
337
|
* ### PRIVATE API
|
|
338
338
|
*
|
|
@@ -340,11 +340,11 @@ class ke {
|
|
|
340
340
|
*
|
|
341
341
|
* @type {any}
|
|
342
342
|
*/
|
|
343
|
-
|
|
343
|
+
_t(this, "$$set");
|
|
344
344
|
}
|
|
345
345
|
/** @returns {void} */
|
|
346
346
|
$destroy() {
|
|
347
|
-
|
|
347
|
+
me(this, 1), this.$destroy = z;
|
|
348
348
|
}
|
|
349
349
|
/**
|
|
350
350
|
* @template {Extract<keyof Events, string>} K
|
|
@@ -353,7 +353,7 @@ class ke {
|
|
|
353
353
|
* @returns {() => void}
|
|
354
354
|
*/
|
|
355
355
|
$on(e, t) {
|
|
356
|
-
if (!
|
|
356
|
+
if (!Ni(t))
|
|
357
357
|
return z;
|
|
358
358
|
const n = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
|
|
359
359
|
return n.push(t), () => {
|
|
@@ -366,19 +366,19 @@ class ke {
|
|
|
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 = ue("svg"), t = ue("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
|
-
F(n, e, r),
|
|
381
|
+
F(n, e, r), T(e, t);
|
|
382
382
|
},
|
|
383
383
|
p: z,
|
|
384
384
|
i: z,
|
|
@@ -388,19 +388,19 @@ function Bn(i) {
|
|
|
388
388
|
}
|
|
389
389
|
};
|
|
390
390
|
}
|
|
391
|
-
class
|
|
391
|
+
class Ii extends Me {
|
|
392
392
|
constructor(e) {
|
|
393
|
-
super(),
|
|
393
|
+
super(), xe(this, e, null, On, Se, {});
|
|
394
394
|
}
|
|
395
395
|
}
|
|
396
|
-
function
|
|
396
|
+
function An(i) {
|
|
397
397
|
let e, t;
|
|
398
398
|
return {
|
|
399
399
|
c() {
|
|
400
|
-
e =
|
|
400
|
+
e = ue("svg"), t = ue("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
|
-
F(n, e, r),
|
|
403
|
+
F(n, e, r), T(e, t);
|
|
404
404
|
},
|
|
405
405
|
p: z,
|
|
406
406
|
i: z,
|
|
@@ -410,12 +410,12 @@ function Dn(i) {
|
|
|
410
410
|
}
|
|
411
411
|
};
|
|
412
412
|
}
|
|
413
|
-
class
|
|
413
|
+
class Oi extends Me {
|
|
414
414
|
constructor(e) {
|
|
415
|
-
super(),
|
|
415
|
+
super(), xe(this, e, null, An, Se, {});
|
|
416
416
|
}
|
|
417
417
|
}
|
|
418
|
-
function
|
|
418
|
+
function Wn(i) {
|
|
419
419
|
let e, t;
|
|
420
420
|
return {
|
|
421
421
|
c() {
|
|
@@ -446,7 +446,7 @@ function Fn(i) {
|
|
|
446
446
|
}
|
|
447
447
|
};
|
|
448
448
|
}
|
|
449
|
-
function
|
|
449
|
+
function zn(i) {
|
|
450
450
|
let e, t;
|
|
451
451
|
return {
|
|
452
452
|
c() {
|
|
@@ -477,7 +477,7 @@ function Un(i) {
|
|
|
477
477
|
}
|
|
478
478
|
};
|
|
479
479
|
}
|
|
480
|
-
function
|
|
480
|
+
function Bn(i) {
|
|
481
481
|
let e, t;
|
|
482
482
|
return {
|
|
483
483
|
c() {
|
|
@@ -508,7 +508,7 @@ function Gn(i) {
|
|
|
508
508
|
}
|
|
509
509
|
};
|
|
510
510
|
}
|
|
511
|
-
function
|
|
511
|
+
function Dn(i) {
|
|
512
512
|
let e, t;
|
|
513
513
|
return {
|
|
514
514
|
c() {
|
|
@@ -539,7 +539,7 @@ function jn(i) {
|
|
|
539
539
|
}
|
|
540
540
|
};
|
|
541
541
|
}
|
|
542
|
-
function
|
|
542
|
+
function Fn(i) {
|
|
543
543
|
let e, t;
|
|
544
544
|
return {
|
|
545
545
|
c() {
|
|
@@ -570,7 +570,7 @@ function qn(i) {
|
|
|
570
570
|
}
|
|
571
571
|
};
|
|
572
572
|
}
|
|
573
|
-
function
|
|
573
|
+
function Un(i) {
|
|
574
574
|
let e, t;
|
|
575
575
|
return {
|
|
576
576
|
c() {
|
|
@@ -601,7 +601,7 @@ function Zn(i) {
|
|
|
601
601
|
}
|
|
602
602
|
};
|
|
603
603
|
}
|
|
604
|
-
function
|
|
604
|
+
function Gn(i) {
|
|
605
605
|
let e, t;
|
|
606
606
|
return {
|
|
607
607
|
c() {
|
|
@@ -632,7 +632,7 @@ function Qn(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() {
|
|
@@ -668,21 +668,21 @@ function Hn(i) {
|
|
|
668
668
|
}
|
|
669
669
|
};
|
|
670
670
|
}
|
|
671
|
-
function
|
|
671
|
+
function $t(i) {
|
|
672
672
|
let e, t;
|
|
673
673
|
return {
|
|
674
674
|
c() {
|
|
675
|
-
e = A("span"), t =
|
|
675
|
+
e = A("span"), t = _e(
|
|
676
676
|
/*placeType*/
|
|
677
677
|
i[6]
|
|
678
678
|
), y(e, "class", "secondary svelte-ltkwvy");
|
|
679
679
|
},
|
|
680
680
|
m(n, r) {
|
|
681
|
-
F(n, e, r),
|
|
681
|
+
F(n, e, r), T(e, t);
|
|
682
682
|
},
|
|
683
683
|
p(n, r) {
|
|
684
684
|
r & /*placeType*/
|
|
685
|
-
64 &&
|
|
685
|
+
64 && je(
|
|
686
686
|
t,
|
|
687
687
|
/*placeType*/
|
|
688
688
|
n[6]
|
|
@@ -693,7 +693,7 @@ function ii(i) {
|
|
|
693
693
|
}
|
|
694
694
|
};
|
|
695
695
|
}
|
|
696
|
-
function
|
|
696
|
+
function qn(i) {
|
|
697
697
|
let e, t, n, r, o, l, s, c, u, d = (
|
|
698
698
|
/*isReverse*/
|
|
699
699
|
(i[7] ? (
|
|
@@ -727,27 +727,27 @@ function Vn(i) {
|
|
|
727
727
|
1 && (n = null), C & /*feature*/
|
|
728
728
|
1 && (r = null), C & /*feature*/
|
|
729
729
|
1 && (o = null), /*imageUrl*/
|
|
730
|
-
_[5] ?
|
|
730
|
+
_[5] ? jn : (
|
|
731
731
|
/*feature*/
|
|
732
|
-
_[0].address ?
|
|
733
|
-
_[0].id.startsWith("road.")), t ?
|
|
734
|
-
_[0].id.startsWith("address.")), n ?
|
|
735
|
-
_[0].id.startsWith("postal_code.")), r ?
|
|
736
|
-
_[0].id.startsWith("poi.")), o ?
|
|
732
|
+
_[0].address ? Gn : (t == null && (t = !!/*feature*/
|
|
733
|
+
_[0].id.startsWith("road.")), t ? Un : (n == null && (n = !!/*feature*/
|
|
734
|
+
_[0].id.startsWith("address.")), n ? Fn : (r == null && (r = !!/*feature*/
|
|
735
|
+
_[0].id.startsWith("postal_code.")), r ? Dn : (o == null && (o = !!/*feature*/
|
|
736
|
+
_[0].id.startsWith("poi.")), o ? Bn : (
|
|
737
737
|
/*isReverse*/
|
|
738
|
-
_[7] ?
|
|
738
|
+
_[7] ? zn : Wn
|
|
739
739
|
)))))
|
|
740
740
|
);
|
|
741
741
|
}
|
|
742
|
-
let M = E(i, -1), k = M(i), b = h &&
|
|
742
|
+
let M = E(i, -1), k = M(i), b = h && $t(i);
|
|
743
743
|
return {
|
|
744
744
|
c() {
|
|
745
|
-
e = A("li"), k.c(), l = ee(), s = A("span"), c = A("span"), u = A("span"), a =
|
|
745
|
+
e = A("li"), k.c(), l = ee(), s = A("span"), c = A("span"), u = A("span"), a = _e(d), f = ee(), b && b.c(), g = ee(), v = A("span"), p = _e(w), 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"), re(
|
|
751
751
|
e,
|
|
752
752
|
"selected",
|
|
753
753
|
/*selected*/
|
|
@@ -755,7 +755,7 @@ function Vn(i) {
|
|
|
755
755
|
);
|
|
756
756
|
},
|
|
757
757
|
m(_, C) {
|
|
758
|
-
F(_, e, C), k.m(e, null),
|
|
758
|
+
F(_, e, C), k.m(e, null), T(e, l), T(e, s), T(s, c), T(c, u), T(u, a), T(c, f), b && b.m(c, null), T(s, g), T(s, v), T(v, p), S || (L = [
|
|
759
759
|
J(
|
|
760
760
|
e,
|
|
761
761
|
"mouseenter",
|
|
@@ -779,7 +779,7 @@ function Vn(i) {
|
|
|
779
779
|
) : (
|
|
780
780
|
/*feature*/
|
|
781
781
|
_[0].place_name.replace(/,.*/, "")
|
|
782
|
-
)) + "") &&
|
|
782
|
+
)) + "") && je(a, d), C & /*showPlaceType, feature, imageUrl*/
|
|
783
783
|
37 && (h = /*showPlaceType*/
|
|
784
784
|
_[2] === "always" || /*showPlaceType*/
|
|
785
785
|
_[2] !== "never" && !/*feature*/
|
|
@@ -789,19 +789,19 @@ function Vn(i) {
|
|
|
789
789
|
_[0].id.startsWith("postal_code.") && (!/*feature*/
|
|
790
790
|
_[0].id.startsWith("poi.") || !/*imageUrl*/
|
|
791
791
|
_[5]) && !/*isReverse*/
|
|
792
|
-
_[7]), h ? b ? b.p(_, C) : (b =
|
|
792
|
+
_[7]), h ? b ? b.p(_, C) : (b = $t(_), b.c(), b.m(c, null)) : b && (b.d(1), b = null), C & /*feature*/
|
|
793
793
|
1 && w !== (w = /*isReverse*/
|
|
794
794
|
(_[7] ? "" : (
|
|
795
795
|
/*feature*/
|
|
796
796
|
_[0].place_name.replace(/[^,]*,?\s*/, "")
|
|
797
|
-
)) + "") &&
|
|
797
|
+
)) + "") && je(p, w), C & /*selected*/
|
|
798
798
|
2 && y(
|
|
799
799
|
e,
|
|
800
800
|
"data-selected",
|
|
801
801
|
/*selected*/
|
|
802
802
|
_[1]
|
|
803
803
|
), C & /*selected*/
|
|
804
|
-
2 &&
|
|
804
|
+
2 && re(
|
|
805
805
|
e,
|
|
806
806
|
"selected",
|
|
807
807
|
/*selected*/
|
|
@@ -811,11 +811,11 @@ function Vn(i) {
|
|
|
811
811
|
i: z,
|
|
812
812
|
o: z,
|
|
813
813
|
d(_) {
|
|
814
|
-
_ && B(e), k.d(), b && b.d(), S = !1,
|
|
814
|
+
_ && B(e), k.d(), b && b.d(), S = !1, ye(L);
|
|
815
815
|
}
|
|
816
816
|
};
|
|
817
817
|
}
|
|
818
|
-
function
|
|
818
|
+
function Zn(i, e, t) {
|
|
819
819
|
var L;
|
|
820
820
|
let n, r, { feature: o } = e, { selected: l = !1 } = e, { showPlaceType: s } = e, { missingIconsCache: c } = e, { iconsBaseUrl: u } = e;
|
|
821
821
|
const d = (L = o.properties) == null ? void 0 : L.categories;
|
|
@@ -824,10 +824,10 @@ function Yn(i, e, t) {
|
|
|
824
824
|
f && c.add(f), t(10, h++, h);
|
|
825
825
|
}
|
|
826
826
|
function w(E) {
|
|
827
|
-
|
|
827
|
+
Xt.call(this, i, E);
|
|
828
828
|
}
|
|
829
829
|
function p(E) {
|
|
830
|
-
|
|
830
|
+
Xt.call(this, i, E);
|
|
831
831
|
}
|
|
832
832
|
const S = () => v();
|
|
833
833
|
return i.$$set = (E) => {
|
|
@@ -859,9 +859,9 @@ function Yn(i, e, t) {
|
|
|
859
859
|
S
|
|
860
860
|
];
|
|
861
861
|
}
|
|
862
|
-
class
|
|
862
|
+
class Qn extends Me {
|
|
863
863
|
constructor(e) {
|
|
864
|
-
super(),
|
|
864
|
+
super(), xe(this, e, Zn, qn, Se, {
|
|
865
865
|
feature: 0,
|
|
866
866
|
selected: 1,
|
|
867
867
|
showPlaceType: 2,
|
|
@@ -870,7 +870,7 @@ class Xn extends ke {
|
|
|
870
870
|
});
|
|
871
871
|
}
|
|
872
872
|
}
|
|
873
|
-
function
|
|
873
|
+
function Hn(i) {
|
|
874
874
|
let e;
|
|
875
875
|
return {
|
|
876
876
|
c() {
|
|
@@ -887,22 +887,22 @@ function Kn(i) {
|
|
|
887
887
|
}
|
|
888
888
|
};
|
|
889
889
|
}
|
|
890
|
-
class
|
|
890
|
+
class Vn extends Me {
|
|
891
891
|
constructor(e) {
|
|
892
|
-
super(),
|
|
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 = ue("svg"), t = ue("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"), re(
|
|
901
901
|
e,
|
|
902
902
|
"in-map",
|
|
903
903
|
/*displayIn*/
|
|
904
904
|
i[0] !== "list"
|
|
905
|
-
),
|
|
905
|
+
), re(
|
|
906
906
|
e,
|
|
907
907
|
"list-icon",
|
|
908
908
|
/*displayIn*/
|
|
@@ -910,19 +910,19 @@ function $n(i) {
|
|
|
910
910
|
);
|
|
911
911
|
},
|
|
912
912
|
m(r, o) {
|
|
913
|
-
F(r, e, o),
|
|
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 && re(
|
|
920
920
|
e,
|
|
921
921
|
"in-map",
|
|
922
922
|
/*displayIn*/
|
|
923
923
|
r[0] !== "list"
|
|
924
924
|
), o & /*displayIn*/
|
|
925
|
-
1 &&
|
|
925
|
+
1 && re(
|
|
926
926
|
e,
|
|
927
927
|
"list-icon",
|
|
928
928
|
/*displayIn*/
|
|
@@ -936,25 +936,25 @@ function $n(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(),
|
|
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 = ue("svg"), t = ue("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
|
-
F(n, e, r),
|
|
957
|
+
F(n, e, r), T(e, t);
|
|
958
958
|
},
|
|
959
959
|
p: z,
|
|
960
960
|
i: z,
|
|
@@ -964,19 +964,19 @@ function ir(i) {
|
|
|
964
964
|
}
|
|
965
965
|
};
|
|
966
966
|
}
|
|
967
|
-
class
|
|
967
|
+
class $n extends Me {
|
|
968
968
|
constructor(e) {
|
|
969
|
-
super(),
|
|
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 = ue("svg"), t = ue("circle"), n = ue("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
|
-
F(r, e, o),
|
|
979
|
+
F(r, e, o), T(e, t), T(e, n);
|
|
980
980
|
},
|
|
981
981
|
p: z,
|
|
982
982
|
i: z,
|
|
@@ -986,31 +986,31 @@ function rr(i) {
|
|
|
986
986
|
}
|
|
987
987
|
};
|
|
988
988
|
}
|
|
989
|
-
class
|
|
989
|
+
class tr extends Me {
|
|
990
990
|
constructor(e) {
|
|
991
|
-
super(),
|
|
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
|
}
|
|
998
|
-
function
|
|
998
|
+
function Ze(i) {
|
|
999
999
|
const e = [...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
|
-
let
|
|
1003
|
-
async function
|
|
1002
|
+
let De;
|
|
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]))) {
|
|
1007
1007
|
if (r.type === "fixed")
|
|
1008
1008
|
return r.coordinates.join(",");
|
|
1009
1009
|
e: if (r.type === "client-geolocation") {
|
|
1010
|
-
if (
|
|
1011
|
-
if (!
|
|
1010
|
+
if (De && r.cachedLocationExpiry && De.time + r.cachedLocationExpiry > Date.now()) {
|
|
1011
|
+
if (!De.coords)
|
|
1012
1012
|
break e;
|
|
1013
|
-
return
|
|
1013
|
+
return De.coords;
|
|
1014
1014
|
}
|
|
1015
1015
|
let o;
|
|
1016
1016
|
try {
|
|
@@ -1031,7 +1031,7 @@ async function lr(i, e, t) {
|
|
|
1031
1031
|
}), o;
|
|
1032
1032
|
} catch {
|
|
1033
1033
|
} finally {
|
|
1034
|
-
r.cachedLocationExpiry && (
|
|
1034
|
+
r.cachedLocationExpiry && (De = {
|
|
1035
1035
|
time: Date.now(),
|
|
1036
1036
|
coords: o
|
|
1037
1037
|
});
|
|
@@ -1045,8 +1045,8 @@ async function lr(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, ei = /^([+-]?[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,})$/, ti = /^(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, ii = /^(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, ni = /^(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, ri = /^(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,7 +1055,7 @@ function ar(i) {
|
|
|
1055
1055
|
i == "DD" && (c = `${r}° ${l}, ${o}° ${s}`);
|
|
1056
1056
|
const u = Math.floor(r), d = Math.floor(o), a = (r - u) * 60, f = (o - d) * 60;
|
|
1057
1057
|
if (i == "DM") {
|
|
1058
|
-
let h =
|
|
1058
|
+
let h = oi(a, 3).toFixed(3).padStart(6, "0"), g = oi(f, 3).toFixed(3).padStart(6, "0");
|
|
1059
1059
|
h.endsWith(".000") && g.endsWith(".000") && (h = h.replace(/\.000$/, ""), g = g.replace(/\.000$/, "")), c = `${u}° ${h}' ${l}, ${d}° ${g}' ${s}`;
|
|
1060
1060
|
}
|
|
1061
1061
|
if (i == "DMS") {
|
|
@@ -1068,22 +1068,22 @@ function ar(i) {
|
|
|
1068
1068
|
} else
|
|
1069
1069
|
throw new Error("no decimal coordinates to convert");
|
|
1070
1070
|
}
|
|
1071
|
-
function
|
|
1071
|
+
function oi(i, e) {
|
|
1072
1072
|
const t = Math.pow(10, e);
|
|
1073
1073
|
return Math.round((i + Number.EPSILON) * t) / t;
|
|
1074
1074
|
}
|
|
1075
|
-
function
|
|
1075
|
+
function Wt(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 (ei.test(i))
|
|
1081
|
+
if (s = ei.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 (ti.test(i))
|
|
1086
|
+
if (s = ti.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 Dt(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 (ii.test(i))
|
|
1095
|
+
if (s = ii.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 (ni.test(i))
|
|
1100
|
+
if (s = ni.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 (ri.test(i)) {
|
|
1105
|
+
if (s = ri.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]);
|
|
@@ -1156,13 +1156,13 @@ function Dt(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 si(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 si(this.decimalLatitude, Number(e[0])) && si(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
|
-
|
|
1205
|
-
const
|
|
1204
|
+
Wt.to = lr;
|
|
1205
|
+
const ur = [
|
|
1206
1206
|
{
|
|
1207
1207
|
verbatimCoordinates: "40.123, -74.123",
|
|
1208
1208
|
verbatimLatitude: "40.123",
|
|
@@ -1343,10 +1343,10 @@ const dr = [
|
|
|
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 dr = [
|
|
|
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,24 +1566,24 @@ const dr = [
|
|
|
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
|
-
|
|
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
|
+
Wt.formats = hr.map((i) => i.verbatimCoordinates);
|
|
1577
|
+
const gr = Wt;
|
|
1578
|
+
function li(i, e, t) {
|
|
1579
1579
|
const n = i.slice();
|
|
1580
|
-
return n[
|
|
1580
|
+
return n[84] = e[t], n[86] = t, n;
|
|
1581
1581
|
}
|
|
1582
|
-
function
|
|
1582
|
+
function ui(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
|
},
|
|
1588
1588
|
m(n, r) {
|
|
1589
1589
|
ge(e, n, r), t = !0;
|
|
@@ -1595,20 +1595,20 @@ function fi(i) {
|
|
|
1595
1595
|
H(e.$$.fragment, n), t = !1;
|
|
1596
1596
|
},
|
|
1597
1597
|
d(n) {
|
|
1598
|
-
|
|
1598
|
+
me(e, n);
|
|
1599
1599
|
}
|
|
1600
1600
|
};
|
|
1601
1601
|
}
|
|
1602
|
-
function
|
|
1602
|
+
function ai(i) {
|
|
1603
1603
|
let e, t, n, r, o;
|
|
1604
|
-
return t = new
|
|
1604
|
+
return t = new $n({}), {
|
|
1605
1605
|
c() {
|
|
1606
|
-
e = A("button"),
|
|
1606
|
+
e = A("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-bz0zu3"),
|
|
1611
|
+
), y(e, "class", "svelte-bz0zu3"), re(
|
|
1612
1612
|
e,
|
|
1613
1613
|
"active",
|
|
1614
1614
|
/*reverseActive*/
|
|
@@ -1620,7 +1620,7 @@ function di(i) {
|
|
|
1620
1620
|
e,
|
|
1621
1621
|
"click",
|
|
1622
1622
|
/*click_handler_2*/
|
|
1623
|
-
i[
|
|
1623
|
+
i[69]
|
|
1624
1624
|
), r = !0);
|
|
1625
1625
|
},
|
|
1626
1626
|
p(l, s) {
|
|
@@ -1631,7 +1631,7 @@ function di(i) {
|
|
|
1631
1631
|
/*reverseButtonTitle*/
|
|
1632
1632
|
l[9]
|
|
1633
1633
|
), (!n || s[0] & /*reverseActive*/
|
|
1634
|
-
1) &&
|
|
1634
|
+
1) && re(
|
|
1635
1635
|
e,
|
|
1636
1636
|
"active",
|
|
1637
1637
|
/*reverseActive*/
|
|
@@ -1645,24 +1645,24 @@ function di(i) {
|
|
|
1645
1645
|
H(t.$$.fragment, l), n = !1;
|
|
1646
1646
|
},
|
|
1647
1647
|
d(l) {
|
|
1648
|
-
l && B(e),
|
|
1648
|
+
l && B(e), me(t), r = !1, o();
|
|
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 = Jt(
|
|
1654
1654
|
/*listFeatures*/
|
|
1655
1655
|
i[14]
|
|
1656
1656
|
);
|
|
1657
1657
|
const c = (u) => (
|
|
1658
1658
|
/*feature*/
|
|
1659
|
-
u[
|
|
1660
|
-
(u[
|
|
1661
|
-
u[
|
|
1659
|
+
u[84].id + /*feature*/
|
|
1660
|
+
(u[84].address ? "," + /*feature*/
|
|
1661
|
+
u[84].address : "")
|
|
1662
1662
|
);
|
|
1663
1663
|
for (let u = 0; u < s.length; u += 1) {
|
|
1664
|
-
let d =
|
|
1665
|
-
n.set(a, t[u] =
|
|
1664
|
+
let d = li(i, s, u), a = c(d);
|
|
1665
|
+
n.set(a, t[u] = ci(a, d));
|
|
1666
1666
|
}
|
|
1667
1667
|
return {
|
|
1668
1668
|
c() {
|
|
@@ -1680,22 +1680,22 @@ function vr(i) {
|
|
|
1680
1680
|
e,
|
|
1681
1681
|
"mouseleave",
|
|
1682
1682
|
/*mouseleave_handler*/
|
|
1683
|
-
i[
|
|
1683
|
+
i[73]
|
|
1684
1684
|
),
|
|
1685
1685
|
J(
|
|
1686
1686
|
e,
|
|
1687
1687
|
"blur",
|
|
1688
1688
|
/*blur_handler_1*/
|
|
1689
|
-
i[
|
|
1689
|
+
i[74]
|
|
1690
1690
|
)
|
|
1691
1691
|
], o = !0);
|
|
1692
1692
|
},
|
|
1693
1693
|
p(u, d) {
|
|
1694
1694
|
d[0] & /*listFeatures, showPlaceType, selectedItemIndex, missingIconsCache, iconsBaseUrl, pick*/
|
|
1695
|
-
17880064 && (s =
|
|
1695
|
+
17880064 && (s = Jt(
|
|
1696
1696
|
/*listFeatures*/
|
|
1697
1697
|
u[14]
|
|
1698
|
-
),
|
|
1698
|
+
), rt(), t = Tn(t, d, c, 1, u, s, n, e, Pn, ci, null, li), ot());
|
|
1699
1699
|
},
|
|
1700
1700
|
i(u) {
|
|
1701
1701
|
if (!r) {
|
|
@@ -1713,25 +1713,25 @@ function vr(i) {
|
|
|
1713
1713
|
u && B(e);
|
|
1714
1714
|
for (let d = 0; d < t.length; d += 1)
|
|
1715
1715
|
t[d].d();
|
|
1716
|
-
o = !1,
|
|
1716
|
+
o = !1, ye(l);
|
|
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 Oi({}), {
|
|
1723
1723
|
c() {
|
|
1724
|
-
e = A("div"),
|
|
1724
|
+
e = A("div"), Ee(t.$$.fragment), n = ee(), r = A("div"), o = _e(
|
|
1725
1725
|
/*noResultsMessage*/
|
|
1726
1726
|
i[7]
|
|
1727
1727
|
), y(r, "class", "svelte-bz0zu3"), y(e, "class", "no-results svelte-bz0zu3");
|
|
1728
1728
|
},
|
|
1729
1729
|
m(s, c) {
|
|
1730
|
-
F(s, e, c), ge(t, e, null),
|
|
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*/
|
|
1734
|
-
128) &&
|
|
1734
|
+
128) && je(
|
|
1735
1735
|
o,
|
|
1736
1736
|
/*noResultsMessage*/
|
|
1737
1737
|
s[7]
|
|
@@ -1744,15 +1744,15 @@ function wr(i) {
|
|
|
1744
1744
|
H(t.$$.fragment, s), l = !1;
|
|
1745
1745
|
},
|
|
1746
1746
|
d(s) {
|
|
1747
|
-
s && B(e),
|
|
1747
|
+
s && B(e), me(t);
|
|
1748
1748
|
}
|
|
1749
1749
|
};
|
|
1750
1750
|
}
|
|
1751
|
-
function
|
|
1751
|
+
function pr(i) {
|
|
1752
1752
|
let e = "", t;
|
|
1753
1753
|
return {
|
|
1754
1754
|
c() {
|
|
1755
|
-
t =
|
|
1755
|
+
t = _e(e);
|
|
1756
1756
|
},
|
|
1757
1757
|
m(n, r) {
|
|
1758
1758
|
F(n, t, r);
|
|
@@ -1765,26 +1765,26 @@ function _r(i) {
|
|
|
1765
1765
|
}
|
|
1766
1766
|
};
|
|
1767
1767
|
}
|
|
1768
|
-
function
|
|
1768
|
+
function br(i) {
|
|
1769
1769
|
let e, t, n, r, o, l, s, c, u, d, a;
|
|
1770
|
-
return t = new
|
|
1770
|
+
return t = new Oi({}), c = new Ii({}), {
|
|
1771
1771
|
c() {
|
|
1772
|
-
e = A("div"),
|
|
1772
|
+
e = A("div"), Ee(t.$$.fragment), n = ee(), r = A("div"), o = _e(
|
|
1773
1773
|
/*errorMessage*/
|
|
1774
1774
|
i[6]
|
|
1775
|
-
), l = ee(), s = A("button"),
|
|
1775
|
+
), l = ee(), s = A("button"), Ee(c.$$.fragment), y(r, "class", "svelte-bz0zu3"), y(s, "class", "svelte-bz0zu3"), y(e, "class", "error svelte-bz0zu3");
|
|
1776
1776
|
},
|
|
1777
1777
|
m(f, h) {
|
|
1778
|
-
F(f, e, h), ge(t, e, null),
|
|
1778
|
+
F(f, e, h), 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, d || (a = J(
|
|
1779
1779
|
s,
|
|
1780
1780
|
"click",
|
|
1781
1781
|
/*click_handler_3*/
|
|
1782
|
-
i[
|
|
1782
|
+
i[70]
|
|
1783
1783
|
), d = !0);
|
|
1784
1784
|
},
|
|
1785
1785
|
p(f, h) {
|
|
1786
1786
|
(!u || h[0] & /*errorMessage*/
|
|
1787
|
-
64) &&
|
|
1787
|
+
64) && je(
|
|
1788
1788
|
o,
|
|
1789
1789
|
/*errorMessage*/
|
|
1790
1790
|
f[6]
|
|
@@ -1797,35 +1797,35 @@ function Er(i) {
|
|
|
1797
1797
|
H(t.$$.fragment, f), H(c.$$.fragment, f), u = !1;
|
|
1798
1798
|
},
|
|
1799
1799
|
d(f) {
|
|
1800
|
-
f && B(e),
|
|
1800
|
+
f && B(e), me(t), me(c), d = !1, a();
|
|
1801
1801
|
}
|
|
1802
1802
|
};
|
|
1803
1803
|
}
|
|
1804
|
-
function
|
|
1804
|
+
function ci(i, e) {
|
|
1805
1805
|
let t, n, r;
|
|
1806
1806
|
function o() {
|
|
1807
1807
|
return (
|
|
1808
1808
|
/*mouseenter_handler*/
|
|
1809
|
-
e[
|
|
1809
|
+
e[71](
|
|
1810
1810
|
/*i*/
|
|
1811
|
-
e[
|
|
1811
|
+
e[86]
|
|
1812
1812
|
)
|
|
1813
1813
|
);
|
|
1814
1814
|
}
|
|
1815
1815
|
function l() {
|
|
1816
1816
|
return (
|
|
1817
1817
|
/*focus_handler_1*/
|
|
1818
|
-
e[
|
|
1818
|
+
e[72](
|
|
1819
1819
|
/*feature*/
|
|
1820
|
-
e[
|
|
1820
|
+
e[84]
|
|
1821
1821
|
)
|
|
1822
1822
|
);
|
|
1823
1823
|
}
|
|
1824
|
-
return n = new
|
|
1824
|
+
return n = new Qn({
|
|
1825
1825
|
props: {
|
|
1826
1826
|
feature: (
|
|
1827
1827
|
/*feature*/
|
|
1828
|
-
e[
|
|
1828
|
+
e[84]
|
|
1829
1829
|
),
|
|
1830
1830
|
showPlaceType: (
|
|
1831
1831
|
/*showPlaceType*/
|
|
@@ -1834,7 +1834,7 @@ function hi(i, e) {
|
|
|
1834
1834
|
selected: (
|
|
1835
1835
|
/*selectedItemIndex*/
|
|
1836
1836
|
e[15] === /*i*/
|
|
1837
|
-
e[
|
|
1837
|
+
e[86]
|
|
1838
1838
|
),
|
|
1839
1839
|
missingIconsCache: (
|
|
1840
1840
|
/*missingIconsCache*/
|
|
@@ -1849,7 +1849,7 @@ function hi(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;
|
|
@@ -1859,12 +1859,12 @@ function hi(i, e) {
|
|
|
1859
1859
|
const u = {};
|
|
1860
1860
|
c[0] & /*listFeatures*/
|
|
1861
1861
|
16384 && (u.feature = /*feature*/
|
|
1862
|
-
e[
|
|
1862
|
+
e[84]), c[0] & /*showPlaceType*/
|
|
1863
1863
|
1024 && (u.showPlaceType = /*showPlaceType*/
|
|
1864
1864
|
e[10]), c[0] & /*selectedItemIndex, listFeatures*/
|
|
1865
1865
|
49152 && (u.selected = /*selectedItemIndex*/
|
|
1866
1866
|
e[15] === /*i*/
|
|
1867
|
-
e[
|
|
1867
|
+
e[86]), c[0] & /*iconsBaseUrl*/
|
|
1868
1868
|
4096 && (u.iconsBaseUrl = /*iconsBaseUrl*/
|
|
1869
1869
|
e[12]), n.$set(u);
|
|
1870
1870
|
},
|
|
@@ -1875,50 +1875,50 @@ function hi(i, e) {
|
|
|
1875
1875
|
H(n.$$.fragment, s), r = !1;
|
|
1876
1876
|
},
|
|
1877
1877
|
d(s) {
|
|
1878
|
-
s && B(t),
|
|
1878
|
+
s && B(t), me(n, s);
|
|
1879
1879
|
}
|
|
1880
1880
|
};
|
|
1881
1881
|
}
|
|
1882
|
-
function
|
|
1882
|
+
function vr(i) {
|
|
1883
1883
|
let e, t, n, r, o, l, s, c, u, d, a, f, h, g, v, w, p, S, L, E, M, k = !1;
|
|
1884
|
-
o = new
|
|
1884
|
+
o = new tr({}), a = new Ii({});
|
|
1885
1885
|
let b = (
|
|
1886
1886
|
/*abortController*/
|
|
1887
|
-
i[19] &&
|
|
1887
|
+
i[19] && ui()
|
|
1888
1888
|
), _ = (
|
|
1889
1889
|
/*enableReverse*/
|
|
1890
|
-
i[5] === "button" &&
|
|
1890
|
+
i[5] === "button" && ai(i)
|
|
1891
1891
|
);
|
|
1892
1892
|
const C = (
|
|
1893
1893
|
/*#slots*/
|
|
1894
|
-
i[
|
|
1895
|
-
), I =
|
|
1894
|
+
i[61].default
|
|
1895
|
+
), I = yn(
|
|
1896
1896
|
C,
|
|
1897
1897
|
i,
|
|
1898
1898
|
/*$$scope*/
|
|
1899
|
-
i[
|
|
1899
|
+
i[60],
|
|
1900
1900
|
null
|
|
1901
|
-
),
|
|
1901
|
+
), Q = [br, pr, yr, mr], O = [];
|
|
1902
1902
|
function X(x, W) {
|
|
1903
|
-
var
|
|
1903
|
+
var oe, de;
|
|
1904
1904
|
return (
|
|
1905
1905
|
/*error*/
|
|
1906
1906
|
x[18] ? 0 : (
|
|
1907
1907
|
/*focusedDelayed*/
|
|
1908
1908
|
x[16] ? (
|
|
1909
1909
|
/*listFeatures*/
|
|
1910
|
-
((
|
|
1910
|
+
((oe = x[14]) == null ? void 0 : oe.length) === 0 ? 2 : (
|
|
1911
1911
|
/*focusedDelayed*/
|
|
1912
1912
|
x[16] && /*listFeatures*/
|
|
1913
|
-
((
|
|
1913
|
+
((de = x[14]) != null && de.length) ? 3 : -1
|
|
1914
1914
|
)
|
|
1915
1915
|
) : 1
|
|
1916
1916
|
)
|
|
1917
1917
|
);
|
|
1918
1918
|
}
|
|
1919
|
-
return ~(w = X(i)) && (p = O[w] =
|
|
1919
|
+
return ~(w = X(i)) && (p = O[w] = Q[w](i)), {
|
|
1920
1920
|
c() {
|
|
1921
|
-
e = ee(), t = A("form"), n = A("div"), r = A("button"),
|
|
1921
|
+
e = ee(), t = A("form"), n = A("div"), r = A("button"), Ee(o.$$.fragment), l = ee(), s = A("input"), c = ee(), u = A("div"), d = A("button"), Ee(a.$$.fragment), f = ee(), b && b.c(), h = ee(), _ && _.c(), g = ee(), I && I.c(), v = ee(), p && p.c(), y(r, "class", "search-button svelte-bz0zu3"), y(r, "type", "button"), y(
|
|
1922
1922
|
s,
|
|
1923
1923
|
"placeholder",
|
|
1924
1924
|
/*placeholder*/
|
|
@@ -1933,15 +1933,15 @@ function Lr(i) {
|
|
|
1933
1933
|
"title",
|
|
1934
1934
|
/*clearButtonTitle*/
|
|
1935
1935
|
i[3]
|
|
1936
|
-
), y(d, "class", "svelte-bz0zu3"), y(u, "class", "clear-button-container svelte-bz0zu3"),
|
|
1936
|
+
), y(d, "class", "svelte-bz0zu3"), y(u, "class", "clear-button-container svelte-bz0zu3"), re(
|
|
1937
1937
|
u,
|
|
1938
1938
|
"displayable",
|
|
1939
1939
|
/*searchValue*/
|
|
1940
1940
|
i[1] !== ""
|
|
1941
|
-
), y(n, "class", "input-group svelte-bz0zu3"), y(t, "tabindex", "0"), y(t, "class", S =
|
|
1941
|
+
), y(n, "class", "input-group svelte-bz0zu3"), y(t, "tabindex", "0"), y(t, "class", S = Vt(
|
|
1942
1942
|
/*className*/
|
|
1943
1943
|
i[2]
|
|
1944
|
-
) + " svelte-bz0zu3"),
|
|
1944
|
+
) + " svelte-bz0zu3"), re(
|
|
1945
1945
|
t,
|
|
1946
1946
|
"can-collapse",
|
|
1947
1947
|
/*collapsed*/
|
|
@@ -1950,34 +1950,34 @@ function Lr(i) {
|
|
|
1950
1950
|
);
|
|
1951
1951
|
},
|
|
1952
1952
|
m(x, W) {
|
|
1953
|
-
F(x, e, W), F(x, t, W),
|
|
1953
|
+
F(x, e, W), F(x, t, W), T(t, n), T(n, r), ge(o, r, null), T(n, l), T(n, s), i[63](s), Yt(
|
|
1954
1954
|
s,
|
|
1955
1955
|
/*searchValue*/
|
|
1956
1956
|
i[1]
|
|
1957
|
-
),
|
|
1957
|
+
), T(n, c), T(n, u), T(u, d), ge(a, d, null), T(u, f), b && b.m(u, null), T(n, h), _ && _.m(n, null), T(n, g), I && I.m(n, null), T(t, v), ~w && O[w].m(t, null), L = !0, E || (M = [
|
|
1958
1958
|
J(
|
|
1959
1959
|
r,
|
|
1960
1960
|
"click",
|
|
1961
1961
|
/*click_handler*/
|
|
1962
|
-
i[
|
|
1962
|
+
i[62]
|
|
1963
1963
|
),
|
|
1964
1964
|
J(
|
|
1965
1965
|
s,
|
|
1966
1966
|
"input",
|
|
1967
1967
|
/*input_1_input_handler*/
|
|
1968
|
-
i[
|
|
1968
|
+
i[64]
|
|
1969
1969
|
),
|
|
1970
1970
|
J(
|
|
1971
1971
|
s,
|
|
1972
1972
|
"focus",
|
|
1973
1973
|
/*focus_handler*/
|
|
1974
|
-
i[
|
|
1974
|
+
i[65]
|
|
1975
1975
|
),
|
|
1976
1976
|
J(
|
|
1977
1977
|
s,
|
|
1978
1978
|
"blur",
|
|
1979
1979
|
/*blur_handler*/
|
|
1980
|
-
i[
|
|
1980
|
+
i[66]
|
|
1981
1981
|
),
|
|
1982
1982
|
J(
|
|
1983
1983
|
s,
|
|
@@ -1989,16 +1989,16 @@ function Lr(i) {
|
|
|
1989
1989
|
s,
|
|
1990
1990
|
"input",
|
|
1991
1991
|
/*input_handler*/
|
|
1992
|
-
i[
|
|
1992
|
+
i[67]
|
|
1993
1993
|
),
|
|
1994
1994
|
J(
|
|
1995
1995
|
d,
|
|
1996
1996
|
"click",
|
|
1997
1997
|
/*click_handler_1*/
|
|
1998
|
-
i[
|
|
1998
|
+
i[68]
|
|
1999
1999
|
),
|
|
2000
|
-
J(t, "submit",
|
|
2001
|
-
/*
|
|
2000
|
+
J(t, "submit", _n(
|
|
2001
|
+
/*handleOnSubmit*/
|
|
2002
2002
|
i[21]
|
|
2003
2003
|
))
|
|
2004
2004
|
], E = !0);
|
|
@@ -2018,7 +2018,7 @@ function Lr(i) {
|
|
|
2018
2018
|
x[8]
|
|
2019
2019
|
), W[0] & /*searchValue*/
|
|
2020
2020
|
2 && s.value !== /*searchValue*/
|
|
2021
|
-
x[1] &&
|
|
2021
|
+
x[1] && Yt(
|
|
2022
2022
|
s,
|
|
2023
2023
|
/*searchValue*/
|
|
2024
2024
|
x[1]
|
|
@@ -2030,46 +2030,46 @@ function Lr(i) {
|
|
|
2030
2030
|
x[3]
|
|
2031
2031
|
), /*abortController*/
|
|
2032
2032
|
x[19] ? b ? W[0] & /*abortController*/
|
|
2033
|
-
524288 && G(b, 1) : (b =
|
|
2033
|
+
524288 && G(b, 1) : (b = ui(), b.c(), G(b, 1), b.m(u, null)) : b && (rt(), H(b, 1, 1, () => {
|
|
2034
2034
|
b = null;
|
|
2035
|
-
}),
|
|
2036
|
-
2) &&
|
|
2035
|
+
}), ot()), (!L || W[0] & /*searchValue*/
|
|
2036
|
+
2) && re(
|
|
2037
2037
|
u,
|
|
2038
2038
|
"displayable",
|
|
2039
2039
|
/*searchValue*/
|
|
2040
2040
|
x[1] !== ""
|
|
2041
2041
|
), /*enableReverse*/
|
|
2042
2042
|
x[5] === "button" ? _ ? (_.p(x, W), W[0] & /*enableReverse*/
|
|
2043
|
-
32 && G(_, 1)) : (_ =
|
|
2043
|
+
32 && G(_, 1)) : (_ = ai(x), _.c(), G(_, 1), _.m(n, g)) : _ && (rt(), H(_, 1, 1, () => {
|
|
2044
2044
|
_ = null;
|
|
2045
|
-
}),
|
|
2046
|
-
|
|
2045
|
+
}), ot()), I && I.p && (!L || W[1] & /*$$scope*/
|
|
2046
|
+
536870912) && bn(
|
|
2047
2047
|
I,
|
|
2048
2048
|
C,
|
|
2049
2049
|
x,
|
|
2050
2050
|
/*$$scope*/
|
|
2051
|
-
x[
|
|
2052
|
-
L ?
|
|
2051
|
+
x[60],
|
|
2052
|
+
L ? pn(
|
|
2053
2053
|
C,
|
|
2054
2054
|
/*$$scope*/
|
|
2055
|
-
x[
|
|
2055
|
+
x[60],
|
|
2056
2056
|
W,
|
|
2057
2057
|
null
|
|
2058
|
-
) :
|
|
2058
|
+
) : vn(
|
|
2059
2059
|
/*$$scope*/
|
|
2060
|
-
x[
|
|
2060
|
+
x[60]
|
|
2061
2061
|
),
|
|
2062
2062
|
null
|
|
2063
2063
|
);
|
|
2064
|
-
let
|
|
2065
|
-
w = X(x), w ===
|
|
2066
|
-
O[
|
|
2067
|
-
}),
|
|
2068
|
-
4 && S !== (S =
|
|
2064
|
+
let oe = w;
|
|
2065
|
+
w = X(x), w === oe ? ~w && O[w].p(x, W) : (p && (rt(), H(O[oe], 1, 1, () => {
|
|
2066
|
+
O[oe] = null;
|
|
2067
|
+
}), ot()), ~w ? (p = O[w], p ? p.p(x, W) : (p = O[w] = Q[w](x), p.c()), G(p, 1), p.m(t, null)) : p = null), (!L || W[0] & /*className*/
|
|
2068
|
+
4 && S !== (S = Vt(
|
|
2069
2069
|
/*className*/
|
|
2070
2070
|
x[2]
|
|
2071
2071
|
) + " svelte-bz0zu3")) && y(t, "class", S), (!L || W[0] & /*className, collapsed, searchValue*/
|
|
2072
|
-
22) &&
|
|
2072
|
+
22) && re(
|
|
2073
2073
|
t,
|
|
2074
2074
|
"can-collapse",
|
|
2075
2075
|
/*collapsed*/
|
|
@@ -2084,11 +2084,11 @@ function Lr(i) {
|
|
|
2084
2084
|
H(k), H(o.$$.fragment, x), H(a.$$.fragment, x), H(b), H(_), H(I, x), H(p), L = !1;
|
|
2085
2085
|
},
|
|
2086
2086
|
d(x) {
|
|
2087
|
-
x && (B(e), B(t)),
|
|
2087
|
+
x && (B(e), B(t)), me(o), i[63](null), me(a), b && b.d(), _ && _.d(), I && I.d(x), ~w && O[w].d(), E = !1, ye(M);
|
|
2088
2088
|
}
|
|
2089
2089
|
};
|
|
2090
2090
|
}
|
|
2091
|
-
function
|
|
2091
|
+
function wr(i, e, t) {
|
|
2092
2092
|
let n, r, { $$slots: o = {}, $$scope: l } = e;
|
|
2093
2093
|
const s = {
|
|
2094
2094
|
continental_marine: 4,
|
|
@@ -2114,234 +2114,222 @@ function Sr(i, e, t) {
|
|
|
2114
2114
|
"poi.restaurant": 18,
|
|
2115
2115
|
"poi.aerodrome": 13
|
|
2116
2116
|
};
|
|
2117
|
-
let { class: c = void 0 } = e, { apiKey: u } = e, { bbox: d = void 0 } = e, { clearButtonTitle: a = "clear" } = e, { clearOnBlur: f = !1 } = e, { collapsed: h = !1 } = e, { country: g = void 0 } = e, { debounceSearch: v = 200 } = e, { enableReverse: w = "never" } = e, { errorMessage: p = "Something went wrong…" } = e, { filter: S = () => !0 } = e, { flyTo: L = !0 } = e, { fuzzyMatch: E = !0 } = e, { language: M = void 0 } = e, { limit: k = void 0 } = e, { mapController: b = void 0 } = e, { minLength: _ = 2 } = e, { noResultsMessage: C = "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: I = "Search" } = e, { proximity:
|
|
2117
|
+
let { class: c = void 0 } = e, { apiKey: u } = e, { bbox: d = void 0 } = e, { clearButtonTitle: a = "clear" } = e, { clearOnBlur: f = !1 } = e, { collapsed: h = !1 } = e, { country: g = void 0 } = e, { debounceSearch: v = 200 } = e, { enableReverse: w = "never" } = e, { errorMessage: p = "Something went wrong…" } = e, { filter: S = () => !0 } = e, { flyTo: L = !0 } = e, { fuzzyMatch: E = !0 } = e, { language: M = void 0 } = e, { limit: k = void 0 } = e, { mapController: b = void 0 } = e, { minLength: _ = 2 } = e, { noResultsMessage: C = "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: I = "Search" } = e, { proximity: Q = [{ type: "server-geolocation" }] } = e, { reverseActive: O = w === "always" } = e, { reverseButtonTitle: X = "toggle reverse geocoding" } = e, { searchValue: x = "" } = e, { pickedResultStyle: W = "full-geometry" } = e, { showPlaceType: oe = "if-needed" } = e, { showResultsWhileTyping: de = !0 } = e, { selectFirst: Te = !0 } = e, { flyToSelected: at = !1 } = e, { markerOnSelected: Xe = !0 } = e, { types: Ce = void 0 } = e, { exhaustiveReverseGeocoding: ct = !1 } = e, { excludeTypes: Ke = !1 } = e, { zoom: Je = s } = e, { apiUrl: ft = "https://api.maptiler.com/geocoding" } = e, { fetchParameters: dt = {} } = e, { iconsBaseUrl: Ut = "https://cdn.maptiler.com/maptiler-geocoding-control/v2.0.1/icons/" } = e, { adjustUrlQuery: ht = () => {
|
|
2118
2118
|
} } = e;
|
|
2119
|
-
function
|
|
2120
|
-
|
|
2119
|
+
function qi() {
|
|
2120
|
+
ae.focus();
|
|
2121
2121
|
}
|
|
2122
|
-
function
|
|
2123
|
-
|
|
2122
|
+
function Zi() {
|
|
2123
|
+
ae.blur();
|
|
2124
2124
|
}
|
|
2125
|
-
function
|
|
2126
|
-
t(1, x = m), U ? (t(15, D = -1),
|
|
2127
|
-
|
|
2125
|
+
function Gt(m, U = !0, Z = !1) {
|
|
2126
|
+
t(1, x = m), U ? (t(15, D = -1), qt()) : (pt(!Z, Z), setTimeout(() => {
|
|
2127
|
+
ae.focus(), ae.select();
|
|
2128
2128
|
}));
|
|
2129
2129
|
}
|
|
2130
|
-
function
|
|
2131
|
-
t(14, R = void 0), t(
|
|
2132
|
-
}
|
|
2133
|
-
function Xi() {
|
|
2134
|
-
t(56, j = []), t(57, N = void 0);
|
|
2130
|
+
function Qi() {
|
|
2131
|
+
t(14, R = void 0), t(56, N = void 0), t(15, D = -1);
|
|
2135
2132
|
}
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
function Ji() {
|
|
2139
|
-
return !!te;
|
|
2133
|
+
function Hi() {
|
|
2134
|
+
t(55, j = []), t(56, N = void 0);
|
|
2140
2135
|
}
|
|
2141
|
-
|
|
2136
|
+
let Re = !1, R, j, N, jt = "", ae, D = -1, ce, $e = [], ke, Ie, et, gt;
|
|
2137
|
+
const Vi = /* @__PURE__ */ new Set(), pe = xn();
|
|
2138
|
+
Sn(() => {
|
|
2142
2139
|
b && (b.setEventHandler(void 0), b.indicateReverse(!1), b.setSelectedMarker(-1), b.setFeatures(void 0, void 0, !1));
|
|
2143
2140
|
});
|
|
2144
|
-
function
|
|
2145
|
-
if (
|
|
2146
|
-
|
|
2147
|
-
return;
|
|
2148
|
-
}
|
|
2149
|
-
if (D > -1 && R)
|
|
2150
|
-
t(57, N = R[D]), t(1, x = N.place_type[0] === "reverse" ? N.place_name : N.place_name.replace(/,.*/, "")), t(18, de = void 0), t(56, j = void 0), t(15, D = -1);
|
|
2141
|
+
function qt(m) {
|
|
2142
|
+
if (Ie && (clearTimeout(Ie), Ie = void 0), D > -1 && R)
|
|
2143
|
+
t(56, N = R[D]), t(1, x = N.place_type[0] === "reverse" ? N.place_name : N.place_name.replace(/,.*/, "")), t(18, ce = void 0), t(55, j = void 0), t(15, D = -1);
|
|
2151
2144
|
else if (x) {
|
|
2152
|
-
const U = m || !
|
|
2153
|
-
|
|
2154
|
-
t(
|
|
2155
|
-
}).catch((
|
|
2145
|
+
const U = m || !mt(x);
|
|
2146
|
+
yt(x, { exact: !0 }).then(() => {
|
|
2147
|
+
t(55, j = R), t(56, N = void 0), U && Yi();
|
|
2148
|
+
}).catch((Z) => t(18, ce = Z));
|
|
2156
2149
|
}
|
|
2157
2150
|
}
|
|
2158
|
-
function
|
|
2151
|
+
function mt(m) {
|
|
2159
2152
|
try {
|
|
2160
|
-
return
|
|
2153
|
+
return gr(m, 6);
|
|
2161
2154
|
} catch {
|
|
2162
2155
|
return !1;
|
|
2163
2156
|
}
|
|
2164
2157
|
}
|
|
2165
|
-
async function
|
|
2166
|
-
t(18,
|
|
2158
|
+
async function yt(m, { byId: U = !1, exact: Z = !1 } = {}) {
|
|
2159
|
+
t(18, ce = void 0), ke == null || ke.abort();
|
|
2167
2160
|
const $ = new AbortController();
|
|
2168
|
-
t(19,
|
|
2161
|
+
t(19, ke = $);
|
|
2169
2162
|
try {
|
|
2170
|
-
const
|
|
2171
|
-
if (M !== void 0 &&
|
|
2172
|
-
const
|
|
2173
|
-
|
|
2163
|
+
const P = mt(m), q = new URLSearchParams();
|
|
2164
|
+
if (M !== void 0 && q.set("language", Array.isArray(M) ? M.join(",") : M ?? ""), Ce && q.set("types", Ce.join(",")), Ke && q.set("excludeTypes", String(Ke)), d && q.set("bbox", d.map((tt) => tt.toFixed(6)).join(",")), g && q.set("country", Array.isArray(g) ? g.join(",") : g), !U && !P) {
|
|
2165
|
+
const tt = await nr(b, Q, $);
|
|
2166
|
+
tt && q.set("proximity", tt), (Z || !de) && q.set("autocomplete", "false"), q.set("fuzzyMatch", String(E));
|
|
2174
2167
|
}
|
|
2175
|
-
k !== void 0 && (
|
|
2176
|
-
const
|
|
2177
|
-
if (
|
|
2178
|
-
U ? (t(14, R = void 0), t(
|
|
2168
|
+
k !== void 0 && (ct || !P || (Ce == null ? void 0 : Ce.length) === 1) && q.set("limit", String(k)), q.set("key", u), ht(q);
|
|
2169
|
+
const fe = ft + "/" + encodeURIComponent(P ? P.decimalLongitude + "," + P.decimalLatitude : m) + ".json?" + q.toString();
|
|
2170
|
+
if (fe === jt) {
|
|
2171
|
+
U ? (t(14, R = void 0), t(56, N = $e[0])) : t(14, R = $e);
|
|
2179
2172
|
return;
|
|
2180
2173
|
}
|
|
2181
|
-
|
|
2182
|
-
const
|
|
2183
|
-
if (!
|
|
2184
|
-
throw new Error(await
|
|
2185
|
-
const
|
|
2186
|
-
|
|
2174
|
+
jt = fe;
|
|
2175
|
+
const vt = await fetch(fe, { signal: $.signal, ...dt });
|
|
2176
|
+
if (!vt.ok)
|
|
2177
|
+
throw new Error(await vt.text());
|
|
2178
|
+
const wt = await vt.json();
|
|
2179
|
+
pe("response", { url: fe, featureCollection: wt }), U ? (t(14, R = void 0), t(56, N = wt.features[0]), $e = [N]) : (t(14, R = wt.features.filter(S)), P && R.unshift({
|
|
2187
2180
|
type: "Feature",
|
|
2188
2181
|
properties: {},
|
|
2189
|
-
id: "reverse_" +
|
|
2190
|
-
text:
|
|
2191
|
-
place_name:
|
|
2182
|
+
id: "reverse_" + P.decimalLongitude + "_" + P.decimalLatitude,
|
|
2183
|
+
text: P.decimalLatitude + ", " + P.decimalLongitude,
|
|
2184
|
+
place_name: P.decimalLatitude + ", " + P.decimalLongitude,
|
|
2192
2185
|
place_type: ["reverse"],
|
|
2193
|
-
center: [
|
|
2186
|
+
center: [P.decimalLongitude, P.decimalLatitude],
|
|
2194
2187
|
bbox: [
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2188
|
+
P.decimalLongitude,
|
|
2189
|
+
P.decimalLatitude,
|
|
2190
|
+
P.decimalLongitude,
|
|
2191
|
+
P.decimalLatitude
|
|
2199
2192
|
],
|
|
2200
2193
|
geometry: {
|
|
2201
2194
|
type: "Point",
|
|
2202
|
-
coordinates: [
|
|
2195
|
+
coordinates: [P.decimalLongitude, P.decimalLatitude]
|
|
2203
2196
|
}
|
|
2204
|
-
}),
|
|
2205
|
-
} catch (
|
|
2206
|
-
if (
|
|
2197
|
+
}), $e = R, P && ae.focus());
|
|
2198
|
+
} catch (P) {
|
|
2199
|
+
if (P && typeof P == "object" && "name" in P && P.name === "AbortError")
|
|
2207
2200
|
return;
|
|
2208
|
-
throw
|
|
2201
|
+
throw P;
|
|
2209
2202
|
} finally {
|
|
2210
|
-
$ ===
|
|
2203
|
+
$ === ke && t(19, ke = void 0);
|
|
2211
2204
|
}
|
|
2212
2205
|
}
|
|
2213
|
-
function
|
|
2214
|
-
var
|
|
2206
|
+
function Yi() {
|
|
2207
|
+
var $;
|
|
2215
2208
|
if (!(j != null && j.length) || !L)
|
|
2216
2209
|
return;
|
|
2217
|
-
const m = [180, 90, -180, -90], U = !j.some((
|
|
2218
|
-
let
|
|
2219
|
-
for (const
|
|
2220
|
-
const
|
|
2221
|
-
if (
|
|
2222
|
-
for (const
|
|
2223
|
-
m[
|
|
2210
|
+
const m = [180, 90, -180, -90], U = !j.some((P) => !P.matching_text);
|
|
2211
|
+
let Z;
|
|
2212
|
+
for (const P of j) {
|
|
2213
|
+
const q = Be(P);
|
|
2214
|
+
if (Z = Z === void 0 ? q : q === void 0 ? Z : Math.max(Z, q), U || !P.matching_text)
|
|
2215
|
+
for (const fe of [0, 1, 2, 3])
|
|
2216
|
+
m[fe] = Math[fe < 2 ? "min" : "max"](m[fe], (($ = P.bbox) == null ? void 0 : $[fe]) ?? P.center[fe % 2]);
|
|
2224
2217
|
}
|
|
2225
|
-
b && j.length > 0 && (N && m[0] === m[2] && m[1] === m[3] ? b.flyTo(N.center,
|
|
2218
|
+
b && j.length > 0 && (N && m[0] === m[2] && m[1] === m[3] ? b.flyTo(N.center, Be(N)) : b.fitBounds(Ze(m), 50, Z));
|
|
2226
2219
|
}
|
|
2227
|
-
function
|
|
2228
|
-
var
|
|
2220
|
+
function Be(m) {
|
|
2221
|
+
var Z;
|
|
2229
2222
|
if (!m.bbox || m.bbox[0] !== m.bbox[2] && m.bbox[1] !== m.bbox[3])
|
|
2230
2223
|
return;
|
|
2231
2224
|
const U = m.id.replace(/\..*/, "");
|
|
2232
|
-
return (Array.isArray((
|
|
2233
|
-
(
|
|
2234
|
-
const
|
|
2235
|
-
return
|
|
2225
|
+
return (Array.isArray((Z = m.properties) == null ? void 0 : Z.categories) ? m.properties.categories.reduce(
|
|
2226
|
+
($, P) => {
|
|
2227
|
+
const q = Je[U + "." + P];
|
|
2228
|
+
return $ === void 0 ? q : q === void 0 ? $ : Math.max($, q);
|
|
2236
2229
|
},
|
|
2237
2230
|
void 0
|
|
2238
|
-
) : void 0) ??
|
|
2231
|
+
) : void 0) ?? Je[U];
|
|
2239
2232
|
}
|
|
2240
|
-
function
|
|
2241
|
-
t(0, O = w === "always"), t(14, R = void 0), t(
|
|
2233
|
+
function Xi(m) {
|
|
2234
|
+
t(0, O = w === "always"), t(14, R = void 0), t(56, N = void 0), t(15, D = -1), Gt(m[1].toFixed(6) + ", " + ir(m[0], [-180, 180], !0).toFixed(6), !1, !0);
|
|
2242
2235
|
}
|
|
2243
|
-
function
|
|
2236
|
+
function Ki(m) {
|
|
2244
2237
|
if (!R)
|
|
2245
2238
|
return;
|
|
2246
2239
|
let U = m.key === "ArrowDown" ? 1 : m.key === "ArrowUp" ? -1 : 0;
|
|
2247
|
-
U && (D === (
|
|
2240
|
+
U && (D === (Te ? 0 : -1) && U === -1 && t(15, D = R.length), t(15, D += U), D >= R.length && t(15, D = -1), D < 0 && Te && t(15, D = 0), m.preventDefault());
|
|
2248
2241
|
}
|
|
2249
|
-
function
|
|
2250
|
-
if (t(18,
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
()
|
|
2262
|
-
t(58, te = void 0), De(q, { appendSpace: !0 }).catch((ie) => t(18, de = ie));
|
|
2263
|
-
},
|
|
2264
|
-
dt
|
|
2265
|
-
));
|
|
2242
|
+
function pt(m = !0, U = !1) {
|
|
2243
|
+
if (t(18, ce = void 0), de || U) {
|
|
2244
|
+
if (Ie && clearTimeout(Ie), x.length < _)
|
|
2245
|
+
return;
|
|
2246
|
+
const Z = x;
|
|
2247
|
+
Ie = window.setTimeout(
|
|
2248
|
+
() => {
|
|
2249
|
+
yt(Z).catch(($) => t(18, ce = $));
|
|
2250
|
+
},
|
|
2251
|
+
m ? v : 0
|
|
2252
|
+
);
|
|
2253
|
+
} else
|
|
2254
|
+
t(14, R = void 0), t(18, ce = void 0);
|
|
2266
2255
|
}
|
|
2267
|
-
function
|
|
2268
|
-
t(
|
|
2256
|
+
function bt(m) {
|
|
2257
|
+
t(56, N = m), t(1, x = m.place_name), t(15, D = -1);
|
|
2269
2258
|
}
|
|
2270
|
-
const
|
|
2271
|
-
function
|
|
2272
|
-
|
|
2273
|
-
|
|
2259
|
+
const Ji = () => ae.focus();
|
|
2260
|
+
function $i(m) {
|
|
2261
|
+
Ct[m ? "unshift" : "push"](() => {
|
|
2262
|
+
ae = m, t(17, ae);
|
|
2274
2263
|
});
|
|
2275
2264
|
}
|
|
2276
|
-
function
|
|
2277
|
-
x = this.value, t(1, x), t(13,
|
|
2265
|
+
function en() {
|
|
2266
|
+
x = this.value, t(1, x), t(13, Re), t(28, f);
|
|
2278
2267
|
}
|
|
2279
|
-
const
|
|
2280
|
-
t(1, x = ""),
|
|
2281
|
-
},
|
|
2282
|
-
|
|
2283
|
-
},
|
|
2268
|
+
const tn = () => t(13, Re = !0), nn = () => t(13, Re = !1), rn = () => pt(), on = () => {
|
|
2269
|
+
t(1, x = ""), ae.focus();
|
|
2270
|
+
}, sn = () => t(0, O = !O), ln = () => t(18, ce = void 0), un = (m) => t(15, D = m), an = (m) => bt(m), cn = () => {
|
|
2271
|
+
Te || t(15, D = -1);
|
|
2272
|
+
}, fn = () => {
|
|
2284
2273
|
};
|
|
2285
2274
|
return i.$$set = (m) => {
|
|
2286
|
-
"class" in m && t(2, c = m.class), "apiKey" in m && t(26, u = m.apiKey), "bbox" in m && t(27, d = m.bbox), "clearButtonTitle" in m && t(3, a = m.clearButtonTitle), "clearOnBlur" in m && t(28, f = m.clearOnBlur), "collapsed" in m && t(4, h = m.collapsed), "country" in m && t(29, g = m.country), "debounceSearch" in m && t(30, v = m.debounceSearch), "enableReverse" in m && t(5, w = m.enableReverse), "errorMessage" in m && t(6, p = m.errorMessage), "filter" in m && t(31, S = m.filter), "flyTo" in m && t(32, L = m.flyTo), "fuzzyMatch" in m && t(33, E = m.fuzzyMatch), "language" in m && t(34, M = m.language), "limit" in m && t(35, k = m.limit), "mapController" in m && t(36, b = m.mapController), "minLength" in m && t(37, _ = m.minLength), "noResultsMessage" in m && t(7, C = m.noResultsMessage), "placeholder" in m && t(8, I = m.placeholder), "proximity" in m && t(38,
|
|
2275
|
+
"class" in m && t(2, c = m.class), "apiKey" in m && t(26, u = m.apiKey), "bbox" in m && t(27, d = m.bbox), "clearButtonTitle" in m && t(3, a = m.clearButtonTitle), "clearOnBlur" in m && t(28, f = m.clearOnBlur), "collapsed" in m && t(4, h = m.collapsed), "country" in m && t(29, g = m.country), "debounceSearch" in m && t(30, v = m.debounceSearch), "enableReverse" in m && t(5, w = m.enableReverse), "errorMessage" in m && t(6, p = m.errorMessage), "filter" in m && t(31, S = m.filter), "flyTo" in m && t(32, L = m.flyTo), "fuzzyMatch" in m && t(33, E = m.fuzzyMatch), "language" in m && t(34, M = m.language), "limit" in m && t(35, k = m.limit), "mapController" in m && t(36, b = m.mapController), "minLength" in m && t(37, _ = m.minLength), "noResultsMessage" in m && t(7, C = m.noResultsMessage), "placeholder" in m && t(8, I = m.placeholder), "proximity" in m && t(38, Q = m.proximity), "reverseActive" in m && t(0, O = m.reverseActive), "reverseButtonTitle" in m && t(9, X = m.reverseButtonTitle), "searchValue" in m && t(1, x = m.searchValue), "pickedResultStyle" in m && t(39, W = m.pickedResultStyle), "showPlaceType" in m && t(10, oe = m.showPlaceType), "showResultsWhileTyping" in m && t(40, de = m.showResultsWhileTyping), "selectFirst" in m && t(11, Te = m.selectFirst), "flyToSelected" in m && t(41, at = m.flyToSelected), "markerOnSelected" in m && t(42, Xe = m.markerOnSelected), "types" in m && t(43, Ce = m.types), "exhaustiveReverseGeocoding" in m && t(44, ct = m.exhaustiveReverseGeocoding), "excludeTypes" in m && t(45, Ke = m.excludeTypes), "zoom" in m && t(46, Je = m.zoom), "apiUrl" in m && t(47, ft = m.apiUrl), "fetchParameters" in m && t(48, dt = m.fetchParameters), "iconsBaseUrl" in m && t(12, Ut = m.iconsBaseUrl), "adjustUrlQuery" in m && t(49, ht = m.adjustUrlQuery), "$$scope" in m && t(60, l = m.$$scope);
|
|
2287
2276
|
}, i.$$.update = () => {
|
|
2288
2277
|
if (i.$$.dirty[0] & /*enableReverse*/
|
|
2289
2278
|
32 && t(0, O = w === "always"), i.$$.dirty[0] & /*focused, clearOnBlur*/
|
|
2290
2279
|
268443648 && setTimeout(() => {
|
|
2291
|
-
t(16,
|
|
2280
|
+
t(16, et = Re), f && !Re && t(1, x = "");
|
|
2292
2281
|
}), i.$$.dirty[0] & /*searchValue, listFeatures*/
|
|
2293
2282
|
16386 | i.$$.dirty[1] & /*minLength*/
|
|
2294
|
-
64 && x.length < _ && (t(
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
18432 &&
|
|
2283
|
+
64 && x.length < _ && (t(56, N = void 0), t(14, R = void 0), t(18, ce = void 0), t(55, j = R)), i.$$.dirty[1] & /*pickedResultStyle, picked*/
|
|
2284
|
+
33554688 && W !== "marker-only" && N && !N.address && N.geometry.type === "Point" && N.place_type[0] !== "reverse" && yt(N.id, { byId: !0 }).catch((m) => t(18, ce = m)), i.$$.dirty[1] & /*mapController, picked, prevIdToFly, flyTo*/
|
|
2285
|
+
100663330 && (b && N && N.id !== gt && L && (!N.bbox || N.bbox[0] === N.bbox[2] && N.bbox[1] === N.bbox[3] ? b.flyTo(N.center, Be(N)) : b.fitBounds(Ze(N.bbox), 50, Be(N)), t(14, R = void 0), t(55, j = void 0), t(15, D = -1)), t(57, gt = N == null ? void 0 : N.id)), i.$$.dirty[0] & /*selectFirst, listFeatures*/
|
|
2286
|
+
18432 && Te && R != null && R.length && t(15, D = 0), i.$$.dirty[0] & /*searchValue*/
|
|
2298
2287
|
2 && t(15, D = -1), i.$$.dirty[0] & /*listFeatures*/
|
|
2299
2288
|
16384 | i.$$.dirty[1] & /*markedFeatures*/
|
|
2300
|
-
|
|
2289
|
+
16777216 && j !== R && t(55, j = void 0), i.$$.dirty[0] & /*reverseActive, listFeatures, focusedDelayed*/
|
|
2301
2290
|
81921 | i.$$.dirty[1] & /*mapController, markedFeatures*/
|
|
2302
|
-
|
|
2291
|
+
16777248 && b && b.setEventHandler((m) => {
|
|
2303
2292
|
switch (m.type) {
|
|
2304
2293
|
case "mapClick":
|
|
2305
|
-
O &&
|
|
2294
|
+
O && Xi(m.coordinates);
|
|
2306
2295
|
break;
|
|
2307
2296
|
case "markerClick":
|
|
2308
2297
|
{
|
|
2309
|
-
const U = R == null ? void 0 : R.find((
|
|
2310
|
-
U &&
|
|
2298
|
+
const U = R == null ? void 0 : R.find((Z) => Z.id === m.id);
|
|
2299
|
+
U && bt(U);
|
|
2311
2300
|
}
|
|
2312
2301
|
break;
|
|
2313
2302
|
case "markerMouseEnter":
|
|
2314
|
-
j && t(15, D =
|
|
2303
|
+
j && t(15, D = et ? (R == null ? void 0 : R.findIndex((U) => U.id === m.id)) ?? -1 : -1);
|
|
2315
2304
|
break;
|
|
2316
2305
|
case "markerMouseLeave":
|
|
2317
2306
|
j && t(15, D = -1);
|
|
2318
2307
|
break;
|
|
2319
2308
|
}
|
|
2320
2309
|
}), i.$$.dirty[0] & /*listFeatures, selectedItemIndex*/
|
|
2321
|
-
49152 && t(
|
|
2322
|
-
|
|
2323
|
-
256 && t(
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2310
|
+
49152 && t(58, r = R == null ? void 0 : R[D]), i.$$.dirty[1] & /*mapController, selected, flyTo, flyToSelected*/
|
|
2311
|
+
134218786 && b && r && L && at && b.flyTo(r.center, Be(r)), i.$$.dirty[1] & /*pickedResultStyle*/
|
|
2312
|
+
256 && t(59, n = W === "full-geometry-including-polygon-center-marker"), i.$$.dirty[1] & /*markerOnSelected, mapController, showPolygonMarker*/
|
|
2313
|
+
268437536 && (Xe || b == null || b.setFeatures(void 0, void 0, n)), i.$$.dirty[1] & /*mapController, markerOnSelected, markedFeatures, selected, showPolygonMarker*/
|
|
2314
|
+
419432480 && b && Xe && !j && (b.setFeatures(r ? [r] : void 0, void 0, n), b.setSelectedMarker(r ? 0 : -1)), i.$$.dirty[1] & /*mapController, markedFeatures, picked, showPolygonMarker*/
|
|
2315
|
+
318767136 && b && b.setFeatures(j, N, n), i.$$.dirty[0] & /*selectedItemIndex*/
|
|
2327
2316
|
32768 | i.$$.dirty[1] & /*markedFeatures, mapController*/
|
|
2328
|
-
|
|
2329
|
-
671088640 && r && (window.clearTimeout(te), t(58, te = void 0)), i.$$.dirty[0] & /*searchValue*/
|
|
2317
|
+
16777248 && j && b && b.setSelectedMarker(D), i.$$.dirty[0] & /*searchValue*/
|
|
2330
2318
|
2 | i.$$.dirty[1] & /*mapController*/
|
|
2331
2319
|
32 && b) {
|
|
2332
|
-
const m =
|
|
2320
|
+
const m = mt(x);
|
|
2333
2321
|
b.setReverseMarker(m ? [m.decimalLongitude, m.decimalLatitude] : void 0);
|
|
2334
2322
|
}
|
|
2335
2323
|
i.$$.dirty[1] & /*selected*/
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
81920 &&
|
|
2339
|
-
optionsVisible:
|
|
2324
|
+
134217728 && pe("select", { feature: r }), i.$$.dirty[1] & /*picked*/
|
|
2325
|
+
33554432 && pe("pick", { feature: N }), i.$$.dirty[0] & /*focusedDelayed, listFeatures*/
|
|
2326
|
+
81920 && pe("optionsvisibilitychange", {
|
|
2327
|
+
optionsVisible: et && !!R
|
|
2340
2328
|
}), i.$$.dirty[0] & /*listFeatures*/
|
|
2341
|
-
16384 &&
|
|
2342
|
-
|
|
2343
|
-
1 &&
|
|
2344
|
-
2 &&
|
|
2329
|
+
16384 && pe("featureslisted", { features: R }), i.$$.dirty[1] & /*markedFeatures*/
|
|
2330
|
+
16777216 && pe("featuresmarked", { features: j }), i.$$.dirty[0] & /*reverseActive*/
|
|
2331
|
+
1 && pe("reversetoggle", { reverse: O }), i.$$.dirty[0] & /*searchValue*/
|
|
2332
|
+
2 && pe("querychange", { query: x }), i.$$.dirty[0] & /*reverseActive*/
|
|
2345
2333
|
1 | i.$$.dirty[1] & /*mapController*/
|
|
2346
2334
|
32 && b && b.indicateReverse(O);
|
|
2347
2335
|
}, [
|
|
@@ -2355,21 +2343,21 @@ function Sr(i, e, t) {
|
|
|
2355
2343
|
C,
|
|
2356
2344
|
I,
|
|
2357
2345
|
X,
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2346
|
+
oe,
|
|
2347
|
+
Te,
|
|
2348
|
+
Ut,
|
|
2349
|
+
Re,
|
|
2362
2350
|
R,
|
|
2363
2351
|
D,
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2352
|
+
et,
|
|
2353
|
+
ae,
|
|
2354
|
+
ce,
|
|
2355
|
+
ke,
|
|
2356
|
+
Vi,
|
|
2357
|
+
qt,
|
|
2368
2358
|
Ki,
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
wt,
|
|
2372
|
-
_t,
|
|
2359
|
+
pt,
|
|
2360
|
+
bt,
|
|
2373
2361
|
s,
|
|
2374
2362
|
u,
|
|
2375
2363
|
d,
|
|
@@ -2383,32 +2371,34 @@ function Sr(i, e, t) {
|
|
|
2383
2371
|
k,
|
|
2384
2372
|
b,
|
|
2385
2373
|
_,
|
|
2386
|
-
|
|
2374
|
+
Q,
|
|
2387
2375
|
W,
|
|
2388
|
-
|
|
2376
|
+
de,
|
|
2377
|
+
at,
|
|
2378
|
+
Xe,
|
|
2379
|
+
Ce,
|
|
2380
|
+
ct,
|
|
2381
|
+
Ke,
|
|
2382
|
+
Je,
|
|
2383
|
+
ft,
|
|
2389
2384
|
dt,
|
|
2390
2385
|
ht,
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
et,
|
|
2396
|
-
gt,
|
|
2397
|
-
yt,
|
|
2398
|
-
pt,
|
|
2386
|
+
qi,
|
|
2387
|
+
Zi,
|
|
2388
|
+
Gt,
|
|
2389
|
+
Qi,
|
|
2399
2390
|
Hi,
|
|
2400
|
-
Vi,
|
|
2401
|
-
Zt,
|
|
2402
|
-
Yi,
|
|
2403
|
-
Xi,
|
|
2404
2391
|
j,
|
|
2405
2392
|
N,
|
|
2406
|
-
|
|
2407
|
-
bt,
|
|
2393
|
+
gt,
|
|
2408
2394
|
r,
|
|
2409
2395
|
n,
|
|
2410
2396
|
l,
|
|
2411
2397
|
o,
|
|
2398
|
+
Ji,
|
|
2399
|
+
$i,
|
|
2400
|
+
en,
|
|
2401
|
+
tn,
|
|
2412
2402
|
nn,
|
|
2413
2403
|
rn,
|
|
2414
2404
|
on,
|
|
@@ -2417,21 +2407,17 @@ function Sr(i, e, t) {
|
|
|
2417
2407
|
un,
|
|
2418
2408
|
an,
|
|
2419
2409
|
cn,
|
|
2420
|
-
fn
|
|
2421
|
-
dn,
|
|
2422
|
-
hn,
|
|
2423
|
-
mn,
|
|
2424
|
-
gn
|
|
2410
|
+
fn
|
|
2425
2411
|
];
|
|
2426
2412
|
}
|
|
2427
|
-
let
|
|
2413
|
+
let _r = class extends Me {
|
|
2428
2414
|
constructor(e) {
|
|
2429
|
-
super(),
|
|
2415
|
+
super(), xe(
|
|
2430
2416
|
this,
|
|
2431
2417
|
e,
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2418
|
+
wr,
|
|
2419
|
+
vr,
|
|
2420
|
+
Se,
|
|
2435
2421
|
{
|
|
2436
2422
|
ZOOM_DEFAULTS: 25,
|
|
2437
2423
|
class: 2,
|
|
@@ -2460,23 +2446,22 @@ let xr = class extends ke {
|
|
|
2460
2446
|
pickedResultStyle: 39,
|
|
2461
2447
|
showPlaceType: 10,
|
|
2462
2448
|
showResultsWhileTyping: 40,
|
|
2463
|
-
autocompleteTimeout: 41,
|
|
2464
2449
|
selectFirst: 11,
|
|
2465
|
-
flyToSelected:
|
|
2466
|
-
markerOnSelected:
|
|
2467
|
-
types:
|
|
2468
|
-
exhaustiveReverseGeocoding:
|
|
2469
|
-
excludeTypes:
|
|
2470
|
-
zoom:
|
|
2471
|
-
apiUrl:
|
|
2472
|
-
fetchParameters:
|
|
2450
|
+
flyToSelected: 41,
|
|
2451
|
+
markerOnSelected: 42,
|
|
2452
|
+
types: 43,
|
|
2453
|
+
exhaustiveReverseGeocoding: 44,
|
|
2454
|
+
excludeTypes: 45,
|
|
2455
|
+
zoom: 46,
|
|
2456
|
+
apiUrl: 47,
|
|
2457
|
+
fetchParameters: 48,
|
|
2473
2458
|
iconsBaseUrl: 12,
|
|
2474
|
-
adjustUrlQuery:
|
|
2475
|
-
focus:
|
|
2476
|
-
blur:
|
|
2477
|
-
setQuery:
|
|
2478
|
-
clearList:
|
|
2479
|
-
clearMap:
|
|
2459
|
+
adjustUrlQuery: 49,
|
|
2460
|
+
focus: 50,
|
|
2461
|
+
blur: 51,
|
|
2462
|
+
setQuery: 52,
|
|
2463
|
+
clearList: 53,
|
|
2464
|
+
clearMap: 54
|
|
2480
2465
|
},
|
|
2481
2466
|
null,
|
|
2482
2467
|
[-1, -1, -1]
|
|
@@ -2486,26 +2471,26 @@ let xr = class extends ke {
|
|
|
2486
2471
|
return this.$$.ctx[25];
|
|
2487
2472
|
}
|
|
2488
2473
|
get focus() {
|
|
2489
|
-
return this.$$.ctx[
|
|
2474
|
+
return this.$$.ctx[50];
|
|
2490
2475
|
}
|
|
2491
2476
|
get blur() {
|
|
2492
|
-
return this.$$.ctx[
|
|
2477
|
+
return this.$$.ctx[51];
|
|
2493
2478
|
}
|
|
2494
2479
|
get setQuery() {
|
|
2495
|
-
return this.$$.ctx[
|
|
2480
|
+
return this.$$.ctx[52];
|
|
2496
2481
|
}
|
|
2497
2482
|
get clearList() {
|
|
2498
|
-
return this.$$.ctx[
|
|
2483
|
+
return this.$$.ctx[53];
|
|
2499
2484
|
}
|
|
2500
2485
|
get clearMap() {
|
|
2501
|
-
return this.$$.ctx[
|
|
2486
|
+
return this.$$.ctx[54];
|
|
2502
2487
|
}
|
|
2503
2488
|
};
|
|
2504
|
-
function
|
|
2489
|
+
function Qe(i, e, t = {}) {
|
|
2505
2490
|
const n = { type: "Feature" };
|
|
2506
2491
|
return (t.id === 0 || t.id) && (n.id = t.id), t.bbox && (n.bbox = t.bbox), n.properties = e || {}, n.geometry = i, n;
|
|
2507
2492
|
}
|
|
2508
|
-
function
|
|
2493
|
+
function zt(i, e, t = {}) {
|
|
2509
2494
|
for (const r of i) {
|
|
2510
2495
|
if (r.length < 4)
|
|
2511
2496
|
throw new Error(
|
|
@@ -2517,22 +2502,22 @@ function Ft(i, e, t = {}) {
|
|
|
2517
2502
|
if (r[r.length - 1][o] !== r[0][o])
|
|
2518
2503
|
throw new Error("First and last Position are not equivalent.");
|
|
2519
2504
|
}
|
|
2520
|
-
return
|
|
2505
|
+
return Qe({
|
|
2521
2506
|
type: "Polygon",
|
|
2522
2507
|
coordinates: i
|
|
2523
2508
|
}, e, t);
|
|
2524
2509
|
}
|
|
2525
|
-
function
|
|
2510
|
+
function He(i, e = {}) {
|
|
2526
2511
|
const t = { type: "FeatureCollection" };
|
|
2527
2512
|
return e.id && (t.id = e.id), e.bbox && (t.bbox = e.bbox), t.features = i, t;
|
|
2528
2513
|
}
|
|
2529
|
-
function
|
|
2530
|
-
return
|
|
2514
|
+
function Ai(i, e, t = {}) {
|
|
2515
|
+
return Qe({
|
|
2531
2516
|
type: "MultiPolygon",
|
|
2532
2517
|
coordinates: i
|
|
2533
2518
|
}, e, t);
|
|
2534
2519
|
}
|
|
2535
|
-
function
|
|
2520
|
+
function Wi(i, e, t) {
|
|
2536
2521
|
if (i !== null)
|
|
2537
2522
|
for (var n, r, o, l, s, c, u, d = 0, a = 0, f, h = i.type, g = h === "FeatureCollection", v = h === "Feature", w = g ? i.features.length : 1, p = 0; p < w; p++) {
|
|
2538
2523
|
u = g ? i.features[p].geometry : v ? i.geometry : i, f = u ? u.type === "GeometryCollection" : !1, s = f ? u.geometries.length : 1;
|
|
@@ -2609,7 +2594,7 @@ function Di(i, e, t) {
|
|
|
2609
2594
|
break;
|
|
2610
2595
|
case "GeometryCollection":
|
|
2611
2596
|
for (n = 0; n < l.geometries.length; n++)
|
|
2612
|
-
if (
|
|
2597
|
+
if (Wi(l.geometries[n], e) === !1)
|
|
2613
2598
|
return !1;
|
|
2614
2599
|
break;
|
|
2615
2600
|
default:
|
|
@@ -2619,7 +2604,7 @@ function Di(i, e, t) {
|
|
|
2619
2604
|
}
|
|
2620
2605
|
}
|
|
2621
2606
|
}
|
|
2622
|
-
function
|
|
2607
|
+
function Bt(i, e) {
|
|
2623
2608
|
var t, n, r, o, l, s, c, u, d, a, f = 0, h = i.type === "FeatureCollection", g = i.type === "Feature", v = h ? i.features.length : 1;
|
|
2624
2609
|
for (t = 0; t < v; t++) {
|
|
2625
2610
|
for (s = h ? i.features[t].geometry : g ? i.geometry : i, u = h ? i.features[t].properties : g ? i.properties : {}, d = h ? i.features[t].bbox : g ? i.bbox : void 0, a = h ? i.features[t].id : g ? i.id : void 0, c = s ? s.type === "GeometryCollection" : !1, l = c ? s.geometries.length : 1, r = 0; r < l; r++) {
|
|
@@ -2670,8 +2655,8 @@ function Ut(i, e) {
|
|
|
2670
2655
|
f++;
|
|
2671
2656
|
}
|
|
2672
2657
|
}
|
|
2673
|
-
function
|
|
2674
|
-
|
|
2658
|
+
function Er(i, e) {
|
|
2659
|
+
Bt(i, function(t, n, r, o, l) {
|
|
2675
2660
|
var s = t === null ? null : t.type;
|
|
2676
2661
|
switch (s) {
|
|
2677
2662
|
case null:
|
|
@@ -2679,7 +2664,7 @@ function Mr(i, e) {
|
|
|
2679
2664
|
case "LineString":
|
|
2680
2665
|
case "Polygon":
|
|
2681
2666
|
return e(
|
|
2682
|
-
|
|
2667
|
+
Qe(t, r, { bbox: o, id: l }),
|
|
2683
2668
|
n,
|
|
2684
2669
|
0
|
|
2685
2670
|
) === !1 ? !1 : void 0;
|
|
@@ -2701,28 +2686,28 @@ function Mr(i, e) {
|
|
|
2701
2686
|
type: c,
|
|
2702
2687
|
coordinates: d
|
|
2703
2688
|
};
|
|
2704
|
-
if (e(
|
|
2689
|
+
if (e(Qe(a, r), n, u) === !1)
|
|
2705
2690
|
return !1;
|
|
2706
2691
|
}
|
|
2707
2692
|
});
|
|
2708
2693
|
}
|
|
2709
|
-
function
|
|
2694
|
+
function Lr(i, e = {}) {
|
|
2710
2695
|
if (i.bbox != null && e.recompute !== !0)
|
|
2711
2696
|
return i.bbox;
|
|
2712
2697
|
const t = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
|
|
2713
|
-
return
|
|
2698
|
+
return Wi(i, (n) => {
|
|
2714
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]);
|
|
2715
2700
|
}), t;
|
|
2716
2701
|
}
|
|
2717
|
-
var
|
|
2718
|
-
function
|
|
2702
|
+
var Pt = Lr;
|
|
2703
|
+
function Sr(i) {
|
|
2719
2704
|
if (!i)
|
|
2720
2705
|
throw new Error("geojson is required");
|
|
2721
2706
|
switch (i.type) {
|
|
2722
2707
|
case "Feature":
|
|
2723
|
-
return
|
|
2708
|
+
return zi(i);
|
|
2724
2709
|
case "FeatureCollection":
|
|
2725
|
-
return
|
|
2710
|
+
return xr(i);
|
|
2726
2711
|
case "Point":
|
|
2727
2712
|
case "LineString":
|
|
2728
2713
|
case "Polygon":
|
|
@@ -2730,12 +2715,12 @@ function kr(i) {
|
|
|
2730
2715
|
case "MultiLineString":
|
|
2731
2716
|
case "MultiPolygon":
|
|
2732
2717
|
case "GeometryCollection":
|
|
2733
|
-
return
|
|
2718
|
+
return Dt(i);
|
|
2734
2719
|
default:
|
|
2735
2720
|
throw new Error("unknown GeoJSON type");
|
|
2736
2721
|
}
|
|
2737
2722
|
}
|
|
2738
|
-
function
|
|
2723
|
+
function zi(i) {
|
|
2739
2724
|
const e = { type: "Feature" };
|
|
2740
2725
|
return Object.keys(i).forEach((t) => {
|
|
2741
2726
|
switch (t) {
|
|
@@ -2746,16 +2731,16 @@ function Fi(i) {
|
|
|
2746
2731
|
default:
|
|
2747
2732
|
e[t] = i[t];
|
|
2748
2733
|
}
|
|
2749
|
-
}), e.properties =
|
|
2734
|
+
}), e.properties = Bi(i.properties), i.geometry == null ? e.geometry = null : e.geometry = Dt(i.geometry), e;
|
|
2750
2735
|
}
|
|
2751
|
-
function
|
|
2736
|
+
function Bi(i) {
|
|
2752
2737
|
const e = {};
|
|
2753
2738
|
return i && Object.keys(i).forEach((t) => {
|
|
2754
2739
|
const n = i[t];
|
|
2755
|
-
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] = Bi(n) : e[t] = n;
|
|
2756
2741
|
}), e;
|
|
2757
2742
|
}
|
|
2758
|
-
function
|
|
2743
|
+
function xr(i) {
|
|
2759
2744
|
const e = { type: "FeatureCollection" };
|
|
2760
2745
|
return Object.keys(i).forEach((t) => {
|
|
2761
2746
|
switch (t) {
|
|
@@ -2765,17 +2750,17 @@ function Nr(i) {
|
|
|
2765
2750
|
default:
|
|
2766
2751
|
e[t] = i[t];
|
|
2767
2752
|
}
|
|
2768
|
-
}), e.features = i.features.map((t) =>
|
|
2753
|
+
}), e.features = i.features.map((t) => zi(t)), e;
|
|
2769
2754
|
}
|
|
2770
|
-
function
|
|
2755
|
+
function Dt(i) {
|
|
2771
2756
|
const e = { type: i.type };
|
|
2772
|
-
return i.bbox && (e.bbox = i.bbox), i.type === "GeometryCollection" ? (e.geometries = i.geometries.map((t) =>
|
|
2757
|
+
return i.bbox && (e.bbox = i.bbox), i.type === "GeometryCollection" ? (e.geometries = i.geometries.map((t) => Dt(t)), e) : (e.coordinates = Di(i.coordinates), e);
|
|
2773
2758
|
}
|
|
2774
|
-
function
|
|
2759
|
+
function Di(i) {
|
|
2775
2760
|
const e = i;
|
|
2776
|
-
return typeof e[0] != "object" ? e.slice() : e.map((t) =>
|
|
2761
|
+
return typeof e[0] != "object" ? e.slice() : e.map((t) => Di(t));
|
|
2777
2762
|
}
|
|
2778
|
-
var
|
|
2763
|
+
var Mr = Sr;
|
|
2779
2764
|
/**
|
|
2780
2765
|
* splaytree v3.1.2
|
|
2781
2766
|
* Fast Splay tree for Node and browser
|
|
@@ -2798,7 +2783,7 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
|
2798
2783
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
2799
2784
|
and limitations under the License.
|
|
2800
2785
|
***************************************************************************** */
|
|
2801
|
-
function
|
|
2786
|
+
function Cr(i, e) {
|
|
2802
2787
|
var t = { label: 0, sent: function() {
|
|
2803
2788
|
if (o[0] & 1) throw o[1];
|
|
2804
2789
|
return o[1];
|
|
@@ -2858,7 +2843,7 @@ function Pr(i, e) {
|
|
|
2858
2843
|
return { value: u[0] ? u[1] : void 0, done: !0 };
|
|
2859
2844
|
}
|
|
2860
2845
|
}
|
|
2861
|
-
var
|
|
2846
|
+
var Le = (
|
|
2862
2847
|
/** @class */
|
|
2863
2848
|
/* @__PURE__ */ function() {
|
|
2864
2849
|
function i(e, t) {
|
|
@@ -2867,11 +2852,11 @@ var xe = (
|
|
|
2867
2852
|
return i;
|
|
2868
2853
|
}()
|
|
2869
2854
|
);
|
|
2870
|
-
function
|
|
2855
|
+
function kr(i, e) {
|
|
2871
2856
|
return i > e ? 1 : i < e ? -1 : 0;
|
|
2872
2857
|
}
|
|
2873
|
-
function
|
|
2874
|
-
for (var n = new
|
|
2858
|
+
function be(i, e, t) {
|
|
2859
|
+
for (var n = new Le(null, null), r = n, o = n; ; ) {
|
|
2875
2860
|
var l = t(i, e.key);
|
|
2876
2861
|
if (l < 0) {
|
|
2877
2862
|
if (e.left === null)
|
|
@@ -2896,46 +2881,46 @@ function we(i, e, t) {
|
|
|
2896
2881
|
}
|
|
2897
2882
|
return r.right = e.left, o.left = e.right, e.left = n.right, e.right = n.left, e;
|
|
2898
2883
|
}
|
|
2899
|
-
function
|
|
2900
|
-
var r = new
|
|
2884
|
+
function xt(i, e, t, n) {
|
|
2885
|
+
var r = new Le(i, e);
|
|
2901
2886
|
if (t === null)
|
|
2902
2887
|
return r.left = r.right = null, r;
|
|
2903
|
-
t =
|
|
2888
|
+
t = be(i, t, n);
|
|
2904
2889
|
var o = n(i, t.key);
|
|
2905
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;
|
|
2906
2891
|
}
|
|
2907
|
-
function
|
|
2892
|
+
function fi(i, e, t) {
|
|
2908
2893
|
var n = null, r = null;
|
|
2909
2894
|
if (e) {
|
|
2910
|
-
e =
|
|
2895
|
+
e = be(i, e, t);
|
|
2911
2896
|
var o = t(e.key, i);
|
|
2912
2897
|
o === 0 ? (n = e.left, r = e.right) : o < 0 ? (r = e.right, e.right = null, n = e) : (n = e.left, e.left = null, r = e);
|
|
2913
2898
|
}
|
|
2914
2899
|
return { left: n, right: r };
|
|
2915
2900
|
}
|
|
2916
|
-
function
|
|
2917
|
-
return e === null ? i : (i === null || (e =
|
|
2901
|
+
function Nr(i, e, t) {
|
|
2902
|
+
return e === null ? i : (i === null || (e = be(i.key, e, t), e.left = i), e);
|
|
2918
2903
|
}
|
|
2919
|
-
function
|
|
2904
|
+
function Tt(i, e, t, n, r) {
|
|
2920
2905
|
if (i) {
|
|
2921
2906
|
n("" + e + (t ? "└── " : "├── ") + r(i) + `
|
|
2922
2907
|
`);
|
|
2923
2908
|
var o = e + (t ? " " : "│ ");
|
|
2924
|
-
i.left &&
|
|
2909
|
+
i.left && Tt(i.left, o, !1, n, r), i.right && Tt(i.right, o, !0, n, r);
|
|
2925
2910
|
}
|
|
2926
2911
|
}
|
|
2927
|
-
var
|
|
2912
|
+
var Ft = (
|
|
2928
2913
|
/** @class */
|
|
2929
2914
|
function() {
|
|
2930
2915
|
function i(e) {
|
|
2931
|
-
e === void 0 && (e =
|
|
2916
|
+
e === void 0 && (e = kr), this._root = null, this._size = 0, this._comparator = e;
|
|
2932
2917
|
}
|
|
2933
2918
|
return i.prototype.insert = function(e, t) {
|
|
2934
|
-
return this._size++, this._root =
|
|
2919
|
+
return this._size++, this._root = xt(e, t, this._root, this._comparator);
|
|
2935
2920
|
}, i.prototype.add = function(e, t) {
|
|
2936
|
-
var n = new
|
|
2921
|
+
var n = new Le(e, t);
|
|
2937
2922
|
this._root === null && (n.left = n.right = null, this._size++, this._root = n);
|
|
2938
|
-
var r = this._comparator, o =
|
|
2923
|
+
var r = this._comparator, o = be(e, this._root, r), l = r(e, o.key);
|
|
2939
2924
|
return l === 0 ? this._root = o : (l < 0 ? (n.left = o.left, n.right = o, o.left = null) : l > 0 && (n.right = o.right, n.left = o, o.right = null), this._size++, this._root = n), this._root;
|
|
2940
2925
|
}, i.prototype.remove = function(e) {
|
|
2941
2926
|
this._root = this._remove(e, this._root, this._comparator);
|
|
@@ -2943,15 +2928,15 @@ var jt = (
|
|
|
2943
2928
|
var r;
|
|
2944
2929
|
if (t === null)
|
|
2945
2930
|
return null;
|
|
2946
|
-
t =
|
|
2931
|
+
t = be(e, t, n);
|
|
2947
2932
|
var o = n(e, t.key);
|
|
2948
|
-
return o === 0 ? (t.left === null ? r = t.right : (r =
|
|
2933
|
+
return o === 0 ? (t.left === null ? r = t.right : (r = be(e, t.left, n), r.right = t.right), this._size--, r) : t;
|
|
2949
2934
|
}, i.prototype.pop = function() {
|
|
2950
2935
|
var e = this._root;
|
|
2951
2936
|
if (e) {
|
|
2952
2937
|
for (; e.left; )
|
|
2953
2938
|
e = e.left;
|
|
2954
|
-
return this._root =
|
|
2939
|
+
return this._root = be(e.key, this._root, this._comparator), this._root = this._remove(e.key, this._root, this._comparator), { key: e.key, data: e.data };
|
|
2955
2940
|
}
|
|
2956
2941
|
return null;
|
|
2957
2942
|
}, i.prototype.findStatic = function(e) {
|
|
@@ -2963,7 +2948,7 @@ var jt = (
|
|
|
2963
2948
|
}
|
|
2964
2949
|
return null;
|
|
2965
2950
|
}, i.prototype.find = function(e) {
|
|
2966
|
-
return this._root && (this._root =
|
|
2951
|
+
return this._root && (this._root = be(e, this._root, this._comparator), this._comparator(e, this._root.key) !== 0) ? null : this._root;
|
|
2967
2952
|
}, i.prototype.contains = function(e) {
|
|
2968
2953
|
for (var t = this._root, n = this._comparator; t; ) {
|
|
2969
2954
|
var r = n(e, t.key);
|
|
@@ -3056,15 +3041,15 @@ var jt = (
|
|
|
3056
3041
|
}, i.prototype.clear = function() {
|
|
3057
3042
|
return this._root = null, this._size = 0, this;
|
|
3058
3043
|
}, i.prototype.toList = function() {
|
|
3059
|
-
return
|
|
3044
|
+
return Tr(this._root);
|
|
3060
3045
|
}, i.prototype.load = function(e, t, n) {
|
|
3061
3046
|
t === void 0 && (t = []), n === void 0 && (n = !1);
|
|
3062
3047
|
var r = e.length, o = this._comparator;
|
|
3063
|
-
if (n &&
|
|
3064
|
-
this._root =
|
|
3048
|
+
if (n && Ot(e, t, 0, r - 1, o), this._root === null)
|
|
3049
|
+
this._root = Rt(e, t, 0, r), this._size = r;
|
|
3065
3050
|
else {
|
|
3066
|
-
var l =
|
|
3067
|
-
r = this._size + r, this._root =
|
|
3051
|
+
var l = Rr(this.toList(), Pr(e, t), o);
|
|
3052
|
+
r = this._size + r, this._root = It({ head: l }, 0, r);
|
|
3068
3053
|
}
|
|
3069
3054
|
return this;
|
|
3070
3055
|
}, i.prototype.isEmpty = function() {
|
|
@@ -3086,17 +3071,17 @@ var jt = (
|
|
|
3086
3071
|
return String(n.key);
|
|
3087
3072
|
});
|
|
3088
3073
|
var t = [];
|
|
3089
|
-
return
|
|
3074
|
+
return Tt(this._root, "", !0, function(n) {
|
|
3090
3075
|
return t.push(n);
|
|
3091
3076
|
}, e), t.join("");
|
|
3092
3077
|
}, i.prototype.update = function(e, t, n) {
|
|
3093
|
-
var r = this._comparator, o =
|
|
3094
|
-
r(e, t) < 0 ? s =
|
|
3078
|
+
var r = this._comparator, o = fi(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);
|
|
3095
3080
|
}, i.prototype.split = function(e) {
|
|
3096
|
-
return
|
|
3081
|
+
return fi(e, this._root, this._comparator);
|
|
3097
3082
|
}, i.prototype[Symbol.iterator] = function() {
|
|
3098
3083
|
var e, t, n;
|
|
3099
|
-
return
|
|
3084
|
+
return Cr(this, function(r) {
|
|
3100
3085
|
switch (r.label) {
|
|
3101
3086
|
case 0:
|
|
3102
3087
|
e = this._root, t = [], n = !1, r.label = 1;
|
|
@@ -3120,38 +3105,38 @@ var jt = (
|
|
|
3120
3105
|
}, i;
|
|
3121
3106
|
}()
|
|
3122
3107
|
);
|
|
3123
|
-
function
|
|
3108
|
+
function Rt(i, e, t, n) {
|
|
3124
3109
|
var r = n - t;
|
|
3125
3110
|
if (r > 0) {
|
|
3126
|
-
var o = t + Math.floor(r / 2), l = i[o], s = e[o], c = new
|
|
3127
|
-
return c.left =
|
|
3111
|
+
var o = t + Math.floor(r / 2), l = i[o], s = e[o], c = new Le(l, s);
|
|
3112
|
+
return c.left = Rt(i, e, t, o), c.right = Rt(i, e, o + 1, n), c;
|
|
3128
3113
|
}
|
|
3129
3114
|
return null;
|
|
3130
3115
|
}
|
|
3131
|
-
function
|
|
3132
|
-
for (var t = new
|
|
3133
|
-
n = n.next = new
|
|
3116
|
+
function Pr(i, e) {
|
|
3117
|
+
for (var t = new Le(null, null), n = t, r = 0; r < i.length; r++)
|
|
3118
|
+
n = n.next = new Le(i[r], e[r]);
|
|
3134
3119
|
return n.next = null, t.next;
|
|
3135
3120
|
}
|
|
3136
|
-
function
|
|
3137
|
-
for (var e = i, t = [], n = !1, r = new
|
|
3121
|
+
function Tr(i) {
|
|
3122
|
+
for (var e = i, t = [], n = !1, r = new Le(null, null), o = r; !n; )
|
|
3138
3123
|
e ? (t.push(e), e = e.left) : t.length > 0 ? (e = o = o.next = t.pop(), e = e.right) : n = !0;
|
|
3139
3124
|
return o.next = null, r.next;
|
|
3140
3125
|
}
|
|
3141
|
-
function
|
|
3126
|
+
function It(i, e, t) {
|
|
3142
3127
|
var n = t - e;
|
|
3143
3128
|
if (n > 0) {
|
|
3144
|
-
var r = e + Math.floor(n / 2), o =
|
|
3145
|
-
return l.left = o, i.head = i.head.next, l.right =
|
|
3129
|
+
var r = e + Math.floor(n / 2), o = It(i, e, r), l = i.head;
|
|
3130
|
+
return l.left = o, i.head = i.head.next, l.right = It(i, r + 1, t), l;
|
|
3146
3131
|
}
|
|
3147
3132
|
return null;
|
|
3148
3133
|
}
|
|
3149
|
-
function
|
|
3150
|
-
for (var n = new
|
|
3134
|
+
function Rr(i, e, t) {
|
|
3135
|
+
for (var n = new Le(null, null), r = n, o = i, l = e; o !== null && l !== null; )
|
|
3151
3136
|
t(o.key, l.key) < 0 ? (r.next = o, o = o.next) : (r.next = l, l = l.next), r = r.next;
|
|
3152
3137
|
return o !== null ? r.next = o : l !== null && (r.next = l), n.next;
|
|
3153
3138
|
}
|
|
3154
|
-
function
|
|
3139
|
+
function Ot(i, e, t, n, r) {
|
|
3155
3140
|
if (!(t >= n)) {
|
|
3156
3141
|
for (var o = i[t + n >> 1], l = t - 1, s = n + 1; ; ) {
|
|
3157
3142
|
do
|
|
@@ -3165,11 +3150,11 @@ function zt(i, e, t, n, r) {
|
|
|
3165
3150
|
var c = i[l];
|
|
3166
3151
|
i[l] = i[s], i[s] = c, c = e[l], e[l] = e[s], e[s] = c;
|
|
3167
3152
|
}
|
|
3168
|
-
|
|
3153
|
+
Ot(i, e, t, s, r), Ot(i, e, s + 1, n, r);
|
|
3169
3154
|
}
|
|
3170
3155
|
}
|
|
3171
|
-
const
|
|
3172
|
-
function
|
|
3156
|
+
const he = 11102230246251565e-32, V = 134217729, Ir = (3 + 8 * he) * he;
|
|
3157
|
+
function Mt(i, e, t, n, r) {
|
|
3173
3158
|
let o, l, s, c, u = e[0], d = n[0], a = 0, f = 0;
|
|
3174
3159
|
d > u == d > -u ? (o = u, u = e[++a]) : (o = d, d = n[++f]);
|
|
3175
3160
|
let h = 0;
|
|
@@ -3182,34 +3167,34 @@ function Nt(i, e, t, n, r) {
|
|
|
3182
3167
|
l = o + d, c = l - o, s = o - (l - c) + (d - c), d = n[++f], o = l, s !== 0 && (r[h++] = s);
|
|
3183
3168
|
return (o !== 0 || h === 0) && (r[h++] = o), h;
|
|
3184
3169
|
}
|
|
3185
|
-
function
|
|
3170
|
+
function Or(i, e) {
|
|
3186
3171
|
let t = e[0];
|
|
3187
3172
|
for (let n = 1; n < i; n++) t += e[n];
|
|
3188
3173
|
return t;
|
|
3189
3174
|
}
|
|
3190
|
-
function
|
|
3175
|
+
function Ye(i) {
|
|
3191
3176
|
return new Float64Array(i);
|
|
3192
3177
|
}
|
|
3193
|
-
const
|
|
3194
|
-
function
|
|
3178
|
+
const Ar = (3 + 16 * he) * he, Wr = (2 + 12 * he) * he, zr = (9 + 64 * he) * he * he, Ae = Ye(4), di = Ye(8), hi = Ye(12), gi = Ye(16), K = Ye(4);
|
|
3179
|
+
function Br(i, e, t, n, r, o, l) {
|
|
3195
3180
|
let s, c, u, d, a, f, h, g, v, w, p, S, L, E, M, k, b, _;
|
|
3196
|
-
const C = i - r, I = t - r,
|
|
3197
|
-
E = C * O, f = V * C, h = f - (f - C), g = C - h, f = V * O, v = f - (f - O), w = O - v, M = g * w - (E - h * v - g * v - h * w), k =
|
|
3198
|
-
let X =
|
|
3199
|
-
if (X >= x || -X >= x || (a = i - C, s = i - (C + a) + (a - r), a = t - I, u = t - (I + a) + (a - r), a = e -
|
|
3181
|
+
const C = i - r, I = t - r, Q = e - o, O = n - o;
|
|
3182
|
+
E = C * O, f = V * C, h = f - (f - C), g = C - h, f = V * O, v = f - (f - O), w = O - v, M = g * w - (E - h * v - g * v - h * w), k = Q * I, f = V * Q, h = f - (f - Q), g = Q - h, f = V * I, v = f - (f - I), w = I - v, b = g * w - (k - h * v - g * v - h * w), p = M - b, a = M - p, Ae[0] = M - (p + a) + (a - b), S = E + p, a = S - E, L = E - (S - a) + (p - a), p = L - k, a = L - p, Ae[1] = L - (p + a) + (a - k), _ = S + p, a = _ - S, Ae[2] = S - (_ - a) + (p - a), Ae[3] = _;
|
|
3183
|
+
let X = Or(4, Ae), x = Wr * l;
|
|
3184
|
+
if (X >= x || -X >= x || (a = i - C, s = i - (C + a) + (a - r), a = t - I, u = t - (I + a) + (a - r), a = e - Q, c = e - (Q + a) + (a - o), a = n - O, d = n - (O + a) + (a - o), s === 0 && c === 0 && u === 0 && d === 0) || (x = zr * l + Ir * Math.abs(X), X += C * d + O * s - (Q * u + I * c), X >= x || -X >= x)) return X;
|
|
3200
3185
|
E = s * O, f = V * s, h = f - (f - s), g = s - h, f = V * O, v = f - (f - O), w = O - v, M = g * w - (E - h * v - g * v - h * w), k = c * I, f = V * c, h = f - (f - c), g = c - h, f = V * I, v = f - (f - I), w = I - v, b = g * w - (k - h * v - g * v - h * w), p = M - b, a = M - p, K[0] = M - (p + a) + (a - b), S = E + p, a = S - E, L = E - (S - a) + (p - a), p = L - k, a = L - p, K[1] = L - (p + a) + (a - k), _ = S + p, a = _ - S, K[2] = S - (_ - a) + (p - a), K[3] = _;
|
|
3201
|
-
const W =
|
|
3202
|
-
E = C * d, f = V * C, h = f - (f - C), g = C - h, f = V * d, v = f - (f - d), w = d - v, M = g * w - (E - h * v - g * v - h * w), k =
|
|
3203
|
-
const
|
|
3186
|
+
const W = Mt(4, Ae, 4, K, di);
|
|
3187
|
+
E = C * d, f = V * C, h = f - (f - C), g = C - h, f = V * d, v = f - (f - d), w = d - v, M = g * w - (E - h * v - g * v - h * w), k = Q * u, f = V * Q, h = f - (f - Q), g = Q - h, f = V * u, v = f - (f - u), w = u - v, b = g * w - (k - h * v - g * v - h * w), p = M - b, a = M - p, K[0] = M - (p + a) + (a - b), S = E + p, a = S - E, L = E - (S - a) + (p - a), p = L - k, a = L - p, K[1] = L - (p + a) + (a - k), _ = S + p, a = _ - S, K[2] = S - (_ - a) + (p - a), K[3] = _;
|
|
3188
|
+
const oe = Mt(W, di, 4, K, hi);
|
|
3204
3189
|
E = s * d, f = V * s, h = f - (f - s), g = s - h, f = V * d, v = f - (f - d), w = d - v, M = g * w - (E - h * v - g * v - h * w), k = c * u, f = V * c, h = f - (f - c), g = c - h, f = V * u, v = f - (f - u), w = u - v, b = g * w - (k - h * v - g * v - h * w), p = M - b, a = M - p, K[0] = M - (p + a) + (a - b), S = E + p, a = S - E, L = E - (S - a) + (p - a), p = L - k, a = L - p, K[1] = L - (p + a) + (a - k), _ = S + p, a = _ - S, K[2] = S - (_ - a) + (p - a), K[3] = _;
|
|
3205
|
-
const
|
|
3206
|
-
return
|
|
3190
|
+
const de = Mt(oe, hi, 4, K, gi);
|
|
3191
|
+
return gi[de - 1];
|
|
3207
3192
|
}
|
|
3208
|
-
function
|
|
3193
|
+
function Dr(i, e, t, n, r, o) {
|
|
3209
3194
|
const l = (e - o) * (t - r), s = (i - r) * (n - o), c = l - s, u = Math.abs(l + s);
|
|
3210
|
-
return Math.abs(c) >=
|
|
3195
|
+
return Math.abs(c) >= Ar * u ? c : -Br(i, e, t, n, r, o, u);
|
|
3211
3196
|
}
|
|
3212
|
-
const
|
|
3197
|
+
const Ue = (i, e) => i.ll.x <= e.x && e.x <= i.ur.x && i.ll.y <= e.y && e.y <= i.ur.y, At = (i, e) => {
|
|
3213
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;
|
|
3214
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;
|
|
3215
3200
|
return {
|
|
@@ -3223,20 +3208,20 @@ const je = (i, e) => i.ll.x <= e.x && e.x <= i.ur.x && i.ll.y <= e.y && e.y <= i
|
|
|
3223
3208
|
}
|
|
3224
3209
|
};
|
|
3225
3210
|
};
|
|
3226
|
-
let
|
|
3227
|
-
|
|
3228
|
-
const
|
|
3229
|
-
if (-
|
|
3211
|
+
let ve = Number.EPSILON;
|
|
3212
|
+
ve === void 0 && (ve = Math.pow(2, -52));
|
|
3213
|
+
const Fr = ve * ve, mi = (i, e) => {
|
|
3214
|
+
if (-ve < i && i < ve && -ve < e && e < ve)
|
|
3230
3215
|
return 0;
|
|
3231
3216
|
const t = i - e;
|
|
3232
|
-
return t * t <
|
|
3217
|
+
return t * t < Fr * i * e ? 0 : i < e ? -1 : 1;
|
|
3233
3218
|
};
|
|
3234
|
-
class
|
|
3219
|
+
class Ur {
|
|
3235
3220
|
constructor() {
|
|
3236
3221
|
this.reset();
|
|
3237
3222
|
}
|
|
3238
3223
|
reset() {
|
|
3239
|
-
this.xRounder = new
|
|
3224
|
+
this.xRounder = new yi(), this.yRounder = new yi();
|
|
3240
3225
|
}
|
|
3241
3226
|
round(e, t) {
|
|
3242
3227
|
return {
|
|
@@ -3245,9 +3230,9 @@ class Zr {
|
|
|
3245
3230
|
};
|
|
3246
3231
|
}
|
|
3247
3232
|
}
|
|
3248
|
-
class
|
|
3233
|
+
class yi {
|
|
3249
3234
|
constructor() {
|
|
3250
|
-
this.tree = new
|
|
3235
|
+
this.tree = new Ft(), this.round(0);
|
|
3251
3236
|
}
|
|
3252
3237
|
// Note: this can rounds input values backwards or forwards.
|
|
3253
3238
|
// You might ask, why not restrict this to just rounding
|
|
@@ -3258,16 +3243,16 @@ class vi {
|
|
|
3258
3243
|
// angle for t-intersections).
|
|
3259
3244
|
round(e) {
|
|
3260
3245
|
const t = this.tree.add(e), n = this.tree.prev(t);
|
|
3261
|
-
if (n !== null &&
|
|
3246
|
+
if (n !== null && mi(t.key, n.key) === 0)
|
|
3262
3247
|
return this.tree.remove(e), n.key;
|
|
3263
3248
|
const r = this.tree.next(t);
|
|
3264
|
-
return r !== null &&
|
|
3249
|
+
return r !== null && mi(t.key, r.key) === 0 ? (this.tree.remove(e), r.key) : e;
|
|
3265
3250
|
}
|
|
3266
3251
|
}
|
|
3267
|
-
const
|
|
3268
|
-
const n =
|
|
3252
|
+
const Ve = new Ur(), st = (i, e) => i.x * e.y - i.y * e.x, Fi = (i, e) => i.x * e.x + i.y * e.y, pi = (i, e, t) => {
|
|
3253
|
+
const n = Dr(i.x, i.y, e.x, e.y, t.x, t.y);
|
|
3269
3254
|
return n > 0 ? -1 : n < 0 ? 1 : 0;
|
|
3270
|
-
},
|
|
3255
|
+
}, lt = (i) => Math.sqrt(Fi(i, i)), Gr = (i, e, t) => {
|
|
3271
3256
|
const n = {
|
|
3272
3257
|
x: e.x - i.x,
|
|
3273
3258
|
y: e.y - i.y
|
|
@@ -3275,8 +3260,8 @@ const Xe = new Zr(), at = (i, e) => i.x * e.y - i.y * e.x, ji = (i, e) => i.x *
|
|
|
3275
3260
|
x: t.x - i.x,
|
|
3276
3261
|
y: t.y - i.y
|
|
3277
3262
|
};
|
|
3278
|
-
return
|
|
3279
|
-
},
|
|
3263
|
+
return st(r, n) / lt(r) / lt(n);
|
|
3264
|
+
}, jr = (i, e, t) => {
|
|
3280
3265
|
const n = {
|
|
3281
3266
|
x: e.x - i.x,
|
|
3282
3267
|
y: e.y - i.y
|
|
@@ -3284,34 +3269,34 @@ const Xe = new Zr(), at = (i, e) => i.x * e.y - i.y * e.x, ji = (i, e) => i.x *
|
|
|
3284
3269
|
x: t.x - i.x,
|
|
3285
3270
|
y: t.y - i.y
|
|
3286
3271
|
};
|
|
3287
|
-
return
|
|
3288
|
-
},
|
|
3272
|
+
return Fi(r, n) / lt(r) / lt(n);
|
|
3273
|
+
}, bi = (i, e, t) => e.y === 0 ? null : {
|
|
3289
3274
|
x: i.x + e.x / e.y * (t - i.y),
|
|
3290
3275
|
y: t
|
|
3291
|
-
},
|
|
3276
|
+
}, vi = (i, e, t) => e.x === 0 ? null : {
|
|
3292
3277
|
x: t,
|
|
3293
3278
|
y: i.y + e.y / e.x * (t - i.x)
|
|
3294
|
-
},
|
|
3295
|
-
if (e.x === 0) return
|
|
3296
|
-
if (n.x === 0) return
|
|
3297
|
-
if (e.y === 0) return
|
|
3298
|
-
if (n.y === 0) return
|
|
3299
|
-
const r =
|
|
3279
|
+
}, qr = (i, e, t, n) => {
|
|
3280
|
+
if (e.x === 0) return vi(t, n, i.x);
|
|
3281
|
+
if (n.x === 0) return vi(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
|
+
const r = st(e, n);
|
|
3300
3285
|
if (r == 0) return null;
|
|
3301
3286
|
const o = {
|
|
3302
3287
|
x: t.x - i.x,
|
|
3303
3288
|
y: t.y - i.y
|
|
3304
|
-
}, l =
|
|
3289
|
+
}, l = st(o, e) / r, s = st(o, n) / r, c = i.x + s * e.x, u = t.x + l * n.x, d = i.y + s * e.y, a = t.y + l * n.y, f = (c + u) / 2, h = (d + a) / 2;
|
|
3305
3290
|
return {
|
|
3306
3291
|
x: f,
|
|
3307
3292
|
y: h
|
|
3308
3293
|
};
|
|
3309
3294
|
};
|
|
3310
|
-
class
|
|
3295
|
+
class ne {
|
|
3311
3296
|
// for ordering sweep events in the sweep event queue
|
|
3312
3297
|
static compare(e, t) {
|
|
3313
|
-
const n =
|
|
3314
|
-
return n !== 0 ? n : (e.point !== t.point && e.link(t), e.isLeft !== t.isLeft ? e.isLeft ? 1 : -1 :
|
|
3298
|
+
const n = ne.comparePoints(e.point, t.point);
|
|
3299
|
+
return n !== 0 ? n : (e.point !== t.point && e.link(t), e.isLeft !== t.isLeft ? e.isLeft ? 1 : -1 : we.compare(e.segment, t.segment));
|
|
3315
3300
|
}
|
|
3316
3301
|
// for ordering points in sweep line order
|
|
3317
3302
|
static comparePoints(e, t) {
|
|
@@ -3366,8 +3351,8 @@ class oe {
|
|
|
3366
3351
|
const t = /* @__PURE__ */ new Map(), n = (r) => {
|
|
3367
3352
|
const o = r.otherSE;
|
|
3368
3353
|
t.set(r, {
|
|
3369
|
-
sine:
|
|
3370
|
-
cosine:
|
|
3354
|
+
sine: Gr(this.point, e.point, o.point),
|
|
3355
|
+
cosine: jr(this.point, e.point, o.point)
|
|
3371
3356
|
});
|
|
3372
3357
|
};
|
|
3373
3358
|
return (r, o) => {
|
|
@@ -3383,8 +3368,8 @@ class oe {
|
|
|
3383
3368
|
};
|
|
3384
3369
|
}
|
|
3385
3370
|
}
|
|
3386
|
-
let
|
|
3387
|
-
class
|
|
3371
|
+
let Zr = 0;
|
|
3372
|
+
class we {
|
|
3388
3373
|
/* This compare() function is for ordering segments in the sweep
|
|
3389
3374
|
* line tree, and does so according to the following criteria:
|
|
3390
3375
|
*
|
|
@@ -3441,18 +3426,18 @@ class Ee {
|
|
|
3441
3426
|
/* Warning: a reference to ringWindings input will be stored,
|
|
3442
3427
|
* and possibly will be later modified */
|
|
3443
3428
|
constructor(e, t, n, r) {
|
|
3444
|
-
this.id = ++
|
|
3429
|
+
this.id = ++Zr, this.leftSE = e, e.segment = this, e.otherSE = t, this.rightSE = t, t.segment = this, t.otherSE = e, this.rings = n, this.windings = r;
|
|
3445
3430
|
}
|
|
3446
3431
|
static fromRing(e, t, n) {
|
|
3447
3432
|
let r, o, l;
|
|
3448
|
-
const s =
|
|
3433
|
+
const s = ne.comparePoints(e, t);
|
|
3449
3434
|
if (s < 0)
|
|
3450
3435
|
r = e, o = t, l = 1;
|
|
3451
3436
|
else if (s > 0)
|
|
3452
3437
|
r = t, o = e, l = -1;
|
|
3453
3438
|
else throw new Error(`Tried to create degenerate segment at [${e.x}, ${e.y}]`);
|
|
3454
|
-
const c = new
|
|
3455
|
-
return new
|
|
3439
|
+
const c = new ne(r, !0), u = new ne(o, !1);
|
|
3440
|
+
return new we(c, u, [n], [l]);
|
|
3456
3441
|
}
|
|
3457
3442
|
/* When a segment is split, the rightSE is replaced with a new sweep event */
|
|
3458
3443
|
replaceRightSE(e) {
|
|
@@ -3520,9 +3505,9 @@ class Ee {
|
|
|
3520
3505
|
* Else, return null.
|
|
3521
3506
|
*/
|
|
3522
3507
|
getIntersection(e) {
|
|
3523
|
-
const t = this.bbox(), n = e.bbox(), r =
|
|
3508
|
+
const t = this.bbox(), n = e.bbox(), r = At(t, n);
|
|
3524
3509
|
if (r === null) return null;
|
|
3525
|
-
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 = Ue(t, s) && this.comparePoint(s) === 0, d = Ue(n, o) && e.comparePoint(o) === 0, a = Ue(t, c) && this.comparePoint(c) === 0, f = Ue(n, l) && e.comparePoint(l) === 0;
|
|
3526
3511
|
if (d && u)
|
|
3527
3512
|
return f && !a ? l : !f && a ? c : null;
|
|
3528
3513
|
if (d)
|
|
@@ -3532,8 +3517,8 @@ class Ee {
|
|
|
3532
3517
|
if (f && a) return null;
|
|
3533
3518
|
if (f) return l;
|
|
3534
3519
|
if (a) return c;
|
|
3535
|
-
const h =
|
|
3536
|
-
return h === null || !
|
|
3520
|
+
const h = qr(o, this.vector(), s, e.vector());
|
|
3521
|
+
return h === null || !Ue(r, h) ? null : Ve.round(h.x, h.y);
|
|
3537
3522
|
}
|
|
3538
3523
|
/**
|
|
3539
3524
|
* Split the given segment into multiple segments on the given points.
|
|
@@ -3548,10 +3533,10 @@ class Ee {
|
|
|
3548
3533
|
* Warning: input array of points is modified
|
|
3549
3534
|
*/
|
|
3550
3535
|
split(e) {
|
|
3551
|
-
const t = [], n = e.events !== void 0, r = new
|
|
3536
|
+
const t = [], n = e.events !== void 0, r = new ne(e, !0), o = new ne(e, !1), l = this.rightSE;
|
|
3552
3537
|
this.replaceRightSE(o), t.push(o), t.push(r);
|
|
3553
|
-
const s = new
|
|
3554
|
-
return
|
|
3538
|
+
const s = new we(r, l, this.rings.slice(), this.windings.slice());
|
|
3539
|
+
return ne.comparePoints(s.leftSE.point, s.rightSE.point) > 0 && s.swapEvents(), ne.comparePoints(this.leftSE.point, this.rightSE.point) > 0 && this.swapEvents(), n && (r.checkForConsuming(), o.checkForConsuming()), t;
|
|
3555
3540
|
}
|
|
3556
3541
|
/* Swap which event is left and right */
|
|
3557
3542
|
swapEvents() {
|
|
@@ -3566,7 +3551,7 @@ class Ee {
|
|
|
3566
3551
|
let t = this, n = e;
|
|
3567
3552
|
for (; t.consumedBy; ) t = t.consumedBy;
|
|
3568
3553
|
for (; n.consumedBy; ) n = n.consumedBy;
|
|
3569
|
-
const r =
|
|
3554
|
+
const r = we.compare(t, n);
|
|
3570
3555
|
if (r !== 0) {
|
|
3571
3556
|
if (r > 0) {
|
|
3572
3557
|
const o = t;
|
|
@@ -3636,7 +3621,7 @@ class Ee {
|
|
|
3636
3621
|
if (this.consumedBy) return !1;
|
|
3637
3622
|
if (this._isInResult !== void 0) return this._isInResult;
|
|
3638
3623
|
const e = this.beforeState().multiPolys, t = this.afterState().multiPolys;
|
|
3639
|
-
switch (
|
|
3624
|
+
switch (le.type) {
|
|
3640
3625
|
case "union": {
|
|
3641
3626
|
const n = e.length === 0, r = t.length === 0;
|
|
3642
3627
|
this._isInResult = n !== r;
|
|
@@ -3644,7 +3629,7 @@ class Ee {
|
|
|
3644
3629
|
}
|
|
3645
3630
|
case "intersection": {
|
|
3646
3631
|
let n, r;
|
|
3647
|
-
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 === le.numMultiPolys && n < r;
|
|
3648
3633
|
break;
|
|
3649
3634
|
}
|
|
3650
3635
|
case "xor": {
|
|
@@ -3658,18 +3643,18 @@ class Ee {
|
|
|
3658
3643
|
break;
|
|
3659
3644
|
}
|
|
3660
3645
|
default:
|
|
3661
|
-
throw new Error(`Unrecognized operation type found ${
|
|
3646
|
+
throw new Error(`Unrecognized operation type found ${le.type}`);
|
|
3662
3647
|
}
|
|
3663
3648
|
return this._isInResult;
|
|
3664
3649
|
}
|
|
3665
3650
|
}
|
|
3666
|
-
class
|
|
3651
|
+
class wi {
|
|
3667
3652
|
constructor(e, t, n) {
|
|
3668
3653
|
if (!Array.isArray(e) || e.length === 0)
|
|
3669
3654
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
3670
3655
|
if (this.poly = t, this.isExterior = n, this.segments = [], typeof e[0][0] != "number" || typeof e[0][1] != "number")
|
|
3671
3656
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
3672
|
-
const r =
|
|
3657
|
+
const r = Ve.round(e[0][0], e[0][1]);
|
|
3673
3658
|
this.bbox = {
|
|
3674
3659
|
ll: {
|
|
3675
3660
|
x: r.x,
|
|
@@ -3684,10 +3669,10 @@ class Li {
|
|
|
3684
3669
|
for (let l = 1, s = e.length; l < s; l++) {
|
|
3685
3670
|
if (typeof e[l][0] != "number" || typeof e[l][1] != "number")
|
|
3686
3671
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
3687
|
-
let c =
|
|
3688
|
-
c.x === o.x && c.y === o.y || (this.segments.push(
|
|
3672
|
+
let c = Ve.round(e[l][0], e[l][1]);
|
|
3673
|
+
c.x === o.x && c.y === o.y || (this.segments.push(we.fromRing(o, c, this)), c.x < this.bbox.ll.x && (this.bbox.ll.x = c.x), c.y < this.bbox.ll.y && (this.bbox.ll.y = c.y), c.x > this.bbox.ur.x && (this.bbox.ur.x = c.x), c.y > this.bbox.ur.y && (this.bbox.ur.y = c.y), o = c);
|
|
3689
3674
|
}
|
|
3690
|
-
(r.x !== o.x || r.y !== o.y) && this.segments.push(
|
|
3675
|
+
(r.x !== o.x || r.y !== o.y) && this.segments.push(we.fromRing(o, r, this));
|
|
3691
3676
|
}
|
|
3692
3677
|
getSweepEvents() {
|
|
3693
3678
|
const e = [];
|
|
@@ -3698,11 +3683,11 @@ class Li {
|
|
|
3698
3683
|
return e;
|
|
3699
3684
|
}
|
|
3700
3685
|
}
|
|
3701
|
-
class
|
|
3686
|
+
class Qr {
|
|
3702
3687
|
constructor(e, t) {
|
|
3703
3688
|
if (!Array.isArray(e))
|
|
3704
3689
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
3705
|
-
this.exteriorRing = new
|
|
3690
|
+
this.exteriorRing = new wi(e[0], this, !0), this.bbox = {
|
|
3706
3691
|
ll: {
|
|
3707
3692
|
x: this.exteriorRing.bbox.ll.x,
|
|
3708
3693
|
y: this.exteriorRing.bbox.ll.y
|
|
@@ -3713,7 +3698,7 @@ class Xr {
|
|
|
3713
3698
|
}
|
|
3714
3699
|
}, this.interiorRings = [];
|
|
3715
3700
|
for (let n = 1, r = e.length; n < r; n++) {
|
|
3716
|
-
const o = new
|
|
3701
|
+
const o = new wi(e[n], this, !1);
|
|
3717
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);
|
|
3718
3703
|
}
|
|
3719
3704
|
this.multiPoly = t;
|
|
@@ -3728,7 +3713,7 @@ class Xr {
|
|
|
3728
3713
|
return e;
|
|
3729
3714
|
}
|
|
3730
3715
|
}
|
|
3731
|
-
class
|
|
3716
|
+
class _i {
|
|
3732
3717
|
constructor(e, t) {
|
|
3733
3718
|
if (!Array.isArray(e))
|
|
3734
3719
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
@@ -3747,7 +3732,7 @@ class Si {
|
|
|
3747
3732
|
}
|
|
3748
3733
|
};
|
|
3749
3734
|
for (let n = 0, r = e.length; n < r; n++) {
|
|
3750
|
-
const o = new
|
|
3735
|
+
const o = new Qr(e[n], this);
|
|
3751
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);
|
|
3752
3737
|
}
|
|
3753
3738
|
this.isSubject = t;
|
|
@@ -3762,7 +3747,7 @@ class Si {
|
|
|
3762
3747
|
return e;
|
|
3763
3748
|
}
|
|
3764
3749
|
}
|
|
3765
|
-
class
|
|
3750
|
+
class ut {
|
|
3766
3751
|
/* Given the segments from the sweep line pass, compute & return a series
|
|
3767
3752
|
* of closed rings from all the segments marked to be part of the result */
|
|
3768
3753
|
static factory(e) {
|
|
@@ -3791,7 +3776,7 @@ class ft {
|
|
|
3791
3776
|
}
|
|
3792
3777
|
if (h !== null) {
|
|
3793
3778
|
const v = a.splice(h)[0], w = u.splice(v.index);
|
|
3794
|
-
w.unshift(w[0].otherSE), t.push(new
|
|
3779
|
+
w.unshift(w[0].otherSE), t.push(new ut(w.reverse()));
|
|
3795
3780
|
continue;
|
|
3796
3781
|
}
|
|
3797
3782
|
a.push({
|
|
@@ -3802,7 +3787,7 @@ class ft {
|
|
|
3802
3787
|
c = f.sort(g)[0].otherSE;
|
|
3803
3788
|
break;
|
|
3804
3789
|
}
|
|
3805
|
-
t.push(new
|
|
3790
|
+
t.push(new ut(u));
|
|
3806
3791
|
}
|
|
3807
3792
|
return t;
|
|
3808
3793
|
}
|
|
@@ -3817,11 +3802,11 @@ class ft {
|
|
|
3817
3802
|
const t = [e];
|
|
3818
3803
|
for (let u = 1, d = this.events.length - 1; u < d; u++) {
|
|
3819
3804
|
const a = this.events[u].point, f = this.events[u + 1].point;
|
|
3820
|
-
|
|
3805
|
+
pi(a, e, f) !== 0 && (t.push(a), e = a);
|
|
3821
3806
|
}
|
|
3822
3807
|
if (t.length === 1) return null;
|
|
3823
3808
|
const n = t[0], r = t[1];
|
|
3824
|
-
|
|
3809
|
+
pi(n, e, r) === 0 && t.shift(), t.push(t[0]);
|
|
3825
3810
|
const o = this.isExteriorRing() ? 1 : -1, l = this.isExteriorRing() ? 0 : t.length - 1, s = this.isExteriorRing() ? t.length : -1, c = [];
|
|
3826
3811
|
for (let u = l; u != s; u += o) c.push([t[u].x, t[u].y]);
|
|
3827
3812
|
return c;
|
|
@@ -3841,7 +3826,7 @@ class ft {
|
|
|
3841
3826
|
let e = this.events[0];
|
|
3842
3827
|
for (let r = 1, o = this.events.length; r < o; r++) {
|
|
3843
3828
|
const l = this.events[r];
|
|
3844
|
-
|
|
3829
|
+
ne.compare(e, l) > 0 && (e = l);
|
|
3845
3830
|
}
|
|
3846
3831
|
let t = e.segment.prevInResult(), n = t ? t.prevInResult() : null;
|
|
3847
3832
|
for (; ; ) {
|
|
@@ -3853,7 +3838,7 @@ class ft {
|
|
|
3853
3838
|
}
|
|
3854
3839
|
}
|
|
3855
3840
|
}
|
|
3856
|
-
class
|
|
3841
|
+
class Ei {
|
|
3857
3842
|
constructor(e) {
|
|
3858
3843
|
this.exteriorRing = e, e.poly = this, this.interiorRings = [];
|
|
3859
3844
|
}
|
|
@@ -3870,7 +3855,7 @@ class xi {
|
|
|
3870
3855
|
return e;
|
|
3871
3856
|
}
|
|
3872
3857
|
}
|
|
3873
|
-
class
|
|
3858
|
+
class Hr {
|
|
3874
3859
|
constructor(e) {
|
|
3875
3860
|
this.rings = e, this.polys = this._composePolys(e);
|
|
3876
3861
|
}
|
|
@@ -3887,19 +3872,19 @@ class Kr {
|
|
|
3887
3872
|
for (let n = 0, r = e.length; n < r; n++) {
|
|
3888
3873
|
const o = e[n];
|
|
3889
3874
|
if (!o.poly)
|
|
3890
|
-
if (o.isExteriorRing()) t.push(new
|
|
3875
|
+
if (o.isExteriorRing()) t.push(new Ei(o));
|
|
3891
3876
|
else {
|
|
3892
3877
|
const l = o.enclosingRing();
|
|
3893
|
-
l.poly || t.push(new
|
|
3878
|
+
l.poly || t.push(new Ei(l)), l.poly.addInterior(o);
|
|
3894
3879
|
}
|
|
3895
3880
|
}
|
|
3896
3881
|
return t;
|
|
3897
3882
|
}
|
|
3898
3883
|
}
|
|
3899
|
-
class
|
|
3884
|
+
class Vr {
|
|
3900
3885
|
constructor(e) {
|
|
3901
|
-
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] :
|
|
3902
|
-
this.queue = e, this.tree = new
|
|
3886
|
+
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : we.compare;
|
|
3887
|
+
this.queue = e, this.tree = new Ft(t), this.segments = [];
|
|
3903
3888
|
}
|
|
3904
3889
|
process(e) {
|
|
3905
3890
|
const t = e.segment, n = [];
|
|
@@ -3933,7 +3918,7 @@ class Jr {
|
|
|
3933
3918
|
}
|
|
3934
3919
|
if (u !== null || d !== null) {
|
|
3935
3920
|
let a = null;
|
|
3936
|
-
u === null ? a = d : d === null ? a = u : a =
|
|
3921
|
+
u === null ? a = d : d === null ? a = u : a = ne.comparePoints(u, d) <= 0 ? u : d, this.queue.remove(t.rightSE), n.push(t.rightSE);
|
|
3937
3922
|
const f = t.split(a);
|
|
3938
3923
|
for (let h = 0, g = f.length; h < g; h++)
|
|
3939
3924
|
n.push(f[h]);
|
|
@@ -3969,33 +3954,33 @@ class Jr {
|
|
|
3969
3954
|
return r.push(n), e.consumedBy === void 0 && this.tree.add(e), r;
|
|
3970
3955
|
}
|
|
3971
3956
|
}
|
|
3972
|
-
const
|
|
3973
|
-
class
|
|
3957
|
+
const Li = 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 {
|
|
3974
3959
|
run(e, t, n) {
|
|
3975
|
-
|
|
3976
|
-
const r = [new
|
|
3960
|
+
le.type = e, Ve.reset();
|
|
3961
|
+
const r = [new _i(t, !0)];
|
|
3977
3962
|
for (let a = 0, f = n.length; a < f; a++)
|
|
3978
|
-
r.push(new
|
|
3979
|
-
if (
|
|
3963
|
+
r.push(new _i(n[a], !1));
|
|
3964
|
+
if (le.numMultiPolys = r.length, le.type === "difference") {
|
|
3980
3965
|
const a = r[0];
|
|
3981
3966
|
let f = 1;
|
|
3982
3967
|
for (; f < r.length; )
|
|
3983
|
-
|
|
3968
|
+
At(r[f].bbox, a.bbox) !== null ? f++ : r.splice(f, 1);
|
|
3984
3969
|
}
|
|
3985
|
-
if (
|
|
3970
|
+
if (le.type === "intersection")
|
|
3986
3971
|
for (let a = 0, f = r.length; a < f; a++) {
|
|
3987
3972
|
const h = r[a];
|
|
3988
3973
|
for (let g = a + 1, v = r.length; g < v; g++)
|
|
3989
|
-
if (
|
|
3974
|
+
if (At(h.bbox, r[g].bbox) === null) return [];
|
|
3990
3975
|
}
|
|
3991
|
-
const o = new
|
|
3976
|
+
const o = new Ft(ne.compare);
|
|
3992
3977
|
for (let a = 0, f = r.length; a < f; a++) {
|
|
3993
3978
|
const h = r[a].getSweepEvents();
|
|
3994
3979
|
for (let g = 0, v = h.length; g < v; g++)
|
|
3995
|
-
if (o.insert(h[g]), o.size >
|
|
3980
|
+
if (o.insert(h[g]), o.size > Li)
|
|
3996
3981
|
throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).");
|
|
3997
3982
|
}
|
|
3998
|
-
const l = new
|
|
3983
|
+
const l = new Vr(o);
|
|
3999
3984
|
let s = o.size, c = o.pop();
|
|
4000
3985
|
for (; c; ) {
|
|
4001
3986
|
const a = c.key;
|
|
@@ -4003,9 +3988,9 @@ class eo {
|
|
|
4003
3988
|
const h = a.segment;
|
|
4004
3989
|
throw new Error(`Unable to pop() ${a.isLeft ? "left" : "right"} SweepEvent [${a.point.x}, ${a.point.y}] from segment #${h.id} [${h.leftSE.point.x}, ${h.leftSE.point.y}] -> [${h.rightSE.point.x}, ${h.rightSE.point.y}] from queue.`);
|
|
4005
3990
|
}
|
|
4006
|
-
if (o.size >
|
|
3991
|
+
if (o.size > Li)
|
|
4007
3992
|
throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");
|
|
4008
|
-
if (l.segments.length >
|
|
3993
|
+
if (l.segments.length > Yr)
|
|
4009
3994
|
throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");
|
|
4010
3995
|
const f = l.process(a);
|
|
4011
3996
|
for (let h = 0, g = f.length; h < g; h++) {
|
|
@@ -4014,67 +3999,67 @@ class eo {
|
|
|
4014
3999
|
}
|
|
4015
4000
|
s = o.size, c = o.pop();
|
|
4016
4001
|
}
|
|
4017
|
-
|
|
4018
|
-
const u =
|
|
4019
|
-
return new
|
|
4002
|
+
Ve.reset();
|
|
4003
|
+
const u = ut.factory(l.segments);
|
|
4004
|
+
return new Hr(u).getGeom();
|
|
4020
4005
|
}
|
|
4021
4006
|
}
|
|
4022
|
-
const
|
|
4007
|
+
const le = new Xr(), Kr = function(i) {
|
|
4023
4008
|
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), n = 1; n < e; n++)
|
|
4024
4009
|
t[n - 1] = arguments[n];
|
|
4025
|
-
return
|
|
4026
|
-
},
|
|
4010
|
+
return le.run("union", i, t);
|
|
4011
|
+
}, Jr = function(i) {
|
|
4027
4012
|
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), n = 1; n < e; n++)
|
|
4028
4013
|
t[n - 1] = arguments[n];
|
|
4029
|
-
return
|
|
4030
|
-
},
|
|
4014
|
+
return le.run("intersection", i, t);
|
|
4015
|
+
}, $r = function(i) {
|
|
4031
4016
|
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), n = 1; n < e; n++)
|
|
4032
4017
|
t[n - 1] = arguments[n];
|
|
4033
|
-
return
|
|
4034
|
-
},
|
|
4018
|
+
return le.run("xor", i, t);
|
|
4019
|
+
}, eo = function(i) {
|
|
4035
4020
|
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), n = 1; n < e; n++)
|
|
4036
4021
|
t[n - 1] = arguments[n];
|
|
4037
|
-
return
|
|
4022
|
+
return le.run("difference", i, t);
|
|
4038
4023
|
};
|
|
4039
|
-
var
|
|
4040
|
-
union:
|
|
4041
|
-
intersection:
|
|
4042
|
-
xor:
|
|
4043
|
-
difference:
|
|
4024
|
+
var Ui = {
|
|
4025
|
+
union: Kr,
|
|
4026
|
+
intersection: Jr,
|
|
4027
|
+
xor: $r,
|
|
4028
|
+
difference: eo
|
|
4044
4029
|
};
|
|
4045
|
-
function
|
|
4030
|
+
function to(i, e = {}) {
|
|
4046
4031
|
const t = [];
|
|
4047
|
-
if (
|
|
4032
|
+
if (Bt(i, (r) => {
|
|
4048
4033
|
t.push(r.coordinates);
|
|
4049
4034
|
}), t.length < 2)
|
|
4050
4035
|
throw new Error("Must have at least 2 geometries");
|
|
4051
|
-
const n =
|
|
4052
|
-
return n.length === 0 ? null : n.length === 1 ?
|
|
4036
|
+
const n = Ui.union(t[0], ...t.slice(1));
|
|
4037
|
+
return n.length === 0 ? null : n.length === 1 ? zt(n[0], e.properties) : Ai(n, e.properties);
|
|
4053
4038
|
}
|
|
4054
|
-
var
|
|
4055
|
-
function
|
|
4039
|
+
var Gi = to;
|
|
4040
|
+
function io(i) {
|
|
4056
4041
|
const e = [];
|
|
4057
|
-
if (
|
|
4042
|
+
if (Bt(i, (r) => {
|
|
4058
4043
|
e.push(r.coordinates);
|
|
4059
4044
|
}), e.length < 2)
|
|
4060
4045
|
throw new Error("Must have at least two features");
|
|
4061
|
-
const t = i.features[0].properties || {}, n =
|
|
4062
|
-
return n.length === 0 ? null : n.length === 1 ?
|
|
4046
|
+
const t = i.features[0].properties || {}, n = Ui.difference(e[0], ...e.slice(1));
|
|
4047
|
+
return n.length === 0 ? null : n.length === 1 ? zt(n[0], t) : Ai(n, t);
|
|
4063
4048
|
}
|
|
4064
|
-
var
|
|
4065
|
-
function
|
|
4049
|
+
var no = io;
|
|
4050
|
+
function ro(i) {
|
|
4066
4051
|
if (!i)
|
|
4067
4052
|
throw new Error("geojson is required");
|
|
4068
4053
|
var e = [];
|
|
4069
|
-
return
|
|
4054
|
+
return Er(i, function(t) {
|
|
4070
4055
|
e.push(t);
|
|
4071
|
-
}),
|
|
4056
|
+
}), He(e);
|
|
4072
4057
|
}
|
|
4073
|
-
var
|
|
4074
|
-
function
|
|
4075
|
-
const t =
|
|
4076
|
-
|
|
4077
|
-
|
|
4058
|
+
var oo = ro;
|
|
4059
|
+
function Si(i, e) {
|
|
4060
|
+
const t = no(
|
|
4061
|
+
He([
|
|
4062
|
+
zt([
|
|
4078
4063
|
[
|
|
4079
4064
|
[180, 90],
|
|
4080
4065
|
[-180, 90],
|
|
@@ -4089,10 +4074,10 @@ function Ci(i, e) {
|
|
|
4089
4074
|
if (!t)
|
|
4090
4075
|
return;
|
|
4091
4076
|
t.properties = { isMask: !0 };
|
|
4092
|
-
const n =
|
|
4077
|
+
const n = Ze(Pt(i)), r = (n[2] - n[0]) / 360 / 1e3, o = n[0] < -180, l = n[2] > 180, s = oo(i);
|
|
4093
4078
|
if (s.features.length > 1 && (o || l))
|
|
4094
4079
|
for (const c of s.features) {
|
|
4095
|
-
const u =
|
|
4080
|
+
const u = Ze(Pt(c));
|
|
4096
4081
|
if (l && u[0] < -180 + r)
|
|
4097
4082
|
for (const d of c.geometry.coordinates)
|
|
4098
4083
|
for (const a of d)
|
|
@@ -4103,13 +4088,13 @@ function Ci(i, e) {
|
|
|
4103
4088
|
a[0] -= 360 - r;
|
|
4104
4089
|
}
|
|
4105
4090
|
e(
|
|
4106
|
-
|
|
4107
|
-
s.features.length < 2 ? i :
|
|
4091
|
+
He([
|
|
4092
|
+
s.features.length < 2 ? i : Gi(s) ?? i,
|
|
4108
4093
|
t
|
|
4109
4094
|
])
|
|
4110
4095
|
);
|
|
4111
4096
|
}
|
|
4112
|
-
const
|
|
4097
|
+
const xi = (i) => {
|
|
4113
4098
|
var n, r, o;
|
|
4114
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;
|
|
4115
4100
|
return {
|
|
@@ -4121,12 +4106,12 @@ const ki = (i) => {
|
|
|
4121
4106
|
lineCap: "butt"
|
|
4122
4107
|
};
|
|
4123
4108
|
};
|
|
4124
|
-
function
|
|
4109
|
+
function so(i, e = !0, t = !0, n = {}, r = {}, o = xi) {
|
|
4125
4110
|
let l;
|
|
4126
4111
|
const s = [];
|
|
4127
4112
|
let c, u;
|
|
4128
|
-
const d =
|
|
4129
|
-
style: o === !0 ?
|
|
4113
|
+
const d = se.geoJSON(void 0, {
|
|
4114
|
+
style: o === !0 ? xi : o === !1 ? void 0 : o ?? void 0,
|
|
4130
4115
|
interactive: !1
|
|
4131
4116
|
}).addTo(i), a = (h) => {
|
|
4132
4117
|
l == null || l({
|
|
@@ -4136,9 +4121,9 @@ function co(i, e = !0, t = !0, n = {}, r = {}, o = ki) {
|
|
|
4136
4121
|
};
|
|
4137
4122
|
function f(h, g = !1) {
|
|
4138
4123
|
const v = document.createElement("div");
|
|
4139
|
-
return new
|
|
4124
|
+
return new Kn({ props: { displayIn: "leaflet" }, target: v }), new se.Marker(h, {
|
|
4140
4125
|
interactive: g,
|
|
4141
|
-
icon: new
|
|
4126
|
+
icon: new se.DivIcon({
|
|
4142
4127
|
html: v,
|
|
4143
4128
|
className: "",
|
|
4144
4129
|
iconAnchor: [12, 26],
|
|
@@ -4176,7 +4161,7 @@ function co(i, e = !0, t = !0, n = {}, r = {}, o = ki) {
|
|
|
4176
4161
|
if (!e)
|
|
4177
4162
|
return;
|
|
4178
4163
|
const g = h && [h[1], h[0]];
|
|
4179
|
-
u ? g ? u.setLatLng(g) : (u.remove(), u = void 0) : g && (e instanceof Function ? u = e(i) ?? void 0 : (u = (typeof e == "object" ? new
|
|
4164
|
+
u ? g ? u.setLatLng(g) : (u.remove(), u = void 0) : g && (e instanceof Function ? u = e(i) ?? void 0 : (u = (typeof e == "object" ? new se.Marker(g, e) : f(g)).addTo(i), (v = u.getElement()) == null || v.classList.add("marker-reverse")));
|
|
4180
4165
|
},
|
|
4181
4166
|
setFeatures(h, g, v) {
|
|
4182
4167
|
function w(p) {
|
|
@@ -4191,12 +4176,12 @@ function co(i, e = !0, t = !0, n = {}, r = {}, o = ki) {
|
|
|
4191
4176
|
(L) => L.type === "Polygon" || L.type === "MultiPolygon"
|
|
4192
4177
|
);
|
|
4193
4178
|
e: if (S.length > 0) {
|
|
4194
|
-
const L =
|
|
4195
|
-
|
|
4179
|
+
const L = Gi(
|
|
4180
|
+
He(S.map((E) => Qe(E)))
|
|
4196
4181
|
);
|
|
4197
4182
|
if (!L)
|
|
4198
4183
|
break e;
|
|
4199
|
-
|
|
4184
|
+
Si(
|
|
4200
4185
|
{
|
|
4201
4186
|
...g,
|
|
4202
4187
|
geometry: L.geometry
|
|
@@ -4215,11 +4200,11 @@ function co(i, e = !0, t = !0, n = {}, r = {}, o = ki) {
|
|
|
4215
4200
|
}
|
|
4216
4201
|
if (!p) {
|
|
4217
4202
|
if (g.geometry.type === "Polygon" || g.geometry.type === "MultiPolygon")
|
|
4218
|
-
|
|
4203
|
+
Si(g, (S) => {
|
|
4219
4204
|
if (!S)
|
|
4220
4205
|
return;
|
|
4221
|
-
const L = [...S.features], E =
|
|
4222
|
-
E[0] - M / 4 < -180 && L.push(...
|
|
4206
|
+
const L = [...S.features], E = Ze(Pt(g)), M = E[2] - E[0];
|
|
4207
|
+
E[0] - M / 4 < -180 && L.push(...Mi(S, -360).features), E[2] + M / 4 > 180 && L.push(...Mi(S, 360).features), w(He(L));
|
|
4223
4208
|
});
|
|
4224
4209
|
else if (g.geometry.type === "LineString" || g.geometry.type === "MultiLineString") {
|
|
4225
4210
|
w(g);
|
|
@@ -4234,7 +4219,7 @@ function co(i, e = !0, t = !0, n = {}, r = {}, o = ki) {
|
|
|
4234
4219
|
} else if (e) {
|
|
4235
4220
|
const S = [g.center[1], g.center[0]];
|
|
4236
4221
|
s.push(
|
|
4237
|
-
typeof e == "object" ? new
|
|
4222
|
+
typeof e == "object" ? new se.Marker(S, e) : f(S).addTo(i)
|
|
4238
4223
|
);
|
|
4239
4224
|
}
|
|
4240
4225
|
}
|
|
@@ -4251,7 +4236,7 @@ function co(i, e = !0, t = !0, n = {}, r = {}, o = ki) {
|
|
|
4251
4236
|
if (L = t(i, p), !L)
|
|
4252
4237
|
continue;
|
|
4253
4238
|
} else
|
|
4254
|
-
L = (typeof t == "object" ? new
|
|
4239
|
+
L = (typeof t == "object" ? new se.Marker(S, t) : f(S, !0)).addTo(i).bindTooltip(
|
|
4255
4240
|
p.place_type[0] === "reverse" ? p.place_name : p.place_name.replace(/,.*/, ""),
|
|
4256
4241
|
{
|
|
4257
4242
|
direction: "top"
|
|
@@ -4277,35 +4262,35 @@ function co(i, e = !0, t = !0, n = {}, r = {}, o = ki) {
|
|
|
4277
4262
|
}
|
|
4278
4263
|
};
|
|
4279
4264
|
}
|
|
4280
|
-
function
|
|
4281
|
-
const t =
|
|
4265
|
+
function Mi(i, e) {
|
|
4266
|
+
const t = Mr(i);
|
|
4282
4267
|
for (const n of t.features)
|
|
4283
4268
|
if (n.geometry.type == "MultiPolygon")
|
|
4284
4269
|
for (const r of n.geometry.coordinates)
|
|
4285
|
-
|
|
4270
|
+
Ci(r, e);
|
|
4286
4271
|
else
|
|
4287
|
-
|
|
4272
|
+
Ci(n.geometry.coordinates, e);
|
|
4288
4273
|
return t;
|
|
4289
4274
|
}
|
|
4290
|
-
function
|
|
4275
|
+
function Ci(i, e) {
|
|
4291
4276
|
for (const t of i)
|
|
4292
4277
|
for (const n of t)
|
|
4293
4278
|
n[0] += e;
|
|
4294
4279
|
}
|
|
4295
|
-
class
|
|
4280
|
+
class ji extends se.Control {
|
|
4296
4281
|
}
|
|
4297
|
-
|
|
4298
|
-
var
|
|
4299
|
-
class
|
|
4282
|
+
se.Util.extend(ji.prototype, se.Evented.prototype);
|
|
4283
|
+
var ie, Pe;
|
|
4284
|
+
class lo extends ji {
|
|
4300
4285
|
constructor(t) {
|
|
4301
4286
|
super(t);
|
|
4302
|
-
|
|
4303
|
-
|
|
4304
|
-
|
|
4287
|
+
Et(this, ie);
|
|
4288
|
+
Et(this, Pe);
|
|
4289
|
+
Lt(this, Pe, t);
|
|
4305
4290
|
}
|
|
4306
4291
|
onAdd(t) {
|
|
4307
4292
|
const n = document.createElement("div");
|
|
4308
|
-
n.className = "leaflet-ctrl-geocoder",
|
|
4293
|
+
n.className = "leaflet-ctrl-geocoder", se.DomEvent.disableClickPropagation(n), se.DomEvent.disableScrollPropagation(n);
|
|
4309
4294
|
const {
|
|
4310
4295
|
marker: r,
|
|
4311
4296
|
showResultMarkers: o,
|
|
@@ -4313,7 +4298,7 @@ class fo extends Qi {
|
|
|
4313
4298
|
fullGeometryStyle: s,
|
|
4314
4299
|
position: c,
|
|
4315
4300
|
...u
|
|
4316
|
-
} =
|
|
4301
|
+
} = te(this, Pe), d = typeof l == "boolean" ? {} : l, a = so(
|
|
4317
4302
|
t,
|
|
4318
4303
|
r,
|
|
4319
4304
|
o,
|
|
@@ -4321,7 +4306,7 @@ class fo extends Qi {
|
|
|
4321
4306
|
d,
|
|
4322
4307
|
s
|
|
4323
4308
|
);
|
|
4324
|
-
|
|
4309
|
+
Lt(this, ie, new _r({
|
|
4325
4310
|
target: n,
|
|
4326
4311
|
props: {
|
|
4327
4312
|
mapController: a,
|
|
@@ -4340,53 +4325,53 @@ class fo extends Qi {
|
|
|
4340
4325
|
querychange: void 0
|
|
4341
4326
|
};
|
|
4342
4327
|
for (const h in f)
|
|
4343
|
-
|
|
4328
|
+
te(this, ie).$on(h, (g) => this.fire(h, g.detail));
|
|
4344
4329
|
return n;
|
|
4345
4330
|
}
|
|
4346
4331
|
setOptions(t) {
|
|
4347
4332
|
var c;
|
|
4348
|
-
Object.assign(
|
|
4333
|
+
Object.assign(te(this, Pe), t);
|
|
4349
4334
|
const {
|
|
4350
4335
|
marker: n,
|
|
4351
4336
|
showResultMarkers: r,
|
|
4352
4337
|
flyTo: o,
|
|
4353
4338
|
fullGeometryStyle: l,
|
|
4354
4339
|
...s
|
|
4355
|
-
} =
|
|
4356
|
-
(c =
|
|
4340
|
+
} = te(this, Pe);
|
|
4341
|
+
(c = te(this, ie)) == null || c.$set(s);
|
|
4357
4342
|
}
|
|
4358
4343
|
setQuery(t, n = !0) {
|
|
4359
4344
|
var r;
|
|
4360
|
-
(r =
|
|
4345
|
+
(r = te(this, ie)) == null || r.setQuery(t, n);
|
|
4361
4346
|
}
|
|
4362
4347
|
clearMap() {
|
|
4363
4348
|
var t;
|
|
4364
|
-
(t =
|
|
4349
|
+
(t = te(this, ie)) == null || t.clearMap();
|
|
4365
4350
|
}
|
|
4366
4351
|
clearList() {
|
|
4367
4352
|
var t;
|
|
4368
|
-
(t =
|
|
4353
|
+
(t = te(this, ie)) == null || t.clearList();
|
|
4369
4354
|
}
|
|
4370
4355
|
focus() {
|
|
4371
4356
|
var t;
|
|
4372
|
-
(t =
|
|
4357
|
+
(t = te(this, ie)) == null || t.focus();
|
|
4373
4358
|
}
|
|
4374
4359
|
blur() {
|
|
4375
4360
|
var t;
|
|
4376
|
-
(t =
|
|
4361
|
+
(t = te(this, ie)) == null || t.blur();
|
|
4377
4362
|
}
|
|
4378
4363
|
onRemove() {
|
|
4379
4364
|
var t;
|
|
4380
|
-
(t =
|
|
4365
|
+
(t = te(this, ie)) == null || t.$destroy();
|
|
4381
4366
|
}
|
|
4382
4367
|
}
|
|
4383
|
-
|
|
4384
|
-
function
|
|
4385
|
-
return new
|
|
4368
|
+
ie = new WeakMap(), Pe = new WeakMap();
|
|
4369
|
+
function uo(...i) {
|
|
4370
|
+
return new lo(...i);
|
|
4386
4371
|
}
|
|
4387
|
-
window.L && typeof window.L == "object" && typeof window.L.control == "function" && (window.L.control.maptilerGeocoding =
|
|
4372
|
+
window.L && typeof window.L == "object" && typeof window.L.control == "function" && (window.L.control.maptilerGeocoding = uo);
|
|
4388
4373
|
export {
|
|
4389
|
-
|
|
4390
|
-
|
|
4374
|
+
lo as GeocodingControl,
|
|
4375
|
+
so as createLeafletMapController
|
|
4391
4376
|
};
|
|
4392
4377
|
//# sourceMappingURL=leaflet.js.map
|