@carto/ps-react-ui 3.0.0 → 4.0.0-canary.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/LICENSE.md +29 -0
- package/README.md +16 -13
- package/dist/components.js +1397 -0
- package/dist/components.js.map +1 -0
- package/dist/types/common/common.d.ts +3 -0
- package/dist/types/common/index.d.ts +25 -0
- package/dist/types/common/lasso-tools.d.ts +33 -0
- package/dist/types/common/measurement-tools.d.ts +66 -0
- package/dist/types/components/geolocation-controls/const.d.ts +5 -0
- package/dist/types/components/geolocation-controls/geolocation-controls.d.ts +3 -0
- package/dist/types/components/geolocation-controls/types.d.ts +16 -0
- package/dist/types/components/index.d.ts +16 -5
- package/dist/types/components/lasso-tool/chip.d.ts +6 -0
- package/dist/types/components/lasso-tool/const.d.ts +5 -0
- package/dist/types/components/lasso-tool/icons.d.ts +6 -0
- package/dist/types/components/lasso-tool/lasso-tool-inline.d.ts +3 -0
- package/dist/types/components/lasso-tool/lasso-tool.d.ts +3 -0
- package/dist/types/components/lasso-tool/styles.d.ts +132 -0
- package/dist/types/components/lasso-tool/types.d.ts +69 -0
- package/dist/types/components/list-data/list-data.d.ts +3 -0
- package/dist/types/components/list-data/styles.d.ts +37 -0
- package/dist/types/components/list-data/types.d.ts +16 -14
- package/dist/types/components/measurement-tools/const.d.ts +5 -0
- package/dist/types/components/measurement-tools/icons.d.ts +4 -0
- package/dist/types/components/measurement-tools/measurement-tools.d.ts +3 -0
- package/dist/types/components/measurement-tools/types.d.ts +61 -0
- package/dist/types/components/types.d.ts +1 -0
- package/dist/types/components/zoom-controls/styles.d.ts +25 -0
- package/dist/types/components/zoom-controls/types.d.ts +17 -0
- package/dist/types/components/zoom-controls/zoom-controls.d.ts +3 -0
- package/dist/types/widgets/index.d.ts +1 -0
- package/dist/widgets.js +2 -0
- package/dist/widgets.js.map +1 -0
- package/package.json +50 -40
- package/dist/index.cjs +0 -30
- package/dist/index.js +0 -956
- package/dist/types/common-stories/maps/deckgl-maps.component.d.ts +0 -2
- package/dist/types/common-stories/maps/google-maps.component.d.ts +0 -3
- package/dist/types/common-stories/maps/map-container.component.d.ts +0 -4
- package/dist/types/common-stories/maps/map.component.d.ts +0 -2
- package/dist/types/components/list-data/index.d.ts +0 -2
- package/dist/types/components/list-data/list-data.component.d.ts +0 -37
- package/dist/types/components/list-data/list-data.styles.d.ts +0 -6
- package/dist/types/components/map-measurement-tool-ui/index.d.ts +0 -1
- package/dist/types/components/map-measurement-tool-ui/map-measurement-tool-ui.component.d.ts +0 -4
- package/dist/types/components/map-measurement-tool-ui/map-measurement-tool-ui.styles.d.ts +0 -25
- package/dist/types/components/scroll-to-anchor/index.d.ts +0 -2
- package/dist/types/components/scroll-to-anchor/scroll-to-anchor.component.d.ts +0 -34
- package/dist/types/components/scroll-to-anchor/scroll-to-anchor.styles.d.ts +0 -13
- package/dist/types/components/scroll-to-anchor/types.d.ts +0 -10
- package/dist/types/components/section-container/index.d.ts +0 -2
- package/dist/types/components/section-container/section-container.component.d.ts +0 -28
- package/dist/types/components/section-container/section-container.styles.d.ts +0 -22
- package/dist/types/components/section-container/types.d.ts +0 -10
- package/dist/types/components/tabs-to-anchor/index.d.ts +0 -2
- package/dist/types/components/tabs-to-anchor/tabs-to-anchor.component.d.ts +0 -25
- package/dist/types/components/tabs-to-anchor/tabs-to-anchor.styles.d.ts +0 -23
- package/dist/types/components/tabs-to-anchor/types.d.ts +0 -9
- package/dist/types/index.d.ts +0 -2
- package/dist/types/utils/create-select-options-from-array.utils.d.ts +0 -5
- package/dist/types/utils/index.d.ts +0 -1
@@ -0,0 +1,1397 @@
|
|
1
|
+
import { jsx as l, jsxs as _, Fragment as P } from "react/jsx-runtime";
|
2
|
+
import { c as I } from "react/compiler-runtime";
|
3
|
+
import { alpha as Re, Chip as ze, Tooltip as re, Paper as we, Divider as Y, Box as ee, IconButton as Q, Menu as Ie, MenuItem as ce, ListItemIcon as Ze, SvgIcon as Me, ListItemText as ae, ToggleButton as se, Typography as H, ToggleButtonGroup as ke, Button as ye, Dialog as He, DialogTitle as Ne, DialogContent as Xe, FormControl as We, RadioGroup as Ke, FormControlLabel as Ye, Radio as qe, DialogActions as Je, CircularProgress as Qe, ListItem as et, List as tt } from "@mui/material";
|
4
|
+
import ot from "@mui/icons-material/ArrowDropDown";
|
5
|
+
import it from "@mui/icons-material/MoreVertOutlined";
|
6
|
+
import { useMemo as Ce, useState as ne, useRef as nt, useEffect as lt } from "react";
|
7
|
+
import { Close as rt, ArrowDropDown as ct, MyLocationOutlined as at, LocationDisabledOutlined as st, CropFreeOutlined as dt, AddOutlined as ut, RemoveOutlined as mt } from "@mui/icons-material";
|
8
|
+
const G = {
|
9
|
+
container: {
|
10
|
+
display: "flex",
|
11
|
+
flexDirection: "row",
|
12
|
+
alignItems: "center",
|
13
|
+
justifyContent: "flex-start",
|
14
|
+
overflow: "hidden",
|
15
|
+
"&.inline": {
|
16
|
+
flexDirection: "column",
|
17
|
+
alignItems: "flex-start",
|
18
|
+
gap: ({
|
19
|
+
spacing: t
|
20
|
+
}) => t(1)
|
21
|
+
}
|
22
|
+
},
|
23
|
+
actions: {
|
24
|
+
icon: {
|
25
|
+
width: ({
|
26
|
+
spacing: t
|
27
|
+
}) => t(4),
|
28
|
+
height: ({
|
29
|
+
spacing: t
|
30
|
+
}) => t(4),
|
31
|
+
borderRadius: 0,
|
32
|
+
".MuiTouchRipple-ripple .MuiTouchRipple-child": {
|
33
|
+
borderRadius: 0
|
34
|
+
}
|
35
|
+
}
|
36
|
+
},
|
37
|
+
options: {
|
38
|
+
menu: {
|
39
|
+
paddingTop: ({
|
40
|
+
spacing: t
|
41
|
+
}) => t(1),
|
42
|
+
"&.inline": {
|
43
|
+
boxShadow: "none",
|
44
|
+
backgroundColor: "transparent",
|
45
|
+
borderRadius: ({
|
46
|
+
spacing: t
|
47
|
+
}) => t(0.5),
|
48
|
+
"& .MuiDivider-root": {
|
49
|
+
height: ({
|
50
|
+
spacing: t
|
51
|
+
}) => t(4),
|
52
|
+
"&.MuiToggleButtonGroup-groupedHorizontal": {
|
53
|
+
height: ({
|
54
|
+
spacing: t
|
55
|
+
}) => t(4)
|
56
|
+
},
|
57
|
+
"&.MuiToggleButtonGroup-groupedVertical": {
|
58
|
+
height: "auto",
|
59
|
+
width: ({
|
60
|
+
spacing: t
|
61
|
+
}) => t(4),
|
62
|
+
margin: ({
|
63
|
+
spacing: t
|
64
|
+
}) => `${t(0.5, 0, 1)} !important`,
|
65
|
+
borderRadius: "0 !important"
|
66
|
+
}
|
67
|
+
},
|
68
|
+
"& .MuiToggleButton-sizeSmall": {
|
69
|
+
margin: 0,
|
70
|
+
"&.MuiToggleButtonGroup-grouped:not(.MuiDivider-root)": {
|
71
|
+
margin: 0
|
72
|
+
},
|
73
|
+
"& + .MuiDivider-root.MuiToggleButtonGroup-groupedHorizontal": {
|
74
|
+
height: ({
|
75
|
+
spacing: t
|
76
|
+
}) => t(3)
|
77
|
+
},
|
78
|
+
"& + .MuiDivider-root.MuiToggleButtonGroup-groupedVertical": {
|
79
|
+
height: "auto",
|
80
|
+
width: ({
|
81
|
+
spacing: t
|
82
|
+
}) => t(3)
|
83
|
+
}
|
84
|
+
},
|
85
|
+
".MuiToggleButtonGroup-grouped:not(.MuiDivider-root)": {
|
86
|
+
margin: 0,
|
87
|
+
"&:first-of-type": {
|
88
|
+
marginLeft: 0
|
89
|
+
},
|
90
|
+
"&:not(:last-of-type)": {
|
91
|
+
marginRight: ({
|
92
|
+
spacing: t
|
93
|
+
}) => t(0.5)
|
94
|
+
}
|
95
|
+
},
|
96
|
+
"&.MuiToggleButtonGroup-horizontal:not(.MuiDivider-root)": {
|
97
|
+
".MuiToggleButtonGroup-grouped": {
|
98
|
+
margin: ({
|
99
|
+
spacing: t
|
100
|
+
}) => t(0, 0.5)
|
101
|
+
}
|
102
|
+
},
|
103
|
+
"&.MuiToggleButtonGroup-vertical:not(.MuiDivider-root)": {
|
104
|
+
".MuiToggleButtonGroup-grouped": {
|
105
|
+
margin: ({
|
106
|
+
spacing: t
|
107
|
+
}) => t(0, 0, 0.5),
|
108
|
+
"&:not(:last-of-type)": {
|
109
|
+
marginRight: 0
|
110
|
+
},
|
111
|
+
"&:last-of-type": {
|
112
|
+
marginBottom: 0
|
113
|
+
}
|
114
|
+
}
|
115
|
+
}
|
116
|
+
}
|
117
|
+
},
|
118
|
+
icon: {
|
119
|
+
borderRadius: 0,
|
120
|
+
width: ({
|
121
|
+
spacing: t
|
122
|
+
}) => t(3)
|
123
|
+
},
|
124
|
+
title: {
|
125
|
+
paddingX: ({
|
126
|
+
spacing: t
|
127
|
+
}) => t(2),
|
128
|
+
paddingBottom: ({
|
129
|
+
spacing: t
|
130
|
+
}) => t(0.5),
|
131
|
+
"&.inline": {
|
132
|
+
paddingX: 0,
|
133
|
+
paddingBottom: 0
|
134
|
+
}
|
135
|
+
},
|
136
|
+
icons: {
|
137
|
+
color: ({
|
138
|
+
palette: t
|
139
|
+
}) => t.text.primary
|
140
|
+
},
|
141
|
+
tag: {
|
142
|
+
borderRadius: ({
|
143
|
+
spacing: t
|
144
|
+
}) => t(0.25),
|
145
|
+
border: "1px solid",
|
146
|
+
borderColor: ({
|
147
|
+
palette: t
|
148
|
+
}) => t.primary.main,
|
149
|
+
paddingX: ({
|
150
|
+
spacing: t
|
151
|
+
}) => t(0.5),
|
152
|
+
color: ({
|
153
|
+
palette: t
|
154
|
+
}) => t.primary.main,
|
155
|
+
backgroundColor: ({
|
156
|
+
palette: t
|
157
|
+
}) => Re(t.primary.main, 0.08)
|
158
|
+
},
|
159
|
+
more: {
|
160
|
+
width: ({
|
161
|
+
spacing: t
|
162
|
+
}) => t(4)
|
163
|
+
}
|
164
|
+
},
|
165
|
+
chip: {
|
166
|
+
container: {
|
167
|
+
display: "flex",
|
168
|
+
flexDirection: "row",
|
169
|
+
alignItems: "center",
|
170
|
+
gap: ({
|
171
|
+
spacing: t
|
172
|
+
}) => t(0.5),
|
173
|
+
overflowX: "auto",
|
174
|
+
scrollbarWidth: "none",
|
175
|
+
paddingX: ({
|
176
|
+
spacing: t
|
177
|
+
}) => t(1),
|
178
|
+
"&.inline": {
|
179
|
+
overflowX: "visible",
|
180
|
+
flexWrap: "wrap"
|
181
|
+
}
|
182
|
+
},
|
183
|
+
chip: {
|
184
|
+
marginRight: ({
|
185
|
+
spacing: t
|
186
|
+
}) => t(0.5)
|
187
|
+
},
|
188
|
+
disabled: {
|
189
|
+
opacity: ({
|
190
|
+
palette: t
|
191
|
+
}) => t.action.disabledOpacity
|
192
|
+
}
|
193
|
+
}
|
194
|
+
};
|
195
|
+
function ht(t) {
|
196
|
+
const e = I(3);
|
197
|
+
let i;
|
198
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ l("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4 18a2 2 0 1 1 0 4 2 2 0 0 1 0-4Zm16 0a2 2 0 1 1 0 4 2 2 0 0 1 0-4Zm-2.829 1a2.996 2.996 0 0 0 0 2H6.829a2.995 2.995 0 0 0 0-2h10.342Zm-2.463-5.707 3.998 4a3.013 3.013 0 0 0-1.414 1.414l-4-3.999a3.014 3.014 0 0 0 1.31-1.214l.106-.201ZM2.998 6.829a2.995 2.995 0 0 0 2.002 0v10.342a2.993 2.993 0 0 0-2.002 0V6.83ZM12 10a2 2 0 1 1 0 4 2 2 0 0 1 0-4Zm1.84-3.919c.464.483 1.09.81 1.79.896l-1.47 2.94a2.992 2.992 0 0 0-1.79-.894l1.47-2.942ZM16 2a2 2 0 1 1 0 4 2 2 0 0 1 0-4ZM4 2a2 2 0 1 1 0 4 2 2 0 0 1 0-4Zm9.171.998a2.994 2.994 0 0 0 0 2.002H6.829a2.995 2.995 0 0 0 0-2.002h6.342Z", fill: "currentColor" }), e[0] = i) : i = e[0];
|
199
|
+
let o;
|
200
|
+
return e[1] !== t ? (o = /* @__PURE__ */ l("svg", { fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...t, children: i }), e[1] = t, e[2] = o) : o = e[2], o;
|
201
|
+
}
|
202
|
+
function ft(t) {
|
203
|
+
const e = I(3);
|
204
|
+
let i;
|
205
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ l("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4 18a2 2 0 1 1 0 4 2 2 0 0 1 0-4Zm16 0a2 2 0 1 1 0 4 2 2 0 0 1 0-4Zm-2.829 1a2.993 2.993 0 0 0-.17.974l-.001.052.007.183a3 3 0 0 0 .164.79H6.829a2.995 2.995 0 0 0 0-2h10.342ZM2.998 6.828a2.995 2.995 0 0 0 2.002 0V17.17a2.993 2.993 0 0 0-2.002 0V6.83Zm16.001 0a2.995 2.995 0 0 0 2 0V17.17a2.993 2.993 0 0 0-2 0V6.829ZM20 2a2 2 0 1 1 0 4 2 2 0 0 1 0-4ZM4 2a2 2 0 1 1 0 4 2 2 0 0 1 0-4Zm13.171.998a2.991 2.991 0 0 0-.17.976L17 4.026l.007.183a3 3 0 0 0 .164.79H6.829a2.995 2.995 0 0 0 0-2H17.17Z", fill: "currentColor" }), e[0] = i) : i = e[0];
|
206
|
+
let o;
|
207
|
+
return e[1] !== t ? (o = /* @__PURE__ */ l("svg", { fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...t, children: i }), e[1] = t, e[2] = o) : o = e[2], o;
|
208
|
+
}
|
209
|
+
function pt(t) {
|
210
|
+
const e = I(3);
|
211
|
+
let i;
|
212
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ l("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2Zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm0 6a2 2 0 1 1 0 4 2 2 0 0 1 0-4Z", fill: "currentColor" }), e[0] = i) : i = e[0];
|
213
|
+
let o;
|
214
|
+
return e[1] !== t ? (o = /* @__PURE__ */ l("svg", { fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...t, children: i }), e[1] = t, e[2] = o) : o = e[2], o;
|
215
|
+
}
|
216
|
+
function gt(t) {
|
217
|
+
const e = I(3);
|
218
|
+
let i;
|
219
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ l("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12 3c4.935 0 9 3.736 9 9l-.002.343-.012.668c-.012.438-.033.86-.062 1.266l-.05.597C20.498 18.767 19.267 21 17 21c-1.192 0-1.971-.341-2.988-1.122l-.472-.375c-.401-.319-.64-.473-.888-.566a4.938 4.938 0 0 0-.415-.13l-.34-.085-.398-.086-.456-.086-.66-.111-1.708-.273a9.112 9.112 0 0 1-.952-.206C5.46 17.301 3 14.954 3 12.015c0-1.508.485-2.995 1.436-4.458.355.585.906 1.04 1.562 1.272C5.328 9.916 5 10.977 5 12.015c0 1.889 1.78 3.588 3.282 4.025l.085.023.345.076.517.092 1.619.257.583.1.518.098.237.05.433.103c.272.07.512.143.73.224.434.161.783.373 1.235.718l.457.362c.806.646 1.24.857 1.959.857.893 0 1.63-1.518 1.895-4.45l.045-.585c.013-.2.024-.407.033-.62l.02-.655c.005-.224.007-.454.007-.69 0-4.12-3.133-7-7-7a1 1 0 1 1 0-2ZM7 4a2 2 0 1 1 0 4 2 2 0 0 1 0-4Z", fill: "currentColor" }), e[0] = i) : i = e[0];
|
220
|
+
let o;
|
221
|
+
return e[1] !== t ? (o = /* @__PURE__ */ l("svg", { fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...t, children: i }), e[1] = t, e[2] = o) : o = e[2], o;
|
222
|
+
}
|
223
|
+
function vt(t) {
|
224
|
+
const e = I(3);
|
225
|
+
let i;
|
226
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ l("path", { fillRule: "evenodd", clipRule: "evenodd", d: "m10.083 19.394.057.113a1 1 0 0 0 1.72.007l2.869-4.786 4.786-2.87a1 1 0 0 0-.121-1.777l-14-6c-.83-.356-1.669.483-1.313 1.313l6.002 14ZM6.905 6.904l9.903 4.244-3.322 1.995-.102.069a1 1 0 0 0-.242.274l-1.992 3.321-4.245-9.903Z", fill: "currentColor" }), e[0] = i) : i = e[0];
|
227
|
+
let o;
|
228
|
+
return e[1] !== t ? (o = /* @__PURE__ */ l("svg", { fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...t, children: i }), e[1] = t, e[2] = o) : o = e[2], o;
|
229
|
+
}
|
230
|
+
const E = {
|
231
|
+
action: {
|
232
|
+
tooltip: {
|
233
|
+
active: "Click on the map to trace the line you want to measure",
|
234
|
+
inactive: "Click on the map to trace the line you want to measure"
|
235
|
+
}
|
236
|
+
},
|
237
|
+
chip: {
|
238
|
+
tooltip: {
|
239
|
+
active: "Hide measure",
|
240
|
+
inactive: "Show measure"
|
241
|
+
}
|
242
|
+
},
|
243
|
+
options: {
|
244
|
+
mode: {
|
245
|
+
title: "Choose a drawing tool",
|
246
|
+
options: {
|
247
|
+
circle: "Circle",
|
248
|
+
lasso: "Lasso tool",
|
249
|
+
polygon: "Polygon",
|
250
|
+
rectangle: "Rectangle",
|
251
|
+
edit: "Edit feature"
|
252
|
+
}
|
253
|
+
}
|
254
|
+
},
|
255
|
+
noData: {
|
256
|
+
title: "Spatial filter not applied",
|
257
|
+
description: "Select a drawing or editing tool and click on the map to define your spatial filter"
|
258
|
+
},
|
259
|
+
actions: {
|
260
|
+
toggleAll: {
|
261
|
+
active: "Hide all",
|
262
|
+
inactive: "Show all"
|
263
|
+
},
|
264
|
+
deleteAll: "Remove all"
|
265
|
+
}
|
266
|
+
}, to = {
|
267
|
+
polygon: {
|
268
|
+
icon: ht
|
269
|
+
},
|
270
|
+
rectangle: {
|
271
|
+
icon: ft
|
272
|
+
},
|
273
|
+
circle: {
|
274
|
+
icon: pt
|
275
|
+
},
|
276
|
+
lasso: {
|
277
|
+
icon: gt
|
278
|
+
},
|
279
|
+
edit: {
|
280
|
+
icon: vt
|
281
|
+
}
|
282
|
+
};
|
283
|
+
function yt(t) {
|
284
|
+
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
285
|
+
}
|
286
|
+
var wt = function(e) {
|
287
|
+
return xt(e) && !bt(e);
|
288
|
+
};
|
289
|
+
function xt(t) {
|
290
|
+
return !!t && typeof t == "object";
|
291
|
+
}
|
292
|
+
function bt(t) {
|
293
|
+
var e = Object.prototype.toString.call(t);
|
294
|
+
return e === "[object RegExp]" || e === "[object Date]" || Tt(t);
|
295
|
+
}
|
296
|
+
var Mt = typeof Symbol == "function" && Symbol.for, Ct = Mt ? Symbol.for("react.element") : 60103;
|
297
|
+
function Tt(t) {
|
298
|
+
return t.$$typeof === Ct;
|
299
|
+
}
|
300
|
+
function St(t) {
|
301
|
+
return Array.isArray(t) ? [] : {};
|
302
|
+
}
|
303
|
+
function de(t, e) {
|
304
|
+
return e.clone !== !1 && e.isMergeableObject(t) ? le(St(t), t, e) : t;
|
305
|
+
}
|
306
|
+
function At(t, e, i) {
|
307
|
+
return t.concat(e).map(function(o) {
|
308
|
+
return de(o, i);
|
309
|
+
});
|
310
|
+
}
|
311
|
+
function _t(t, e) {
|
312
|
+
if (!e.customMerge)
|
313
|
+
return le;
|
314
|
+
var i = e.customMerge(t);
|
315
|
+
return typeof i == "function" ? i : le;
|
316
|
+
}
|
317
|
+
function Dt(t) {
|
318
|
+
return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(t).filter(function(e) {
|
319
|
+
return Object.propertyIsEnumerable.call(t, e);
|
320
|
+
}) : [];
|
321
|
+
}
|
322
|
+
function De(t) {
|
323
|
+
return Object.keys(t).concat(Dt(t));
|
324
|
+
}
|
325
|
+
function Be(t, e) {
|
326
|
+
try {
|
327
|
+
return e in t;
|
328
|
+
} catch {
|
329
|
+
return !1;
|
330
|
+
}
|
331
|
+
}
|
332
|
+
function Lt(t, e) {
|
333
|
+
return Be(t, e) && !(Object.hasOwnProperty.call(t, e) && Object.propertyIsEnumerable.call(t, e));
|
334
|
+
}
|
335
|
+
function Ot(t, e, i) {
|
336
|
+
var o = {};
|
337
|
+
return i.isMergeableObject(t) && De(t).forEach(function(n) {
|
338
|
+
o[n] = de(t[n], i);
|
339
|
+
}), De(e).forEach(function(n) {
|
340
|
+
Lt(t, n) || (Be(t, n) && i.isMergeableObject(e[n]) ? o[n] = _t(n, i)(t[n], e[n], i) : o[n] = de(e[n], i));
|
341
|
+
}), o;
|
342
|
+
}
|
343
|
+
function le(t, e, i) {
|
344
|
+
i = i || {}, i.arrayMerge = i.arrayMerge || At, i.isMergeableObject = i.isMergeableObject || wt, i.cloneUnlessOtherwiseSpecified = de;
|
345
|
+
var o = Array.isArray(e), n = Array.isArray(t), a = o === n;
|
346
|
+
return a ? o ? i.arrayMerge(t, e, i) : Ot(t, e, i) : de(e, i);
|
347
|
+
}
|
348
|
+
le.all = function(e, i) {
|
349
|
+
if (!Array.isArray(e))
|
350
|
+
throw new Error("first argument should be an array");
|
351
|
+
return e.reduce(function(o, n) {
|
352
|
+
return le(o, n, i);
|
353
|
+
}, {});
|
354
|
+
};
|
355
|
+
var Rt = le, It = Rt;
|
356
|
+
const Te = /* @__PURE__ */ yt(It);
|
357
|
+
function Pe(t) {
|
358
|
+
var b;
|
359
|
+
const e = I(18), {
|
360
|
+
chipProps: i,
|
361
|
+
value: o,
|
362
|
+
labels: n,
|
363
|
+
onChipToggle: a,
|
364
|
+
onDelete: r
|
365
|
+
} = t, s = o.visible ? "active" : "inactive", c = ((b = n == null ? void 0 : n.tooltip) == null ? void 0 : b[s]) ?? E.chip.tooltip[s], u = i == null ? void 0 : i.TooltipProps;
|
366
|
+
let d;
|
367
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (d = {
|
368
|
+
...G.chip.chip
|
369
|
+
}, e[0] = d) : d = e[0];
|
370
|
+
const m = o.visible ? "secondary" : "default";
|
371
|
+
let f;
|
372
|
+
e[1] !== r || e[2] !== o.id ? (f = () => r(o.id), e[1] = r, e[2] = o.id, e[3] = f) : f = e[3];
|
373
|
+
let h;
|
374
|
+
e[4] !== a || e[5] !== o.id || e[6] !== o.visible ? (h = () => a(o.id, !o.visible), e[4] = a, e[5] = o.id, e[6] = o.visible, e[7] = h) : h = e[7];
|
375
|
+
const M = i == null ? void 0 : i.ChipsProps;
|
376
|
+
let g;
|
377
|
+
e[8] !== m || e[9] !== f || e[10] !== h || e[11] !== M || e[12] !== o.label ? (g = /* @__PURE__ */ l(ze, { sx: d, color: m, size: "small", onDelete: f, label: o.label, onClick: h, ...M }), e[8] = m, e[9] = f, e[10] = h, e[11] = M, e[12] = o.label, e[13] = g) : g = e[13];
|
378
|
+
let w;
|
379
|
+
return e[14] !== c || e[15] !== u || e[16] !== g ? (w = /* @__PURE__ */ l(re, { title: c, placement: "bottom", ...u, children: g }), e[14] = c, e[15] = u, e[16] = g, e[17] = w) : w = e[17], w;
|
380
|
+
}
|
381
|
+
function oo({
|
382
|
+
enabled: t,
|
383
|
+
values: e = [],
|
384
|
+
actionProps: i,
|
385
|
+
chipProps: o,
|
386
|
+
labels: n,
|
387
|
+
modes: a,
|
388
|
+
modesMapping: r,
|
389
|
+
modeSelected: s,
|
390
|
+
PaperProps: {
|
391
|
+
sx: c,
|
392
|
+
...u
|
393
|
+
} = {},
|
394
|
+
onActionToggle: d,
|
395
|
+
onChipToggle: m,
|
396
|
+
onDelete: f,
|
397
|
+
onChangeMode: h,
|
398
|
+
onAllChipToggle: M,
|
399
|
+
onAllDelete: g
|
400
|
+
}) {
|
401
|
+
const w = Ce(() => Te(a, r), [a, r]), {
|
402
|
+
edit: b,
|
403
|
+
...C
|
404
|
+
} = w, D = (v) => (d(!1), f(v)), S = (v) => d(v), A = (v) => h == null ? void 0 : h(v), y = (s ?? "") in a ? s : Object.keys(w)[0], p = w[y], x = Object.values(C);
|
405
|
+
return /* @__PURE__ */ _(we, { sx: {
|
406
|
+
...G.container,
|
407
|
+
...c
|
408
|
+
}, ...u, children: [
|
409
|
+
/* @__PURE__ */ l(Zt, { actionProps: i, labels: n == null ? void 0 : n.action, enabled: t, onActionToggle: S, children: (p == null ? void 0 : p.icon) && /* @__PURE__ */ l(p.icon, {}) }),
|
410
|
+
/* @__PURE__ */ l(je, { children: (v) => /* @__PURE__ */ _(P, { children: [
|
411
|
+
/* @__PURE__ */ l(kt, { data: x, labels: n == null ? void 0 : n.options, children: /* @__PURE__ */ l(Le, { ...v, labels: n == null ? void 0 : n.options, data: x, modeSelected: y, onChangeMode: A }) }),
|
412
|
+
!!b && /* @__PURE__ */ _(P, { children: [
|
413
|
+
/* @__PURE__ */ l(Y, {}),
|
414
|
+
/* @__PURE__ */ l(Le, { ...v, labels: n == null ? void 0 : n.options, data: [{
|
415
|
+
...b,
|
416
|
+
disabled: !e.length
|
417
|
+
}], modeSelected: y, onChangeMode: A })
|
418
|
+
] })
|
419
|
+
] }) }),
|
420
|
+
!!e.length && /* @__PURE__ */ l(ee, { sx: G.chip.container, children: e.map((v) => /* @__PURE__ */ l(Pe, { value: v, labels: n == null ? void 0 : n.chip, chipProps: o, onDelete: D, onChipToggle: m }, v.id)) }),
|
421
|
+
/* @__PURE__ */ l(Bt, { values: e, labels: n == null ? void 0 : n.actions, onAllChipToggle: M, onAllDelete: g })
|
422
|
+
] });
|
423
|
+
}
|
424
|
+
function Zt(t) {
|
425
|
+
var h;
|
426
|
+
const e = I(12), {
|
427
|
+
actionProps: i,
|
428
|
+
labels: o,
|
429
|
+
enabled: n,
|
430
|
+
children: a,
|
431
|
+
onActionToggle: r
|
432
|
+
} = t, s = n ? "active" : "inactive", c = ((h = o == null ? void 0 : o.tooltip) == null ? void 0 : h[s]) ?? E.action.tooltip[s], u = i == null ? void 0 : i.TooltipProps;
|
433
|
+
let d;
|
434
|
+
e[0] !== n || e[1] !== r ? (d = () => r(!n), e[0] = n, e[1] = r, e[2] = d) : d = e[2];
|
435
|
+
let m;
|
436
|
+
e[3] !== c || e[4] !== a || e[5] !== n || e[6] !== d ? (m = /* @__PURE__ */ l(se, { value: "toggle", sx: G.actions.icon, onClick: d, "aria-label": c, selected: n, children: a }), e[3] = c, e[4] = a, e[5] = n, e[6] = d, e[7] = m) : m = e[7];
|
437
|
+
let f;
|
438
|
+
return e[8] !== c || e[9] !== u || e[10] !== m ? (f = /* @__PURE__ */ l(re, { title: c, placement: "right", ...u, children: m }), e[8] = c, e[9] = u, e[10] = m, e[11] = f) : f = e[11], f;
|
439
|
+
}
|
440
|
+
function je({
|
441
|
+
TriggerProps: {
|
442
|
+
Icon: t = /* @__PURE__ */ l(ot, {}),
|
443
|
+
sx: e
|
444
|
+
} = {},
|
445
|
+
MenuProps: i,
|
446
|
+
children: o
|
447
|
+
}) {
|
448
|
+
const [n, a] = ne(null), r = !!n, s = (u) => {
|
449
|
+
a(u.currentTarget);
|
450
|
+
}, c = () => {
|
451
|
+
a(null);
|
452
|
+
};
|
453
|
+
return /* @__PURE__ */ _(P, { children: [
|
454
|
+
/* @__PURE__ */ l(Q, { sx: {
|
455
|
+
...G.options.icon,
|
456
|
+
...e
|
457
|
+
}, onClick: s, children: t }),
|
458
|
+
/* @__PURE__ */ l(Ie, { id: "lasso-menu", anchorEl: n, open: r, onClose: c, MenuListProps: {
|
459
|
+
"aria-labelledby": "lasso-button",
|
460
|
+
sx: G.options.menu
|
461
|
+
}, ...i, children: /* @__PURE__ */ l("div", { children: o({
|
462
|
+
onClose: c
|
463
|
+
}) }) })
|
464
|
+
] });
|
465
|
+
}
|
466
|
+
function kt(t) {
|
467
|
+
var c;
|
468
|
+
const e = I(5), {
|
469
|
+
data: i,
|
470
|
+
labels: o,
|
471
|
+
children: n
|
472
|
+
} = t;
|
473
|
+
if (i.length <= 1)
|
474
|
+
return null;
|
475
|
+
const a = ((c = o == null ? void 0 : o.mode) == null ? void 0 : c.title) ?? E.options.mode.title;
|
476
|
+
let r;
|
477
|
+
e[0] !== a ? (r = /* @__PURE__ */ l(H, { variant: "subtitle2", color: "text.secondary", sx: G.options.title, children: a }), e[0] = a, e[1] = r) : r = e[1];
|
478
|
+
let s;
|
479
|
+
return e[2] !== n || e[3] !== r ? (s = /* @__PURE__ */ _(P, { children: [
|
480
|
+
r,
|
481
|
+
n
|
482
|
+
] }), e[2] = n, e[3] = r, e[4] = s) : s = e[4], s;
|
483
|
+
}
|
484
|
+
function Le({
|
485
|
+
data: t,
|
486
|
+
modeSelected: e,
|
487
|
+
labels: i,
|
488
|
+
onChangeMode: o,
|
489
|
+
onClose: n
|
490
|
+
}) {
|
491
|
+
const a = (r, s) => {
|
492
|
+
r.preventDefault(), o == null || o(s), n();
|
493
|
+
};
|
494
|
+
return t.map((r) => {
|
495
|
+
var u;
|
496
|
+
const c = (((u = i == null ? void 0 : i.mode) == null ? void 0 : u.options) ?? E.options.mode.options)[r.value];
|
497
|
+
return /* @__PURE__ */ _(ce, { disabled: !!r.disabled, onClick: (d) => a(d, r.value), selected: r.value === e, children: [
|
498
|
+
/* @__PURE__ */ l(Ze, { sx: G.options.icons, children: /* @__PURE__ */ l(Me, { children: /* @__PURE__ */ l(r.icon, {}) }) }),
|
499
|
+
/* @__PURE__ */ l(ae, { children: c })
|
500
|
+
] }, r.value);
|
501
|
+
});
|
502
|
+
}
|
503
|
+
function Bt(t) {
|
504
|
+
var h, M;
|
505
|
+
const e = I(8), {
|
506
|
+
values: i,
|
507
|
+
labels: o,
|
508
|
+
onAllChipToggle: n,
|
509
|
+
onAllDelete: a
|
510
|
+
} = t;
|
511
|
+
if (i.length <= 1)
|
512
|
+
return null;
|
513
|
+
const s = i.some(Pt) ? ((h = o == null ? void 0 : o.toggleAll) == null ? void 0 : h.active) ?? E.actions.toggleAll.active : ((M = o == null ? void 0 : o.toggleAll) == null ? void 0 : M.inactive) ?? E.actions.toggleAll.inactive, c = (o == null ? void 0 : o.deleteAll) ?? E.actions.deleteAll;
|
514
|
+
let u;
|
515
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ l(Y, { orientation: "vertical", flexItem: !0 }), e[0] = u) : u = e[0];
|
516
|
+
let d, m;
|
517
|
+
e[1] === Symbol.for("react.memo_cache_sentinel") ? (d = {
|
518
|
+
Icon: /* @__PURE__ */ l(it, {}),
|
519
|
+
sx: G.options.more
|
520
|
+
}, m = {
|
521
|
+
anchorOrigin: {
|
522
|
+
vertical: "bottom",
|
523
|
+
horizontal: "right"
|
524
|
+
},
|
525
|
+
transformOrigin: {
|
526
|
+
vertical: "top",
|
527
|
+
horizontal: "right"
|
528
|
+
}
|
529
|
+
}, e[1] = d, e[2] = m) : (d = e[1], m = e[2]);
|
530
|
+
let f;
|
531
|
+
return e[3] !== c || e[4] !== n || e[5] !== a || e[6] !== s ? (f = /* @__PURE__ */ _(P, { children: [
|
532
|
+
u,
|
533
|
+
/* @__PURE__ */ l(je, { TriggerProps: d, MenuProps: m, children: (g) => /* @__PURE__ */ _(P, { children: [
|
534
|
+
/* @__PURE__ */ l(ce, { color: "inherit", onClick: () => {
|
535
|
+
n(), g.onClose();
|
536
|
+
}, children: s }),
|
537
|
+
/* @__PURE__ */ l(Y, {}),
|
538
|
+
/* @__PURE__ */ l(ce, { color: "error", onClick: () => {
|
539
|
+
a(), g.onClose();
|
540
|
+
}, children: /* @__PURE__ */ l(H, { variant: "body2", color: "error", children: c }) })
|
541
|
+
] }) })
|
542
|
+
] }), e[3] = c, e[4] = n, e[5] = a, e[6] = s, e[7] = f) : f = e[7], f;
|
543
|
+
}
|
544
|
+
function Pt(t) {
|
545
|
+
return t.visible;
|
546
|
+
}
|
547
|
+
function io({
|
548
|
+
enabled: t,
|
549
|
+
values: e = [],
|
550
|
+
chipProps: i,
|
551
|
+
labels: o,
|
552
|
+
modes: n,
|
553
|
+
modesMapping: a,
|
554
|
+
modeSelected: r,
|
555
|
+
BoxProps: {
|
556
|
+
sx: s,
|
557
|
+
...c
|
558
|
+
} = {},
|
559
|
+
onChipToggle: u,
|
560
|
+
onDelete: d,
|
561
|
+
onChangeMode: m,
|
562
|
+
onAllChipToggle: f,
|
563
|
+
onAllDelete: h
|
564
|
+
}) {
|
565
|
+
const M = Ce(() => Te(n, a), [n, a]), {
|
566
|
+
edit: g,
|
567
|
+
...w
|
568
|
+
} = M, b = (y) => d(y), C = (y, p) => {
|
569
|
+
y.preventDefault(), m == null || m(p);
|
570
|
+
}, S = (r ?? "") in n ? r : Object.keys(M)[0], A = t ? M[S] : null, T = Object.values(w);
|
571
|
+
return /* @__PURE__ */ _(ee, { sx: {
|
572
|
+
...G.container,
|
573
|
+
...s
|
574
|
+
}, ...c, className: "inline", children: [
|
575
|
+
/* @__PURE__ */ l(jt, { data: T, labels: o == null ? void 0 : o.options, children: /* @__PURE__ */ _(ke, { value: A == null ? void 0 : A.value, exclusive: !0, className: "inline", sx: G.options.menu, onChange: C, children: [
|
576
|
+
/* @__PURE__ */ l(Oe, { labels: o == null ? void 0 : o.options, data: T }),
|
577
|
+
!!g && /* @__PURE__ */ _(P, { children: [
|
578
|
+
/* @__PURE__ */ l(Y, { orientation: "vertical" }),
|
579
|
+
/* @__PURE__ */ l(Oe, { labels: o == null ? void 0 : o.options, data: [{
|
580
|
+
...g,
|
581
|
+
disabled: !e.length
|
582
|
+
}] })
|
583
|
+
] })
|
584
|
+
] }) }),
|
585
|
+
/* @__PURE__ */ l(Y, { flexItem: !0 }),
|
586
|
+
/* @__PURE__ */ l(Et, { hasValues: !!e.length, labels: o == null ? void 0 : o.noData }),
|
587
|
+
!!e.length && /* @__PURE__ */ l(ee, { sx: G.chip.container, className: "inline", children: e.map((y) => /* @__PURE__ */ l(Pe, { value: y, labels: o == null ? void 0 : o.chip, chipProps: i, onDelete: b, onChipToggle: u }, y.id)) }),
|
588
|
+
/* @__PURE__ */ l($t, { values: e, labels: o == null ? void 0 : o.actions, onAllChipToggle: f, onAllDelete: h })
|
589
|
+
] });
|
590
|
+
}
|
591
|
+
function jt(t) {
|
592
|
+
var c;
|
593
|
+
const e = I(5), {
|
594
|
+
data: i,
|
595
|
+
labels: o,
|
596
|
+
children: n
|
597
|
+
} = t;
|
598
|
+
if (i.length <= 1)
|
599
|
+
return null;
|
600
|
+
const a = ((c = o == null ? void 0 : o.mode) == null ? void 0 : c.title) ?? E.options.mode.title;
|
601
|
+
let r;
|
602
|
+
e[0] !== a ? (r = /* @__PURE__ */ l(H, { variant: "subtitle2", color: "text.secondary", sx: G.options.title, className: "inline", children: a }), e[0] = a, e[1] = r) : r = e[1];
|
603
|
+
let s;
|
604
|
+
return e[2] !== n || e[3] !== r ? (s = /* @__PURE__ */ _(P, { children: [
|
605
|
+
r,
|
606
|
+
n
|
607
|
+
] }), e[2] = n, e[3] = r, e[4] = s) : s = e[4], s;
|
608
|
+
}
|
609
|
+
function Oe({
|
610
|
+
data: t,
|
611
|
+
labels: e
|
612
|
+
}) {
|
613
|
+
return t.map((i) => {
|
614
|
+
var a;
|
615
|
+
const n = (((a = e == null ? void 0 : e.mode) == null ? void 0 : a.options) ?? E.options.mode.options)[i.value];
|
616
|
+
return /* @__PURE__ */ l(re, { title: n, placement: "bottom", children: /* @__PURE__ */ l(se, { disabled: !!i.disabled, value: i.value, "aria-label": i.value, children: /* @__PURE__ */ l(Me, { children: /* @__PURE__ */ l(i.icon, {}) }) }) }, i.value);
|
617
|
+
});
|
618
|
+
}
|
619
|
+
function Et(t) {
|
620
|
+
const e = I(7), {
|
621
|
+
hasValues: i,
|
622
|
+
labels: o
|
623
|
+
} = t;
|
624
|
+
if (i)
|
625
|
+
return null;
|
626
|
+
const n = (o == null ? void 0 : o.title) ?? E.noData.title, a = (o == null ? void 0 : o.description) ?? E.noData.description;
|
627
|
+
let r;
|
628
|
+
e[0] !== n ? (r = /* @__PURE__ */ l(H, { variant: "body1", color: "textSecondary", children: n }), e[0] = n, e[1] = r) : r = e[1];
|
629
|
+
let s;
|
630
|
+
e[2] !== a ? (s = /* @__PURE__ */ l(H, { variant: "body2", color: "textSecondary", children: a }), e[2] = a, e[3] = s) : s = e[3];
|
631
|
+
let c;
|
632
|
+
return e[4] !== r || e[5] !== s ? (c = /* @__PURE__ */ _(P, { children: [
|
633
|
+
r,
|
634
|
+
s
|
635
|
+
] }), e[4] = r, e[5] = s, e[6] = c) : c = e[6], c;
|
636
|
+
}
|
637
|
+
function $t(t) {
|
638
|
+
var f, h;
|
639
|
+
const e = I(9), {
|
640
|
+
values: i,
|
641
|
+
labels: o,
|
642
|
+
onAllChipToggle: n,
|
643
|
+
onAllDelete: a
|
644
|
+
} = t;
|
645
|
+
if (i.length <= 1)
|
646
|
+
return null;
|
647
|
+
const s = i.some(Ut) ? ((f = o == null ? void 0 : o.toggleAll) == null ? void 0 : f.active) ?? E.actions.toggleAll.active : ((h = o == null ? void 0 : o.toggleAll) == null ? void 0 : h.inactive) ?? E.actions.toggleAll.inactive, c = (o == null ? void 0 : o.deleteAll) ?? E.actions.deleteAll;
|
648
|
+
let u;
|
649
|
+
e[0] !== n || e[1] !== s ? (u = /* @__PURE__ */ l(ye, { color: "inherit", onClick: n, children: s }), e[0] = n, e[1] = s, e[2] = u) : u = e[2];
|
650
|
+
let d;
|
651
|
+
e[3] !== c || e[4] !== a ? (d = /* @__PURE__ */ l(ye, { color: "error", onClick: a, children: c }), e[3] = c, e[4] = a, e[5] = d) : d = e[5];
|
652
|
+
let m;
|
653
|
+
return e[6] !== u || e[7] !== d ? (m = /* @__PURE__ */ _(ee, { children: [
|
654
|
+
u,
|
655
|
+
d
|
656
|
+
] }), e[6] = u, e[7] = d, e[8] = m) : m = e[8], m;
|
657
|
+
}
|
658
|
+
function Ut(t) {
|
659
|
+
return t.visible;
|
660
|
+
}
|
661
|
+
const q = {
|
662
|
+
action: {
|
663
|
+
tooltip: {
|
664
|
+
active: "Click on the map to trace the line you want to measure",
|
665
|
+
inactive: "Click on the map to trace the line you want to measure"
|
666
|
+
}
|
667
|
+
},
|
668
|
+
chip: {
|
669
|
+
tooltip: {
|
670
|
+
active: "Hide measure",
|
671
|
+
inactive: "Show measure"
|
672
|
+
}
|
673
|
+
},
|
674
|
+
options: {
|
675
|
+
mode: {
|
676
|
+
title: "Choose a measuring tool",
|
677
|
+
options: {
|
678
|
+
distance: "Measure distance",
|
679
|
+
buffer: "Buffer distance",
|
680
|
+
area: "Area"
|
681
|
+
}
|
682
|
+
},
|
683
|
+
units: {
|
684
|
+
title: "Unit of measurement",
|
685
|
+
modal: {
|
686
|
+
title: "Map Measurement Unit",
|
687
|
+
subtitle: "Select the unit of measurement for your measurements",
|
688
|
+
apply: "Save",
|
689
|
+
options: {
|
690
|
+
metric: {
|
691
|
+
title: "Meters and Kilometers",
|
692
|
+
options: {
|
693
|
+
"m-km": "Auto",
|
694
|
+
kilometer: "Kilometers",
|
695
|
+
meter: "Meter",
|
696
|
+
centimeter: "Centimeter",
|
697
|
+
milimeter: "Milimeter"
|
698
|
+
}
|
699
|
+
},
|
700
|
+
imperial: {
|
701
|
+
title: "Feet and Miles",
|
702
|
+
options: {
|
703
|
+
"ft-mi": "Auto",
|
704
|
+
mile: "Mile",
|
705
|
+
feet: "Feet",
|
706
|
+
yard: "Yard"
|
707
|
+
}
|
708
|
+
}
|
709
|
+
}
|
710
|
+
}
|
711
|
+
}
|
712
|
+
}
|
713
|
+
}, Vt = {
|
714
|
+
"m-km": {
|
715
|
+
short: "m-km"
|
716
|
+
},
|
717
|
+
kilometer: {
|
718
|
+
short: "km"
|
719
|
+
},
|
720
|
+
meter: {
|
721
|
+
short: "m"
|
722
|
+
},
|
723
|
+
centimeter: {
|
724
|
+
short: "cm"
|
725
|
+
},
|
726
|
+
milimeter: {
|
727
|
+
short: "mm"
|
728
|
+
},
|
729
|
+
"ft-mi": {
|
730
|
+
short: "ft-mi"
|
731
|
+
},
|
732
|
+
mile: {
|
733
|
+
short: "mi"
|
734
|
+
},
|
735
|
+
yard: {
|
736
|
+
short: "yd"
|
737
|
+
},
|
738
|
+
feet: {
|
739
|
+
short: "ft"
|
740
|
+
}
|
741
|
+
};
|
742
|
+
function no(t) {
|
743
|
+
const e = I(3);
|
744
|
+
let i;
|
745
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ l("path", { fill: "currentColor", d: "M3 13.5c-.413 0-.766-.147-1.06-.44A1.445 1.445 0 0 1 1.5 12V6c0-.412.147-.766.44-1.06.294-.293.647-.44 1.06-.44h12c.412 0 .766.147 1.06.44.293.294.44.647.44 1.06v6c0 .412-.147.766-.44 1.06-.294.293-.647.44-1.06.44H3ZM3 12h12V6h-2.25v3h-1.5V6h-1.5v3h-1.5V6h-1.5v3h-1.5V6H3v6Z" }), e[0] = i) : i = e[0];
|
746
|
+
let o;
|
747
|
+
return e[1] !== t ? (o = /* @__PURE__ */ l("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 18 18", fill: "currentColor", ...t, children: i }), e[1] = t, e[2] = o) : o = e[2], o;
|
748
|
+
}
|
749
|
+
function lo(t) {
|
750
|
+
const e = I(3);
|
751
|
+
let i;
|
752
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ l("path", { fill: "currentColor", fillRule: "evenodd", d: "M9 1.5a7.5 7.5 0 1 1 0 15 7.5 7.5 0 0 1 0-15ZM9 3a6 6 0 1 0 0 12A6 6 0 0 0 9 3Zm0 4.5a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Z", clipRule: "evenodd" }), e[0] = i) : i = e[0];
|
753
|
+
let o;
|
754
|
+
return e[1] !== t ? (o = /* @__PURE__ */ l("svg", { fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 18 18", ...t, children: i }), e[1] = t, e[2] = o) : o = e[2], o;
|
755
|
+
}
|
756
|
+
function ro(t) {
|
757
|
+
const e = I(4);
|
758
|
+
let i, o;
|
759
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ l("path", { fill: "currentColor", fillRule: "evenodd", d: "M4.5 13.5v-9h9v9h-9Zm.75-8.25h7.5v7.5h-7.5v-7.5Z", clipRule: "evenodd" }), o = /* @__PURE__ */ l("path", { fill: "#2C3032", fillRule: "evenodd", d: "M1.5 3A1.5 1.5 0 0 1 3 1.5h12A1.5 1.5 0 0 1 16.5 3v12a1.5 1.5 0 0 1-1.5 1.5H3A1.5 1.5 0 0 1 1.5 15V3ZM3 3h12v12H3V3Z", clipRule: "evenodd" }), e[0] = i, e[1] = o) : (i = e[0], o = e[1]);
|
760
|
+
let n;
|
761
|
+
return e[2] !== t ? (n = /* @__PURE__ */ _("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 18 18", ...t, children: [
|
762
|
+
i,
|
763
|
+
o
|
764
|
+
] }), e[2] = t, e[3] = n) : n = e[3], n;
|
765
|
+
}
|
766
|
+
const V = {
|
767
|
+
container: {
|
768
|
+
display: "flex",
|
769
|
+
flexDirection: "row",
|
770
|
+
alignItems: "center",
|
771
|
+
justifyContent: "flex-start",
|
772
|
+
gap: ({
|
773
|
+
spacing: t
|
774
|
+
}) => t(1),
|
775
|
+
overflow: "hidden"
|
776
|
+
},
|
777
|
+
actions: {
|
778
|
+
icon: {
|
779
|
+
width: ({
|
780
|
+
spacing: t
|
781
|
+
}) => t(4),
|
782
|
+
height: ({
|
783
|
+
spacing: t
|
784
|
+
}) => t(4),
|
785
|
+
borderRadius: 0,
|
786
|
+
".MuiTouchRipple-ripple .MuiTouchRipple-child": {
|
787
|
+
borderRadius: 0
|
788
|
+
}
|
789
|
+
}
|
790
|
+
},
|
791
|
+
options: {
|
792
|
+
menu: {
|
793
|
+
marginTop: ({
|
794
|
+
spacing: t
|
795
|
+
}) => t(1)
|
796
|
+
},
|
797
|
+
icon: {
|
798
|
+
width: ({
|
799
|
+
spacing: t
|
800
|
+
}) => t(3)
|
801
|
+
},
|
802
|
+
title: {
|
803
|
+
paddingX: ({
|
804
|
+
spacing: t
|
805
|
+
}) => t(2),
|
806
|
+
paddingY: ({
|
807
|
+
spacing: t
|
808
|
+
}) => t(0.5)
|
809
|
+
},
|
810
|
+
icons: {
|
811
|
+
color: ({
|
812
|
+
palette: t
|
813
|
+
}) => t.text.primary
|
814
|
+
},
|
815
|
+
tag: {
|
816
|
+
borderRadius: ({
|
817
|
+
spacing: t
|
818
|
+
}) => t(0.25),
|
819
|
+
border: "1px solid",
|
820
|
+
borderColor: ({
|
821
|
+
palette: t
|
822
|
+
}) => t.primary.main,
|
823
|
+
paddingX: ({
|
824
|
+
spacing: t
|
825
|
+
}) => t(0.5),
|
826
|
+
color: ({
|
827
|
+
palette: t
|
828
|
+
}) => t.primary.main,
|
829
|
+
backgroundColor: ({
|
830
|
+
palette: t
|
831
|
+
}) => Re(t.primary.main, 0.08)
|
832
|
+
},
|
833
|
+
modal: {
|
834
|
+
toggle: {
|
835
|
+
boxShadow: "none",
|
836
|
+
backgroundColor: "#F8F9F9",
|
837
|
+
padding: ({
|
838
|
+
spacing: t
|
839
|
+
}) => t(0.5),
|
840
|
+
marginTop: ({
|
841
|
+
spacing: t
|
842
|
+
}) => t(2),
|
843
|
+
marginBottom: ({
|
844
|
+
spacing: t
|
845
|
+
}) => t(1),
|
846
|
+
".MuiToggleButtonGroup-grouped": ({
|
847
|
+
typography: t
|
848
|
+
}) => ({
|
849
|
+
...t.caption,
|
850
|
+
fontWeight: 500,
|
851
|
+
margin: 0,
|
852
|
+
"&:first-of-type:not(.MuiDivider-root)": {
|
853
|
+
marginLeft: 0
|
854
|
+
}
|
855
|
+
})
|
856
|
+
},
|
857
|
+
subtitle: ({
|
858
|
+
typography: t,
|
859
|
+
palette: e
|
860
|
+
}) => ({
|
861
|
+
...t.body2,
|
862
|
+
color: e.text.secondary
|
863
|
+
}),
|
864
|
+
optionsGroup: {
|
865
|
+
marginLeft: ({
|
866
|
+
spacing: t
|
867
|
+
}) => t(1),
|
868
|
+
".MuiTypography-root": ({
|
869
|
+
typography: t
|
870
|
+
}) => ({
|
871
|
+
...t.body2
|
872
|
+
})
|
873
|
+
},
|
874
|
+
title: {
|
875
|
+
display: "flex",
|
876
|
+
justifyContent: "space-between",
|
877
|
+
alignItems: "center",
|
878
|
+
padding: ({
|
879
|
+
spacing: t
|
880
|
+
}) => t(2)
|
881
|
+
},
|
882
|
+
content: {
|
883
|
+
paddingX: ({
|
884
|
+
spacing: t
|
885
|
+
}) => t(2),
|
886
|
+
minWidth: ({
|
887
|
+
spacing: t
|
888
|
+
}) => t(50)
|
889
|
+
},
|
890
|
+
actions: {
|
891
|
+
paddingX: ({
|
892
|
+
spacing: t
|
893
|
+
}) => t(2)
|
894
|
+
}
|
895
|
+
}
|
896
|
+
},
|
897
|
+
chip: {
|
898
|
+
chip: {
|
899
|
+
marginRight: ({
|
900
|
+
spacing: t
|
901
|
+
}) => t(0.5)
|
902
|
+
},
|
903
|
+
disabled: {
|
904
|
+
opacity: ({
|
905
|
+
palette: t
|
906
|
+
}) => t.action.disabledOpacity
|
907
|
+
}
|
908
|
+
}
|
909
|
+
};
|
910
|
+
function co(t) {
|
911
|
+
const e = I(46), {
|
912
|
+
enabled: i,
|
913
|
+
actionProps: o,
|
914
|
+
labels: n,
|
915
|
+
modes: a,
|
916
|
+
modesMapping: r,
|
917
|
+
unitsMapping: s,
|
918
|
+
modeSelected: c,
|
919
|
+
PaperProps: u,
|
920
|
+
units: d,
|
921
|
+
unitSelected: m,
|
922
|
+
onActionToggle: f,
|
923
|
+
onChangeMode: h,
|
924
|
+
onChangeUnit: M
|
925
|
+
} = t, g = s === void 0 ? Vt : s;
|
926
|
+
let w;
|
927
|
+
e[0] !== u ? (w = u === void 0 ? {} : u, e[0] = u, e[1] = w) : w = e[1];
|
928
|
+
let b, C;
|
929
|
+
e[2] !== w ? ({
|
930
|
+
sx: C,
|
931
|
+
...b
|
932
|
+
} = w, e[2] = w, e[3] = b, e[4] = C) : (b = e[3], C = e[4]);
|
933
|
+
let D;
|
934
|
+
e[5] !== f ? (D = (z) => f(!!z), e[5] = f, e[6] = D) : D = e[6];
|
935
|
+
const S = D;
|
936
|
+
let A, T;
|
937
|
+
e[7] !== a || e[8] !== r ? (T = Te(a, r), e[7] = a, e[8] = r, e[9] = T) : T = e[9], A = T;
|
938
|
+
const y = A, p = (c ?? "") in y;
|
939
|
+
let x;
|
940
|
+
e[10] !== y || e[11] !== p || e[12] !== c ? (x = p ? c : Object.keys(y)[0], e[10] = y, e[11] = p, e[12] = c, e[13] = x) : x = e[13];
|
941
|
+
const v = x, O = y[v];
|
942
|
+
let R;
|
943
|
+
const L = d[v];
|
944
|
+
let Z;
|
945
|
+
e[14] !== v || e[15] !== L || e[16] !== d ? (Z = Object.keys(d).length >= 1 ? d : {
|
946
|
+
[v]: L.slice(0, 1)
|
947
|
+
}, e[14] = v, e[15] = L, e[16] = d, e[17] = Z) : Z = e[17];
|
948
|
+
const B = Z[v];
|
949
|
+
let k;
|
950
|
+
if (e[18] !== B || e[19] !== g) {
|
951
|
+
let z;
|
952
|
+
e[21] !== g ? (z = (xe) => ({
|
953
|
+
...xe,
|
954
|
+
...g[xe.value]
|
955
|
+
}), e[21] = g, e[22] = z) : z = e[22], k = B.map(z), e[18] = B, e[19] = g, e[20] = k;
|
956
|
+
} else
|
957
|
+
k = e[20];
|
958
|
+
R = k;
|
959
|
+
const F = R;
|
960
|
+
let $;
|
961
|
+
e[23] !== C ? ($ = {
|
962
|
+
...V.container,
|
963
|
+
...C
|
964
|
+
}, e[23] = C, e[24] = $) : $ = e[24];
|
965
|
+
const te = n == null ? void 0 : n.action, oe = O == null ? void 0 : O.icon;
|
966
|
+
let N;
|
967
|
+
e[25] !== o || e[26] !== i || e[27] !== S || e[28] !== te || e[29] !== oe ? (N = /* @__PURE__ */ l(Gt, { actionProps: o, labels: te, enabled: i, onActionToggle: S, children: oe }), e[25] = o, e[26] = i, e[27] = S, e[28] = te, e[29] = oe, e[30] = N) : N = e[30];
|
968
|
+
const ie = n == null ? void 0 : n.options;
|
969
|
+
let X;
|
970
|
+
e[31] !== F || e[32] !== y || e[33] !== v || e[34] !== h || e[35] !== M || e[36] !== ie || e[37] !== m ? (X = /* @__PURE__ */ l(Ft, { labels: ie, modes: y, modeSelected: v, units: F, unitSelected: m, onChangeMode: h, onChangeUnit: M }), e[31] = F, e[32] = y, e[33] = v, e[34] = h, e[35] = M, e[36] = ie, e[37] = m, e[38] = X) : X = e[38];
|
971
|
+
let W;
|
972
|
+
e[39] !== N || e[40] !== X ? (W = /* @__PURE__ */ _(ee, { children: [
|
973
|
+
N,
|
974
|
+
X
|
975
|
+
] }), e[39] = N, e[40] = X, e[41] = W) : W = e[41];
|
976
|
+
let K;
|
977
|
+
return e[42] !== b || e[43] !== $ || e[44] !== W ? (K = /* @__PURE__ */ l(we, { sx: $, ...b, children: W }), e[42] = b, e[43] = $, e[44] = W, e[45] = K) : K = e[45], K;
|
978
|
+
}
|
979
|
+
function Gt(t) {
|
980
|
+
var h;
|
981
|
+
const e = I(12), {
|
982
|
+
actionProps: i,
|
983
|
+
labels: o,
|
984
|
+
enabled: n,
|
985
|
+
children: a,
|
986
|
+
onActionToggle: r
|
987
|
+
} = t, s = n ? "active" : "inactive", c = ((h = o == null ? void 0 : o.tooltip) == null ? void 0 : h[s]) ?? q.action.tooltip[s], u = i == null ? void 0 : i.TooltipProps;
|
988
|
+
let d;
|
989
|
+
e[0] !== n || e[1] !== r ? (d = () => r(!n), e[0] = n, e[1] = r, e[2] = d) : d = e[2];
|
990
|
+
let m;
|
991
|
+
e[3] !== c || e[4] !== a || e[5] !== n || e[6] !== d ? (m = /* @__PURE__ */ l(se, { value: "toggle", sx: V.actions.icon, onClick: d, "aria-label": c, selected: n, children: a }), e[3] = c, e[4] = a, e[5] = n, e[6] = d, e[7] = m) : m = e[7];
|
992
|
+
let f;
|
993
|
+
return e[8] !== c || e[9] !== u || e[10] !== m ? (f = /* @__PURE__ */ l(re, { title: c, placement: "right", ...u, children: m }), e[8] = c, e[9] = u, e[10] = m, e[11] = f) : f = e[11], f;
|
994
|
+
}
|
995
|
+
function Ft(t) {
|
996
|
+
var F, $, te, oe, N, ie, X, W;
|
997
|
+
const e = I(68), {
|
998
|
+
modes: i,
|
999
|
+
modeSelected: o,
|
1000
|
+
units: n,
|
1001
|
+
unitSelected: a,
|
1002
|
+
labels: r,
|
1003
|
+
onChangeMode: s,
|
1004
|
+
onChangeUnit: c
|
1005
|
+
} = t, [u, d] = ne(null), [m, f] = ne(!1);
|
1006
|
+
let h, M, g, w, b, C, D, S, A, T, y, p, x, v, O, R;
|
1007
|
+
if (e[0] !== u || e[1] !== ((F = r == null ? void 0 : r.mode) == null ? void 0 : F.options) || e[2] !== (($ = r == null ? void 0 : r.mode) == null ? void 0 : $.title) || e[3] !== ((te = r == null ? void 0 : r.units) == null ? void 0 : te.title) || e[4] !== o || e[5] !== i || e[6] !== s || e[7] !== c || e[8] !== a || e[9] !== n) {
|
1008
|
+
x = Symbol.for("react.early_return_sentinel");
|
1009
|
+
e: {
|
1010
|
+
const K = Object.values(i);
|
1011
|
+
let z;
|
1012
|
+
if (e[26] !== n ? (z = Object.values(n), e[26] = n, e[27] = z) : z = e[27], R = z, !(K.length > 1 || R.length > 1)) {
|
1013
|
+
x = null;
|
1014
|
+
break e;
|
1015
|
+
}
|
1016
|
+
const Ee = !!u;
|
1017
|
+
let ue;
|
1018
|
+
e[28] === Symbol.for("react.memo_cache_sentinel") ? (ue = (U) => {
|
1019
|
+
d(U.currentTarget);
|
1020
|
+
}, e[28] = ue) : ue = e[28];
|
1021
|
+
const $e = ue;
|
1022
|
+
let me;
|
1023
|
+
e[29] === Symbol.for("react.memo_cache_sentinel") ? (me = () => {
|
1024
|
+
d(null);
|
1025
|
+
}, e[29] = me) : me = e[29];
|
1026
|
+
const Se = me;
|
1027
|
+
let he;
|
1028
|
+
e[30] !== s ? (he = (U, Ae) => {
|
1029
|
+
U.preventDefault(), s(Ae.value), Se();
|
1030
|
+
}, e[30] = s, e[31] = he) : he = e[31];
|
1031
|
+
const Ue = he;
|
1032
|
+
let fe;
|
1033
|
+
e[32] === Symbol.for("react.memo_cache_sentinel") ? (fe = () => {
|
1034
|
+
f(!0);
|
1035
|
+
}, e[32] = fe) : fe = e[32], g = fe;
|
1036
|
+
let pe;
|
1037
|
+
e[33] === Symbol.for("react.memo_cache_sentinel") ? (pe = () => {
|
1038
|
+
f(!1);
|
1039
|
+
}, e[33] = pe) : pe = e[33], w = pe;
|
1040
|
+
let ge;
|
1041
|
+
e[34] !== c ? (ge = (U) => {
|
1042
|
+
w(), c(U);
|
1043
|
+
}, e[34] = c, e[35] = ge) : ge = e[35], M = ge;
|
1044
|
+
const Ve = ((oe = r == null ? void 0 : r.mode) == null ? void 0 : oe.title) ?? q.options.mode.title;
|
1045
|
+
O = ((N = r == null ? void 0 : r.units) == null ? void 0 : N.title) ?? q.options.units.title, b = K.length > 1 && R.length > 1;
|
1046
|
+
let ve;
|
1047
|
+
e[36] !== a || e[37] !== n ? (ve = n.find((U) => U.value === a) ?? n[0], e[36] = a, e[37] = n, e[38] = ve) : ve = e[38], v = ve, e[39] === Symbol.for("react.memo_cache_sentinel") ? (p = /* @__PURE__ */ l(Q, { sx: V.options.icon, onClick: $e, children: /* @__PURE__ */ l(ct, {}) }), e[39] = p) : p = e[39], h = Ie, D = "measurement-menu", S = u, A = Ee, T = Se, e[40] === Symbol.for("react.memo_cache_sentinel") ? (y = {
|
1048
|
+
"aria-labelledby": "basic-button",
|
1049
|
+
sx: V.options.menu
|
1050
|
+
}, e[40] = y) : y = e[40], C = K.length > 1 && /* @__PURE__ */ _(P, { children: [
|
1051
|
+
/* @__PURE__ */ l(H, { variant: "subtitle2", color: "text.secondary", sx: V.options.title, children: Ve }),
|
1052
|
+
K.map((U) => {
|
1053
|
+
var _e;
|
1054
|
+
const Ge = (((_e = r == null ? void 0 : r.mode) == null ? void 0 : _e.options) ?? q.options.mode.options)[U.value];
|
1055
|
+
return /* @__PURE__ */ _(ce, { onClick: (Fe) => Ue(Fe, U), selected: U.value === o, children: [
|
1056
|
+
/* @__PURE__ */ l(Ze, { sx: V.options.icons, children: /* @__PURE__ */ l(Me, { children: U.icon }) }),
|
1057
|
+
/* @__PURE__ */ l(ae, { children: Ge })
|
1058
|
+
] }, U.value);
|
1059
|
+
})
|
1060
|
+
] });
|
1061
|
+
}
|
1062
|
+
e[0] = u, e[1] = (ie = r == null ? void 0 : r.mode) == null ? void 0 : ie.options, e[2] = (X = r == null ? void 0 : r.mode) == null ? void 0 : X.title, e[3] = (W = r == null ? void 0 : r.units) == null ? void 0 : W.title, e[4] = o, e[5] = i, e[6] = s, e[7] = c, e[8] = a, e[9] = n, e[10] = h, e[11] = M, e[12] = g, e[13] = w, e[14] = b, e[15] = C, e[16] = D, e[17] = S, e[18] = A, e[19] = T, e[20] = y, e[21] = p, e[22] = x, e[23] = v, e[24] = O, e[25] = R;
|
1063
|
+
} else
|
1064
|
+
h = e[10], M = e[11], g = e[12], w = e[13], b = e[14], C = e[15], D = e[16], S = e[17], A = e[18], T = e[19], y = e[20], p = e[21], x = e[22], v = e[23], O = e[24], R = e[25];
|
1065
|
+
if (x !== Symbol.for("react.early_return_sentinel"))
|
1066
|
+
return x;
|
1067
|
+
let L;
|
1068
|
+
e[41] !== b ? (L = b && /* @__PURE__ */ l(Y, {}), e[41] = b, e[42] = L) : L = e[42];
|
1069
|
+
let Z;
|
1070
|
+
e[43] !== M || e[44] !== g || e[45] !== w || e[46] !== r || e[47] !== m || e[48] !== v || e[49] !== O || e[50] !== n || e[51] !== R.length ? (Z = R.length > 1 && /* @__PURE__ */ _(P, { children: [
|
1071
|
+
/* @__PURE__ */ _(ce, { onClick: g, children: [
|
1072
|
+
/* @__PURE__ */ l(ae, { children: O }),
|
1073
|
+
/* @__PURE__ */ l(H, { variant: "caption", fontWeight: 500, sx: V.options.tag, children: v.short })
|
1074
|
+
] }),
|
1075
|
+
/* @__PURE__ */ l(zt, { open: m, labels: r, units: n, unitSelectedValue: v, onClose: w, onSubmit: M })
|
1076
|
+
] }), e[43] = M, e[44] = g, e[45] = w, e[46] = r, e[47] = m, e[48] = v, e[49] = O, e[50] = n, e[51] = R.length, e[52] = Z) : Z = e[52];
|
1077
|
+
let j;
|
1078
|
+
e[53] !== C || e[54] !== Z || e[55] !== L ? (j = /* @__PURE__ */ _("div", { children: [
|
1079
|
+
C,
|
1080
|
+
L,
|
1081
|
+
Z
|
1082
|
+
] }), e[53] = C, e[54] = Z, e[55] = L, e[56] = j) : j = e[56];
|
1083
|
+
let B;
|
1084
|
+
e[57] !== h || e[58] !== j || e[59] !== D || e[60] !== S || e[61] !== A || e[62] !== T || e[63] !== y ? (B = /* @__PURE__ */ l(h, { id: D, anchorEl: S, open: A, onClose: T, MenuListProps: y, children: j }), e[57] = h, e[58] = j, e[59] = D, e[60] = S, e[61] = A, e[62] = T, e[63] = y, e[64] = B) : B = e[64];
|
1085
|
+
let k;
|
1086
|
+
return e[65] !== B || e[66] !== p ? (k = /* @__PURE__ */ _(P, { children: [
|
1087
|
+
p,
|
1088
|
+
B
|
1089
|
+
] }), e[65] = B, e[66] = p, e[67] = k) : k = e[67], k;
|
1090
|
+
}
|
1091
|
+
function zt({
|
1092
|
+
open: t,
|
1093
|
+
labels: e,
|
1094
|
+
units: i,
|
1095
|
+
unitSelectedValue: o,
|
1096
|
+
onClose: n,
|
1097
|
+
onSubmit: a
|
1098
|
+
}) {
|
1099
|
+
var w, b, C, D, S, A, T, y;
|
1100
|
+
const [r, s] = ne("metric"), c = Ce(() => i.filter((p) => p.system === r), [r, i]), u = (p, x) => {
|
1101
|
+
s(x);
|
1102
|
+
}, d = ((b = (w = e == null ? void 0 : e.units) == null ? void 0 : w.modal) == null ? void 0 : b.options) ?? q.options.units.modal.options, m = d[r].options, f = ((D = (C = e == null ? void 0 : e.units) == null ? void 0 : C.modal) == null ? void 0 : D.title) ?? q.options.units.modal.title, h = ((A = (S = e == null ? void 0 : e.units) == null ? void 0 : S.modal) == null ? void 0 : A.subtitle) ?? q.options.units.modal.subtitle, M = ((y = (T = e == null ? void 0 : e.units) == null ? void 0 : T.modal) == null ? void 0 : y.apply) ?? q.options.units.modal.apply, g = o.system === r ? o : c[0];
|
1103
|
+
return /* @__PURE__ */ _(He, { open: t, component: ee, onClose: n, maxWidth: "xs", PaperProps: {
|
1104
|
+
component: "form",
|
1105
|
+
onSubmit: (p) => {
|
1106
|
+
p.preventDefault();
|
1107
|
+
const x = new FormData(p.currentTarget);
|
1108
|
+
a(x.get("unit-value"));
|
1109
|
+
}
|
1110
|
+
}, children: [
|
1111
|
+
/* @__PURE__ */ _(Ne, { sx: V.options.modal.title, children: [
|
1112
|
+
f,
|
1113
|
+
/* @__PURE__ */ l(Q, { onClick: n, children: /* @__PURE__ */ l(rt, {}) })
|
1114
|
+
] }),
|
1115
|
+
/* @__PURE__ */ _(Xe, { sx: V.options.modal.content, children: [
|
1116
|
+
/* @__PURE__ */ l(H, { sx: V.options.modal.subtitle, children: h }),
|
1117
|
+
/* @__PURE__ */ _(ke, { color: "primary", value: r, exclusive: !0, fullWidth: !0, onChange: u, "aria-label": "system", sx: V.options.modal.toggle, children: [
|
1118
|
+
/* @__PURE__ */ l(se, { value: "metric", children: d.metric.title }),
|
1119
|
+
/* @__PURE__ */ l(se, { value: "imperial", children: d.imperial.title })
|
1120
|
+
] }),
|
1121
|
+
/* @__PURE__ */ l(We, { children: /* @__PURE__ */ l(Ke, { "aria-labelledby": "unit-value", defaultValue: g == null ? void 0 : g.value, name: "unit-value", sx: V.options.modal.optionsGroup, children: c.map((p) => {
|
1122
|
+
const x = m[p.value];
|
1123
|
+
return /* @__PURE__ */ l(Ye, { value: p.value, control: /* @__PURE__ */ l(qe, {}), label: x }, p.value);
|
1124
|
+
}) }) }, g == null ? void 0 : g.value)
|
1125
|
+
] }),
|
1126
|
+
/* @__PURE__ */ l(Je, { sx: V.options.modal.actions, children: /* @__PURE__ */ l(ye, { variant: "contained", type: "submit", children: M }) })
|
1127
|
+
] });
|
1128
|
+
}
|
1129
|
+
const Ht = {
|
1130
|
+
enabled: "Show your current location",
|
1131
|
+
disabled: "Location unavailable"
|
1132
|
+
}, Nt = "geolocation";
|
1133
|
+
function ao(t) {
|
1134
|
+
const e = I(25), {
|
1135
|
+
disabled: i,
|
1136
|
+
labels: o,
|
1137
|
+
PaperProps: n,
|
1138
|
+
TooltipProps: a,
|
1139
|
+
watch: r,
|
1140
|
+
onChange: s,
|
1141
|
+
onError: c
|
1142
|
+
} = t, u = nt(null), d = "geolocation" in navigator, [m, f] = ne(d);
|
1143
|
+
let h, M;
|
1144
|
+
e[0] !== c ? (h = () => (d && navigator.permissions.query({
|
1145
|
+
name: "geolocation"
|
1146
|
+
}).then((L) => {
|
1147
|
+
f(L.state === "granted"), L.onchange = () => {
|
1148
|
+
f(L.state === "granted");
|
1149
|
+
};
|
1150
|
+
}).catch((L) => {
|
1151
|
+
f(!1), c == null || c(L);
|
1152
|
+
}), () => {
|
1153
|
+
u.current && navigator.geolocation.clearWatch(u.current);
|
1154
|
+
}), M = [d, c], e[0] = c, e[1] = h, e[2] = M) : (h = e[1], M = e[2]), lt(h, M);
|
1155
|
+
let g;
|
1156
|
+
e[3] !== s ? (g = (L) => {
|
1157
|
+
s(L.coords);
|
1158
|
+
}, e[3] = s, e[4] = g) : g = e[4];
|
1159
|
+
const w = g;
|
1160
|
+
let b;
|
1161
|
+
e[5] !== c ? (b = (L) => {
|
1162
|
+
f(!1), c == null || c(L);
|
1163
|
+
}, e[5] = c, e[6] = b) : b = e[6];
|
1164
|
+
const C = b;
|
1165
|
+
let D;
|
1166
|
+
e[7] !== C || e[8] !== w || e[9] !== r ? (D = () => {
|
1167
|
+
if (u.current && navigator.geolocation.clearWatch(u.current), r) {
|
1168
|
+
u.current = navigator.geolocation.watchPosition(w, C);
|
1169
|
+
return;
|
1170
|
+
}
|
1171
|
+
navigator.geolocation.getCurrentPosition(w, C);
|
1172
|
+
}, e[7] = C, e[8] = w, e[9] = r, e[10] = D) : D = e[10];
|
1173
|
+
const S = D, T = ((o == null ? void 0 : o.tooltip) ?? Ht)[m ? "enabled" : "disabled"], y = (o == null ? void 0 : o.ariaLabel) ?? Nt, p = !d || i;
|
1174
|
+
let x;
|
1175
|
+
e[11] !== m ? (x = m ? /* @__PURE__ */ l(at, {}) : /* @__PURE__ */ l(st, {}), e[11] = m, e[12] = x) : x = e[12];
|
1176
|
+
let v;
|
1177
|
+
e[13] !== S || e[14] !== y || e[15] !== p || e[16] !== x ? (v = /* @__PURE__ */ l(Q, { onClick: S, "aria-label": y, disabled: p, children: x }), e[13] = S, e[14] = y, e[15] = p, e[16] = x, e[17] = v) : v = e[17];
|
1178
|
+
let O;
|
1179
|
+
e[18] !== a || e[19] !== v || e[20] !== T ? (O = /* @__PURE__ */ l(re, { arrow: !0, placement: "right", title: T, ...a, children: v }), e[18] = a, e[19] = v, e[20] = T, e[21] = O) : O = e[21];
|
1180
|
+
let R;
|
1181
|
+
return e[22] !== n || e[23] !== O ? (R = /* @__PURE__ */ l(we, { ...n, children: O }), e[22] = n, e[23] = O, e[24] = R) : R = e[24], R;
|
1182
|
+
}
|
1183
|
+
const be = {
|
1184
|
+
zoom: {
|
1185
|
+
position: "relative",
|
1186
|
+
height: ({
|
1187
|
+
spacing: t
|
1188
|
+
}) => t(4),
|
1189
|
+
aspectRatio: 1,
|
1190
|
+
display: "flex",
|
1191
|
+
alignItems: "center",
|
1192
|
+
justifyContent: "center"
|
1193
|
+
},
|
1194
|
+
paper: {
|
1195
|
+
display: "flex",
|
1196
|
+
backgroundColor: ({
|
1197
|
+
palette: t
|
1198
|
+
}) => t.background.paper,
|
1199
|
+
width: "auto",
|
1200
|
+
overflow: "hidden",
|
1201
|
+
boxShadow: ({
|
1202
|
+
shadows: t
|
1203
|
+
}) => t[1],
|
1204
|
+
borderRadius: ({
|
1205
|
+
spacing: t
|
1206
|
+
}) => t(0.5),
|
1207
|
+
button: {
|
1208
|
+
borderRadius: 0
|
1209
|
+
}
|
1210
|
+
},
|
1211
|
+
circularProgress: {
|
1212
|
+
position: "absolute"
|
1213
|
+
}
|
1214
|
+
};
|
1215
|
+
function so(t) {
|
1216
|
+
const e = I(40), {
|
1217
|
+
zoom: i,
|
1218
|
+
disabled: o,
|
1219
|
+
direction: n,
|
1220
|
+
isLoading: a,
|
1221
|
+
maxZoom: r,
|
1222
|
+
minZoom: s,
|
1223
|
+
PaperProps: c,
|
1224
|
+
ResetViewProps: u,
|
1225
|
+
showZoom: d,
|
1226
|
+
onChange: m,
|
1227
|
+
onReset: f
|
1228
|
+
} = t, h = n === void 0 ? "vertical" : n, M = r === void 0 ? 24 : r, g = s === void 0 ? 0 : s;
|
1229
|
+
let w;
|
1230
|
+
e[0] !== u ? (w = u === void 0 ? {
|
1231
|
+
Icon: dt
|
1232
|
+
} : u, e[0] = u, e[1] = w) : w = e[1];
|
1233
|
+
const b = w, C = d === void 0 ? !0 : d;
|
1234
|
+
let D;
|
1235
|
+
e[2] !== M || e[3] !== m || e[4] !== i ? (D = () => {
|
1236
|
+
const $ = Math.min(M, i + 1);
|
1237
|
+
m($);
|
1238
|
+
}, e[2] = M, e[3] = m, e[4] = i, e[5] = D) : D = e[5];
|
1239
|
+
const S = D;
|
1240
|
+
let A;
|
1241
|
+
e[6] !== g || e[7] !== m || e[8] !== i ? (A = () => {
|
1242
|
+
const $ = Math.max(g, i - 1);
|
1243
|
+
m($);
|
1244
|
+
}, e[6] = g, e[7] = m, e[8] = i, e[9] = A) : A = e[9];
|
1245
|
+
const T = A, y = Math.floor(i), p = h === "vertical" ? "horizontal" : "vertical", x = h === "vertical" ? "column" : "row";
|
1246
|
+
let v;
|
1247
|
+
e[10] !== x ? (v = {
|
1248
|
+
...be.paper,
|
1249
|
+
flexDirection: x
|
1250
|
+
}, e[10] = x, e[11] = v) : v = e[11];
|
1251
|
+
let O;
|
1252
|
+
e[12] !== b || e[13] !== o || e[14] !== p || e[15] !== f ? (O = f && /* @__PURE__ */ _(P, { children: [
|
1253
|
+
/* @__PURE__ */ l(Q, { onClick: f, "aria-label": "Decrease zoom", disabled: o, children: /* @__PURE__ */ l(b.Icon, {}) }),
|
1254
|
+
/* @__PURE__ */ l(Y, { orientation: p, flexItem: !0 })
|
1255
|
+
] }), e[12] = b, e[13] = o, e[14] = p, e[15] = f, e[16] = O) : O = e[16];
|
1256
|
+
let R;
|
1257
|
+
e[17] === Symbol.for("react.memo_cache_sentinel") ? (R = /* @__PURE__ */ l(ut, {}), e[17] = R) : R = e[17];
|
1258
|
+
let L;
|
1259
|
+
e[18] !== o || e[19] !== S ? (L = /* @__PURE__ */ l(Q, { onClick: S, "aria-label": "Increase zoom", disabled: o, children: R }), e[18] = o, e[19] = S, e[20] = L) : L = e[20];
|
1260
|
+
let Z;
|
1261
|
+
e[21] !== p ? (Z = /* @__PURE__ */ l(Y, { orientation: p, flexItem: !0 }), e[21] = p, e[22] = Z) : Z = e[22];
|
1262
|
+
let j;
|
1263
|
+
e[23] !== y || e[24] !== p || e[25] !== a || e[26] !== C ? (j = C && /* @__PURE__ */ _(P, { children: [
|
1264
|
+
/* @__PURE__ */ _(ee, { sx: be.zoom, children: [
|
1265
|
+
/* @__PURE__ */ l(H, { display: "block", align: "center", color: "textSecondary", variant: "overline", children: y }),
|
1266
|
+
a && /* @__PURE__ */ l(Qe, { sx: be.circularProgress, variant: "indeterminate", size: 24 })
|
1267
|
+
] }),
|
1268
|
+
/* @__PURE__ */ l(Y, { orientation: p, flexItem: !0 })
|
1269
|
+
] }), e[23] = y, e[24] = p, e[25] = a, e[26] = C, e[27] = j) : j = e[27];
|
1270
|
+
let B;
|
1271
|
+
e[28] === Symbol.for("react.memo_cache_sentinel") ? (B = /* @__PURE__ */ l(mt, {}), e[28] = B) : B = e[28];
|
1272
|
+
let k;
|
1273
|
+
e[29] !== T || e[30] !== o ? (k = /* @__PURE__ */ l(Q, { onClick: T, "aria-label": "Decrease zoom", disabled: o, children: B }), e[29] = T, e[30] = o, e[31] = k) : k = e[31];
|
1274
|
+
let F;
|
1275
|
+
return e[32] !== c || e[33] !== v || e[34] !== O || e[35] !== L || e[36] !== Z || e[37] !== j || e[38] !== k ? (F = /* @__PURE__ */ _(we, { sx: v, ...c, children: [
|
1276
|
+
O,
|
1277
|
+
L,
|
1278
|
+
Z,
|
1279
|
+
j,
|
1280
|
+
k
|
1281
|
+
] }), e[32] = c, e[33] = v, e[34] = O, e[35] = L, e[36] = Z, e[37] = j, e[38] = k, e[39] = F) : F = e[39], F;
|
1282
|
+
}
|
1283
|
+
const J = {
|
1284
|
+
firstColumn: {
|
1285
|
+
flex: 2.5,
|
1286
|
+
"& .MuiListItemText-primary": {
|
1287
|
+
wordBreak: "break-word",
|
1288
|
+
whiteSpace: "normal"
|
1289
|
+
}
|
1290
|
+
},
|
1291
|
+
secondColumn: {
|
1292
|
+
flex: 0.5,
|
1293
|
+
textAlign: "right",
|
1294
|
+
"& .MuiListItemText-primary": {
|
1295
|
+
wordBreak: "break-word",
|
1296
|
+
whiteSpace: "normal"
|
1297
|
+
}
|
1298
|
+
},
|
1299
|
+
clickable: {
|
1300
|
+
cursor: "pointer",
|
1301
|
+
"&:hover": {
|
1302
|
+
backgroundColor: ({
|
1303
|
+
palette: t
|
1304
|
+
}) => t.action.hover
|
1305
|
+
}
|
1306
|
+
},
|
1307
|
+
button: {
|
1308
|
+
mt: 2
|
1309
|
+
},
|
1310
|
+
showDivider: {
|
1311
|
+
borderBottom: ({
|
1312
|
+
palette: t
|
1313
|
+
}) => `1px solid ${t.divider}`
|
1314
|
+
},
|
1315
|
+
selected: {
|
1316
|
+
backgroundColor: ({
|
1317
|
+
palette: t
|
1318
|
+
}) => t.action.selected
|
1319
|
+
},
|
1320
|
+
disabled: {
|
1321
|
+
opacity: 0.5,
|
1322
|
+
cursor: "not-allowed"
|
1323
|
+
}
|
1324
|
+
}, Xt = {
|
1325
|
+
showMore: "Show More",
|
1326
|
+
showLess: "Show Less"
|
1327
|
+
};
|
1328
|
+
function uo(t) {
|
1329
|
+
const e = I(30), {
|
1330
|
+
data: i,
|
1331
|
+
itemsToShow: o,
|
1332
|
+
labels: n,
|
1333
|
+
showDivider: a,
|
1334
|
+
selectedItemId: r,
|
1335
|
+
tooltipProps: s,
|
1336
|
+
onExpand: c,
|
1337
|
+
onItemClick: u
|
1338
|
+
} = t, d = o === void 0 ? 0 : o, m = n === void 0 ? Xt : n, f = a === void 0 ? !0 : a, [h, M] = ne(!1);
|
1339
|
+
let g, w;
|
1340
|
+
e[0] !== i || e[1] !== d || e[2] !== h ? (w = h || d === 0 ? i : i.slice(0, d), e[0] = i, e[1] = d, e[2] = h, e[3] = w) : w = e[3], g = w;
|
1341
|
+
const b = g;
|
1342
|
+
let C;
|
1343
|
+
e[4] !== c || e[5] !== h ? (C = () => {
|
1344
|
+
M(!h), c == null || c(h);
|
1345
|
+
}, e[4] = c, e[5] = h, e[6] = C) : C = e[6];
|
1346
|
+
const D = C;
|
1347
|
+
if (b.length === 0) {
|
1348
|
+
let p;
|
1349
|
+
return e[7] === Symbol.for("react.memo_cache_sentinel") ? (p = /* @__PURE__ */ l(H, { variant: "body1", children: "No data" }), e[7] = p) : p = e[7], p;
|
1350
|
+
}
|
1351
|
+
let S;
|
1352
|
+
if (e[8] !== b || e[9] !== u || e[10] !== r || e[11] !== f || e[12] !== s) {
|
1353
|
+
let p;
|
1354
|
+
e[14] !== u || e[15] !== r || e[16] !== f || e[17] !== s ? (p = (x, v) => /* @__PURE__ */ l(re, { followCursor: !1, placement: "top", arrow: !0, title: x.tooltipTitle, enterDelay: 10, ...s, children: /* @__PURE__ */ _(et, { sx: {
|
1355
|
+
...f && J.showDivider,
|
1356
|
+
...u && J.clickable,
|
1357
|
+
...r === x.id && J.selected,
|
1358
|
+
...x.disabled && J.disabled
|
1359
|
+
}, onClick: () => {
|
1360
|
+
x.disabled || u == null || u(x);
|
1361
|
+
}, children: [
|
1362
|
+
/* @__PURE__ */ l(ae, { primary: x.label, sx: J.firstColumn }),
|
1363
|
+
/* @__PURE__ */ l(ae, { primary: x.value, sx: J.secondColumn })
|
1364
|
+
] }) }, `list-item-${v}`), e[14] = u, e[15] = r, e[16] = f, e[17] = s, e[18] = p) : p = e[18], S = b.map(p), e[8] = b, e[9] = u, e[10] = r, e[11] = f, e[12] = s, e[13] = S;
|
1365
|
+
} else
|
1366
|
+
S = e[13];
|
1367
|
+
let A;
|
1368
|
+
e[19] !== S ? (A = /* @__PURE__ */ l(tt, { id: "expandable-list", children: S }), e[19] = S, e[20] = A) : A = e[20];
|
1369
|
+
let T;
|
1370
|
+
e[21] !== i.length || e[22] !== D || e[23] !== d || e[24] !== m || e[25] !== h ? (T = i.length > d && /* @__PURE__ */ l(ye, { onClick: D, sx: J.button, variant: "text", color: "primary", "aria-expanded": h, "aria-controls": "expandable-list", children: h ? m.showLess : m.showMore }), e[21] = i.length, e[22] = D, e[23] = d, e[24] = m, e[25] = h, e[26] = T) : T = e[26];
|
1371
|
+
let y;
|
1372
|
+
return e[27] !== A || e[28] !== T ? (y = /* @__PURE__ */ _(P, { children: [
|
1373
|
+
A,
|
1374
|
+
T
|
1375
|
+
] }), e[27] = A, e[28] = T, e[29] = y) : y = e[29], y;
|
1376
|
+
}
|
1377
|
+
export {
|
1378
|
+
ro as AreaIcon,
|
1379
|
+
lo as BufferIcon,
|
1380
|
+
to as DEFAULT_LASSO_TOOLS_MODES_MAPPING,
|
1381
|
+
q as DEFAULT_MEASUREMENT_TOOLS_LABELS,
|
1382
|
+
Vt as DEFAULT_MEASUREMENT_TOOLS_UNITS_MAPPING,
|
1383
|
+
pt as DrawCircleIcon,
|
1384
|
+
gt as DrawLassoIcon,
|
1385
|
+
ht as DrawPolygonIcon,
|
1386
|
+
ft as DrawSquareIcon,
|
1387
|
+
ao as GeolocationControls,
|
1388
|
+
E as LASSO_TOOLS_LABELS,
|
1389
|
+
io as LassoToolsInlineUI,
|
1390
|
+
oo as LassoToolsUI,
|
1391
|
+
uo as ListDataUI,
|
1392
|
+
co as MeasurementToolsUI,
|
1393
|
+
no as RulerIcon,
|
1394
|
+
vt as SelectToolIcon,
|
1395
|
+
so as ZoomControlsUI
|
1396
|
+
};
|
1397
|
+
//# sourceMappingURL=components.js.map
|