@maptiler/geocoding-control 0.0.36 → 0.0.38
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/README.md +6 -2
- package/dist/leaflet.js +2076 -690
- package/dist/leaflet.umd.js +22 -0
- package/dist/lib/LeafletGeocodingControl.d.ts +5 -1
- package/dist/lib/MaplibreglGeocodingControl.d.ts +9 -2
- package/dist/lib/leafletMapController.d.ts +1 -1
- package/dist/lib/maplibreglMapController.d.ts +5 -2
- package/dist/lib/types.d.ts +20 -2
- package/dist/maplibregl.js +801 -774
- package/dist/maplibregl.umd.js +22 -0
- package/package.json +4 -4
- package/src/lib/GeocodingControl.svelte +31 -13
- package/src/lib/LeafletGeocodingControl.ts +22 -4
- package/src/lib/MaplibreglGeocodingControl.ts +29 -6
- package/src/lib/ReverseGeocodingIcon.svelte +12 -0
- package/src/lib/leafletMapController.ts +119 -20
- package/src/lib/maplibreglMapController.ts +66 -57
- package/src/lib/types.ts +23 -2
- package/dist/leaflet.umd.cjs +0 -1
- package/dist/lib/maplibreMapController.d.ts +0 -4
- package/dist/maplibregl.umd.cjs +0 -22
- package/src/lib/BullseyeIcon.svelte +0 -12
package/dist/maplibregl.js
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
var
|
|
1
|
+
var ht = (n, t, e) => {
|
|
2
2
|
if (!t.has(n))
|
|
3
3
|
throw TypeError("Cannot " + e);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
5
|
+
var J = (n, t, e) => (ht(n, t, "read from private field"), e ? e.call(n) : t.get(n)), We = (n, t, e) => {
|
|
6
6
|
if (t.has(n))
|
|
7
7
|
throw TypeError("Cannot add the same private member more than once");
|
|
8
8
|
t instanceof WeakSet ? t.add(n) : t.set(n, e);
|
|
9
|
-
},
|
|
10
|
-
import { Evented as
|
|
11
|
-
function
|
|
9
|
+
}, Ne = (n, t, e, r) => (ht(n, t, "write to private field"), r ? r.call(n, e) : t.set(n, e), e);
|
|
10
|
+
import { Evented as ur } from "maplibre-gl";
|
|
11
|
+
function T() {
|
|
12
12
|
}
|
|
13
|
-
function
|
|
13
|
+
function fr(n, t) {
|
|
14
14
|
for (const e in t)
|
|
15
15
|
n[e] = t[e];
|
|
16
16
|
return n;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function At(n) {
|
|
19
19
|
return n();
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function gt() {
|
|
22
22
|
return /* @__PURE__ */ Object.create(null);
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
n.forEach(
|
|
24
|
+
function ce(n) {
|
|
25
|
+
n.forEach(At);
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function Nt(n) {
|
|
28
28
|
return typeof n == "function";
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function Ee(n, t) {
|
|
31
31
|
return n != n ? t == t : n !== t || n && typeof n == "object" || typeof n == "function";
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function ar(n) {
|
|
34
34
|
return Object.keys(n).length === 0;
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function cr(n, t, e, r) {
|
|
37
37
|
if (n) {
|
|
38
|
-
const i =
|
|
38
|
+
const i = Bt(n, t, e, r);
|
|
39
39
|
return n[0](i);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
function
|
|
43
|
-
return n[1] && r ?
|
|
42
|
+
function Bt(n, t, e, r) {
|
|
43
|
+
return n[1] && r ? fr(e.ctx.slice(), n[1](r(t))) : e.ctx;
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function hr(n, t, e, r) {
|
|
46
46
|
if (n[2] && r) {
|
|
47
47
|
const i = n[2](r(e));
|
|
48
48
|
if (t.dirty === void 0)
|
|
@@ -57,13 +57,13 @@ function ur(n, t, e, r) {
|
|
|
57
57
|
}
|
|
58
58
|
return t.dirty;
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function gr(n, t, e, r, i, o) {
|
|
61
61
|
if (i) {
|
|
62
|
-
const l =
|
|
62
|
+
const l = Bt(t, e, r, o);
|
|
63
63
|
n.p(l, i);
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function vr(n) {
|
|
67
67
|
if (n.ctx.length > 32) {
|
|
68
68
|
const t = [], e = n.ctx.length / 32;
|
|
69
69
|
for (let r = 0; r < e; r++)
|
|
@@ -72,79 +72,79 @@ function ar(n) {
|
|
|
72
72
|
}
|
|
73
73
|
return -1;
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function vt(n) {
|
|
76
76
|
return n == null ? "" : n;
|
|
77
77
|
}
|
|
78
78
|
function R(n, t) {
|
|
79
79
|
n.appendChild(t);
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function X(n, t, e) {
|
|
82
82
|
n.insertBefore(t, e || null);
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function Y(n) {
|
|
85
85
|
n.parentNode.removeChild(n);
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function yr(n, t) {
|
|
88
88
|
for (let e = 0; e < n.length; e += 1)
|
|
89
89
|
n[e] && n[e].d(t);
|
|
90
90
|
}
|
|
91
91
|
function B(n) {
|
|
92
92
|
return document.createElement(n);
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function fe(n) {
|
|
95
95
|
return document.createElementNS("http://www.w3.org/2000/svg", n);
|
|
96
96
|
}
|
|
97
97
|
function de(n) {
|
|
98
98
|
return document.createTextNode(n);
|
|
99
99
|
}
|
|
100
|
-
function
|
|
100
|
+
function ee() {
|
|
101
101
|
return de(" ");
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function Z(n, t, e, r) {
|
|
104
104
|
return n.addEventListener(t, e, r), () => n.removeEventListener(t, e, r);
|
|
105
105
|
}
|
|
106
|
-
function
|
|
106
|
+
function dr(n) {
|
|
107
107
|
return function(t) {
|
|
108
108
|
return t.preventDefault(), n.call(this, t);
|
|
109
109
|
};
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function y(n, t, e) {
|
|
112
112
|
e == null ? n.removeAttribute(t) : n.getAttribute(t) !== e && n.setAttribute(t, e);
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function mr(n) {
|
|
115
115
|
return Array.from(n.childNodes);
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function Oe(n, t) {
|
|
118
118
|
t = "" + t, n.wholeText !== t && (n.data = t);
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function yt(n, t) {
|
|
121
121
|
n.value = t == null ? "" : t;
|
|
122
122
|
}
|
|
123
|
-
function
|
|
123
|
+
function F(n, t, e) {
|
|
124
124
|
n.classList[e ? "add" : "remove"](t);
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function pr(n, t, { bubbles: e = !1, cancelable: r = !1 } = {}) {
|
|
127
127
|
const i = document.createEvent("CustomEvent");
|
|
128
128
|
return i.initCustomEvent(n, e, r, t), i;
|
|
129
129
|
}
|
|
130
|
-
let
|
|
130
|
+
let Te;
|
|
131
131
|
function Ie(n) {
|
|
132
|
-
|
|
132
|
+
Te = n;
|
|
133
133
|
}
|
|
134
|
-
function
|
|
135
|
-
if (!
|
|
134
|
+
function Gt() {
|
|
135
|
+
if (!Te)
|
|
136
136
|
throw new Error("Function called outside component initialization");
|
|
137
|
-
return
|
|
137
|
+
return Te;
|
|
138
138
|
}
|
|
139
|
-
function
|
|
140
|
-
|
|
139
|
+
function _r(n) {
|
|
140
|
+
Gt().$$.on_destroy.push(n);
|
|
141
141
|
}
|
|
142
|
-
function
|
|
143
|
-
const n =
|
|
142
|
+
function xr() {
|
|
143
|
+
const n = Gt();
|
|
144
144
|
return (t, e, { cancelable: r = !1 } = {}) => {
|
|
145
145
|
const i = n.$$.callbacks[t];
|
|
146
146
|
if (i) {
|
|
147
|
-
const o =
|
|
147
|
+
const o = pr(t, e, { cancelable: r });
|
|
148
148
|
return i.slice().forEach((l) => {
|
|
149
149
|
l.call(n, o);
|
|
150
150
|
}), !o.defaultPrevented;
|
|
@@ -152,63 +152,63 @@ function dr() {
|
|
|
152
152
|
return !0;
|
|
153
153
|
};
|
|
154
154
|
}
|
|
155
|
-
const
|
|
156
|
-
let
|
|
157
|
-
function
|
|
158
|
-
|
|
155
|
+
const Re = [], Ke = [], Ge = [], dt = [], br = Promise.resolve();
|
|
156
|
+
let Je = !1;
|
|
157
|
+
function wr() {
|
|
158
|
+
Je || (Je = !0, br.then(qt));
|
|
159
159
|
}
|
|
160
|
-
function
|
|
161
|
-
|
|
160
|
+
function $e(n) {
|
|
161
|
+
Ge.push(n);
|
|
162
162
|
}
|
|
163
|
-
const
|
|
164
|
-
let
|
|
165
|
-
function
|
|
166
|
-
const n =
|
|
163
|
+
const je = /* @__PURE__ */ new Set();
|
|
164
|
+
let Be = 0;
|
|
165
|
+
function qt() {
|
|
166
|
+
const n = Te;
|
|
167
167
|
do {
|
|
168
|
-
for (;
|
|
169
|
-
const t =
|
|
170
|
-
|
|
171
|
-
}
|
|
172
|
-
for (Ie(null),
|
|
173
|
-
|
|
174
|
-
for (let t = 0; t <
|
|
175
|
-
const e =
|
|
176
|
-
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
} while (
|
|
180
|
-
for (;
|
|
181
|
-
|
|
182
|
-
|
|
168
|
+
for (; Be < Re.length; ) {
|
|
169
|
+
const t = Re[Be];
|
|
170
|
+
Be++, Ie(t), Er(t.$$);
|
|
171
|
+
}
|
|
172
|
+
for (Ie(null), Re.length = 0, Be = 0; Ke.length; )
|
|
173
|
+
Ke.pop()();
|
|
174
|
+
for (let t = 0; t < Ge.length; t += 1) {
|
|
175
|
+
const e = Ge[t];
|
|
176
|
+
je.has(e) || (je.add(e), e());
|
|
177
|
+
}
|
|
178
|
+
Ge.length = 0;
|
|
179
|
+
} while (Re.length);
|
|
180
|
+
for (; dt.length; )
|
|
181
|
+
dt.pop()();
|
|
182
|
+
Je = !1, je.clear(), Ie(n);
|
|
183
183
|
}
|
|
184
|
-
function
|
|
184
|
+
function Er(n) {
|
|
185
185
|
if (n.fragment !== null) {
|
|
186
|
-
n.update(),
|
|
186
|
+
n.update(), ce(n.before_update);
|
|
187
187
|
const t = n.dirty;
|
|
188
|
-
n.dirty = [-1], n.fragment && n.fragment.p(n.ctx, t), n.after_update.forEach(
|
|
188
|
+
n.dirty = [-1], n.fragment && n.fragment.p(n.ctx, t), n.after_update.forEach($e);
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
|
-
const
|
|
191
|
+
const qe = /* @__PURE__ */ new Set();
|
|
192
192
|
let ve;
|
|
193
|
-
function
|
|
193
|
+
function Fe() {
|
|
194
194
|
ve = {
|
|
195
195
|
r: 0,
|
|
196
196
|
c: [],
|
|
197
197
|
p: ve
|
|
198
198
|
};
|
|
199
199
|
}
|
|
200
|
-
function
|
|
201
|
-
ve.r ||
|
|
200
|
+
function Qe() {
|
|
201
|
+
ve.r || ce(ve.c), ve = ve.p;
|
|
202
202
|
}
|
|
203
203
|
function N(n, t) {
|
|
204
|
-
n && n.i && (
|
|
204
|
+
n && n.i && (qe.delete(n), n.i(t));
|
|
205
205
|
}
|
|
206
|
-
function
|
|
206
|
+
function V(n, t, e, r) {
|
|
207
207
|
if (n && n.o) {
|
|
208
|
-
if (
|
|
208
|
+
if (qe.has(n))
|
|
209
209
|
return;
|
|
210
|
-
|
|
211
|
-
|
|
210
|
+
qe.add(n), ve.c.push(() => {
|
|
211
|
+
qe.delete(n), r && (e && n.d(1), r());
|
|
212
212
|
}), n.o(t);
|
|
213
213
|
} else
|
|
214
214
|
r && r();
|
|
@@ -216,63 +216,63 @@ function U(n, t, e, r) {
|
|
|
216
216
|
function Ce(n) {
|
|
217
217
|
n && n.c();
|
|
218
218
|
}
|
|
219
|
-
function
|
|
219
|
+
function be(n, t, e, r) {
|
|
220
220
|
const { fragment: i, after_update: o } = n.$$;
|
|
221
|
-
i && i.m(t, e), r ||
|
|
222
|
-
const l = n.$$.on_mount.map(
|
|
223
|
-
n.$$.on_destroy ? n.$$.on_destroy.push(...l) :
|
|
224
|
-
}), o.forEach(
|
|
221
|
+
i && i.m(t, e), r || $e(() => {
|
|
222
|
+
const l = n.$$.on_mount.map(At).filter(Nt);
|
|
223
|
+
n.$$.on_destroy ? n.$$.on_destroy.push(...l) : ce(l), n.$$.on_mount = [];
|
|
224
|
+
}), o.forEach($e);
|
|
225
225
|
}
|
|
226
|
-
function
|
|
226
|
+
function we(n, t) {
|
|
227
227
|
const e = n.$$;
|
|
228
|
-
e.fragment !== null && (
|
|
228
|
+
e.fragment !== null && (ce(e.on_destroy), e.fragment && e.fragment.d(t), e.on_destroy = e.fragment = null, e.ctx = []);
|
|
229
229
|
}
|
|
230
|
-
function
|
|
231
|
-
n.$$.dirty[0] === -1 && (
|
|
230
|
+
function Sr(n, t) {
|
|
231
|
+
n.$$.dirty[0] === -1 && (Re.push(n), wr(), n.$$.dirty.fill(0)), n.$$.dirty[t / 31 | 0] |= 1 << t % 31;
|
|
232
232
|
}
|
|
233
|
-
function
|
|
234
|
-
const u =
|
|
233
|
+
function Se(n, t, e, r, i, o, l, s = [-1]) {
|
|
234
|
+
const u = Te;
|
|
235
235
|
Ie(n);
|
|
236
236
|
const f = n.$$ = {
|
|
237
237
|
fragment: null,
|
|
238
238
|
ctx: [],
|
|
239
239
|
props: o,
|
|
240
|
-
update:
|
|
240
|
+
update: T,
|
|
241
241
|
not_equal: i,
|
|
242
|
-
bound:
|
|
242
|
+
bound: gt(),
|
|
243
243
|
on_mount: [],
|
|
244
244
|
on_destroy: [],
|
|
245
245
|
on_disconnect: [],
|
|
246
246
|
before_update: [],
|
|
247
247
|
after_update: [],
|
|
248
248
|
context: new Map(t.context || (u ? u.$$.context : [])),
|
|
249
|
-
callbacks:
|
|
249
|
+
callbacks: gt(),
|
|
250
250
|
dirty: s,
|
|
251
251
|
skip_bound: !1,
|
|
252
252
|
root: t.target || u.$$.root
|
|
253
253
|
};
|
|
254
254
|
l && l(f.root);
|
|
255
255
|
let a = !1;
|
|
256
|
-
if (f.ctx = e ? e(n, t.props || {}, (
|
|
257
|
-
const
|
|
258
|
-
return f.ctx && i(f.ctx[
|
|
259
|
-
}) : [], f.update(), a = !0,
|
|
256
|
+
if (f.ctx = e ? e(n, t.props || {}, (g, m, ...v) => {
|
|
257
|
+
const b = v.length ? v[0] : m;
|
|
258
|
+
return f.ctx && i(f.ctx[g], f.ctx[g] = b) && (!f.skip_bound && f.bound[g] && f.bound[g](b), a && Sr(n, g)), m;
|
|
259
|
+
}) : [], f.update(), a = !0, ce(f.before_update), f.fragment = r ? r(f.ctx) : !1, t.target) {
|
|
260
260
|
if (t.hydrate) {
|
|
261
|
-
const
|
|
262
|
-
f.fragment && f.fragment.l(
|
|
261
|
+
const g = mr(t.target);
|
|
262
|
+
f.fragment && f.fragment.l(g), g.forEach(Y);
|
|
263
263
|
} else
|
|
264
264
|
f.fragment && f.fragment.c();
|
|
265
|
-
t.intro && N(n.$$.fragment),
|
|
265
|
+
t.intro && N(n.$$.fragment), be(n, t.target, t.anchor, t.customElement), qt();
|
|
266
266
|
}
|
|
267
267
|
Ie(u);
|
|
268
268
|
}
|
|
269
|
-
class
|
|
269
|
+
class ke {
|
|
270
270
|
$destroy() {
|
|
271
|
-
|
|
271
|
+
we(this, 1), this.$destroy = T;
|
|
272
272
|
}
|
|
273
273
|
$on(t, e) {
|
|
274
|
-
if (!
|
|
275
|
-
return
|
|
274
|
+
if (!Nt(e))
|
|
275
|
+
return T;
|
|
276
276
|
const r = this.$$.callbacks[t] || (this.$$.callbacks[t] = []);
|
|
277
277
|
return r.push(e), () => {
|
|
278
278
|
const i = r.indexOf(e);
|
|
@@ -280,179 +280,179 @@ class Se {
|
|
|
280
280
|
};
|
|
281
281
|
}
|
|
282
282
|
$set(t) {
|
|
283
|
-
this.$$set && !
|
|
283
|
+
this.$$set && !ar(t) && (this.$$.skip_bound = !0, this.$$set(t), this.$$.skip_bound = !1);
|
|
284
284
|
}
|
|
285
285
|
}
|
|
286
|
-
function
|
|
286
|
+
function kr(n) {
|
|
287
287
|
let t, e;
|
|
288
288
|
return {
|
|
289
289
|
c() {
|
|
290
|
-
t =
|
|
290
|
+
t = fe("svg"), e = fe("path"), y(e, "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(t, "viewBox", "0 0 60.006 21.412"), y(t, "width", "14"), y(t, "height", "20"), y(t, "class", "svelte-en2qvf");
|
|
291
291
|
},
|
|
292
292
|
m(r, i) {
|
|
293
|
-
|
|
293
|
+
X(r, t, i), R(t, e);
|
|
294
294
|
},
|
|
295
|
-
p:
|
|
296
|
-
i:
|
|
297
|
-
o:
|
|
295
|
+
p: T,
|
|
296
|
+
i: T,
|
|
297
|
+
o: T,
|
|
298
298
|
d(r) {
|
|
299
|
-
r &&
|
|
299
|
+
r && Y(t);
|
|
300
300
|
}
|
|
301
301
|
};
|
|
302
302
|
}
|
|
303
|
-
class
|
|
303
|
+
class Pr extends ke {
|
|
304
304
|
constructor(t) {
|
|
305
|
-
super(),
|
|
305
|
+
super(), Se(this, t, null, kr, Ee, {});
|
|
306
306
|
}
|
|
307
307
|
}
|
|
308
|
-
function
|
|
308
|
+
function Rr(n) {
|
|
309
309
|
let t, e;
|
|
310
310
|
return {
|
|
311
311
|
c() {
|
|
312
|
-
t =
|
|
312
|
+
t = fe("svg"), e = fe("path"), y(e, "d", "M3.8 2.5c-.6 0-1.3.7-1.3 1.3 0 .3.2.7.5.8L7.2 9 3 13.2c-.3.3-.5.7-.5 1 0 .6.7 1.3 1.3 1.3.3 0 .7-.2 1-.5L9 10.8l4.2 4.2c.2.3.7.3 1 .3.6 0 1.3-.7 1.3-1.3 0-.3-.2-.7-.3-1l-4.4-4L15 4.6c.3-.2.5-.5.5-.8 0-.7-.7-1.3-1.3-1.3-.3 0-.7.2-1 .3L9 7.1 4.8 2.8c-.3-.1-.7-.3-1-.3z"), y(t, "viewBox", "0 0 18 18"), y(t, "width", "16"), y(t, "height", "16"), y(t, "class", "svelte-en2qvf");
|
|
313
313
|
},
|
|
314
314
|
m(r, i) {
|
|
315
|
-
|
|
315
|
+
X(r, t, i), R(t, e);
|
|
316
316
|
},
|
|
317
|
-
p:
|
|
318
|
-
i:
|
|
319
|
-
o:
|
|
317
|
+
p: T,
|
|
318
|
+
i: T,
|
|
319
|
+
o: T,
|
|
320
320
|
d(r) {
|
|
321
|
-
r &&
|
|
321
|
+
r && Y(t);
|
|
322
322
|
}
|
|
323
323
|
};
|
|
324
324
|
}
|
|
325
|
-
class
|
|
325
|
+
class Ir extends ke {
|
|
326
326
|
constructor(t) {
|
|
327
|
-
super(),
|
|
327
|
+
super(), Se(this, t, null, Rr, Ee, {});
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
|
-
function
|
|
330
|
+
function Lr(n) {
|
|
331
331
|
let t;
|
|
332
332
|
return {
|
|
333
333
|
c() {
|
|
334
|
-
t = B("div"), t.innerHTML = '<svg viewBox="0 0 18 18" width="24" height="24" class="svelte-7cmwmc"><path fill="#333" d="M4.4 4.4l.8.8c2.1-2.1 5.5-2.1 7.6 0l.8-.8c-2.5-2.5-6.7-2.5-9.2 0z"></path><path opacity=".1" d="M12.8 12.9c-2.1 2.1-5.5 2.1-7.6 0-2.1-2.1-2.1-5.5 0-7.7l-.8-.8c-2.5 2.5-2.5 6.7 0 9.2s6.6 2.5 9.2 0 2.5-6.6 0-9.2l-.8.8c2.2 2.1 2.2 5.6 0 7.7z"></path></svg>',
|
|
334
|
+
t = B("div"), t.innerHTML = '<svg viewBox="0 0 18 18" width="24" height="24" class="svelte-7cmwmc"><path fill="#333" d="M4.4 4.4l.8.8c2.1-2.1 5.5-2.1 7.6 0l.8-.8c-2.5-2.5-6.7-2.5-9.2 0z"></path><path opacity=".1" d="M12.8 12.9c-2.1 2.1-5.5 2.1-7.6 0-2.1-2.1-2.1-5.5 0-7.7l-.8-.8c-2.5 2.5-2.5 6.7 0 9.2s6.6 2.5 9.2 0 2.5-6.6 0-9.2l-.8.8c2.2 2.1 2.2 5.6 0 7.7z"></path></svg>', y(t, "class", "svelte-7cmwmc");
|
|
335
335
|
},
|
|
336
336
|
m(e, r) {
|
|
337
|
-
|
|
337
|
+
X(e, t, r);
|
|
338
338
|
},
|
|
339
|
-
p:
|
|
340
|
-
i:
|
|
341
|
-
o:
|
|
339
|
+
p: T,
|
|
340
|
+
i: T,
|
|
341
|
+
o: T,
|
|
342
342
|
d(e) {
|
|
343
|
-
e &&
|
|
343
|
+
e && Y(t);
|
|
344
344
|
}
|
|
345
345
|
};
|
|
346
346
|
}
|
|
347
|
-
class
|
|
347
|
+
class Mr extends ke {
|
|
348
348
|
constructor(t) {
|
|
349
|
-
super(),
|
|
349
|
+
super(), Se(this, t, null, Lr, Ee, {});
|
|
350
350
|
}
|
|
351
351
|
}
|
|
352
|
-
function
|
|
352
|
+
function Or(n) {
|
|
353
353
|
let t, e, r;
|
|
354
354
|
return {
|
|
355
355
|
c() {
|
|
356
|
-
t =
|
|
356
|
+
t = fe("svg"), e = fe("path"), y(e, "stroke-width", "4"), y(e, "fill-rule", "evenodd"), y(e, "clip-rule", "evenodd"), y(e, "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(e, "class", "svelte-656hh2"), y(t, "width", r = n[0] !== "list" ? void 0 : "20"), y(t, "viewBox", "0 0 70 85"), y(t, "fill", "none"), y(t, "class", "svelte-656hh2"), F(t, "in-map", n[0] !== "list"), F(t, "for-maplibre", n[0] === "maplibre"), F(t, "for-leaflet", n[0] === "leaflet"), F(t, "list-icon", n[0] === "list");
|
|
357
357
|
},
|
|
358
358
|
m(i, o) {
|
|
359
|
-
|
|
359
|
+
X(i, t, o), R(t, e);
|
|
360
360
|
},
|
|
361
361
|
p(i, [o]) {
|
|
362
|
-
o & 1 && r !== (r = i[0] !== "list" ? void 0 : "20") &&
|
|
362
|
+
o & 1 && r !== (r = i[0] !== "list" ? void 0 : "20") && y(t, "width", r), o & 1 && F(t, "in-map", i[0] !== "list"), o & 1 && F(t, "for-maplibre", i[0] === "maplibre"), o & 1 && F(t, "for-leaflet", i[0] === "leaflet"), o & 1 && F(t, "list-icon", i[0] === "list");
|
|
363
363
|
},
|
|
364
|
-
i:
|
|
365
|
-
o:
|
|
364
|
+
i: T,
|
|
365
|
+
o: T,
|
|
366
366
|
d(i) {
|
|
367
|
-
i &&
|
|
367
|
+
i && Y(t);
|
|
368
368
|
}
|
|
369
369
|
};
|
|
370
370
|
}
|
|
371
|
-
function
|
|
371
|
+
function Tr(n, t, e) {
|
|
372
372
|
let { displayIn: r } = t;
|
|
373
373
|
return n.$$set = (i) => {
|
|
374
374
|
"displayIn" in i && e(0, r = i.displayIn);
|
|
375
375
|
}, [r];
|
|
376
376
|
}
|
|
377
|
-
class
|
|
377
|
+
class Ft extends ke {
|
|
378
378
|
constructor(t) {
|
|
379
|
-
super(),
|
|
379
|
+
super(), Se(this, t, Tr, Or, Ee, { displayIn: 0 });
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
|
-
function
|
|
382
|
+
function Cr(n) {
|
|
383
383
|
let t, e;
|
|
384
384
|
return {
|
|
385
385
|
c() {
|
|
386
|
-
t =
|
|
386
|
+
t = fe("svg"), e = fe("path"), y(e, "d", "M7.4 2.5c-2.7 0-4.9 2.2-4.9 4.9s2.2 4.9 4.9 4.9c1 0 1.8-.2 2.5-.8l3.7 3.7c.2.2.4.3.8.3.7 0 1.1-.4 1.1-1.1 0-.3-.1-.5-.3-.8L11.4 10c.4-.8.8-1.6.8-2.5.1-2.8-2.1-5-4.8-5zm0 1.6c1.8 0 3.2 1.4 3.2 3.2s-1.4 3.2-3.2 3.2-3.3-1.3-3.3-3.1 1.4-3.3 3.3-3.3z"), y(t, "viewBox", "0 0 18 18"), y(t, "xml:space", "preserve"), y(t, "width", "20"), y(t, "class", "svelte-en2qvf");
|
|
387
387
|
},
|
|
388
388
|
m(r, i) {
|
|
389
|
-
|
|
389
|
+
X(r, t, i), R(t, e);
|
|
390
390
|
},
|
|
391
|
-
p:
|
|
392
|
-
i:
|
|
393
|
-
o:
|
|
391
|
+
p: T,
|
|
392
|
+
i: T,
|
|
393
|
+
o: T,
|
|
394
394
|
d(r) {
|
|
395
|
-
r &&
|
|
395
|
+
r && Y(t);
|
|
396
396
|
}
|
|
397
397
|
};
|
|
398
398
|
}
|
|
399
|
-
class
|
|
399
|
+
class zr extends ke {
|
|
400
400
|
constructor(t) {
|
|
401
|
-
super(),
|
|
401
|
+
super(), Se(this, t, null, Cr, Ee, {});
|
|
402
402
|
}
|
|
403
403
|
}
|
|
404
|
-
function
|
|
404
|
+
function mt(n, t, e) {
|
|
405
405
|
const r = n.slice();
|
|
406
|
-
return r[
|
|
406
|
+
return r[63] = t[e], r[65] = e, r;
|
|
407
407
|
}
|
|
408
|
-
function
|
|
408
|
+
function pt(n) {
|
|
409
409
|
let t, e;
|
|
410
|
-
return t = new
|
|
410
|
+
return t = new Mr({}), {
|
|
411
411
|
c() {
|
|
412
412
|
Ce(t.$$.fragment);
|
|
413
413
|
},
|
|
414
414
|
m(r, i) {
|
|
415
|
-
|
|
415
|
+
be(t, r, i), e = !0;
|
|
416
416
|
},
|
|
417
417
|
i(r) {
|
|
418
418
|
e || (N(t.$$.fragment, r), e = !0);
|
|
419
419
|
},
|
|
420
420
|
o(r) {
|
|
421
|
-
|
|
421
|
+
V(t.$$.fragment, r), e = !1;
|
|
422
422
|
},
|
|
423
423
|
d(r) {
|
|
424
|
-
|
|
424
|
+
we(t, r);
|
|
425
425
|
}
|
|
426
426
|
};
|
|
427
427
|
}
|
|
428
|
-
function
|
|
429
|
-
let t, e, r, i, o
|
|
430
|
-
return e = new
|
|
428
|
+
function _t(n) {
|
|
429
|
+
let t, e, r, i, o;
|
|
430
|
+
return e = new Pr({}), {
|
|
431
431
|
c() {
|
|
432
|
-
t = B("button"), Ce(e.$$.fragment),
|
|
432
|
+
t = B("button"), Ce(e.$$.fragment), y(t, "type", "button"), y(t, "title", n[8]), y(t, "class", "svelte-1h1zm6d"), F(t, "active", n[1]);
|
|
433
433
|
},
|
|
434
|
-
m(
|
|
435
|
-
|
|
434
|
+
m(l, s) {
|
|
435
|
+
X(l, t, s), be(e, t, null), r = !0, i || (o = Z(t, "click", n[50]), i = !0);
|
|
436
436
|
},
|
|
437
|
-
p(
|
|
438
|
-
(!
|
|
437
|
+
p(l, s) {
|
|
438
|
+
(!r || s[0] & 256) && y(t, "title", l[8]), (!r || s[0] & 2) && F(t, "active", l[1]);
|
|
439
439
|
},
|
|
440
|
-
i(
|
|
441
|
-
|
|
440
|
+
i(l) {
|
|
441
|
+
r || (N(e.$$.fragment, l), r = !0);
|
|
442
442
|
},
|
|
443
|
-
o(
|
|
444
|
-
|
|
443
|
+
o(l) {
|
|
444
|
+
V(e.$$.fragment, l), r = !1;
|
|
445
445
|
},
|
|
446
|
-
d(
|
|
447
|
-
|
|
446
|
+
d(l) {
|
|
447
|
+
l && Y(t), we(e), i = !1, o();
|
|
448
448
|
}
|
|
449
449
|
};
|
|
450
450
|
}
|
|
451
|
-
function
|
|
452
|
-
let t, e, r, i, o = n[
|
|
451
|
+
function Ar(n) {
|
|
452
|
+
let t, e, r, i, o = n[12], l = [];
|
|
453
453
|
for (let u = 0; u < o.length; u += 1)
|
|
454
|
-
l[u] =
|
|
455
|
-
const s = (u) =>
|
|
454
|
+
l[u] = bt(mt(n, o, u));
|
|
455
|
+
const s = (u) => V(l[u], 1, 1, () => {
|
|
456
456
|
l[u] = null;
|
|
457
457
|
});
|
|
458
458
|
return {
|
|
@@ -460,28 +460,28 @@ function Or(n) {
|
|
|
460
460
|
t = B("ul");
|
|
461
461
|
for (let u = 0; u < l.length; u += 1)
|
|
462
462
|
l[u].c();
|
|
463
|
-
|
|
463
|
+
y(t, "class", "svelte-1h1zm6d");
|
|
464
464
|
},
|
|
465
465
|
m(u, f) {
|
|
466
|
-
|
|
466
|
+
X(u, t, f);
|
|
467
467
|
for (let a = 0; a < l.length; a += 1)
|
|
468
468
|
l[a].m(t, null);
|
|
469
469
|
e = !0, r || (i = [
|
|
470
|
-
|
|
471
|
-
|
|
470
|
+
Z(t, "mouseout", n[53]),
|
|
471
|
+
Z(t, "blur", n[54])
|
|
472
472
|
], r = !0);
|
|
473
473
|
},
|
|
474
474
|
p(u, f) {
|
|
475
|
-
if (f[0] &
|
|
476
|
-
o = u[
|
|
475
|
+
if (f[0] & 29697) {
|
|
476
|
+
o = u[12];
|
|
477
477
|
let a;
|
|
478
478
|
for (a = 0; a < o.length; a += 1) {
|
|
479
|
-
const
|
|
480
|
-
l[a] ? (l[a].p(
|
|
479
|
+
const g = mt(u, o, a);
|
|
480
|
+
l[a] ? (l[a].p(g, f), N(l[a], 1)) : (l[a] = bt(g), l[a].c(), N(l[a], 1), l[a].m(t, null));
|
|
481
481
|
}
|
|
482
|
-
for (
|
|
482
|
+
for (Fe(), a = o.length; a < l.length; a += 1)
|
|
483
483
|
s(a);
|
|
484
|
-
|
|
484
|
+
Qe();
|
|
485
485
|
}
|
|
486
486
|
},
|
|
487
487
|
i(u) {
|
|
@@ -494,321 +494,328 @@ function Or(n) {
|
|
|
494
494
|
o(u) {
|
|
495
495
|
l = l.filter(Boolean);
|
|
496
496
|
for (let f = 0; f < l.length; f += 1)
|
|
497
|
-
|
|
497
|
+
V(l[f]);
|
|
498
498
|
e = !1;
|
|
499
499
|
},
|
|
500
500
|
d(u) {
|
|
501
|
-
u &&
|
|
501
|
+
u && Y(t), yr(l, u), r = !1, ce(i);
|
|
502
502
|
}
|
|
503
503
|
};
|
|
504
504
|
}
|
|
505
|
-
function
|
|
505
|
+
function Nr(n) {
|
|
506
506
|
let t, e;
|
|
507
507
|
return {
|
|
508
508
|
c() {
|
|
509
|
-
t = B("div"), e = de(n[5]),
|
|
509
|
+
t = B("div"), e = de(n[5]), y(t, "class", "no-results svelte-1h1zm6d");
|
|
510
510
|
},
|
|
511
511
|
m(r, i) {
|
|
512
|
-
|
|
512
|
+
X(r, t, i), R(t, e);
|
|
513
513
|
},
|
|
514
514
|
p(r, i) {
|
|
515
|
-
i[0] & 32 &&
|
|
515
|
+
i[0] & 32 && Oe(e, r[5]);
|
|
516
516
|
},
|
|
517
|
-
i:
|
|
518
|
-
o:
|
|
517
|
+
i: T,
|
|
518
|
+
o: T,
|
|
519
519
|
d(r) {
|
|
520
|
-
r &&
|
|
520
|
+
r && Y(t);
|
|
521
521
|
}
|
|
522
522
|
};
|
|
523
523
|
}
|
|
524
|
-
function
|
|
524
|
+
function Br(n) {
|
|
525
525
|
let t, e;
|
|
526
526
|
return {
|
|
527
527
|
c() {
|
|
528
|
-
t = B("div"), e = de(n[4]),
|
|
528
|
+
t = B("div"), e = de(n[4]), y(t, "class", "error svelte-1h1zm6d");
|
|
529
529
|
},
|
|
530
530
|
m(r, i) {
|
|
531
|
-
|
|
531
|
+
X(r, t, i), R(t, e);
|
|
532
532
|
},
|
|
533
533
|
p(r, i) {
|
|
534
|
-
i[0] & 16 &&
|
|
534
|
+
i[0] & 16 && Oe(e, r[4]);
|
|
535
535
|
},
|
|
536
|
-
i:
|
|
537
|
-
o:
|
|
536
|
+
i: T,
|
|
537
|
+
o: T,
|
|
538
538
|
d(r) {
|
|
539
|
-
r &&
|
|
539
|
+
r && Y(t);
|
|
540
540
|
}
|
|
541
541
|
};
|
|
542
542
|
}
|
|
543
|
-
function
|
|
543
|
+
function Gr(n) {
|
|
544
544
|
let t = "", e;
|
|
545
545
|
return {
|
|
546
546
|
c() {
|
|
547
547
|
e = de(t);
|
|
548
548
|
},
|
|
549
549
|
m(r, i) {
|
|
550
|
-
|
|
550
|
+
X(r, e, i);
|
|
551
551
|
},
|
|
552
|
-
p:
|
|
553
|
-
i:
|
|
554
|
-
o:
|
|
552
|
+
p: T,
|
|
553
|
+
i: T,
|
|
554
|
+
o: T,
|
|
555
555
|
d(r) {
|
|
556
|
-
r &&
|
|
556
|
+
r && Y(e);
|
|
557
557
|
}
|
|
558
558
|
};
|
|
559
559
|
}
|
|
560
|
-
function
|
|
561
|
-
let t, e = n[
|
|
560
|
+
function xt(n) {
|
|
561
|
+
let t, e = n[63].place_type + "", r;
|
|
562
562
|
return {
|
|
563
563
|
c() {
|
|
564
|
-
t = B("span"), r = de(e),
|
|
564
|
+
t = B("span"), r = de(e), y(t, "class", "svelte-1h1zm6d");
|
|
565
565
|
},
|
|
566
566
|
m(i, o) {
|
|
567
|
-
|
|
567
|
+
X(i, t, o), R(t, r);
|
|
568
568
|
},
|
|
569
569
|
p(i, o) {
|
|
570
|
-
o[0] &
|
|
570
|
+
o[0] & 4096 && e !== (e = i[63].place_type + "") && Oe(r, e);
|
|
571
571
|
},
|
|
572
572
|
d(i) {
|
|
573
|
-
i &&
|
|
573
|
+
i && Y(t);
|
|
574
574
|
}
|
|
575
575
|
};
|
|
576
576
|
}
|
|
577
|
-
function
|
|
578
|
-
let t, e, r, i, o, l, s = n[
|
|
579
|
-
e = new
|
|
580
|
-
let
|
|
581
|
-
function
|
|
582
|
-
return n[
|
|
577
|
+
function bt(n) {
|
|
578
|
+
let t, e, r, i, o, l, s = n[63].place_name.replace(/,.*/, "") + "", u, f, a, g, m, v = n[63].place_name.replace(/[^,]*,?\s*/, "") + "", b, p, h, d, w, I;
|
|
579
|
+
e = new Ft({ props: { displayIn: "list" } });
|
|
580
|
+
let _ = n[10] && xt(n);
|
|
581
|
+
function S() {
|
|
582
|
+
return n[51](n[65]);
|
|
583
583
|
}
|
|
584
|
-
function
|
|
585
|
-
return n[
|
|
584
|
+
function E() {
|
|
585
|
+
return n[52](n[63]);
|
|
586
586
|
}
|
|
587
587
|
return {
|
|
588
588
|
c() {
|
|
589
|
-
t = B("li"), Ce(e.$$.fragment), r =
|
|
589
|
+
t = B("li"), Ce(e.$$.fragment), r = ee(), i = B("span"), o = B("span"), l = B("span"), u = de(s), f = ee(), _ && _.c(), a = ee(), g = B("span"), m = B("span"), b = de(v), p = ee(), y(l, "class", "svelte-1h1zm6d"), y(o, "class", "svelte-1h1zm6d"), y(i, "class", "svelte-1h1zm6d"), y(m, "class", "svelte-1h1zm6d"), y(g, "class", "svelte-1h1zm6d"), y(t, "tabindex", "0"), y(t, "data-selected", h = n[14] === n[65]), y(t, "class", "svelte-1h1zm6d"), F(t, "selected", n[14] === n[65]);
|
|
590
590
|
},
|
|
591
|
-
m(
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
],
|
|
591
|
+
m(k, P) {
|
|
592
|
+
X(k, t, P), be(e, t, null), R(t, r), R(t, i), R(i, o), R(o, l), R(l, u), R(o, f), _ && _.m(o, null), R(t, a), R(t, g), R(g, m), R(m, b), R(t, p), d = !0, w || (I = [
|
|
593
|
+
Z(t, "mouseover", S),
|
|
594
|
+
Z(t, "focus", E)
|
|
595
|
+
], w = !0);
|
|
596
596
|
},
|
|
597
|
-
p(
|
|
598
|
-
n =
|
|
597
|
+
p(k, P) {
|
|
598
|
+
n = k, (!d || P[0] & 4096) && s !== (s = n[63].place_name.replace(/,.*/, "") + "") && Oe(u, s), n[10] ? _ ? _.p(n, P) : (_ = xt(n), _.c(), _.m(o, null)) : _ && (_.d(1), _ = null), (!d || P[0] & 4096) && v !== (v = n[63].place_name.replace(/[^,]*,?\s*/, "") + "") && Oe(b, v), (!d || P[0] & 16384 && h !== (h = n[14] === n[65])) && y(t, "data-selected", h), (!d || P[0] & 16384) && F(t, "selected", n[14] === n[65]);
|
|
599
599
|
},
|
|
600
|
-
i(
|
|
601
|
-
|
|
600
|
+
i(k) {
|
|
601
|
+
d || (N(e.$$.fragment, k), d = !0);
|
|
602
602
|
},
|
|
603
|
-
o(
|
|
604
|
-
|
|
603
|
+
o(k) {
|
|
604
|
+
V(e.$$.fragment, k), d = !1;
|
|
605
605
|
},
|
|
606
|
-
d(
|
|
607
|
-
|
|
606
|
+
d(k) {
|
|
607
|
+
k && Y(t), we(e), _ && _.d(), w = !1, ce(I);
|
|
608
608
|
}
|
|
609
609
|
};
|
|
610
610
|
}
|
|
611
|
-
function
|
|
612
|
-
let t, e, r, i, o, l, s, u, f, a,
|
|
613
|
-
i = new
|
|
614
|
-
let
|
|
615
|
-
const
|
|
616
|
-
function
|
|
617
|
-
var q,
|
|
618
|
-
return x[
|
|
611
|
+
function qr(n) {
|
|
612
|
+
let t, e, r, i, o, l, s, u, f, a, g, m, v, b, p, h, d, w, I, _;
|
|
613
|
+
i = new zr({}), a = new Ir({});
|
|
614
|
+
let S = n[18] && pt(), E = n[7] === !0 && _t(n);
|
|
615
|
+
const k = n[42].default, P = cr(k, n, n[41], null), G = [Gr, Br, Nr, Ar], z = [];
|
|
616
|
+
function L(x, M) {
|
|
617
|
+
var q, re;
|
|
618
|
+
return x[15] ? x[17] ? 1 : ((q = x[12]) == null ? void 0 : q.length) === 0 ? 2 : x[15] && ((re = x[12]) == null ? void 0 : re.length) ? 3 : -1 : 0;
|
|
619
619
|
}
|
|
620
|
-
return ~(
|
|
620
|
+
return ~(p = L(n)) && (h = z[p] = G[p](n)), {
|
|
621
621
|
c() {
|
|
622
|
-
t = B("form"), e = B("div"), r = B("button"), Ce(i.$$.fragment), o =
|
|
622
|
+
t = B("form"), e = B("div"), r = B("button"), Ce(i.$$.fragment), o = ee(), l = B("input"), s = ee(), u = B("div"), f = B("button"), Ce(a.$$.fragment), g = ee(), S && S.c(), m = ee(), E && E.c(), v = ee(), P && P.c(), b = ee(), h && h.c(), y(r, "type", "button"), y(r, "class", "svelte-1h1zm6d"), y(l, "placeholder", n[3]), y(l, "aria-label", n[3]), y(l, "class", "svelte-1h1zm6d"), y(f, "type", "button"), y(f, "title", n[9]), y(f, "class", "svelte-1h1zm6d"), F(f, "displayable", n[0] !== ""), y(u, "class", "clear-button-container svelte-1h1zm6d"), y(e, "class", "input-group svelte-1h1zm6d"), y(t, "tabindex", "0"), y(t, "class", d = vt(n[2]) + " svelte-1h1zm6d"), F(t, "can-collapse", n[6] && n[0] === "");
|
|
623
623
|
},
|
|
624
|
-
m(x,
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
],
|
|
624
|
+
m(x, M) {
|
|
625
|
+
X(x, t, M), R(t, e), R(e, r), be(i, r, null), R(e, o), R(e, l), n[44](l), yt(l, n[0]), R(e, s), R(e, u), R(u, f), be(a, f, null), R(u, g), S && S.m(u, null), R(e, m), E && E.m(e, null), R(e, v), P && P.m(e, null), R(t, b), ~p && z[p].m(t, null), w = !0, I || (_ = [
|
|
626
|
+
Z(r, "click", n[43]),
|
|
627
|
+
Z(l, "input", n[45]),
|
|
628
|
+
Z(l, "focus", n[46]),
|
|
629
|
+
Z(l, "blur", n[47]),
|
|
630
|
+
Z(l, "keydown", n[20]),
|
|
631
|
+
Z(l, "input", n[48]),
|
|
632
|
+
Z(f, "click", n[49]),
|
|
633
|
+
Z(t, "submit", dr(n[19]))
|
|
634
|
+
], I = !0);
|
|
635
635
|
},
|
|
636
|
-
p(x,
|
|
637
|
-
(!
|
|
638
|
-
|
|
639
|
-
}),
|
|
640
|
-
|
|
641
|
-
}),
|
|
636
|
+
p(x, M) {
|
|
637
|
+
(!w || M[0] & 8) && y(l, "placeholder", x[3]), (!w || M[0] & 8) && y(l, "aria-label", x[3]), M[0] & 1 && l.value !== x[0] && yt(l, x[0]), (!w || M[0] & 512) && y(f, "title", x[9]), (!w || M[0] & 1) && F(f, "displayable", x[0] !== ""), x[18] ? S ? M[0] & 262144 && N(S, 1) : (S = pt(), S.c(), N(S, 1), S.m(u, null)) : S && (Fe(), V(S, 1, 1, () => {
|
|
638
|
+
S = null;
|
|
639
|
+
}), Qe()), x[7] === !0 ? E ? (E.p(x, M), M[0] & 128 && N(E, 1)) : (E = _t(x), E.c(), N(E, 1), E.m(e, v)) : E && (Fe(), V(E, 1, 1, () => {
|
|
640
|
+
E = null;
|
|
641
|
+
}), Qe()), P && P.p && (!w || M[1] & 1024) && gr(
|
|
642
642
|
P,
|
|
643
|
-
|
|
643
|
+
k,
|
|
644
644
|
x,
|
|
645
|
-
x[
|
|
646
|
-
|
|
645
|
+
x[41],
|
|
646
|
+
w ? hr(k, x[41], M, null) : vr(x[41]),
|
|
647
647
|
null
|
|
648
648
|
);
|
|
649
|
-
let q =
|
|
650
|
-
|
|
649
|
+
let q = p;
|
|
650
|
+
p = L(x), p === q ? ~p && z[p].p(x, M) : (h && (Fe(), V(z[q], 1, 1, () => {
|
|
651
651
|
z[q] = null;
|
|
652
|
-
}),
|
|
652
|
+
}), Qe()), ~p ? (h = z[p], h ? h.p(x, M) : (h = z[p] = G[p](x), h.c()), N(h, 1), h.m(t, null)) : h = null), (!w || M[0] & 4 && d !== (d = vt(x[2]) + " svelte-1h1zm6d")) && y(t, "class", d), (!w || M[0] & 69) && F(t, "can-collapse", x[6] && x[0] === "");
|
|
653
653
|
},
|
|
654
654
|
i(x) {
|
|
655
|
-
|
|
655
|
+
w || (N(i.$$.fragment, x), N(a.$$.fragment, x), N(S), N(E), N(P, x), N(h), w = !0);
|
|
656
656
|
},
|
|
657
657
|
o(x) {
|
|
658
|
-
|
|
658
|
+
V(i.$$.fragment, x), V(a.$$.fragment, x), V(S), V(E), V(P, x), V(h), w = !1;
|
|
659
659
|
},
|
|
660
660
|
d(x) {
|
|
661
|
-
x &&
|
|
661
|
+
x && Y(t), we(i), n[44](null), we(a), S && S.d(), E && E.d(), P && P.d(x), ~p && z[p].d(), I = !1, ce(_);
|
|
662
662
|
}
|
|
663
663
|
};
|
|
664
664
|
}
|
|
665
|
-
function
|
|
666
|
-
let r, { $$slots: i = {}, $$scope: o } = t, { class: l = void 0 } = t, { mapController: s = void 0 } = t, { apiKey: u } = t, { debounceSearch: f = 200 } = t, { placeholder: a = "Search" } = t, { errorMessage:
|
|
667
|
-
function
|
|
668
|
-
|
|
665
|
+
function Fr(n, t, e) {
|
|
666
|
+
let r, { $$slots: i = {}, $$scope: o } = t, { class: l = void 0 } = t, { mapController: s = void 0 } = t, { apiKey: u } = t, { debounceSearch: f = 200 } = t, { placeholder: a = "Search" } = t, { errorMessage: g = "Searching failed" } = t, { noResultsMessage: m = "No results found" } = t, { proximity: v = void 0 } = t, { bbox: b = void 0 } = t, { trackProximity: p = !0 } = t, { minLength: h = 2 } = t, { language: d = void 0 } = t, { showResultsWhileTyping: w = !0 } = t, { zoom: I = 16 } = t, { flyTo: _ = !0 } = t, { collapsed: S = !1 } = t, { clearOnBlur: E = !1 } = t, { enableReverse: k = !1 } = t, { reverseButtonTitle: P = "toggle reverse geocoding" } = t, { clearButtonTitle: G = "clear" } = t, { filter: z = () => !0 } = t, { searchValue: L = "" } = t, { reverseActive: x = k === "always" } = t, { showPlaceType: M = !1 } = t, { showFullGeometry: q = !0 } = t;
|
|
667
|
+
function re() {
|
|
668
|
+
K.focus();
|
|
669
669
|
}
|
|
670
|
-
function
|
|
671
|
-
|
|
670
|
+
function Zt() {
|
|
671
|
+
K.blur();
|
|
672
672
|
}
|
|
673
|
-
function
|
|
674
|
-
e(0,
|
|
675
|
-
|
|
673
|
+
function st(c, Q = !0) {
|
|
674
|
+
e(0, L = c), Q ? (e(14, A = -1), ft()) : (Xe(), setTimeout(() => {
|
|
675
|
+
K.focus(), K.select();
|
|
676
676
|
}));
|
|
677
677
|
}
|
|
678
|
-
let
|
|
679
|
-
const
|
|
680
|
-
|
|
678
|
+
let me = !1, C, U, O, ut = "", K, A = -1, ne, Ae = [], he, Ve, Ye;
|
|
679
|
+
const ie = xr();
|
|
680
|
+
_r(() => {
|
|
681
681
|
s && (s.setProximityChangeHandler(void 0), s.setMapClickHandler(void 0), s.indicateReverse(!1), s.setSelectedMarker(-1), s.setMarkers(void 0, void 0));
|
|
682
682
|
});
|
|
683
|
-
function
|
|
684
|
-
|
|
685
|
-
e(
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
683
|
+
function ft(c) {
|
|
684
|
+
if (A > -1 && C)
|
|
685
|
+
e(13, O = C[A]), e(0, L = O.place_name.replace(/,.*/, "")), e(17, ne = void 0), e(39, U = void 0), e(14, A = -1);
|
|
686
|
+
else if (L) {
|
|
687
|
+
const Q = c || !at();
|
|
688
|
+
Ze(L).then(() => {
|
|
689
|
+
e(39, U = C), e(13, O = void 0), Q && Xt();
|
|
690
|
+
}).catch((te) => e(17, ne = te));
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
function at() {
|
|
694
|
+
return /^-?\d+(\.\d+)?,-?\d+(\.\d+)?$/.test(L);
|
|
695
|
+
}
|
|
696
|
+
async function Ze(c, Q = !1) {
|
|
697
|
+
e(17, ne = void 0);
|
|
698
|
+
const te = at(), oe = new URLSearchParams();
|
|
699
|
+
oe.set("key", u), d && oe.set("language", String(d)), te || (b && oe.set("bbox", b.join(",")), v && oe.set("proximity", v.join(",")));
|
|
700
|
+
const ge = "https://api.maptiler.com/geocoding/" + encodeURIComponent(c) + ".json?" + oe.toString();
|
|
701
|
+
if (ge === ut) {
|
|
702
|
+
Q ? (e(12, C = void 0), e(13, O = Ae[0])) : e(12, C = Ae);
|
|
695
703
|
return;
|
|
696
704
|
}
|
|
697
|
-
|
|
705
|
+
ut = ge, he == null || he.abort(), e(18, he = new AbortController());
|
|
698
706
|
let pe;
|
|
699
707
|
try {
|
|
700
|
-
pe = await fetch(ge, { signal:
|
|
701
|
-
e(
|
|
708
|
+
pe = await fetch(ge, { signal: he.signal }).finally(() => {
|
|
709
|
+
e(18, he = void 0);
|
|
702
710
|
});
|
|
703
|
-
} catch (
|
|
704
|
-
if (
|
|
711
|
+
} catch (xe) {
|
|
712
|
+
if (xe && typeof xe == "object" && xe.name === "AbortError")
|
|
705
713
|
return;
|
|
706
714
|
throw new Error();
|
|
707
715
|
}
|
|
708
716
|
if (!pe.ok)
|
|
709
717
|
throw new Error();
|
|
710
|
-
const
|
|
711
|
-
|
|
718
|
+
const _e = await pe.json();
|
|
719
|
+
ie("response", { url: ge, featureCollection: _e }), Q ? (e(12, C = void 0), e(13, O = _e.features[0]), Ae = [O]) : (e(12, C = _e.features.filter(z)), Ae = C, te && K.focus());
|
|
712
720
|
}
|
|
713
|
-
function
|
|
714
|
-
var
|
|
715
|
-
if (!(
|
|
721
|
+
function Xt() {
|
|
722
|
+
var Q, te, oe, ge, pe, _e, xe, ct;
|
|
723
|
+
if (!(U != null && U.length) || !_)
|
|
716
724
|
return;
|
|
717
725
|
const c = [180, 90, -180, -90];
|
|
718
|
-
for (const
|
|
719
|
-
c[0] = Math.min(c[0], (
|
|
720
|
-
s &&
|
|
726
|
+
for (const le of U)
|
|
727
|
+
c[0] = Math.min(c[0], (te = (Q = le.bbox) == null ? void 0 : Q[0]) != null ? te : le.center[0]), c[1] = Math.min(c[1], (ge = (oe = le.bbox) == null ? void 0 : oe[1]) != null ? ge : le.center[1]), c[2] = Math.max(c[2], (_e = (pe = le.bbox) == null ? void 0 : pe[2]) != null ? _e : le.center[0]), c[3] = Math.max(c[3], (ct = (xe = le.bbox) == null ? void 0 : xe[3]) != null ? ct : le.center[1]);
|
|
728
|
+
s && U.length > 0 && (O && c[0] === c[2] && c[1] === c[3] ? s.flyTo(O.center, I) : s.fitBounds(c, 50));
|
|
721
729
|
}
|
|
722
|
-
function
|
|
723
|
-
e(1,
|
|
730
|
+
function Wt(c) {
|
|
731
|
+
e(1, x = k === "always"), st(c[0].toFixed(6) + "," + c[1].toFixed(6));
|
|
724
732
|
}
|
|
725
|
-
function
|
|
726
|
-
if (!
|
|
733
|
+
function jt(c) {
|
|
734
|
+
if (!C)
|
|
727
735
|
return;
|
|
728
|
-
let
|
|
729
|
-
|
|
736
|
+
let Q = c.key === "ArrowDown" ? 1 : c.key === "ArrowUp" ? -1 : 0;
|
|
737
|
+
Q ? (A === -1 && Q === -1 && e(14, A = C.length), e(14, A += Q), A >= C.length && e(14, A = -1), c.preventDefault()) : ["ArrowLeft", "ArrowRight", "Home", "End"].includes(c.key) && e(14, A = -1);
|
|
730
738
|
}
|
|
731
739
|
function Xe(c = !0) {
|
|
732
|
-
if (
|
|
733
|
-
|
|
734
|
-
const
|
|
735
|
-
|
|
740
|
+
if (w && L.length > h) {
|
|
741
|
+
Ve && clearTimeout(Ve);
|
|
742
|
+
const Q = L;
|
|
743
|
+
Ve = window.setTimeout(
|
|
736
744
|
() => {
|
|
737
|
-
|
|
745
|
+
Ze(Q).catch((te) => e(17, ne = te));
|
|
738
746
|
},
|
|
739
747
|
c ? f : 0
|
|
740
748
|
);
|
|
741
749
|
} else
|
|
742
|
-
e(
|
|
750
|
+
e(12, C = void 0), e(17, ne = void 0);
|
|
743
751
|
}
|
|
744
|
-
const
|
|
745
|
-
function
|
|
746
|
-
|
|
747
|
-
|
|
752
|
+
const Ht = () => K.focus();
|
|
753
|
+
function Kt(c) {
|
|
754
|
+
Ke[c ? "unshift" : "push"](() => {
|
|
755
|
+
K = c, e(16, K);
|
|
748
756
|
});
|
|
749
757
|
}
|
|
750
|
-
function
|
|
751
|
-
|
|
758
|
+
function Jt() {
|
|
759
|
+
L = this.value, e(0, L), e(11, me), e(33, E);
|
|
752
760
|
}
|
|
753
|
-
const
|
|
754
|
-
e(0,
|
|
755
|
-
},
|
|
756
|
-
e(
|
|
757
|
-
},
|
|
761
|
+
const $t = () => e(11, me = !0), er = () => e(11, me = !1), tr = () => Xe(), rr = () => {
|
|
762
|
+
e(0, L = ""), K.focus();
|
|
763
|
+
}, nr = () => e(1, x = !x), ir = (c) => e(14, A = c), or = (c) => {
|
|
764
|
+
e(13, O = c), e(0, L = c.place_name.replace(/,.*/, "")), e(14, A = -1);
|
|
765
|
+
}, lr = () => e(14, A = -1), sr = () => {
|
|
758
766
|
};
|
|
759
767
|
return n.$$set = (c) => {
|
|
760
|
-
"class" in c && e(2, l = c.class), "mapController" in c && e(
|
|
768
|
+
"class" in c && e(2, l = c.class), "mapController" in c && e(23, s = c.mapController), "apiKey" in c && e(24, u = c.apiKey), "debounceSearch" in c && e(25, f = c.debounceSearch), "placeholder" in c && e(3, a = c.placeholder), "errorMessage" in c && e(4, g = c.errorMessage), "noResultsMessage" in c && e(5, m = c.noResultsMessage), "proximity" in c && e(22, v = c.proximity), "bbox" in c && e(26, b = c.bbox), "trackProximity" in c && e(27, p = c.trackProximity), "minLength" in c && e(28, h = c.minLength), "language" in c && e(29, d = c.language), "showResultsWhileTyping" in c && e(30, w = c.showResultsWhileTyping), "zoom" in c && e(31, I = c.zoom), "flyTo" in c && e(32, _ = c.flyTo), "collapsed" in c && e(6, S = c.collapsed), "clearOnBlur" in c && e(33, E = c.clearOnBlur), "enableReverse" in c && e(7, k = c.enableReverse), "reverseButtonTitle" in c && e(8, P = c.reverseButtonTitle), "clearButtonTitle" in c && e(9, G = c.clearButtonTitle), "filter" in c && e(34, z = c.filter), "searchValue" in c && e(0, L = c.searchValue), "reverseActive" in c && e(1, x = c.reverseActive), "showPlaceType" in c && e(10, M = c.showPlaceType), "showFullGeometry" in c && e(35, q = c.showFullGeometry), "$$scope" in c && e(41, o = c.$$scope);
|
|
761
769
|
}, n.$$.update = () => {
|
|
762
|
-
n.$$.dirty[0] &
|
|
763
|
-
e(
|
|
764
|
-
} : void 0), n.$$.dirty[0] &
|
|
765
|
-
e(
|
|
766
|
-
}), n.$$.dirty[0] &
|
|
770
|
+
n.$$.dirty[0] & 142606336 && s && s.setProximityChangeHandler(p ? (c) => {
|
|
771
|
+
e(22, v = c);
|
|
772
|
+
} : void 0), n.$$.dirty[0] & 134217728 && (p || e(22, v = void 0)), n.$$.dirty[0] & 2048 | n.$$.dirty[1] & 4 && setTimeout(() => {
|
|
773
|
+
e(15, Ye = me), E && !me && e(0, L = "");
|
|
774
|
+
}), n.$$.dirty[0] & 4097 && (L || (e(13, O = void 0), e(12, C = void 0), e(17, ne = void 0), e(39, U = C))), n.$$.dirty[0] & 8192 | n.$$.dirty[1] & 16 && q && O && !O.address && O.geometry.type === "Point" && Ze(O.id, !0).catch((c) => e(17, ne = c)), n.$$.dirty[0] & 8396800 | n.$$.dirty[1] & 3 && s && O && _ && (!O.bbox || O.bbox[0] === O.bbox[2] && O.bbox[1] === O.bbox[3] ? s.flyTo(O.center, I) : s.fitBounds(O.bbox, 50), e(12, C = void 0), e(39, U = void 0), e(14, A = -1)), n.$$.dirty[0] & 4096 | n.$$.dirty[1] & 256 && U !== C && e(39, U = void 0), n.$$.dirty[0] & 8396800 | n.$$.dirty[1] & 256 && s && s.setMarkers(U, O), n.$$.dirty[0] & 1 && e(14, A = -1), n.$$.dirty[0] & 8404992 && (s == null || s.setSelectedMarker(A)), n.$$.dirty[0] & 20480 && e(40, r = C == null ? void 0 : C[A]), n.$$.dirty[1] & 512 && ie("select", r), n.$$.dirty[0] & 8192 && ie("pick", O), n.$$.dirty[0] & 36864 && ie("optionsVisibilityChange", Ye && !!C), n.$$.dirty[0] & 4096 && ie("featuresListed", C), n.$$.dirty[1] & 256 && ie("featuresMarked", U), n.$$.dirty[0] & 2 && ie("reverseToggle", x), n.$$.dirty[0] & 1 && ie("queryChange", L), n.$$.dirty[0] & 8388610 && s && s.indicateReverse(x), n.$$.dirty[0] & 8388610 && s && s.setMapClickHandler(x ? Wt : void 0);
|
|
767
775
|
}, [
|
|
768
|
-
|
|
769
|
-
|
|
776
|
+
L,
|
|
777
|
+
x,
|
|
770
778
|
l,
|
|
771
779
|
a,
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
780
|
+
g,
|
|
781
|
+
m,
|
|
782
|
+
S,
|
|
783
|
+
k,
|
|
784
|
+
P,
|
|
785
|
+
G,
|
|
775
786
|
M,
|
|
776
|
-
|
|
777
|
-
|
|
787
|
+
me,
|
|
788
|
+
C,
|
|
789
|
+
O,
|
|
778
790
|
A,
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
ut,
|
|
786
|
-
Yt,
|
|
791
|
+
Ye,
|
|
792
|
+
K,
|
|
793
|
+
ne,
|
|
794
|
+
he,
|
|
795
|
+
ft,
|
|
796
|
+
jt,
|
|
787
797
|
Xe,
|
|
788
|
-
|
|
798
|
+
v,
|
|
789
799
|
s,
|
|
790
800
|
u,
|
|
791
801
|
f,
|
|
792
|
-
|
|
802
|
+
b,
|
|
803
|
+
p,
|
|
793
804
|
h,
|
|
794
|
-
|
|
805
|
+
d,
|
|
795
806
|
w,
|
|
807
|
+
I,
|
|
796
808
|
_,
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
k,
|
|
800
|
-
P,
|
|
801
|
-
x,
|
|
802
|
-
O,
|
|
809
|
+
E,
|
|
810
|
+
z,
|
|
803
811
|
q,
|
|
804
|
-
|
|
812
|
+
re,
|
|
813
|
+
Zt,
|
|
814
|
+
st,
|
|
815
|
+
U,
|
|
805
816
|
r,
|
|
806
817
|
o,
|
|
807
818
|
i,
|
|
808
|
-
Xt,
|
|
809
|
-
Wt,
|
|
810
|
-
Zt,
|
|
811
|
-
jt,
|
|
812
819
|
Ht,
|
|
813
820
|
Kt,
|
|
814
821
|
Jt,
|
|
@@ -816,64 +823,71 @@ function Nr(n, t, e) {
|
|
|
816
823
|
er,
|
|
817
824
|
tr,
|
|
818
825
|
rr,
|
|
819
|
-
nr
|
|
826
|
+
nr,
|
|
827
|
+
ir,
|
|
828
|
+
or,
|
|
829
|
+
lr,
|
|
830
|
+
sr
|
|
820
831
|
];
|
|
821
832
|
}
|
|
822
|
-
class
|
|
833
|
+
class Qr extends ke {
|
|
823
834
|
constructor(t) {
|
|
824
|
-
super(),
|
|
835
|
+
super(), Se(
|
|
825
836
|
this,
|
|
826
837
|
t,
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
838
|
+
Fr,
|
|
839
|
+
qr,
|
|
840
|
+
Ee,
|
|
830
841
|
{
|
|
831
842
|
class: 2,
|
|
832
|
-
mapController:
|
|
833
|
-
apiKey:
|
|
834
|
-
debounceSearch:
|
|
843
|
+
mapController: 23,
|
|
844
|
+
apiKey: 24,
|
|
845
|
+
debounceSearch: 25,
|
|
835
846
|
placeholder: 3,
|
|
836
847
|
errorMessage: 4,
|
|
837
848
|
noResultsMessage: 5,
|
|
838
|
-
proximity:
|
|
839
|
-
bbox:
|
|
840
|
-
trackProximity:
|
|
841
|
-
minLength:
|
|
842
|
-
language:
|
|
843
|
-
showResultsWhileTyping:
|
|
844
|
-
zoom:
|
|
845
|
-
flyTo:
|
|
849
|
+
proximity: 22,
|
|
850
|
+
bbox: 26,
|
|
851
|
+
trackProximity: 27,
|
|
852
|
+
minLength: 28,
|
|
853
|
+
language: 29,
|
|
854
|
+
showResultsWhileTyping: 30,
|
|
855
|
+
zoom: 31,
|
|
856
|
+
flyTo: 32,
|
|
846
857
|
collapsed: 6,
|
|
847
|
-
clearOnBlur:
|
|
858
|
+
clearOnBlur: 33,
|
|
848
859
|
enableReverse: 7,
|
|
849
|
-
|
|
860
|
+
reverseButtonTitle: 8,
|
|
861
|
+
clearButtonTitle: 9,
|
|
862
|
+
filter: 34,
|
|
850
863
|
searchValue: 0,
|
|
851
864
|
reverseActive: 1,
|
|
852
|
-
showPlaceType:
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
865
|
+
showPlaceType: 10,
|
|
866
|
+
showFullGeometry: 35,
|
|
867
|
+
focus: 36,
|
|
868
|
+
blur: 37,
|
|
869
|
+
setQuery: 38
|
|
856
870
|
},
|
|
857
871
|
null,
|
|
858
|
-
[-1, -1]
|
|
872
|
+
[-1, -1, -1]
|
|
859
873
|
);
|
|
860
874
|
}
|
|
861
875
|
get focus() {
|
|
862
|
-
return this.$$.ctx[
|
|
876
|
+
return this.$$.ctx[36];
|
|
863
877
|
}
|
|
864
878
|
get blur() {
|
|
865
|
-
return this.$$.ctx[
|
|
879
|
+
return this.$$.ctx[37];
|
|
866
880
|
}
|
|
867
881
|
get setQuery() {
|
|
868
|
-
return this.$$.ctx[
|
|
882
|
+
return this.$$.ctx[38];
|
|
869
883
|
}
|
|
870
884
|
}
|
|
871
|
-
function
|
|
885
|
+
function Qt(n, t, e) {
|
|
872
886
|
e === void 0 && (e = {});
|
|
873
887
|
var r = { type: "Feature" };
|
|
874
888
|
return (e.id === 0 || e.id) && (r.id = e.id), e.bbox && (r.bbox = e.bbox), r.properties = t || {}, r.geometry = n, r;
|
|
875
889
|
}
|
|
876
|
-
function
|
|
890
|
+
function Dt(n, t, e) {
|
|
877
891
|
e === void 0 && (e = {});
|
|
878
892
|
for (var r = 0, i = n; r < i.length; r++) {
|
|
879
893
|
var o = i[r];
|
|
@@ -887,15 +901,15 @@ function qt(n, t, e) {
|
|
|
887
901
|
type: "Polygon",
|
|
888
902
|
coordinates: n
|
|
889
903
|
};
|
|
890
|
-
return
|
|
904
|
+
return Qt(s, t, e);
|
|
891
905
|
}
|
|
892
|
-
function
|
|
906
|
+
function Ut(n, t, e) {
|
|
893
907
|
e === void 0 && (e = {});
|
|
894
908
|
var r = {
|
|
895
909
|
type: "MultiPolygon",
|
|
896
910
|
coordinates: n
|
|
897
911
|
};
|
|
898
|
-
return
|
|
912
|
+
return Qt(r, t, e);
|
|
899
913
|
}
|
|
900
914
|
/**
|
|
901
915
|
* splaytree v3.1.1
|
|
@@ -919,7 +933,7 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
|
919
933
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
920
934
|
and limitations under the License.
|
|
921
935
|
***************************************************************************** */
|
|
922
|
-
function
|
|
936
|
+
function Dr(n, t) {
|
|
923
937
|
var e = { label: 0, sent: function() {
|
|
924
938
|
if (o[0] & 1)
|
|
925
939
|
throw o[1];
|
|
@@ -984,17 +998,17 @@ function Gr(n, t) {
|
|
|
984
998
|
return { value: f[0] ? f[1] : void 0, done: !0 };
|
|
985
999
|
}
|
|
986
1000
|
}
|
|
987
|
-
var
|
|
1001
|
+
var ae = function() {
|
|
988
1002
|
function n(t, e) {
|
|
989
1003
|
this.next = null, this.key = t, this.data = e, this.left = null, this.right = null;
|
|
990
1004
|
}
|
|
991
1005
|
return n;
|
|
992
1006
|
}();
|
|
993
|
-
function
|
|
1007
|
+
function Ur(n, t) {
|
|
994
1008
|
return n > t ? 1 : n < t ? -1 : 0;
|
|
995
1009
|
}
|
|
996
|
-
function
|
|
997
|
-
for (var r = new
|
|
1010
|
+
function se(n, t, e) {
|
|
1011
|
+
for (var r = new ae(null, null), i = r, o = r; ; ) {
|
|
998
1012
|
var l = e(n, t.key);
|
|
999
1013
|
if (l < 0) {
|
|
1000
1014
|
if (t.left === null)
|
|
@@ -1019,25 +1033,25 @@ function le(n, t, e) {
|
|
|
1019
1033
|
}
|
|
1020
1034
|
return i.right = t.left, o.left = t.right, t.left = r.right, t.right = r.left, t;
|
|
1021
1035
|
}
|
|
1022
|
-
function
|
|
1023
|
-
var i = new
|
|
1036
|
+
function He(n, t, e, r) {
|
|
1037
|
+
var i = new ae(n, t);
|
|
1024
1038
|
if (e === null)
|
|
1025
1039
|
return i.left = i.right = null, i;
|
|
1026
|
-
e =
|
|
1040
|
+
e = se(n, e, r);
|
|
1027
1041
|
var o = r(n, e.key);
|
|
1028
1042
|
return o < 0 ? (i.left = e.left, i.right = e, e.left = null) : o >= 0 && (i.right = e.right, i.left = e, e.right = null), i;
|
|
1029
1043
|
}
|
|
1030
|
-
function
|
|
1044
|
+
function wt(n, t, e) {
|
|
1031
1045
|
var r = null, i = null;
|
|
1032
1046
|
if (t) {
|
|
1033
|
-
t =
|
|
1047
|
+
t = se(n, t, e);
|
|
1034
1048
|
var o = e(t.key, n);
|
|
1035
1049
|
o === 0 ? (r = t.left, i = t.right) : o < 0 ? (i = t.right, t.right = null, r = t) : (r = t.left, t.left = null, i = t);
|
|
1036
1050
|
}
|
|
1037
1051
|
return { left: r, right: i };
|
|
1038
1052
|
}
|
|
1039
|
-
function
|
|
1040
|
-
return t === null ? n : (n === null || (t =
|
|
1053
|
+
function Vr(n, t, e) {
|
|
1054
|
+
return t === null ? n : (n === null || (t = se(n.key, t, e), t.left = n), t);
|
|
1041
1055
|
}
|
|
1042
1056
|
function et(n, t, e, r, i) {
|
|
1043
1057
|
if (n) {
|
|
@@ -1049,14 +1063,14 @@ function et(n, t, e, r, i) {
|
|
|
1049
1063
|
}
|
|
1050
1064
|
var lt = function() {
|
|
1051
1065
|
function n(t) {
|
|
1052
|
-
t === void 0 && (t =
|
|
1066
|
+
t === void 0 && (t = Ur), this._root = null, this._size = 0, this._comparator = t;
|
|
1053
1067
|
}
|
|
1054
1068
|
return n.prototype.insert = function(t, e) {
|
|
1055
|
-
return this._size++, this._root =
|
|
1069
|
+
return this._size++, this._root = He(t, e, this._root, this._comparator);
|
|
1056
1070
|
}, n.prototype.add = function(t, e) {
|
|
1057
|
-
var r = new
|
|
1071
|
+
var r = new ae(t, e);
|
|
1058
1072
|
this._root === null && (r.left = r.right = null, this._size++, this._root = r);
|
|
1059
|
-
var i = this._comparator, o =
|
|
1073
|
+
var i = this._comparator, o = se(t, this._root, i), l = i(t, o.key);
|
|
1060
1074
|
return l === 0 ? this._root = o : (l < 0 ? (r.left = o.left, r.right = o, o.left = null) : l > 0 && (r.right = o.right, r.left = o, o.right = null), this._size++, this._root = r), this._root;
|
|
1061
1075
|
}, n.prototype.remove = function(t) {
|
|
1062
1076
|
this._root = this._remove(t, this._root, this._comparator);
|
|
@@ -1064,15 +1078,15 @@ var lt = function() {
|
|
|
1064
1078
|
var i;
|
|
1065
1079
|
if (e === null)
|
|
1066
1080
|
return null;
|
|
1067
|
-
e =
|
|
1081
|
+
e = se(t, e, r);
|
|
1068
1082
|
var o = r(t, e.key);
|
|
1069
|
-
return o === 0 ? (e.left === null ? i = e.right : (i =
|
|
1083
|
+
return o === 0 ? (e.left === null ? i = e.right : (i = se(t, e.left, r), i.right = e.right), this._size--, i) : e;
|
|
1070
1084
|
}, n.prototype.pop = function() {
|
|
1071
1085
|
var t = this._root;
|
|
1072
1086
|
if (t) {
|
|
1073
1087
|
for (; t.left; )
|
|
1074
1088
|
t = t.left;
|
|
1075
|
-
return this._root =
|
|
1089
|
+
return this._root = se(t.key, this._root, this._comparator), this._root = this._remove(t.key, this._root, this._comparator), { key: t.key, data: t.data };
|
|
1076
1090
|
}
|
|
1077
1091
|
return null;
|
|
1078
1092
|
}, n.prototype.findStatic = function(t) {
|
|
@@ -1084,7 +1098,7 @@ var lt = function() {
|
|
|
1084
1098
|
}
|
|
1085
1099
|
return null;
|
|
1086
1100
|
}, n.prototype.find = function(t) {
|
|
1087
|
-
return this._root && (this._root =
|
|
1101
|
+
return this._root && (this._root = se(t, this._root, this._comparator), this._comparator(t, this._root.key) !== 0) ? null : this._root;
|
|
1088
1102
|
}, n.prototype.contains = function(t) {
|
|
1089
1103
|
for (var e = this._root, r = this._comparator; e; ) {
|
|
1090
1104
|
var i = r(t, e.key);
|
|
@@ -1177,14 +1191,14 @@ var lt = function() {
|
|
|
1177
1191
|
}, n.prototype.clear = function() {
|
|
1178
1192
|
return this._root = null, this._size = 0, this;
|
|
1179
1193
|
}, n.prototype.toList = function() {
|
|
1180
|
-
return
|
|
1194
|
+
return Zr(this._root);
|
|
1181
1195
|
}, n.prototype.load = function(t, e, r) {
|
|
1182
1196
|
e === void 0 && (e = []), r === void 0 && (r = !1);
|
|
1183
1197
|
var i = t.length, o = this._comparator;
|
|
1184
1198
|
if (r && nt(t, e, 0, i - 1, o), this._root === null)
|
|
1185
1199
|
this._root = tt(t, e, 0, i), this._size = i;
|
|
1186
1200
|
else {
|
|
1187
|
-
var l =
|
|
1201
|
+
var l = Xr(this.toList(), Yr(t, e), o);
|
|
1188
1202
|
i = this._size + i, this._root = rt({ head: l }, 0, i);
|
|
1189
1203
|
}
|
|
1190
1204
|
return this;
|
|
@@ -1211,13 +1225,13 @@ var lt = function() {
|
|
|
1211
1225
|
return e.push(r);
|
|
1212
1226
|
}, t), e.join("");
|
|
1213
1227
|
}, n.prototype.update = function(t, e, r) {
|
|
1214
|
-
var i = this._comparator, o =
|
|
1215
|
-
i(t, e) < 0 ? s =
|
|
1228
|
+
var i = this._comparator, o = wt(t, this._root, i), l = o.left, s = o.right;
|
|
1229
|
+
i(t, e) < 0 ? s = He(e, r, s, i) : l = He(e, r, l, i), this._root = Vr(l, s, i);
|
|
1216
1230
|
}, n.prototype.split = function(t) {
|
|
1217
|
-
return
|
|
1231
|
+
return wt(t, this._root, this._comparator);
|
|
1218
1232
|
}, n.prototype[Symbol.iterator] = function() {
|
|
1219
1233
|
var t;
|
|
1220
|
-
return
|
|
1234
|
+
return Dr(this, function(e) {
|
|
1221
1235
|
switch (e.label) {
|
|
1222
1236
|
case 0:
|
|
1223
1237
|
t = this.minNode(), e.label = 1;
|
|
@@ -1234,18 +1248,18 @@ var lt = function() {
|
|
|
1234
1248
|
function tt(n, t, e, r) {
|
|
1235
1249
|
var i = r - e;
|
|
1236
1250
|
if (i > 0) {
|
|
1237
|
-
var o = e + Math.floor(i / 2), l = n[o], s = t[o], u = new
|
|
1251
|
+
var o = e + Math.floor(i / 2), l = n[o], s = t[o], u = new ae(l, s);
|
|
1238
1252
|
return u.left = tt(n, t, e, o), u.right = tt(n, t, o + 1, r), u;
|
|
1239
1253
|
}
|
|
1240
1254
|
return null;
|
|
1241
1255
|
}
|
|
1242
|
-
function
|
|
1243
|
-
for (var e = new
|
|
1244
|
-
r = r.next = new
|
|
1256
|
+
function Yr(n, t) {
|
|
1257
|
+
for (var e = new ae(null, null), r = e, i = 0; i < n.length; i++)
|
|
1258
|
+
r = r.next = new ae(n[i], t[i]);
|
|
1245
1259
|
return r.next = null, e.next;
|
|
1246
1260
|
}
|
|
1247
|
-
function
|
|
1248
|
-
for (var t = n, e = [], r = !1, i = new
|
|
1261
|
+
function Zr(n) {
|
|
1262
|
+
for (var t = n, e = [], r = !1, i = new ae(null, null), o = i; !r; )
|
|
1249
1263
|
t ? (e.push(t), t = t.left) : e.length > 0 ? (t = o = o.next = e.pop(), t = t.right) : r = !0;
|
|
1250
1264
|
return o.next = null, i.next;
|
|
1251
1265
|
}
|
|
@@ -1257,8 +1271,8 @@ function rt(n, t, e) {
|
|
|
1257
1271
|
}
|
|
1258
1272
|
return null;
|
|
1259
1273
|
}
|
|
1260
|
-
function
|
|
1261
|
-
for (var r = new
|
|
1274
|
+
function Xr(n, t, e) {
|
|
1275
|
+
for (var r = new ae(null, null), i = r, o = n, l = t; o !== null && l !== null; )
|
|
1262
1276
|
e(o.key, l.key) < 0 ? (i.next = o, o = o.next) : (i.next = l, l = l.next), i = i.next;
|
|
1263
1277
|
return o !== null ? i.next = o : l !== null && (i.next = l), r.next;
|
|
1264
1278
|
}
|
|
@@ -1279,20 +1293,20 @@ function nt(n, t, e, r, i) {
|
|
|
1279
1293
|
nt(n, t, e, s, i), nt(n, t, s + 1, r, i);
|
|
1280
1294
|
}
|
|
1281
1295
|
}
|
|
1282
|
-
function
|
|
1296
|
+
function W(n, t) {
|
|
1283
1297
|
if (!(n instanceof t))
|
|
1284
1298
|
throw new TypeError("Cannot call a class as a function");
|
|
1285
1299
|
}
|
|
1286
|
-
function
|
|
1300
|
+
function Et(n, t) {
|
|
1287
1301
|
for (var e = 0; e < t.length; e++) {
|
|
1288
1302
|
var r = t[e];
|
|
1289
1303
|
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(n, r.key, r);
|
|
1290
1304
|
}
|
|
1291
1305
|
}
|
|
1292
1306
|
function D(n, t, e) {
|
|
1293
|
-
return t &&
|
|
1307
|
+
return t && Et(n.prototype, t), e && Et(n, e), n;
|
|
1294
1308
|
}
|
|
1295
|
-
var
|
|
1309
|
+
var Pe = function(t, e) {
|
|
1296
1310
|
return t.ll.x <= e.x && e.x <= t.ur.x && t.ll.y <= e.y && e.y <= t.ur.y;
|
|
1297
1311
|
}, it = function(t, e) {
|
|
1298
1312
|
if (e.ur.x < t.ll.x || t.ur.x < e.ll.x || e.ur.y < t.ll.y || t.ur.y < e.ll.y)
|
|
@@ -1308,21 +1322,21 @@ var ke = function(t, e) {
|
|
|
1308
1322
|
y: l
|
|
1309
1323
|
}
|
|
1310
1324
|
};
|
|
1311
|
-
},
|
|
1312
|
-
|
|
1313
|
-
var
|
|
1314
|
-
if (-
|
|
1325
|
+
}, ue = Number.EPSILON;
|
|
1326
|
+
ue === void 0 && (ue = Math.pow(2, -52));
|
|
1327
|
+
var Wr = ue * ue, ot = function(t, e) {
|
|
1328
|
+
if (-ue < t && t < ue && -ue < e && e < ue)
|
|
1315
1329
|
return 0;
|
|
1316
1330
|
var r = t - e;
|
|
1317
|
-
return r * r <
|
|
1318
|
-
},
|
|
1331
|
+
return r * r < Wr * t * e ? 0 : t < e ? -1 : 1;
|
|
1332
|
+
}, jr = /* @__PURE__ */ function() {
|
|
1319
1333
|
function n() {
|
|
1320
|
-
|
|
1334
|
+
W(this, n), this.reset();
|
|
1321
1335
|
}
|
|
1322
1336
|
return D(n, [{
|
|
1323
1337
|
key: "reset",
|
|
1324
1338
|
value: function() {
|
|
1325
|
-
this.xRounder = new
|
|
1339
|
+
this.xRounder = new St(), this.yRounder = new St();
|
|
1326
1340
|
}
|
|
1327
1341
|
}, {
|
|
1328
1342
|
key: "round",
|
|
@@ -1333,9 +1347,9 @@ var Vr = se * se, ot = function(t, e) {
|
|
|
1333
1347
|
};
|
|
1334
1348
|
}
|
|
1335
1349
|
}]), n;
|
|
1336
|
-
}(),
|
|
1350
|
+
}(), St = /* @__PURE__ */ function() {
|
|
1337
1351
|
function n() {
|
|
1338
|
-
|
|
1352
|
+
W(this, n), this.tree = new lt(), this.round(0);
|
|
1339
1353
|
}
|
|
1340
1354
|
return D(n, [{
|
|
1341
1355
|
key: "round",
|
|
@@ -1347,22 +1361,22 @@ var Vr = se * se, ot = function(t, e) {
|
|
|
1347
1361
|
return o !== null && ot(r.key, o.key) === 0 ? (this.tree.remove(e), o.key) : e;
|
|
1348
1362
|
}
|
|
1349
1363
|
}]), n;
|
|
1350
|
-
}(), ze = new
|
|
1364
|
+
}(), ze = new jr(), Le = function(t, e) {
|
|
1351
1365
|
return t.x * e.y - t.y * e.x;
|
|
1352
|
-
},
|
|
1366
|
+
}, Vt = function(t, e) {
|
|
1353
1367
|
return t.x * e.x + t.y * e.y;
|
|
1354
|
-
},
|
|
1368
|
+
}, kt = function(t, e, r) {
|
|
1355
1369
|
var i = {
|
|
1356
1370
|
x: e.x - t.x,
|
|
1357
1371
|
y: e.y - t.y
|
|
1358
1372
|
}, o = {
|
|
1359
1373
|
x: r.x - t.x,
|
|
1360
1374
|
y: r.y - t.y
|
|
1361
|
-
}, l =
|
|
1375
|
+
}, l = Le(i, o);
|
|
1362
1376
|
return ot(l, 0);
|
|
1363
|
-
},
|
|
1364
|
-
return Math.sqrt(
|
|
1365
|
-
},
|
|
1377
|
+
}, De = function(t) {
|
|
1378
|
+
return Math.sqrt(Vt(t, t));
|
|
1379
|
+
}, Hr = function(t, e, r) {
|
|
1366
1380
|
var i = {
|
|
1367
1381
|
x: e.x - t.x,
|
|
1368
1382
|
y: e.y - t.y
|
|
@@ -1370,8 +1384,8 @@ var Vr = se * se, ot = function(t, e) {
|
|
|
1370
1384
|
x: r.x - t.x,
|
|
1371
1385
|
y: r.y - t.y
|
|
1372
1386
|
};
|
|
1373
|
-
return
|
|
1374
|
-
},
|
|
1387
|
+
return Le(o, i) / De(o) / De(i);
|
|
1388
|
+
}, Kr = function(t, e, r) {
|
|
1375
1389
|
var i = {
|
|
1376
1390
|
x: e.x - t.x,
|
|
1377
1391
|
y: e.y - t.y
|
|
@@ -1379,38 +1393,38 @@ var Vr = se * se, ot = function(t, e) {
|
|
|
1379
1393
|
x: r.x - t.x,
|
|
1380
1394
|
y: r.y - t.y
|
|
1381
1395
|
};
|
|
1382
|
-
return
|
|
1383
|
-
},
|
|
1396
|
+
return Vt(o, i) / De(o) / De(i);
|
|
1397
|
+
}, Pt = function(t, e, r) {
|
|
1384
1398
|
return e.y === 0 ? null : {
|
|
1385
1399
|
x: t.x + e.x / e.y * (r - t.y),
|
|
1386
1400
|
y: r
|
|
1387
1401
|
};
|
|
1388
|
-
},
|
|
1402
|
+
}, Rt = function(t, e, r) {
|
|
1389
1403
|
return e.x === 0 ? null : {
|
|
1390
1404
|
x: r,
|
|
1391
1405
|
y: t.y + e.y / e.x * (r - t.x)
|
|
1392
1406
|
};
|
|
1393
|
-
},
|
|
1407
|
+
}, Jr = function(t, e, r, i) {
|
|
1394
1408
|
if (e.x === 0)
|
|
1395
|
-
return
|
|
1409
|
+
return Rt(r, i, t.x);
|
|
1396
1410
|
if (i.x === 0)
|
|
1397
|
-
return
|
|
1411
|
+
return Rt(t, e, r.x);
|
|
1398
1412
|
if (e.y === 0)
|
|
1399
|
-
return
|
|
1413
|
+
return Pt(r, i, t.y);
|
|
1400
1414
|
if (i.y === 0)
|
|
1401
|
-
return
|
|
1402
|
-
var o =
|
|
1415
|
+
return Pt(t, e, r.y);
|
|
1416
|
+
var o = Le(e, i);
|
|
1403
1417
|
if (o == 0)
|
|
1404
1418
|
return null;
|
|
1405
1419
|
var l = {
|
|
1406
1420
|
x: r.x - t.x,
|
|
1407
1421
|
y: r.y - t.y
|
|
1408
|
-
}, s =
|
|
1422
|
+
}, s = Le(l, e) / o, u = Le(l, i) / o, f = t.x + u * e.x, a = r.x + s * i.x, g = t.y + u * e.y, m = r.y + s * i.y, v = (f + a) / 2, b = (g + m) / 2;
|
|
1409
1423
|
return {
|
|
1410
|
-
x:
|
|
1411
|
-
y:
|
|
1424
|
+
x: v,
|
|
1425
|
+
y: b
|
|
1412
1426
|
};
|
|
1413
|
-
},
|
|
1427
|
+
}, $ = /* @__PURE__ */ function() {
|
|
1414
1428
|
D(n, null, [{
|
|
1415
1429
|
key: "compare",
|
|
1416
1430
|
value: function(e, r) {
|
|
@@ -1424,7 +1438,7 @@ var Vr = se * se, ot = function(t, e) {
|
|
|
1424
1438
|
}
|
|
1425
1439
|
}]);
|
|
1426
1440
|
function n(t, e) {
|
|
1427
|
-
|
|
1441
|
+
W(this, n), t.events === void 0 ? t.events = [this] : t.events.push(this), this.point = t, this.isLeft = e;
|
|
1428
1442
|
}
|
|
1429
1443
|
return D(n, [{
|
|
1430
1444
|
key: "link",
|
|
@@ -1464,18 +1478,18 @@ var Vr = se * se, ot = function(t, e) {
|
|
|
1464
1478
|
var r = this, i = /* @__PURE__ */ new Map(), o = function(s) {
|
|
1465
1479
|
var u = s.otherSE;
|
|
1466
1480
|
i.set(s, {
|
|
1467
|
-
sine:
|
|
1468
|
-
cosine:
|
|
1481
|
+
sine: Hr(r.point, e.point, u.point),
|
|
1482
|
+
cosine: Kr(r.point, e.point, u.point)
|
|
1469
1483
|
});
|
|
1470
1484
|
};
|
|
1471
1485
|
return function(l, s) {
|
|
1472
1486
|
i.has(l) || o(l), i.has(s) || o(s);
|
|
1473
|
-
var u = i.get(l), f = u.sine, a = u.cosine,
|
|
1474
|
-
return f >= 0 &&
|
|
1487
|
+
var u = i.get(l), f = u.sine, a = u.cosine, g = i.get(s), m = g.sine, v = g.cosine;
|
|
1488
|
+
return f >= 0 && m >= 0 ? a < v ? 1 : a > v ? -1 : 0 : f < 0 && m < 0 ? a < v ? -1 : a > v ? 1 : 0 : m < f ? -1 : m > f ? 1 : 0;
|
|
1475
1489
|
};
|
|
1476
1490
|
}
|
|
1477
1491
|
}]), n;
|
|
1478
|
-
}(),
|
|
1492
|
+
}(), $r = 0, Ue = /* @__PURE__ */ function() {
|
|
1479
1493
|
D(n, null, [{
|
|
1480
1494
|
key: "compare",
|
|
1481
1495
|
value: function(e, r) {
|
|
@@ -1484,59 +1498,59 @@ var Vr = se * se, ot = function(t, e) {
|
|
|
1484
1498
|
return 1;
|
|
1485
1499
|
if (l < o)
|
|
1486
1500
|
return -1;
|
|
1487
|
-
var u = e.leftSE.point.y, f = r.leftSE.point.y, a = e.rightSE.point.y,
|
|
1501
|
+
var u = e.leftSE.point.y, f = r.leftSE.point.y, a = e.rightSE.point.y, g = r.rightSE.point.y;
|
|
1488
1502
|
if (i < o) {
|
|
1489
1503
|
if (f < u && f < a)
|
|
1490
1504
|
return 1;
|
|
1491
1505
|
if (f > u && f > a)
|
|
1492
1506
|
return -1;
|
|
1493
|
-
var
|
|
1494
|
-
if (
|
|
1507
|
+
var m = e.comparePoint(r.leftSE.point);
|
|
1508
|
+
if (m < 0)
|
|
1495
1509
|
return 1;
|
|
1496
|
-
if (
|
|
1510
|
+
if (m > 0)
|
|
1497
1511
|
return -1;
|
|
1498
|
-
var
|
|
1499
|
-
return
|
|
1512
|
+
var v = r.comparePoint(e.rightSE.point);
|
|
1513
|
+
return v !== 0 ? v : -1;
|
|
1500
1514
|
}
|
|
1501
1515
|
if (i > o) {
|
|
1502
|
-
if (u < f && u <
|
|
1516
|
+
if (u < f && u < g)
|
|
1503
1517
|
return -1;
|
|
1504
|
-
if (u > f && u >
|
|
1518
|
+
if (u > f && u > g)
|
|
1505
1519
|
return 1;
|
|
1506
|
-
var
|
|
1507
|
-
if (
|
|
1508
|
-
return
|
|
1509
|
-
var
|
|
1510
|
-
return
|
|
1520
|
+
var b = r.comparePoint(e.leftSE.point);
|
|
1521
|
+
if (b !== 0)
|
|
1522
|
+
return b;
|
|
1523
|
+
var p = e.comparePoint(r.rightSE.point);
|
|
1524
|
+
return p < 0 ? 1 : p > 0 ? -1 : 1;
|
|
1511
1525
|
}
|
|
1512
1526
|
if (u < f)
|
|
1513
1527
|
return -1;
|
|
1514
1528
|
if (u > f)
|
|
1515
1529
|
return 1;
|
|
1516
1530
|
if (l < s) {
|
|
1517
|
-
var
|
|
1518
|
-
if (
|
|
1519
|
-
return
|
|
1531
|
+
var h = r.comparePoint(e.rightSE.point);
|
|
1532
|
+
if (h !== 0)
|
|
1533
|
+
return h;
|
|
1520
1534
|
}
|
|
1521
1535
|
if (l > s) {
|
|
1522
|
-
var
|
|
1523
|
-
if (
|
|
1536
|
+
var d = e.comparePoint(r.rightSE.point);
|
|
1537
|
+
if (d < 0)
|
|
1524
1538
|
return 1;
|
|
1525
|
-
if (
|
|
1539
|
+
if (d > 0)
|
|
1526
1540
|
return -1;
|
|
1527
1541
|
}
|
|
1528
1542
|
if (l !== s) {
|
|
1529
|
-
var
|
|
1530
|
-
if (
|
|
1543
|
+
var w = a - u, I = l - i, _ = g - f, S = s - o;
|
|
1544
|
+
if (w > I && _ < S)
|
|
1531
1545
|
return 1;
|
|
1532
|
-
if (
|
|
1546
|
+
if (w < I && _ > S)
|
|
1533
1547
|
return -1;
|
|
1534
1548
|
}
|
|
1535
|
-
return l > s ? 1 : l < s || a <
|
|
1549
|
+
return l > s ? 1 : l < s || a < g ? -1 : a > g ? 1 : e.id < r.id ? -1 : e.id > r.id ? 1 : 0;
|
|
1536
1550
|
}
|
|
1537
1551
|
}]);
|
|
1538
1552
|
function n(t, e, r, i) {
|
|
1539
|
-
|
|
1553
|
+
W(this, n), this.id = ++$r, this.leftSE = t, t.segment = this, t.otherSE = e, this.rightSE = e, e.segment = this, e.otherSE = t, this.rings = r, this.windings = i;
|
|
1540
1554
|
}
|
|
1541
1555
|
return D(n, [{
|
|
1542
1556
|
key: "replaceRightSE",
|
|
@@ -1591,29 +1605,29 @@ var Vr = se * se, ot = function(t, e) {
|
|
|
1591
1605
|
var r = this.bbox(), i = e.bbox(), o = it(r, i);
|
|
1592
1606
|
if (o === null)
|
|
1593
1607
|
return null;
|
|
1594
|
-
var l = this.leftSE.point, s = this.rightSE.point, u = e.leftSE.point, f = e.rightSE.point, a =
|
|
1595
|
-
if (
|
|
1596
|
-
return
|
|
1597
|
-
if (
|
|
1598
|
-
return
|
|
1608
|
+
var l = this.leftSE.point, s = this.rightSE.point, u = e.leftSE.point, f = e.rightSE.point, a = Pe(r, u) && this.comparePoint(u) === 0, g = Pe(i, l) && e.comparePoint(l) === 0, m = Pe(r, f) && this.comparePoint(f) === 0, v = Pe(i, s) && e.comparePoint(s) === 0;
|
|
1609
|
+
if (g && a)
|
|
1610
|
+
return v && !m ? s : !v && m ? f : null;
|
|
1611
|
+
if (g)
|
|
1612
|
+
return m && l.x === f.x && l.y === f.y ? null : l;
|
|
1599
1613
|
if (a)
|
|
1600
|
-
return
|
|
1601
|
-
if (
|
|
1614
|
+
return v && s.x === u.x && s.y === u.y ? null : u;
|
|
1615
|
+
if (v && m)
|
|
1602
1616
|
return null;
|
|
1603
|
-
if (
|
|
1617
|
+
if (v)
|
|
1604
1618
|
return s;
|
|
1605
|
-
if (
|
|
1619
|
+
if (m)
|
|
1606
1620
|
return f;
|
|
1607
|
-
var
|
|
1608
|
-
return
|
|
1621
|
+
var b = Jr(l, this.vector(), u, e.vector());
|
|
1622
|
+
return b === null || !Pe(o, b) ? null : ze.round(b.x, b.y);
|
|
1609
1623
|
}
|
|
1610
1624
|
}, {
|
|
1611
1625
|
key: "split",
|
|
1612
1626
|
value: function(e) {
|
|
1613
|
-
var r = [], i = e.events !== void 0, o = new
|
|
1627
|
+
var r = [], i = e.events !== void 0, o = new $(e, !0), l = new $(e, !1), s = this.rightSE;
|
|
1614
1628
|
this.replaceRightSE(l), r.push(l), r.push(o);
|
|
1615
1629
|
var u = new n(o, s, this.rings.slice(), this.windings.slice());
|
|
1616
|
-
return
|
|
1630
|
+
return $.comparePoints(u.leftSE.point, u.rightSE.point) > 0 && u.swapEvents(), $.comparePoints(this.leftSE.point, this.rightSE.point) > 0 && this.swapEvents(), i && (o.checkForConsuming(), l.checkForConsuming()), r;
|
|
1617
1631
|
}
|
|
1618
1632
|
}, {
|
|
1619
1633
|
key: "swapEvents",
|
|
@@ -1641,8 +1655,8 @@ var Vr = se * se, ot = function(t, e) {
|
|
|
1641
1655
|
r = i, i = s;
|
|
1642
1656
|
}
|
|
1643
1657
|
for (var u = 0, f = i.rings.length; u < f; u++) {
|
|
1644
|
-
var a = i.rings[u],
|
|
1645
|
-
|
|
1658
|
+
var a = i.rings[u], g = i.windings[u], m = r.rings.indexOf(a);
|
|
1659
|
+
m === -1 ? (r.rings.push(a), r.windings.push(g)) : r.windings[m] += g;
|
|
1646
1660
|
}
|
|
1647
1661
|
i.rings = null, i.windings = null, i.consumedBy = r, i.leftSE.consumedBy = r.leftSE, i.rightSE.consumedBy = r.rightSE;
|
|
1648
1662
|
}
|
|
@@ -1684,21 +1698,21 @@ var Vr = se * se, ot = function(t, e) {
|
|
|
1684
1698
|
var u = this.rings[l], f = this.windings[l], a = r.indexOf(u);
|
|
1685
1699
|
a === -1 ? (r.push(u), i.push(f)) : i[a] += f;
|
|
1686
1700
|
}
|
|
1687
|
-
for (var
|
|
1688
|
-
if (i[
|
|
1689
|
-
var
|
|
1690
|
-
if (
|
|
1691
|
-
if (
|
|
1692
|
-
|
|
1701
|
+
for (var g = [], m = [], v = 0, b = r.length; v < b; v++)
|
|
1702
|
+
if (i[v] !== 0) {
|
|
1703
|
+
var p = r[v], h = p.poly;
|
|
1704
|
+
if (m.indexOf(h) === -1)
|
|
1705
|
+
if (p.isExterior)
|
|
1706
|
+
g.push(h);
|
|
1693
1707
|
else {
|
|
1694
|
-
|
|
1695
|
-
var
|
|
1696
|
-
|
|
1708
|
+
m.indexOf(h) === -1 && m.push(h);
|
|
1709
|
+
var d = g.indexOf(p.poly);
|
|
1710
|
+
d !== -1 && g.splice(d, 1);
|
|
1697
1711
|
}
|
|
1698
1712
|
}
|
|
1699
|
-
for (var
|
|
1700
|
-
var
|
|
1701
|
-
o.indexOf(
|
|
1713
|
+
for (var w = 0, I = g.length; w < I; w++) {
|
|
1714
|
+
var _ = g[w].multiPoly;
|
|
1715
|
+
o.indexOf(_) === -1 && o.push(_);
|
|
1702
1716
|
}
|
|
1703
1717
|
return this._afterState;
|
|
1704
1718
|
}
|
|
@@ -1710,7 +1724,7 @@ var Vr = se * se, ot = function(t, e) {
|
|
|
1710
1724
|
if (this._isInResult !== void 0)
|
|
1711
1725
|
return this._isInResult;
|
|
1712
1726
|
var e = this.beforeState().multiPolys, r = this.afterState().multiPolys;
|
|
1713
|
-
switch (
|
|
1727
|
+
switch (H.type) {
|
|
1714
1728
|
case "union": {
|
|
1715
1729
|
var i = e.length === 0, o = r.length === 0;
|
|
1716
1730
|
this._isInResult = i !== o;
|
|
@@ -1718,7 +1732,7 @@ var Vr = se * se, ot = function(t, e) {
|
|
|
1718
1732
|
}
|
|
1719
1733
|
case "intersection": {
|
|
1720
1734
|
var l, s;
|
|
1721
|
-
e.length < r.length ? (l = e.length, s = r.length) : (l = r.length, s = e.length), this._isInResult = s ===
|
|
1735
|
+
e.length < r.length ? (l = e.length, s = r.length) : (l = r.length, s = e.length), this._isInResult = s === H.numMultiPolys && l < s;
|
|
1722
1736
|
break;
|
|
1723
1737
|
}
|
|
1724
1738
|
case "xor": {
|
|
@@ -1727,34 +1741,34 @@ var Vr = se * se, ot = function(t, e) {
|
|
|
1727
1741
|
break;
|
|
1728
1742
|
}
|
|
1729
1743
|
case "difference": {
|
|
1730
|
-
var f = function(
|
|
1731
|
-
return
|
|
1744
|
+
var f = function(g) {
|
|
1745
|
+
return g.length === 1 && g[0].isSubject;
|
|
1732
1746
|
};
|
|
1733
1747
|
this._isInResult = f(e) !== f(r);
|
|
1734
1748
|
break;
|
|
1735
1749
|
}
|
|
1736
1750
|
default:
|
|
1737
|
-
throw new Error("Unrecognized operation type found ".concat(
|
|
1751
|
+
throw new Error("Unrecognized operation type found ".concat(H.type));
|
|
1738
1752
|
}
|
|
1739
1753
|
return this._isInResult;
|
|
1740
1754
|
}
|
|
1741
1755
|
}], [{
|
|
1742
1756
|
key: "fromRing",
|
|
1743
1757
|
value: function(e, r, i) {
|
|
1744
|
-
var o, l, s, u =
|
|
1758
|
+
var o, l, s, u = $.comparePoints(e, r);
|
|
1745
1759
|
if (u < 0)
|
|
1746
1760
|
o = e, l = r, s = 1;
|
|
1747
1761
|
else if (u > 0)
|
|
1748
1762
|
o = r, l = e, s = -1;
|
|
1749
1763
|
else
|
|
1750
1764
|
throw new Error("Tried to create degenerate segment at [".concat(e.x, ", ").concat(e.y, "]"));
|
|
1751
|
-
var f = new
|
|
1765
|
+
var f = new $(o, !0), a = new $(l, !1);
|
|
1752
1766
|
return new n(f, a, [i], [s]);
|
|
1753
1767
|
}
|
|
1754
1768
|
}]), n;
|
|
1755
|
-
}(),
|
|
1769
|
+
}(), It = /* @__PURE__ */ function() {
|
|
1756
1770
|
function n(t, e, r) {
|
|
1757
|
-
if (
|
|
1771
|
+
if (W(this, n), !Array.isArray(t) || t.length === 0)
|
|
1758
1772
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
1759
1773
|
if (this.poly = e, this.isExterior = r, this.segments = [], typeof t[0][0] != "number" || typeof t[0][1] != "number")
|
|
1760
1774
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
@@ -1787,11 +1801,11 @@ var Vr = se * se, ot = function(t, e) {
|
|
|
1787
1801
|
return e;
|
|
1788
1802
|
}
|
|
1789
1803
|
}]), n;
|
|
1790
|
-
}(),
|
|
1804
|
+
}(), en = /* @__PURE__ */ function() {
|
|
1791
1805
|
function n(t, e) {
|
|
1792
|
-
if (
|
|
1806
|
+
if (W(this, n), !Array.isArray(t))
|
|
1793
1807
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
1794
|
-
this.exteriorRing = new
|
|
1808
|
+
this.exteriorRing = new It(t[0], this, !0), this.bbox = {
|
|
1795
1809
|
ll: {
|
|
1796
1810
|
x: this.exteriorRing.bbox.ll.x,
|
|
1797
1811
|
y: this.exteriorRing.bbox.ll.y
|
|
@@ -1802,7 +1816,7 @@ var Vr = se * se, ot = function(t, e) {
|
|
|
1802
1816
|
}
|
|
1803
1817
|
}, this.interiorRings = [];
|
|
1804
1818
|
for (var r = 1, i = t.length; r < i; r++) {
|
|
1805
|
-
var o = new
|
|
1819
|
+
var o = new It(t[r], this, !1);
|
|
1806
1820
|
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);
|
|
1807
1821
|
}
|
|
1808
1822
|
this.multiPoly = e;
|
|
@@ -1816,9 +1830,9 @@ var Vr = se * se, ot = function(t, e) {
|
|
|
1816
1830
|
return e;
|
|
1817
1831
|
}
|
|
1818
1832
|
}]), n;
|
|
1819
|
-
}(),
|
|
1833
|
+
}(), Lt = /* @__PURE__ */ function() {
|
|
1820
1834
|
function n(t, e) {
|
|
1821
|
-
if (
|
|
1835
|
+
if (W(this, n), !Array.isArray(t))
|
|
1822
1836
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
1823
1837
|
try {
|
|
1824
1838
|
typeof t[0][0][0] == "number" && (t = [t]);
|
|
@@ -1835,7 +1849,7 @@ var Vr = se * se, ot = function(t, e) {
|
|
|
1835
1849
|
}
|
|
1836
1850
|
};
|
|
1837
1851
|
for (var r = 0, i = t.length; r < i; r++) {
|
|
1838
|
-
var o = new
|
|
1852
|
+
var o = new en(t[r], this);
|
|
1839
1853
|
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);
|
|
1840
1854
|
}
|
|
1841
1855
|
this.isSubject = e;
|
|
@@ -1849,40 +1863,40 @@ var Vr = se * se, ot = function(t, e) {
|
|
|
1849
1863
|
return e;
|
|
1850
1864
|
}
|
|
1851
1865
|
}]), n;
|
|
1852
|
-
}(),
|
|
1866
|
+
}(), tn = /* @__PURE__ */ function() {
|
|
1853
1867
|
D(n, null, [{
|
|
1854
1868
|
key: "factory",
|
|
1855
1869
|
value: function(e) {
|
|
1856
1870
|
for (var r = [], i = 0, o = e.length; i < o; i++) {
|
|
1857
1871
|
var l = e[i];
|
|
1858
1872
|
if (!(!l.isInResult() || l.ringOut)) {
|
|
1859
|
-
for (var s = null, u = l.leftSE, f = l.rightSE, a = [u],
|
|
1873
|
+
for (var s = null, u = l.leftSE, f = l.rightSE, a = [u], g = u.point, m = []; s = u, u = f, a.push(u), u.point !== g; )
|
|
1860
1874
|
for (; ; ) {
|
|
1861
|
-
var
|
|
1862
|
-
if (
|
|
1863
|
-
var
|
|
1864
|
-
throw new Error("Unable to complete output ring starting at [".concat(
|
|
1875
|
+
var v = u.getAvailableLinkedEvents();
|
|
1876
|
+
if (v.length === 0) {
|
|
1877
|
+
var b = a[0].point, p = a[a.length - 1].point;
|
|
1878
|
+
throw new Error("Unable to complete output ring starting at [".concat(b.x, ",") + " ".concat(b.y, "]. Last matching segment found ends at") + " [".concat(p.x, ", ").concat(p.y, "]."));
|
|
1865
1879
|
}
|
|
1866
|
-
if (
|
|
1867
|
-
f =
|
|
1880
|
+
if (v.length === 1) {
|
|
1881
|
+
f = v[0].otherSE;
|
|
1868
1882
|
break;
|
|
1869
1883
|
}
|
|
1870
|
-
for (var
|
|
1871
|
-
if (
|
|
1872
|
-
|
|
1884
|
+
for (var h = null, d = 0, w = m.length; d < w; d++)
|
|
1885
|
+
if (m[d].point === u.point) {
|
|
1886
|
+
h = d;
|
|
1873
1887
|
break;
|
|
1874
1888
|
}
|
|
1875
|
-
if (
|
|
1876
|
-
var
|
|
1877
|
-
|
|
1889
|
+
if (h !== null) {
|
|
1890
|
+
var I = m.splice(h)[0], _ = a.splice(I.index);
|
|
1891
|
+
_.unshift(_[0].otherSE), r.push(new n(_.reverse()));
|
|
1878
1892
|
continue;
|
|
1879
1893
|
}
|
|
1880
|
-
|
|
1894
|
+
m.push({
|
|
1881
1895
|
index: a.length,
|
|
1882
1896
|
point: u.point
|
|
1883
1897
|
});
|
|
1884
|
-
var
|
|
1885
|
-
f =
|
|
1898
|
+
var S = u.getLeftmostComparator(s);
|
|
1899
|
+
f = v.sort(S)[0].otherSE;
|
|
1886
1900
|
break;
|
|
1887
1901
|
}
|
|
1888
1902
|
r.push(new n(a));
|
|
@@ -1892,7 +1906,7 @@ var Vr = se * se, ot = function(t, e) {
|
|
|
1892
1906
|
}
|
|
1893
1907
|
}]);
|
|
1894
1908
|
function n(t) {
|
|
1895
|
-
|
|
1909
|
+
W(this, n), this.events = t;
|
|
1896
1910
|
for (var e = 0, r = t.length; e < r; e++)
|
|
1897
1911
|
t[e].segment.ringOut = this;
|
|
1898
1912
|
this.poly = null;
|
|
@@ -1902,15 +1916,15 @@ var Vr = se * se, ot = function(t, e) {
|
|
|
1902
1916
|
value: function() {
|
|
1903
1917
|
for (var e = this.events[0].point, r = [e], i = 1, o = this.events.length - 1; i < o; i++) {
|
|
1904
1918
|
var l = this.events[i].point, s = this.events[i + 1].point;
|
|
1905
|
-
|
|
1919
|
+
kt(l, e, s) !== 0 && (r.push(l), e = l);
|
|
1906
1920
|
}
|
|
1907
1921
|
if (r.length === 1)
|
|
1908
1922
|
return null;
|
|
1909
1923
|
var u = r[0], f = r[1];
|
|
1910
|
-
|
|
1911
|
-
for (var a = this.isExteriorRing() ? 1 : -1,
|
|
1912
|
-
|
|
1913
|
-
return
|
|
1924
|
+
kt(u, e, f) === 0 && r.shift(), r.push(r[0]);
|
|
1925
|
+
for (var a = this.isExteriorRing() ? 1 : -1, g = this.isExteriorRing() ? 0 : r.length - 1, m = this.isExteriorRing() ? r.length : -1, v = [], b = g; b != m; b += a)
|
|
1926
|
+
v.push([r[b].x, r[b].y]);
|
|
1927
|
+
return v;
|
|
1914
1928
|
}
|
|
1915
1929
|
}, {
|
|
1916
1930
|
key: "isExteriorRing",
|
|
@@ -1931,7 +1945,7 @@ var Vr = se * se, ot = function(t, e) {
|
|
|
1931
1945
|
value: function() {
|
|
1932
1946
|
for (var e = this.events[0], r = 1, i = this.events.length; r < i; r++) {
|
|
1933
1947
|
var o = this.events[r];
|
|
1934
|
-
|
|
1948
|
+
$.compare(e, o) > 0 && (e = o);
|
|
1935
1949
|
}
|
|
1936
1950
|
for (var l = e.segment.prevInResult(), s = l ? l.prevInResult() : null; ; ) {
|
|
1937
1951
|
if (!l)
|
|
@@ -1944,9 +1958,9 @@ var Vr = se * se, ot = function(t, e) {
|
|
|
1944
1958
|
}
|
|
1945
1959
|
}
|
|
1946
1960
|
}]), n;
|
|
1947
|
-
}(),
|
|
1961
|
+
}(), Mt = /* @__PURE__ */ function() {
|
|
1948
1962
|
function n(t) {
|
|
1949
|
-
|
|
1963
|
+
W(this, n), this.exteriorRing = t, t.poly = this, this.interiorRings = [];
|
|
1950
1964
|
}
|
|
1951
1965
|
return D(n, [{
|
|
1952
1966
|
key: "addInterior",
|
|
@@ -1966,9 +1980,9 @@ var Vr = se * se, ot = function(t, e) {
|
|
|
1966
1980
|
return e;
|
|
1967
1981
|
}
|
|
1968
1982
|
}]), n;
|
|
1969
|
-
}(),
|
|
1983
|
+
}(), rn = /* @__PURE__ */ function() {
|
|
1970
1984
|
function n(t) {
|
|
1971
|
-
|
|
1985
|
+
W(this, n), this.rings = t, this.polys = this._composePolys(t);
|
|
1972
1986
|
}
|
|
1973
1987
|
return D(n, [{
|
|
1974
1988
|
key: "getGeom",
|
|
@@ -1986,19 +2000,19 @@ var Vr = se * se, ot = function(t, e) {
|
|
|
1986
2000
|
var l = e[i];
|
|
1987
2001
|
if (!l.poly)
|
|
1988
2002
|
if (l.isExteriorRing())
|
|
1989
|
-
r.push(new
|
|
2003
|
+
r.push(new Mt(l));
|
|
1990
2004
|
else {
|
|
1991
2005
|
var s = l.enclosingRing();
|
|
1992
|
-
s.poly || r.push(new
|
|
2006
|
+
s.poly || r.push(new Mt(s)), s.poly.addInterior(l);
|
|
1993
2007
|
}
|
|
1994
2008
|
}
|
|
1995
2009
|
return r;
|
|
1996
2010
|
}
|
|
1997
2011
|
}]), n;
|
|
1998
|
-
}(),
|
|
2012
|
+
}(), nn = /* @__PURE__ */ function() {
|
|
1999
2013
|
function n(t) {
|
|
2000
2014
|
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Ue.compare;
|
|
2001
|
-
|
|
2015
|
+
W(this, n), this.queue = t, this.tree = new lt(e), this.segments = [];
|
|
2002
2016
|
}
|
|
2003
2017
|
return D(n, [{
|
|
2004
2018
|
key: "process",
|
|
@@ -2016,43 +2030,43 @@ var Vr = se * se, ot = function(t, e) {
|
|
|
2016
2030
|
if (e.isLeft) {
|
|
2017
2031
|
var a = null;
|
|
2018
2032
|
if (u) {
|
|
2019
|
-
var
|
|
2020
|
-
if (
|
|
2021
|
-
for (var
|
|
2022
|
-
i.push(
|
|
2033
|
+
var g = u.getIntersection(r);
|
|
2034
|
+
if (g !== null && (r.isAnEndpoint(g) || (a = g), !u.isAnEndpoint(g)))
|
|
2035
|
+
for (var m = this._splitSafely(u, g), v = 0, b = m.length; v < b; v++)
|
|
2036
|
+
i.push(m[v]);
|
|
2023
2037
|
}
|
|
2024
|
-
var
|
|
2038
|
+
var p = null;
|
|
2025
2039
|
if (f) {
|
|
2026
|
-
var
|
|
2027
|
-
if (
|
|
2028
|
-
for (var
|
|
2029
|
-
i.push(w
|
|
2040
|
+
var h = f.getIntersection(r);
|
|
2041
|
+
if (h !== null && (r.isAnEndpoint(h) || (p = h), !f.isAnEndpoint(h)))
|
|
2042
|
+
for (var d = this._splitSafely(f, h), w = 0, I = d.length; w < I; w++)
|
|
2043
|
+
i.push(d[w]);
|
|
2030
2044
|
}
|
|
2031
|
-
if (a !== null ||
|
|
2032
|
-
var
|
|
2045
|
+
if (a !== null || p !== null) {
|
|
2046
|
+
var _ = null;
|
|
2033
2047
|
if (a === null)
|
|
2034
|
-
|
|
2035
|
-
else if (
|
|
2036
|
-
|
|
2048
|
+
_ = p;
|
|
2049
|
+
else if (p === null)
|
|
2050
|
+
_ = a;
|
|
2037
2051
|
else {
|
|
2038
|
-
var
|
|
2039
|
-
|
|
2052
|
+
var S = $.comparePoints(a, p);
|
|
2053
|
+
_ = S <= 0 ? a : p;
|
|
2040
2054
|
}
|
|
2041
2055
|
this.queue.remove(r.rightSE), i.push(r.rightSE);
|
|
2042
|
-
for (var
|
|
2043
|
-
i.push(k
|
|
2056
|
+
for (var E = r.split(_), k = 0, P = E.length; k < P; k++)
|
|
2057
|
+
i.push(E[k]);
|
|
2044
2058
|
}
|
|
2045
2059
|
i.length > 0 ? (this.tree.remove(r), i.push(e)) : (this.segments.push(r), r.prev = u);
|
|
2046
2060
|
} else {
|
|
2047
2061
|
if (u && f) {
|
|
2048
|
-
var
|
|
2049
|
-
if (
|
|
2050
|
-
if (!u.isAnEndpoint(
|
|
2051
|
-
for (var z = this._splitSafely(u,
|
|
2052
|
-
i.push(z[
|
|
2053
|
-
if (!f.isAnEndpoint(
|
|
2054
|
-
for (var
|
|
2055
|
-
i.push(
|
|
2062
|
+
var G = u.getIntersection(f);
|
|
2063
|
+
if (G !== null) {
|
|
2064
|
+
if (!u.isAnEndpoint(G))
|
|
2065
|
+
for (var z = this._splitSafely(u, G), L = 0, x = z.length; L < x; L++)
|
|
2066
|
+
i.push(z[L]);
|
|
2067
|
+
if (!f.isAnEndpoint(G))
|
|
2068
|
+
for (var M = this._splitSafely(f, G), q = 0, re = M.length; q < re; q++)
|
|
2069
|
+
i.push(M[q]);
|
|
2056
2070
|
}
|
|
2057
2071
|
}
|
|
2058
2072
|
this.tree.remove(r);
|
|
@@ -2069,96 +2083,96 @@ var Vr = se * se, ot = function(t, e) {
|
|
|
2069
2083
|
return o.push(i), e.consumedBy === void 0 && this.tree.insert(e), o;
|
|
2070
2084
|
}
|
|
2071
2085
|
}]), n;
|
|
2072
|
-
}(),
|
|
2086
|
+
}(), Ot = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE || 1e6, on = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS || 1e6, ln = /* @__PURE__ */ function() {
|
|
2073
2087
|
function n() {
|
|
2074
|
-
|
|
2088
|
+
W(this, n);
|
|
2075
2089
|
}
|
|
2076
2090
|
return D(n, [{
|
|
2077
2091
|
key: "run",
|
|
2078
2092
|
value: function(e, r, i) {
|
|
2079
|
-
|
|
2080
|
-
for (var o = [new
|
|
2081
|
-
o.push(new
|
|
2082
|
-
if (
|
|
2093
|
+
H.type = e, ze.reset();
|
|
2094
|
+
for (var o = [new Lt(r, !0)], l = 0, s = i.length; l < s; l++)
|
|
2095
|
+
o.push(new Lt(i[l], !1));
|
|
2096
|
+
if (H.numMultiPolys = o.length, H.type === "difference")
|
|
2083
2097
|
for (var u = o[0], f = 1; f < o.length; )
|
|
2084
2098
|
it(o[f].bbox, u.bbox) !== null ? f++ : o.splice(f, 1);
|
|
2085
|
-
if (
|
|
2086
|
-
for (var a = 0,
|
|
2087
|
-
for (var
|
|
2088
|
-
if (it(
|
|
2099
|
+
if (H.type === "intersection") {
|
|
2100
|
+
for (var a = 0, g = o.length; a < g; a++)
|
|
2101
|
+
for (var m = o[a], v = a + 1, b = o.length; v < b; v++)
|
|
2102
|
+
if (it(m.bbox, o[v].bbox) === null)
|
|
2089
2103
|
return [];
|
|
2090
2104
|
}
|
|
2091
|
-
for (var
|
|
2092
|
-
for (var
|
|
2093
|
-
if (
|
|
2105
|
+
for (var p = new lt($.compare), h = 0, d = o.length; h < d; h++)
|
|
2106
|
+
for (var w = o[h].getSweepEvents(), I = 0, _ = w.length; I < _; I++)
|
|
2107
|
+
if (p.insert(w[I]), p.size > Ot)
|
|
2094
2108
|
throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");
|
|
2095
|
-
for (var
|
|
2096
|
-
var P =
|
|
2097
|
-
if (
|
|
2098
|
-
var
|
|
2099
|
-
throw new Error("Unable to pop() ".concat(P.isLeft ? "left" : "right", " SweepEvent ") + "[".concat(P.point.x, ", ").concat(P.point.y, "] from segment #").concat(
|
|
2109
|
+
for (var S = new nn(p), E = p.size, k = p.pop(); k; ) {
|
|
2110
|
+
var P = k.key;
|
|
2111
|
+
if (p.size === E) {
|
|
2112
|
+
var G = P.segment;
|
|
2113
|
+
throw new Error("Unable to pop() ".concat(P.isLeft ? "left" : "right", " SweepEvent ") + "[".concat(P.point.x, ", ").concat(P.point.y, "] from segment #").concat(G.id, " ") + "[".concat(G.leftSE.point.x, ", ").concat(G.leftSE.point.y, "] -> ") + "[".concat(G.rightSE.point.x, ", ").concat(G.rightSE.point.y, "] from queue. ") + "Please file a bug report.");
|
|
2100
2114
|
}
|
|
2101
|
-
if (
|
|
2115
|
+
if (p.size > Ot)
|
|
2102
2116
|
throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");
|
|
2103
|
-
if (
|
|
2117
|
+
if (S.segments.length > on)
|
|
2104
2118
|
throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");
|
|
2105
|
-
for (var z =
|
|
2106
|
-
var
|
|
2107
|
-
|
|
2119
|
+
for (var z = S.process(P), L = 0, x = z.length; L < x; L++) {
|
|
2120
|
+
var M = z[L];
|
|
2121
|
+
M.consumedBy === void 0 && p.insert(M);
|
|
2108
2122
|
}
|
|
2109
|
-
|
|
2123
|
+
E = p.size, k = p.pop();
|
|
2110
2124
|
}
|
|
2111
2125
|
ze.reset();
|
|
2112
|
-
var q =
|
|
2113
|
-
return
|
|
2126
|
+
var q = tn.factory(S.segments), re = new rn(q);
|
|
2127
|
+
return re.getGeom();
|
|
2114
2128
|
}
|
|
2115
2129
|
}]), n;
|
|
2116
|
-
}(),
|
|
2130
|
+
}(), H = new ln(), sn = function(t) {
|
|
2117
2131
|
for (var e = arguments.length, r = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
|
|
2118
2132
|
r[i - 1] = arguments[i];
|
|
2119
|
-
return
|
|
2120
|
-
},
|
|
2133
|
+
return H.run("union", t, r);
|
|
2134
|
+
}, un = function(t) {
|
|
2121
2135
|
for (var e = arguments.length, r = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
|
|
2122
2136
|
r[i - 1] = arguments[i];
|
|
2123
|
-
return
|
|
2124
|
-
},
|
|
2137
|
+
return H.run("intersection", t, r);
|
|
2138
|
+
}, fn = function(t) {
|
|
2125
2139
|
for (var e = arguments.length, r = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
|
|
2126
2140
|
r[i - 1] = arguments[i];
|
|
2127
|
-
return
|
|
2128
|
-
},
|
|
2141
|
+
return H.run("xor", t, r);
|
|
2142
|
+
}, an = function(t) {
|
|
2129
2143
|
for (var e = arguments.length, r = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
|
|
2130
2144
|
r[i - 1] = arguments[i];
|
|
2131
|
-
return
|
|
2132
|
-
},
|
|
2133
|
-
union:
|
|
2134
|
-
intersection:
|
|
2135
|
-
xor:
|
|
2136
|
-
difference:
|
|
2145
|
+
return H.run("difference", t, r);
|
|
2146
|
+
}, Me = {
|
|
2147
|
+
union: sn,
|
|
2148
|
+
intersection: un,
|
|
2149
|
+
xor: fn,
|
|
2150
|
+
difference: an
|
|
2137
2151
|
};
|
|
2138
|
-
function
|
|
2139
|
-
var e =
|
|
2140
|
-
return n.type === "FeatureCollection" ? r =
|
|
2141
|
-
|
|
2152
|
+
function Tt(n, t) {
|
|
2153
|
+
var e = hn(t), r = null;
|
|
2154
|
+
return n.type === "FeatureCollection" ? r = cn(n) : r = Yt(
|
|
2155
|
+
Me.union(n.geometry.coordinates)
|
|
2142
2156
|
), r.geometry.coordinates.forEach(function(i) {
|
|
2143
2157
|
e.geometry.coordinates.push(i[0]);
|
|
2144
2158
|
}), e;
|
|
2145
2159
|
}
|
|
2146
|
-
function
|
|
2147
|
-
var t = n.features.length === 2 ?
|
|
2160
|
+
function cn(n) {
|
|
2161
|
+
var t = n.features.length === 2 ? Me.union(
|
|
2148
2162
|
n.features[0].geometry.coordinates,
|
|
2149
2163
|
n.features[1].geometry.coordinates
|
|
2150
|
-
) :
|
|
2151
|
-
|
|
2164
|
+
) : Me.union.apply(
|
|
2165
|
+
Me,
|
|
2152
2166
|
n.features.map(function(e) {
|
|
2153
2167
|
return e.geometry.coordinates;
|
|
2154
2168
|
})
|
|
2155
2169
|
);
|
|
2156
|
-
return
|
|
2170
|
+
return Yt(t);
|
|
2157
2171
|
}
|
|
2158
|
-
function
|
|
2159
|
-
return
|
|
2172
|
+
function Yt(n) {
|
|
2173
|
+
return Ut(n);
|
|
2160
2174
|
}
|
|
2161
|
-
function
|
|
2175
|
+
function hn(n) {
|
|
2162
2176
|
var t = [
|
|
2163
2177
|
[
|
|
2164
2178
|
[180, 90],
|
|
@@ -2168,178 +2182,184 @@ function un(n) {
|
|
|
2168
2182
|
[180, 90]
|
|
2169
2183
|
]
|
|
2170
2184
|
], e = n && n.geometry.coordinates || t;
|
|
2171
|
-
return
|
|
2185
|
+
return Dt(e);
|
|
2172
2186
|
}
|
|
2173
|
-
function
|
|
2187
|
+
function Ct(n) {
|
|
2174
2188
|
return n.type === "Feature" ? n.geometry : n;
|
|
2175
2189
|
}
|
|
2176
|
-
function
|
|
2190
|
+
function gn(n, t, e) {
|
|
2177
2191
|
e === void 0 && (e = {});
|
|
2178
|
-
var r =
|
|
2179
|
-
return o.length === 0 ? null : o.length === 1 ?
|
|
2192
|
+
var r = Ct(n), i = Ct(t), o = Me.union(r.coordinates, i.coordinates);
|
|
2193
|
+
return o.length === 0 ? null : o.length === 1 ? Dt(o[0], e.properties) : Ut(o, e.properties);
|
|
2180
2194
|
}
|
|
2181
|
-
let
|
|
2195
|
+
let zt = {
|
|
2182
2196
|
type: "FeatureCollection",
|
|
2183
2197
|
features: []
|
|
2184
2198
|
};
|
|
2185
|
-
function
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2199
|
+
function vn(n, t, e = !0, r = !0, i = {}, o = {}, l = {
|
|
2200
|
+
fill: {
|
|
2201
|
+
layout: {},
|
|
2202
|
+
paint: {
|
|
2203
|
+
"fill-color": "#000",
|
|
2204
|
+
"fill-opacity": 0.1
|
|
2205
|
+
}
|
|
2206
|
+
},
|
|
2207
|
+
line: {
|
|
2208
|
+
layout: {
|
|
2209
|
+
"line-cap": "square"
|
|
2210
|
+
},
|
|
2211
|
+
paint: {
|
|
2212
|
+
"line-width": ["case", ["==", ["geometry-type"], "Polygon"], 2, 3],
|
|
2213
|
+
"line-dasharray": [1, 1],
|
|
2214
|
+
"line-color": "#3170fe"
|
|
2215
|
+
}
|
|
2216
|
+
}
|
|
2217
|
+
}) {
|
|
2218
|
+
let s, u, f, a = [], g;
|
|
2219
|
+
function m() {
|
|
2220
|
+
n.addSource("full-geom", {
|
|
2189
2221
|
type: "geojson",
|
|
2190
|
-
data:
|
|
2222
|
+
data: zt
|
|
2191
2223
|
}), n.addLayer({
|
|
2192
|
-
|
|
2224
|
+
...l.fill,
|
|
2225
|
+
id: "full-geom-fill",
|
|
2193
2226
|
type: "fill",
|
|
2194
|
-
source: "
|
|
2195
|
-
layout: {},
|
|
2196
|
-
paint: {
|
|
2197
|
-
"fill-color": "#000",
|
|
2198
|
-
"fill-opacity": 0.1
|
|
2199
|
-
},
|
|
2227
|
+
source: "full-geom",
|
|
2200
2228
|
filter: ["==", ["geometry-type"], "Polygon"]
|
|
2201
2229
|
}), n.addLayer({
|
|
2202
|
-
|
|
2230
|
+
...l.line,
|
|
2231
|
+
id: "full-geom-line",
|
|
2203
2232
|
type: "line",
|
|
2204
|
-
source: "
|
|
2205
|
-
layout: {
|
|
2206
|
-
"line-cap": "square"
|
|
2207
|
-
},
|
|
2208
|
-
paint: {
|
|
2209
|
-
"line-width": ["case", ["==", ["geometry-type"], "Polygon"], 2, 3],
|
|
2210
|
-
"line-dasharray": [1, 1],
|
|
2211
|
-
"line-color": "#3170fe"
|
|
2212
|
-
}
|
|
2233
|
+
source: "full-geom"
|
|
2213
2234
|
});
|
|
2214
2235
|
}
|
|
2215
|
-
n.loaded() ?
|
|
2216
|
-
|
|
2236
|
+
n.loaded() ? m() : n.once("load", () => {
|
|
2237
|
+
m();
|
|
2217
2238
|
});
|
|
2218
|
-
const
|
|
2219
|
-
|
|
2220
|
-
},
|
|
2239
|
+
const v = (h) => {
|
|
2240
|
+
u == null || u([h.lngLat.lng, h.lngLat.lat]);
|
|
2241
|
+
}, b = () => {
|
|
2221
2242
|
let h;
|
|
2222
|
-
const
|
|
2223
|
-
|
|
2243
|
+
const d = n.getZoom() > 9 ? [(h = n.getCenter().wrap()).lng, h.lat] : void 0;
|
|
2244
|
+
f !== d && (f = d, s == null || s(d));
|
|
2224
2245
|
};
|
|
2225
2246
|
return {
|
|
2226
2247
|
setProximityChangeHandler(h) {
|
|
2227
|
-
h ? (
|
|
2248
|
+
h ? (s = h, n.on("moveend", b), b()) : (n.off("moveend", b), s == null || s(void 0), s = void 0);
|
|
2228
2249
|
},
|
|
2229
2250
|
setMapClickHandler(h) {
|
|
2230
|
-
|
|
2251
|
+
u = h, u ? n.on("click", v) : n.off("click", v);
|
|
2231
2252
|
},
|
|
2232
|
-
flyTo(h,
|
|
2233
|
-
n.flyTo({ center: h, zoom:
|
|
2253
|
+
flyTo(h, d) {
|
|
2254
|
+
n.flyTo({ center: h, zoom: d, ...i });
|
|
2234
2255
|
},
|
|
2235
|
-
fitBounds(h,
|
|
2256
|
+
fitBounds(h, d) {
|
|
2236
2257
|
n.fitBounds(
|
|
2237
2258
|
[
|
|
2238
2259
|
[h[0], h[1]],
|
|
2239
2260
|
[h[2], h[3]]
|
|
2240
2261
|
],
|
|
2241
|
-
{ padding:
|
|
2262
|
+
{ padding: d, ...o }
|
|
2242
2263
|
);
|
|
2243
2264
|
},
|
|
2244
2265
|
indicateReverse(h) {
|
|
2245
2266
|
n.getCanvas().style.cursor = h ? "crosshair" : "";
|
|
2246
2267
|
},
|
|
2247
|
-
setMarkers(h,
|
|
2268
|
+
setMarkers(h, d) {
|
|
2248
2269
|
function w(_) {
|
|
2249
2270
|
var S;
|
|
2250
|
-
(S = n.getSource("
|
|
2271
|
+
(S = n.getSource("full-geom")) == null || S.setData(_);
|
|
2251
2272
|
}
|
|
2252
|
-
for (const _ of
|
|
2273
|
+
for (const _ of a)
|
|
2253
2274
|
_.remove();
|
|
2254
|
-
if (
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2275
|
+
if (a.length = 0, w(zt), !t)
|
|
2276
|
+
return;
|
|
2277
|
+
const I = () => {
|
|
2278
|
+
const _ = document.createElement("div");
|
|
2279
|
+
return new Ft({
|
|
2280
|
+
props: { displayIn: "maplibre" },
|
|
2281
|
+
target: _
|
|
2282
|
+
}), new t.Marker({ element: _ });
|
|
2283
|
+
};
|
|
2284
|
+
if (d) {
|
|
2285
|
+
let _ = !1;
|
|
2286
|
+
if (d.geometry.type === "GeometryCollection") {
|
|
2287
|
+
const S = d.geometry.geometries.filter(
|
|
2288
|
+
(E) => E.type === "Polygon" || E.type === "MultiPolygon"
|
|
2289
|
+
);
|
|
2290
|
+
if (S.length > 0) {
|
|
2291
|
+
let E = S.pop();
|
|
2292
|
+
for (const k of S)
|
|
2293
|
+
E = gn(E, k);
|
|
2294
|
+
w(Tt({ ...d, geometry: E })), _ = !0;
|
|
2295
|
+
} else {
|
|
2296
|
+
const E = d.geometry.geometries.filter(
|
|
2297
|
+
(k) => k.type === "LineString" || k.type === "MultiLineString"
|
|
2260
2298
|
);
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
w(Mt({ ...g, geometry: b })), _ = !0;
|
|
2266
|
-
} else {
|
|
2267
|
-
const b = g.geometry.geometries.filter(
|
|
2268
|
-
(k) => k.type === "LineString" || k.type === "MultiLineString"
|
|
2269
|
-
);
|
|
2270
|
-
b.length > 0 && (w({
|
|
2271
|
-
...g,
|
|
2272
|
-
geometry: { type: "GeometryCollection", geometries: b }
|
|
2273
|
-
}), _ = !0);
|
|
2274
|
-
}
|
|
2275
|
-
}
|
|
2276
|
-
let S;
|
|
2277
|
-
if (!_) {
|
|
2278
|
-
if (g.geometry.type === "Polygon" || g.geometry.type === "MultiPolygon")
|
|
2279
|
-
w(Mt(g));
|
|
2280
|
-
else if (g.geometry.type === "LineString" || g.geometry.type === "MultiLineString") {
|
|
2281
|
-
w(g);
|
|
2282
|
-
return;
|
|
2283
|
-
}
|
|
2284
|
-
}
|
|
2285
|
-
if (typeof e == "object")
|
|
2286
|
-
S = new t.Marker(e);
|
|
2287
|
-
else {
|
|
2288
|
-
const m = document.createElement("div");
|
|
2289
|
-
new $e({
|
|
2290
|
-
props: { displayIn: "maplibre" },
|
|
2291
|
-
target: m
|
|
2292
|
-
}), S = new t.Marker({ element: m });
|
|
2299
|
+
E.length > 0 && (w({
|
|
2300
|
+
...d,
|
|
2301
|
+
geometry: { type: "GeometryCollection", geometries: E }
|
|
2302
|
+
}), _ = !0);
|
|
2293
2303
|
}
|
|
2294
|
-
S && f.push(S.setLngLat(g.center).addTo(n));
|
|
2295
2304
|
}
|
|
2296
|
-
|
|
2297
|
-
if (
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
else {
|
|
2303
|
-
const m = document.createElement("div");
|
|
2304
|
-
new $e({ props: { displayIn: "maplibre" }, target: m }), S = new t.Marker({ element: m });
|
|
2305
|
+
if (!_) {
|
|
2306
|
+
if (d.geometry.type === "Polygon" || d.geometry.type === "MultiPolygon")
|
|
2307
|
+
w(Tt(d));
|
|
2308
|
+
else if (d.geometry.type === "LineString" || d.geometry.type === "MultiLineString") {
|
|
2309
|
+
w(d);
|
|
2310
|
+
return;
|
|
2305
2311
|
}
|
|
2306
|
-
f.push(S.setLngLat(_.center).addTo(n));
|
|
2307
2312
|
}
|
|
2313
|
+
a.push(
|
|
2314
|
+
(typeof e == "object" ? new t.Marker(e) : I()).setLngLat(d.center).addTo(n)
|
|
2315
|
+
);
|
|
2308
2316
|
}
|
|
2317
|
+
for (const _ of h != null ? h : [])
|
|
2318
|
+
_ !== d && a.push(
|
|
2319
|
+
(typeof r == "object" ? new t.Marker(r) : I()).setLngLat(_.center).addTo(n)
|
|
2320
|
+
);
|
|
2309
2321
|
},
|
|
2310
2322
|
setSelectedMarker(h) {
|
|
2311
|
-
|
|
2323
|
+
g && g.getElement().classList.toggle("marker-selected", !1), g = h > -1 ? a[h] : void 0, g == null || g.getElement().classList.toggle("marker-selected", !0);
|
|
2312
2324
|
}
|
|
2313
2325
|
};
|
|
2314
2326
|
}
|
|
2315
|
-
var
|
|
2316
|
-
class
|
|
2327
|
+
var j, ye;
|
|
2328
|
+
class mn extends ur {
|
|
2317
2329
|
constructor(e) {
|
|
2318
2330
|
super();
|
|
2319
|
-
We(this,
|
|
2331
|
+
We(this, j, void 0);
|
|
2320
2332
|
We(this, ye, void 0);
|
|
2321
|
-
|
|
2333
|
+
Ne(this, ye, e);
|
|
2322
2334
|
}
|
|
2323
2335
|
onAdd(e) {
|
|
2324
2336
|
const r = document.createElement("div");
|
|
2325
2337
|
r.className = "mapboxgl-ctrl-geocoder mapboxgl-ctrl maplibregl-ctrl-geocoder maplibregl-ctrl";
|
|
2326
|
-
const {
|
|
2338
|
+
const {
|
|
2339
|
+
maplibregl: i,
|
|
2340
|
+
marker: o,
|
|
2341
|
+
showResultMarkers: l,
|
|
2342
|
+
flyTo: s,
|
|
2343
|
+
fullGeometryStyle: u,
|
|
2344
|
+
...f
|
|
2345
|
+
} = J(this, ye), a = typeof s == "boolean" ? {} : s, g = vn(
|
|
2327
2346
|
e,
|
|
2328
2347
|
i,
|
|
2329
2348
|
o,
|
|
2330
2349
|
l,
|
|
2331
|
-
|
|
2332
|
-
|
|
2350
|
+
a,
|
|
2351
|
+
a,
|
|
2352
|
+
u
|
|
2333
2353
|
);
|
|
2334
|
-
|
|
2354
|
+
Ne(this, j, new Qr({
|
|
2335
2355
|
target: r,
|
|
2336
2356
|
props: {
|
|
2337
|
-
mapController:
|
|
2357
|
+
mapController: g,
|
|
2338
2358
|
flyTo: s === void 0 ? !0 : !!s,
|
|
2339
|
-
...
|
|
2359
|
+
...f
|
|
2340
2360
|
}
|
|
2341
2361
|
}));
|
|
2342
|
-
for (const
|
|
2362
|
+
for (const m of [
|
|
2343
2363
|
"select",
|
|
2344
2364
|
"pick",
|
|
2345
2365
|
"featuresListed",
|
|
@@ -2349,41 +2369,48 @@ class gn extends ir {
|
|
|
2349
2369
|
"reverseToggle",
|
|
2350
2370
|
"queryChange"
|
|
2351
2371
|
])
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
(
|
|
2372
|
+
J(this, j).$on(
|
|
2373
|
+
m,
|
|
2374
|
+
(v) => this.fire(m.toLowerCase(), v.detail)
|
|
2355
2375
|
);
|
|
2356
2376
|
return r;
|
|
2357
2377
|
}
|
|
2358
2378
|
setOptions(e) {
|
|
2359
|
-
var
|
|
2360
|
-
|
|
2361
|
-
const {
|
|
2362
|
-
|
|
2379
|
+
var f;
|
|
2380
|
+
Ne(this, ye, e);
|
|
2381
|
+
const {
|
|
2382
|
+
maplibregl: r,
|
|
2383
|
+
marker: i,
|
|
2384
|
+
showResultMarkers: o,
|
|
2385
|
+
flyTo: l,
|
|
2386
|
+
fullGeometryStyle: s,
|
|
2387
|
+
...u
|
|
2388
|
+
} = J(this, ye);
|
|
2389
|
+
(f = J(this, j)) == null || f.$set(u);
|
|
2363
2390
|
}
|
|
2364
2391
|
setQuery(e, r = !0) {
|
|
2365
2392
|
var i;
|
|
2366
|
-
(i =
|
|
2393
|
+
(i = J(this, j)) == null || i.setQuery(e, r);
|
|
2367
2394
|
}
|
|
2368
2395
|
setReverseMode(e) {
|
|
2369
2396
|
var r;
|
|
2370
|
-
(r =
|
|
2397
|
+
(r = J(this, j)) == null || r.$set({ reverseActive: e });
|
|
2371
2398
|
}
|
|
2372
2399
|
focus() {
|
|
2373
2400
|
var e;
|
|
2374
|
-
(e =
|
|
2401
|
+
(e = J(this, j)) == null || e.focus();
|
|
2375
2402
|
}
|
|
2376
2403
|
blur() {
|
|
2377
2404
|
var e;
|
|
2378
|
-
(e =
|
|
2405
|
+
(e = J(this, j)) == null || e.blur();
|
|
2379
2406
|
}
|
|
2380
2407
|
onRemove() {
|
|
2381
2408
|
var e;
|
|
2382
|
-
(e =
|
|
2409
|
+
(e = J(this, j)) == null || e.$destroy();
|
|
2383
2410
|
}
|
|
2384
2411
|
}
|
|
2385
|
-
|
|
2412
|
+
j = new WeakMap(), ye = new WeakMap();
|
|
2386
2413
|
export {
|
|
2387
|
-
|
|
2388
|
-
|
|
2414
|
+
mn as GeocodingControl,
|
|
2415
|
+
vn as createMaplibreglMapController
|
|
2389
2416
|
};
|