@teritorio/openstreetmap-logical-history-component 0.4.7 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +1 -1
- package/dist/index.js +517 -475
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +1 -1
- package/dist/index.umd.cjs.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createSlots as o, createVNode as s, customRef as c, defineComponent as l, getCurrentInstance as u, getCurrentScope as d, guardReactiveProps as f, inject as p, mergeProps as m, nextTick as h, normalizeClass as g, normalizeProps as _,
|
|
1
|
+
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createSlots as o, createVNode as s, customRef as c, defineComponent as l, getCurrentInstance as u, getCurrentScope as d, guardReactiveProps as f, inject as p, mergeProps as m, nextTick as h, normalizeClass as g, normalizeProps as _, normalizeStyle as v, onMounted as y, onScopeDispose as b, onUnmounted as x, openBlock as S, provide as C, readonly as w, ref as T, renderList as E, renderSlot as D, shallowRef as O, toDisplayString as k, toRef as A, toValue as j, unref as M, useCssVars as ee, useSlots as te, useTemplateRef as ne, watch as N, withCtx as P, withDirectives as re, withModifiers as F } from "vue";
|
|
2
2
|
import ie from "maplibre-gl";
|
|
3
3
|
//#region \0rolldown/runtime.js
|
|
4
4
|
var ae = Object.create, oe = Object.defineProperty, se = Object.getOwnPropertyDescriptor, ce = Object.getOwnPropertyNames, le = Object.getPrototypeOf, ue = Object.prototype.hasOwnProperty, de = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), fe = (e, t, n, r) => {
|
|
@@ -10,24 +10,24 @@ var ae = Object.create, oe = Object.defineProperty, se = Object.getOwnPropertyDe
|
|
|
10
10
|
}, pe = (e, t, n) => (n = e == null ? {} : ae(le(e)), fe(t || !e || !e.__esModule ? oe(n, "default", {
|
|
11
11
|
value: e,
|
|
12
12
|
enumerable: !0
|
|
13
|
-
}) : n, e)),
|
|
14
|
-
centimeters:
|
|
15
|
-
centimetres:
|
|
13
|
+
}) : n, e)), I = 6371008.8, me = {
|
|
14
|
+
centimeters: I * 100,
|
|
15
|
+
centimetres: I * 100,
|
|
16
16
|
degrees: 360 / (2 * Math.PI),
|
|
17
|
-
feet:
|
|
18
|
-
inches:
|
|
19
|
-
kilometers:
|
|
20
|
-
kilometres:
|
|
21
|
-
meters:
|
|
22
|
-
metres:
|
|
23
|
-
miles:
|
|
24
|
-
millimeters:
|
|
25
|
-
millimetres:
|
|
26
|
-
nauticalmiles:
|
|
17
|
+
feet: I * 3.28084,
|
|
18
|
+
inches: I * 39.37,
|
|
19
|
+
kilometers: I / 1e3,
|
|
20
|
+
kilometres: I / 1e3,
|
|
21
|
+
meters: I,
|
|
22
|
+
metres: I,
|
|
23
|
+
miles: I / 1609.344,
|
|
24
|
+
millimeters: I * 1e3,
|
|
25
|
+
millimetres: I * 1e3,
|
|
26
|
+
nauticalmiles: I / 1852,
|
|
27
27
|
radians: 1,
|
|
28
|
-
yards:
|
|
28
|
+
yards: I * 1.0936
|
|
29
29
|
};
|
|
30
|
-
function
|
|
30
|
+
function L(e, t, n = {}) {
|
|
31
31
|
let r = { type: "Feature" };
|
|
32
32
|
return (n.id === 0 || n.id) && (r.id = n.id), n.bbox && (r.bbox = n.bbox), r.properties = t || {}, r.geometry = e, r;
|
|
33
33
|
}
|
|
@@ -36,7 +36,7 @@ function he(e, t, n = {}) {
|
|
|
36
36
|
if (!Array.isArray(e)) throw Error("coordinates must be an Array");
|
|
37
37
|
if (e.length < 2) throw Error("coordinates must be at least 2 numbers long");
|
|
38
38
|
if (!xe(e[0]) || !xe(e[1])) throw Error("coordinates must contain numbers");
|
|
39
|
-
return
|
|
39
|
+
return L({
|
|
40
40
|
type: "Point",
|
|
41
41
|
coordinates: e
|
|
42
42
|
}, t, n);
|
|
@@ -47,30 +47,30 @@ function ge(e, t, n = {}) {
|
|
|
47
47
|
if (t[t.length - 1].length !== t[0].length) throw Error("First and last Position are not equivalent.");
|
|
48
48
|
for (let e = 0; e < t[t.length - 1].length; e++) if (t[t.length - 1][e] !== t[0][e]) throw Error("First and last Position are not equivalent.");
|
|
49
49
|
}
|
|
50
|
-
return
|
|
50
|
+
return L({
|
|
51
51
|
type: "Polygon",
|
|
52
52
|
coordinates: e
|
|
53
53
|
}, t, n);
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function R(e, t, n = {}) {
|
|
56
56
|
if (e.length < 2) throw Error("coordinates must be an array of two or more positions");
|
|
57
|
-
return
|
|
57
|
+
return L({
|
|
58
58
|
type: "LineString",
|
|
59
59
|
coordinates: e
|
|
60
60
|
}, t, n);
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function z(e, t = {}) {
|
|
63
63
|
let n = { type: "FeatureCollection" };
|
|
64
64
|
return t.id && (n.id = t.id), t.bbox && (n.bbox = t.bbox), n.features = e, n;
|
|
65
65
|
}
|
|
66
66
|
function _e(e, t, n = {}) {
|
|
67
|
-
return
|
|
67
|
+
return L({
|
|
68
68
|
type: "MultiLineString",
|
|
69
69
|
coordinates: e
|
|
70
70
|
}, t, n);
|
|
71
71
|
}
|
|
72
72
|
function ve(e, t, n = {}) {
|
|
73
|
-
return
|
|
73
|
+
return L({
|
|
74
74
|
type: "MultiPolygon",
|
|
75
75
|
coordinates: e
|
|
76
76
|
}, t, n);
|
|
@@ -83,7 +83,7 @@ function ye(e, t = "kilometers") {
|
|
|
83
83
|
function be(e) {
|
|
84
84
|
return e % (2 * Math.PI) * 180 / Math.PI;
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function B(e) {
|
|
87
87
|
return e % 360 * Math.PI / 180;
|
|
88
88
|
}
|
|
89
89
|
function xe(e) {
|
|
@@ -197,7 +197,7 @@ function Oe(e, t) {
|
|
|
197
197
|
case null:
|
|
198
198
|
case "Point":
|
|
199
199
|
case "LineString":
|
|
200
|
-
case "Polygon": return t(
|
|
200
|
+
case "Polygon": return t(L(e, r, {
|
|
201
201
|
bbox: i,
|
|
202
202
|
id: a
|
|
203
203
|
}), n, 0) === !1 ? !1 : void 0;
|
|
@@ -216,7 +216,7 @@ function Oe(e, t) {
|
|
|
216
216
|
}
|
|
217
217
|
for (var c = 0; c < e.coordinates.length; c++) {
|
|
218
218
|
var l = e.coordinates[c];
|
|
219
|
-
if (t(
|
|
219
|
+
if (t(L({
|
|
220
220
|
type: s,
|
|
221
221
|
coordinates: l
|
|
222
222
|
}, r), n, c) === !1) return !1;
|
|
@@ -250,7 +250,7 @@ function je(e) {
|
|
|
250
250
|
}
|
|
251
251
|
return t;
|
|
252
252
|
}
|
|
253
|
-
var Me =
|
|
253
|
+
var Me = I * I / 2, Ne = Math.PI / 180;
|
|
254
254
|
function Pe(e) {
|
|
255
255
|
let t = e.length - 1;
|
|
256
256
|
if (t <= 2) return 0;
|
|
@@ -263,15 +263,15 @@ function Pe(e) {
|
|
|
263
263
|
}
|
|
264
264
|
//#endregion
|
|
265
265
|
//#region node_modules/geojson-equality-ts/dist/esm/index.js
|
|
266
|
-
var Fe = Object.defineProperty,
|
|
266
|
+
var Fe = Object.defineProperty, Ie = (e, t) => Fe(e, "name", {
|
|
267
267
|
value: t,
|
|
268
268
|
configurable: !0
|
|
269
|
-
}),
|
|
269
|
+
}), Le = class {
|
|
270
270
|
constructor(e) {
|
|
271
271
|
this.direction = !1, this.compareProperties = !0, this.precision = 10 ** -(e?.precision ?? 17), this.direction = e?.direction ?? !1, this.compareProperties = e?.compareProperties ?? !0;
|
|
272
272
|
}
|
|
273
273
|
compare(e, t) {
|
|
274
|
-
if (e.type !== t.type || !
|
|
274
|
+
if (e.type !== t.type || !ze(e, t)) return !1;
|
|
275
275
|
switch (e.type) {
|
|
276
276
|
case "Point": return this.compareCoord(e.coordinates, t.coordinates);
|
|
277
277
|
case "LineString": return this.compareLine(e.coordinates, t.coordinates);
|
|
@@ -280,7 +280,7 @@ var Fe = Object.defineProperty, B = (e, t) => Fe(e, "name", {
|
|
|
280
280
|
case "Feature": return this.compareFeature(e, t);
|
|
281
281
|
case "FeatureCollection": return this.compareFeatureCollection(e, t);
|
|
282
282
|
default: if (e.type.startsWith("Multi")) {
|
|
283
|
-
let n =
|
|
283
|
+
let n = Be(e), r = Be(t);
|
|
284
284
|
return n.every((e) => r.some((t) => this.compare(e, t)));
|
|
285
285
|
}
|
|
286
286
|
}
|
|
@@ -290,7 +290,7 @@ var Fe = Object.defineProperty, B = (e, t) => Fe(e, "name", {
|
|
|
290
290
|
return e.length === t.length && e.every((e, n) => Math.abs(e - t[n]) < this.precision);
|
|
291
291
|
}
|
|
292
292
|
compareLine(e, t, n = 0, r = !1) {
|
|
293
|
-
if (!
|
|
293
|
+
if (!ze(e, t)) return !1;
|
|
294
294
|
let i = e, a = t;
|
|
295
295
|
if (r && !this.compareCoord(i[0], a[0])) {
|
|
296
296
|
let e = this.fixStartIndex(a, i);
|
|
@@ -319,48 +319,48 @@ var Fe = Object.defineProperty, B = (e, t) => Fe(e, "name", {
|
|
|
319
319
|
return !1;
|
|
320
320
|
}
|
|
321
321
|
compareGeometryCollection(e, t) {
|
|
322
|
-
return
|
|
322
|
+
return ze(e.geometries, t.geometries) && this.compareBBox(e, t) && e.geometries.every((e, n) => this.compare(e, t.geometries[n]));
|
|
323
323
|
}
|
|
324
324
|
compareFeature(e, t) {
|
|
325
|
-
return e.id === t.id && (this.compareProperties ?
|
|
325
|
+
return e.id === t.id && (this.compareProperties ? He(e.properties, t.properties) : !0) && this.compareBBox(e, t) && this.compare(e.geometry, t.geometry);
|
|
326
326
|
}
|
|
327
327
|
compareFeatureCollection(e, t) {
|
|
328
|
-
return
|
|
328
|
+
return ze(e.features, t.features) && this.compareBBox(e, t) && e.features.every((e, n) => this.compare(e, t.features[n]));
|
|
329
329
|
}
|
|
330
330
|
compareBBox(e, t) {
|
|
331
331
|
return !e.bbox && !t.bbox || (e.bbox && t.bbox ? this.compareCoord(e.bbox, t.bbox) : !1);
|
|
332
332
|
}
|
|
333
333
|
};
|
|
334
|
-
|
|
335
|
-
var
|
|
336
|
-
function
|
|
334
|
+
Ie(Le, "GeojsonEquality");
|
|
335
|
+
var Re = Le;
|
|
336
|
+
function ze(e, t) {
|
|
337
337
|
return e.coordinates ? e.coordinates.length === t.coordinates.length : e.length === t.length;
|
|
338
338
|
}
|
|
339
|
-
|
|
340
|
-
function
|
|
339
|
+
Ie(ze, "sameLength");
|
|
340
|
+
function Be(e) {
|
|
341
341
|
return e.coordinates.map((t) => ({
|
|
342
342
|
type: e.type.replace("Multi", ""),
|
|
343
343
|
coordinates: t
|
|
344
344
|
}));
|
|
345
345
|
}
|
|
346
|
-
|
|
347
|
-
function
|
|
348
|
-
return new
|
|
346
|
+
Ie(Be, "explode");
|
|
347
|
+
function Ve(e, t, n) {
|
|
348
|
+
return new Re(n).compare(e, t);
|
|
349
349
|
}
|
|
350
|
-
|
|
351
|
-
function
|
|
350
|
+
Ie(Ve, "geojsonEquality");
|
|
351
|
+
function He(e, t) {
|
|
352
352
|
if (e === null && t === null) return !0;
|
|
353
353
|
if (e === null || t === null) return !1;
|
|
354
354
|
let n = Object.keys(e), r = Object.keys(t);
|
|
355
355
|
if (n.length !== r.length) return !1;
|
|
356
356
|
for (var i of n) {
|
|
357
|
-
let n = e[i], r = t[i], a =
|
|
358
|
-
if (a && !
|
|
357
|
+
let n = e[i], r = t[i], a = Ue(n) && Ue(r);
|
|
358
|
+
if (a && !He(n, r) || !a && n !== r) return !1;
|
|
359
359
|
}
|
|
360
360
|
return !0;
|
|
361
361
|
}
|
|
362
|
-
|
|
363
|
-
var
|
|
362
|
+
Ie(He, "equal");
|
|
363
|
+
var Ue = /* @__PURE__ */ Ie((e) => typeof e == "object" && !!e, "isObject");
|
|
364
364
|
//#endregion
|
|
365
365
|
//#region node_modules/@turf/invariant/dist/esm/index.js
|
|
366
366
|
function V(e) {
|
|
@@ -382,7 +382,7 @@ function H(e) {
|
|
|
382
382
|
function U(e) {
|
|
383
383
|
return e.type === "Feature" ? e.geometry : e;
|
|
384
384
|
}
|
|
385
|
-
function
|
|
385
|
+
function We(e, t) {
|
|
386
386
|
return e.type === "FeatureCollection" ? "FeatureCollection" : e.type === "GeometryCollection" ? "GeometryCollection" : e.type === "Feature" && e.geometry !== null ? e.geometry.type : e.type;
|
|
387
387
|
}
|
|
388
388
|
//#endregion
|
|
@@ -391,11 +391,11 @@ function W(e, t, n = {}) {
|
|
|
391
391
|
let r = V(e), i = H(t);
|
|
392
392
|
for (let e = 0; e < i.length - 1; e++) {
|
|
393
393
|
let t = !1;
|
|
394
|
-
if (n.ignoreEndVertices && (e === 0 && (t = "start"), e === i.length - 2 && (t = "end"), e === 0 && e + 1 === i.length - 1 && (t = "both")),
|
|
394
|
+
if (n.ignoreEndVertices && (e === 0 && (t = "start"), e === i.length - 2 && (t = "end"), e === 0 && e + 1 === i.length - 1 && (t = "both")), Ge(i[e], i[e + 1], r, t, n.epsilon === void 0 ? null : n.epsilon)) return !0;
|
|
395
395
|
}
|
|
396
396
|
return !1;
|
|
397
397
|
}
|
|
398
|
-
function
|
|
398
|
+
function Ge(e, t, n, r, i) {
|
|
399
399
|
let a = n[0], o = n[1], s = e[0], c = e[1], l = t[0], u = t[1], d = n[0] - s, f = n[1] - c, p = l - s, m = u - c, h = d * m - f * p;
|
|
400
400
|
if (i !== null) {
|
|
401
401
|
if (Math.abs(h) > i) return !1;
|
|
@@ -404,25 +404,25 @@ function We(e, t, n, r, i) {
|
|
|
404
404
|
}
|
|
405
405
|
//#endregion
|
|
406
406
|
//#region node_modules/@turf/clean-coords/dist/esm/index.js
|
|
407
|
-
function
|
|
407
|
+
function Ke(e, t = {}) {
|
|
408
408
|
var n = typeof t == "object" ? t.mutate : t;
|
|
409
409
|
if (!e) throw Error("geojson is required");
|
|
410
|
-
var r =
|
|
410
|
+
var r = We(e), i = [];
|
|
411
411
|
switch (r) {
|
|
412
412
|
case "LineString":
|
|
413
|
-
i =
|
|
413
|
+
i = qe(e, r);
|
|
414
414
|
break;
|
|
415
415
|
case "MultiLineString":
|
|
416
416
|
case "Polygon":
|
|
417
417
|
H(e).forEach(function(e) {
|
|
418
|
-
i.push(
|
|
418
|
+
i.push(qe(e, r));
|
|
419
419
|
});
|
|
420
420
|
break;
|
|
421
421
|
case "MultiPolygon":
|
|
422
422
|
H(e).forEach(function(e) {
|
|
423
423
|
var t = [];
|
|
424
424
|
e.forEach(function(e) {
|
|
425
|
-
t.push(
|
|
425
|
+
t.push(qe(e, r));
|
|
426
426
|
}), i.push(t);
|
|
427
427
|
});
|
|
428
428
|
break;
|
|
@@ -439,7 +439,7 @@ function Ge(e, t = {}) {
|
|
|
439
439
|
return e.coordinates ? n === !0 ? (e.coordinates = i, e) : {
|
|
440
440
|
type: r,
|
|
441
441
|
coordinates: i
|
|
442
|
-
} : n === !0 ? (e.geometry.coordinates = i, e) :
|
|
442
|
+
} : n === !0 ? (e.geometry.coordinates = i, e) : L({
|
|
443
443
|
type: r,
|
|
444
444
|
coordinates: i
|
|
445
445
|
}, e.properties, {
|
|
@@ -447,31 +447,31 @@ function Ge(e, t = {}) {
|
|
|
447
447
|
id: e.id
|
|
448
448
|
});
|
|
449
449
|
}
|
|
450
|
-
function
|
|
450
|
+
function qe(e, t) {
|
|
451
451
|
let n = H(e);
|
|
452
|
-
if (n.length === 2 && !
|
|
452
|
+
if (n.length === 2 && !Je(n[0], n[1])) return n;
|
|
453
453
|
let r = [], i = 0, a = 1, o = 2;
|
|
454
|
-
for (r.push(n[i]); o < n.length;) W(n[a],
|
|
454
|
+
for (r.push(n[i]); o < n.length;) W(n[a], R([n[i], n[o]])) ? a = o : (r.push(n[a]), i = a, a++, o = a), o++;
|
|
455
455
|
if (r.push(n[a]), t === "Polygon" || t === "MultiPolygon") {
|
|
456
|
-
if (W(r[0],
|
|
457
|
-
if (!
|
|
456
|
+
if (W(r[0], R([r[1], r[r.length - 2]])) && (r.shift(), r.pop(), r.push(r[0])), r.length < 4) throw Error("invalid polygon, fewer than 4 points");
|
|
457
|
+
if (!Je(r[0], r[r.length - 1])) throw Error("invalid polygon, first and last points not equal");
|
|
458
458
|
}
|
|
459
459
|
return r;
|
|
460
460
|
}
|
|
461
|
-
function
|
|
461
|
+
function Je(e, t) {
|
|
462
462
|
return e[0] === t[0] && e[1] === t[1];
|
|
463
463
|
}
|
|
464
464
|
//#endregion
|
|
465
465
|
//#region node_modules/@turf/boolean-equal/dist/esm/index.js
|
|
466
|
-
function
|
|
466
|
+
function Ye(e, t, n = {}) {
|
|
467
467
|
let r = n.precision;
|
|
468
468
|
if (r = r == null || isNaN(r) ? 6 : r, typeof r != "number" || !(r >= 0)) throw Error("precision must be a positive number");
|
|
469
|
-
return U(e).type === U(t).type ?
|
|
469
|
+
return U(e).type === U(t).type ? Ve(Ke(e), Ke(t), { precision: r }) : !1;
|
|
470
470
|
}
|
|
471
|
-
var
|
|
471
|
+
var Xe = Ye;
|
|
472
472
|
//#endregion
|
|
473
473
|
//#region src/utils/feature-transform.ts
|
|
474
|
-
function
|
|
474
|
+
function Ze(e) {
|
|
475
475
|
return e.features.map((t) => {
|
|
476
476
|
if (t.id == null) {
|
|
477
477
|
console.warn("Skipping feature with null id");
|
|
@@ -488,7 +488,7 @@ function Xe(e) {
|
|
|
488
488
|
return;
|
|
489
489
|
}
|
|
490
490
|
let i = e.features.find((e) => e.properties.links === t.properties.links && e.id !== t.id);
|
|
491
|
-
return i?.geometry && t.geometry && (t.properties.geom = !
|
|
491
|
+
return i?.geometry && t.geometry && (t.properties.geom = !Xe(t.geometry, i.geometry)), t.id === r.before ? {
|
|
492
492
|
...t,
|
|
493
493
|
properties: {
|
|
494
494
|
...t.properties,
|
|
@@ -519,14 +519,14 @@ var G = {
|
|
|
519
519
|
delete: "#FF0000",
|
|
520
520
|
updateBefore: "#FFA479",
|
|
521
521
|
updateAfter: "#F2BE00"
|
|
522
|
-
},
|
|
522
|
+
}, Qe = Object.fromEntries([
|
|
523
523
|
"new",
|
|
524
524
|
"delete",
|
|
525
525
|
"updateAfter",
|
|
526
526
|
"updateBefore"
|
|
527
527
|
].map((e) => [e, e]));
|
|
528
|
-
function
|
|
529
|
-
let e =
|
|
528
|
+
function $e() {
|
|
529
|
+
let e = T(), n = T([]), r = t(() => e.value?.features.length);
|
|
530
530
|
function i(e) {
|
|
531
531
|
return e.reduce((e, t) => {
|
|
532
532
|
let n = t.properties.links;
|
|
@@ -537,7 +537,7 @@ function Qe() {
|
|
|
537
537
|
l();
|
|
538
538
|
let r = {
|
|
539
539
|
...t,
|
|
540
|
-
features:
|
|
540
|
+
features: Ze(t)
|
|
541
541
|
};
|
|
542
542
|
e.value = r, n.value = i(r.features);
|
|
543
543
|
}
|
|
@@ -548,7 +548,7 @@ function Qe() {
|
|
|
548
548
|
return e.filter((e) => e.properties.is_after || e.properties.is_new);
|
|
549
549
|
}
|
|
550
550
|
function c(e) {
|
|
551
|
-
return e.properties.is_new ?
|
|
551
|
+
return e.properties.is_new ? Qe.new : e.properties.deleted ? Qe.delete : e.properties.is_before ? Qe.updateBefore : Qe.updateAfter;
|
|
552
552
|
}
|
|
553
553
|
function l() {
|
|
554
554
|
e.value = void 0, n.value = [];
|
|
@@ -565,112 +565,116 @@ function Qe() {
|
|
|
565
565
|
}
|
|
566
566
|
//#endregion
|
|
567
567
|
//#region src/constants/injectionKeys.ts
|
|
568
|
-
var
|
|
568
|
+
var et = Symbol("reasonCollapsed"), tt = Symbol("loCha"), nt = Symbol("loChaInstanceId"), rt = Symbol("mapStyleUrl"), it = {
|
|
569
569
|
n: "node",
|
|
570
570
|
w: "way",
|
|
571
571
|
r: "relation"
|
|
572
572
|
};
|
|
573
|
-
function
|
|
574
|
-
return `https://www.openstreetmap.org/${
|
|
573
|
+
function at(e, t) {
|
|
574
|
+
return `https://www.openstreetmap.org/${it[e]}/${t}/history`;
|
|
575
575
|
}
|
|
576
|
-
function
|
|
576
|
+
function ot(e) {
|
|
577
577
|
return `https://www.openstreetmap.org/user/${encodeURIComponent(e)}`;
|
|
578
578
|
}
|
|
579
|
-
function ot(e, t) {
|
|
580
|
-
return `http://127.0.0.1:8111/load_object?objects=${e}${t}`;
|
|
581
|
-
}
|
|
582
579
|
function st(e, t) {
|
|
583
|
-
return `
|
|
580
|
+
return `http://127.0.0.1:8111/load_object?objects=${e}${t}`;
|
|
584
581
|
}
|
|
585
582
|
function ct(e, t) {
|
|
586
|
-
return `https://
|
|
583
|
+
return `https://osmlab.github.io/osm-deep-history/#/${it[e]}/${t}`;
|
|
584
|
+
}
|
|
585
|
+
function lt(e, t) {
|
|
586
|
+
return `https://pewu.github.io/osm-history/#/${it[e]}/${t}`;
|
|
587
587
|
}
|
|
588
588
|
//#endregion
|
|
589
589
|
//#region src/components/LoCha/LoChaObject.vue?vue&type=script&setup=true&lang.ts
|
|
590
|
-
var
|
|
590
|
+
var ut = { class: "locha-object" }, dt = { class: "header-row" }, ft = { class: "before-content" }, pt = { class: "wrap" }, mt = ["href"], ht = {
|
|
591
|
+
key: 1,
|
|
592
|
+
class: "fab"
|
|
593
|
+
}, gt = { class: "fab-menu" }, _t = ["href"], vt = ["href", "target"], yt = ["href"], bt = ["href"], xt = { class: "date" }, St = ["href", "title"], Ct = /* @__PURE__ */ l({
|
|
591
594
|
__name: "LoChaObject",
|
|
592
595
|
props: {
|
|
593
596
|
feature: {},
|
|
594
|
-
josmTarget: {}
|
|
597
|
+
josmTarget: {},
|
|
598
|
+
compact: { type: Boolean }
|
|
595
599
|
},
|
|
596
|
-
setup(
|
|
600
|
+
setup(n) {
|
|
597
601
|
ee((e) => ({
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
602
|
+
v5f3a8926: u.value,
|
|
603
|
+
v41a8bc86: M(G).delete,
|
|
604
|
+
v532f58a5: M(G).new
|
|
601
605
|
}));
|
|
602
|
-
let
|
|
603
|
-
switch (
|
|
606
|
+
let o = n, { getStatus: s } = p(tt), c = t(() => s(o.feature)), l = t(() => {
|
|
607
|
+
switch (c.value) {
|
|
604
608
|
case "new": return "new";
|
|
605
609
|
case "delete": return "deleted";
|
|
606
610
|
default: return "";
|
|
607
611
|
}
|
|
608
|
-
}),
|
|
609
|
-
return (t,
|
|
610
|
-
a("div",
|
|
612
|
+
}), u = t(() => G[c.value]);
|
|
613
|
+
return (t, s) => (S(), i("article", ut, [a("div", dt, [t.$slots.before ? (S(), i(e, { key: 0 }, [a("div", ft, [D(t.$slots, "before", {}, void 0, !0)]), s[6] ||= a("span", { class: "header-arrow" }, "→", -1)], 64)) : r("", !0), a("header", null, [
|
|
614
|
+
a("div", pt, [
|
|
611
615
|
a("a", {
|
|
612
|
-
href:
|
|
616
|
+
href: M(at)(n.feature.properties.objtype, n.feature.properties.id),
|
|
613
617
|
title: "OSM History",
|
|
614
618
|
target: "_blank",
|
|
615
|
-
onClick:
|
|
616
|
-
},
|
|
617
|
-
|
|
619
|
+
onClick: s[0] ||= F(() => {}, ["stop"])
|
|
620
|
+
}, k(`${n.feature.properties.objtype}${n.feature.properties.id}-v${n.feature.properties.version}`), 9, mt),
|
|
621
|
+
!n.compact && (c.value === "new" || c.value === "delete") ? (S(), i("div", {
|
|
618
622
|
key: 0,
|
|
619
623
|
class: g(["status-content", {
|
|
620
|
-
"object-new":
|
|
621
|
-
"object-deleted":
|
|
624
|
+
"object-new": c.value === "new",
|
|
625
|
+
"object-deleted": c.value === "delete"
|
|
622
626
|
}])
|
|
623
|
-
},
|
|
624
|
-
|
|
627
|
+
}, k(l.value), 3)) : r("", !0),
|
|
628
|
+
n.compact ? r("", !0) : (S(), i("div", ht, [s[7] ||= a("button", {
|
|
625
629
|
class: "fab-toggle",
|
|
626
630
|
type: "button",
|
|
627
631
|
title: "Tools"
|
|
628
|
-
}, " 🔧 Tools ", -1), a("div",
|
|
632
|
+
}, " 🔧 Tools ", -1), a("div", gt, [
|
|
629
633
|
a("a", {
|
|
630
|
-
href:
|
|
634
|
+
href: M(at)(n.feature.properties.objtype, n.feature.properties.id),
|
|
631
635
|
class: "action-btn",
|
|
632
636
|
title: "Edit in OSM iD",
|
|
633
637
|
target: "_blank",
|
|
634
|
-
onClick:
|
|
635
|
-
}, " OSM iD ", 8,
|
|
638
|
+
onClick: s[1] ||= F(() => {}, ["stop"])
|
|
639
|
+
}, " OSM iD ", 8, _t),
|
|
636
640
|
a("a", {
|
|
637
|
-
href:
|
|
641
|
+
href: M(st)(n.feature.properties.objtype, n.feature.properties.id),
|
|
638
642
|
class: "action-btn",
|
|
639
643
|
title: "Edit in JOSM",
|
|
640
|
-
target:
|
|
641
|
-
onClick:
|
|
642
|
-
}, " JOSM ", 8,
|
|
644
|
+
target: n.josmTarget || "hidden_josm_target",
|
|
645
|
+
onClick: s[2] ||= F(() => {}, ["stop"])
|
|
646
|
+
}, " JOSM ", 8, vt),
|
|
643
647
|
a("a", {
|
|
644
|
-
href:
|
|
648
|
+
href: M(ct)(n.feature.properties.objtype, n.feature.properties.id),
|
|
645
649
|
class: "action-btn",
|
|
646
650
|
title: "OSM Deep History",
|
|
647
651
|
target: "_blank",
|
|
648
|
-
onClick:
|
|
649
|
-
}, " Deep H ", 8,
|
|
652
|
+
onClick: s[3] ||= F(() => {}, ["stop"])
|
|
653
|
+
}, " Deep H ", 8, yt),
|
|
650
654
|
a("a", {
|
|
651
|
-
href:
|
|
655
|
+
href: M(lt)(n.feature.properties.objtype, n.feature.properties.id),
|
|
652
656
|
class: "action-btn",
|
|
653
657
|
title: "OSM History Viewer",
|
|
654
658
|
target: "_blank",
|
|
655
|
-
onClick:
|
|
656
|
-
}, " OSM H ", 8,
|
|
657
|
-
])])
|
|
659
|
+
onClick: s[4] ||= F(() => {}, ["stop"])
|
|
660
|
+
}, " OSM H ", 8, bt)
|
|
661
|
+
])]))
|
|
658
662
|
]),
|
|
659
|
-
a("p",
|
|
660
|
-
|
|
663
|
+
a("p", xt, " 📅 " + k(o.feature.properties.created), 1),
|
|
664
|
+
n.feature.properties.username ? (S(), i("a", {
|
|
661
665
|
key: 0,
|
|
662
|
-
href:
|
|
663
|
-
title: `View ${
|
|
666
|
+
href: M(ot)(n.feature.properties.username),
|
|
667
|
+
title: `View ${n.feature.properties.username} OSM profile`,
|
|
664
668
|
target: "_blank",
|
|
665
|
-
onClick:
|
|
666
|
-
}, " 👤" +
|
|
667
|
-
]),
|
|
669
|
+
onClick: s[5] ||= F(() => {}, ["stop"])
|
|
670
|
+
}, " 👤" + k(n.feature.properties.username), 9, St)) : r("", !0)
|
|
671
|
+
])]), n.compact ? r("", !0) : D(t.$slots, "object-detail", { key: 0 }, void 0, !0)]));
|
|
668
672
|
}
|
|
669
|
-
}),
|
|
673
|
+
}), wt = (e, t) => {
|
|
670
674
|
let n = e.__vccOpts || e;
|
|
671
675
|
for (let [e, r] of t) n[e] = r;
|
|
672
676
|
return n;
|
|
673
|
-
},
|
|
677
|
+
}, Tt = /* @__PURE__ */ wt(Ct, [["__scopeId", "data-v-094314b7"]]);
|
|
674
678
|
//#endregion
|
|
675
679
|
//#region node_modules/@turf/bbox/dist/esm/index.js
|
|
676
680
|
function K(e, t = {}) {
|
|
@@ -685,96 +689,96 @@ function K(e, t = {}) {
|
|
|
685
689
|
n[0] > e[0] && (n[0] = e[0]), n[1] > e[1] && (n[1] = e[1]), n[2] < e[0] && (n[2] = e[0]), n[3] < e[1] && (n[3] = e[1]);
|
|
686
690
|
}), n;
|
|
687
691
|
}
|
|
688
|
-
var
|
|
692
|
+
var Et = K;
|
|
689
693
|
//#endregion
|
|
690
694
|
//#region node_modules/@vueuse/shared/dist/index.js
|
|
691
|
-
function
|
|
692
|
-
return d() ? (
|
|
695
|
+
function Dt(e, t) {
|
|
696
|
+
return d() ? (b(e, t), !0) : !1;
|
|
693
697
|
}
|
|
694
|
-
var
|
|
698
|
+
var Ot = typeof window < "u" && typeof document < "u";
|
|
695
699
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
696
|
-
var
|
|
697
|
-
function
|
|
700
|
+
var kt = (e) => e != null, At = Object.prototype.toString, jt = (e) => At.call(e) === "[object Object]", Mt = () => {}, Nt = /* @__PURE__ */ Pt();
|
|
701
|
+
function Pt() {
|
|
698
702
|
var e, t;
|
|
699
|
-
return
|
|
703
|
+
return Ot && !!(!((e = window) == null || (e = e.navigator) == null) && e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((t = window) == null || (t = t.navigator) == null ? void 0 : t.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window?.navigator.userAgent));
|
|
700
704
|
}
|
|
701
|
-
function
|
|
702
|
-
if (e.length !== 1) return
|
|
705
|
+
function Ft(...e) {
|
|
706
|
+
if (e.length !== 1) return A(...e);
|
|
703
707
|
let t = e[0];
|
|
704
|
-
return typeof t == "function" ?
|
|
708
|
+
return typeof t == "function" ? w(c(() => ({
|
|
705
709
|
get: t,
|
|
706
|
-
set:
|
|
707
|
-
}))) :
|
|
710
|
+
set: Mt
|
|
711
|
+
}))) : T(t);
|
|
708
712
|
}
|
|
709
|
-
function
|
|
713
|
+
function It(e) {
|
|
710
714
|
return Array.isArray(e) ? e : [e];
|
|
711
715
|
}
|
|
712
|
-
function
|
|
713
|
-
return
|
|
716
|
+
function Lt(e, t, n) {
|
|
717
|
+
return N(e, t, {
|
|
714
718
|
...n,
|
|
715
719
|
immediate: !0
|
|
716
720
|
});
|
|
717
721
|
}
|
|
718
722
|
//#endregion
|
|
719
723
|
//#region node_modules/@vueuse/core/dist/index.js
|
|
720
|
-
var
|
|
721
|
-
|
|
722
|
-
function
|
|
723
|
-
let t =
|
|
724
|
+
var Rt = Ot ? window : void 0;
|
|
725
|
+
Ot && window.document, Ot && window.navigator, Ot && window.location;
|
|
726
|
+
function zt(e) {
|
|
727
|
+
let t = j(e);
|
|
724
728
|
return t?.$el ?? t;
|
|
725
729
|
}
|
|
726
|
-
function
|
|
730
|
+
function Bt(...e) {
|
|
727
731
|
let n = (e, t, n, r) => (e.addEventListener(t, n, r), () => e.removeEventListener(t, n, r)), r = t(() => {
|
|
728
|
-
let t =
|
|
732
|
+
let t = It(j(e[0])).filter((e) => e != null);
|
|
729
733
|
return t.every((e) => typeof e != "string") ? t : void 0;
|
|
730
734
|
});
|
|
731
|
-
return
|
|
732
|
-
r.value?.map((e) =>
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
735
|
+
return Lt(() => [
|
|
736
|
+
r.value?.map((e) => zt(e)) ?? [Rt].filter((e) => e != null),
|
|
737
|
+
It(j(r.value ? e[1] : e[0])),
|
|
738
|
+
It(M(r.value ? e[2] : e[1])),
|
|
739
|
+
j(r.value ? e[3] : e[2])
|
|
736
740
|
], ([e, t, r, i], a, o) => {
|
|
737
741
|
if (!e?.length || !t?.length || !r?.length) return;
|
|
738
|
-
let s =
|
|
742
|
+
let s = jt(i) ? { ...i } : i, c = e.flatMap((e) => t.flatMap((t) => r.map((r) => n(e, t, r, s))));
|
|
739
743
|
o(() => {
|
|
740
744
|
c.forEach((e) => e());
|
|
741
745
|
});
|
|
742
746
|
}, { flush: "post" });
|
|
743
747
|
}
|
|
744
|
-
function
|
|
745
|
-
let e =
|
|
746
|
-
return t &&
|
|
748
|
+
function Vt() {
|
|
749
|
+
let e = O(!1), t = u();
|
|
750
|
+
return t && y(() => {
|
|
747
751
|
e.value = !0;
|
|
748
752
|
}, t), e;
|
|
749
753
|
}
|
|
750
754
|
/* @__NO_SIDE_EFFECTS__ */
|
|
751
|
-
function
|
|
752
|
-
let n =
|
|
755
|
+
function Ht(e) {
|
|
756
|
+
let n = Vt();
|
|
753
757
|
return t(() => (n.value, !!e()));
|
|
754
758
|
}
|
|
755
|
-
function
|
|
756
|
-
let { root: i, rootMargin: a, threshold: o = 0, window: s =
|
|
759
|
+
function Ut(e, n, r = {}) {
|
|
760
|
+
let { root: i, rootMargin: a, threshold: o = 0, window: s = Rt, immediate: c = !0 } = r, l = /* @__PURE__ */ Ht(() => s && "IntersectionObserver" in s), u = t(() => It(j(e)).map(zt).filter(kt)), d = Mt, f = O(c), p = l.value ? N(() => [
|
|
757
761
|
u.value,
|
|
758
|
-
|
|
759
|
-
|
|
762
|
+
zt(i),
|
|
763
|
+
j(a),
|
|
760
764
|
f.value
|
|
761
765
|
], ([e, t, r]) => {
|
|
762
766
|
if (d(), !f.value || !e.length) return;
|
|
763
767
|
let i = new IntersectionObserver(n, {
|
|
764
|
-
root:
|
|
768
|
+
root: zt(t),
|
|
765
769
|
rootMargin: r,
|
|
766
770
|
threshold: o
|
|
767
771
|
});
|
|
768
772
|
e.forEach((e) => e && i.observe(e)), d = () => {
|
|
769
|
-
i.disconnect(), d =
|
|
773
|
+
i.disconnect(), d = Mt;
|
|
770
774
|
};
|
|
771
775
|
}, {
|
|
772
776
|
immediate: c,
|
|
773
777
|
flush: "post"
|
|
774
|
-
}) :
|
|
778
|
+
}) : Mt, m = () => {
|
|
775
779
|
d(), p(), f.value = !1;
|
|
776
780
|
};
|
|
777
|
-
return
|
|
781
|
+
return Dt(m), {
|
|
778
782
|
isSupported: l,
|
|
779
783
|
isActive: f,
|
|
780
784
|
pause() {
|
|
@@ -786,42 +790,42 @@ function Bt(e, n, r = {}) {
|
|
|
786
790
|
stop: m
|
|
787
791
|
};
|
|
788
792
|
}
|
|
789
|
-
function
|
|
793
|
+
function Wt(e) {
|
|
790
794
|
return typeof Window < "u" && e instanceof Window ? e.document.documentElement : typeof Document < "u" && e instanceof Document ? e.documentElement : e;
|
|
791
795
|
}
|
|
792
|
-
function
|
|
796
|
+
function Gt(e) {
|
|
793
797
|
let t = window.getComputedStyle(e);
|
|
794
798
|
if (t.overflowX === "scroll" || t.overflowY === "scroll" || t.overflowX === "auto" && e.clientWidth < e.scrollWidth || t.overflowY === "auto" && e.clientHeight < e.scrollHeight) return !0;
|
|
795
799
|
{
|
|
796
800
|
let t = e.parentNode;
|
|
797
|
-
return !t || t.tagName === "BODY" ? !1 :
|
|
801
|
+
return !t || t.tagName === "BODY" ? !1 : Gt(t);
|
|
798
802
|
}
|
|
799
803
|
}
|
|
800
|
-
function
|
|
804
|
+
function Kt(e) {
|
|
801
805
|
let t = e || window.event, n = t.target;
|
|
802
|
-
return
|
|
806
|
+
return Gt(n) ? !1 : t.touches.length > 1 ? !0 : (t.preventDefault && t.preventDefault(), !1);
|
|
803
807
|
}
|
|
804
|
-
var
|
|
805
|
-
function
|
|
806
|
-
let r =
|
|
807
|
-
|
|
808
|
-
let t =
|
|
808
|
+
var qt = /* @__PURE__ */ new WeakMap();
|
|
809
|
+
function Jt(e, n = !1) {
|
|
810
|
+
let r = O(n), i = null, a = "";
|
|
811
|
+
N(Ft(e), (e) => {
|
|
812
|
+
let t = Wt(j(e));
|
|
809
813
|
if (t) {
|
|
810
814
|
let e = t;
|
|
811
|
-
if (
|
|
815
|
+
if (qt.get(e) || qt.set(e, e.style.overflow), e.style.overflow !== "hidden" && (a = e.style.overflow), e.style.overflow === "hidden") return r.value = !0;
|
|
812
816
|
if (r.value) return e.style.overflow = "hidden";
|
|
813
817
|
}
|
|
814
818
|
}, { immediate: !0 });
|
|
815
819
|
let o = () => {
|
|
816
|
-
let t =
|
|
817
|
-
!t || r.value || (
|
|
818
|
-
|
|
820
|
+
let t = Wt(j(e));
|
|
821
|
+
!t || r.value || (Nt && (i = Bt(t, "touchmove", (e) => {
|
|
822
|
+
Kt(e);
|
|
819
823
|
}, { passive: !1 })), t.style.overflow = "hidden", r.value = !0);
|
|
820
824
|
}, s = () => {
|
|
821
|
-
let t =
|
|
822
|
-
!t || !r.value || (
|
|
825
|
+
let t = Wt(j(e));
|
|
826
|
+
!t || !r.value || (Nt && i?.(), t.style.overflow = a, qt.delete(t), r.value = !1);
|
|
823
827
|
};
|
|
824
|
-
return
|
|
828
|
+
return Dt(s), t({
|
|
825
829
|
get() {
|
|
826
830
|
return r.value;
|
|
827
831
|
},
|
|
@@ -832,31 +836,32 @@ function Gt(e, n = !1) {
|
|
|
832
836
|
}
|
|
833
837
|
//#endregion
|
|
834
838
|
//#region node_modules/@vueuse/components/dist/index.js
|
|
835
|
-
var
|
|
836
|
-
typeof t.value == "function" ?
|
|
839
|
+
var Yt = { mounted(e, t) {
|
|
840
|
+
typeof t.value == "function" ? Ut(e, t.value) : Ut(e, ...t.value);
|
|
837
841
|
} };
|
|
838
|
-
function
|
|
839
|
-
let e = !1, t =
|
|
842
|
+
function Xt() {
|
|
843
|
+
let e = !1, t = O(!1);
|
|
840
844
|
return (n, r) => {
|
|
841
845
|
if (t.value = r.value, e) return;
|
|
842
846
|
e = !0;
|
|
843
|
-
let i =
|
|
844
|
-
|
|
847
|
+
let i = Jt(n, r.value);
|
|
848
|
+
N(t, (e) => i.value = e);
|
|
845
849
|
};
|
|
846
850
|
}
|
|
847
|
-
|
|
851
|
+
Xt();
|
|
848
852
|
//#endregion
|
|
849
853
|
//#region src/constants/map.ts
|
|
850
|
-
var
|
|
854
|
+
var Zt = "https://maps.cartoway.com/styles/positron/style.json", Qt = "#f4f4f5", $t = "bbox", q = "lochas", J = {
|
|
851
855
|
Bbox: {
|
|
852
856
|
id: "bbox-layer",
|
|
853
857
|
type: "line",
|
|
854
|
-
source:
|
|
858
|
+
source: $t,
|
|
859
|
+
layout: { "line-join": "miter" },
|
|
855
860
|
paint: {
|
|
856
861
|
"line-color": "#000000",
|
|
857
862
|
"line-width": 1,
|
|
858
863
|
"line-dasharray": [2, 2],
|
|
859
|
-
"line-offset": -
|
|
864
|
+
"line-offset": -32
|
|
860
865
|
}
|
|
861
866
|
},
|
|
862
867
|
PolygonBorder: {
|
|
@@ -904,7 +909,7 @@ var Jt = "https://maps.cartoway.com/styles/positron/style.json", Yt = "#f4f4f5",
|
|
|
904
909
|
["get", "geom"],
|
|
905
910
|
!1
|
|
906
911
|
],
|
|
907
|
-
|
|
912
|
+
Qt,
|
|
908
913
|
[
|
|
909
914
|
"==",
|
|
910
915
|
["get", "is_new"],
|
|
@@ -945,7 +950,7 @@ var Jt = "https://maps.cartoway.com/styles/positron/style.json", Yt = "#f4f4f5",
|
|
|
945
950
|
["get", "geom"],
|
|
946
951
|
!1
|
|
947
952
|
],
|
|
948
|
-
|
|
953
|
+
Qt,
|
|
949
954
|
[
|
|
950
955
|
"==",
|
|
951
956
|
["get", "is_new"],
|
|
@@ -1071,7 +1076,7 @@ var Jt = "https://maps.cartoway.com/styles/positron/style.json", Yt = "#f4f4f5",
|
|
|
1071
1076
|
["get", "geom"],
|
|
1072
1077
|
!1
|
|
1073
1078
|
],
|
|
1074
|
-
|
|
1079
|
+
Qt,
|
|
1075
1080
|
[
|
|
1076
1081
|
"==",
|
|
1077
1082
|
["get", "is_new"],
|
|
@@ -1102,61 +1107,61 @@ var Jt = "https://maps.cartoway.com/styles/positron/style.json", Yt = "#f4f4f5",
|
|
|
1102
1107
|
};
|
|
1103
1108
|
//#endregion
|
|
1104
1109
|
//#region node_modules/@turf/bbox-clip/dist/esm/index.js
|
|
1105
|
-
function
|
|
1106
|
-
var r = e.length, i =
|
|
1110
|
+
function en(e, t, n) {
|
|
1111
|
+
var r = e.length, i = rn(e[0], t), a = [], o, s, c;
|
|
1107
1112
|
let l, u;
|
|
1108
1113
|
for (n ||= [], o = 1; o < r; o++) {
|
|
1109
|
-
for (l = e[o - 1], u = e[o], s = c =
|
|
1114
|
+
for (l = e[o - 1], u = e[o], s = c = rn(u, t);;) if (!(i | s)) {
|
|
1110
1115
|
a.push(l), s === c ? o === r - 1 && a.push(u) : (a.push(u), o < r - 1 && (n.push(a), a = []));
|
|
1111
1116
|
break;
|
|
1112
1117
|
} else if (i & s) break;
|
|
1113
|
-
else i ? (l =
|
|
1118
|
+
else i ? (l = nn(l, u, i, t), i = rn(l, t)) : (u = nn(l, u, s, t), s = rn(u, t));
|
|
1114
1119
|
i = c;
|
|
1115
1120
|
}
|
|
1116
1121
|
return a.length && n.push(a), n;
|
|
1117
1122
|
}
|
|
1118
|
-
function
|
|
1123
|
+
function tn(e, t) {
|
|
1119
1124
|
var n, r, i, a, o, s, c;
|
|
1120
1125
|
for (r = 1; r <= 8; r *= 2) {
|
|
1121
|
-
for (n = [], i = e[e.length - 1], a = !(
|
|
1126
|
+
for (n = [], i = e[e.length - 1], a = !(rn(i, t) & r), o = 0; o < e.length; o++) s = e[o], c = !(rn(s, t) & r), c !== a && n.push(nn(i, s, r, t)), c && n.push(s), i = s, a = c;
|
|
1122
1127
|
if (e = n, !e.length) break;
|
|
1123
1128
|
}
|
|
1124
1129
|
return n;
|
|
1125
1130
|
}
|
|
1126
|
-
function
|
|
1131
|
+
function nn(e, t, n, r) {
|
|
1127
1132
|
return n & 8 ? [e[0] + (t[0] - e[0]) * (r[3] - e[1]) / (t[1] - e[1]), r[3]] : n & 4 ? [e[0] + (t[0] - e[0]) * (r[1] - e[1]) / (t[1] - e[1]), r[1]] : n & 2 ? [r[2], e[1] + (t[1] - e[1]) * (r[2] - e[0]) / (t[0] - e[0])] : n & 1 ? [r[0], e[1] + (t[1] - e[1]) * (r[0] - e[0]) / (t[0] - e[0])] : null;
|
|
1128
1133
|
}
|
|
1129
|
-
function
|
|
1134
|
+
function rn(e, t) {
|
|
1130
1135
|
var n = 0;
|
|
1131
1136
|
return e[0] < t[0] ? n |= 1 : e[0] > t[2] && (n |= 2), e[1] < t[1] ? n |= 4 : e[1] > t[3] && (n |= 8), n;
|
|
1132
1137
|
}
|
|
1133
|
-
function
|
|
1138
|
+
function an(e, t) {
|
|
1134
1139
|
let n = U(e), r = n.type, i = e.type === "Feature" ? e.properties : {}, a = n.coordinates;
|
|
1135
1140
|
switch (r) {
|
|
1136
1141
|
case "LineString":
|
|
1137
1142
|
case "MultiLineString": {
|
|
1138
1143
|
let e = [];
|
|
1139
1144
|
return r === "LineString" && (a = [a]), a.forEach((n) => {
|
|
1140
|
-
|
|
1141
|
-
}), e.length === 1 ?
|
|
1145
|
+
en(n, t, e);
|
|
1146
|
+
}), e.length === 1 ? R(e[0], i) : _e(e, i);
|
|
1142
1147
|
}
|
|
1143
|
-
case "Polygon": return ge(
|
|
1144
|
-
case "MultiPolygon": return ve(a.map((e) =>
|
|
1148
|
+
case "Polygon": return ge(on(a, t), i);
|
|
1149
|
+
case "MultiPolygon": return ve(a.map((e) => on(e, t)), i);
|
|
1145
1150
|
default: throw Error("geometry " + r + " not supported");
|
|
1146
1151
|
}
|
|
1147
1152
|
}
|
|
1148
|
-
function
|
|
1153
|
+
function on(e, t) {
|
|
1149
1154
|
let n = [];
|
|
1150
1155
|
for (let r of e) {
|
|
1151
|
-
let e =
|
|
1156
|
+
let e = tn(r, t);
|
|
1152
1157
|
e.length > 0 && ((e[0][0] !== e[e.length - 1][0] || e[0][1] !== e[e.length - 1][1]) && e.push(e[0]), e.length >= 4 && n.push(e));
|
|
1153
1158
|
}
|
|
1154
1159
|
return n;
|
|
1155
1160
|
}
|
|
1156
|
-
var
|
|
1161
|
+
var sn = an;
|
|
1157
1162
|
//#endregion
|
|
1158
1163
|
//#region node_modules/@turf/bbox-polygon/dist/esm/index.js
|
|
1159
|
-
function
|
|
1164
|
+
function cn(e, t = {}) {
|
|
1160
1165
|
let n = Number(e[0]), r = Number(e[1]), i = Number(e[2]), a = Number(e[3]);
|
|
1161
1166
|
if (e.length === 6) throw Error("@turf/bbox-polygon does not support BBox with 6 positions");
|
|
1162
1167
|
let o = [n, r];
|
|
@@ -1171,8 +1176,8 @@ function an(e, t = {}) {
|
|
|
1171
1176
|
id: t.id
|
|
1172
1177
|
});
|
|
1173
1178
|
}
|
|
1174
|
-
var
|
|
1175
|
-
function
|
|
1179
|
+
var ln = cn, Y = 11102230246251565e-32, X = 134217729, un = (3 + 8 * Y) * Y;
|
|
1180
|
+
function dn(e, t, n, r, i) {
|
|
1176
1181
|
let a, o, s, c, l = t[0], u = r[0], d = 0, f = 0;
|
|
1177
1182
|
u > l == u > -l ? (a = l, l = t[++d]) : (a = u, u = r[++f]);
|
|
1178
1183
|
let p = 0;
|
|
@@ -1181,7 +1186,7 @@ function cn(e, t, n, r, i) {
|
|
|
1181
1186
|
for (; f < n;) o = a + u, c = o - a, s = a - (o - c) + (u - c), u = r[++f], a = o, s !== 0 && (i[p++] = s);
|
|
1182
1187
|
return (a !== 0 || p === 0) && (i[p++] = a), p;
|
|
1183
1188
|
}
|
|
1184
|
-
function
|
|
1189
|
+
function fn(e, t) {
|
|
1185
1190
|
let n = t[0];
|
|
1186
1191
|
for (let r = 1; r < e; r++) n += t[r];
|
|
1187
1192
|
return n;
|
|
@@ -1191,26 +1196,26 @@ function Z(e) {
|
|
|
1191
1196
|
}
|
|
1192
1197
|
//#endregion
|
|
1193
1198
|
//#region node_modules/robust-predicates/esm/orient2d.js
|
|
1194
|
-
var
|
|
1195
|
-
function
|
|
1199
|
+
var pn = (3 + 16 * Y) * Y, mn = (2 + 12 * Y) * Y, hn = (9 + 64 * Y) * Y * Y, gn = Z(4), _n = Z(8), vn = Z(12), yn = Z(16), Q = Z(4);
|
|
1200
|
+
function bn(e, t, n, r, i, a, o) {
|
|
1196
1201
|
let s, c, l, u, d, f, p, m, h, g, _, v, y, b, x, S, C, w, T = e - i, E = n - i, D = t - a, O = r - a;
|
|
1197
|
-
b = T * O, f = X * T, p = f - (f - T), m = T - p, f = X * O, h = f - (f - O), g = O - h, x = m * g - (b - p * h - m * h - p * g), S = D * E, f = X * D, p = f - (f - D), m = D - p, f = X * E, h = f - (f - E), g = E - h, C = m * g - (S - p * h - m * h - p * g), _ = x - C, d = x - _,
|
|
1198
|
-
let k =
|
|
1199
|
-
if (k >= A || -k >= A || (d = e - T, s = e - (T + d) + (d - i), d = n - E, l = n - (E + d) + (d - i), d = t - D, c = t - (D + d) + (d - a), d = r - O, u = r - (O + d) + (d - a), s === 0 && c === 0 && l === 0 && u === 0) || (A =
|
|
1202
|
+
b = T * O, f = X * T, p = f - (f - T), m = T - p, f = X * O, h = f - (f - O), g = O - h, x = m * g - (b - p * h - m * h - p * g), S = D * E, f = X * D, p = f - (f - D), m = D - p, f = X * E, h = f - (f - E), g = E - h, C = m * g - (S - p * h - m * h - p * g), _ = x - C, d = x - _, gn[0] = x - (_ + d) + (d - C), v = b + _, d = v - b, y = b - (v - d) + (_ - d), _ = y - S, d = y - _, gn[1] = y - (_ + d) + (d - S), w = v + _, d = w - v, gn[2] = v - (w - d) + (_ - d), gn[3] = w;
|
|
1203
|
+
let k = fn(4, gn), A = mn * o;
|
|
1204
|
+
if (k >= A || -k >= A || (d = e - T, s = e - (T + d) + (d - i), d = n - E, l = n - (E + d) + (d - i), d = t - D, c = t - (D + d) + (d - a), d = r - O, u = r - (O + d) + (d - a), s === 0 && c === 0 && l === 0 && u === 0) || (A = hn * o + un * Math.abs(k), k += T * u + O * s - (D * l + E * c), k >= A || -k >= A)) return k;
|
|
1200
1205
|
b = s * O, f = X * s, p = f - (f - s), m = s - p, f = X * O, h = f - (f - O), g = O - h, x = m * g - (b - p * h - m * h - p * g), S = c * E, f = X * c, p = f - (f - c), m = c - p, f = X * E, h = f - (f - E), g = E - h, C = m * g - (S - p * h - m * h - p * g), _ = x - C, d = x - _, Q[0] = x - (_ + d) + (d - C), v = b + _, d = v - b, y = b - (v - d) + (_ - d), _ = y - S, d = y - _, Q[1] = y - (_ + d) + (d - S), w = v + _, d = w - v, Q[2] = v - (w - d) + (_ - d), Q[3] = w;
|
|
1201
|
-
let j =
|
|
1206
|
+
let j = dn(4, gn, 4, Q, _n);
|
|
1202
1207
|
b = T * u, f = X * T, p = f - (f - T), m = T - p, f = X * u, h = f - (f - u), g = u - h, x = m * g - (b - p * h - m * h - p * g), S = D * l, f = X * D, p = f - (f - D), m = D - p, f = X * l, h = f - (f - l), g = l - h, C = m * g - (S - p * h - m * h - p * g), _ = x - C, d = x - _, Q[0] = x - (_ + d) + (d - C), v = b + _, d = v - b, y = b - (v - d) + (_ - d), _ = y - S, d = y - _, Q[1] = y - (_ + d) + (d - S), w = v + _, d = w - v, Q[2] = v - (w - d) + (_ - d), Q[3] = w;
|
|
1203
|
-
let
|
|
1204
|
-
return b = s * u, f = X * s, p = f - (f - s), m = s - p, f = X * u, h = f - (f - u), g = u - h, x = m * g - (b - p * h - m * h - p * g), S = c * l, f = X * c, p = f - (f - c), m = c - p, f = X * l, h = f - (f - l), g = l - h, C = m * g - (S - p * h - m * h - p * g), _ = x - C, d = x - _, Q[0] = x - (_ + d) + (d - C), v = b + _, d = v - b, y = b - (v - d) + (_ - d), _ = y - S, d = y - _, Q[1] = y - (_ + d) + (d - S), w = v + _, d = w - v, Q[2] = v - (w - d) + (_ - d), Q[3] = w,
|
|
1208
|
+
let M = dn(j, _n, 4, Q, vn);
|
|
1209
|
+
return b = s * u, f = X * s, p = f - (f - s), m = s - p, f = X * u, h = f - (f - u), g = u - h, x = m * g - (b - p * h - m * h - p * g), S = c * l, f = X * c, p = f - (f - c), m = c - p, f = X * l, h = f - (f - l), g = l - h, C = m * g - (S - p * h - m * h - p * g), _ = x - C, d = x - _, Q[0] = x - (_ + d) + (d - C), v = b + _, d = v - b, y = b - (v - d) + (_ - d), _ = y - S, d = y - _, Q[1] = y - (_ + d) + (d - S), w = v + _, d = w - v, Q[2] = v - (w - d) + (_ - d), Q[3] = w, yn[dn(M, vn, 4, Q, yn) - 1];
|
|
1205
1210
|
}
|
|
1206
|
-
function
|
|
1211
|
+
function xn(e, t, n, r, i, a) {
|
|
1207
1212
|
let o = (t - a) * (n - i), s = (e - i) * (r - a), c = o - s, l = Math.abs(o + s);
|
|
1208
|
-
return Math.abs(c) >=
|
|
1213
|
+
return Math.abs(c) >= pn * l ? c : -bn(e, t, n, r, i, a, l);
|
|
1209
1214
|
}
|
|
1210
1215
|
(7 + 56 * Y) * Y, (3 + 28 * Y) * Y, (26 + 288 * Y) * Y * Y, Z(4), Z(4), Z(4), Z(4), Z(4), Z(4), Z(4), Z(4), Z(4), Z(8), Z(8), Z(8), Z(4), Z(8), Z(8), Z(8), Z(12), Z(192), Z(192), (10 + 96 * Y) * Y, (4 + 48 * Y) * Y, (44 + 576 * Y) * Y * Y, Z(4), Z(4), Z(4), Z(4), Z(4), Z(4), Z(4), Z(4), Z(8), Z(8), Z(8), Z(8), Z(8), Z(8), Z(8), Z(8), Z(8), Z(4), Z(4), Z(4), Z(8), Z(16), Z(16), Z(16), Z(32), Z(32), Z(48), Z(64), Z(1152), Z(1152), (16 + 224 * Y) * Y, (5 + 72 * Y) * Y, (71 + 1408 * Y) * Y * Y, Z(4), Z(4), Z(4), Z(4), Z(4), Z(4), Z(4), Z(4), Z(4), Z(4), Z(24), Z(24), Z(24), Z(24), Z(24), Z(24), Z(24), Z(24), Z(24), Z(24), Z(1152), Z(1152), Z(1152), Z(1152), Z(1152), Z(2304), Z(2304), Z(3456), Z(5760), Z(8), Z(8), Z(8), Z(16), Z(24), Z(48), Z(48), Z(96), Z(192), Z(384), Z(384), Z(384), Z(768), Z(96), Z(96), Z(96), Z(1152);
|
|
1211
1216
|
//#endregion
|
|
1212
1217
|
//#region node_modules/point-in-polygon-hao/dist/esm/index.js
|
|
1213
|
-
function
|
|
1218
|
+
function Sn(e, t) {
|
|
1214
1219
|
var n, r, i = 0, a, o, s, c, l, u, d, f = e[0], p = e[1], m = t.length;
|
|
1215
1220
|
for (n = 0; n < m; n++) {
|
|
1216
1221
|
r = 0;
|
|
@@ -1220,7 +1225,7 @@ function yn(e, t) {
|
|
|
1220
1225
|
if (d = h[r + 1], c = d[0] - f, l = d[1] - p, s === 0 && l === 0) {
|
|
1221
1226
|
if (c <= 0 && o >= 0 || o <= 0 && c >= 0) return 0;
|
|
1222
1227
|
} else if (l >= 0 && s <= 0 || l <= 0 && s >= 0) {
|
|
1223
|
-
if (a =
|
|
1228
|
+
if (a = xn(o, c, s, l, 0, 0), a === 0) return 0;
|
|
1224
1229
|
(a > 0 && l > 0 && s <= 0 || a < 0 && l <= 0 && s > 0) && i++;
|
|
1225
1230
|
}
|
|
1226
1231
|
u = d, s = l, o = c;
|
|
@@ -1230,26 +1235,26 @@ function yn(e, t) {
|
|
|
1230
1235
|
}
|
|
1231
1236
|
//#endregion
|
|
1232
1237
|
//#region node_modules/@turf/boolean-point-in-polygon/dist/esm/index.js
|
|
1233
|
-
function
|
|
1238
|
+
function Cn(e, t, n = {}) {
|
|
1234
1239
|
if (!e) throw Error("point is required");
|
|
1235
1240
|
if (!t) throw Error("polygon is required");
|
|
1236
1241
|
let r = V(e), i = U(t), a = i.type, o = t.bbox, s = i.coordinates;
|
|
1237
|
-
if (o &&
|
|
1242
|
+
if (o && wn(r, o) === !1) return !1;
|
|
1238
1243
|
a === "Polygon" && (s = [s]);
|
|
1239
1244
|
let c = !1;
|
|
1240
1245
|
for (var l = 0; l < s.length; ++l) {
|
|
1241
|
-
let e =
|
|
1246
|
+
let e = Sn(r, s[l]);
|
|
1242
1247
|
if (e === 0) return !n.ignoreBoundary;
|
|
1243
1248
|
e && (c = !0);
|
|
1244
1249
|
}
|
|
1245
1250
|
return c;
|
|
1246
1251
|
}
|
|
1247
|
-
function
|
|
1252
|
+
function wn(e, t) {
|
|
1248
1253
|
return t[0] <= e[0] && t[1] <= e[1] && t[2] >= e[0] && t[3] >= e[1];
|
|
1249
1254
|
}
|
|
1250
1255
|
//#endregion
|
|
1251
1256
|
//#region node_modules/@turf/geojson-rbush/dist/esm/index.js
|
|
1252
|
-
var
|
|
1257
|
+
var Tn = /* @__PURE__ */ pe((/* @__PURE__ */ de(((e, t) => {
|
|
1253
1258
|
(function(n, r) {
|
|
1254
1259
|
typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n ||= self).RBush = r();
|
|
1255
1260
|
})(e, function() {
|
|
@@ -1467,7 +1472,7 @@ var Sn = /* @__PURE__ */ pe((/* @__PURE__ */ de(((e, t) => {
|
|
|
1467
1472
|
}, r;
|
|
1468
1473
|
});
|
|
1469
1474
|
})))(), 1);
|
|
1470
|
-
function
|
|
1475
|
+
function En(e) {
|
|
1471
1476
|
var t;
|
|
1472
1477
|
if (e.bbox) t = e.bbox;
|
|
1473
1478
|
else if (Array.isArray(e) && e.length === 4) t = e;
|
|
@@ -1487,9 +1492,9 @@ function Cn(e) {
|
|
|
1487
1492
|
maxY: t[3]
|
|
1488
1493
|
};
|
|
1489
1494
|
}
|
|
1490
|
-
var
|
|
1495
|
+
var Dn = class {
|
|
1491
1496
|
constructor(e = 9) {
|
|
1492
|
-
this.tree = new
|
|
1497
|
+
this.tree = new Tn.default(e), this.tree.toBBox = En;
|
|
1493
1498
|
}
|
|
1494
1499
|
insert(e) {
|
|
1495
1500
|
if (e.type !== "Feature") throw Error("invalid feature");
|
|
@@ -1513,13 +1518,13 @@ var wn = class {
|
|
|
1513
1518
|
return this.tree.clear(), this;
|
|
1514
1519
|
}
|
|
1515
1520
|
search(e) {
|
|
1516
|
-
return
|
|
1521
|
+
return z(this.tree.search(En(e)));
|
|
1517
1522
|
}
|
|
1518
1523
|
collides(e) {
|
|
1519
|
-
return this.tree.collides(
|
|
1524
|
+
return this.tree.collides(En(e));
|
|
1520
1525
|
}
|
|
1521
1526
|
all() {
|
|
1522
|
-
return
|
|
1527
|
+
return z(this.tree.all());
|
|
1523
1528
|
}
|
|
1524
1529
|
toJSON() {
|
|
1525
1530
|
return this.tree.toJSON();
|
|
@@ -1528,12 +1533,12 @@ var wn = class {
|
|
|
1528
1533
|
return this.tree.fromJSON(e), this;
|
|
1529
1534
|
}
|
|
1530
1535
|
};
|
|
1531
|
-
function
|
|
1532
|
-
return new
|
|
1536
|
+
function On(e) {
|
|
1537
|
+
return new Dn(e);
|
|
1533
1538
|
}
|
|
1534
1539
|
//#endregion
|
|
1535
1540
|
//#region node_modules/@turf/truncate/dist/esm/index.js
|
|
1536
|
-
function
|
|
1541
|
+
function kn(e, t) {
|
|
1537
1542
|
if (t ??= {}, !Se(t)) throw Error("options is invalid");
|
|
1538
1543
|
var n = t.precision, r = t.coordinates, i = t.mutate;
|
|
1539
1544
|
if (n = n == null || isNaN(n) ? 6 : n, r = r == null || isNaN(r) ? 3 : r, !e) throw Error("<geojson> is required");
|
|
@@ -1542,24 +1547,24 @@ function En(e, t) {
|
|
|
1542
1547
|
(i === !1 || i === void 0) && (e = JSON.parse(JSON.stringify(e)));
|
|
1543
1548
|
var a = 10 ** n;
|
|
1544
1549
|
return Ce(e, function(e) {
|
|
1545
|
-
|
|
1550
|
+
An(e, a, r);
|
|
1546
1551
|
}), e;
|
|
1547
1552
|
}
|
|
1548
|
-
function
|
|
1553
|
+
function An(e, t, n) {
|
|
1549
1554
|
e.length > n && e.splice(n, e.length);
|
|
1550
1555
|
for (var r = 0; r < e.length; r++) e[r] = Math.round(e[r] * t) / t;
|
|
1551
1556
|
return e;
|
|
1552
1557
|
}
|
|
1553
1558
|
//#endregion
|
|
1554
1559
|
//#region node_modules/@turf/line-segment/dist/esm/index.js
|
|
1555
|
-
function
|
|
1560
|
+
function jn(e) {
|
|
1556
1561
|
if (!e) throw Error("geojson is required");
|
|
1557
1562
|
let t = [];
|
|
1558
1563
|
return Oe(e, (e) => {
|
|
1559
|
-
|
|
1560
|
-
}),
|
|
1564
|
+
Mn(e, t);
|
|
1565
|
+
}), z(t);
|
|
1561
1566
|
}
|
|
1562
|
-
function
|
|
1567
|
+
function Mn(e, t) {
|
|
1563
1568
|
let n = [], r = e.geometry;
|
|
1564
1569
|
if (r !== null) {
|
|
1565
1570
|
switch (r.type) {
|
|
@@ -1569,20 +1574,20 @@ function kn(e, t) {
|
|
|
1569
1574
|
case "LineString": n = [H(r)];
|
|
1570
1575
|
}
|
|
1571
1576
|
n.forEach((n) => {
|
|
1572
|
-
|
|
1577
|
+
Nn(n, e.properties).forEach((e) => {
|
|
1573
1578
|
e.id = t.length, t.push(e);
|
|
1574
1579
|
});
|
|
1575
1580
|
});
|
|
1576
1581
|
}
|
|
1577
1582
|
}
|
|
1578
|
-
function
|
|
1583
|
+
function Nn(e, t) {
|
|
1579
1584
|
let n = [];
|
|
1580
1585
|
return e.reduce((e, r) => {
|
|
1581
|
-
let i =
|
|
1582
|
-
return i.bbox =
|
|
1586
|
+
let i = R([e, r], t);
|
|
1587
|
+
return i.bbox = Pn(e, r), n.push(i), r;
|
|
1583
1588
|
}), n;
|
|
1584
1589
|
}
|
|
1585
|
-
function
|
|
1590
|
+
function Pn(e, t) {
|
|
1586
1591
|
let n = e[0], r = e[1], i = t[0], a = t[1];
|
|
1587
1592
|
return [
|
|
1588
1593
|
n < i ? n : i,
|
|
@@ -1593,8 +1598,8 @@ function jn(e, t) {
|
|
|
1593
1598
|
}
|
|
1594
1599
|
//#endregion
|
|
1595
1600
|
//#region node_modules/sweepline-intersections/dist/sweeplineIntersections.esm.js
|
|
1596
|
-
var
|
|
1597
|
-
constructor(e = [], t =
|
|
1601
|
+
var Fn = class {
|
|
1602
|
+
constructor(e = [], t = In) {
|
|
1598
1603
|
if (this.data = e, this.length = this.data.length, this.compare = t, this.length > 0) for (let e = (this.length >> 1) - 1; e >= 0; e--) this._down(e);
|
|
1599
1604
|
}
|
|
1600
1605
|
push(e) {
|
|
@@ -1627,16 +1632,16 @@ var Mn = class {
|
|
|
1627
1632
|
t[e] = i;
|
|
1628
1633
|
}
|
|
1629
1634
|
};
|
|
1630
|
-
function
|
|
1635
|
+
function In(e, t) {
|
|
1631
1636
|
return e < t ? -1 : e > t ? 1 : 0;
|
|
1632
1637
|
}
|
|
1633
|
-
function
|
|
1638
|
+
function Ln(e, t) {
|
|
1634
1639
|
return e.p.x > t.p.x ? 1 : e.p.x < t.p.x ? -1 : e.p.y === t.p.y || e.p.y > t.p.y ? 1 : -1;
|
|
1635
1640
|
}
|
|
1636
|
-
function
|
|
1641
|
+
function Rn(e, t) {
|
|
1637
1642
|
return e.rightSweepEvent.p.x > t.rightSweepEvent.p.x ? 1 : e.rightSweepEvent.p.x < t.rightSweepEvent.p.x ? -1 : e.rightSweepEvent.p.y === t.rightSweepEvent.p.y || e.rightSweepEvent.p.y < t.rightSweepEvent.p.y ? 1 : -1;
|
|
1638
1643
|
}
|
|
1639
|
-
var
|
|
1644
|
+
var zn = class {
|
|
1640
1645
|
constructor(e, t, n, r) {
|
|
1641
1646
|
this.p = {
|
|
1642
1647
|
x: e[0],
|
|
@@ -1647,50 +1652,50 @@ var In = class {
|
|
|
1647
1652
|
return this.p.x === e.p.x && this.p.y === e.p.y;
|
|
1648
1653
|
}
|
|
1649
1654
|
};
|
|
1650
|
-
function
|
|
1655
|
+
function Bn(e, t) {
|
|
1651
1656
|
if (e.type === "FeatureCollection") {
|
|
1652
1657
|
let n = e.features;
|
|
1653
|
-
for (let e = 0; e < n.length; e++)
|
|
1654
|
-
} else
|
|
1658
|
+
for (let e = 0; e < n.length; e++) Wn(n[e], t);
|
|
1659
|
+
} else Wn(e, t);
|
|
1655
1660
|
}
|
|
1656
|
-
var
|
|
1657
|
-
function
|
|
1661
|
+
var Vn = 0, Hn = 0, Un = 0;
|
|
1662
|
+
function Wn(e, t) {
|
|
1658
1663
|
let n = e.type === "Feature" ? e.geometry : e, r = n.coordinates;
|
|
1659
1664
|
(n.type === "Polygon" || n.type === "MultiLineString") && (r = [r]), n.type === "LineString" && (r = [[r]]);
|
|
1660
1665
|
for (let e = 0; e < r.length; e++) for (let n = 0; n < r[e].length; n++) {
|
|
1661
1666
|
let i = r[e][n][0], a = null;
|
|
1662
|
-
|
|
1667
|
+
Hn += 1;
|
|
1663
1668
|
for (let o = 0; o < r[e][n].length - 1; o++) {
|
|
1664
1669
|
a = r[e][n][o + 1];
|
|
1665
|
-
let s = new
|
|
1666
|
-
s.otherEvent = c, c.otherEvent = s,
|
|
1670
|
+
let s = new zn(i, Vn, Hn, Un), c = new zn(a, Vn, Hn, Un + 1);
|
|
1671
|
+
s.otherEvent = c, c.otherEvent = s, Ln(s, c) > 0 ? (c.isLeftEndpoint = !0, s.isLeftEndpoint = !1) : (s.isLeftEndpoint = !0, c.isLeftEndpoint = !1), t.push(s), t.push(c), i = a, Un += 1;
|
|
1667
1672
|
}
|
|
1668
1673
|
}
|
|
1669
|
-
|
|
1674
|
+
Vn += 1;
|
|
1670
1675
|
}
|
|
1671
|
-
var
|
|
1676
|
+
var Gn = class {
|
|
1672
1677
|
constructor(e) {
|
|
1673
1678
|
this.leftSweepEvent = e, this.rightSweepEvent = e.otherEvent;
|
|
1674
1679
|
}
|
|
1675
1680
|
};
|
|
1676
|
-
function
|
|
1681
|
+
function Kn(e, t) {
|
|
1677
1682
|
if (e === null || t === null || e.leftSweepEvent.ringId === t.leftSweepEvent.ringId && (e.rightSweepEvent.isSamePoint(t.leftSweepEvent) || e.rightSweepEvent.isSamePoint(t.leftSweepEvent) || e.rightSweepEvent.isSamePoint(t.rightSweepEvent) || e.leftSweepEvent.isSamePoint(t.leftSweepEvent) || e.leftSweepEvent.isSamePoint(t.rightSweepEvent))) return !1;
|
|
1678
1683
|
let n = e.leftSweepEvent.p.x, r = e.leftSweepEvent.p.y, i = e.rightSweepEvent.p.x, a = e.rightSweepEvent.p.y, o = t.leftSweepEvent.p.x, s = t.leftSweepEvent.p.y, c = t.rightSweepEvent.p.x, l = t.rightSweepEvent.p.y, u = (l - s) * (i - n) - (c - o) * (a - r), d = (c - o) * (r - s) - (l - s) * (n - o), f = (i - n) * (r - s) - (a - r) * (n - o);
|
|
1679
1684
|
if (u === 0) return !1;
|
|
1680
1685
|
let p = d / u, m = f / u;
|
|
1681
1686
|
return p >= 0 && p <= 1 && m >= 0 && m <= 1 ? [n + p * (i - n), r + p * (a - r)] : !1;
|
|
1682
1687
|
}
|
|
1683
|
-
function
|
|
1688
|
+
function qn(e, t) {
|
|
1684
1689
|
t ||= !1;
|
|
1685
|
-
let n = [], r = new
|
|
1690
|
+
let n = [], r = new Fn([], Rn);
|
|
1686
1691
|
for (; e.length;) {
|
|
1687
1692
|
let i = e.pop();
|
|
1688
1693
|
if (i.isLeftEndpoint) {
|
|
1689
|
-
let e = new
|
|
1694
|
+
let e = new Gn(i);
|
|
1690
1695
|
for (let a = 0; a < r.data.length; a++) {
|
|
1691
1696
|
let o = r.data[a];
|
|
1692
1697
|
if (t && o.leftSweepEvent.featureId === i.featureId) continue;
|
|
1693
|
-
let s =
|
|
1698
|
+
let s = Kn(e, o);
|
|
1694
1699
|
s !== !1 && n.push(s);
|
|
1695
1700
|
}
|
|
1696
1701
|
r.push(e);
|
|
@@ -1698,17 +1703,17 @@ function Wn(e, t) {
|
|
|
1698
1703
|
}
|
|
1699
1704
|
return n;
|
|
1700
1705
|
}
|
|
1701
|
-
function
|
|
1702
|
-
let n = new
|
|
1703
|
-
return
|
|
1706
|
+
function Jn(e, t) {
|
|
1707
|
+
let n = new Fn([], Ln);
|
|
1708
|
+
return Bn(e, n), qn(n, t);
|
|
1704
1709
|
}
|
|
1705
1710
|
//#endregion
|
|
1706
1711
|
//#region node_modules/@turf/line-intersect/dist/esm/index.js
|
|
1707
|
-
var
|
|
1708
|
-
function
|
|
1712
|
+
var Yn = Jn;
|
|
1713
|
+
function Xn(e, t, n = {}) {
|
|
1709
1714
|
let { removeDuplicates: r = !0, ignoreSelfIntersections: i = !0 } = n, a = [];
|
|
1710
|
-
e.type === "FeatureCollection" ? a = a.concat(e.features) : e.type === "Feature" ? a.push(e) : (e.type === "LineString" || e.type === "Polygon" || e.type === "MultiLineString" || e.type === "MultiPolygon") && a.push(
|
|
1711
|
-
let o =
|
|
1715
|
+
e.type === "FeatureCollection" ? a = a.concat(e.features) : e.type === "Feature" ? a.push(e) : (e.type === "LineString" || e.type === "Polygon" || e.type === "MultiLineString" || e.type === "MultiPolygon") && a.push(L(e)), t.type === "FeatureCollection" ? a = a.concat(t.features) : t.type === "Feature" ? a.push(t) : (t.type === "LineString" || t.type === "Polygon" || t.type === "MultiLineString" || t.type === "MultiPolygon") && a.push(L(t));
|
|
1716
|
+
let o = Yn(z(a), i), s = [];
|
|
1712
1717
|
if (r) {
|
|
1713
1718
|
let e = {};
|
|
1714
1719
|
o.forEach((t) => {
|
|
@@ -1716,27 +1721,27 @@ function qn(e, t, n = {}) {
|
|
|
1716
1721
|
e[n] || (e[n] = !0, s.push(t));
|
|
1717
1722
|
});
|
|
1718
1723
|
} else s = o;
|
|
1719
|
-
return
|
|
1724
|
+
return z(s.map((e) => he(e)));
|
|
1720
1725
|
}
|
|
1721
1726
|
//#endregion
|
|
1722
1727
|
//#region node_modules/@turf/distance/dist/esm/index.js
|
|
1723
|
-
function
|
|
1724
|
-
var r = V(e), i = V(t), a =
|
|
1728
|
+
function Zn(e, t, n = {}) {
|
|
1729
|
+
var r = V(e), i = V(t), a = B(i[1] - r[1]), o = B(i[0] - r[0]), s = B(r[1]), c = B(i[1]), l = Math.sin(a / 2) ** 2 + Math.sin(o / 2) ** 2 * Math.cos(s) * Math.cos(c);
|
|
1725
1730
|
return ye(2 * Math.atan2(Math.sqrt(l), Math.sqrt(1 - l)), n.units);
|
|
1726
1731
|
}
|
|
1727
1732
|
//#endregion
|
|
1728
1733
|
//#region node_modules/@turf/nearest-point-on-line/dist/esm/index.js
|
|
1729
|
-
var
|
|
1734
|
+
var Qn = Object.defineProperty, $n = Object.defineProperties, er = Object.getOwnPropertyDescriptors, tr = Object.getOwnPropertySymbols, nr = Object.prototype.hasOwnProperty, rr = Object.prototype.propertyIsEnumerable, ir = (e, t, n) => t in e ? Qn(e, t, {
|
|
1730
1735
|
enumerable: !0,
|
|
1731
1736
|
configurable: !0,
|
|
1732
1737
|
writable: !0,
|
|
1733
1738
|
value: n
|
|
1734
|
-
}) : e[t] = n,
|
|
1735
|
-
for (var n in t ||= {})
|
|
1736
|
-
if (
|
|
1739
|
+
}) : e[t] = n, ar = (e, t) => {
|
|
1740
|
+
for (var n in t ||= {}) nr.call(t, n) && ir(e, n, t[n]);
|
|
1741
|
+
if (tr) for (var n of tr(t)) rr.call(t, n) && ir(e, n, t[n]);
|
|
1737
1742
|
return e;
|
|
1738
|
-
},
|
|
1739
|
-
function
|
|
1743
|
+
}, or = (e, t) => $n(e, er(t));
|
|
1744
|
+
function sr(e, t, n = {}) {
|
|
1740
1745
|
if (!e || !t) throw Error("lines and inputPoint are required arguments");
|
|
1741
1746
|
let r = V(t), i = he([Infinity, Infinity], {
|
|
1742
1747
|
lineStringIndex: -1,
|
|
@@ -1754,11 +1759,11 @@ function ir(e, t, n = {}) {
|
|
|
1754
1759
|
s !== l && (s = l, o = 0);
|
|
1755
1760
|
let u = H(e);
|
|
1756
1761
|
for (let e = 0; e < u.length - 1; e++) {
|
|
1757
|
-
let s = he(u[e]), c = V(s), d = he(u[e + 1]), f = V(d), p =
|
|
1758
|
-
f[0] === r[0] && f[1] === r[1] ? [m, h] = [f, !0] : c[0] === r[0] && c[1] === r[1] ? [m, h] = [c, !1] : [m, h] =
|
|
1759
|
-
let g =
|
|
1762
|
+
let s = he(u[e]), c = V(s), d = he(u[e + 1]), f = V(d), p = Zn(s, d, n), m, h;
|
|
1763
|
+
f[0] === r[0] && f[1] === r[1] ? [m, h] = [f, !0] : c[0] === r[0] && c[1] === r[1] ? [m, h] = [c, !1] : [m, h] = pr(c, f, r);
|
|
1764
|
+
let g = Zn(t, m, n);
|
|
1760
1765
|
if (g < i.properties.pointDistance) {
|
|
1761
|
-
let t =
|
|
1766
|
+
let t = Zn(s, m, n);
|
|
1762
1767
|
i = he(m, {
|
|
1763
1768
|
lineStringIndex: l,
|
|
1764
1769
|
segmentIndex: h ? e + 1 : e,
|
|
@@ -1770,7 +1775,7 @@ function ir(e, t, n = {}) {
|
|
|
1770
1775
|
index: -1,
|
|
1771
1776
|
location: -1,
|
|
1772
1777
|
dist: Infinity
|
|
1773
|
-
}), i.properties =
|
|
1778
|
+
}), i.properties = or(ar({}, i.properties), {
|
|
1774
1779
|
multiFeatureIndex: i.properties.lineStringIndex,
|
|
1775
1780
|
index: i.properties.segmentIndex,
|
|
1776
1781
|
location: i.properties.totalDistance,
|
|
@@ -1785,7 +1790,7 @@ function $(e, t) {
|
|
|
1785
1790
|
let [n, r, i] = e, [a, o, s] = t;
|
|
1786
1791
|
return n * a + r * o + i * s;
|
|
1787
1792
|
}
|
|
1788
|
-
function
|
|
1793
|
+
function cr(e, t) {
|
|
1789
1794
|
let [n, r, i] = e, [a, o, s] = t;
|
|
1790
1795
|
return [
|
|
1791
1796
|
r * s - i * o,
|
|
@@ -1793,163 +1798,163 @@ function ar(e, t) {
|
|
|
1793
1798
|
n * o - r * a
|
|
1794
1799
|
];
|
|
1795
1800
|
}
|
|
1796
|
-
function
|
|
1801
|
+
function lr(e) {
|
|
1797
1802
|
return Math.sqrt(e[0] ** 2 + e[1] ** 2 + e[2] ** 2);
|
|
1798
1803
|
}
|
|
1799
|
-
function
|
|
1800
|
-
let t =
|
|
1804
|
+
function ur(e) {
|
|
1805
|
+
let t = lr(e);
|
|
1801
1806
|
return [
|
|
1802
1807
|
e[0] / t,
|
|
1803
1808
|
e[1] / t,
|
|
1804
1809
|
e[2] / t
|
|
1805
1810
|
];
|
|
1806
1811
|
}
|
|
1807
|
-
function
|
|
1808
|
-
let t =
|
|
1812
|
+
function dr(e) {
|
|
1813
|
+
let t = B(e[1]), n = B(e[0]);
|
|
1809
1814
|
return [
|
|
1810
1815
|
Math.cos(t) * Math.cos(n),
|
|
1811
1816
|
Math.cos(t) * Math.sin(n),
|
|
1812
1817
|
Math.sin(t)
|
|
1813
1818
|
];
|
|
1814
1819
|
}
|
|
1815
|
-
function
|
|
1820
|
+
function fr(e) {
|
|
1816
1821
|
let [t, n, r] = e, i = Math.min(Math.max(r, -1), 1), a = be(Math.asin(i));
|
|
1817
1822
|
return [be(Math.atan2(n, t)), a];
|
|
1818
1823
|
}
|
|
1819
|
-
function
|
|
1820
|
-
let r =
|
|
1824
|
+
function pr(e, t, n) {
|
|
1825
|
+
let r = dr(e), i = dr(t), a = dr(n), o = cr(r, i);
|
|
1821
1826
|
if (o[0] === 0 && o[1] === 0 && o[2] === 0) return $(r, i) > 0 ? [[...t], !0] : [[...n], !1];
|
|
1822
|
-
let s =
|
|
1827
|
+
let s = cr(o, a);
|
|
1823
1828
|
if (s[0] === 0 && s[1] === 0 && s[2] === 0) return [[...t], !0];
|
|
1824
|
-
let c =
|
|
1829
|
+
let c = ur(cr(s, o)), l = [
|
|
1825
1830
|
-c[0],
|
|
1826
1831
|
-c[1],
|
|
1827
1832
|
-c[2]
|
|
1828
|
-
], u = $(a, c) > $(a, l) ? c : l, d =
|
|
1829
|
-
return f >= 0 && p >= 0 ? [
|
|
1833
|
+
], u = $(a, c) > $(a, l) ? c : l, d = ur(o), f = $(cr(r, u), d), p = $(cr(u, i), d);
|
|
1834
|
+
return f >= 0 && p >= 0 ? [fr(u), !1] : $(r, a) > $(i, a) ? [[...e], !1] : [[...t], !0];
|
|
1830
1835
|
}
|
|
1831
1836
|
//#endregion
|
|
1832
1837
|
//#region node_modules/@turf/line-split/dist/esm/index.js
|
|
1833
|
-
function
|
|
1838
|
+
function mr(e, t) {
|
|
1834
1839
|
if (!e) throw Error("line is required");
|
|
1835
1840
|
if (!t) throw Error("splitter is required");
|
|
1836
|
-
let n =
|
|
1841
|
+
let n = We(e), r = We(t);
|
|
1837
1842
|
if (n !== "LineString") throw Error("line must be LineString");
|
|
1838
1843
|
if (r === "FeatureCollection") throw Error("splitter cannot be a FeatureCollection");
|
|
1839
1844
|
if (r === "GeometryCollection") throw Error("splitter cannot be a GeometryCollection");
|
|
1840
|
-
var i =
|
|
1841
|
-
switch (e.type !== "Feature" && (e =
|
|
1842
|
-
case "Point": return
|
|
1843
|
-
case "MultiPoint": return
|
|
1845
|
+
var i = kn(t, { precision: 7 });
|
|
1846
|
+
switch (e.type !== "Feature" && (e = L(e)), r) {
|
|
1847
|
+
case "Point": return gr(e, i);
|
|
1848
|
+
case "MultiPoint": return hr(e, i);
|
|
1844
1849
|
case "LineString":
|
|
1845
1850
|
case "MultiLineString":
|
|
1846
1851
|
case "Polygon":
|
|
1847
|
-
case "MultiPolygon": return
|
|
1852
|
+
case "MultiPolygon": return hr(e, Xn(e, i, { ignoreSelfIntersections: !0 }));
|
|
1848
1853
|
}
|
|
1849
1854
|
}
|
|
1850
|
-
function
|
|
1851
|
-
var n = [], r =
|
|
1855
|
+
function hr(e, t) {
|
|
1856
|
+
var n = [], r = On();
|
|
1852
1857
|
return Oe(t, function(t) {
|
|
1853
1858
|
if (n.forEach(function(e, t) {
|
|
1854
1859
|
e.id = t;
|
|
1855
|
-
}), !n.length) n =
|
|
1860
|
+
}), !n.length) n = gr(e, t).features, r.load(z(n));
|
|
1856
1861
|
else {
|
|
1857
1862
|
var i = r.search(t);
|
|
1858
1863
|
if (i.features.length) {
|
|
1859
|
-
var a =
|
|
1864
|
+
var a = _r(t, i);
|
|
1860
1865
|
n = n.filter(function(e) {
|
|
1861
1866
|
return e.id !== a.id;
|
|
1862
|
-
}), r.remove(a), we(
|
|
1867
|
+
}), r.remove(a), we(gr(a, t), function(e) {
|
|
1863
1868
|
n.push(e), r.insert(e);
|
|
1864
1869
|
});
|
|
1865
1870
|
}
|
|
1866
1871
|
}
|
|
1867
|
-
}),
|
|
1872
|
+
}), z(n);
|
|
1868
1873
|
}
|
|
1869
|
-
function
|
|
1874
|
+
function gr(e, t) {
|
|
1870
1875
|
var n = [], r = H(e)[0], i = H(e)[e.geometry.coordinates.length - 1];
|
|
1871
|
-
if (
|
|
1872
|
-
var a =
|
|
1876
|
+
if (vr(r, V(t)) || vr(i, V(t))) return z([e]);
|
|
1877
|
+
var a = On(), o = jn(e);
|
|
1873
1878
|
a.load(o);
|
|
1874
1879
|
var s = a.search(t);
|
|
1875
|
-
if (!s.features.length) return
|
|
1876
|
-
var c =
|
|
1880
|
+
if (!s.features.length) return z([e]);
|
|
1881
|
+
var c = _r(t, s), l = Te(o, function(e, r, i) {
|
|
1877
1882
|
var a = H(r)[1], o = V(t);
|
|
1878
|
-
return i === c.id ? (e.push(o), n.push(
|
|
1883
|
+
return i === c.id ? (e.push(o), n.push(R(e)), vr(o, a) ? [o] : [o, a]) : (e.push(a), e);
|
|
1879
1884
|
}, [r]);
|
|
1880
|
-
return l.length > 1 && n.push(
|
|
1885
|
+
return l.length > 1 && n.push(R(l)), z(n);
|
|
1881
1886
|
}
|
|
1882
|
-
function
|
|
1887
|
+
function _r(e, t) {
|
|
1883
1888
|
if (!t.features.length) throw Error("lines must contain features");
|
|
1884
1889
|
if (t.features.length === 1) return t.features[0];
|
|
1885
1890
|
var n, r = Infinity;
|
|
1886
1891
|
return we(t, function(t) {
|
|
1887
|
-
var i =
|
|
1892
|
+
var i = sr(t, e).properties.dist;
|
|
1888
1893
|
i < r && (n = t, r = i);
|
|
1889
1894
|
}), n;
|
|
1890
1895
|
}
|
|
1891
|
-
function
|
|
1896
|
+
function vr(e, t) {
|
|
1892
1897
|
return e[0] === t[0] && e[1] === t[1];
|
|
1893
1898
|
}
|
|
1894
1899
|
//#endregion
|
|
1895
1900
|
//#region node_modules/@turf/boolean-contains/dist/esm/index.js
|
|
1896
|
-
function
|
|
1901
|
+
function yr(e, t) {
|
|
1897
1902
|
let n = U(e), r = U(t), i = n.type, a = r.type, o = n.coordinates, s = r.coordinates;
|
|
1898
1903
|
switch (i) {
|
|
1899
1904
|
case "Point": switch (a) {
|
|
1900
|
-
case "Point": return
|
|
1905
|
+
case "Point": return jr(o, s);
|
|
1901
1906
|
default: throw Error("feature2 " + a + " geometry not supported");
|
|
1902
1907
|
}
|
|
1903
1908
|
case "MultiPoint": switch (a) {
|
|
1904
|
-
case "Point": return
|
|
1905
|
-
case "MultiPoint": return
|
|
1909
|
+
case "Point": return Sr(n, r);
|
|
1910
|
+
case "MultiPoint": return Cr(n, r);
|
|
1906
1911
|
default: throw Error("feature2 " + a + " geometry not supported");
|
|
1907
1912
|
}
|
|
1908
1913
|
case "LineString": switch (a) {
|
|
1909
1914
|
case "Point": return W(r, n, { ignoreEndVertices: !0 });
|
|
1910
|
-
case "LineString": return
|
|
1911
|
-
case "MultiPoint": return
|
|
1915
|
+
case "LineString": return Er(n, r);
|
|
1916
|
+
case "MultiPoint": return wr(n, r);
|
|
1912
1917
|
default: throw Error("feature2 " + a + " geometry not supported");
|
|
1913
1918
|
}
|
|
1914
1919
|
case "Polygon": switch (a) {
|
|
1915
|
-
case "Point": return
|
|
1916
|
-
case "LineString": return
|
|
1917
|
-
case "Polygon": return
|
|
1918
|
-
case "MultiPoint": return
|
|
1919
|
-
case "MultiPolygon": return
|
|
1920
|
+
case "Point": return Cn(r, n, { ignoreBoundary: !0 });
|
|
1921
|
+
case "LineString": return Or(n, r);
|
|
1922
|
+
case "Polygon": return kr(n, r);
|
|
1923
|
+
case "MultiPoint": return Tr(n, r);
|
|
1924
|
+
case "MultiPolygon": return xr(n, r);
|
|
1920
1925
|
default: throw Error("feature2 " + a + " geometry not supported");
|
|
1921
1926
|
}
|
|
1922
1927
|
case "MultiPolygon": switch (a) {
|
|
1923
|
-
case "Polygon": return
|
|
1928
|
+
case "Polygon": return br(n, r);
|
|
1924
1929
|
default: throw Error("feature2 " + a + " geometry not supported");
|
|
1925
1930
|
}
|
|
1926
1931
|
default: throw Error("feature1 " + i + " geometry not supported");
|
|
1927
1932
|
}
|
|
1928
1933
|
}
|
|
1929
|
-
function
|
|
1930
|
-
return e.coordinates.some((e) =>
|
|
1934
|
+
function br(e, t) {
|
|
1935
|
+
return e.coordinates.some((e) => kr({
|
|
1931
1936
|
type: "Polygon",
|
|
1932
1937
|
coordinates: e
|
|
1933
1938
|
}, t));
|
|
1934
1939
|
}
|
|
1935
|
-
function
|
|
1936
|
-
return t.coordinates.every((t) =>
|
|
1940
|
+
function xr(e, t) {
|
|
1941
|
+
return t.coordinates.every((t) => kr(e, {
|
|
1937
1942
|
type: "Polygon",
|
|
1938
1943
|
coordinates: t
|
|
1939
1944
|
}));
|
|
1940
1945
|
}
|
|
1941
|
-
function
|
|
1946
|
+
function Sr(e, t) {
|
|
1942
1947
|
let n, r = !1;
|
|
1943
|
-
for (n = 0; n < e.coordinates.length; n++) if (
|
|
1948
|
+
for (n = 0; n < e.coordinates.length; n++) if (jr(e.coordinates[n], t.coordinates)) {
|
|
1944
1949
|
r = !0;
|
|
1945
1950
|
break;
|
|
1946
1951
|
}
|
|
1947
1952
|
return r;
|
|
1948
1953
|
}
|
|
1949
|
-
function
|
|
1954
|
+
function Cr(e, t) {
|
|
1950
1955
|
for (let n of t.coordinates) {
|
|
1951
1956
|
let t = !1;
|
|
1952
|
-
for (let r of e.coordinates) if (
|
|
1957
|
+
for (let r of e.coordinates) if (jr(n, r)) {
|
|
1953
1958
|
t = !0;
|
|
1954
1959
|
break;
|
|
1955
1960
|
}
|
|
@@ -1957,16 +1962,16 @@ function br(e, t) {
|
|
|
1957
1962
|
}
|
|
1958
1963
|
return !0;
|
|
1959
1964
|
}
|
|
1960
|
-
function
|
|
1965
|
+
function wr(e, t) {
|
|
1961
1966
|
let n = !1;
|
|
1962
1967
|
for (let r of t.coordinates) if (W(r, e, { ignoreEndVertices: !0 }) && (n = !0), !W(r, e)) return !1;
|
|
1963
1968
|
return !!n;
|
|
1964
1969
|
}
|
|
1965
|
-
function
|
|
1966
|
-
for (let n of t.coordinates) if (!
|
|
1970
|
+
function Tr(e, t) {
|
|
1971
|
+
for (let n of t.coordinates) if (!Cn(n, e, { ignoreBoundary: !0 })) return !1;
|
|
1967
1972
|
return !0;
|
|
1968
1973
|
}
|
|
1969
|
-
function
|
|
1974
|
+
function Er(e, t) {
|
|
1970
1975
|
let n = !1;
|
|
1971
1976
|
for (let r of t.coordinates) if (W({
|
|
1972
1977
|
type: "Point",
|
|
@@ -1977,58 +1982,58 @@ function Cr(e, t) {
|
|
|
1977
1982
|
}, e, { ignoreEndVertices: !1 })) return !1;
|
|
1978
1983
|
return n;
|
|
1979
1984
|
}
|
|
1980
|
-
function
|
|
1985
|
+
function Dr(e, t) {
|
|
1981
1986
|
let n = e.coordinates, r = [];
|
|
1982
1987
|
for (let e = 0; e < n.length - 1; e++) {
|
|
1983
|
-
let i =
|
|
1988
|
+
let i = R([n[e], n[e + 1]]), a = mr(i, L(t));
|
|
1984
1989
|
a.features.length === 0 ? r.push(i) : r.push(...a.features);
|
|
1985
1990
|
}
|
|
1986
|
-
return
|
|
1991
|
+
return z(r);
|
|
1987
1992
|
}
|
|
1988
|
-
function
|
|
1989
|
-
if (!
|
|
1990
|
-
for (let n of t.coordinates) if (!
|
|
1991
|
-
let n = !1, r =
|
|
1993
|
+
function Or(e, t) {
|
|
1994
|
+
if (!Ar(K(e), K(t))) return !1;
|
|
1995
|
+
for (let n of t.coordinates) if (!Cn(n, e)) return !1;
|
|
1996
|
+
let n = !1, r = Dr(t, e);
|
|
1992
1997
|
for (let t of r.features) {
|
|
1993
|
-
let r =
|
|
1994
|
-
if (!
|
|
1995
|
-
!n &&
|
|
1998
|
+
let r = Mr(t.geometry.coordinates[0], t.geometry.coordinates[1]);
|
|
1999
|
+
if (!Cn(r, e)) return !1;
|
|
2000
|
+
!n && Cn(r, e, { ignoreBoundary: !0 }) && (n = !0);
|
|
1996
2001
|
}
|
|
1997
2002
|
return n;
|
|
1998
2003
|
}
|
|
1999
|
-
function
|
|
2000
|
-
if (e.type === "Feature" && e.geometry === null || t.type === "Feature" && t.geometry === null || !
|
|
2004
|
+
function kr(e, t) {
|
|
2005
|
+
if (e.type === "Feature" && e.geometry === null || t.type === "Feature" && t.geometry === null || !Ar(K(e), K(t))) return !1;
|
|
2001
2006
|
let n = U(t).coordinates;
|
|
2002
|
-
for (let t of n) for (let n of t) if (!
|
|
2007
|
+
for (let t of n) for (let n of t) if (!Cn(n, e)) return !1;
|
|
2003
2008
|
return !0;
|
|
2004
2009
|
}
|
|
2005
|
-
function
|
|
2010
|
+
function Ar(e, t) {
|
|
2006
2011
|
return !(e[0] > t[0] || e[2] < t[2] || e[1] > t[1] || e[3] < t[3]);
|
|
2007
2012
|
}
|
|
2008
|
-
function
|
|
2013
|
+
function jr(e, t) {
|
|
2009
2014
|
return e[0] === t[0] && e[1] === t[1];
|
|
2010
2015
|
}
|
|
2011
|
-
function
|
|
2016
|
+
function Mr(e, t) {
|
|
2012
2017
|
return [(e[0] + t[0]) / 2, (e[1] + t[1]) / 2];
|
|
2013
2018
|
}
|
|
2014
|
-
var
|
|
2019
|
+
var Nr = yr;
|
|
2015
2020
|
//#endregion
|
|
2016
2021
|
//#region node_modules/@turf/envelope/dist/esm/index.js
|
|
2017
|
-
function
|
|
2018
|
-
return
|
|
2022
|
+
function Pr(e) {
|
|
2023
|
+
return cn(K(e));
|
|
2019
2024
|
}
|
|
2020
|
-
var
|
|
2025
|
+
var Fr = Pr;
|
|
2021
2026
|
//#endregion
|
|
2022
2027
|
//#region src/utils/geom.ts
|
|
2023
|
-
function
|
|
2028
|
+
function Ir(e) {
|
|
2024
2029
|
return e.geometry && (e.geometry.type === "LineString" || e.geometry.type === "MultiLineString" || e.geometry.type === "Polygon" || e.geometry.type === "MultiPolygon");
|
|
2025
2030
|
}
|
|
2026
|
-
function Pr(e, t) {
|
|
2027
|
-
let n = e.map((e) => e.geometry ? e.geometry.type === "Point" || e.geometry.type === "MultiPoint" ? Ar(on(t), e) ? e : null : Nr(e) ? rn(e, t) : null : null).filter((e) => e !== null);
|
|
2028
|
-
return n.length === 0 ? null : Mr(R(n));
|
|
2029
|
-
}
|
|
2030
|
-
var Fr = .001, Ir = 1e-5;
|
|
2031
2031
|
function Lr(e, t) {
|
|
2032
|
+
let n = e.map((e) => e.geometry ? e.geometry.type === "Point" || e.geometry.type === "MultiPoint" ? Nr(ln(t), e) ? e : null : Ir(e) ? sn(e, t) : null : null).filter((e) => e !== null);
|
|
2033
|
+
return n.length === 0 ? null : Fr(z(n));
|
|
2034
|
+
}
|
|
2035
|
+
var Rr = .001;
|
|
2036
|
+
function zr(e, t) {
|
|
2032
2037
|
return [
|
|
2033
2038
|
e[0] - t,
|
|
2034
2039
|
e[1] - t,
|
|
@@ -2036,15 +2041,15 @@ function Lr(e, t) {
|
|
|
2036
2041
|
e[3] + t
|
|
2037
2042
|
];
|
|
2038
2043
|
}
|
|
2039
|
-
function
|
|
2040
|
-
return
|
|
2044
|
+
function Br(e) {
|
|
2045
|
+
return zr(e, Rr);
|
|
2041
2046
|
}
|
|
2042
|
-
function
|
|
2043
|
-
return e[0] === e[2] || e[1] === e[3]
|
|
2047
|
+
function Vr(e) {
|
|
2048
|
+
return e[0] === e[2] || e[1] === e[3];
|
|
2044
2049
|
}
|
|
2045
2050
|
//#endregion
|
|
2046
2051
|
//#region src/components/VMap.vue?vue&type=script&setup=true&lang.ts
|
|
2047
|
-
var
|
|
2052
|
+
var Hr = ["id"], Ur = /* @__PURE__ */ wt(/* @__PURE__ */ l({
|
|
2048
2053
|
__name: "VMap",
|
|
2049
2054
|
props: {
|
|
2050
2055
|
id: {},
|
|
@@ -2052,23 +2057,23 @@ var Br = ["id"], Vr = /* @__PURE__ */ xt(/* @__PURE__ */ l({
|
|
|
2052
2057
|
bbox: {}
|
|
2053
2058
|
},
|
|
2054
2059
|
setup(e) {
|
|
2055
|
-
let t = e, n = p(
|
|
2060
|
+
let t = e, n = p(rt, Zt), r = {
|
|
2056
2061
|
top: 60,
|
|
2057
2062
|
left: 60,
|
|
2058
2063
|
right: 60,
|
|
2059
2064
|
bottom: 80
|
|
2060
|
-
}, a =
|
|
2061
|
-
|
|
2065
|
+
}, a = O(), o = O(!1), s = O(), c = O(), l;
|
|
2066
|
+
N(o, (e) => {
|
|
2062
2067
|
e ? u() : (a.value && a.value.remove(), a.value = void 0);
|
|
2063
|
-
}),
|
|
2068
|
+
}), N(() => t.features, (e) => {
|
|
2064
2069
|
a.value && o.value && e && (a.value.remove(), a.value = void 0, u());
|
|
2065
2070
|
});
|
|
2066
2071
|
function u() {
|
|
2067
2072
|
if (!a.value) {
|
|
2068
|
-
l = t.bbox ?
|
|
2069
|
-
let e = l ?
|
|
2073
|
+
l = t.bbox ? Br(t.bbox) : void 0;
|
|
2074
|
+
let e = l ? Lr(t.features, l) : z(t.features);
|
|
2070
2075
|
if (e) {
|
|
2071
|
-
let i =
|
|
2076
|
+
let i = Et(e), o = [[i[0], i[1]], [i[2], i[3]]];
|
|
2072
2077
|
a.value = new ie.Map({
|
|
2073
2078
|
hash: !1,
|
|
2074
2079
|
container: `map-${t.id}`,
|
|
@@ -2087,7 +2092,7 @@ var Br = ["id"], Vr = /* @__PURE__ */ xt(/* @__PURE__ */ l({
|
|
|
2087
2092
|
}
|
|
2088
2093
|
function d(e) {
|
|
2089
2094
|
if (!a.value) throw Error("Call initMap() function first.");
|
|
2090
|
-
a.value.addSource(
|
|
2095
|
+
a.value.addSource($t, {
|
|
2091
2096
|
type: "geojson",
|
|
2092
2097
|
data: {
|
|
2093
2098
|
type: "Feature",
|
|
@@ -2107,7 +2112,12 @@ var Br = ["id"], Vr = /* @__PURE__ */ xt(/* @__PURE__ */ l({
|
|
|
2107
2112
|
}
|
|
2108
2113
|
function f() {
|
|
2109
2114
|
if (!a.value) throw Error("Call initMap() function first.");
|
|
2110
|
-
|
|
2115
|
+
t.bbox && d(Vr(t.bbox) ? [
|
|
2116
|
+
t.bbox[0] - 1e-4,
|
|
2117
|
+
t.bbox[1] - 1e-4,
|
|
2118
|
+
t.bbox[2] + 1e-4,
|
|
2119
|
+
t.bbox[3] + 1e-4
|
|
2120
|
+
] : t.bbox), a.value.addSource(q, {
|
|
2111
2121
|
type: "geojson",
|
|
2112
2122
|
data: {
|
|
2113
2123
|
type: "FeatureCollection",
|
|
@@ -2136,32 +2146,32 @@ var Br = ["id"], Vr = /* @__PURE__ */ xt(/* @__PURE__ */ l({
|
|
|
2136
2146
|
}
|
|
2137
2147
|
function y(e, t) {
|
|
2138
2148
|
if (!a.value) throw Error("Call initMap() function first.");
|
|
2139
|
-
s.value = new ie.Popup().setLngLat(e).setHTML(`${
|
|
2149
|
+
s.value = new ie.Popup().setLngLat(e).setHTML(`${it[t.properties.objtype]}-${t.properties.id}-v${t.properties.version}`).addTo(a.value);
|
|
2140
2150
|
}
|
|
2141
2151
|
function b() {
|
|
2142
2152
|
s.value?.remove(), s.value = void 0;
|
|
2143
2153
|
}
|
|
2144
|
-
function
|
|
2154
|
+
function x([e]) {
|
|
2145
2155
|
o.value = e?.isIntersecting || !1;
|
|
2146
2156
|
}
|
|
2147
|
-
return (t, n) => re((
|
|
2157
|
+
return (t, n) => re((S(), i("div", {
|
|
2148
2158
|
id: `map-${e.id}`,
|
|
2149
2159
|
class: "v-map"
|
|
2150
|
-
}, null, 8,
|
|
2160
|
+
}, null, 8, Hr)), [[M(Yt), x]]);
|
|
2151
2161
|
}
|
|
2152
|
-
}), [["__scopeId", "data-v-
|
|
2162
|
+
}), [["__scopeId", "data-v-2f1dabed"]]), Wr = ["id"], Gr = { class: "group-header" }, Kr = { class: "header-start" }, qr = ["href"], Jr = ["title"], Yr = {
|
|
2153
2163
|
key: 0,
|
|
2154
2164
|
class: "name-before"
|
|
2155
|
-
},
|
|
2165
|
+
}, Xr = {
|
|
2156
2166
|
key: 1,
|
|
2157
2167
|
class: "name-separator"
|
|
2158
|
-
},
|
|
2168
|
+
}, Zr = {
|
|
2159
2169
|
key: 2,
|
|
2160
2170
|
class: "name-after"
|
|
2161
|
-
},
|
|
2171
|
+
}, Qr = { class: "header-center" }, $r = { class: "header-end" }, ei = { class: "group-content" }, ti = {
|
|
2162
2172
|
key: 0,
|
|
2163
2173
|
class: "content-start"
|
|
2164
|
-
},
|
|
2174
|
+
}, ni = { key: 0 }, ri = { key: 1 }, ii = /* @__PURE__ */ wt(/* @__PURE__ */ l({
|
|
2165
2175
|
__name: "LoChaGroup",
|
|
2166
2176
|
props: {
|
|
2167
2177
|
id: {},
|
|
@@ -2171,11 +2181,11 @@ var Br = ["id"], Vr = /* @__PURE__ */ xt(/* @__PURE__ */ l({
|
|
|
2171
2181
|
},
|
|
2172
2182
|
emits: ["navigate"],
|
|
2173
2183
|
setup(n) {
|
|
2174
|
-
ee((e) => ({
|
|
2175
|
-
let c = n, l = te(), u = t(() => l["content-start"] ? "repeat(4, minmax(0, 1fr))" : "repeat(3, minmax(0, 1fr))"),
|
|
2176
|
-
if (!
|
|
2177
|
-
let
|
|
2178
|
-
let e = [...new Set(
|
|
2184
|
+
ee((e) => ({ v4a847c52: d.value }));
|
|
2185
|
+
let c = n, l = te(), u = t(() => !!l["content-start"]), d = t(() => u.value ? "repeat(4, minmax(0, 1fr))" : "repeat(3, minmax(0, 1fr))"), f = t(() => u.value ? 3 : 2), m = t(() => u.value ? 4 : 3), h = p(nt), { loCha: _, getBeforeFeatures: y, getAfterFeatures: b } = p(tt);
|
|
2186
|
+
if (!_.value) throw Error("LoCha is empty.");
|
|
2187
|
+
let x = t(() => y(c.features)), C = t(() => b(c.features)), w = t(() => x.value.length > 0 && C.value.length === 0), T = t(() => x.value.length === 0 && C.value.length > 0), O = t(() => x.value.length === 1 && C.value.length === 1 && !!C.value[0]?.properties.deleted), A = t(() => x.value.length === 1 && C.value.length === 1 && !C.value[0]?.properties.deleted), j = t(() => {
|
|
2188
|
+
let e = [...new Set(x.value.map((e) => e.properties.tags?.name).filter(Boolean))], t = [...new Set(C.value.map((e) => e.properties.tags?.name).filter(Boolean))], n = e.length > 0 ? e.join(", ") : null, r = t.length > 0 ? t.join(", ") : null;
|
|
2179
2189
|
return n === r ? {
|
|
2180
2190
|
before: null,
|
|
2181
2191
|
after: r
|
|
@@ -2183,67 +2193,99 @@ var Br = ["id"], Vr = /* @__PURE__ */ xt(/* @__PURE__ */ l({
|
|
|
2183
2193
|
before: n,
|
|
2184
2194
|
after: r
|
|
2185
2195
|
};
|
|
2186
|
-
}),
|
|
2187
|
-
let { before: e, after: t } =
|
|
2196
|
+
}), ne = t(() => {
|
|
2197
|
+
let { before: e, after: t } = j.value;
|
|
2188
2198
|
return e && t ? `${e} → ${t}` : e ?? t ?? void 0;
|
|
2189
2199
|
});
|
|
2190
|
-
return (t, l) => (
|
|
2200
|
+
return (t, l) => (S(), i("div", {
|
|
2191
2201
|
id: n.id,
|
|
2192
2202
|
class: "locha-group"
|
|
2193
|
-
}, [a("div",
|
|
2194
|
-
a("div",
|
|
2203
|
+
}, [a("div", Gr, [
|
|
2204
|
+
a("div", Kr, [a("a", {
|
|
2195
2205
|
class: "anchor-button",
|
|
2196
2206
|
href: `#${n.id}`,
|
|
2197
|
-
onClick: l[0] ||=
|
|
2198
|
-
}, "🔗", 8,
|
|
2207
|
+
onClick: l[0] ||= F((e) => t.$emit("navigate", `#${n.id}`), ["prevent"])
|
|
2208
|
+
}, "🔗", 8, qr), a("h3", {
|
|
2199
2209
|
class: "group-name",
|
|
2200
|
-
title:
|
|
2210
|
+
title: ne.value
|
|
2201
2211
|
}, [
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
], 8,
|
|
2206
|
-
a("div",
|
|
2207
|
-
a("div",
|
|
2208
|
-
]), a("div",
|
|
2209
|
-
t.$slots["content-start"] ? (
|
|
2210
|
-
|
|
2212
|
+
j.value.before ? (S(), i("span", Yr, k(j.value.before), 1)) : r("", !0),
|
|
2213
|
+
j.value.before ? (S(), i("span", Xr, " → ")) : r("", !0),
|
|
2214
|
+
j.value.after ? (S(), i("span", Zr, k(j.value.after), 1)) : r("", !0)
|
|
2215
|
+
], 8, Jr)]),
|
|
2216
|
+
a("div", Qr, [D(t.$slots, "header-center", { index: n.index }, void 0, !0)]),
|
|
2217
|
+
a("div", $r, [D(t.$slots, "header-end", { index: n.index }, void 0, !0)])
|
|
2218
|
+
]), a("div", ei, [
|
|
2219
|
+
t.$slots["content-start"] ? (S(), i("div", ti, [D(t.$slots, "content-start", { index: n.index }, void 0, !0)])) : r("", !0),
|
|
2220
|
+
!A.value && !T.value && !O.value ? (S(), i("div", {
|
|
2221
|
+
key: 1,
|
|
2222
|
+
class: "before-list",
|
|
2223
|
+
style: v(w.value ? { gridColumnStart: 2 } : {})
|
|
2224
|
+
}, [a("ul", null, [(S(!0), i(e, null, E(x.value, (e) => (S(), i("li", { key: e.id }, [s(Tt, {
|
|
2211
2225
|
feature: e,
|
|
2212
2226
|
"josm-target": n.josmTarget
|
|
2213
2227
|
}, o({ _: 2 }, [t.$slots["object-detail"] ? {
|
|
2214
2228
|
name: "object-detail",
|
|
2215
|
-
fn:
|
|
2229
|
+
fn: P(() => [D(t.$slots, "object-detail", {
|
|
2216
2230
|
feature: e,
|
|
2217
2231
|
index: n.index
|
|
2218
2232
|
}, void 0, !0)]),
|
|
2219
2233
|
key: "0"
|
|
2220
|
-
} : void 0]), 1032, ["feature", "josm-target"])]))), 128))])]),
|
|
2221
|
-
|
|
2234
|
+
} : void 0]), 1032, ["feature", "josm-target"])]))), 128))])], 4)) : r("", !0),
|
|
2235
|
+
w.value ? r("", !0) : (S(), i("div", {
|
|
2236
|
+
key: 2,
|
|
2237
|
+
class: g(["after-list", { "list--wide": A.value }]),
|
|
2238
|
+
style: v(T.value ? { gridColumnStart: f.value } : O.value ? { gridColumnStart: 2 } : {})
|
|
2239
|
+
}, [a("ul", null, [O.value ? (S(), i("li", ni, [s(Tt, {
|
|
2240
|
+
feature: C.value[0],
|
|
2241
|
+
"josm-target": n.josmTarget
|
|
2242
|
+
}, {
|
|
2243
|
+
"object-detail": P(() => [D(t.$slots, "object-detail", {
|
|
2244
|
+
feature: x.value[0],
|
|
2245
|
+
index: n.index
|
|
2246
|
+
}, void 0, !0)]),
|
|
2247
|
+
_: 3
|
|
2248
|
+
}, 8, ["feature", "josm-target"])])) : A.value ? (S(), i("li", ri, [s(Tt, {
|
|
2249
|
+
feature: C.value[0],
|
|
2250
|
+
"josm-target": n.josmTarget
|
|
2251
|
+
}, {
|
|
2252
|
+
before: P(() => [s(Tt, {
|
|
2253
|
+
feature: x.value[0],
|
|
2254
|
+
compact: !0
|
|
2255
|
+
}, null, 8, ["feature"])]),
|
|
2256
|
+
"object-detail": P(() => [D(t.$slots, "object-detail", {
|
|
2257
|
+
feature: C.value[0],
|
|
2258
|
+
index: n.index
|
|
2259
|
+
}, void 0, !0)]),
|
|
2260
|
+
_: 3
|
|
2261
|
+
}, 8, ["feature", "josm-target"])])) : (S(!0), i(e, { key: 2 }, E(C.value, (e) => (S(), i("li", { key: e.id }, [s(Tt, {
|
|
2222
2262
|
feature: e,
|
|
2223
2263
|
"josm-target": n.josmTarget
|
|
2224
2264
|
}, o({ _: 2 }, [t.$slots["object-detail"] ? {
|
|
2225
2265
|
name: "object-detail",
|
|
2226
|
-
fn:
|
|
2266
|
+
fn: P(() => [D(t.$slots, "object-detail", {
|
|
2227
2267
|
feature: e,
|
|
2228
2268
|
index: n.index
|
|
2229
2269
|
}, void 0, !0)]),
|
|
2230
2270
|
key: "0"
|
|
2231
|
-
} : void 0]), 1032, ["feature", "josm-target"])]))), 128))])]),
|
|
2232
|
-
s(
|
|
2233
|
-
id: `${
|
|
2271
|
+
} : void 0]), 1032, ["feature", "josm-target"])]))), 128))])], 6)),
|
|
2272
|
+
s(Ur, {
|
|
2273
|
+
id: `${M(h)}-${c.index}`,
|
|
2234
2274
|
features: n.features,
|
|
2235
|
-
bbox:
|
|
2275
|
+
bbox: M(_)?.bbox,
|
|
2276
|
+
style: v({ gridColumnStart: m.value })
|
|
2236
2277
|
}, null, 8, [
|
|
2237
2278
|
"id",
|
|
2238
2279
|
"features",
|
|
2239
|
-
"bbox"
|
|
2280
|
+
"bbox",
|
|
2281
|
+
"style"
|
|
2240
2282
|
])
|
|
2241
|
-
])], 8,
|
|
2283
|
+
])], 8, Wr));
|
|
2242
2284
|
}
|
|
2243
|
-
}), [["__scopeId", "data-v-
|
|
2285
|
+
}), [["__scopeId", "data-v-feccd6ec"]]);
|
|
2244
2286
|
//#endregion
|
|
2245
2287
|
//#region src/utils/scrollToSection.ts
|
|
2246
|
-
function
|
|
2288
|
+
function ai(e, t = {}) {
|
|
2247
2289
|
let { container: n = document, behavior: r = "smooth", block: i = "start", inline: a = "nearest" } = t, o = e.startsWith("#") ? e.slice(1) : e, s = n.querySelector(`#${CSS.escape(o)}`);
|
|
2248
2290
|
return s ? (s.scrollIntoView({
|
|
2249
2291
|
behavior: r,
|
|
@@ -2253,80 +2295,80 @@ function ri(e, t = {}) {
|
|
|
2253
2295
|
}
|
|
2254
2296
|
//#endregion
|
|
2255
2297
|
//#region src/components/LoCha/LoChaGroupList.vue?vue&type=script&setup=true&lang.ts
|
|
2256
|
-
var
|
|
2298
|
+
var oi = ["name"], si = /* @__PURE__ */ wt(/* @__PURE__ */ l({
|
|
2257
2299
|
__name: "LoChaGroupList",
|
|
2258
2300
|
props: { hash: {} },
|
|
2259
2301
|
setup(t) {
|
|
2260
|
-
ee((e) => ({ v32a2838c:
|
|
2261
|
-
let n = t, { groups: r } = p(
|
|
2302
|
+
ee((e) => ({ v32a2838c: M(l) }));
|
|
2303
|
+
let n = t, { groups: r } = p(tt), c = p(nt), l = G.delete, u = T(), d = ne("listRef");
|
|
2262
2304
|
function f(e) {
|
|
2263
2305
|
return `locha-${c}-group-${e}`;
|
|
2264
2306
|
}
|
|
2265
2307
|
function _() {
|
|
2266
2308
|
return `hidden_josm_target_${c}`;
|
|
2267
2309
|
}
|
|
2268
|
-
let
|
|
2269
|
-
function
|
|
2310
|
+
let v = !1;
|
|
2311
|
+
function b(e) {
|
|
2270
2312
|
if (u.value === e) {
|
|
2271
|
-
|
|
2313
|
+
v = !0, u.value = void 0, history.replaceState(null, "", `${location.pathname}${location.search}`), window.dispatchEvent(new CustomEvent("locha-navigate", { detail: {
|
|
2272
2314
|
hash: void 0,
|
|
2273
2315
|
instanceId: c
|
|
2274
2316
|
} })), h(() => {
|
|
2275
|
-
|
|
2317
|
+
v = !1;
|
|
2276
2318
|
});
|
|
2277
2319
|
return;
|
|
2278
2320
|
}
|
|
2279
|
-
|
|
2321
|
+
v = !0, u.value = e, history.replaceState(null, "", e), window.dispatchEvent(new CustomEvent("locha-navigate", { detail: {
|
|
2280
2322
|
hash: e,
|
|
2281
2323
|
instanceId: c
|
|
2282
2324
|
} })), h(() => {
|
|
2283
|
-
|
|
2325
|
+
v = !1, ai(e, { container: d.value ?? void 0 });
|
|
2284
2326
|
});
|
|
2285
2327
|
}
|
|
2286
2328
|
function C(e) {
|
|
2287
2329
|
let { instanceId: t } = e.detail;
|
|
2288
2330
|
t !== c && (u.value = void 0);
|
|
2289
2331
|
}
|
|
2290
|
-
return
|
|
2291
|
-
|
|
2292
|
-
}, { immediate: !0 }),
|
|
2332
|
+
return N(() => n.hash, (e) => {
|
|
2333
|
+
v || (u.value = e, e && h(() => ai(e, { container: d.value ?? void 0 })));
|
|
2334
|
+
}, { immediate: !0 }), y(() => {
|
|
2293
2335
|
window.addEventListener("locha-navigate", C);
|
|
2294
2336
|
let e = window.location.hash;
|
|
2295
|
-
e && !n.hash &&
|
|
2296
|
-
}),
|
|
2337
|
+
e && !n.hash && b(e);
|
|
2338
|
+
}), x(() => {
|
|
2297
2339
|
window.removeEventListener("locha-navigate", C);
|
|
2298
|
-
}), (t, n) => (
|
|
2340
|
+
}), (t, n) => (S(), i("div", {
|
|
2299
2341
|
ref_key: "listRef",
|
|
2300
2342
|
ref: d,
|
|
2301
2343
|
class: "locha-group-list"
|
|
2302
|
-
}, [a("ul", null, [(
|
|
2344
|
+
}, [a("ul", null, [(S(!0), i(e, null, E(M(r), (e, n) => (S(), i("li", {
|
|
2303
2345
|
key: n,
|
|
2304
2346
|
class: g({ selected: u.value === `#${f(n)}` })
|
|
2305
|
-
}, [s(
|
|
2347
|
+
}, [s(ii, {
|
|
2306
2348
|
id: f(n),
|
|
2307
2349
|
features: e,
|
|
2308
2350
|
index: n,
|
|
2309
2351
|
"josm-target": _(),
|
|
2310
|
-
onNavigate:
|
|
2352
|
+
onNavigate: b
|
|
2311
2353
|
}, o({ _: 2 }, [
|
|
2312
2354
|
t.$slots["object-detail"] ? {
|
|
2313
2355
|
name: "object-detail",
|
|
2314
|
-
fn:
|
|
2356
|
+
fn: P((e) => [D(t.$slots, "object-detail", m({ ref_for: !0 }, e), void 0, !0)]),
|
|
2315
2357
|
key: "0"
|
|
2316
2358
|
} : void 0,
|
|
2317
2359
|
t.$slots["header-center"] ? {
|
|
2318
2360
|
name: "header-center",
|
|
2319
|
-
fn:
|
|
2361
|
+
fn: P((e) => [D(t.$slots, "header-center", m({ ref_for: !0 }, e), void 0, !0)]),
|
|
2320
2362
|
key: "1"
|
|
2321
2363
|
} : void 0,
|
|
2322
2364
|
t.$slots["header-end"] ? {
|
|
2323
2365
|
name: "header-end",
|
|
2324
|
-
fn:
|
|
2366
|
+
fn: P((e) => [D(t.$slots, "header-end", m({ ref_for: !0 }, e), void 0, !0)]),
|
|
2325
2367
|
key: "2"
|
|
2326
2368
|
} : void 0,
|
|
2327
2369
|
t.$slots["content-start"] ? {
|
|
2328
2370
|
name: "content-start",
|
|
2329
|
-
fn:
|
|
2371
|
+
fn: P((e) => [D(t.$slots, "content-start", m({ ref_for: !0 }, e), void 0, !0)]),
|
|
2330
2372
|
key: "3"
|
|
2331
2373
|
} : void 0
|
|
2332
2374
|
]), 1032, [
|
|
@@ -2337,17 +2379,17 @@ var ii = ["name"], ai = /* @__PURE__ */ xt(/* @__PURE__ */ l({
|
|
|
2337
2379
|
])], 2))), 128))]), a("iframe", {
|
|
2338
2380
|
name: _(),
|
|
2339
2381
|
style: { display: "none" }
|
|
2340
|
-
}, null, 8,
|
|
2382
|
+
}, null, 8, oi)], 512));
|
|
2341
2383
|
}
|
|
2342
|
-
}), [["__scopeId", "data-v-178acf78"]]),
|
|
2384
|
+
}), [["__scopeId", "data-v-178acf78"]]), ci = {
|
|
2343
2385
|
key: 0,
|
|
2344
2386
|
class: "user-feedback"
|
|
2345
|
-
},
|
|
2387
|
+
}, li = /* @__PURE__ */ wt(/* @__PURE__ */ l({
|
|
2346
2388
|
__name: "LoCha",
|
|
2347
2389
|
props: {
|
|
2348
2390
|
id: {},
|
|
2349
2391
|
data: {},
|
|
2350
|
-
mapStyleUrl: { default:
|
|
2392
|
+
mapStyleUrl: { default: Zt },
|
|
2351
2393
|
reasonCollapsed: {
|
|
2352
2394
|
type: Boolean,
|
|
2353
2395
|
default: !0
|
|
@@ -2356,40 +2398,40 @@ var ii = ["name"], ai = /* @__PURE__ */ xt(/* @__PURE__ */ l({
|
|
|
2356
2398
|
},
|
|
2357
2399
|
setup(e) {
|
|
2358
2400
|
let r = e;
|
|
2359
|
-
|
|
2360
|
-
let a =
|
|
2361
|
-
|
|
2401
|
+
C(et, r.reasonCollapsed), C(nt, r.id), C(rt, r.mapStyleUrl);
|
|
2402
|
+
let a = $e();
|
|
2403
|
+
C(tt, a);
|
|
2362
2404
|
let { featureCount: s, groups: c, setLoCha: l } = a, u = t(() => c.value.length === 1);
|
|
2363
|
-
return
|
|
2405
|
+
return N(() => r.data, (e) => {
|
|
2364
2406
|
e && l(e);
|
|
2365
|
-
}, { immediate: !0 }), (t, r) => (
|
|
2407
|
+
}, { immediate: !0 }), (t, r) => (S(), i("section", { class: g(["locha", { "locha--single": u.value }]) }, [M(s) ? (S(), n(si, {
|
|
2366
2408
|
key: 1,
|
|
2367
2409
|
hash: e.hash
|
|
2368
2410
|
}, o({ _: 2 }, [
|
|
2369
2411
|
t.$slots["object-detail"] ? {
|
|
2370
2412
|
name: "object-detail",
|
|
2371
|
-
fn:
|
|
2413
|
+
fn: P((e) => [D(t.$slots, "object-detail", _(f(e)), void 0, !0)]),
|
|
2372
2414
|
key: "0"
|
|
2373
2415
|
} : void 0,
|
|
2374
2416
|
t.$slots["header-center"] ? {
|
|
2375
2417
|
name: "header-center",
|
|
2376
|
-
fn:
|
|
2418
|
+
fn: P((e) => [D(t.$slots, "header-center", _(f(e)), void 0, !0)]),
|
|
2377
2419
|
key: "1"
|
|
2378
2420
|
} : void 0,
|
|
2379
2421
|
t.$slots["header-end"] ? {
|
|
2380
2422
|
name: "header-end",
|
|
2381
|
-
fn:
|
|
2423
|
+
fn: P((e) => [D(t.$slots, "header-end", _(f(e)), void 0, !0)]),
|
|
2382
2424
|
key: "2"
|
|
2383
2425
|
} : void 0,
|
|
2384
2426
|
t.$slots["content-start"] ? {
|
|
2385
2427
|
name: "content-start",
|
|
2386
|
-
fn:
|
|
2428
|
+
fn: P((e) => [D(t.$slots, "content-start", _(f(e)), void 0, !0)]),
|
|
2387
2429
|
key: "3"
|
|
2388
2430
|
} : void 0
|
|
2389
|
-
]), 1032, ["hash"])) : (
|
|
2431
|
+
]), 1032, ["hash"])) : (S(), i("p", ci, " ⚠️ No data "))], 2));
|
|
2390
2432
|
}
|
|
2391
2433
|
}), [["__scopeId", "data-v-791095c2"]]);
|
|
2392
2434
|
//#endregion
|
|
2393
|
-
export {
|
|
2435
|
+
export { li as LoCha, ai as scrollToSection };
|
|
2394
2436
|
|
|
2395
2437
|
//# sourceMappingURL=index.js.map
|