@element-editor/ui 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BooleanOperations-oF0WybQP.js → BooleanOperations-BRO7NHUY.js} +2 -2
- package/dist/{BooleanOperations-WXcmW9Vy.cjs → BooleanOperations-C2uOHRu3.cjs} +1 -1
- package/dist/{DataTable-CNfB01y2.cjs → DataTable-B-2VjBEz.cjs} +1 -1
- package/dist/{DataTable-DNmjUwka.js → DataTable-CS-3dIqY.js} +3 -3
- package/dist/{DataTablePanel-BknCxC1K.cjs → DataTablePanel-58LwzXQR.cjs} +1 -1
- package/dist/{DataTablePanel-rWdaQubk.js → DataTablePanel-DDFUmMaM.js} +2 -2
- package/dist/EditToolbarBtn-Ch9HCLHq.cjs +3 -0
- package/dist/{EditToolbarBtn-SZIsnIn3.js → EditToolbarBtn-SR4xHd8G.js} +39 -39
- package/dist/{FeatureEditModal-CM6BObUO.cjs → FeatureEditModal-Cc8N6vei.cjs} +1 -1
- package/dist/{FeatureEditModal-BF-fGhVD.js → FeatureEditModal-Dr10p3nE.js} +2 -2
- package/dist/{FeatureList-CQb2kTrV.js → FeatureList-Bo9w9nre.js} +2 -2
- package/dist/{FeatureList-Csr-anLA.cjs → FeatureList-VRYesXCq.cjs} +1 -1
- package/dist/{FeatureRowContextMenu-Gwq3OMEA.cjs → FeatureRowContextMenu-CtBqdC1j.cjs} +1 -1
- package/dist/{FeatureRowContextMenu-BLt7VlUU.js → FeatureRowContextMenu-DCUIiDwc.js} +2 -2
- package/dist/{GeoJSONModal-BPFWeaLZ.js → GeoJSONModal-BV9Tamf4.js} +3 -3
- package/dist/{GeoJSONModal-iwUcvrg7.cjs → GeoJSONModal-Dd-nBufy.cjs} +1 -1
- package/dist/{SchemaEditor-qkoYMg0C.cjs → SchemaEditor-B4L17K1e.cjs} +1 -1
- package/dist/{SchemaEditor-BEsKUe2p.js → SchemaEditor-ryoTgaLb.js} +1 -1
- package/dist/{SchemaModal-9nNrgorr.js → SchemaModal-DvMbWskS.js} +3 -3
- package/dist/{SchemaModal-GrtgA7cH.cjs → SchemaModal-gAuDkd-L.cjs} +1 -1
- package/dist/{SettingsModal-DTP0Xx_Z.js → SettingsModal-BScVTjpn.js} +2 -2
- package/dist/{SettingsModal-6_qmRyCi.cjs → SettingsModal-CqaSFxxR.cjs} +1 -1
- package/dist/{ShortcutsModal-CdyQlrqK.cjs → ShortcutsModal-D1Y2bGT8.cjs} +1 -1
- package/dist/{ShortcutsModal-DwxZu71W.js → ShortcutsModal-ozuS2Ysb.js} +3 -3
- package/dist/element-editor-ui.cjs +1 -1
- package/dist/element-editor-ui.es.js +2 -2
- package/dist/{index-CtZterPc.js → index-CILw1Du5.js} +273 -273
- package/dist/index-DG4wEjGj.cjs +1 -0
- package/dist/primitives.cjs +1 -1
- package/dist/primitives.es.js +1 -1
- package/dist/{useWindowFocus-DGAWA1au.js → useWindowFocus-DuQVjnHE.js} +1 -1
- package/dist/{useWindowFocus-D-_yEm_V.cjs → useWindowFocus-EemgNOuz.cjs} +1 -1
- package/package.json +2 -2
- package/dist/EditToolbarBtn-dpCmKnzk.cjs +0 -3
- package/dist/index-BKdDZ4Y9.cjs +0 -1
|
@@ -2,14 +2,14 @@ var Tr = Object.defineProperty;
|
|
|
2
2
|
var Ar = (t, e, n) => e in t ? Tr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
3
|
var Pt = (t, e, n) => Ar(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
4
|
import Fr, { lazy as _t, useState as q, createElement as zr, useContext as tt, useCallback as J, createContext as Lr, useRef as B, useLayoutEffect as pe, useEffect as $, useMemo as ue, isValidElement as Rr, cloneElement as $r, memo as Gt, Suspense as Ut, useId as Kr } from "react";
|
|
5
|
-
import { e as oe, h as
|
|
6
|
-
import { jsx as r, jsxs as T, Fragment as
|
|
5
|
+
import { e as oe, h as ae, g as Ae, b as Or, s as jt, u as S, f as U, l as Br, E as Wr, T as _r, m as Gr, M as Ur } from "./useAdapterControls-DVjkwRZ_.js";
|
|
6
|
+
import { jsx as r, jsxs as T, Fragment as le } from "react/jsx-runtime";
|
|
7
7
|
import { u as ce, f as jr, e as qr, w as Hr, E as Vr } from "./useAccentStyle-CPo2XqAn.js";
|
|
8
|
-
import { loadCustomBindings as Jr, syncShortcutCache as $e, getEffectiveKey as qt, findConflict as Xr, saveCustomBindings as Xe, getCurrentKey as Zr, isMultiGeometry as Yr, getPartCount as rt, sidebarTakesSpace as nt, NARROW_EDITOR_WIDTH as Dt, getPartGeometry as Qr, getPartLabel as en, BOUNDARIES_SCHEMA_ID as tn, featureLimitMessage as rn, canProcessShape as Fe, setGeometryRunner as nn, countShapeVertices as Ke, resolveUnitSystem as on, isLineGeometryType as sn, placeBox as
|
|
9
|
-
import { getGeometryBBox as ot, readStorage as Ht, writeStorage as
|
|
8
|
+
import { loadCustomBindings as Jr, syncShortcutCache as $e, getEffectiveKey as qt, findConflict as Xr, saveCustomBindings as Xe, getCurrentKey as Zr, isMultiGeometry as Yr, getPartCount as rt, sidebarTakesSpace as nt, NARROW_EDITOR_WIDTH as Dt, getPartGeometry as Qr, getPartLabel as en, BOUNDARIES_SCHEMA_ID as tn, featureLimitMessage as rn, canProcessShape as Fe, setGeometryRunner as nn, countShapeVertices as Ke, resolveUnitSystem as on, isLineGeometryType as sn, placeBox as ln } from "@element-editor/core/internal";
|
|
9
|
+
import { getGeometryBBox as ot, readStorage as Ht, writeStorage as an, getFixedShortcutDisplay as Vt, ElementEditorError as Be, formatLength as It, subscribeToDataChanges as cn, readAccentPalette as Mt, DEFAULT_MAX_IMPORT_BYTES as dn, parseGeoJSONText as un } from "@element-editor/core";
|
|
10
10
|
import { MapPinPlus as mn, SidebarSimple as Jt, ArrowLeft as fn, CopySimple as Xt, Trash as ze, CaretDown as pn, CaretRight as hn, Check as gn, Copy as yn, FolderPlus as bn, MapPin as Zt, Polygon as Yt, StackSimple as Ye, LineSegment as Qt, PencilSimple as vn, EyeClosed as Qe, Eye as st, Folder as xn, FolderOpen as wn, DotsThree as kn, Pencil as Sn, FolderMinus as Cn, Path as Nn, Circle as En, Rectangle as Pn, ScribbleLoop as Dn, HandTap as In, Ruler as Mn, MagnifyingGlass as Ze, X as Tt, Resize as er, Scissors as tr, Knife as rr, WaveSine as nr, SquareLogo as or, Shapes as sr, StackPlus as ir, LineSegments as Tn, DotOutline as An, Crosshair as Fn, ArrowArcRight as zn, ArrowArcLeft as Ln, ArrowsHorizontal as Rn, Hexagon as $n, CircleHalfTilt as Kn, CornersOut as On, NavigationArrow as Bn } from "@phosphor-icons/react";
|
|
11
11
|
import { useShallow as Wn } from "zustand/react/shallow";
|
|
12
|
-
import { i as _n, c as
|
|
12
|
+
import { i as _n, c as lr, I as At, T as Gn, f as be, a as Q, B as we, b as Ie, C as ar, S as Ft, d as me, g as zt, K as Oe, E as te, e as Ne, h as Un } from "./EditToolbarBtn-SR4xHd8G.js";
|
|
13
13
|
import { clsx as ne } from "clsx";
|
|
14
14
|
import { createPortal as cr } from "react-dom";
|
|
15
15
|
import { centroid as jn } from "@turf/centroid";
|
|
@@ -38,7 +38,7 @@ function Ks() {
|
|
|
38
38
|
}, e = window.requestIdleCallback;
|
|
39
39
|
e ? e(t, { timeout: 3e3 }) : setTimeout(t, 1500);
|
|
40
40
|
}
|
|
41
|
-
const
|
|
41
|
+
const lt = Lr(null);
|
|
42
42
|
function Hn({ children: t }) {
|
|
43
43
|
const e = ce(), [n, s] = q(() => {
|
|
44
44
|
const c = Jr(e);
|
|
@@ -54,17 +54,17 @@ function Hn({ children: t }) {
|
|
|
54
54
|
}, [n, e]), m = J(() => {
|
|
55
55
|
s({}), Xe({}, e), $e({});
|
|
56
56
|
}, [e]);
|
|
57
|
-
return /* @__PURE__ */ r(
|
|
57
|
+
return /* @__PURE__ */ r(lt.Provider, { value: { custom: n, getKey: o, setKey: d, resetKey: i, resetAll: m }, children: t });
|
|
58
58
|
}
|
|
59
59
|
function Vn() {
|
|
60
|
-
return tt(
|
|
60
|
+
return tt(lt);
|
|
61
61
|
}
|
|
62
62
|
function Ee() {
|
|
63
|
-
const t = tt(
|
|
63
|
+
const t = tt(lt);
|
|
64
64
|
if (!t) throw new Error("useShortcutConfig must be used inside ShortcutConfigProvider");
|
|
65
65
|
return t;
|
|
66
66
|
}
|
|
67
|
-
const mr = fe(() => import("./FeatureList-
|
|
67
|
+
const mr = fe(() => import("./FeatureList-Bo9w9nre.js")), Jn = fe(() => import("./DataTable-CS-3dIqY.js")), Xn = fe(() => import("./SchemaEditor-ryoTgaLb.js"));
|
|
68
68
|
it(mr, Jn, Xn);
|
|
69
69
|
function Zn() {
|
|
70
70
|
return /* @__PURE__ */ T("div", { className: "flex flex-col items-center justify-center gap-3 h-full text-elm-text-muted", children: [
|
|
@@ -169,18 +169,18 @@ function io(t, e) {
|
|
|
169
169
|
n.disabled || (n.setAttribute("data-pressed", ""), setTimeout(() => n.removeAttribute("data-pressed"), so));
|
|
170
170
|
});
|
|
171
171
|
}
|
|
172
|
-
const
|
|
172
|
+
const lo = ["point", "line", "polygon", "route", "circle", "rectangle", "freehand", "picker"];
|
|
173
173
|
function Ws(t) {
|
|
174
174
|
var x;
|
|
175
|
-
const { dataStore: e, uiStore: n } = oe(), s =
|
|
175
|
+
const { dataStore: e, uiStore: n } = oe(), s = ae(), { panTo: o, fitBounds: d, setZoom: i } = Ae(), m = Or(), c = ce(), y = ke(), f = (x = Vn()) == null ? void 0 : x.custom, h = B(f);
|
|
176
176
|
h.current = f;
|
|
177
177
|
const u = J((w) => h.current ? qt(w, h.current) : Zr(w), []);
|
|
178
178
|
$(() => {
|
|
179
179
|
if (!t) return;
|
|
180
180
|
const w = t.closest("[data-elm-theme]") ?? t, M = { root: w, pointerInside: null };
|
|
181
181
|
Ce.set(n, M);
|
|
182
|
-
const C = (
|
|
183
|
-
|
|
182
|
+
const C = (l) => {
|
|
183
|
+
l.composedPath().includes(w) ? M.pointerInside = !0 : l.target instanceof Element && fr(l.target) || (M.pointerInside = !1);
|
|
184
184
|
};
|
|
185
185
|
return document.addEventListener("pointerdown", C, { capture: !0, passive: !0 }), () => {
|
|
186
186
|
Ce.get(n) === M && Ce.delete(n), document.removeEventListener("pointerdown", C, { capture: !0 });
|
|
@@ -189,10 +189,10 @@ function Ws(t) {
|
|
|
189
189
|
if (!c.ui.keyboardShortcuts.enabled || !c.ui.keyboardShortcuts.mapZoom) return;
|
|
190
190
|
function w(M) {
|
|
191
191
|
if (!(M.metaKey || M.ctrlKey) || !y(M)) return;
|
|
192
|
-
const C = M.target,
|
|
193
|
-
if (
|
|
194
|
-
const p = M.key === "+" || M.key === "=",
|
|
195
|
-
if (!p && !
|
|
192
|
+
const C = M.target, l = C == null ? void 0 : C.tagName;
|
|
193
|
+
if (l === "INPUT" || l === "TEXTAREA" || l === "SELECT" || C != null && C.isContentEditable) return;
|
|
194
|
+
const p = M.key === "+" || M.key === "=", a = M.key === "-" || M.key === "_";
|
|
195
|
+
if (!p && !a || !i) return;
|
|
196
196
|
M.preventDefault();
|
|
197
197
|
const E = e.getState().currentZoom;
|
|
198
198
|
i(E + (p ? 1 : -1));
|
|
@@ -200,49 +200,49 @@ function Ws(t) {
|
|
|
200
200
|
return window.addEventListener("keydown", w, { capture: !0 }), () => window.removeEventListener("keydown", w, { capture: !0 });
|
|
201
201
|
}, [c.ui.keyboardShortcuts.enabled, c.ui.keyboardShortcuts.mapZoom, i, e]), $(() => {
|
|
202
202
|
const w = c.ui.keyboardShortcuts.enabled;
|
|
203
|
-
function M(
|
|
203
|
+
function M(l) {
|
|
204
204
|
var L;
|
|
205
|
-
if (!w &&
|
|
206
|
-
const p = e.getState(),
|
|
205
|
+
if (!w && l.key !== "Enter" || !y(l)) return;
|
|
206
|
+
const p = e.getState(), a = n.getState(), E = a.readonly, g = (v) => {
|
|
207
207
|
var W;
|
|
208
208
|
return io(((W = Ce.get(n)) == null ? void 0 : W.root) ?? document, v);
|
|
209
|
-
}, N =
|
|
209
|
+
}, N = l.target.tagName, P = l.target, z = l.composedPath(), K = z.some((v) => {
|
|
210
210
|
if (!(v instanceof Element)) return !1;
|
|
211
211
|
const W = v.getAttribute("role");
|
|
212
212
|
return W === "grid" || W === "treegrid";
|
|
213
|
-
}), b = N === "INPUT" || N === "TEXTAREA" || N === "SELECT" || P.isContentEditable || K, k =
|
|
214
|
-
if (!b && !E && k === "z" && (
|
|
215
|
-
|
|
213
|
+
}), b = N === "INPUT" || N === "TEXTAREA" || N === "SELECT" || P.isContentEditable || K, k = l.key.toLowerCase();
|
|
214
|
+
if (!b && !E && k === "z" && (l.metaKey || l.ctrlKey) && !l.shiftKey) {
|
|
215
|
+
l.preventDefault(), g("undo"), p.undoStack.length > 0 && (p.undo(), s({ type: "undo" }));
|
|
216
216
|
return;
|
|
217
217
|
}
|
|
218
|
-
if (!b && !E && k === "z" && (
|
|
219
|
-
|
|
218
|
+
if (!b && !E && k === "z" && (l.metaKey || l.ctrlKey) && l.shiftKey) {
|
|
219
|
+
l.preventDefault(), g("redo"), p.redoStack.length > 0 && (p.redo(), s({ type: "redo" }));
|
|
220
220
|
return;
|
|
221
221
|
}
|
|
222
|
-
if (!b && (
|
|
223
|
-
|
|
222
|
+
if (!b && (l.metaKey || l.ctrlKey) && (l.key === "a" || l.key === "A")) {
|
|
223
|
+
l.preventDefault();
|
|
224
224
|
const v = new Set(p.groups.filter((H) => H.hidden).map((H) => H.id)), W = p.features.filter((H) => !H.hidden && !(H.groupId && v.has(H.groupId))).map((H) => H.id);
|
|
225
225
|
W.length > 0 && p.setSelection(W);
|
|
226
226
|
return;
|
|
227
227
|
}
|
|
228
|
-
if (!b && (
|
|
229
|
-
|
|
230
|
-
const v = !
|
|
231
|
-
|
|
228
|
+
if (!b && (l.metaKey || l.ctrlKey) && !l.shiftKey && (l.key === "j" || l.key === "J")) {
|
|
229
|
+
l.preventDefault();
|
|
230
|
+
const v = !a.autoExitAfterDraw;
|
|
231
|
+
a.setAutoExitAfterDraw(v), s({
|
|
232
232
|
type: "success",
|
|
233
233
|
message: v ? "Drawing tools will exit after each shape" : "Drawing tools will stay active after each shape",
|
|
234
234
|
description: v ? "You’ll go back to select mode. Press a tool key to draw again." : "Keep drawing more shapes in a row. Press the tool key again or Esc to exit."
|
|
235
235
|
});
|
|
236
236
|
return;
|
|
237
237
|
}
|
|
238
|
-
if (!b && !E && (
|
|
239
|
-
|
|
238
|
+
if (!b && !E && (l.metaKey || l.ctrlKey) && !l.shiftKey && (l.key === "o" || l.key === "O")) {
|
|
239
|
+
l.preventDefault(), no().then((v) => {
|
|
240
240
|
v && m(v);
|
|
241
241
|
});
|
|
242
242
|
return;
|
|
243
243
|
}
|
|
244
|
-
if (!b && (
|
|
245
|
-
|
|
244
|
+
if (!b && (l.metaKey || l.ctrlKey) && !l.shiftKey && (l.key === "s" || l.key === "S")) {
|
|
245
|
+
l.preventDefault();
|
|
246
246
|
const v = p.exportGeoJSON(), W = JSON.parse(v);
|
|
247
247
|
if (!Array.isArray(W.features) || W.features.length === 0) {
|
|
248
248
|
s({ type: "warning", message: "Export failed", description: "No features to export — draw or import something first." });
|
|
@@ -259,14 +259,14 @@ function Ws(t) {
|
|
|
259
259
|
})();
|
|
260
260
|
return;
|
|
261
261
|
}
|
|
262
|
-
if (!b && (
|
|
263
|
-
if (
|
|
262
|
+
if (!b && (l.metaKey || l.ctrlKey)) {
|
|
263
|
+
if (l.key === "c") {
|
|
264
264
|
if (p.selectedIds.length === 0) return;
|
|
265
265
|
p.copySelection().then((v) => s(v ? { type: "selection:copied" } : { type: "warning", message: "Copied for pasting in this editor only", description: "The browser did not allow writing to the system clipboard." }));
|
|
266
266
|
return;
|
|
267
267
|
}
|
|
268
|
-
if (
|
|
269
|
-
if (
|
|
268
|
+
if (l.key === "d") {
|
|
269
|
+
if (l.preventDefault(), E) return;
|
|
270
270
|
g("duplicate");
|
|
271
271
|
const v = p.selectedIds;
|
|
272
272
|
if (p.duplicateSelection())
|
|
@@ -277,54 +277,54 @@ function Ws(t) {
|
|
|
277
277
|
s({ type: "features:duplicated", count: v.length });
|
|
278
278
|
return;
|
|
279
279
|
}
|
|
280
|
-
if (
|
|
280
|
+
if (l.key === "e" || l.key === "E") {
|
|
281
281
|
if (p.selectedIds.length !== 1) return;
|
|
282
|
-
|
|
282
|
+
l.preventDefault(), a.openEditDialog(p.selectedIds[0], { focusFirstField: !0 });
|
|
283
283
|
return;
|
|
284
284
|
}
|
|
285
|
-
if ((
|
|
286
|
-
if (
|
|
285
|
+
if ((l.key === "g" || l.key === "G") && !E) {
|
|
286
|
+
if (l.shiftKey) {
|
|
287
287
|
if (p.selectedIds.length === 0 || !p.features.some((W) => p.selectedIds.includes(W.id) && W.groupId)) return;
|
|
288
|
-
|
|
288
|
+
l.preventDefault(), p.ungroupSelection();
|
|
289
289
|
} else {
|
|
290
290
|
if (p.selectedIds.length === 0) return;
|
|
291
|
-
|
|
291
|
+
l.preventDefault();
|
|
292
292
|
const v = p.groupSelection();
|
|
293
|
-
v &&
|
|
293
|
+
v && a.setAutoFocusGroupId(v);
|
|
294
294
|
}
|
|
295
295
|
return;
|
|
296
296
|
}
|
|
297
297
|
}
|
|
298
|
-
if (
|
|
299
|
-
if ((!b ||
|
|
300
|
-
if (
|
|
301
|
-
|
|
298
|
+
if (l.key === "Enter") {
|
|
299
|
+
if ((!b || l.metaKey || l.ctrlKey) && a.editingMode !== "none") {
|
|
300
|
+
if (a.editingMode === "slice-shape") {
|
|
301
|
+
l.preventDefault(), a.commitSliceShape();
|
|
302
302
|
return;
|
|
303
|
-
} else if (
|
|
304
|
-
|
|
303
|
+
} else if (a.editingMode === "cut-hole") {
|
|
304
|
+
l.preventDefault(), a.commitCutHole();
|
|
305
305
|
return;
|
|
306
|
-
} else if (
|
|
307
|
-
|
|
306
|
+
} else if (a.editingMode === "draw-line" && a.lineInProgress.length >= 2) {
|
|
307
|
+
l.preventDefault(), a.commitLine({});
|
|
308
308
|
return;
|
|
309
|
-
} else if (
|
|
310
|
-
|
|
309
|
+
} else if (a.editingMode === "draw-polygon" && a.polygonInProgress.length >= 3) {
|
|
310
|
+
l.preventDefault(), a.commitPolygon({});
|
|
311
311
|
return;
|
|
312
|
-
} else if (
|
|
313
|
-
|
|
312
|
+
} else if (a.editingMode === "draw-route" && a.routeWaypoints.length >= 2) {
|
|
313
|
+
l.preventDefault(), a.commitRoute();
|
|
314
314
|
return;
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
317
|
if (!w) return;
|
|
318
|
-
const W =
|
|
319
|
-
if (
|
|
320
|
-
if (!b && !E && !((L = P.closest) != null && L.call(P, 'button, a[href], [role="button"]')) && !
|
|
318
|
+
const W = a.editingMode === "none" || a.editingMode === "draw-rect" || a.editingMode === "draw-circle" || a.editingMode === "place-point" || a.editingMode === "draw-freehand" || a.editingMode === "pick-shape" || a.editingMode === "draw-line" && a.lineInProgress.length < 2 || a.editingMode === "draw-polygon" && a.polygonInProgress.length < 3 || a.editingMode === "draw-route" && a.routeWaypoints.length < 2;
|
|
319
|
+
if (a.dialogState.type === "closed") {
|
|
320
|
+
if (!b && !E && !((L = P.closest) != null && L.call(P, 'button, a[href], [role="button"]')) && !l.metaKey && !l.ctrlKey && !l.altKey && W) {
|
|
321
321
|
const H = p.selectedIds;
|
|
322
322
|
if (H.length === 1) {
|
|
323
323
|
const F = p.features.find((G) => G.id === H[0]), I = F == null ? void 0 : F.geometry.type;
|
|
324
324
|
if (I === "LineString" || I === "Polygon" || I === "MultiLineString" || I === "MultiPolygon" || I === "GeometryCollection") {
|
|
325
|
-
|
|
326
|
-
const G = !
|
|
327
|
-
G &&
|
|
325
|
+
l.preventDefault();
|
|
326
|
+
const G = !a.vertexEditActive;
|
|
327
|
+
G && a.editingMode !== "none" && a.setEditingMode("none"), a.setVertexEditActive(G);
|
|
328
328
|
return;
|
|
329
329
|
}
|
|
330
330
|
}
|
|
@@ -332,13 +332,13 @@ function Ws(t) {
|
|
|
332
332
|
}
|
|
333
333
|
}
|
|
334
334
|
const D = z.some((v) => v instanceof Element && v.hasAttribute("data-elm-search-open"));
|
|
335
|
-
if (
|
|
335
|
+
if (l.key === "Tab" && !b && a.dialogState.type === "closed" && !D && !l.metaKey && !l.ctrlKey && !l.altKey) {
|
|
336
336
|
const v = p.features;
|
|
337
337
|
if (v.length === 0) return;
|
|
338
|
-
|
|
338
|
+
l.preventDefault();
|
|
339
339
|
const W = eo(v, p.groups), H = p.selectedIds.length === 1 ? p.selectedIds[0] : null, F = H ? W.indexOf(H) : -1;
|
|
340
340
|
let I;
|
|
341
|
-
|
|
341
|
+
l.shiftKey ? I = F <= 0 ? W.length - 1 : F - 1 : I = F >= W.length - 1 ? 0 : F + 1;
|
|
342
342
|
const _ = W[I];
|
|
343
343
|
p.selectFeature(_);
|
|
344
344
|
const G = v.find((V) => V.id === _);
|
|
@@ -350,48 +350,48 @@ function Ws(t) {
|
|
|
350
350
|
d == null || d(G.bbox || ot(G.geometry));
|
|
351
351
|
return;
|
|
352
352
|
}
|
|
353
|
-
if (!b && !
|
|
354
|
-
const v =
|
|
353
|
+
if (!b && !l.metaKey && !l.ctrlKey && !l.altKey) {
|
|
354
|
+
const v = l.key.toLowerCase();
|
|
355
355
|
if (v === u("show-shortcuts")) {
|
|
356
|
-
|
|
356
|
+
l.preventDefault(), g("show-shortcuts"), a.shortcutsModalOpen ? a.closeShortcutsModal() : a.openShortcutsModal();
|
|
357
357
|
return;
|
|
358
358
|
}
|
|
359
359
|
if (c.ui.schemaEditor && !E && v === u("toggle-schema")) {
|
|
360
|
-
|
|
360
|
+
l.preventDefault(), g("toggle-schema"), a.toggleSchemaModal();
|
|
361
361
|
return;
|
|
362
362
|
}
|
|
363
363
|
if (c.ui.layerList && v === u("toggle-sidebar")) {
|
|
364
|
-
|
|
364
|
+
l.preventDefault(), g("toggle-sidebar"), a.setSidebarOpen(!a.sidebarOpen);
|
|
365
365
|
return;
|
|
366
366
|
}
|
|
367
367
|
}
|
|
368
|
-
if (!b &&
|
|
369
|
-
const v =
|
|
368
|
+
if (!b && a.dialogState.type !== "new-point" && !l.metaKey && !l.ctrlKey && !l.altKey) {
|
|
369
|
+
const v = l.key.toLowerCase();
|
|
370
370
|
if (c.ui.dataTable && v === u("toggle-table")) {
|
|
371
|
-
|
|
371
|
+
l.preventDefault(), g("toggle-table"), a.toggleTable();
|
|
372
372
|
return;
|
|
373
373
|
}
|
|
374
374
|
if (c.ui.geojsonEditor && v === u("toggle-geojson")) {
|
|
375
|
-
|
|
375
|
+
l.preventDefault(), g("toggle-geojson"), a.toggleCodeModal();
|
|
376
376
|
return;
|
|
377
377
|
}
|
|
378
378
|
if (c.ui.zoomIndicator && v === u("set-zoom")) {
|
|
379
|
-
|
|
379
|
+
l.preventDefault(), g("set-zoom"), a.setZoomEditing(!0);
|
|
380
380
|
return;
|
|
381
381
|
}
|
|
382
382
|
if (v === u("measure")) {
|
|
383
|
-
g("measure"),
|
|
383
|
+
g("measure"), a.setEditingMode(a.editingMode === "measure" ? "none" : "measure");
|
|
384
384
|
return;
|
|
385
385
|
}
|
|
386
386
|
if (E) return;
|
|
387
387
|
if (v === u("toggle-transform")) {
|
|
388
|
-
(p.selectedIds.length === 1 && p.selectedIds[0] || p.selectedIds.length > 0) && (g("toggle-transform"),
|
|
388
|
+
(p.selectedIds.length === 1 && p.selectedIds[0] || p.selectedIds.length > 0) && (g("toggle-transform"), a.setTransformActive(!a.transformActive), !a.transformActive && a.editingMode !== "none" && a.setEditingMode("none"));
|
|
389
389
|
return;
|
|
390
390
|
}
|
|
391
|
-
const W =
|
|
392
|
-
|
|
391
|
+
const W = a.isToolAvailable, H = (F) => {
|
|
392
|
+
a.editingMode !== F && !p.canAddFeatures(1) || (g(F === "pick-shape" ? "picker" : F), a.setEditingMode(a.editingMode === F ? "none" : F));
|
|
393
393
|
};
|
|
394
|
-
for (const F of
|
|
394
|
+
for (const F of lo) {
|
|
395
395
|
const I = jr[F];
|
|
396
396
|
if (W(F) && v === u(I === "pick-shape" ? "picker" : I)) {
|
|
397
397
|
H(I);
|
|
@@ -400,12 +400,12 @@ function Ws(t) {
|
|
|
400
400
|
}
|
|
401
401
|
if (v === u("cut-hole")) {
|
|
402
402
|
const F = p.features.find((I) => I.id === (p.selectedIds.length === 1 ? p.selectedIds[0] : null));
|
|
403
|
-
F && (F.geometry.type === "Polygon" || F.geometry.type === "MultiPolygon") && (g("cut-hole"),
|
|
403
|
+
F && (F.geometry.type === "Polygon" || F.geometry.type === "MultiPolygon") && (g("cut-hole"), a.setEditingMode(a.editingMode === "cut-hole" ? "none" : "cut-hole"), a.setTransformActive(!1));
|
|
404
404
|
return;
|
|
405
405
|
}
|
|
406
406
|
if (v === u("slice-shape")) {
|
|
407
407
|
const F = p.features.find((I) => I.id === (p.selectedIds.length === 1 ? p.selectedIds[0] : null));
|
|
408
|
-
F && (F.geometry.type === "Polygon" || F.geometry.type === "MultiPolygon") && (g("slice-shape"),
|
|
408
|
+
F && (F.geometry.type === "Polygon" || F.geometry.type === "MultiPolygon") && (g("slice-shape"), a.setEditingMode(a.editingMode === "slice-shape" ? "none" : "slice-shape"), a.setTransformActive(!1));
|
|
409
409
|
return;
|
|
410
410
|
}
|
|
411
411
|
if (v === u("break-apart")) {
|
|
@@ -418,21 +418,21 @@ function Ws(t) {
|
|
|
418
418
|
return;
|
|
419
419
|
}
|
|
420
420
|
}
|
|
421
|
-
if (
|
|
421
|
+
if (l.key !== "Delete" && l.key !== "Backspace" || E || a.dialogState.type === "new-point") return;
|
|
422
422
|
const R = p.selectedIds;
|
|
423
|
-
if (R.length === 0 || b ||
|
|
423
|
+
if (R.length === 0 || b || a.vertexEditActive) return;
|
|
424
424
|
const O = R.length, j = O === 1 ? p.features.find((v) => v.id === R[0]) : null, Z = O === 1 ? String((j == null ? void 0 : j.properties.name) || "Unnamed feature") : `${O} features`;
|
|
425
|
-
|
|
425
|
+
l.preventDefault(), l.stopImmediatePropagation(), g("delete-selected"), p.deleteSelection(), a.closeDialog(), s(O === 1 ? { type: "feature:deleted", featureId: R[0], label: Z, undo: () => e.getState().undo() } : { type: "features:deleted", count: O, undo: () => e.getState().undo() });
|
|
426
426
|
}
|
|
427
|
-
function C(
|
|
427
|
+
function C(l) {
|
|
428
428
|
var g;
|
|
429
|
-
if (!y(
|
|
430
|
-
const p =
|
|
429
|
+
if (!y(l)) return;
|
|
430
|
+
const p = l.target.tagName;
|
|
431
431
|
if (p === "INPUT" || p === "TEXTAREA" || p === "SELECT" || n.getState().readonly) return;
|
|
432
|
-
const
|
|
433
|
-
if (
|
|
432
|
+
const a = (g = l.clipboardData) == null ? void 0 : g.getData("text");
|
|
433
|
+
if (a)
|
|
434
434
|
try {
|
|
435
|
-
const N = JSON.parse(
|
|
435
|
+
const N = JSON.parse(a);
|
|
436
436
|
if (N.type === "FeatureCollection" || N.type === "Feature") {
|
|
437
437
|
const P = N.type === "FeatureCollection" ? N.features : [N];
|
|
438
438
|
e.setState({ clipboard: P }), e.getState().pasteSelection() && s({ type: "selection:pasted", count: P.length });
|
|
@@ -448,22 +448,22 @@ function Ws(t) {
|
|
|
448
448
|
};
|
|
449
449
|
}, [e, n, s, o, d, c, u, m]), $(() => {
|
|
450
450
|
function w(M) {
|
|
451
|
-
var
|
|
451
|
+
var a;
|
|
452
452
|
if (M.key !== "Escape" || !y(M)) return;
|
|
453
453
|
const C = M.target;
|
|
454
|
-
if (C && (C.tagName === "INPUT" || C.tagName === "TEXTAREA" || C.isContentEditable) || (
|
|
455
|
-
const
|
|
456
|
-
if (
|
|
457
|
-
|
|
454
|
+
if (C && (C.tagName === "INPUT" || C.tagName === "TEXTAREA" || C.isContentEditable) || (a = C == null ? void 0 : C.closest) != null && a.call(C, `[${to}]`) || _n()) return;
|
|
455
|
+
const l = n.getState();
|
|
456
|
+
if (l.dialogState.type !== "closed") {
|
|
457
|
+
l.closeDialog(), M.stopPropagation();
|
|
458
458
|
return;
|
|
459
459
|
}
|
|
460
|
-
if (
|
|
461
|
-
if (
|
|
462
|
-
|
|
460
|
+
if (l.editingMode === "none") {
|
|
461
|
+
if (l.vertexEditActive) {
|
|
462
|
+
l.setVertexEditActive(!1), M.stopPropagation();
|
|
463
463
|
return;
|
|
464
464
|
}
|
|
465
|
-
if (
|
|
466
|
-
|
|
465
|
+
if (l.transformActive) {
|
|
466
|
+
l.setTransformActive(!1), M.stopPropagation();
|
|
467
467
|
return;
|
|
468
468
|
}
|
|
469
469
|
if (e.getState().selectedIds.length > 0) {
|
|
@@ -476,10 +476,10 @@ function Ws(t) {
|
|
|
476
476
|
return window.addEventListener("keydown", w, { capture: !0 }), () => window.removeEventListener("keydown", w, { capture: !0 });
|
|
477
477
|
}, []);
|
|
478
478
|
}
|
|
479
|
-
const
|
|
479
|
+
const ao = /* @__PURE__ */ new Set(["true", "yes", "y", "1", "on", "x", "✓"]), co = /* @__PURE__ */ new Set(["false", "no", "n", "0", "off", ""]);
|
|
480
480
|
function uo(t) {
|
|
481
481
|
const e = t.trim().toLowerCase();
|
|
482
|
-
return
|
|
482
|
+
return ao.has(e) ? !0 : co.has(e) ? !1 : null;
|
|
483
483
|
}
|
|
484
484
|
function mo(t) {
|
|
485
485
|
return typeof t == "boolean" ? t : typeof t == "number" ? t !== 0 : typeof t == "string" ? uo(t) === !0 : !1;
|
|
@@ -518,7 +518,7 @@ function fo({ fields: t, values: e, onChange: n, errors: s, autoFocusFirst: o, r
|
|
|
518
518
|
disabled: d
|
|
519
519
|
}
|
|
520
520
|
) : i.type === "select" ? u = /* @__PURE__ */ T(
|
|
521
|
-
|
|
521
|
+
lr,
|
|
522
522
|
{
|
|
523
523
|
value: String(c),
|
|
524
524
|
onChange: (x) => n(i.key, x.target.value),
|
|
@@ -634,16 +634,16 @@ function So(t, e, n) {
|
|
|
634
634
|
return {};
|
|
635
635
|
}
|
|
636
636
|
function Co({ dialogState: t, collapsible: e = !1 }) {
|
|
637
|
-
const { dataStore: n } = oe(), s =
|
|
637
|
+
const { dataStore: n } = oe(), s = ae(), o = S((I) => I.closeDialog), d = U((I) => I.selectFeature), i = U(Wn((I) => I.getVisibleSchemas())), m = U((I) => I.lastUsedSchemaId), c = S((I) => I.readonly), { uiStore: y } = oe(), f = ke(), h = U((I) => I.features), u = ue(
|
|
638
638
|
() => t.type === "edit" ? h.find((I) => I.id === t.featureId) ?? null : null,
|
|
639
639
|
[t, h]
|
|
640
|
-
), x = U((I) => I.addFeature), w = U((I) => I.updateFeature), M = U((I) => I.deleteFeature), C = U((I) => I.duplicateFeature),
|
|
640
|
+
), x = U((I) => I.addFeature), w = U((I) => I.updateFeature), M = U((I) => I.deleteFeature), C = U((I) => I.duplicateFeature), l = U((I) => I.getDefaultSchema), p = U((I) => I.setLastUsedSchemaId), a = t.type === "new-point", E = l(), [g, N] = q(() => t.type === "edit" && (u != null && u.schemaId) ? u.schemaId : m && i.find((_) => _.id === m) ? m : E.id), P = i.find((I) => I.id === g) ?? E, [z, K] = q(
|
|
641
641
|
() => So(t, P, h)
|
|
642
642
|
), [b, k] = q({}), D = u == null ? void 0 : u.properties, R = u == null ? void 0 : u.schemaId, [O, j] = q({ editProps: D, editSchemaId: R });
|
|
643
643
|
u && (O.editProps !== D || O.editSchemaId !== R) && (j({ editProps: D, editSchemaId: R }), K({ ...D }), R && N(R), k({}));
|
|
644
644
|
function Z(I) {
|
|
645
645
|
const _ = i.find((G) => G.id === I) ?? E;
|
|
646
|
-
if (
|
|
646
|
+
if (a) {
|
|
647
647
|
const G = {};
|
|
648
648
|
_.fields.forEach((V) => {
|
|
649
649
|
G[V.key] = z[V.key] ?? "";
|
|
@@ -683,7 +683,7 @@ function Co({ dialogState: t, collapsible: e = !1 }) {
|
|
|
683
683
|
const _ = {};
|
|
684
684
|
for (const [V, Y] of Object.entries(z))
|
|
685
685
|
Y !== "" && (_[V] = Y);
|
|
686
|
-
|
|
686
|
+
a && t.type === "new-point" ? x({
|
|
687
687
|
type: "Feature",
|
|
688
688
|
id: crypto.randomUUID(),
|
|
689
689
|
schemaId: g,
|
|
@@ -701,7 +701,7 @@ function Co({ dialogState: t, collapsible: e = !1 }) {
|
|
|
701
701
|
const I = String(u.properties.name || "Unnamed feature"), _ = u.id;
|
|
702
702
|
M(_), o(), s({ type: "feature:deleted", featureId: _, label: I, undo: () => n.getState().undo() });
|
|
703
703
|
}
|
|
704
|
-
const H =
|
|
704
|
+
const H = a ? "New point" : u ? String(u.properties.name || "Edit feature") : "Edit feature", F = a ? "point" : (u == null ? void 0 : u.geometry.type) === "MultiPoint" ? "points" : (u == null ? void 0 : u.geometry.type) === "LineString" ? "line" : (u == null ? void 0 : u.geometry.type) === "MultiLineString" ? "lines" : (u == null ? void 0 : u.geometry.type) === "Polygon" ? "area" : (u == null ? void 0 : u.geometry.type) === "MultiPolygon" ? "areas" : (u == null ? void 0 : u.geometry.type) === "GeometryCollection" ? "mixed" : "point";
|
|
705
705
|
return /* @__PURE__ */ T("div", { className: "flex flex-col flex-1 min-h-0", children: [
|
|
706
706
|
/* @__PURE__ */ T("header", { className: "flex items-center gap-1 px-4 pt-4 pb-3 border-b border-elm-border flex-shrink-0 bg-elm-surface-sunken", children: [
|
|
707
707
|
e && /* @__PURE__ */ r(pr, {}),
|
|
@@ -712,7 +712,7 @@ function Co({ dialogState: t, collapsible: e = !1 }) {
|
|
|
712
712
|
/* @__PURE__ */ r("p", { className: "text-sm leading-5 font-semibold text-(--elm-text,var(--color-gray-800)) dark:text-(--elm-text,var(--color-gray-100)) truncate", children: H }),
|
|
713
713
|
/* @__PURE__ */ r("p", { className: "text-xs leading-4 text-elm-text-subtle capitalize", children: F })
|
|
714
714
|
] }),
|
|
715
|
-
u && /* @__PURE__ */ T(
|
|
715
|
+
u && /* @__PURE__ */ T(le, { children: [
|
|
716
716
|
!c && /* @__PURE__ */ r(
|
|
717
717
|
be,
|
|
718
718
|
{
|
|
@@ -735,7 +735,7 @@ function Co({ dialogState: t, collapsible: e = !1 }) {
|
|
|
735
735
|
/* @__PURE__ */ T("div", { className: "mb-3", children: [
|
|
736
736
|
/* @__PURE__ */ r("label", { className: "block text-xs font-medium text-(--elm-text-muted,var(--color-gray-600)) dark:text-(--elm-text-muted,var(--color-gray-400)) mb-1", children: "Schema" }),
|
|
737
737
|
/* @__PURE__ */ r(
|
|
738
|
-
|
|
738
|
+
lr,
|
|
739
739
|
{
|
|
740
740
|
value: g,
|
|
741
741
|
onChange: (I) => Z(I.target.value),
|
|
@@ -768,7 +768,7 @@ function Co({ dialogState: t, collapsible: e = !1 }) {
|
|
|
768
768
|
}
|
|
769
769
|
},
|
|
770
770
|
errors: b,
|
|
771
|
-
autoFocusFirst: !c && (
|
|
771
|
+
autoFocusFirst: !c && (a || t.type === "edit" && !!t.isNew || t.type === "edit" && !!t.focusFirstField),
|
|
772
772
|
readonly: c
|
|
773
773
|
}
|
|
774
774
|
),
|
|
@@ -778,10 +778,10 @@ function Co({ dialogState: t, collapsible: e = !1 }) {
|
|
|
778
778
|
] }),
|
|
779
779
|
!c && /* @__PURE__ */ r("div", { className: "px-4 py-3 border-t border-elm-border flex-shrink-0", children: /* @__PURE__ */ T(we, { variant: "primary", onClick: L, className: "w-full py-2 rounded-elm font-medium", children: [
|
|
780
780
|
"Save",
|
|
781
|
-
/* @__PURE__ */ r("span", { className: "ml-auto flex items-center gap-0.5", children: Yn() ? /* @__PURE__ */ T(
|
|
781
|
+
/* @__PURE__ */ r("span", { className: "ml-auto flex items-center gap-0.5", children: Yn() ? /* @__PURE__ */ T(le, { children: [
|
|
782
782
|
/* @__PURE__ */ r(Ie, { children: "⌘" }),
|
|
783
783
|
/* @__PURE__ */ r(Ie, { children: "↵" })
|
|
784
|
-
] }) : /* @__PURE__ */ T(
|
|
784
|
+
] }) : /* @__PURE__ */ T(le, { children: [
|
|
785
785
|
/* @__PURE__ */ r(Ie, { children: "Ctrl" }),
|
|
786
786
|
/* @__PURE__ */ r(Ie, { children: "↵" })
|
|
787
787
|
] }) })
|
|
@@ -820,7 +820,7 @@ function Eo({
|
|
|
820
820
|
return { type: "Feature", id: "(new)", schemaId: s, geometry: { type: "Point", coordinates: t.coords }, properties: x };
|
|
821
821
|
}
|
|
822
822
|
return e ?? null;
|
|
823
|
-
}, [t, e, n, s]), { open: d, toggle: i } = hr("sourceOpen", !1), [m, c] = q(!1), y =
|
|
823
|
+
}, [t, e, n, s]), { open: d, toggle: i } = hr("sourceOpen", !1), [m, c] = q(!1), y = ae();
|
|
824
824
|
if (!o) return null;
|
|
825
825
|
const f = JSON.stringify(o, null, 2);
|
|
826
826
|
function h() {
|
|
@@ -903,7 +903,7 @@ function br(t, e, n, s) {
|
|
|
903
903
|
m.current = C, i(C);
|
|
904
904
|
}
|
|
905
905
|
function w() {
|
|
906
|
-
u(),
|
|
906
|
+
u(), an(t, String(m.current), o), window.removeEventListener("mousemove", x), window.removeEventListener("mouseup", w);
|
|
907
907
|
}
|
|
908
908
|
window.addEventListener("mousemove", x), window.addEventListener("mouseup", w);
|
|
909
909
|
}, [t, n, s, o]);
|
|
@@ -933,7 +933,7 @@ function vr(t, e = !0) {
|
|
|
933
933
|
return u.observe(f), () => u.disconnect();
|
|
934
934
|
}, [t, e, n]);
|
|
935
935
|
}
|
|
936
|
-
const xr = "after:absolute after:transition-colors hover:after:bg-elm-focus-ring data-[dragging]:after:bg-elm-focus-ring", Do = `absolute left-0 top-0 h-full w-1 z-20 cursor-col-resize after:inset-y-0 after:left-0 after:w-0.5 ${xr}`, _s = `absolute top-0 left-0 right-0 h-1 z-10 cursor-row-resize after:inset-x-0 after:top-0 after:h-0.5 ${xr}`, Io = "p-1 rounded-elm-control flex items-center justify-center text-sm active:scale-[0.95] disabled:cursor-not-allowed disabled:active:scale-100", Mo = "text-elm-text hover:bg-elm-control-hover disabled:hover:bg-transparent", To = "flex items-center justify-center w-6 h-6 rounded-elm-control transition-colors bg-transparent hover:bg-(--elm-control-hover,color-mix(in_oklab,var(--color-gray-200)_70%,transparent)) dark:hover:bg-(--elm-control-hover,var(--color-gray-800)) focus:outline-none focus-visible:ring-2 focus-visible:ring-elm-focus-ring disabled:cursor-not-allowed", Ao = "flex items-center justify-center w-12 h-12 backdrop-blur-md border border-elm-border/80 shadow-elm-control rounded-elm transition-colors active:scale-[0.95] focus:outline-none disabled:cursor-not-allowed disabled:active:scale-100", Fo = "bg-elm-surface/95 hover:bg-elm-surface-hover disabled:hover:bg-elm-surface/95", Kt = "disabled:text-elm-text-disabled", Ot = "text-primary-600 dark:text-primary-400", zo = "text-elm-text";
|
|
936
|
+
const xr = "after:absolute after:transition-colors hover:after:bg-elm-focus-ring data-[dragging]:after:bg-elm-focus-ring", Do = `absolute left-0 top-0 h-full w-1 z-20 cursor-col-resize after:inset-y-0 after:left-0 after:w-0.5 ${xr}`, _s = `absolute top-0 left-0 right-0 h-1 z-10 cursor-row-resize after:inset-x-0 after:top-0 after:h-0.5 ${xr}`, Io = "p-1 rounded-elm-control flex items-center justify-center text-sm focus:outline-none focus-visible:ring-2 focus-visible:ring-elm-focus-ring active:scale-[0.95] disabled:cursor-not-allowed disabled:active:scale-100", Mo = "text-elm-text hover:bg-elm-control-hover disabled:hover:bg-transparent", To = "flex items-center justify-center w-6 h-6 rounded-elm-control transition-colors bg-transparent hover:bg-(--elm-control-hover,color-mix(in_oklab,var(--color-gray-200)_70%,transparent)) dark:hover:bg-(--elm-control-hover,var(--color-gray-800)) focus:outline-none focus-visible:ring-2 focus-visible:ring-elm-focus-ring disabled:cursor-not-allowed", Ao = "flex items-center justify-center w-12 h-12 backdrop-blur-md border border-elm-border/80 shadow-elm-control rounded-elm transition-colors active:scale-[0.95] focus:outline-none focus-visible:ring-2 focus-visible:ring-elm-focus-ring disabled:cursor-not-allowed disabled:active:scale-100", Fo = "bg-elm-surface/95 hover:bg-elm-surface-hover disabled:hover:bg-elm-surface/95", Kt = "disabled:text-elm-text-disabled", Ot = "text-primary-600 dark:text-primary-400", zo = "text-elm-text";
|
|
937
937
|
function Pe({
|
|
938
938
|
label: t,
|
|
939
939
|
tooltipContent: e,
|
|
@@ -967,22 +967,22 @@ function Pe({
|
|
|
967
967
|
) });
|
|
968
968
|
}
|
|
969
969
|
const Gs = Gt(function({ footer: e }) {
|
|
970
|
-
const { dataStore: n } = oe(), s =
|
|
970
|
+
const { dataStore: n } = oe(), s = ae(), o = S((L) => L.sidebarOpen), d = S((L) => L.setSidebarOpen), i = S((L) => L.setSidebarWidth), m = S((L) => L.codeDockWidth), c = S((L) => L.readonly), y = S((L) => L.layout), { width: f, onHandleMouseDown: h } = br("elm_panel_width", 288, 200, 520), u = y === "split", x = B(null);
|
|
971
971
|
vr(x);
|
|
972
|
-
const w = S((L) => L.narrow) && !u, [M, C] = q(!1),
|
|
972
|
+
const w = S((L) => L.narrow) && !u, [M, C] = q(!1), l = B(!1);
|
|
973
973
|
$(() => {
|
|
974
974
|
const L = requestAnimationFrame(() => {
|
|
975
|
-
|
|
975
|
+
l.current = !0;
|
|
976
976
|
});
|
|
977
977
|
return () => cancelAnimationFrame(L);
|
|
978
978
|
}, []), pe(() => {
|
|
979
|
-
w && (
|
|
979
|
+
w && (l.current || C(!0), d(!1));
|
|
980
980
|
}, [w, d]), $(() => {
|
|
981
981
|
if (!M) return;
|
|
982
982
|
const L = requestAnimationFrame(() => C(!1));
|
|
983
983
|
return () => cancelAnimationFrame(L);
|
|
984
984
|
}, [M]);
|
|
985
|
-
const { getKey: p } = Ee(),
|
|
985
|
+
const { getKey: p } = Ee(), a = /* @__PURE__ */ r(Q, { children: p("toggle-sidebar").toUpperCase() }), [E, g] = q(null), N = J((L) => g(L), []);
|
|
986
986
|
pe(() => {
|
|
987
987
|
i(f);
|
|
988
988
|
}, [f, i]);
|
|
@@ -998,7 +998,7 @@ const Gs = Gt(function({ footer: e }) {
|
|
|
998
998
|
})), O(L);
|
|
999
999
|
}
|
|
1000
1000
|
const Z = P.type === "edit" ? `edit-${P.featureId}` : P.type;
|
|
1001
|
-
return /* @__PURE__ */ r(
|
|
1001
|
+
return /* @__PURE__ */ r(le, { children: /* @__PURE__ */ T(
|
|
1002
1002
|
"aside",
|
|
1003
1003
|
{
|
|
1004
1004
|
ref: x,
|
|
@@ -1006,7 +1006,7 @@ const Gs = Gt(function({ footer: e }) {
|
|
|
1006
1006
|
className: u ? "h-full w-full" : w ? `absolute top-0 h-full z-[600] ${o ? "shadow-elm-raised" : ""}` : "absolute top-0 h-full z-10",
|
|
1007
1007
|
style: u ? void 0 : w ? { width: `min(${f}px, 100% - 48px)`, right: o ? 0 : `calc(-1 * min(${f}px, 100% - 48px))`, transition: M ? "none" : "right 200ms ease" } : { width: f, right: o ? 0 : -f, transition: M ? "none" : "right 200ms ease" },
|
|
1008
1008
|
children: [
|
|
1009
|
-
!u && !o && /* @__PURE__ */ r("div", { className: "absolute z-30", style: { left: -64 - m, top: 16 }, children: /* @__PURE__ */ r(Pe, { label: "Open layers panel", shortcutId: "toggle-sidebar", tooltipContent: "Show layers", shortcut:
|
|
1009
|
+
!u && !o && /* @__PURE__ */ r("div", { className: "absolute z-30", style: { left: -64 - m, top: 16 }, children: /* @__PURE__ */ r(Pe, { label: "Open layers panel", shortcutId: "toggle-sidebar", tooltipContent: "Show layers", shortcut: a, tooltipSide: "bottom", onClick: () => d(!0), children: /* @__PURE__ */ r(Jt, { size: 24 }) }) }),
|
|
1010
1010
|
/* @__PURE__ */ T("div", { inert: !u && !o, className: `h-full flex flex-col overflow-hidden bg-elm-surface ${u ? "" : "border-l border-elm-border/80"}`, children: [
|
|
1011
1011
|
!u && /* @__PURE__ */ r(
|
|
1012
1012
|
"div",
|
|
@@ -1016,7 +1016,7 @@ const Gs = Gt(function({ footer: e }) {
|
|
|
1016
1016
|
title: "Drag to resize panel"
|
|
1017
1017
|
}
|
|
1018
1018
|
),
|
|
1019
|
-
z && b.length < 2 ? /* @__PURE__ */ r(Co, { dialogState: P, collapsible: !0 }, Z) : /* @__PURE__ */ T(
|
|
1019
|
+
z && b.length < 2 ? /* @__PURE__ */ r(Co, { dialogState: P, collapsible: !0 }, Z) : /* @__PURE__ */ T(le, { children: [
|
|
1020
1020
|
/* @__PURE__ */ r("header", { className: `${po} px-3`, children: /* @__PURE__ */ T("div", { className: "flex items-center justify-between h-6 w-full", children: [
|
|
1021
1021
|
/* @__PURE__ */ T("div", { className: "flex items-center gap-1.5", children: [
|
|
1022
1022
|
/* @__PURE__ */ r(pr, {}),
|
|
@@ -1085,41 +1085,41 @@ function kr({ initialLabel: t, onCommit: e, autoFocus: n, activate: s, onEnd: o,
|
|
|
1085
1085
|
$(() => {
|
|
1086
1086
|
s && !m && !i && (f(t), c(!0));
|
|
1087
1087
|
}, [s]), $(() => {
|
|
1088
|
-
var
|
|
1089
|
-
m && ((
|
|
1088
|
+
var l, p;
|
|
1089
|
+
m && ((l = h.current) == null || l.focus(), (p = h.current) == null || p.select());
|
|
1090
1090
|
}, [m]);
|
|
1091
|
-
function u(
|
|
1092
|
-
i || (f(
|
|
1091
|
+
function u(l) {
|
|
1092
|
+
i || (f(l), c(!0));
|
|
1093
1093
|
}
|
|
1094
1094
|
function x() {
|
|
1095
|
-
const
|
|
1096
|
-
|
|
1095
|
+
const l = y.trim();
|
|
1096
|
+
l && l !== t && e(l), c(!1), o == null || o();
|
|
1097
1097
|
}
|
|
1098
1098
|
function w() {
|
|
1099
1099
|
f(t), c(!1), o == null || o();
|
|
1100
1100
|
}
|
|
1101
|
-
function M(
|
|
1102
|
-
if (
|
|
1103
|
-
|
|
1101
|
+
function M(l) {
|
|
1102
|
+
if (l.key === "Enter") {
|
|
1103
|
+
l.preventDefault(), l.nativeEvent.stopImmediatePropagation(), x();
|
|
1104
1104
|
return;
|
|
1105
1105
|
}
|
|
1106
|
-
if (
|
|
1107
|
-
|
|
1106
|
+
if (l.key === "Escape") {
|
|
1107
|
+
l.nativeEvent.stopImmediatePropagation(), w();
|
|
1108
1108
|
return;
|
|
1109
1109
|
}
|
|
1110
|
-
if (
|
|
1111
|
-
|
|
1110
|
+
if (l.key === "Tab" && d) {
|
|
1111
|
+
l.preventDefault(), l.nativeEvent.stopImmediatePropagation();
|
|
1112
1112
|
const p = y.trim();
|
|
1113
|
-
p && p !== t && e(p), c(!1), d(
|
|
1113
|
+
p && p !== t && e(p), c(!1), d(l.shiftKey ? "prev" : "next");
|
|
1114
1114
|
}
|
|
1115
1115
|
}
|
|
1116
1116
|
return { isRenaming: m, startRenaming: u, inputProps: {
|
|
1117
1117
|
ref: h,
|
|
1118
1118
|
value: y,
|
|
1119
|
-
onChange: (
|
|
1119
|
+
onChange: (l) => f(l.target.value),
|
|
1120
1120
|
onBlur: x,
|
|
1121
1121
|
onKeyDown: M,
|
|
1122
|
-
onClick: (
|
|
1122
|
+
onClick: (l) => l.stopPropagation()
|
|
1123
1123
|
} };
|
|
1124
1124
|
}
|
|
1125
1125
|
function Ro(t) {
|
|
@@ -1143,9 +1143,9 @@ const Us = Gt(function({
|
|
|
1143
1143
|
onRangeSelect: w,
|
|
1144
1144
|
isContextMenuActive: M,
|
|
1145
1145
|
dragCountBadge: C,
|
|
1146
|
-
isGhosted:
|
|
1146
|
+
isGhosted: l,
|
|
1147
1147
|
onRename: p,
|
|
1148
|
-
renameActive:
|
|
1148
|
+
renameActive: a,
|
|
1149
1149
|
onRenameEnd: E,
|
|
1150
1150
|
onRenameTab: g,
|
|
1151
1151
|
joinTop: N,
|
|
@@ -1155,7 +1155,7 @@ const Us = Gt(function({
|
|
|
1155
1155
|
initialLabel: K,
|
|
1156
1156
|
disabled: b,
|
|
1157
1157
|
onCommit: (F) => p == null ? void 0 : p(e.id, F),
|
|
1158
|
-
activate:
|
|
1158
|
+
activate: a,
|
|
1159
1159
|
onEnd: E,
|
|
1160
1160
|
onTab: g
|
|
1161
1161
|
}), O = B(null);
|
|
@@ -1183,7 +1183,7 @@ const Us = Gt(function({
|
|
|
1183
1183
|
},
|
|
1184
1184
|
...H,
|
|
1185
1185
|
...y,
|
|
1186
|
-
style: { listStyle: "none", opacity:
|
|
1186
|
+
style: { listStyle: "none", opacity: l ? 0.4 : void 0, outline: "none", ...W },
|
|
1187
1187
|
children: /* @__PURE__ */ T(
|
|
1188
1188
|
"div",
|
|
1189
1189
|
{
|
|
@@ -1281,10 +1281,10 @@ function js({ group: t, featureCount: e, autoFocus: n, isSelected: s, onToggleCo
|
|
|
1281
1281
|
disabled: x,
|
|
1282
1282
|
onCommit: i,
|
|
1283
1283
|
autoFocus: n
|
|
1284
|
-
}), [
|
|
1284
|
+
}), [l, p] = q(null), a = B(null);
|
|
1285
1285
|
function E(z) {
|
|
1286
1286
|
z.stopPropagation();
|
|
1287
|
-
const K =
|
|
1287
|
+
const K = a.current;
|
|
1288
1288
|
if (K) {
|
|
1289
1289
|
const b = K.getBoundingClientRect();
|
|
1290
1290
|
p({ x: b.right, y: b.bottom + 4 });
|
|
@@ -1318,12 +1318,12 @@ function js({ group: t, featureCount: e, autoFocus: n, isSelected: s, onToggleCo
|
|
|
1318
1318
|
onClick: () => m("delete-features")
|
|
1319
1319
|
}
|
|
1320
1320
|
];
|
|
1321
|
-
return /* @__PURE__ */ T(
|
|
1322
|
-
|
|
1323
|
-
|
|
1321
|
+
return /* @__PURE__ */ T(le, { children: [
|
|
1322
|
+
l && /* @__PURE__ */ r(
|
|
1323
|
+
ar,
|
|
1324
1324
|
{
|
|
1325
|
-
x:
|
|
1326
|
-
y:
|
|
1325
|
+
x: l.x,
|
|
1326
|
+
y: l.y,
|
|
1327
1327
|
onClose: () => p(null),
|
|
1328
1328
|
items: P
|
|
1329
1329
|
}
|
|
@@ -1396,7 +1396,7 @@ function js({ group: t, featureCount: e, autoFocus: n, isSelected: s, onToggleCo
|
|
|
1396
1396
|
/* @__PURE__ */ r("div", { className: "opacity-0 group-hover:opacity-100", children: /* @__PURE__ */ r(be, { content: "More options", children: /* @__PURE__ */ r(
|
|
1397
1397
|
"button",
|
|
1398
1398
|
{
|
|
1399
|
-
ref:
|
|
1399
|
+
ref: a,
|
|
1400
1400
|
onClick: E,
|
|
1401
1401
|
className: "text-elm-text p-1 rounded-elm-control hover:bg-(--elm-surface-hover,var(--color-gray-100)) dark:hover:bg-(--elm-surface-hover,var(--color-gray-700))",
|
|
1402
1402
|
"aria-label": "More options",
|
|
@@ -1471,7 +1471,7 @@ function Hs() {
|
|
|
1471
1471
|
return vr(n, t), t ? /* @__PURE__ */ r("div", { ref: n, "aria-hidden": "true", className: e.className, style: e.style }) : null;
|
|
1472
1472
|
}
|
|
1473
1473
|
function Bo() {
|
|
1474
|
-
const [t, e] = q(""), [n, s] = q(!1), [o, d] = q(!1), [i, m] = q(-1), c = B(null), y = B(null), { results: f, loading: h, error: u, flush: x } = Br(t), w = B(!1), { flyTo: M, fitBounds: C } = Ae(), { dataStore:
|
|
1474
|
+
const [t, e] = q(""), [n, s] = q(!1), [o, d] = q(!1), [i, m] = q(-1), c = B(null), y = B(null), { results: f, loading: h, error: u, flush: x } = Br(t), w = B(!1), { flyTo: M, fitBounds: C } = Ae(), { dataStore: l } = oe(), p = ke();
|
|
1475
1475
|
$(() => {
|
|
1476
1476
|
s(t.trim().length >= 2), m(-1);
|
|
1477
1477
|
}, [t, f]), $(() => {
|
|
@@ -1496,11 +1496,11 @@ function Bo() {
|
|
|
1496
1496
|
}
|
|
1497
1497
|
return window.addEventListener("keydown", b, { capture: !0 }), () => window.removeEventListener("keydown", b, { capture: !0 });
|
|
1498
1498
|
}, [n, p]);
|
|
1499
|
-
function
|
|
1499
|
+
function a(b) {
|
|
1500
1500
|
M == null || M([parseFloat(b.lat), parseFloat(b.lon)], 15);
|
|
1501
1501
|
}
|
|
1502
1502
|
function E(b) {
|
|
1503
|
-
const k = parseFloat(b.lat), D = parseFloat(b.lon), R =
|
|
1503
|
+
const k = parseFloat(b.lat), D = parseFloat(b.lon), R = l.getState().getDefaultSchema(), O = {};
|
|
1504
1504
|
for (const Z of R.fields)
|
|
1505
1505
|
O[Z.key] = Z.key === "name" ? b.display_name.split(",")[0].trim() : "";
|
|
1506
1506
|
const j = {
|
|
@@ -1510,7 +1510,7 @@ function Bo() {
|
|
|
1510
1510
|
geometry: { type: "Point", coordinates: [D, k] },
|
|
1511
1511
|
properties: O
|
|
1512
1512
|
};
|
|
1513
|
-
|
|
1513
|
+
l.getState().addFeature(j), M == null || M([k, D], 15), N();
|
|
1514
1514
|
}
|
|
1515
1515
|
function g(b) {
|
|
1516
1516
|
const k = b.geojson;
|
|
@@ -1524,13 +1524,13 @@ function Bo() {
|
|
|
1524
1524
|
geometry: D,
|
|
1525
1525
|
properties: { name: b.display_name.split(",")[0].trim() }
|
|
1526
1526
|
};
|
|
1527
|
-
|
|
1527
|
+
l.getState().addFeature(R), C == null || C(ot(D)), N();
|
|
1528
1528
|
}
|
|
1529
1529
|
function N() {
|
|
1530
1530
|
e(""), s(!1), m(-1);
|
|
1531
1531
|
}
|
|
1532
1532
|
function P(b) {
|
|
1533
|
-
m(b),
|
|
1533
|
+
m(b), a(f[b]), requestAnimationFrame(() => {
|
|
1534
1534
|
var k;
|
|
1535
1535
|
return (k = y.current) == null ? void 0 : k.focus();
|
|
1536
1536
|
});
|
|
@@ -1548,7 +1548,7 @@ function Bo() {
|
|
|
1548
1548
|
f.length && (b.key === "ArrowDown" ? (b.preventDefault(), m((k) => (k + 1) % f.length)) : b.key === "ArrowUp" && (b.preventDefault(), m((k) => k <= 0 ? f.length - 1 : k - 1)));
|
|
1549
1549
|
}
|
|
1550
1550
|
const K = n && t.trim().length >= 2;
|
|
1551
|
-
return { query: t, setQuery: e, setOpen: s, showDropdown: K, containerRef: c, inputRef: y, focused: o, setFocused: d, results: f, loading: h, error: u, flyToResult:
|
|
1551
|
+
return { query: t, setQuery: e, setOpen: s, showDropdown: K, containerRef: c, inputRef: y, focused: o, setFocused: d, results: f, loading: h, error: u, flyToResult: a, handleAdd: E, handleAddShape: g, clear: N, activeIndex: i, setActiveIndex: m, handleInputKeyDown: z };
|
|
1552
1552
|
}
|
|
1553
1553
|
function Sr(t) {
|
|
1554
1554
|
var e, n;
|
|
@@ -1565,11 +1565,11 @@ const Wo = 208, _o = {
|
|
|
1565
1565
|
"bottom-right": { style: { bottom: 16, right: 16 }, className: "flex-col-reverse items-end" }
|
|
1566
1566
|
};
|
|
1567
1567
|
function Vs({ embedded: t } = {}) {
|
|
1568
|
-
const e = U((A) => A.features.length), n = U((A) => A.maxFeatures), s = n != null && e >= n, o =
|
|
1568
|
+
const e = U((A) => A.features.length), n = U((A) => A.maxFeatures), s = n != null && e >= n, o = ae(), d = ce(), { toolbar: i } = d, m = i.direction === "vertical", c = _o[i.position], y = S(nt), f = S((A) => A.sidebarWidth), h = S((A) => A.codeDockWidth), u = S((A) => A.layout), x = d.ui.layerList && y, w = i.position.startsWith("bottom"), M = i.position === "left-center" || i.position === "right-center", C = u === "split" && w, l = u === "split" && M, p = (() => {
|
|
1569
1569
|
let A = c.style;
|
|
1570
1570
|
const X = i.position.endsWith("-right") || i.position.startsWith("right");
|
|
1571
|
-
return x ? X && (A = { ...A, right: f + 16 + h }) : d.ui.layerList && u === "panel" && i.position === "top-right" ? A = { ...A, right: 72 + h } : X && h && (A = { ...A, right: 16 + h }), C ? A = { ...A, bottom: "calc(33.33% + 16px)" } : w && (A = { ...A, bottom: "calc(var(--elm-table-offset, 0px) + 16px)" }),
|
|
1572
|
-
})(),
|
|
1571
|
+
return x ? X && (A = { ...A, right: f + 16 + h }) : d.ui.layerList && u === "panel" && i.position === "top-right" ? A = { ...A, right: 72 + h } : X && h && (A = { ...A, right: 16 + h }), C ? A = { ...A, bottom: "calc(33.33% + 16px)" } : w && (A = { ...A, bottom: "calc(var(--elm-table-offset, 0px) + 16px)" }), l && (A = { ...A, top: "33.33%" }), A === c.style ? c : { ...c, style: A };
|
|
1572
|
+
})(), a = S((A) => A.editingMode), E = S((A) => A.enabledTools), g = S((A) => A.unavailableTools), N = S((A) => A.readonly), P = S((A) => A.setEditingMode);
|
|
1573
1573
|
function z(A) {
|
|
1574
1574
|
if (s && A !== "none") {
|
|
1575
1575
|
o({ type: "error", code: "limit-reached", source: "editor", message: rn(n) });
|
|
@@ -1649,7 +1649,7 @@ function Vs({ embedded: t } = {}) {
|
|
|
1649
1649
|
document.removeEventListener("mousedown", A), document.removeEventListener("keydown", X);
|
|
1650
1650
|
};
|
|
1651
1651
|
}, [Le, j]);
|
|
1652
|
-
const We =
|
|
1652
|
+
const We = a === "place-point", _e = a === "draw-line", Ge = a === "draw-polygon", Ue = a === "draw-circle", je = a === "draw-rect", qe = a === "draw-route", He = a === "draw-freehand", Ve = a === "pick-shape", vt = a === "measure", se = (A) => (!E || E.includes(A)) && !g.includes(A), Dr = null;
|
|
1653
1653
|
function xt(A) {
|
|
1654
1654
|
var X;
|
|
1655
1655
|
if (A.key === "Tab" && V >= 0) {
|
|
@@ -1693,7 +1693,7 @@ function Vs({ embedded: t } = {}) {
|
|
|
1693
1693
|
"flex gap-2 bg-elm-surface/95 backdrop-blur-md border border-(--elm-border,color-mix(in_oklab,var(--color-black)_10%,transparent)) dark:border-(--elm-border,color-mix(in_oklab,var(--color-white)_10%,transparent)) shadow-elm rounded-elm pointer-events-auto antialiased",
|
|
1694
1694
|
m ? "flex-col items-center p-[7px]" : "flex-row flex-wrap justify-center items-center p-[7px]"
|
|
1695
1695
|
), children: [
|
|
1696
|
-
N ? null : /* @__PURE__ */ T(
|
|
1696
|
+
N ? null : /* @__PURE__ */ T(le, { children: [
|
|
1697
1697
|
se("point") && /* @__PURE__ */ r(me, { active: We, disabled: !We && s, onClick: () => z(We ? "none" : "place-point"), label: "Point", shortcut: K("place-point").toUpperCase(), shortcutId: "place-point", children: /* @__PURE__ */ r(Zt, { size: 24 }) }),
|
|
1698
1698
|
se("line") && /* @__PURE__ */ r(me, { active: _e, disabled: !_e && s, onClick: () => z(_e ? "none" : "draw-line"), label: "Line", shortcut: K("draw-line").toUpperCase(), shortcutId: "draw-line", children: /* @__PURE__ */ r(Qt, { size: 24 }) }),
|
|
1699
1699
|
se("polygon") && /* @__PURE__ */ r(me, { active: Ge, disabled: !Ge && s, onClick: () => z(Ge ? "none" : "draw-polygon"), label: "Area", shortcut: K("draw-polygon").toUpperCase(), shortcutId: "draw-polygon", children: /* @__PURE__ */ r(Yt, { size: 24 }) }),
|
|
@@ -1703,7 +1703,7 @@ function Vs({ embedded: t } = {}) {
|
|
|
1703
1703
|
se("freehand") && /* @__PURE__ */ r(me, { active: He, disabled: !He && s, onClick: () => z(He ? "none" : "draw-freehand"), label: "Freehand", shortcut: K("draw-freehand").toUpperCase(), shortcutId: "draw-freehand", children: /* @__PURE__ */ r(Dn, { size: 24 }) }),
|
|
1704
1704
|
se("picker") && /* @__PURE__ */ r(me, { active: Ve, disabled: !Ve && s, onClick: () => z(Ve ? "none" : "pick-shape"), label: "Picker", shortcut: K("picker").toUpperCase(), shortcutId: "picker", children: /* @__PURE__ */ r(In, { size: 24 }) })
|
|
1705
1705
|
] }),
|
|
1706
|
-
se("measure") && /* @__PURE__ */ T(
|
|
1706
|
+
se("measure") && /* @__PURE__ */ T(le, { children: [
|
|
1707
1707
|
!N && /* @__PURE__ */ r(zt, { vertical: m }),
|
|
1708
1708
|
/* @__PURE__ */ r(me, { active: vt, onClick: () => P(vt ? "none" : "measure"), label: "Measure", shortcut: K("measure").toUpperCase(), shortcutId: "measure", children: /* @__PURE__ */ r(Mn, { size: 24 }) }),
|
|
1709
1709
|
ge && se("search") && /* @__PURE__ */ r(zt, { vertical: m })
|
|
@@ -1879,15 +1879,15 @@ function Go(t, e) {
|
|
|
1879
1879
|
};
|
|
1880
1880
|
}, [t, e]);
|
|
1881
1881
|
}
|
|
1882
|
-
const Uo = _t(() => import("./BooleanOperations-
|
|
1882
|
+
const Uo = _t(() => import("./BooleanOperations-BRO7NHUY.js"));
|
|
1883
1883
|
function Js() {
|
|
1884
|
-
const { dataStore: t } = oe(), e = S((k) => k.readonly), n = S((k) => k.transformActive), s = S((k) => k.setTransformActive), o = S((k) => k.editingMode), d = S((k) => k.setEditingMode), i = U((k) => k.selectedIds), m = i.length === 1 ? i[0] : null, c = S((k) => k.closeDialog), { getKey: y } = Ee(), f =
|
|
1884
|
+
const { dataStore: t } = oe(), e = S((k) => k.readonly), n = S((k) => k.transformActive), s = S((k) => k.setTransformActive), o = S((k) => k.editingMode), d = S((k) => k.setEditingMode), i = U((k) => k.selectedIds), m = i.length === 1 ? i[0] : null, c = S((k) => k.closeDialog), { getKey: y } = Ee(), f = ae(), h = U((k) => {
|
|
1885
1885
|
if (!m) return null;
|
|
1886
1886
|
const D = k.features.find((R) => R.id === m);
|
|
1887
1887
|
return (D == null ? void 0 : D.geometry.type) ?? null;
|
|
1888
1888
|
}), u = B(null);
|
|
1889
1889
|
if (Go(u, `${e}|${i.length}|${h}`), e) return null;
|
|
1890
|
-
const x = m !== null || i.length > 0, w = h === "Polygon" || h === "MultiPolygon", M = h === "MultiPoint" || h === "MultiPolygon" || h === "MultiLineString" || h === "GeometryCollection", C = i.length === 1 && h === "Point",
|
|
1890
|
+
const x = m !== null || i.length > 0, w = h === "Polygon" || h === "MultiPolygon", M = h === "MultiPoint" || h === "MultiPolygon" || h === "MultiLineString" || h === "GeometryCollection", C = i.length === 1 && h === "Point", l = x && !C, p = w, a = Fe(h), E = M, g = i.length >= 2, N = E || g;
|
|
1891
1891
|
function P() {
|
|
1892
1892
|
if (i.length !== 0 && t.getState().duplicateSelection())
|
|
1893
1893
|
if (i.length === 1) {
|
|
@@ -1913,7 +1913,7 @@ function Js() {
|
|
|
1913
1913
|
}
|
|
1914
1914
|
return /* @__PURE__ */ T("div", { className: "flex flex-wrap items-center justify-center gap-3 max-w-full pointer-events-none", children: [
|
|
1915
1915
|
x && /* @__PURE__ */ T("div", { ref: u, className: "flex flex-wrap items-center justify-center gap-2 max-w-full bg-elm-surface/95 backdrop-blur-md border border-elm-border/80 shadow-elm rounded-elm px-2 py-2 pointer-events-auto antialiased", children: [
|
|
1916
|
-
|
|
1916
|
+
l && /* @__PURE__ */ r(
|
|
1917
1917
|
te,
|
|
1918
1918
|
{
|
|
1919
1919
|
label: "Transform",
|
|
@@ -1926,8 +1926,8 @@ function Js() {
|
|
|
1926
1926
|
children: /* @__PURE__ */ r(er, { size: 24 })
|
|
1927
1927
|
}
|
|
1928
1928
|
),
|
|
1929
|
-
|
|
1930
|
-
p && /* @__PURE__ */ T(
|
|
1929
|
+
l && (a || N) && /* @__PURE__ */ r(Ne, {}),
|
|
1930
|
+
p && /* @__PURE__ */ T(le, { children: [
|
|
1931
1931
|
/* @__PURE__ */ r(
|
|
1932
1932
|
te,
|
|
1933
1933
|
{
|
|
@@ -1955,7 +1955,7 @@ function Js() {
|
|
|
1955
1955
|
}
|
|
1956
1956
|
)
|
|
1957
1957
|
] }),
|
|
1958
|
-
|
|
1958
|
+
a && /* @__PURE__ */ T(le, { children: [
|
|
1959
1959
|
/* @__PURE__ */ r(
|
|
1960
1960
|
te,
|
|
1961
1961
|
{
|
|
@@ -1990,7 +1990,7 @@ function Js() {
|
|
|
1990
1990
|
}
|
|
1991
1991
|
)
|
|
1992
1992
|
] }),
|
|
1993
|
-
|
|
1993
|
+
a && N && /* @__PURE__ */ r(Ne, {}),
|
|
1994
1994
|
E && /* @__PURE__ */ r(
|
|
1995
1995
|
te,
|
|
1996
1996
|
{
|
|
@@ -2002,12 +2002,12 @@ function Js() {
|
|
|
2002
2002
|
}
|
|
2003
2003
|
),
|
|
2004
2004
|
g && /* @__PURE__ */ r(te, { label: "Merge", onClick: K, children: /* @__PURE__ */ r(ir, { size: 24 }) }),
|
|
2005
|
-
(
|
|
2005
|
+
(l || a || N) && /* @__PURE__ */ r(Ne, {}),
|
|
2006
2006
|
/* @__PURE__ */ r(
|
|
2007
2007
|
te,
|
|
2008
2008
|
{
|
|
2009
2009
|
label: "Duplicate",
|
|
2010
|
-
shortcut: /* @__PURE__ */ T(
|
|
2010
|
+
shortcut: /* @__PURE__ */ T(le, { children: [
|
|
2011
2011
|
/* @__PURE__ */ r(Q, { children: "⌘" }),
|
|
2012
2012
|
/* @__PURE__ */ r(Q, { children: "D" })
|
|
2013
2013
|
] }),
|
|
@@ -2073,9 +2073,9 @@ const qo = /* @__PURE__ */ r("svg", { width: "16", height: "16", viewBox: "0 0 1
|
|
|
2073
2073
|
{ mode: "buffer-shape", label: "Buffer", icon: /* @__PURE__ */ r(or, { size: 16 }) }
|
|
2074
2074
|
];
|
|
2075
2075
|
function Zs({ x: t, y: e, data: n, onClose: s }) {
|
|
2076
|
-
const { feature: o, requestPreciseCoords: d } = n, { dataStore: i } = oe(), m = S((P) => P.readonly), c = S((P) => P.transformActive), y = S((P) => P.setTransformActive), f = S((P) => P.editingMode), h = S((P) => P.setEditingMode), u = S((P) => P.closeDialog), x = U((P) => P.selectedIds), w =
|
|
2076
|
+
const { feature: o, requestPreciseCoords: d } = n, { dataStore: i } = oe(), m = S((P) => P.readonly), c = S((P) => P.transformActive), y = S((P) => P.setTransformActive), f = S((P) => P.editingMode), h = S((P) => P.setEditingMode), u = S((P) => P.closeDialog), x = U((P) => P.selectedIds), w = ae(), { getKey: M } = Ee();
|
|
2077
2077
|
if (m) return null;
|
|
2078
|
-
const C = o.geometry.type,
|
|
2078
|
+
const C = o.geometry.type, l = C === "Polygon" || C === "MultiPolygon", p = C === "MultiPoint" || C === "MultiPolygon" || C === "MultiLineString" || C === "GeometryCollection", a = x.length >= 2 && x.includes(o.id);
|
|
2079
2079
|
function E(P) {
|
|
2080
2080
|
h(f === P ? "none" : P), c && y(!1);
|
|
2081
2081
|
}
|
|
@@ -2092,7 +2092,7 @@ function Zs({ x: t, y: e, data: n, onClose: s }) {
|
|
|
2092
2092
|
}
|
|
2093
2093
|
}), Fe(C)) {
|
|
2094
2094
|
N.push({ separator: !0 });
|
|
2095
|
-
for (const P of [...
|
|
2095
|
+
for (const P of [...l ? Ho : [], ...Vo])
|
|
2096
2096
|
N.push({
|
|
2097
2097
|
label: P.label,
|
|
2098
2098
|
icon: P.icon,
|
|
@@ -2100,7 +2100,7 @@ function Zs({ x: t, y: e, data: n, onClose: s }) {
|
|
|
2100
2100
|
onClick: () => E(P.mode)
|
|
2101
2101
|
});
|
|
2102
2102
|
}
|
|
2103
|
-
return
|
|
2103
|
+
return l && N.push({
|
|
2104
2104
|
label: "Center point",
|
|
2105
2105
|
icon: /* @__PURE__ */ r(An, { size: 16, weight: "fill" }),
|
|
2106
2106
|
onClick: () => {
|
|
@@ -2114,7 +2114,7 @@ function Zs({ x: t, y: e, data: n, onClose: s }) {
|
|
|
2114
2114
|
};
|
|
2115
2115
|
i.getState().addFeature(K);
|
|
2116
2116
|
}
|
|
2117
|
-
}), (p ||
|
|
2117
|
+
}), (p || a) && (N.push({ separator: !0 }), p && N.push({
|
|
2118
2118
|
label: "Break apart",
|
|
2119
2119
|
icon: /* @__PURE__ */ r(sr, { size: 16 }),
|
|
2120
2120
|
shortcut: g("break-apart"),
|
|
@@ -2122,7 +2122,7 @@ function Zs({ x: t, y: e, data: n, onClose: s }) {
|
|
|
2122
2122
|
const P = rt(o.geometry);
|
|
2123
2123
|
i.getState().breakMultiGeometry(o.id) && w({ type: "feature:broken", featureId: o.id, count: P, undo: () => i.getState().undo() });
|
|
2124
2124
|
}
|
|
2125
|
-
}),
|
|
2125
|
+
}), a && N.push({
|
|
2126
2126
|
label: `Merge ${x.length} features`,
|
|
2127
2127
|
icon: /* @__PURE__ */ r(ir, { size: 16 }),
|
|
2128
2128
|
onClick: () => {
|
|
@@ -2134,18 +2134,18 @@ function Zs({ x: t, y: e, data: n, onClose: s }) {
|
|
|
2134
2134
|
icon: /* @__PURE__ */ r(Fn, { size: 16 }),
|
|
2135
2135
|
onClick: d
|
|
2136
2136
|
})), N.push({ separator: !0 }), N.push({
|
|
2137
|
-
label:
|
|
2137
|
+
label: a ? `Delete ${x.length} features` : "Delete",
|
|
2138
2138
|
icon: /* @__PURE__ */ r(ze, { size: 16 }),
|
|
2139
2139
|
shortcut: /* @__PURE__ */ r(Q, { children: Vt("delete-selected") }),
|
|
2140
2140
|
onClick: () => {
|
|
2141
2141
|
var K;
|
|
2142
|
-
const P =
|
|
2142
|
+
const P = a ? x.length : 1, z = String(((K = o.properties) == null ? void 0 : K.name) || "feature");
|
|
2143
2143
|
i.getState().deleteSelection(), u(), w(P === 1 ? { type: "feature:deleted", featureId: o.id, label: z, undo: () => i.getState().undo() } : { type: "features:deleted", count: P, undo: () => i.getState().undo() });
|
|
2144
2144
|
}
|
|
2145
|
-
}), /* @__PURE__ */ r(
|
|
2145
|
+
}), /* @__PURE__ */ r(ar, { x: t, y: e, items: N, onClose: s });
|
|
2146
2146
|
}
|
|
2147
2147
|
function Jo({ size: t, tooltipSide: e }) {
|
|
2148
|
-
const n = U((d) => d.undoStack.length > 0), s = U((d) => d.undo), o =
|
|
2148
|
+
const n = U((d) => d.undoStack.length > 0), s = U((d) => d.undo), o = ae();
|
|
2149
2149
|
return /* @__PURE__ */ r(
|
|
2150
2150
|
Pe,
|
|
2151
2151
|
{
|
|
@@ -2166,7 +2166,7 @@ function Jo({ size: t, tooltipSide: e }) {
|
|
|
2166
2166
|
);
|
|
2167
2167
|
}
|
|
2168
2168
|
function Xo({ size: t, tooltipSide: e }) {
|
|
2169
|
-
const n = U((d) => d.redoStack.length > 0), s = U((d) => d.redo), o =
|
|
2169
|
+
const n = U((d) => d.redoStack.length > 0), s = U((d) => d.redo), o = ae();
|
|
2170
2170
|
return /* @__PURE__ */ r(
|
|
2171
2171
|
Pe,
|
|
2172
2172
|
{
|
|
@@ -2199,9 +2199,9 @@ function Ys({ direction: t = "vertical" }) {
|
|
|
2199
2199
|
}
|
|
2200
2200
|
const Wt = "h-8 px-3 rounded-elm-control text-sm flex items-center justify-center gap-1.5 active:scale-[0.95]";
|
|
2201
2201
|
function Qs() {
|
|
2202
|
-
const { ui: t } = ce(), e = S((v) => v.editingMode), n = S((v) => v.lineInProgress), s = S((v) => v.polygonInProgress), o = S((v) => v.routeWaypoints), d = S((v) => v.routeLoading), i = S((v) => v.commitLine), m = S((v) => v.commitPolygon), c = S((v) => v.commitRoute), y = S((v) => v.commitSliceShape), f = S((v) => v.commitCutHole), h = S((v) => v.cancelDrawing), u = S((v) => v.circleCenter), x = S((v) => v.rectCorner), w = S((v) => v.freehandPoints), M = S((v) => v.freehandClosed), C = S((v) => v.setFreehandClosed),
|
|
2202
|
+
const { ui: t } = ce(), e = S((v) => v.editingMode), n = S((v) => v.lineInProgress), s = S((v) => v.polygonInProgress), o = S((v) => v.routeWaypoints), d = S((v) => v.routeLoading), i = S((v) => v.commitLine), m = S((v) => v.commitPolygon), c = S((v) => v.commitRoute), y = S((v) => v.commitSliceShape), f = S((v) => v.commitCutHole), h = S((v) => v.cancelDrawing), u = S((v) => v.circleCenter), x = S((v) => v.rectCorner), w = S((v) => v.freehandPoints), M = S((v) => v.freehandClosed), C = S((v) => v.setFreehandClosed), l = S((v) => v.measurePoints), p = S((v) => v.measureMode), a = S((v) => v.setMeasureMode), E = e === "draw-line" || e === "slice-shape", g = e === "draw-polygon" || e === "cut-hole", N = e === "draw-route", P = e === "draw-circle", z = e === "draw-rect", K = e === "draw-freehand", b = e === "place-point", k = e === "measure", D = e === "pick-shape";
|
|
2203
2203
|
if (!(E || g || N || P || z || K || b) && !k && !D) return null;
|
|
2204
|
-
const O = n.length > 0 || s.length > 0 || !!u || !!x || o.length > 0 || w.length > 0 ||
|
|
2204
|
+
const O = n.length > 0 || s.length > 0 || !!u || !!x || o.length > 0 || w.length > 0 || l.length > 0;
|
|
2205
2205
|
function j() {
|
|
2206
2206
|
if (e === "slice-shape") {
|
|
2207
2207
|
if (n.length < 2) return;
|
|
@@ -2220,14 +2220,14 @@ function Qs() {
|
|
|
2220
2220
|
c();
|
|
2221
2221
|
}
|
|
2222
2222
|
}
|
|
2223
|
-
const Z = E ? n.length >= 2 : g ? s.length >= 3 : N ? o.length >= 2 && !d : !1, L = b ? "Click to place a point" : e === "draw-line" ? n.length === 0 ? "Click to place the first point" : "Click to add points · Double-click to finish · ⌫ undo last" : e === "draw-polygon" ? s.length === 0 ? "Click to place the first point" : s.length < 3 ? "Click to continue · ⌫ undo last" : "Click to add points · Double-click to close · ⌫ undo last" : N ? o.length === 0 ? "Click to place the first waypoint" : "Click to add waypoints · ⌫ undo last" : P ? "Click and drag to size" : z ? "Click and drag to size · Hold Shift for square" : K ? "Click and drag to draw" : e === "slice-shape" ? n.length === 0 ? "Draw a line across the shape to slice it" : "Click to add points · Double-click to cut · ⌫ undo last" : e === "cut-hole" ? s.length === 0 ? "Draw a shape inside to cut a hole" : s.length < 3 ? "Click to continue · ⌫ undo last" : "Click to add points · Double-click to cut · ⌫ undo last" : k ?
|
|
2223
|
+
const Z = E ? n.length >= 2 : g ? s.length >= 3 : N ? o.length >= 2 && !d : !1, L = b ? "Click to place a point" : e === "draw-line" ? n.length === 0 ? "Click to place the first point" : "Click to add points · Double-click to finish · ⌫ undo last" : e === "draw-polygon" ? s.length === 0 ? "Click to place the first point" : s.length < 3 ? "Click to continue · ⌫ undo last" : "Click to add points · Double-click to close · ⌫ undo last" : N ? o.length === 0 ? "Click to place the first waypoint" : "Click to add waypoints · ⌫ undo last" : P ? "Click and drag to size" : z ? "Click and drag to size · Hold Shift for square" : K ? "Click and drag to draw" : e === "slice-shape" ? n.length === 0 ? "Draw a line across the shape to slice it" : "Click to add points · Double-click to cut · ⌫ undo last" : e === "cut-hole" ? s.length === 0 ? "Draw a shape inside to cut a hole" : s.length < 3 ? "Click to continue · ⌫ undo last" : "Click to add points · Double-click to cut · ⌫ undo last" : k ? l.length === 0 ? "Click to start measuring" : "Click to add points · Double-click to finish · ⌫ undo last" : D ? "Click anywhere to import a shape from the map" : null;
|
|
2224
2224
|
return /* @__PURE__ */ T("div", { className: "flex flex-wrap items-center justify-center gap-2 max-w-full bg-elm-surface/95 backdrop-blur-md border border-elm-border/80 shadow-elm rounded-elm px-2 py-2 pointer-events-auto", children: [
|
|
2225
|
-
k && /* @__PURE__ */ T(
|
|
2225
|
+
k && /* @__PURE__ */ T(le, { children: [
|
|
2226
2226
|
/* @__PURE__ */ r(
|
|
2227
2227
|
te,
|
|
2228
2228
|
{
|
|
2229
2229
|
active: p === "distance",
|
|
2230
|
-
onClick: () =>
|
|
2230
|
+
onClick: () => a("distance"),
|
|
2231
2231
|
label: "Measure distance",
|
|
2232
2232
|
children: /* @__PURE__ */ r(Rn, { size: 24 })
|
|
2233
2233
|
}
|
|
@@ -2236,7 +2236,7 @@ function Qs() {
|
|
|
2236
2236
|
te,
|
|
2237
2237
|
{
|
|
2238
2238
|
active: p === "area",
|
|
2239
|
-
onClick: () =>
|
|
2239
|
+
onClick: () => a("area"),
|
|
2240
2240
|
label: "Measure area",
|
|
2241
2241
|
children: /* @__PURE__ */ r($n, { size: 24 })
|
|
2242
2242
|
}
|
|
@@ -2281,7 +2281,7 @@ function Qs() {
|
|
|
2281
2281
|
] });
|
|
2282
2282
|
}
|
|
2283
2283
|
function ei({ size: t, tooltipSide: e } = {}) {
|
|
2284
|
-
const { fitBounds: n } = Ae(), s =
|
|
2284
|
+
const { fitBounds: n } = Ae(), s = ae(), o = U((m) => m.features), d = U((m) => m.selectedIds);
|
|
2285
2285
|
function i() {
|
|
2286
2286
|
if (!n) return;
|
|
2287
2287
|
let m = o;
|
|
@@ -2319,11 +2319,11 @@ function ei({ size: t, tooltipSide: e } = {}) {
|
|
|
2319
2319
|
}
|
|
2320
2320
|
const Yo = "flex items-center justify-center h-6 min-w-6 px-1.5 rounded-elm-control bg-transparent border border-transparent text-elm-text font-elm-mono text-xs tabular-nums select-none transition-colors focus-visible:ring-2 focus-visible:ring-elm-focus-ring", Qo = "flex items-center justify-center h-8 min-w-8 px-1 rounded-elm-control bg-transparent border border-transparent text-elm-text font-elm-mono text-sm tabular-nums select-none transition-colors", es = "flex items-center justify-center w-12 h-12 bg-elm-surface/95 backdrop-blur-md border border-elm-border/80 shadow-elm-control rounded-elm text-elm-text font-elm-mono text-sm select-none transition-colors";
|
|
2321
2321
|
function ti({ minZoom: t = 1, maxZoom: e = 22, fractional: n = !1, size: s = "md", tooltipSide: o = "top" }) {
|
|
2322
|
-
const d = U((E) => E.currentZoom), { flyTo: i, getCenter: m } = Ae(), c =
|
|
2322
|
+
const d = U((E) => E.currentZoom), { flyTo: i, getCenter: m } = Ae(), c = ae(), y = !!i && !!m, f = S((E) => E.zoomEditing), h = S((E) => E.setZoomEditing), [u, x] = q(null), w = B(null), M = B(!1), { getKey: C } = Ee(), l = s === "sm" ? Yo : s === "group" ? Qo : es, p = s !== "md";
|
|
2323
2323
|
$(() => {
|
|
2324
2324
|
u !== null && (n ? Math.abs(d - u) < 0.05 : Math.round(d) === Math.round(u)) && x(null);
|
|
2325
2325
|
}, [d, u, n]);
|
|
2326
|
-
function
|
|
2326
|
+
function a() {
|
|
2327
2327
|
var P;
|
|
2328
2328
|
const E = (((P = w.current) == null ? void 0 : P.value) ?? "").trim();
|
|
2329
2329
|
if (E === "") {
|
|
@@ -2362,11 +2362,11 @@ function ti({ minZoom: t = 1, maxZoom: e = 22, fractional: n = !1, size: s = "md
|
|
|
2362
2362
|
M.current ? N.setSelectionRange(N.value.length, N.value.length) : N.select(), M.current = !1;
|
|
2363
2363
|
},
|
|
2364
2364
|
onKeyDown: (g) => {
|
|
2365
|
-
g.key === "Enter" ? (g.preventDefault(),
|
|
2365
|
+
g.key === "Enter" ? (g.preventDefault(), a()) : g.key === "Escape" && (g.preventDefault(), h(!1));
|
|
2366
2366
|
},
|
|
2367
2367
|
onBlur: () => h(!1),
|
|
2368
2368
|
"aria-label": "Zoom level",
|
|
2369
|
-
className: `${
|
|
2369
|
+
className: `${l.replace(" select-none", "")} text-center focus:outline-none focus:border-elm-focus-ring${p ? " w-10 !bg-elm-surface" : ""}`
|
|
2370
2370
|
}
|
|
2371
2371
|
);
|
|
2372
2372
|
}
|
|
@@ -2386,7 +2386,7 @@ function ti({ minZoom: t = 1, maxZoom: e = 22, fractional: n = !1, size: s = "md
|
|
|
2386
2386
|
y && (M.current = !0, h(!0));
|
|
2387
2387
|
},
|
|
2388
2388
|
disabled: !y,
|
|
2389
|
-
className: `${
|
|
2389
|
+
className: `${l} ${y ? `${p ? "hover:bg-(--elm-control-hover,color-mix(in_oklab,var(--color-gray-200)_70%,transparent)) dark:hover:bg-(--elm-control-hover,var(--color-gray-800))" : "hover:bg-elm-surface-hover"} focus:outline-none focus-visible:ring-2 focus-visible:ring-elm-focus-ring cursor-pointer` : "cursor-default"}`,
|
|
2390
2390
|
children: n ? (u ?? d).toFixed(1) : Math.round(u ?? d)
|
|
2391
2391
|
}
|
|
2392
2392
|
)
|
|
@@ -2394,7 +2394,7 @@ function ti({ minZoom: t = 1, maxZoom: e = 22, fractional: n = !1, size: s = "md
|
|
|
2394
2394
|
);
|
|
2395
2395
|
}
|
|
2396
2396
|
function ri({ zoom: t = 15, size: e, tooltipSide: n }) {
|
|
2397
|
-
const { flyTo: s } = Ae(), o =
|
|
2397
|
+
const { flyTo: s } = Ae(), o = ae(), [d, i] = q(!1);
|
|
2398
2398
|
function m() {
|
|
2399
2399
|
if (!navigator.geolocation) {
|
|
2400
2400
|
o({ type: "error", code: "unsupported", source: "locate", message: "Geolocation is not supported by this browser" });
|
|
@@ -2435,7 +2435,7 @@ function ni() {
|
|
|
2435
2435
|
const ts = 3e4;
|
|
2436
2436
|
let ie = null;
|
|
2437
2437
|
const Te = /* @__PURE__ */ new Map();
|
|
2438
|
-
function
|
|
2438
|
+
function at(t, e) {
|
|
2439
2439
|
ie == null || ie.terminate(), ie = null;
|
|
2440
2440
|
const n = [...Te.values()];
|
|
2441
2441
|
Te.clear();
|
|
@@ -2454,12 +2454,12 @@ async function rs() {
|
|
|
2454
2454
|
}
|
|
2455
2455
|
i.reject(new Be("geometry", "geometry", (d == null ? void 0 : d.message) || "Geometry operation failed"));
|
|
2456
2456
|
}
|
|
2457
|
-
}, ie.onerror = () =>
|
|
2457
|
+
}, ie.onerror = () => at("Geometry worker failed", "geometry"), ie);
|
|
2458
2458
|
}
|
|
2459
2459
|
function Cr(t, { timeoutMs: e = ts } = {}) {
|
|
2460
2460
|
return rs().then((n) => new Promise((s, o) => {
|
|
2461
2461
|
const d = crypto.randomUUID(), i = setTimeout(() => {
|
|
2462
|
-
|
|
2462
|
+
at(`Geometry operation timed out after ${e} ms`, "timeout");
|
|
2463
2463
|
}, e);
|
|
2464
2464
|
Te.set(d, { resolve: s, reject: o, timer: i });
|
|
2465
2465
|
const m = { id: d, payload: t };
|
|
@@ -2468,7 +2468,7 @@ function Cr(t, { timeoutMs: e = ts } = {}) {
|
|
|
2468
2468
|
}
|
|
2469
2469
|
typeof Worker < "u" && nn(Cr);
|
|
2470
2470
|
function oi() {
|
|
2471
|
-
|
|
2471
|
+
at("Geometry worker disposed", "unknown");
|
|
2472
2472
|
}
|
|
2473
2473
|
function ct(t, e) {
|
|
2474
2474
|
var m;
|
|
@@ -2550,18 +2550,18 @@ function si() {
|
|
|
2550
2550
|
} catch {
|
|
2551
2551
|
return 0;
|
|
2552
2552
|
}
|
|
2553
|
-
}, [e, u, t]), M = t === "simplify-shape", C = ue(() => !M || !u || !Fe(u.type) ? null : { type: "simplify", geometry: u, tolerance: w }, [M, u, w]),
|
|
2553
|
+
}, [e, u, t]), M = t === "simplify-shape", C = ue(() => !M || !u || !Fe(u.type) ? null : { type: "simplify", geometry: u, tolerance: w }, [M, u, w]), l = ct(C, s);
|
|
2554
2554
|
$(() => () => {
|
|
2555
2555
|
y.getState(), s(null);
|
|
2556
2556
|
}, [s, y]);
|
|
2557
|
-
const p = u ? Ke(u) : 0,
|
|
2557
|
+
const p = u ? Ke(u) : 0, a = o ? Ke(o) : p, E = p - a;
|
|
2558
2558
|
return $(() => {
|
|
2559
2559
|
if (t !== "simplify-shape") return;
|
|
2560
2560
|
function g(N) {
|
|
2561
|
-
f(N) && (N.key === "Enter" && o && E > 0 ? (N.preventDefault(),
|
|
2561
|
+
f(N) && (N.key === "Enter" && o && E > 0 ? (N.preventDefault(), l(d)) : N.key === "Escape" && (N.preventDefault(), i()));
|
|
2562
2562
|
}
|
|
2563
2563
|
return window.addEventListener("keydown", g), () => window.removeEventListener("keydown", g);
|
|
2564
|
-
}, [t, o, E, d, i,
|
|
2564
|
+
}, [t, o, E, d, i, l, f]), t !== "simplify-shape" ? null : /* @__PURE__ */ T("div", { className: "flex flex-wrap items-center justify-center gap-3 max-w-full bg-elm-surface/95 backdrop-blur-md border border-elm-border/80 shadow-elm rounded-elm px-3 py-1.5 pointer-events-auto", children: [
|
|
2565
2565
|
/* @__PURE__ */ r("span", { className: "text-sm font-medium text-elm-text-secondary shrink-0", children: "Simplify" }),
|
|
2566
2566
|
/* @__PURE__ */ T("div", { className: "flex items-center gap-2", children: [
|
|
2567
2567
|
/* @__PURE__ */ r(
|
|
@@ -2580,7 +2580,7 @@ function si() {
|
|
|
2580
2580
|
/* @__PURE__ */ T("div", { className: "flex items-center gap-1 text-sm text-elm-text-muted shrink-0", children: [
|
|
2581
2581
|
/* @__PURE__ */ r("span", { className: "font-elm-mono", children: p }),
|
|
2582
2582
|
/* @__PURE__ */ r("span", { children: "→" }),
|
|
2583
|
-
/* @__PURE__ */ r("span", { className: `font-elm-mono font-medium ${E > 0 ? "text-primary-600 dark:text-primary-400" : "text-(--elm-text-secondary,var(--color-gray-600)) dark:text-(--elm-text-secondary,var(--color-gray-300))"}`, children:
|
|
2583
|
+
/* @__PURE__ */ r("span", { className: `font-elm-mono font-medium ${E > 0 ? "text-primary-600 dark:text-primary-400" : "text-(--elm-text-secondary,var(--color-gray-600)) dark:text-(--elm-text-secondary,var(--color-gray-300))"}`, children: a }),
|
|
2584
2584
|
E > 0 && /* @__PURE__ */ T("span", { className: "text-xs text-primary-500", children: [
|
|
2585
2585
|
"(−",
|
|
2586
2586
|
E,
|
|
@@ -2591,26 +2591,26 @@ function si() {
|
|
|
2591
2591
|
x && /* @__PURE__ */ r("span", { className: "text-xs text-amber-600 dark:text-amber-400 shrink-0", children: x === "route" ? "Turns this route into a plain line." : `Turns this ${x} into a plain shape.` }),
|
|
2592
2592
|
/* @__PURE__ */ T("div", { className: "flex items-center gap-1 shrink-0", children: [
|
|
2593
2593
|
/* @__PURE__ */ r(we, { variant: "ghost", onClick: i, className: "rounded-elm-control h-8 px-3 text-sm", children: "Cancel" }),
|
|
2594
|
-
/* @__PURE__ */ r(we, { variant: "primary", onClick: () =>
|
|
2594
|
+
/* @__PURE__ */ r(we, { variant: "primary", onClick: () => l(d), disabled: !o || E === 0, className: "rounded-elm-control h-8 px-3 text-sm", children: "Apply" })
|
|
2595
2595
|
] })
|
|
2596
2596
|
] });
|
|
2597
2597
|
}
|
|
2598
2598
|
function ii() {
|
|
2599
2599
|
const t = S((p) => p.editingMode), e = S((p) => p.smoothIterations), n = S((p) => p.setSmoothIterations), s = S((p) => p.setGeometryPreview), o = S((p) => p.geometryPreview), d = S((p) => p.commitGeometryProcess), i = S((p) => p.cancelGeometryProcess), { dataStore: m } = oe(), c = ke(), y = U((p) => p.selectedIds[0] ?? null), f = U((p) => {
|
|
2600
|
-
var
|
|
2601
|
-
return y ? ((
|
|
2600
|
+
var a;
|
|
2601
|
+
return y ? ((a = p.features.find((E) => E.id === y)) == null ? void 0 : a.geometry) ?? null : null;
|
|
2602
2602
|
}), h = U((p) => {
|
|
2603
|
-
var
|
|
2604
|
-
return y ? ((
|
|
2603
|
+
var a;
|
|
2604
|
+
return y ? ((a = p.features.find((E) => E.id === y)) == null ? void 0 : a._drawType) ?? null : null;
|
|
2605
2605
|
}), u = t === "smooth-shape", x = ue(() => !u || !f || !Fe(f.type) ? null : { type: "smooth", geometry: f, iterations: e }, [u, f, e]), w = ct(x, s);
|
|
2606
2606
|
$(() => () => {
|
|
2607
2607
|
m.getState(), s(null);
|
|
2608
2608
|
}, [s, m]);
|
|
2609
|
-
const M = f ? Ke(f) : 0, C = o ? Ke(o) : M,
|
|
2609
|
+
const M = f ? Ke(f) : 0, C = o ? Ke(o) : M, l = C - M;
|
|
2610
2610
|
return $(() => {
|
|
2611
2611
|
if (t !== "smooth-shape") return;
|
|
2612
|
-
function p(
|
|
2613
|
-
c(
|
|
2612
|
+
function p(a) {
|
|
2613
|
+
c(a) && (a.key === "Enter" && o ? (a.preventDefault(), w(d)) : a.key === "Escape" && (a.preventDefault(), i()));
|
|
2614
2614
|
}
|
|
2615
2615
|
return window.addEventListener("keydown", p), () => window.removeEventListener("keydown", p);
|
|
2616
2616
|
}, [t, o, d, i, w, c]), t !== "smooth-shape" ? null : /* @__PURE__ */ T("div", { className: "flex flex-wrap items-center justify-center gap-3 max-w-full bg-elm-surface/95 backdrop-blur-md border border-elm-border/80 shadow-elm rounded-elm px-3 py-1.5 pointer-events-auto", children: [
|
|
@@ -2638,9 +2638,9 @@ function ii() {
|
|
|
2638
2638
|
/* @__PURE__ */ r("span", { className: "font-elm-mono", children: M }),
|
|
2639
2639
|
/* @__PURE__ */ r("span", { children: "→" }),
|
|
2640
2640
|
/* @__PURE__ */ r("span", { className: "font-elm-mono font-medium text-primary-600 dark:text-primary-400", children: C }),
|
|
2641
|
-
|
|
2641
|
+
l > 0 && /* @__PURE__ */ T("span", { className: "text-xs text-primary-500", children: [
|
|
2642
2642
|
"(+",
|
|
2643
|
-
|
|
2643
|
+
l,
|
|
2644
2644
|
")"
|
|
2645
2645
|
] }),
|
|
2646
2646
|
/* @__PURE__ */ r("span", { className: "ml-0.5", children: "points" })
|
|
@@ -2665,7 +2665,7 @@ function is(t, e) {
|
|
|
2665
2665
|
return t * Nr;
|
|
2666
2666
|
}
|
|
2667
2667
|
}
|
|
2668
|
-
function
|
|
2668
|
+
function ls(t, e) {
|
|
2669
2669
|
switch (e) {
|
|
2670
2670
|
case "m":
|
|
2671
2671
|
return t;
|
|
@@ -2677,11 +2677,11 @@ function as(t, e) {
|
|
|
2677
2677
|
return t / Nr;
|
|
2678
2678
|
}
|
|
2679
2679
|
}
|
|
2680
|
-
function
|
|
2680
|
+
function li() {
|
|
2681
2681
|
const { dataStore: t } = oe(), e = ke(), n = S((D) => D.editingMode), s = S((D) => D.bufferDistance), o = S((D) => D.setBufferDistance), d = S((D) => D.bufferCreateNew), i = S((D) => D.setBufferCreateNew), m = S((D) => D.setGeometryPreview), c = S((D) => D.geometryPreview), y = S((D) => D.commitBufferProcess), f = S((D) => D.cancelBufferProcess), { units: h } = ce(), u = on(h.length), x = ue(
|
|
2682
2682
|
() => u === "imperial" ? ["ft", "mi"] : ["m", "km"],
|
|
2683
2683
|
[u]
|
|
2684
|
-
), [w, M] = q(!1), C = w ? x[1] : x[0], [
|
|
2684
|
+
), [w, M] = q(!1), C = w ? x[1] : x[0], [l, p] = q(null);
|
|
2685
2685
|
$(() => {
|
|
2686
2686
|
var O;
|
|
2687
2687
|
if (n !== "buffer-shape") {
|
|
@@ -2693,9 +2693,9 @@ function ai() {
|
|
|
2693
2693
|
const R = ((O = t.getState().features.find((j) => j.id === D)) == null ? void 0 : O.geometry) ?? null;
|
|
2694
2694
|
R && Fe(R.type) && p(R);
|
|
2695
2695
|
}, [n, t]);
|
|
2696
|
-
const
|
|
2697
|
-
() =>
|
|
2698
|
-
[
|
|
2696
|
+
const a = sn(l == null ? void 0 : l.type), E = ue(
|
|
2697
|
+
() => l && !(a && s <= 0) ? { type: "buffer", geometry: l, distance: s } : null,
|
|
2698
|
+
[l, s, a]
|
|
2699
2699
|
), g = ct(E, m);
|
|
2700
2700
|
$(() => () => {
|
|
2701
2701
|
m(null);
|
|
@@ -2706,7 +2706,7 @@ function ai() {
|
|
|
2706
2706
|
}
|
|
2707
2707
|
return window.addEventListener("keydown", D), () => window.removeEventListener("keydown", D);
|
|
2708
2708
|
}, [n, c, y, f, g, e]);
|
|
2709
|
-
const N = C === "km" || C === "mi", P =
|
|
2709
|
+
const N = C === "km" || C === "mi", P = ls(s, C), z = N ? Number(P.toFixed(2)) : Math.round(P), K = N ? 0.1 : 1;
|
|
2710
2710
|
function b(D) {
|
|
2711
2711
|
const R = parseFloat(D);
|
|
2712
2712
|
isNaN(R) || o(Math.round(is(R, C)));
|
|
@@ -2721,7 +2721,7 @@ function ai() {
|
|
|
2721
2721
|
"input",
|
|
2722
2722
|
{
|
|
2723
2723
|
type: "range",
|
|
2724
|
-
min:
|
|
2724
|
+
min: a ? 0 : -500,
|
|
2725
2725
|
max: 2e3,
|
|
2726
2726
|
step: 1,
|
|
2727
2727
|
value: s,
|
|
@@ -2774,42 +2774,42 @@ function ai() {
|
|
|
2774
2774
|
] })
|
|
2775
2775
|
] });
|
|
2776
2776
|
}
|
|
2777
|
-
const
|
|
2778
|
-
function
|
|
2777
|
+
const as = 8, cs = { ArrowLeft: -1, ArrowRight: 1, ArrowUp: -3, ArrowDown: 3 };
|
|
2778
|
+
function ai({ options: t, value: e, onChange: n, label: s = "Basemap", size: o, tooltipSide: d }) {
|
|
2779
2779
|
const [i, m] = q(!1), [c, y] = q(null), [f, h] = q(!1), u = B(null), x = B(null), w = Kr(), M = qr(), C = c !== null;
|
|
2780
2780
|
pe(() => {
|
|
2781
2781
|
var K, b;
|
|
2782
|
-
const
|
|
2783
|
-
if (!i || !
|
|
2784
|
-
const { width: g, height: N } = E.getBoundingClientRect(), P =
|
|
2785
|
-
y(
|
|
2782
|
+
const a = (b = (K = u.current) == null ? void 0 : K.querySelector("button")) == null ? void 0 : b.getBoundingClientRect(), E = x.current;
|
|
2783
|
+
if (!i || !a || !E) return;
|
|
2784
|
+
const { width: g, height: N } = E.getBoundingClientRect(), P = a.top + a.height / 2 > window.innerHeight / 2, z = a.left + a.width / 2 > window.innerWidth / 2;
|
|
2785
|
+
y(ln(z ? a.right : a.left, P ? a.top : a.bottom, g, N, {
|
|
2786
2786
|
x: z ? "before" : "after",
|
|
2787
2787
|
y: P ? "before" : "after",
|
|
2788
|
-
gapY:
|
|
2788
|
+
gapY: as
|
|
2789
2789
|
}));
|
|
2790
2790
|
}, [i, t.length]), $(() => {
|
|
2791
2791
|
var E;
|
|
2792
2792
|
if (!i || !C) return;
|
|
2793
|
-
const
|
|
2794
|
-
(E = (
|
|
2793
|
+
const a = x.current;
|
|
2794
|
+
(E = (a == null ? void 0 : a.querySelector('[aria-pressed="true"]')) ?? (a == null ? void 0 : a.querySelector("button"))) == null || E.focus();
|
|
2795
2795
|
}, [i, C]), $(() => {
|
|
2796
2796
|
if (!i) return;
|
|
2797
|
-
const
|
|
2797
|
+
const a = (E) => {
|
|
2798
2798
|
var g, N, P;
|
|
2799
2799
|
E.key === "Escape" && (E.stopImmediatePropagation(), E.preventDefault(), (g = x.current) != null && g.contains(document.activeElement) && ((P = (N = u.current) == null ? void 0 : N.querySelector("button")) == null || P.focus()), m(!1));
|
|
2800
2800
|
};
|
|
2801
|
-
return window.addEventListener("keydown",
|
|
2801
|
+
return window.addEventListener("keydown", a, { capture: !0 }), () => window.removeEventListener("keydown", a, { capture: !0 });
|
|
2802
2802
|
}, [i]);
|
|
2803
|
-
const
|
|
2804
|
-
const E = cs[
|
|
2803
|
+
const l = (a) => {
|
|
2804
|
+
const E = cs[a.key];
|
|
2805
2805
|
if (!E) return;
|
|
2806
|
-
const g = Array.from(
|
|
2807
|
-
N && (
|
|
2806
|
+
const g = Array.from(a.currentTarget.querySelectorAll("button")), N = g[g.indexOf(document.activeElement) + E];
|
|
2807
|
+
N && (a.preventDefault(), N.focus());
|
|
2808
2808
|
};
|
|
2809
2809
|
return /* @__PURE__ */ T("div", { ref: u, className: "contents", children: [
|
|
2810
2810
|
/* @__PURE__ */ r(Pe, { label: s, onClick: () => {
|
|
2811
|
-
var
|
|
2812
|
-
y(null), h(((E = (
|
|
2811
|
+
var a, E;
|
|
2812
|
+
y(null), h(((E = (a = u.current) == null ? void 0 : a.closest("[data-elm-theme]")) == null ? void 0 : E.getAttribute("data-elm-theme")) === "dark"), m((g) => !g);
|
|
2813
2813
|
}, active: i, expanded: i, controls: i ? w : void 0, size: o, tooltipSide: d, children: /* @__PURE__ */ r(Ye, { size: 24 }) }),
|
|
2814
2814
|
i && cr(
|
|
2815
2815
|
/* @__PURE__ */ r("div", { "data-elm-portal": !0, "data-elm-theme": f ? "dark" : "light", style: M, [Un]: "", children: /* @__PURE__ */ r(
|
|
@@ -2821,22 +2821,22 @@ function li({ options: t, value: e, onChange: n, label: s = "Basemap", size: o,
|
|
|
2821
2821
|
"aria-label": s,
|
|
2822
2822
|
className: "fixed z-[9999] w-80 max-h-[70vh] flex flex-col bg-elm-surface/95 backdrop-blur-md border border-elm-border/80 shadow-elm rounded-elm antialiased",
|
|
2823
2823
|
style: { left: (c == null ? void 0 : c.left) ?? 0, top: (c == null ? void 0 : c.top) ?? 0, visibility: c ? void 0 : "hidden" },
|
|
2824
|
-
children: /* @__PURE__ */ r("div", { className: "grid grid-cols-3 gap-2 p-2 overflow-y-auto", onKeyDown:
|
|
2825
|
-
const E =
|
|
2824
|
+
children: /* @__PURE__ */ r("div", { className: "grid grid-cols-3 gap-2 p-2 overflow-y-auto", onKeyDown: l, children: t.map((a) => {
|
|
2825
|
+
const E = a.id === e;
|
|
2826
2826
|
return /* @__PURE__ */ T(
|
|
2827
2827
|
"button",
|
|
2828
2828
|
{
|
|
2829
2829
|
type: "button",
|
|
2830
2830
|
"aria-pressed": E,
|
|
2831
|
-
"aria-label":
|
|
2832
|
-
onClick: () => n(
|
|
2831
|
+
"aria-label": a.label,
|
|
2832
|
+
onClick: () => n(a.id),
|
|
2833
2833
|
className: `flex flex-col rounded-elm-card border transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-400/60 ${E ? "border-primary-500 ring-2 ring-primary-400/40 bg-primary-50 hover:bg-primary-100 dark:bg-primary-950/40 dark:hover:bg-primary-950/60" : "border-elm-border hover:border-(--elm-border-strong,var(--color-gray-400)) dark:hover:border-(--elm-border-strong,var(--color-gray-500)) bg-elm-surface hover:bg-elm-surface-hover"}`,
|
|
2834
2834
|
children: [
|
|
2835
|
-
Array.isArray(
|
|
2836
|
-
/* @__PURE__ */ r("div", { className: `text-[11px] leading-4 tracking-tight text-center px-0.5 py-1 truncate font-medium ${E ? "text-primary-700 dark:text-primary-300" : "text-(--elm-text-secondary,var(--color-gray-700)) dark:text-(--elm-text-secondary,var(--color-gray-200))"}`, children:
|
|
2835
|
+
Array.isArray(a.thumbnail) ? /* @__PURE__ */ r("div", { className: "w-full h-12 flex rounded-t-elm-card overflow-hidden", children: a.thumbnail.map((g) => /* @__PURE__ */ r("img", { src: g, alt: "", className: "w-1/2 h-full object-cover", loading: "lazy", draggable: !1 }, g)) }) : a.thumbnail ? /* @__PURE__ */ r("img", { src: a.thumbnail, alt: "", className: "w-full h-12 object-cover rounded-t-elm-card", loading: "lazy", draggable: !1 }) : /* @__PURE__ */ r("div", { className: "w-full h-12 rounded-t-elm-card bg-elm-surface-hover flex items-center justify-center text-elm-text-subtle", children: /* @__PURE__ */ r(Ye, { size: 20 }) }),
|
|
2836
|
+
/* @__PURE__ */ r("div", { className: `text-[11px] leading-4 tracking-tight text-center px-0.5 py-1 truncate font-medium ${E ? "text-primary-700 dark:text-primary-300" : "text-(--elm-text-secondary,var(--color-gray-700)) dark:text-(--elm-text-secondary,var(--color-gray-200))"}`, children: a.label })
|
|
2837
2837
|
]
|
|
2838
2838
|
},
|
|
2839
|
-
|
|
2839
|
+
a.id
|
|
2840
2840
|
);
|
|
2841
2841
|
}) })
|
|
2842
2842
|
}
|
|
@@ -2935,13 +2935,13 @@ function ui(t) {
|
|
|
2935
2935
|
} finally {
|
|
2936
2936
|
u.current && y(!1);
|
|
2937
2937
|
}
|
|
2938
|
-
}, [o, s]),
|
|
2938
|
+
}, [o, s]), l = J((b) => {
|
|
2939
2939
|
var k, D;
|
|
2940
2940
|
d || (D = (k = b.dataTransfer) == null ? void 0 : k.types) != null && D.includes("Files") && (b.preventDefault(), b.stopPropagation(), f.current += 1, m(!0));
|
|
2941
2941
|
}, [d]), p = J((b) => {
|
|
2942
2942
|
var k, D;
|
|
2943
2943
|
d || (D = (k = b.dataTransfer) == null ? void 0 : k.types) != null && D.includes("Files") && (b.preventDefault(), b.stopPropagation(), b.dataTransfer.dropEffect = "copy");
|
|
2944
|
-
}, [d]),
|
|
2944
|
+
}, [d]), a = J((b) => {
|
|
2945
2945
|
d || (b.preventDefault(), b.stopPropagation(), f.current = Math.max(0, f.current - 1), f.current === 0 && m(!1));
|
|
2946
2946
|
}, [d]), E = J((b) => {
|
|
2947
2947
|
var D, R;
|
|
@@ -2960,11 +2960,11 @@ function ui(t) {
|
|
|
2960
2960
|
var b;
|
|
2961
2961
|
d || (b = h.current) == null || b.click();
|
|
2962
2962
|
}, [d]), z = J(() => ({
|
|
2963
|
-
onDragEnter:
|
|
2963
|
+
onDragEnter: l,
|
|
2964
2964
|
onDragOver: p,
|
|
2965
|
-
onDragLeave:
|
|
2965
|
+
onDragLeave: a,
|
|
2966
2966
|
onDrop: E
|
|
2967
|
-
}), [
|
|
2967
|
+
}), [l, p, a, E]), K = J(() => ({
|
|
2968
2968
|
type: "file",
|
|
2969
2969
|
accept: M,
|
|
2970
2970
|
style: { display: "none" },
|
|
@@ -2994,16 +2994,16 @@ function mi(t) {
|
|
|
2994
2994
|
f.current = o;
|
|
2995
2995
|
}, [o]);
|
|
2996
2996
|
const h = J(() => {
|
|
2997
|
-
var
|
|
2997
|
+
var l;
|
|
2998
2998
|
if (f.current) return null;
|
|
2999
2999
|
const C = d.current();
|
|
3000
|
-
return !C || !Array.isArray(C.features) || C.features.length === 0 ? ((
|
|
3000
|
+
return !C || !Array.isArray(C.features) || C.features.length === 0 ? ((l = m.current) == null || l.call(m, { kind: "empty" }), null) : C;
|
|
3001
3001
|
}, []), u = J((C) => {
|
|
3002
|
-
var
|
|
3002
|
+
var l;
|
|
3003
3003
|
try {
|
|
3004
3004
|
return JSON.stringify(C, null, y.current);
|
|
3005
3005
|
} catch (p) {
|
|
3006
|
-
return (
|
|
3006
|
+
return (l = m.current) == null || l.call(m, {
|
|
3007
3007
|
kind: "serialization-error",
|
|
3008
3008
|
cause: p instanceof Error ? p : new Error(String(p))
|
|
3009
3009
|
}), null;
|
|
@@ -3018,12 +3018,12 @@ function mi(t) {
|
|
|
3018
3018
|
return { exportToFile: J(() => {
|
|
3019
3019
|
const C = h();
|
|
3020
3020
|
if (!C) return null;
|
|
3021
|
-
const
|
|
3022
|
-
if (
|
|
3021
|
+
const l = u(C);
|
|
3022
|
+
if (l === null) return null;
|
|
3023
3023
|
const p = ps(C, c.current);
|
|
3024
|
-
return jt(
|
|
3024
|
+
return jt(l, p).then((a) => {
|
|
3025
3025
|
var E;
|
|
3026
|
-
|
|
3026
|
+
a && ((E = i.current) == null || E.call(i, C, a));
|
|
3027
3027
|
}), p;
|
|
3028
3028
|
}, [h, u]), exportToString: x, exportToBlob: w };
|
|
3029
3029
|
}
|
|
@@ -3087,16 +3087,16 @@ function fi({ config: t, accentColor: e, featureColor: n, onEvent: s, onError: o
|
|
|
3087
3087
|
);
|
|
3088
3088
|
return /* @__PURE__ */ r(hs, { onError: o, children: /* @__PURE__ */ r(Vr, { config: m, children: /* @__PURE__ */ r(Hn, { children: /* @__PURE__ */ r(_r, { children: /* @__PURE__ */ r(Gr, { onEvent: s, onError: o, toaster: d, children: /* @__PURE__ */ r(Ur, { children: i }) }) }) }) }) });
|
|
3089
3089
|
}
|
|
3090
|
-
const gs = fe(() => import("./GeoJSONModal-
|
|
3091
|
-
() => import("./ShortcutsModal-
|
|
3090
|
+
const gs = fe(() => import("./GeoJSONModal-BV9Tamf4.js")), ys = fe(() => import("./SchemaModal-DvMbWskS.js")), bs = fe(() => import("./FeatureEditModal-Dr10p3nE.js")), vs = fe(() => import("./DataTablePanel-DDFUmMaM.js")), xs = fe(() => import("./SettingsModal-BScVTjpn.js")), ws = fe(
|
|
3091
|
+
() => import("./ShortcutsModal-ozuS2Ysb.js").then((t) => ({ default: t.ShortcutsModal }))
|
|
3092
3092
|
);
|
|
3093
3093
|
it(gs, ys, bs, vs, xs, ws);
|
|
3094
|
-
const ks = fe(() => import("./BooleanOperations-
|
|
3094
|
+
const ks = fe(() => import("./BooleanOperations-BRO7NHUY.js"));
|
|
3095
3095
|
it(ks);
|
|
3096
3096
|
export {
|
|
3097
3097
|
ws as $,
|
|
3098
3098
|
Qs as A,
|
|
3099
|
-
|
|
3099
|
+
ai as B,
|
|
3100
3100
|
$o as C,
|
|
3101
3101
|
Jn as D,
|
|
3102
3102
|
Js as E,
|
|
@@ -3158,7 +3158,7 @@ export {
|
|
|
3158
3158
|
Qn as t,
|
|
3159
3159
|
Bs as u,
|
|
3160
3160
|
ks as v,
|
|
3161
|
-
|
|
3161
|
+
li as w,
|
|
3162
3162
|
Zo as x,
|
|
3163
3163
|
vs as y,
|
|
3164
3164
|
hs as z
|