@teritorio/openstreetmap-logical-history-component 0.5.0 → 0.5.2
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 +513 -504
- 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,32 +565,32 @@ 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
591
|
key: 1,
|
|
592
592
|
class: "fab"
|
|
593
|
-
},
|
|
593
|
+
}, gt = { class: "fab-menu" }, _t = ["href"], vt = ["href", "target"], yt = ["href"], bt = ["href"], xt = { class: "date" }, St = ["href", "title"], Ct = /* @__PURE__ */ l({
|
|
594
594
|
__name: "LoChaObject",
|
|
595
595
|
props: {
|
|
596
596
|
feature: {},
|
|
@@ -599,82 +599,82 @@ var lt = { class: "locha-object" }, ut = { class: "header-row" }, dt = { class:
|
|
|
599
599
|
},
|
|
600
600
|
setup(n) {
|
|
601
601
|
ee((e) => ({
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
602
|
+
v5f3a8926: u.value,
|
|
603
|
+
v41a8bc86: M(G).delete,
|
|
604
|
+
v532f58a5: M(G).new
|
|
605
605
|
}));
|
|
606
|
-
let o = n, { getStatus: s } = p(
|
|
606
|
+
let o = n, { getStatus: s } = p(tt), c = t(() => s(o.feature)), l = t(() => {
|
|
607
607
|
switch (c.value) {
|
|
608
608
|
case "new": return "new";
|
|
609
609
|
case "delete": return "deleted";
|
|
610
610
|
default: return "";
|
|
611
611
|
}
|
|
612
612
|
}), u = t(() => G[c.value]);
|
|
613
|
-
return (t, s) => (
|
|
614
|
-
a("div",
|
|
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, [
|
|
615
615
|
a("a", {
|
|
616
|
-
href:
|
|
616
|
+
href: M(at)(n.feature.properties.objtype, n.feature.properties.id),
|
|
617
617
|
title: "OSM History",
|
|
618
618
|
target: "_blank",
|
|
619
|
-
onClick: s[0] ||=
|
|
620
|
-
},
|
|
621
|
-
!n.compact && (c.value === "new" || c.value === "delete") ? (
|
|
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", {
|
|
622
622
|
key: 0,
|
|
623
623
|
class: g(["status-content", {
|
|
624
624
|
"object-new": c.value === "new",
|
|
625
625
|
"object-deleted": c.value === "delete"
|
|
626
626
|
}])
|
|
627
|
-
},
|
|
628
|
-
n.compact ? r("", !0) : (
|
|
627
|
+
}, k(l.value), 3)) : r("", !0),
|
|
628
|
+
n.compact ? r("", !0) : (S(), i("div", ht, [s[7] ||= a("button", {
|
|
629
629
|
class: "fab-toggle",
|
|
630
630
|
type: "button",
|
|
631
631
|
title: "Tools"
|
|
632
|
-
}, " 🔧 Tools ", -1), a("div",
|
|
632
|
+
}, " 🔧 Tools ", -1), a("div", gt, [
|
|
633
633
|
a("a", {
|
|
634
|
-
href:
|
|
634
|
+
href: M(at)(n.feature.properties.objtype, n.feature.properties.id),
|
|
635
635
|
class: "action-btn",
|
|
636
636
|
title: "Edit in OSM iD",
|
|
637
637
|
target: "_blank",
|
|
638
|
-
onClick: s[1] ||=
|
|
639
|
-
}, " OSM iD ", 8,
|
|
638
|
+
onClick: s[1] ||= F(() => {}, ["stop"])
|
|
639
|
+
}, " OSM iD ", 8, _t),
|
|
640
640
|
a("a", {
|
|
641
|
-
href:
|
|
641
|
+
href: M(st)(n.feature.properties.objtype, n.feature.properties.id),
|
|
642
642
|
class: "action-btn",
|
|
643
643
|
title: "Edit in JOSM",
|
|
644
644
|
target: n.josmTarget || "hidden_josm_target",
|
|
645
|
-
onClick: s[2] ||=
|
|
646
|
-
}, " JOSM ", 8,
|
|
645
|
+
onClick: s[2] ||= F(() => {}, ["stop"])
|
|
646
|
+
}, " JOSM ", 8, vt),
|
|
647
647
|
a("a", {
|
|
648
|
-
href:
|
|
648
|
+
href: M(ct)(n.feature.properties.objtype, n.feature.properties.id),
|
|
649
649
|
class: "action-btn",
|
|
650
650
|
title: "OSM Deep History",
|
|
651
651
|
target: "_blank",
|
|
652
|
-
onClick: s[3] ||=
|
|
653
|
-
}, " Deep H ", 8,
|
|
652
|
+
onClick: s[3] ||= F(() => {}, ["stop"])
|
|
653
|
+
}, " Deep H ", 8, yt),
|
|
654
654
|
a("a", {
|
|
655
|
-
href:
|
|
655
|
+
href: M(lt)(n.feature.properties.objtype, n.feature.properties.id),
|
|
656
656
|
class: "action-btn",
|
|
657
657
|
title: "OSM History Viewer",
|
|
658
658
|
target: "_blank",
|
|
659
|
-
onClick: s[4] ||=
|
|
660
|
-
}, " OSM H ", 8,
|
|
659
|
+
onClick: s[4] ||= F(() => {}, ["stop"])
|
|
660
|
+
}, " OSM H ", 8, bt)
|
|
661
661
|
])]))
|
|
662
662
|
]),
|
|
663
|
-
a("p",
|
|
664
|
-
n.feature.properties.username ? (
|
|
663
|
+
a("p", xt, " 📅 " + k(o.feature.properties.created), 1),
|
|
664
|
+
n.feature.properties.username ? (S(), i("a", {
|
|
665
665
|
key: 0,
|
|
666
|
-
href:
|
|
666
|
+
href: M(ot)(n.feature.properties.username),
|
|
667
667
|
title: `View ${n.feature.properties.username} OSM profile`,
|
|
668
668
|
target: "_blank",
|
|
669
|
-
onClick: s[5] ||=
|
|
670
|
-
}, " 👤" +
|
|
671
|
-
])]), n.compact ? r("", !0) :
|
|
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)]));
|
|
672
672
|
}
|
|
673
|
-
}),
|
|
673
|
+
}), wt = (e, t) => {
|
|
674
674
|
let n = e.__vccOpts || e;
|
|
675
675
|
for (let [e, r] of t) n[e] = r;
|
|
676
676
|
return n;
|
|
677
|
-
},
|
|
677
|
+
}, Tt = /* @__PURE__ */ wt(Ct, [["__scopeId", "data-v-094314b7"]]);
|
|
678
678
|
//#endregion
|
|
679
679
|
//#region node_modules/@turf/bbox/dist/esm/index.js
|
|
680
680
|
function K(e, t = {}) {
|
|
@@ -689,96 +689,96 @@ function K(e, t = {}) {
|
|
|
689
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]);
|
|
690
690
|
}), n;
|
|
691
691
|
}
|
|
692
|
-
var
|
|
692
|
+
var Et = K;
|
|
693
693
|
//#endregion
|
|
694
694
|
//#region node_modules/@vueuse/shared/dist/index.js
|
|
695
|
-
function
|
|
696
|
-
return d() ? (
|
|
695
|
+
function Dt(e, t) {
|
|
696
|
+
return d() ? (b(e, t), !0) : !1;
|
|
697
697
|
}
|
|
698
|
-
var
|
|
698
|
+
var Ot = typeof window < "u" && typeof document < "u";
|
|
699
699
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
700
|
-
var
|
|
701
|
-
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() {
|
|
702
702
|
var e, t;
|
|
703
|
-
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));
|
|
704
704
|
}
|
|
705
|
-
function
|
|
706
|
-
if (e.length !== 1) return
|
|
705
|
+
function Ft(...e) {
|
|
706
|
+
if (e.length !== 1) return A(...e);
|
|
707
707
|
let t = e[0];
|
|
708
|
-
return typeof t == "function" ?
|
|
708
|
+
return typeof t == "function" ? w(c(() => ({
|
|
709
709
|
get: t,
|
|
710
|
-
set:
|
|
711
|
-
}))) :
|
|
710
|
+
set: Mt
|
|
711
|
+
}))) : T(t);
|
|
712
712
|
}
|
|
713
|
-
function
|
|
713
|
+
function It(e) {
|
|
714
714
|
return Array.isArray(e) ? e : [e];
|
|
715
715
|
}
|
|
716
|
-
function
|
|
717
|
-
return
|
|
716
|
+
function Lt(e, t, n) {
|
|
717
|
+
return N(e, t, {
|
|
718
718
|
...n,
|
|
719
719
|
immediate: !0
|
|
720
720
|
});
|
|
721
721
|
}
|
|
722
722
|
//#endregion
|
|
723
723
|
//#region node_modules/@vueuse/core/dist/index.js
|
|
724
|
-
var
|
|
725
|
-
|
|
726
|
-
function
|
|
727
|
-
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);
|
|
728
728
|
return t?.$el ?? t;
|
|
729
729
|
}
|
|
730
|
-
function
|
|
730
|
+
function Bt(...e) {
|
|
731
731
|
let n = (e, t, n, r) => (e.addEventListener(t, n, r), () => e.removeEventListener(t, n, r)), r = t(() => {
|
|
732
|
-
let t =
|
|
732
|
+
let t = It(j(e[0])).filter((e) => e != null);
|
|
733
733
|
return t.every((e) => typeof e != "string") ? t : void 0;
|
|
734
734
|
});
|
|
735
|
-
return
|
|
736
|
-
r.value?.map((e) =>
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
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])
|
|
740
740
|
], ([e, t, r, i], a, o) => {
|
|
741
741
|
if (!e?.length || !t?.length || !r?.length) return;
|
|
742
|
-
let s =
|
|
742
|
+
let s = jt(i) ? { ...i } : i, c = e.flatMap((e) => t.flatMap((t) => r.map((r) => n(e, t, r, s))));
|
|
743
743
|
o(() => {
|
|
744
744
|
c.forEach((e) => e());
|
|
745
745
|
});
|
|
746
746
|
}, { flush: "post" });
|
|
747
747
|
}
|
|
748
|
-
function
|
|
749
|
-
let e =
|
|
750
|
-
return t &&
|
|
748
|
+
function Vt() {
|
|
749
|
+
let e = O(!1), t = u();
|
|
750
|
+
return t && y(() => {
|
|
751
751
|
e.value = !0;
|
|
752
752
|
}, t), e;
|
|
753
753
|
}
|
|
754
754
|
/* @__NO_SIDE_EFFECTS__ */
|
|
755
|
-
function
|
|
756
|
-
let n =
|
|
755
|
+
function Ht(e) {
|
|
756
|
+
let n = Vt();
|
|
757
757
|
return t(() => (n.value, !!e()));
|
|
758
758
|
}
|
|
759
|
-
function
|
|
760
|
-
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(() => [
|
|
761
761
|
u.value,
|
|
762
|
-
|
|
763
|
-
|
|
762
|
+
zt(i),
|
|
763
|
+
j(a),
|
|
764
764
|
f.value
|
|
765
765
|
], ([e, t, r]) => {
|
|
766
766
|
if (d(), !f.value || !e.length) return;
|
|
767
767
|
let i = new IntersectionObserver(n, {
|
|
768
|
-
root:
|
|
768
|
+
root: zt(t),
|
|
769
769
|
rootMargin: r,
|
|
770
770
|
threshold: o
|
|
771
771
|
});
|
|
772
772
|
e.forEach((e) => e && i.observe(e)), d = () => {
|
|
773
|
-
i.disconnect(), d =
|
|
773
|
+
i.disconnect(), d = Mt;
|
|
774
774
|
};
|
|
775
775
|
}, {
|
|
776
776
|
immediate: c,
|
|
777
777
|
flush: "post"
|
|
778
|
-
}) :
|
|
778
|
+
}) : Mt, m = () => {
|
|
779
779
|
d(), p(), f.value = !1;
|
|
780
780
|
};
|
|
781
|
-
return
|
|
781
|
+
return Dt(m), {
|
|
782
782
|
isSupported: l,
|
|
783
783
|
isActive: f,
|
|
784
784
|
pause() {
|
|
@@ -790,42 +790,42 @@ function Ht(e, n, r = {}) {
|
|
|
790
790
|
stop: m
|
|
791
791
|
};
|
|
792
792
|
}
|
|
793
|
-
function
|
|
793
|
+
function Wt(e) {
|
|
794
794
|
return typeof Window < "u" && e instanceof Window ? e.document.documentElement : typeof Document < "u" && e instanceof Document ? e.documentElement : e;
|
|
795
795
|
}
|
|
796
|
-
function
|
|
796
|
+
function Gt(e) {
|
|
797
797
|
let t = window.getComputedStyle(e);
|
|
798
798
|
if (t.overflowX === "scroll" || t.overflowY === "scroll" || t.overflowX === "auto" && e.clientWidth < e.scrollWidth || t.overflowY === "auto" && e.clientHeight < e.scrollHeight) return !0;
|
|
799
799
|
{
|
|
800
800
|
let t = e.parentNode;
|
|
801
|
-
return !t || t.tagName === "BODY" ? !1 :
|
|
801
|
+
return !t || t.tagName === "BODY" ? !1 : Gt(t);
|
|
802
802
|
}
|
|
803
803
|
}
|
|
804
|
-
function
|
|
804
|
+
function Kt(e) {
|
|
805
805
|
let t = e || window.event, n = t.target;
|
|
806
|
-
return
|
|
806
|
+
return Gt(n) ? !1 : t.touches.length > 1 ? !0 : (t.preventDefault && t.preventDefault(), !1);
|
|
807
807
|
}
|
|
808
|
-
var
|
|
809
|
-
function
|
|
810
|
-
let r =
|
|
811
|
-
|
|
812
|
-
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));
|
|
813
813
|
if (t) {
|
|
814
814
|
let e = t;
|
|
815
|
-
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;
|
|
816
816
|
if (r.value) return e.style.overflow = "hidden";
|
|
817
817
|
}
|
|
818
818
|
}, { immediate: !0 });
|
|
819
819
|
let o = () => {
|
|
820
|
-
let t =
|
|
821
|
-
!t || r.value || (
|
|
822
|
-
|
|
820
|
+
let t = Wt(j(e));
|
|
821
|
+
!t || r.value || (Nt && (i = Bt(t, "touchmove", (e) => {
|
|
822
|
+
Kt(e);
|
|
823
823
|
}, { passive: !1 })), t.style.overflow = "hidden", r.value = !0);
|
|
824
824
|
}, s = () => {
|
|
825
|
-
let t =
|
|
826
|
-
!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);
|
|
827
827
|
};
|
|
828
|
-
return
|
|
828
|
+
return Dt(s), t({
|
|
829
829
|
get() {
|
|
830
830
|
return r.value;
|
|
831
831
|
},
|
|
@@ -836,30 +836,32 @@ function qt(e, n = !1) {
|
|
|
836
836
|
}
|
|
837
837
|
//#endregion
|
|
838
838
|
//#region node_modules/@vueuse/components/dist/index.js
|
|
839
|
-
var
|
|
840
|
-
typeof t.value == "function" ?
|
|
839
|
+
var Yt = { mounted(e, t) {
|
|
840
|
+
typeof t.value == "function" ? Ut(e, t.value) : Ut(e, ...t.value);
|
|
841
841
|
} };
|
|
842
|
-
function
|
|
843
|
-
let e = !1, t =
|
|
842
|
+
function Xt() {
|
|
843
|
+
let e = !1, t = O(!1);
|
|
844
844
|
return (n, r) => {
|
|
845
845
|
if (t.value = r.value, e) return;
|
|
846
846
|
e = !0;
|
|
847
|
-
let i =
|
|
848
|
-
|
|
847
|
+
let i = Jt(n, r.value);
|
|
848
|
+
N(t, (e) => i.value = e);
|
|
849
849
|
};
|
|
850
850
|
}
|
|
851
|
-
|
|
851
|
+
Xt();
|
|
852
852
|
//#endregion
|
|
853
853
|
//#region src/constants/map.ts
|
|
854
|
-
var
|
|
854
|
+
var Zt = "https://maps.cartoway.com/styles/positron/style.json", Qt = "#f4f4f5", $t = "bbox", q = "lochas", J = {
|
|
855
855
|
Bbox: {
|
|
856
856
|
id: "bbox-layer",
|
|
857
857
|
type: "line",
|
|
858
|
-
source:
|
|
858
|
+
source: $t,
|
|
859
|
+
layout: { "line-join": "miter" },
|
|
859
860
|
paint: {
|
|
860
861
|
"line-color": "#000000",
|
|
861
862
|
"line-width": 1,
|
|
862
|
-
"line-dasharray": [2, 2]
|
|
863
|
+
"line-dasharray": [2, 2],
|
|
864
|
+
"line-offset": -32
|
|
863
865
|
}
|
|
864
866
|
},
|
|
865
867
|
PolygonBorder: {
|
|
@@ -907,7 +909,7 @@ var Xt = "https://maps.cartoway.com/styles/positron/style.json", Zt = "#f4f4f5",
|
|
|
907
909
|
["get", "geom"],
|
|
908
910
|
!1
|
|
909
911
|
],
|
|
910
|
-
|
|
912
|
+
Qt,
|
|
911
913
|
[
|
|
912
914
|
"==",
|
|
913
915
|
["get", "is_new"],
|
|
@@ -948,7 +950,7 @@ var Xt = "https://maps.cartoway.com/styles/positron/style.json", Zt = "#f4f4f5",
|
|
|
948
950
|
["get", "geom"],
|
|
949
951
|
!1
|
|
950
952
|
],
|
|
951
|
-
|
|
953
|
+
Qt,
|
|
952
954
|
[
|
|
953
955
|
"==",
|
|
954
956
|
["get", "is_new"],
|
|
@@ -1074,7 +1076,7 @@ var Xt = "https://maps.cartoway.com/styles/positron/style.json", Zt = "#f4f4f5",
|
|
|
1074
1076
|
["get", "geom"],
|
|
1075
1077
|
!1
|
|
1076
1078
|
],
|
|
1077
|
-
|
|
1079
|
+
Qt,
|
|
1078
1080
|
[
|
|
1079
1081
|
"==",
|
|
1080
1082
|
["get", "is_new"],
|
|
@@ -1105,61 +1107,61 @@ var Xt = "https://maps.cartoway.com/styles/positron/style.json", Zt = "#f4f4f5",
|
|
|
1105
1107
|
};
|
|
1106
1108
|
//#endregion
|
|
1107
1109
|
//#region node_modules/@turf/bbox-clip/dist/esm/index.js
|
|
1108
|
-
function
|
|
1109
|
-
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;
|
|
1110
1112
|
let l, u;
|
|
1111
1113
|
for (n ||= [], o = 1; o < r; o++) {
|
|
1112
|
-
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)) {
|
|
1113
1115
|
a.push(l), s === c ? o === r - 1 && a.push(u) : (a.push(u), o < r - 1 && (n.push(a), a = []));
|
|
1114
1116
|
break;
|
|
1115
1117
|
} else if (i & s) break;
|
|
1116
|
-
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));
|
|
1117
1119
|
i = c;
|
|
1118
1120
|
}
|
|
1119
1121
|
return a.length && n.push(a), n;
|
|
1120
1122
|
}
|
|
1121
|
-
function
|
|
1123
|
+
function tn(e, t) {
|
|
1122
1124
|
var n, r, i, a, o, s, c;
|
|
1123
1125
|
for (r = 1; r <= 8; r *= 2) {
|
|
1124
|
-
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;
|
|
1125
1127
|
if (e = n, !e.length) break;
|
|
1126
1128
|
}
|
|
1127
1129
|
return n;
|
|
1128
1130
|
}
|
|
1129
|
-
function
|
|
1131
|
+
function nn(e, t, n, r) {
|
|
1130
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;
|
|
1131
1133
|
}
|
|
1132
|
-
function
|
|
1134
|
+
function rn(e, t) {
|
|
1133
1135
|
var n = 0;
|
|
1134
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;
|
|
1135
1137
|
}
|
|
1136
|
-
function
|
|
1138
|
+
function an(e, t) {
|
|
1137
1139
|
let n = U(e), r = n.type, i = e.type === "Feature" ? e.properties : {}, a = n.coordinates;
|
|
1138
1140
|
switch (r) {
|
|
1139
1141
|
case "LineString":
|
|
1140
1142
|
case "MultiLineString": {
|
|
1141
1143
|
let e = [];
|
|
1142
1144
|
return r === "LineString" && (a = [a]), a.forEach((n) => {
|
|
1143
|
-
|
|
1144
|
-
}), e.length === 1 ?
|
|
1145
|
+
en(n, t, e);
|
|
1146
|
+
}), e.length === 1 ? R(e[0], i) : _e(e, i);
|
|
1145
1147
|
}
|
|
1146
|
-
case "Polygon": return ge(
|
|
1147
|
-
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);
|
|
1148
1150
|
default: throw Error("geometry " + r + " not supported");
|
|
1149
1151
|
}
|
|
1150
1152
|
}
|
|
1151
|
-
function
|
|
1153
|
+
function on(e, t) {
|
|
1152
1154
|
let n = [];
|
|
1153
1155
|
for (let r of e) {
|
|
1154
|
-
let e =
|
|
1156
|
+
let e = tn(r, t);
|
|
1155
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));
|
|
1156
1158
|
}
|
|
1157
1159
|
return n;
|
|
1158
1160
|
}
|
|
1159
|
-
var
|
|
1161
|
+
var sn = an;
|
|
1160
1162
|
//#endregion
|
|
1161
1163
|
//#region node_modules/@turf/bbox-polygon/dist/esm/index.js
|
|
1162
|
-
function
|
|
1164
|
+
function cn(e, t = {}) {
|
|
1163
1165
|
let n = Number(e[0]), r = Number(e[1]), i = Number(e[2]), a = Number(e[3]);
|
|
1164
1166
|
if (e.length === 6) throw Error("@turf/bbox-polygon does not support BBox with 6 positions");
|
|
1165
1167
|
let o = [n, r];
|
|
@@ -1174,8 +1176,8 @@ function sn(e, t = {}) {
|
|
|
1174
1176
|
id: t.id
|
|
1175
1177
|
});
|
|
1176
1178
|
}
|
|
1177
|
-
var
|
|
1178
|
-
function
|
|
1179
|
+
var ln = cn, Y = 11102230246251565e-32, X = 134217729, un = (3 + 8 * Y) * Y;
|
|
1180
|
+
function dn(e, t, n, r, i) {
|
|
1179
1181
|
let a, o, s, c, l = t[0], u = r[0], d = 0, f = 0;
|
|
1180
1182
|
u > l == u > -l ? (a = l, l = t[++d]) : (a = u, u = r[++f]);
|
|
1181
1183
|
let p = 0;
|
|
@@ -1184,7 +1186,7 @@ function un(e, t, n, r, i) {
|
|
|
1184
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);
|
|
1185
1187
|
return (a !== 0 || p === 0) && (i[p++] = a), p;
|
|
1186
1188
|
}
|
|
1187
|
-
function
|
|
1189
|
+
function fn(e, t) {
|
|
1188
1190
|
let n = t[0];
|
|
1189
1191
|
for (let r = 1; r < e; r++) n += t[r];
|
|
1190
1192
|
return n;
|
|
@@ -1194,26 +1196,26 @@ function Z(e) {
|
|
|
1194
1196
|
}
|
|
1195
1197
|
//#endregion
|
|
1196
1198
|
//#region node_modules/robust-predicates/esm/orient2d.js
|
|
1197
|
-
var
|
|
1198
|
-
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) {
|
|
1199
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;
|
|
1200
|
-
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 - _,
|
|
1201
|
-
let k =
|
|
1202
|
-
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;
|
|
1203
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;
|
|
1204
|
-
let j =
|
|
1206
|
+
let j = dn(4, gn, 4, Q, _n);
|
|
1205
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;
|
|
1206
|
-
let
|
|
1207
|
-
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];
|
|
1208
1210
|
}
|
|
1209
|
-
function
|
|
1211
|
+
function xn(e, t, n, r, i, a) {
|
|
1210
1212
|
let o = (t - a) * (n - i), s = (e - i) * (r - a), c = o - s, l = Math.abs(o + s);
|
|
1211
|
-
return Math.abs(c) >=
|
|
1213
|
+
return Math.abs(c) >= pn * l ? c : -bn(e, t, n, r, i, a, l);
|
|
1212
1214
|
}
|
|
1213
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);
|
|
1214
1216
|
//#endregion
|
|
1215
1217
|
//#region node_modules/point-in-polygon-hao/dist/esm/index.js
|
|
1216
|
-
function
|
|
1218
|
+
function Sn(e, t) {
|
|
1217
1219
|
var n, r, i = 0, a, o, s, c, l, u, d, f = e[0], p = e[1], m = t.length;
|
|
1218
1220
|
for (n = 0; n < m; n++) {
|
|
1219
1221
|
r = 0;
|
|
@@ -1223,7 +1225,7 @@ function xn(e, t) {
|
|
|
1223
1225
|
if (d = h[r + 1], c = d[0] - f, l = d[1] - p, s === 0 && l === 0) {
|
|
1224
1226
|
if (c <= 0 && o >= 0 || o <= 0 && c >= 0) return 0;
|
|
1225
1227
|
} else if (l >= 0 && s <= 0 || l <= 0 && s >= 0) {
|
|
1226
|
-
if (a =
|
|
1228
|
+
if (a = xn(o, c, s, l, 0, 0), a === 0) return 0;
|
|
1227
1229
|
(a > 0 && l > 0 && s <= 0 || a < 0 && l <= 0 && s > 0) && i++;
|
|
1228
1230
|
}
|
|
1229
1231
|
u = d, s = l, o = c;
|
|
@@ -1233,26 +1235,26 @@ function xn(e, t) {
|
|
|
1233
1235
|
}
|
|
1234
1236
|
//#endregion
|
|
1235
1237
|
//#region node_modules/@turf/boolean-point-in-polygon/dist/esm/index.js
|
|
1236
|
-
function
|
|
1238
|
+
function Cn(e, t, n = {}) {
|
|
1237
1239
|
if (!e) throw Error("point is required");
|
|
1238
1240
|
if (!t) throw Error("polygon is required");
|
|
1239
1241
|
let r = V(e), i = U(t), a = i.type, o = t.bbox, s = i.coordinates;
|
|
1240
|
-
if (o &&
|
|
1242
|
+
if (o && wn(r, o) === !1) return !1;
|
|
1241
1243
|
a === "Polygon" && (s = [s]);
|
|
1242
1244
|
let c = !1;
|
|
1243
1245
|
for (var l = 0; l < s.length; ++l) {
|
|
1244
|
-
let e =
|
|
1246
|
+
let e = Sn(r, s[l]);
|
|
1245
1247
|
if (e === 0) return !n.ignoreBoundary;
|
|
1246
1248
|
e && (c = !0);
|
|
1247
1249
|
}
|
|
1248
1250
|
return c;
|
|
1249
1251
|
}
|
|
1250
|
-
function
|
|
1252
|
+
function wn(e, t) {
|
|
1251
1253
|
return t[0] <= e[0] && t[1] <= e[1] && t[2] >= e[0] && t[3] >= e[1];
|
|
1252
1254
|
}
|
|
1253
1255
|
//#endregion
|
|
1254
1256
|
//#region node_modules/@turf/geojson-rbush/dist/esm/index.js
|
|
1255
|
-
var
|
|
1257
|
+
var Tn = /* @__PURE__ */ pe((/* @__PURE__ */ de(((e, t) => {
|
|
1256
1258
|
(function(n, r) {
|
|
1257
1259
|
typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n ||= self).RBush = r();
|
|
1258
1260
|
})(e, function() {
|
|
@@ -1470,7 +1472,7 @@ var wn = /* @__PURE__ */ pe((/* @__PURE__ */ de(((e, t) => {
|
|
|
1470
1472
|
}, r;
|
|
1471
1473
|
});
|
|
1472
1474
|
})))(), 1);
|
|
1473
|
-
function
|
|
1475
|
+
function En(e) {
|
|
1474
1476
|
var t;
|
|
1475
1477
|
if (e.bbox) t = e.bbox;
|
|
1476
1478
|
else if (Array.isArray(e) && e.length === 4) t = e;
|
|
@@ -1490,9 +1492,9 @@ function Tn(e) {
|
|
|
1490
1492
|
maxY: t[3]
|
|
1491
1493
|
};
|
|
1492
1494
|
}
|
|
1493
|
-
var
|
|
1495
|
+
var Dn = class {
|
|
1494
1496
|
constructor(e = 9) {
|
|
1495
|
-
this.tree = new
|
|
1497
|
+
this.tree = new Tn.default(e), this.tree.toBBox = En;
|
|
1496
1498
|
}
|
|
1497
1499
|
insert(e) {
|
|
1498
1500
|
if (e.type !== "Feature") throw Error("invalid feature");
|
|
@@ -1516,13 +1518,13 @@ var En = class {
|
|
|
1516
1518
|
return this.tree.clear(), this;
|
|
1517
1519
|
}
|
|
1518
1520
|
search(e) {
|
|
1519
|
-
return
|
|
1521
|
+
return z(this.tree.search(En(e)));
|
|
1520
1522
|
}
|
|
1521
1523
|
collides(e) {
|
|
1522
|
-
return this.tree.collides(
|
|
1524
|
+
return this.tree.collides(En(e));
|
|
1523
1525
|
}
|
|
1524
1526
|
all() {
|
|
1525
|
-
return
|
|
1527
|
+
return z(this.tree.all());
|
|
1526
1528
|
}
|
|
1527
1529
|
toJSON() {
|
|
1528
1530
|
return this.tree.toJSON();
|
|
@@ -1531,12 +1533,12 @@ var En = class {
|
|
|
1531
1533
|
return this.tree.fromJSON(e), this;
|
|
1532
1534
|
}
|
|
1533
1535
|
};
|
|
1534
|
-
function
|
|
1535
|
-
return new
|
|
1536
|
+
function On(e) {
|
|
1537
|
+
return new Dn(e);
|
|
1536
1538
|
}
|
|
1537
1539
|
//#endregion
|
|
1538
1540
|
//#region node_modules/@turf/truncate/dist/esm/index.js
|
|
1539
|
-
function
|
|
1541
|
+
function kn(e, t) {
|
|
1540
1542
|
if (t ??= {}, !Se(t)) throw Error("options is invalid");
|
|
1541
1543
|
var n = t.precision, r = t.coordinates, i = t.mutate;
|
|
1542
1544
|
if (n = n == null || isNaN(n) ? 6 : n, r = r == null || isNaN(r) ? 3 : r, !e) throw Error("<geojson> is required");
|
|
@@ -1545,24 +1547,24 @@ function On(e, t) {
|
|
|
1545
1547
|
(i === !1 || i === void 0) && (e = JSON.parse(JSON.stringify(e)));
|
|
1546
1548
|
var a = 10 ** n;
|
|
1547
1549
|
return Ce(e, function(e) {
|
|
1548
|
-
|
|
1550
|
+
An(e, a, r);
|
|
1549
1551
|
}), e;
|
|
1550
1552
|
}
|
|
1551
|
-
function
|
|
1553
|
+
function An(e, t, n) {
|
|
1552
1554
|
e.length > n && e.splice(n, e.length);
|
|
1553
1555
|
for (var r = 0; r < e.length; r++) e[r] = Math.round(e[r] * t) / t;
|
|
1554
1556
|
return e;
|
|
1555
1557
|
}
|
|
1556
1558
|
//#endregion
|
|
1557
1559
|
//#region node_modules/@turf/line-segment/dist/esm/index.js
|
|
1558
|
-
function
|
|
1560
|
+
function jn(e) {
|
|
1559
1561
|
if (!e) throw Error("geojson is required");
|
|
1560
1562
|
let t = [];
|
|
1561
1563
|
return Oe(e, (e) => {
|
|
1562
|
-
|
|
1563
|
-
}),
|
|
1564
|
+
Mn(e, t);
|
|
1565
|
+
}), z(t);
|
|
1564
1566
|
}
|
|
1565
|
-
function
|
|
1567
|
+
function Mn(e, t) {
|
|
1566
1568
|
let n = [], r = e.geometry;
|
|
1567
1569
|
if (r !== null) {
|
|
1568
1570
|
switch (r.type) {
|
|
@@ -1572,20 +1574,20 @@ function jn(e, t) {
|
|
|
1572
1574
|
case "LineString": n = [H(r)];
|
|
1573
1575
|
}
|
|
1574
1576
|
n.forEach((n) => {
|
|
1575
|
-
|
|
1577
|
+
Nn(n, e.properties).forEach((e) => {
|
|
1576
1578
|
e.id = t.length, t.push(e);
|
|
1577
1579
|
});
|
|
1578
1580
|
});
|
|
1579
1581
|
}
|
|
1580
1582
|
}
|
|
1581
|
-
function
|
|
1583
|
+
function Nn(e, t) {
|
|
1582
1584
|
let n = [];
|
|
1583
1585
|
return e.reduce((e, r) => {
|
|
1584
|
-
let i =
|
|
1585
|
-
return i.bbox =
|
|
1586
|
+
let i = R([e, r], t);
|
|
1587
|
+
return i.bbox = Pn(e, r), n.push(i), r;
|
|
1586
1588
|
}), n;
|
|
1587
1589
|
}
|
|
1588
|
-
function
|
|
1590
|
+
function Pn(e, t) {
|
|
1589
1591
|
let n = e[0], r = e[1], i = t[0], a = t[1];
|
|
1590
1592
|
return [
|
|
1591
1593
|
n < i ? n : i,
|
|
@@ -1596,8 +1598,8 @@ function Nn(e, t) {
|
|
|
1596
1598
|
}
|
|
1597
1599
|
//#endregion
|
|
1598
1600
|
//#region node_modules/sweepline-intersections/dist/sweeplineIntersections.esm.js
|
|
1599
|
-
var
|
|
1600
|
-
constructor(e = [], t =
|
|
1601
|
+
var Fn = class {
|
|
1602
|
+
constructor(e = [], t = In) {
|
|
1601
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);
|
|
1602
1604
|
}
|
|
1603
1605
|
push(e) {
|
|
@@ -1630,16 +1632,16 @@ var Pn = class {
|
|
|
1630
1632
|
t[e] = i;
|
|
1631
1633
|
}
|
|
1632
1634
|
};
|
|
1633
|
-
function
|
|
1635
|
+
function In(e, t) {
|
|
1634
1636
|
return e < t ? -1 : e > t ? 1 : 0;
|
|
1635
1637
|
}
|
|
1636
|
-
function
|
|
1638
|
+
function Ln(e, t) {
|
|
1637
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;
|
|
1638
1640
|
}
|
|
1639
|
-
function
|
|
1641
|
+
function Rn(e, t) {
|
|
1640
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;
|
|
1641
1643
|
}
|
|
1642
|
-
var
|
|
1644
|
+
var zn = class {
|
|
1643
1645
|
constructor(e, t, n, r) {
|
|
1644
1646
|
this.p = {
|
|
1645
1647
|
x: e[0],
|
|
@@ -1650,50 +1652,50 @@ var Rn = class {
|
|
|
1650
1652
|
return this.p.x === e.p.x && this.p.y === e.p.y;
|
|
1651
1653
|
}
|
|
1652
1654
|
};
|
|
1653
|
-
function
|
|
1655
|
+
function Bn(e, t) {
|
|
1654
1656
|
if (e.type === "FeatureCollection") {
|
|
1655
1657
|
let n = e.features;
|
|
1656
|
-
for (let e = 0; e < n.length; e++)
|
|
1657
|
-
} else
|
|
1658
|
+
for (let e = 0; e < n.length; e++) Wn(n[e], t);
|
|
1659
|
+
} else Wn(e, t);
|
|
1658
1660
|
}
|
|
1659
|
-
var
|
|
1660
|
-
function
|
|
1661
|
+
var Vn = 0, Hn = 0, Un = 0;
|
|
1662
|
+
function Wn(e, t) {
|
|
1661
1663
|
let n = e.type === "Feature" ? e.geometry : e, r = n.coordinates;
|
|
1662
1664
|
(n.type === "Polygon" || n.type === "MultiLineString") && (r = [r]), n.type === "LineString" && (r = [[r]]);
|
|
1663
1665
|
for (let e = 0; e < r.length; e++) for (let n = 0; n < r[e].length; n++) {
|
|
1664
1666
|
let i = r[e][n][0], a = null;
|
|
1665
|
-
|
|
1667
|
+
Hn += 1;
|
|
1666
1668
|
for (let o = 0; o < r[e][n].length - 1; o++) {
|
|
1667
1669
|
a = r[e][n][o + 1];
|
|
1668
|
-
let s = new
|
|
1669
|
-
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;
|
|
1670
1672
|
}
|
|
1671
1673
|
}
|
|
1672
|
-
|
|
1674
|
+
Vn += 1;
|
|
1673
1675
|
}
|
|
1674
|
-
var
|
|
1676
|
+
var Gn = class {
|
|
1675
1677
|
constructor(e) {
|
|
1676
1678
|
this.leftSweepEvent = e, this.rightSweepEvent = e.otherEvent;
|
|
1677
1679
|
}
|
|
1678
1680
|
};
|
|
1679
|
-
function
|
|
1681
|
+
function Kn(e, t) {
|
|
1680
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;
|
|
1681
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);
|
|
1682
1684
|
if (u === 0) return !1;
|
|
1683
1685
|
let p = d / u, m = f / u;
|
|
1684
1686
|
return p >= 0 && p <= 1 && m >= 0 && m <= 1 ? [n + p * (i - n), r + p * (a - r)] : !1;
|
|
1685
1687
|
}
|
|
1686
|
-
function
|
|
1688
|
+
function qn(e, t) {
|
|
1687
1689
|
t ||= !1;
|
|
1688
|
-
let n = [], r = new
|
|
1690
|
+
let n = [], r = new Fn([], Rn);
|
|
1689
1691
|
for (; e.length;) {
|
|
1690
1692
|
let i = e.pop();
|
|
1691
1693
|
if (i.isLeftEndpoint) {
|
|
1692
|
-
let e = new
|
|
1694
|
+
let e = new Gn(i);
|
|
1693
1695
|
for (let a = 0; a < r.data.length; a++) {
|
|
1694
1696
|
let o = r.data[a];
|
|
1695
1697
|
if (t && o.leftSweepEvent.featureId === i.featureId) continue;
|
|
1696
|
-
let s =
|
|
1698
|
+
let s = Kn(e, o);
|
|
1697
1699
|
s !== !1 && n.push(s);
|
|
1698
1700
|
}
|
|
1699
1701
|
r.push(e);
|
|
@@ -1701,17 +1703,17 @@ function Kn(e, t) {
|
|
|
1701
1703
|
}
|
|
1702
1704
|
return n;
|
|
1703
1705
|
}
|
|
1704
|
-
function
|
|
1705
|
-
let n = new
|
|
1706
|
-
return
|
|
1706
|
+
function Jn(e, t) {
|
|
1707
|
+
let n = new Fn([], Ln);
|
|
1708
|
+
return Bn(e, n), qn(n, t);
|
|
1707
1709
|
}
|
|
1708
1710
|
//#endregion
|
|
1709
1711
|
//#region node_modules/@turf/line-intersect/dist/esm/index.js
|
|
1710
|
-
var
|
|
1711
|
-
function
|
|
1712
|
+
var Yn = Jn;
|
|
1713
|
+
function Xn(e, t, n = {}) {
|
|
1712
1714
|
let { removeDuplicates: r = !0, ignoreSelfIntersections: i = !0 } = n, a = [];
|
|
1713
|
-
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(
|
|
1714
|
-
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 = [];
|
|
1715
1717
|
if (r) {
|
|
1716
1718
|
let e = {};
|
|
1717
1719
|
o.forEach((t) => {
|
|
@@ -1719,27 +1721,27 @@ function Yn(e, t, n = {}) {
|
|
|
1719
1721
|
e[n] || (e[n] = !0, s.push(t));
|
|
1720
1722
|
});
|
|
1721
1723
|
} else s = o;
|
|
1722
|
-
return
|
|
1724
|
+
return z(s.map((e) => he(e)));
|
|
1723
1725
|
}
|
|
1724
1726
|
//#endregion
|
|
1725
1727
|
//#region node_modules/@turf/distance/dist/esm/index.js
|
|
1726
|
-
function
|
|
1727
|
-
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);
|
|
1728
1730
|
return ye(2 * Math.atan2(Math.sqrt(l), Math.sqrt(1 - l)), n.units);
|
|
1729
1731
|
}
|
|
1730
1732
|
//#endregion
|
|
1731
1733
|
//#region node_modules/@turf/nearest-point-on-line/dist/esm/index.js
|
|
1732
|
-
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, {
|
|
1733
1735
|
enumerable: !0,
|
|
1734
1736
|
configurable: !0,
|
|
1735
1737
|
writable: !0,
|
|
1736
1738
|
value: n
|
|
1737
|
-
}) : e[t] = n,
|
|
1738
|
-
for (var n in t ||= {})
|
|
1739
|
-
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]);
|
|
1740
1742
|
return e;
|
|
1741
|
-
},
|
|
1742
|
-
function
|
|
1743
|
+
}, or = (e, t) => $n(e, er(t));
|
|
1744
|
+
function sr(e, t, n = {}) {
|
|
1743
1745
|
if (!e || !t) throw Error("lines and inputPoint are required arguments");
|
|
1744
1746
|
let r = V(t), i = he([Infinity, Infinity], {
|
|
1745
1747
|
lineStringIndex: -1,
|
|
@@ -1757,11 +1759,11 @@ function or(e, t, n = {}) {
|
|
|
1757
1759
|
s !== l && (s = l, o = 0);
|
|
1758
1760
|
let u = H(e);
|
|
1759
1761
|
for (let e = 0; e < u.length - 1; e++) {
|
|
1760
|
-
let s = he(u[e]), c = V(s), d = he(u[e + 1]), f = V(d), p =
|
|
1761
|
-
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] =
|
|
1762
|
-
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);
|
|
1763
1765
|
if (g < i.properties.pointDistance) {
|
|
1764
|
-
let t =
|
|
1766
|
+
let t = Zn(s, m, n);
|
|
1765
1767
|
i = he(m, {
|
|
1766
1768
|
lineStringIndex: l,
|
|
1767
1769
|
segmentIndex: h ? e + 1 : e,
|
|
@@ -1773,7 +1775,7 @@ function or(e, t, n = {}) {
|
|
|
1773
1775
|
index: -1,
|
|
1774
1776
|
location: -1,
|
|
1775
1777
|
dist: Infinity
|
|
1776
|
-
}), i.properties = ar(
|
|
1778
|
+
}), i.properties = or(ar({}, i.properties), {
|
|
1777
1779
|
multiFeatureIndex: i.properties.lineStringIndex,
|
|
1778
1780
|
index: i.properties.segmentIndex,
|
|
1779
1781
|
location: i.properties.totalDistance,
|
|
@@ -1788,7 +1790,7 @@ function $(e, t) {
|
|
|
1788
1790
|
let [n, r, i] = e, [a, o, s] = t;
|
|
1789
1791
|
return n * a + r * o + i * s;
|
|
1790
1792
|
}
|
|
1791
|
-
function
|
|
1793
|
+
function cr(e, t) {
|
|
1792
1794
|
let [n, r, i] = e, [a, o, s] = t;
|
|
1793
1795
|
return [
|
|
1794
1796
|
r * s - i * o,
|
|
@@ -1796,163 +1798,163 @@ function sr(e, t) {
|
|
|
1796
1798
|
n * o - r * a
|
|
1797
1799
|
];
|
|
1798
1800
|
}
|
|
1799
|
-
function
|
|
1801
|
+
function lr(e) {
|
|
1800
1802
|
return Math.sqrt(e[0] ** 2 + e[1] ** 2 + e[2] ** 2);
|
|
1801
1803
|
}
|
|
1802
|
-
function
|
|
1803
|
-
let t =
|
|
1804
|
+
function ur(e) {
|
|
1805
|
+
let t = lr(e);
|
|
1804
1806
|
return [
|
|
1805
1807
|
e[0] / t,
|
|
1806
1808
|
e[1] / t,
|
|
1807
1809
|
e[2] / t
|
|
1808
1810
|
];
|
|
1809
1811
|
}
|
|
1810
|
-
function
|
|
1811
|
-
let t =
|
|
1812
|
+
function dr(e) {
|
|
1813
|
+
let t = B(e[1]), n = B(e[0]);
|
|
1812
1814
|
return [
|
|
1813
1815
|
Math.cos(t) * Math.cos(n),
|
|
1814
1816
|
Math.cos(t) * Math.sin(n),
|
|
1815
1817
|
Math.sin(t)
|
|
1816
1818
|
];
|
|
1817
1819
|
}
|
|
1818
|
-
function
|
|
1820
|
+
function fr(e) {
|
|
1819
1821
|
let [t, n, r] = e, i = Math.min(Math.max(r, -1), 1), a = be(Math.asin(i));
|
|
1820
1822
|
return [be(Math.atan2(n, t)), a];
|
|
1821
1823
|
}
|
|
1822
|
-
function
|
|
1823
|
-
let r =
|
|
1824
|
+
function pr(e, t, n) {
|
|
1825
|
+
let r = dr(e), i = dr(t), a = dr(n), o = cr(r, i);
|
|
1824
1826
|
if (o[0] === 0 && o[1] === 0 && o[2] === 0) return $(r, i) > 0 ? [[...t], !0] : [[...n], !1];
|
|
1825
|
-
let s =
|
|
1827
|
+
let s = cr(o, a);
|
|
1826
1828
|
if (s[0] === 0 && s[1] === 0 && s[2] === 0) return [[...t], !0];
|
|
1827
|
-
let c =
|
|
1829
|
+
let c = ur(cr(s, o)), l = [
|
|
1828
1830
|
-c[0],
|
|
1829
1831
|
-c[1],
|
|
1830
1832
|
-c[2]
|
|
1831
|
-
], u = $(a, c) > $(a, l) ? c : l, d =
|
|
1832
|
-
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];
|
|
1833
1835
|
}
|
|
1834
1836
|
//#endregion
|
|
1835
1837
|
//#region node_modules/@turf/line-split/dist/esm/index.js
|
|
1836
|
-
function
|
|
1838
|
+
function mr(e, t) {
|
|
1837
1839
|
if (!e) throw Error("line is required");
|
|
1838
1840
|
if (!t) throw Error("splitter is required");
|
|
1839
|
-
let n =
|
|
1841
|
+
let n = We(e), r = We(t);
|
|
1840
1842
|
if (n !== "LineString") throw Error("line must be LineString");
|
|
1841
1843
|
if (r === "FeatureCollection") throw Error("splitter cannot be a FeatureCollection");
|
|
1842
1844
|
if (r === "GeometryCollection") throw Error("splitter cannot be a GeometryCollection");
|
|
1843
|
-
var i =
|
|
1844
|
-
switch (e.type !== "Feature" && (e =
|
|
1845
|
-
case "Point": return
|
|
1846
|
-
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);
|
|
1847
1849
|
case "LineString":
|
|
1848
1850
|
case "MultiLineString":
|
|
1849
1851
|
case "Polygon":
|
|
1850
|
-
case "MultiPolygon": return
|
|
1852
|
+
case "MultiPolygon": return hr(e, Xn(e, i, { ignoreSelfIntersections: !0 }));
|
|
1851
1853
|
}
|
|
1852
1854
|
}
|
|
1853
|
-
function
|
|
1854
|
-
var n = [], r =
|
|
1855
|
+
function hr(e, t) {
|
|
1856
|
+
var n = [], r = On();
|
|
1855
1857
|
return Oe(t, function(t) {
|
|
1856
1858
|
if (n.forEach(function(e, t) {
|
|
1857
1859
|
e.id = t;
|
|
1858
|
-
}), !n.length) n =
|
|
1860
|
+
}), !n.length) n = gr(e, t).features, r.load(z(n));
|
|
1859
1861
|
else {
|
|
1860
1862
|
var i = r.search(t);
|
|
1861
1863
|
if (i.features.length) {
|
|
1862
|
-
var a =
|
|
1864
|
+
var a = _r(t, i);
|
|
1863
1865
|
n = n.filter(function(e) {
|
|
1864
1866
|
return e.id !== a.id;
|
|
1865
|
-
}), r.remove(a), we(
|
|
1867
|
+
}), r.remove(a), we(gr(a, t), function(e) {
|
|
1866
1868
|
n.push(e), r.insert(e);
|
|
1867
1869
|
});
|
|
1868
1870
|
}
|
|
1869
1871
|
}
|
|
1870
|
-
}),
|
|
1872
|
+
}), z(n);
|
|
1871
1873
|
}
|
|
1872
|
-
function
|
|
1874
|
+
function gr(e, t) {
|
|
1873
1875
|
var n = [], r = H(e)[0], i = H(e)[e.geometry.coordinates.length - 1];
|
|
1874
|
-
if (
|
|
1875
|
-
var a =
|
|
1876
|
+
if (vr(r, V(t)) || vr(i, V(t))) return z([e]);
|
|
1877
|
+
var a = On(), o = jn(e);
|
|
1876
1878
|
a.load(o);
|
|
1877
1879
|
var s = a.search(t);
|
|
1878
|
-
if (!s.features.length) return
|
|
1879
|
-
var c =
|
|
1880
|
+
if (!s.features.length) return z([e]);
|
|
1881
|
+
var c = _r(t, s), l = Te(o, function(e, r, i) {
|
|
1880
1882
|
var a = H(r)[1], o = V(t);
|
|
1881
|
-
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);
|
|
1882
1884
|
}, [r]);
|
|
1883
|
-
return l.length > 1 && n.push(
|
|
1885
|
+
return l.length > 1 && n.push(R(l)), z(n);
|
|
1884
1886
|
}
|
|
1885
|
-
function
|
|
1887
|
+
function _r(e, t) {
|
|
1886
1888
|
if (!t.features.length) throw Error("lines must contain features");
|
|
1887
1889
|
if (t.features.length === 1) return t.features[0];
|
|
1888
1890
|
var n, r = Infinity;
|
|
1889
1891
|
return we(t, function(t) {
|
|
1890
|
-
var i =
|
|
1892
|
+
var i = sr(t, e).properties.dist;
|
|
1891
1893
|
i < r && (n = t, r = i);
|
|
1892
1894
|
}), n;
|
|
1893
1895
|
}
|
|
1894
|
-
function
|
|
1896
|
+
function vr(e, t) {
|
|
1895
1897
|
return e[0] === t[0] && e[1] === t[1];
|
|
1896
1898
|
}
|
|
1897
1899
|
//#endregion
|
|
1898
1900
|
//#region node_modules/@turf/boolean-contains/dist/esm/index.js
|
|
1899
|
-
function
|
|
1901
|
+
function yr(e, t) {
|
|
1900
1902
|
let n = U(e), r = U(t), i = n.type, a = r.type, o = n.coordinates, s = r.coordinates;
|
|
1901
1903
|
switch (i) {
|
|
1902
1904
|
case "Point": switch (a) {
|
|
1903
|
-
case "Point": return
|
|
1905
|
+
case "Point": return jr(o, s);
|
|
1904
1906
|
default: throw Error("feature2 " + a + " geometry not supported");
|
|
1905
1907
|
}
|
|
1906
1908
|
case "MultiPoint": switch (a) {
|
|
1907
|
-
case "Point": return
|
|
1908
|
-
case "MultiPoint": return
|
|
1909
|
+
case "Point": return Sr(n, r);
|
|
1910
|
+
case "MultiPoint": return Cr(n, r);
|
|
1909
1911
|
default: throw Error("feature2 " + a + " geometry not supported");
|
|
1910
1912
|
}
|
|
1911
1913
|
case "LineString": switch (a) {
|
|
1912
1914
|
case "Point": return W(r, n, { ignoreEndVertices: !0 });
|
|
1913
|
-
case "LineString": return
|
|
1914
|
-
case "MultiPoint": return
|
|
1915
|
+
case "LineString": return Er(n, r);
|
|
1916
|
+
case "MultiPoint": return wr(n, r);
|
|
1915
1917
|
default: throw Error("feature2 " + a + " geometry not supported");
|
|
1916
1918
|
}
|
|
1917
1919
|
case "Polygon": switch (a) {
|
|
1918
|
-
case "Point": return
|
|
1919
|
-
case "LineString": return
|
|
1920
|
-
case "Polygon": return
|
|
1921
|
-
case "MultiPoint": return
|
|
1922
|
-
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);
|
|
1923
1925
|
default: throw Error("feature2 " + a + " geometry not supported");
|
|
1924
1926
|
}
|
|
1925
1927
|
case "MultiPolygon": switch (a) {
|
|
1926
|
-
case "Polygon": return
|
|
1928
|
+
case "Polygon": return br(n, r);
|
|
1927
1929
|
default: throw Error("feature2 " + a + " geometry not supported");
|
|
1928
1930
|
}
|
|
1929
1931
|
default: throw Error("feature1 " + i + " geometry not supported");
|
|
1930
1932
|
}
|
|
1931
1933
|
}
|
|
1932
|
-
function
|
|
1933
|
-
return e.coordinates.some((e) =>
|
|
1934
|
+
function br(e, t) {
|
|
1935
|
+
return e.coordinates.some((e) => kr({
|
|
1934
1936
|
type: "Polygon",
|
|
1935
1937
|
coordinates: e
|
|
1936
1938
|
}, t));
|
|
1937
1939
|
}
|
|
1938
|
-
function
|
|
1939
|
-
return t.coordinates.every((t) =>
|
|
1940
|
+
function xr(e, t) {
|
|
1941
|
+
return t.coordinates.every((t) => kr(e, {
|
|
1940
1942
|
type: "Polygon",
|
|
1941
1943
|
coordinates: t
|
|
1942
1944
|
}));
|
|
1943
1945
|
}
|
|
1944
|
-
function
|
|
1946
|
+
function Sr(e, t) {
|
|
1945
1947
|
let n, r = !1;
|
|
1946
|
-
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)) {
|
|
1947
1949
|
r = !0;
|
|
1948
1950
|
break;
|
|
1949
1951
|
}
|
|
1950
1952
|
return r;
|
|
1951
1953
|
}
|
|
1952
|
-
function
|
|
1954
|
+
function Cr(e, t) {
|
|
1953
1955
|
for (let n of t.coordinates) {
|
|
1954
1956
|
let t = !1;
|
|
1955
|
-
for (let r of e.coordinates) if (
|
|
1957
|
+
for (let r of e.coordinates) if (jr(n, r)) {
|
|
1956
1958
|
t = !0;
|
|
1957
1959
|
break;
|
|
1958
1960
|
}
|
|
@@ -1960,16 +1962,16 @@ function Sr(e, t) {
|
|
|
1960
1962
|
}
|
|
1961
1963
|
return !0;
|
|
1962
1964
|
}
|
|
1963
|
-
function
|
|
1965
|
+
function wr(e, t) {
|
|
1964
1966
|
let n = !1;
|
|
1965
1967
|
for (let r of t.coordinates) if (W(r, e, { ignoreEndVertices: !0 }) && (n = !0), !W(r, e)) return !1;
|
|
1966
1968
|
return !!n;
|
|
1967
1969
|
}
|
|
1968
|
-
function
|
|
1969
|
-
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;
|
|
1970
1972
|
return !0;
|
|
1971
1973
|
}
|
|
1972
|
-
function
|
|
1974
|
+
function Er(e, t) {
|
|
1973
1975
|
let n = !1;
|
|
1974
1976
|
for (let r of t.coordinates) if (W({
|
|
1975
1977
|
type: "Point",
|
|
@@ -1980,58 +1982,58 @@ function Tr(e, t) {
|
|
|
1980
1982
|
}, e, { ignoreEndVertices: !1 })) return !1;
|
|
1981
1983
|
return n;
|
|
1982
1984
|
}
|
|
1983
|
-
function
|
|
1985
|
+
function Dr(e, t) {
|
|
1984
1986
|
let n = e.coordinates, r = [];
|
|
1985
1987
|
for (let e = 0; e < n.length - 1; e++) {
|
|
1986
|
-
let i =
|
|
1988
|
+
let i = R([n[e], n[e + 1]]), a = mr(i, L(t));
|
|
1987
1989
|
a.features.length === 0 ? r.push(i) : r.push(...a.features);
|
|
1988
1990
|
}
|
|
1989
|
-
return
|
|
1991
|
+
return z(r);
|
|
1990
1992
|
}
|
|
1991
|
-
function
|
|
1992
|
-
if (!
|
|
1993
|
-
for (let n of t.coordinates) if (!
|
|
1994
|
-
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);
|
|
1995
1997
|
for (let t of r.features) {
|
|
1996
|
-
let r =
|
|
1997
|
-
if (!
|
|
1998
|
-
!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);
|
|
1999
2001
|
}
|
|
2000
2002
|
return n;
|
|
2001
2003
|
}
|
|
2002
|
-
function
|
|
2003
|
-
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;
|
|
2004
2006
|
let n = U(t).coordinates;
|
|
2005
|
-
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;
|
|
2006
2008
|
return !0;
|
|
2007
2009
|
}
|
|
2008
|
-
function
|
|
2010
|
+
function Ar(e, t) {
|
|
2009
2011
|
return !(e[0] > t[0] || e[2] < t[2] || e[1] > t[1] || e[3] < t[3]);
|
|
2010
2012
|
}
|
|
2011
|
-
function
|
|
2013
|
+
function jr(e, t) {
|
|
2012
2014
|
return e[0] === t[0] && e[1] === t[1];
|
|
2013
2015
|
}
|
|
2014
|
-
function
|
|
2016
|
+
function Mr(e, t) {
|
|
2015
2017
|
return [(e[0] + t[0]) / 2, (e[1] + t[1]) / 2];
|
|
2016
2018
|
}
|
|
2017
|
-
var
|
|
2019
|
+
var Nr = yr;
|
|
2018
2020
|
//#endregion
|
|
2019
2021
|
//#region node_modules/@turf/envelope/dist/esm/index.js
|
|
2020
|
-
function
|
|
2021
|
-
return
|
|
2022
|
+
function Pr(e) {
|
|
2023
|
+
return cn(K(e));
|
|
2022
2024
|
}
|
|
2023
|
-
var
|
|
2025
|
+
var Fr = Pr;
|
|
2024
2026
|
//#endregion
|
|
2025
2027
|
//#region src/utils/geom.ts
|
|
2026
|
-
function
|
|
2028
|
+
function Ir(e) {
|
|
2027
2029
|
return e.geometry && (e.geometry.type === "LineString" || e.geometry.type === "MultiLineString" || e.geometry.type === "Polygon" || e.geometry.type === "MultiPolygon");
|
|
2028
2030
|
}
|
|
2029
|
-
function
|
|
2030
|
-
let n = e.map((e) => e.geometry ? e.geometry.type === "Point" || e.geometry.type === "MultiPoint" ?
|
|
2031
|
-
return n.length === 0 ? null :
|
|
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));
|
|
2032
2034
|
}
|
|
2033
|
-
var
|
|
2034
|
-
function
|
|
2035
|
+
var Rr = .001;
|
|
2036
|
+
function zr(e, t) {
|
|
2035
2037
|
return [
|
|
2036
2038
|
e[0] - t,
|
|
2037
2039
|
e[1] - t,
|
|
@@ -2039,15 +2041,15 @@ function Rr(e, t) {
|
|
|
2039
2041
|
e[3] + t
|
|
2040
2042
|
];
|
|
2041
2043
|
}
|
|
2042
|
-
function zr(e) {
|
|
2043
|
-
return Rr(e, Lr);
|
|
2044
|
-
}
|
|
2045
2044
|
function Br(e) {
|
|
2045
|
+
return zr(e, Rr);
|
|
2046
|
+
}
|
|
2047
|
+
function Vr(e) {
|
|
2046
2048
|
return e[0] === e[2] || e[1] === e[3];
|
|
2047
2049
|
}
|
|
2048
2050
|
//#endregion
|
|
2049
2051
|
//#region src/components/VMap.vue?vue&type=script&setup=true&lang.ts
|
|
2050
|
-
var
|
|
2052
|
+
var Hr = ["id"], Ur = /* @__PURE__ */ wt(/* @__PURE__ */ l({
|
|
2051
2053
|
__name: "VMap",
|
|
2052
2054
|
props: {
|
|
2053
2055
|
id: {},
|
|
@@ -2055,42 +2057,36 @@ var Vr = ["id"], Hr = /* @__PURE__ */ Ct(/* @__PURE__ */ l({
|
|
|
2055
2057
|
bbox: {}
|
|
2056
2058
|
},
|
|
2057
2059
|
setup(e) {
|
|
2058
|
-
let t = e, n = p(
|
|
2060
|
+
let t = e, n = p(rt, Zt), r = {
|
|
2059
2061
|
top: 60,
|
|
2060
2062
|
left: 60,
|
|
2061
2063
|
right: 60,
|
|
2062
2064
|
bottom: 80
|
|
2063
|
-
}, a =
|
|
2064
|
-
|
|
2065
|
-
e ?
|
|
2066
|
-
}),
|
|
2067
|
-
a.value && o.value && e && (a.value.remove(), a.value = void 0,
|
|
2065
|
+
}, a = O(), o = O(!1), s = O(), c = O(), l, u;
|
|
2066
|
+
N(o, (e) => {
|
|
2067
|
+
e ? d() : (a.value && a.value.remove(), a.value = void 0);
|
|
2068
|
+
}), N(() => t.features, (e) => {
|
|
2069
|
+
a.value && o.value && e && (a.value.remove(), a.value = void 0, d());
|
|
2068
2070
|
});
|
|
2069
|
-
function
|
|
2071
|
+
function d() {
|
|
2070
2072
|
if (!a.value) {
|
|
2071
|
-
l = t.bbox ?
|
|
2072
|
-
let e = l ?
|
|
2073
|
+
l = t.bbox ? Br(t.bbox) : void 0;
|
|
2074
|
+
let e = l ? Lr(t.features, l) : z(t.features);
|
|
2073
2075
|
if (e) {
|
|
2074
|
-
let
|
|
2075
|
-
a.value = new ie.Map({
|
|
2076
|
+
let r = l ?? Et(e);
|
|
2077
|
+
u = [[r[0], r[1]], [r[2], r[3]]], a.value = new ie.Map({
|
|
2076
2078
|
hash: !1,
|
|
2077
2079
|
container: `map-${t.id}`,
|
|
2078
|
-
bounds: o,
|
|
2079
|
-
fitBoundsOptions: {
|
|
2080
|
-
padding: r,
|
|
2081
|
-
animate: !1,
|
|
2082
|
-
maxZoom: 17
|
|
2083
|
-
},
|
|
2084
2080
|
style: n,
|
|
2085
2081
|
cooperativeGestures: !0,
|
|
2086
2082
|
attributionControl: !1
|
|
2087
|
-
}), a.value.addControl(new ie.FullscreenControl()), a.value.on("load",
|
|
2083
|
+
}), a.value.addControl(new ie.FullscreenControl()), a.value.on("load", m);
|
|
2088
2084
|
}
|
|
2089
2085
|
}
|
|
2090
2086
|
}
|
|
2091
|
-
function
|
|
2087
|
+
function f(e) {
|
|
2092
2088
|
if (!a.value) throw Error("Call initMap() function first.");
|
|
2093
|
-
a.value.addSource(
|
|
2089
|
+
a.value.addSource($t, {
|
|
2094
2090
|
type: "geojson",
|
|
2095
2091
|
data: {
|
|
2096
2092
|
type: "Feature",
|
|
@@ -2108,63 +2104,72 @@ var Vr = ["id"], Hr = /* @__PURE__ */ Ct(/* @__PURE__ */ l({
|
|
|
2108
2104
|
}
|
|
2109
2105
|
}), a.value.addLayer(J.Bbox);
|
|
2110
2106
|
}
|
|
2111
|
-
function
|
|
2107
|
+
function m() {
|
|
2112
2108
|
if (!a.value) throw Error("Call initMap() function first.");
|
|
2113
|
-
|
|
2109
|
+
a.value.resize(), u && a.value.fitBounds(u, {
|
|
2110
|
+
padding: r,
|
|
2111
|
+
animate: !1,
|
|
2112
|
+
maxZoom: 17
|
|
2113
|
+
}), t.bbox && f(Vr(t.bbox) ? [
|
|
2114
|
+
t.bbox[0] - 1e-4,
|
|
2115
|
+
t.bbox[1] - 1e-4,
|
|
2116
|
+
t.bbox[2] + 1e-4,
|
|
2117
|
+
t.bbox[3] + 1e-4
|
|
2118
|
+
] : t.bbox), a.value.addSource(q, {
|
|
2114
2119
|
type: "geojson",
|
|
2115
2120
|
data: {
|
|
2116
2121
|
type: "FeatureCollection",
|
|
2117
2122
|
features: t.features
|
|
2118
2123
|
}
|
|
2119
|
-
}),
|
|
2124
|
+
}), h(), y();
|
|
2120
2125
|
}
|
|
2121
|
-
function
|
|
2126
|
+
function h() {
|
|
2122
2127
|
if (!a.value) throw Error("Call initMap() function first.");
|
|
2123
2128
|
a.value.getLayer(J.Polygon.id) || a.value.addLayer(J.Polygon), a.value.getLayer(J.PolygonBorder.id) || a.value.addLayer(J.PolygonBorder), a.value.getLayer(J.LineStringBorder.id) || a.value.addLayer(J.LineStringBorder), a.value.getLayer(J.LineString.id) || a.value.addLayer(J.LineString), a.value.getLayer(J.Point.id) || a.value.addLayer(J.Point);
|
|
2124
2129
|
}
|
|
2125
|
-
function
|
|
2126
|
-
!e.features || e.features.length === 0 || (c.value !== void 0 &&
|
|
2127
|
-
}
|
|
2128
|
-
function g() {
|
|
2129
|
-
a.value.getCanvas().style.cursor = "pointer";
|
|
2130
|
+
function g(e) {
|
|
2131
|
+
!e.features || e.features.length === 0 || (c.value !== void 0 && x(), c.value = e.features[0], b(e.lngLat, e.features[0]));
|
|
2130
2132
|
}
|
|
2131
2133
|
function _() {
|
|
2132
|
-
a.value.getCanvas().style.cursor = ""
|
|
2134
|
+
a.value.getCanvas().style.cursor = "pointer";
|
|
2133
2135
|
}
|
|
2134
2136
|
function v() {
|
|
2137
|
+
a.value.getCanvas().style.cursor = "", c.value !== void 0 && (c.value = void 0), x();
|
|
2138
|
+
}
|
|
2139
|
+
function y() {
|
|
2135
2140
|
if (!a.value) throw Error("Call initMap() function first.");
|
|
2136
2141
|
Object.values(J).forEach((e) => {
|
|
2137
|
-
e.id !== "bbox-layer" && (a.value.on("mousemove", e.id,
|
|
2142
|
+
e.id !== "bbox-layer" && (a.value.on("mousemove", e.id, g), a.value.on("mouseenter", e.id, _), a.value.on("mouseleave", e.id, v));
|
|
2138
2143
|
});
|
|
2139
2144
|
}
|
|
2140
|
-
function
|
|
2145
|
+
function b(e, t) {
|
|
2141
2146
|
if (!a.value) throw Error("Call initMap() function first.");
|
|
2142
|
-
s.value = new ie.Popup().setLngLat(e).setHTML(`${
|
|
2147
|
+
s.value = new ie.Popup().setLngLat(e).setHTML(`${it[t.properties.objtype]}-${t.properties.id}-v${t.properties.version}`).addTo(a.value);
|
|
2143
2148
|
}
|
|
2144
|
-
function
|
|
2149
|
+
function x() {
|
|
2145
2150
|
s.value?.remove(), s.value = void 0;
|
|
2146
2151
|
}
|
|
2147
|
-
function
|
|
2152
|
+
function C([e]) {
|
|
2148
2153
|
o.value = e?.isIntersecting || !1;
|
|
2149
2154
|
}
|
|
2150
|
-
return (t, n) => re((
|
|
2155
|
+
return (t, n) => re((S(), i("div", {
|
|
2151
2156
|
id: `map-${e.id}`,
|
|
2152
2157
|
class: "v-map"
|
|
2153
|
-
}, null, 8,
|
|
2158
|
+
}, null, 8, Hr)), [[M(Yt), C]]);
|
|
2154
2159
|
}
|
|
2155
|
-
}), [["__scopeId", "data-v-
|
|
2160
|
+
}), [["__scopeId", "data-v-1987b771"]]), Wr = ["id"], Gr = { class: "group-header" }, Kr = { class: "header-start" }, qr = ["href"], Jr = ["title"], Yr = {
|
|
2156
2161
|
key: 0,
|
|
2157
2162
|
class: "name-before"
|
|
2158
|
-
},
|
|
2163
|
+
}, Xr = {
|
|
2159
2164
|
key: 1,
|
|
2160
2165
|
class: "name-separator"
|
|
2161
|
-
},
|
|
2166
|
+
}, Zr = {
|
|
2162
2167
|
key: 2,
|
|
2163
2168
|
class: "name-after"
|
|
2164
|
-
},
|
|
2169
|
+
}, Qr = { class: "header-center" }, $r = { class: "header-end" }, ei = { class: "group-content" }, ti = {
|
|
2165
2170
|
key: 0,
|
|
2166
2171
|
class: "content-start"
|
|
2167
|
-
},
|
|
2172
|
+
}, ni = { key: 0 }, ri = { key: 1 }, ii = /* @__PURE__ */ wt(/* @__PURE__ */ l({
|
|
2168
2173
|
__name: "LoChaGroup",
|
|
2169
2174
|
props: {
|
|
2170
2175
|
id: {},
|
|
@@ -2174,11 +2179,11 @@ var Vr = ["id"], Hr = /* @__PURE__ */ Ct(/* @__PURE__ */ l({
|
|
|
2174
2179
|
},
|
|
2175
2180
|
emits: ["navigate"],
|
|
2176
2181
|
setup(n) {
|
|
2177
|
-
ee((e) => ({
|
|
2178
|
-
let c = n, l = te(), u = t(() => l["content-start"] ? "repeat(4, minmax(0, 1fr))" : "repeat(3, minmax(0, 1fr))"),
|
|
2179
|
-
if (!
|
|
2180
|
-
let
|
|
2181
|
-
let e = [...new Set(
|
|
2182
|
+
ee((e) => ({ v590c99f3: d.value }));
|
|
2183
|
+
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);
|
|
2184
|
+
if (!_.value) throw Error("LoCha is empty.");
|
|
2185
|
+
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(() => {
|
|
2186
|
+
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;
|
|
2182
2187
|
return n === r ? {
|
|
2183
2188
|
before: null,
|
|
2184
2189
|
after: r
|
|
@@ -2186,95 +2191,99 @@ var Vr = ["id"], Hr = /* @__PURE__ */ Ct(/* @__PURE__ */ l({
|
|
|
2186
2191
|
before: n,
|
|
2187
2192
|
after: r
|
|
2188
2193
|
};
|
|
2189
|
-
}),
|
|
2190
|
-
let { before: e, after: t } =
|
|
2194
|
+
}), ne = t(() => {
|
|
2195
|
+
let { before: e, after: t } = j.value;
|
|
2191
2196
|
return e && t ? `${e} → ${t}` : e ?? t ?? void 0;
|
|
2192
2197
|
});
|
|
2193
|
-
return (t, l) => (
|
|
2198
|
+
return (t, l) => (S(), i("div", {
|
|
2194
2199
|
id: n.id,
|
|
2195
2200
|
class: "locha-group"
|
|
2196
|
-
}, [a("div",
|
|
2197
|
-
a("div",
|
|
2201
|
+
}, [a("div", Gr, [
|
|
2202
|
+
a("div", Kr, [a("a", {
|
|
2198
2203
|
class: "anchor-button",
|
|
2199
2204
|
href: `#${n.id}`,
|
|
2200
|
-
onClick: l[0] ||=
|
|
2201
|
-
}, "🔗", 8,
|
|
2205
|
+
onClick: l[0] ||= F((e) => t.$emit("navigate", `#${n.id}`), ["prevent"])
|
|
2206
|
+
}, "🔗", 8, qr), a("h3", {
|
|
2202
2207
|
class: "group-name",
|
|
2203
|
-
title:
|
|
2208
|
+
title: ne.value
|
|
2204
2209
|
}, [
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
], 8,
|
|
2209
|
-
a("div",
|
|
2210
|
-
a("div",
|
|
2211
|
-
]), a("div",
|
|
2212
|
-
t.$slots["content-start"] ? (
|
|
2213
|
-
!
|
|
2210
|
+
j.value.before ? (S(), i("span", Yr, k(j.value.before), 1)) : r("", !0),
|
|
2211
|
+
j.value.before ? (S(), i("span", Xr, " → ")) : r("", !0),
|
|
2212
|
+
j.value.after ? (S(), i("span", Zr, k(j.value.after), 1)) : r("", !0)
|
|
2213
|
+
], 8, Jr)]),
|
|
2214
|
+
a("div", Qr, [D(t.$slots, "header-center", { index: n.index }, void 0, !0)]),
|
|
2215
|
+
a("div", $r, [D(t.$slots, "header-end", { index: n.index }, void 0, !0)])
|
|
2216
|
+
]), a("div", ei, [
|
|
2217
|
+
t.$slots["content-start"] ? (S(), i("div", ti, [D(t.$slots, "content-start", { index: n.index }, void 0, !0)])) : r("", !0),
|
|
2218
|
+
!A.value && !T.value && !O.value ? (S(), i("div", {
|
|
2214
2219
|
key: 1,
|
|
2215
|
-
class:
|
|
2216
|
-
|
|
2220
|
+
class: "before-list",
|
|
2221
|
+
style: v(w.value ? { gridColumnStart: 2 } : {})
|
|
2222
|
+
}, [a("ul", null, [(S(!0), i(e, null, E(x.value, (e) => (S(), i("li", { key: e.id }, [s(Tt, {
|
|
2217
2223
|
feature: e,
|
|
2218
2224
|
"josm-target": n.josmTarget
|
|
2219
2225
|
}, o({ _: 2 }, [t.$slots["object-detail"] ? {
|
|
2220
2226
|
name: "object-detail",
|
|
2221
|
-
fn:
|
|
2227
|
+
fn: P(() => [D(t.$slots, "object-detail", {
|
|
2222
2228
|
feature: e,
|
|
2223
2229
|
index: n.index
|
|
2224
2230
|
}, void 0, !0)]),
|
|
2225
2231
|
key: "0"
|
|
2226
|
-
} : void 0]), 1032, ["feature", "josm-target"])]))), 128))])],
|
|
2227
|
-
|
|
2232
|
+
} : void 0]), 1032, ["feature", "josm-target"])]))), 128))])], 4)) : r("", !0),
|
|
2233
|
+
w.value ? r("", !0) : (S(), i("div", {
|
|
2228
2234
|
key: 2,
|
|
2229
|
-
class: g(["after-list", { "list--wide":
|
|
2230
|
-
|
|
2231
|
-
|
|
2235
|
+
class: g(["after-list", { "list--wide": A.value }]),
|
|
2236
|
+
style: v(T.value ? { gridColumnStart: f.value } : O.value ? { gridColumnStart: 2 } : {})
|
|
2237
|
+
}, [a("ul", null, [O.value ? (S(), i("li", ni, [s(Tt, {
|
|
2238
|
+
feature: C.value[0],
|
|
2232
2239
|
"josm-target": n.josmTarget
|
|
2233
2240
|
}, {
|
|
2234
|
-
"object-detail":
|
|
2235
|
-
feature:
|
|
2241
|
+
"object-detail": P(() => [D(t.$slots, "object-detail", {
|
|
2242
|
+
feature: x.value[0],
|
|
2236
2243
|
index: n.index
|
|
2237
2244
|
}, void 0, !0)]),
|
|
2238
2245
|
_: 3
|
|
2239
|
-
}, 8, ["feature", "josm-target"])])) :
|
|
2240
|
-
feature:
|
|
2246
|
+
}, 8, ["feature", "josm-target"])])) : A.value ? (S(), i("li", ri, [s(Tt, {
|
|
2247
|
+
feature: C.value[0],
|
|
2241
2248
|
"josm-target": n.josmTarget
|
|
2242
2249
|
}, {
|
|
2243
|
-
before:
|
|
2244
|
-
feature:
|
|
2250
|
+
before: P(() => [s(Tt, {
|
|
2251
|
+
feature: x.value[0],
|
|
2245
2252
|
compact: !0
|
|
2246
2253
|
}, null, 8, ["feature"])]),
|
|
2247
|
-
"object-detail":
|
|
2248
|
-
feature:
|
|
2254
|
+
"object-detail": P(() => [D(t.$slots, "object-detail", {
|
|
2255
|
+
feature: C.value[0],
|
|
2249
2256
|
index: n.index
|
|
2250
2257
|
}, void 0, !0)]),
|
|
2251
2258
|
_: 3
|
|
2252
|
-
}, 8, ["feature", "josm-target"])])) : (
|
|
2259
|
+
}, 8, ["feature", "josm-target"])])) : (S(!0), i(e, { key: 2 }, E(C.value, (e) => (S(), i("li", { key: e.id }, [s(Tt, {
|
|
2253
2260
|
feature: e,
|
|
2254
2261
|
"josm-target": n.josmTarget
|
|
2255
2262
|
}, o({ _: 2 }, [t.$slots["object-detail"] ? {
|
|
2256
2263
|
name: "object-detail",
|
|
2257
|
-
fn:
|
|
2264
|
+
fn: P(() => [D(t.$slots, "object-detail", {
|
|
2258
2265
|
feature: e,
|
|
2259
2266
|
index: n.index
|
|
2260
2267
|
}, void 0, !0)]),
|
|
2261
2268
|
key: "0"
|
|
2262
|
-
} : void 0]), 1032, ["feature", "josm-target"])]))), 128))])],
|
|
2263
|
-
s(
|
|
2264
|
-
id: `${
|
|
2269
|
+
} : void 0]), 1032, ["feature", "josm-target"])]))), 128))])], 6)),
|
|
2270
|
+
s(Ur, {
|
|
2271
|
+
id: `${M(h)}-${c.index}`,
|
|
2265
2272
|
features: n.features,
|
|
2266
|
-
bbox:
|
|
2273
|
+
bbox: M(_)?.bbox,
|
|
2274
|
+
style: v({ gridColumnStart: m.value })
|
|
2267
2275
|
}, null, 8, [
|
|
2268
2276
|
"id",
|
|
2269
2277
|
"features",
|
|
2270
|
-
"bbox"
|
|
2278
|
+
"bbox",
|
|
2279
|
+
"style"
|
|
2271
2280
|
])
|
|
2272
|
-
])], 8,
|
|
2281
|
+
])], 8, Wr));
|
|
2273
2282
|
}
|
|
2274
|
-
}), [["__scopeId", "data-v-
|
|
2283
|
+
}), [["__scopeId", "data-v-34bae4ba"]]);
|
|
2275
2284
|
//#endregion
|
|
2276
2285
|
//#region src/utils/scrollToSection.ts
|
|
2277
|
-
function
|
|
2286
|
+
function ai(e, t = {}) {
|
|
2278
2287
|
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)}`);
|
|
2279
2288
|
return s ? (s.scrollIntoView({
|
|
2280
2289
|
behavior: r,
|
|
@@ -2284,80 +2293,80 @@ function ii(e, t = {}) {
|
|
|
2284
2293
|
}
|
|
2285
2294
|
//#endregion
|
|
2286
2295
|
//#region src/components/LoCha/LoChaGroupList.vue?vue&type=script&setup=true&lang.ts
|
|
2287
|
-
var
|
|
2296
|
+
var oi = ["name"], si = /* @__PURE__ */ wt(/* @__PURE__ */ l({
|
|
2288
2297
|
__name: "LoChaGroupList",
|
|
2289
2298
|
props: { hash: {} },
|
|
2290
2299
|
setup(t) {
|
|
2291
|
-
ee((e) => ({ v32a2838c:
|
|
2292
|
-
let n = t, { groups: r } = p(
|
|
2300
|
+
ee((e) => ({ v32a2838c: M(l) }));
|
|
2301
|
+
let n = t, { groups: r } = p(tt), c = p(nt), l = G.delete, u = T(), d = ne("listRef");
|
|
2293
2302
|
function f(e) {
|
|
2294
2303
|
return `locha-${c}-group-${e}`;
|
|
2295
2304
|
}
|
|
2296
2305
|
function _() {
|
|
2297
2306
|
return `hidden_josm_target_${c}`;
|
|
2298
2307
|
}
|
|
2299
|
-
let
|
|
2300
|
-
function
|
|
2308
|
+
let v = !1;
|
|
2309
|
+
function b(e) {
|
|
2301
2310
|
if (u.value === e) {
|
|
2302
|
-
|
|
2311
|
+
v = !0, u.value = void 0, history.replaceState(null, "", `${location.pathname}${location.search}`), window.dispatchEvent(new CustomEvent("locha-navigate", { detail: {
|
|
2303
2312
|
hash: void 0,
|
|
2304
2313
|
instanceId: c
|
|
2305
2314
|
} })), h(() => {
|
|
2306
|
-
|
|
2315
|
+
v = !1;
|
|
2307
2316
|
});
|
|
2308
2317
|
return;
|
|
2309
2318
|
}
|
|
2310
|
-
|
|
2319
|
+
v = !0, u.value = e, history.replaceState(null, "", e), window.dispatchEvent(new CustomEvent("locha-navigate", { detail: {
|
|
2311
2320
|
hash: e,
|
|
2312
2321
|
instanceId: c
|
|
2313
2322
|
} })), h(() => {
|
|
2314
|
-
|
|
2323
|
+
v = !1, ai(e, { container: d.value ?? void 0 });
|
|
2315
2324
|
});
|
|
2316
2325
|
}
|
|
2317
2326
|
function C(e) {
|
|
2318
2327
|
let { instanceId: t } = e.detail;
|
|
2319
2328
|
t !== c && (u.value = void 0);
|
|
2320
2329
|
}
|
|
2321
|
-
return
|
|
2322
|
-
|
|
2323
|
-
}, { immediate: !0 }),
|
|
2330
|
+
return N(() => n.hash, (e) => {
|
|
2331
|
+
v || (u.value = e, e && h(() => ai(e, { container: d.value ?? void 0 })));
|
|
2332
|
+
}, { immediate: !0 }), y(() => {
|
|
2324
2333
|
window.addEventListener("locha-navigate", C);
|
|
2325
2334
|
let e = window.location.hash;
|
|
2326
|
-
e && !n.hash &&
|
|
2327
|
-
}),
|
|
2335
|
+
e && !n.hash && b(e);
|
|
2336
|
+
}), x(() => {
|
|
2328
2337
|
window.removeEventListener("locha-navigate", C);
|
|
2329
|
-
}), (t, n) => (
|
|
2338
|
+
}), (t, n) => (S(), i("div", {
|
|
2330
2339
|
ref_key: "listRef",
|
|
2331
2340
|
ref: d,
|
|
2332
2341
|
class: "locha-group-list"
|
|
2333
|
-
}, [a("ul", null, [(
|
|
2342
|
+
}, [a("ul", null, [(S(!0), i(e, null, E(M(r), (e, n) => (S(), i("li", {
|
|
2334
2343
|
key: n,
|
|
2335
2344
|
class: g({ selected: u.value === `#${f(n)}` })
|
|
2336
|
-
}, [s(
|
|
2345
|
+
}, [s(ii, {
|
|
2337
2346
|
id: f(n),
|
|
2338
2347
|
features: e,
|
|
2339
2348
|
index: n,
|
|
2340
2349
|
"josm-target": _(),
|
|
2341
|
-
onNavigate:
|
|
2350
|
+
onNavigate: b
|
|
2342
2351
|
}, o({ _: 2 }, [
|
|
2343
2352
|
t.$slots["object-detail"] ? {
|
|
2344
2353
|
name: "object-detail",
|
|
2345
|
-
fn:
|
|
2354
|
+
fn: P((e) => [D(t.$slots, "object-detail", m({ ref_for: !0 }, e), void 0, !0)]),
|
|
2346
2355
|
key: "0"
|
|
2347
2356
|
} : void 0,
|
|
2348
2357
|
t.$slots["header-center"] ? {
|
|
2349
2358
|
name: "header-center",
|
|
2350
|
-
fn:
|
|
2359
|
+
fn: P((e) => [D(t.$slots, "header-center", m({ ref_for: !0 }, e), void 0, !0)]),
|
|
2351
2360
|
key: "1"
|
|
2352
2361
|
} : void 0,
|
|
2353
2362
|
t.$slots["header-end"] ? {
|
|
2354
2363
|
name: "header-end",
|
|
2355
|
-
fn:
|
|
2364
|
+
fn: P((e) => [D(t.$slots, "header-end", m({ ref_for: !0 }, e), void 0, !0)]),
|
|
2356
2365
|
key: "2"
|
|
2357
2366
|
} : void 0,
|
|
2358
2367
|
t.$slots["content-start"] ? {
|
|
2359
2368
|
name: "content-start",
|
|
2360
|
-
fn:
|
|
2369
|
+
fn: P((e) => [D(t.$slots, "content-start", m({ ref_for: !0 }, e), void 0, !0)]),
|
|
2361
2370
|
key: "3"
|
|
2362
2371
|
} : void 0
|
|
2363
2372
|
]), 1032, [
|
|
@@ -2368,17 +2377,17 @@ var ai = ["name"], oi = /* @__PURE__ */ Ct(/* @__PURE__ */ l({
|
|
|
2368
2377
|
])], 2))), 128))]), a("iframe", {
|
|
2369
2378
|
name: _(),
|
|
2370
2379
|
style: { display: "none" }
|
|
2371
|
-
}, null, 8,
|
|
2380
|
+
}, null, 8, oi)], 512));
|
|
2372
2381
|
}
|
|
2373
|
-
}), [["__scopeId", "data-v-178acf78"]]),
|
|
2382
|
+
}), [["__scopeId", "data-v-178acf78"]]), ci = {
|
|
2374
2383
|
key: 0,
|
|
2375
2384
|
class: "user-feedback"
|
|
2376
|
-
},
|
|
2385
|
+
}, li = /* @__PURE__ */ wt(/* @__PURE__ */ l({
|
|
2377
2386
|
__name: "LoCha",
|
|
2378
2387
|
props: {
|
|
2379
2388
|
id: {},
|
|
2380
2389
|
data: {},
|
|
2381
|
-
mapStyleUrl: { default:
|
|
2390
|
+
mapStyleUrl: { default: Zt },
|
|
2382
2391
|
reasonCollapsed: {
|
|
2383
2392
|
type: Boolean,
|
|
2384
2393
|
default: !0
|
|
@@ -2387,40 +2396,40 @@ var ai = ["name"], oi = /* @__PURE__ */ Ct(/* @__PURE__ */ l({
|
|
|
2387
2396
|
},
|
|
2388
2397
|
setup(e) {
|
|
2389
2398
|
let r = e;
|
|
2390
|
-
|
|
2391
|
-
let a =
|
|
2392
|
-
|
|
2399
|
+
C(et, r.reasonCollapsed), C(nt, r.id), C(rt, r.mapStyleUrl);
|
|
2400
|
+
let a = $e();
|
|
2401
|
+
C(tt, a);
|
|
2393
2402
|
let { featureCount: s, groups: c, setLoCha: l } = a, u = t(() => c.value.length === 1);
|
|
2394
|
-
return
|
|
2403
|
+
return N(() => r.data, (e) => {
|
|
2395
2404
|
e && l(e);
|
|
2396
|
-
}, { immediate: !0 }), (t, r) => (
|
|
2405
|
+
}, { immediate: !0 }), (t, r) => (S(), i("section", { class: g(["locha", { "locha--single": u.value }]) }, [M(s) ? (S(), n(si, {
|
|
2397
2406
|
key: 1,
|
|
2398
2407
|
hash: e.hash
|
|
2399
2408
|
}, o({ _: 2 }, [
|
|
2400
2409
|
t.$slots["object-detail"] ? {
|
|
2401
2410
|
name: "object-detail",
|
|
2402
|
-
fn:
|
|
2411
|
+
fn: P((e) => [D(t.$slots, "object-detail", _(f(e)), void 0, !0)]),
|
|
2403
2412
|
key: "0"
|
|
2404
2413
|
} : void 0,
|
|
2405
2414
|
t.$slots["header-center"] ? {
|
|
2406
2415
|
name: "header-center",
|
|
2407
|
-
fn:
|
|
2416
|
+
fn: P((e) => [D(t.$slots, "header-center", _(f(e)), void 0, !0)]),
|
|
2408
2417
|
key: "1"
|
|
2409
2418
|
} : void 0,
|
|
2410
2419
|
t.$slots["header-end"] ? {
|
|
2411
2420
|
name: "header-end",
|
|
2412
|
-
fn:
|
|
2421
|
+
fn: P((e) => [D(t.$slots, "header-end", _(f(e)), void 0, !0)]),
|
|
2413
2422
|
key: "2"
|
|
2414
2423
|
} : void 0,
|
|
2415
2424
|
t.$slots["content-start"] ? {
|
|
2416
2425
|
name: "content-start",
|
|
2417
|
-
fn:
|
|
2426
|
+
fn: P((e) => [D(t.$slots, "content-start", _(f(e)), void 0, !0)]),
|
|
2418
2427
|
key: "3"
|
|
2419
2428
|
} : void 0
|
|
2420
|
-
]), 1032, ["hash"])) : (
|
|
2429
|
+
]), 1032, ["hash"])) : (S(), i("p", ci, " ⚠️ No data "))], 2));
|
|
2421
2430
|
}
|
|
2422
2431
|
}), [["__scopeId", "data-v-791095c2"]]);
|
|
2423
2432
|
//#endregion
|
|
2424
|
-
export {
|
|
2433
|
+
export { li as LoCha, ai as scrollToSection };
|
|
2425
2434
|
|
|
2426
2435
|
//# sourceMappingURL=index.js.map
|