@map-colonies/react-components 4.5.0 → 4.6.0
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/@map-colonies/react-components.es.js +1277 -1148
- package/dist/@map-colonies/react-components.umd.js +10 -10
- package/dist/cesium-map/settings/settings.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/ol-map/feature.d.ts +3 -0
- package/dist/ol-map/index.d.ts +6 -0
- package/dist/ol-map/interactions/index.d.ts +1 -0
- package/dist/ol-map/layers/index.d.ts +3 -0
- package/dist/ol-map/layers/vector-tile-layer.d.ts +10 -0
- package/dist/ol-map/source/index.d.ts +6 -0
- package/dist/ol-map/source/mvt.d.ts +11 -0
- package/dist/ol-map/source/wms.d.ts +17 -0
- package/dist/ol-map/source/wmts.d.ts +21 -0
- package/dist/ol-map/source/xyz.d.ts +12 -0
- package/dist/ol-map/style.d.ts +4 -0
- package/package.json +2 -2
|
@@ -1,56 +1,63 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('body[dir=rtl] .drpOpener .mdc-text-field{direction:ltr}body[dir=rtl] .drpContainer .MuiInputLabel-formControl{right:0px;left:unset}body[dir=rtl] .drpContainer .MuiInputBase-input{direction:ltr;text-align:end}.map{height:100%;width:100%}.ol-mouse-position{top:auto!important;right:auto!important;bottom:8px;left:8px;background-color:#fff;opacity:.7;font-size:12px;padding:2px;border-radius:2px}.ol-zoom{top:2.5em;right:.5em;left:unset}.trackerPosition{background-color:var(--mdc-theme-surface);z-index:2000;padding:2px;border-radius:2px;font-size:12px;height:24px;text-align:center;line-height:20px;white-space:nowrap}.scalePosition{background-color:var(--mdc-theme-surface);padding:1px;border-radius:2px;font-size:12px;width:110px}.scale-tracker-label{text-align:center}.scale-tracker-bar{background:var(--mdc-theme-on-surface);margin:0 auto;display:block;transition:all .5s ease-in-out}.zoomLevel{z-index:2000;background-color:var(--mdc-theme-surface);border-radius:2px;padding:2px;height:24px}.zoomLevelValue{margin:2px;font-size:14px;line-height:10px;text-align:center}.zoomLevelLabel{font-size:8px;line-height:8px}.mapViewIcon{fill:#fff;width:40px;height:40px;background:#303336;border:1px solid #444;border-radius:4px}.mapViewIcon:hover{background:#48b;border-color:#aef}.mapViewCurrent{fill:#aef;border:1px solid #aef;border-radius:4px}.mapSelector{width:260px;list-style:none;padding-left:0;display:flex;flex-wrap:wrap;grid-gap:4px;min-height:140px;margin-block-start:0px;padding-inline-start:0px}.mapContainerSelected{border:blueviolet 2px solid!important;border-radius:2px}.mapContainer:hover{border:tomato 2px solid;border-radius:2px}.mapContainerImg{width:100%;height:100%}.mapLabel{font-size:12px}.mapLabel:before{content:"\\a0"}.mapScenesContainer{display:flex;gap:8px}.settingsIconContainer,.mapLegendToggleContainer{fill:#fff;width:40px;height:40px;background:#303336;border:1px solid #444;border-radius:4px}.settingsIconContainer:hover,.mapLegendToggleContainer:hover{background:#48b;border-color:#aef}.baseMapsContainer{margin-top:12px;min-height:58%}.settingsDialogPortal{transform:translateZ(0);height:calc(100vh - 220px);max-height:460px;width:280px;position:absolute;top:40px;right:80px}.settingsDialogPortal .mdc-dialog__container{align-items:unset}.settingsDialogPortal .mdc-dialog .mdc-dialog__surface{max-height:unset}body[dir=rtl] .settingsDialogPortal{left:80px;right:unset}.sectionLabel{margin-block-end:.5em}.mapLegendSidebarContainer{width:340px;height:100%;position:relative;overflow-y:auto;overflow-x:hidden;font-size:16px}.mapLegendSidebarContainer.mdc-drawer--animate{transform:translate(0)!important;transition:none!important}.mapLegendSidebarContainer.mdc-drawer--dismissible{position:relative}div.MuiPaper-root{transition:none!important}.mapLegendCloseBtn{position:absolute;top:0;right:0;cursor:pointer;width:50px;height:50px;padding:20px;font-size:24px}body[dir=rtl] .mapLegendCloseBtn{right:unset;left:0}.mapLegendToggleContainer{display:flex;align-items:center;justify-content:center}.mapLegendIcon{width:2rem;height:2rem;transform:translate(8%,8%)}.sidebarHeaderContainer{text-align:center;margin-top:40px}.sidebarTitle{font-size:1.5rem;font-weight:700}.mapLegend{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:10px 14px}.layerNameContainer{width:90%;display:flex;justify-content:center;align-items:center}.layerName{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.legendImg{width:90%;height:150px;border:1px solid black;border-radius:5px;object-fit:cover;cursor:pointer}.legendActionsContainer{display:flex;flex-direction:row;align-self:center}.legendAction:not(:last-child):after{content:"|";margin:0 4px}.mapLegendsList{display:flex;flex-direction:column;padding:20px 0;width:100%;height:90%}.legendAction{text-decoration:underline;cursor:pointer;font-size:1.1rem;transition:all .1s ease-in-out;width:max-content}.legendAction:hover{filter:brightness(1.2)}.noLegendsContainer{width:100%;height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center}.noLegendsMsg{text-align:center}.cesium-widget-credits{display:none!important}.cesium-viewer-fullscreenContainer{bottom:8px;right:8px;left:unset}body[dir=rtl] .cesium-viewer-fullscreenContainer{left:8px;right:unset}body[dir=rtl] .cesium-viewer-toolbar{left:5px;right:unset}.cesium-button.cesium-fullscreenButton{border-radius:14%}.toolsContainer{color:var(--mdc-theme-on-surface);display:flex;gap:8px;z-index:2000;position:absolute;bottom:12px;right:40px;opacity:.7}body[dir=rtl] .toolsContainer{left:40px;right:unset}.sideToolsContainer{display:flex;flex-direction:row;gap:8px;z-index:2000;position:absolute;top:12px;right:40px}body[dir=rtl] .sideToolsContainer{left:40px;right:unset}.viewer{display:flex;flex-direction:row}.viewer .mdc-linear-progress__bar-inner{border-top-width:10px}.compass.rtl{right:unset;left:20px}.compass.ltr{left:unset;right:20px}.twipsy{display:block;position:absolute;visibility:visible;max-width:200px;min-width:100px;padding:5px;font-size:11px;z-index:1000;opacity:.8;-khtml-opacity:.8;-moz-opacity:.8;filter:alpha(opacity=80)}.twipsy.left .twipsy-arrow{top:50%;right:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid #000000}.twipsy.right .twipsy-arrow{top:50%;left:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-right:5px solid #000000}.twipsy-inner{padding:3px 8px;background-color:#000;color:#fff;text-align:center;max-width:200px;text-decoration:none;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.twipsy-arrow{position:absolute;width:0;height:0}.toolbar{margin:0;padding:0;background:white}.toolbar>.button{margin:5px;padding:5px;border:1px solid #eee;cursor:pointer}.toolbar>.button:hover{background:#eee}.infoWindow{position:absolute;min-width:100px;max-width:300px}.infoWindow #frame{padding:10px;border:1px solid black;background:white}.infoWindow #close{float:right;margin:5px 2px;font-size:small;color:gray;cursor:pointer}.infoWindow #arrow{position:absolute;bottom:-8px;left:50%;margin-left:-10px;border-right:10px solid transparent;border-left:10px solid transparent;border-top:10px solid white}.react-autocomplete-input{background-clip:padding-box;background-color:#fff;bottom:auto;box-shadow:0 6px 12px #0000002d;display:block;font-size:14px;list-style:none;padding:1px;position:absolute;z-index:20000;margin-block-start:unset;margin-block-end:unset}.react-autocomplete-input>li{cursor:pointer;padding:10px;min-width:100px}.react-autocomplete-input>li.active{background-color:#337ab7;color:#fff}body[dir=rtl] .chonky-fileListWrapper [class^=listContainer-]{direction:rtl!important}body[dir=rtl] .chonky-fileEntryClickableWrapper [class^=listFileEntryProperty-],body[dir=rtl] .chonky-navbarContainer{direction:ltr!important}body[dir=rtl] .chonky-chonkyRoot{text-align:right}body[dir=rtl] .chonky-infoText{margin-left:unset;margin-right:12px}body[dir=rtl] .chonky-contextMenuList .MuiListItemText-root,body[dir=rtl] .chonky-dropdownList .MuiListItemText-root{text-align:right}body[dir=rtl] .chonky-icon{margin-right:unset;margin-left:8px}.chonky-chonkyRoot div[class^=folderBackSide]{box-shadow:unset}.chonky-chonkyRoot div[class^=folderBackSide]:after{border-color:var(--fp-theme-background, #fff) var(--fp-theme-background, #fff) transparent transparent}.chonky-chonkyRoot div[class^=listFileEntryIcon-]{color:#d5d5d5}.chonky-chonkyRoot div[class*=previewFile-d]{background-color:#d5d5d5}.chonky-chonkyRoot div[class^=selectionIndicator-]{background:var(--fp-theme-selection-background, #455570)}.chonky-chonkyRoot{background-color:var(--fp-theme-background, #fff)!important}.chonky-contextMenuList{background-color:var(--fp-theme-surface, #fff)!important}button[class*=chonky-activeButton],.chonky-selectionSizeText{color:var(--fp-theme-primary, #24aee9)!important}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var X = (e, n, t) => (
|
|
2
|
+
var fn = Object.defineProperty;
|
|
3
|
+
var yn = (e, n, t) => n in e ? fn(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
|
|
4
|
+
var X = (e, n, t) => (yn(e, typeof n != "symbol" ? n + "" : n, t), t);
|
|
5
5
|
import { jsx as l, jsxs as N, Fragment as te } from "react/jsx-runtime";
|
|
6
|
-
import * as
|
|
7
|
-
import Ee, { useState as
|
|
8
|
-
import { isValid as
|
|
9
|
-
import { he as
|
|
10
|
-
import { MuiPickersUtilsProvider as
|
|
11
|
-
import
|
|
12
|
-
import { createTheme as
|
|
13
|
-
import { Box as
|
|
14
|
-
import { useTheme as
|
|
15
|
-
import { default as
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import { Map as
|
|
6
|
+
import * as Vt from "react";
|
|
7
|
+
import Ee, { useState as x, useEffect as D, useMemo as Re, forwardRef as vn, createContext as Le, useContext as _e, useRef as Se, useLayoutEffect as Gt, useCallback as me } from "react";
|
|
8
|
+
import { isValid as Pe, isBefore as En, format as Et, endOfDay as Cn, isSameDay as Ct } from "date-fns";
|
|
9
|
+
import { he as zt, enUS as $t } from "date-fns/locale";
|
|
10
|
+
import { MuiPickersUtilsProvider as Wt, KeyboardDateTimePicker as it, KeyboardDatePicker as wn } from "@material-ui/pickers";
|
|
11
|
+
import Ut from "@date-io/date-fns";
|
|
12
|
+
import { createTheme as Tn, makeStyles as Ne, createStyles as je } from "@material-ui/core/styles";
|
|
13
|
+
import { Box as bn, ThemeProvider as jt, Popover as Sn, Paper as rt, TableRow as ze, TableCell as xe, TableSortLabel as Ln, IconButton as _n, Collapse as Mn, TableContainer as Pn, Table as In, TableBody as Dn, Typography as xn, TablePagination as On } from "@material-ui/core";
|
|
14
|
+
import { useTheme as Kt, ThemeProvider as An, Button as ke, TextField as $e, Tooltip as ot, Menu as kn, MenuItem as Xe, Icon as Oe, Dialog as Rn, DialogTitle as Nn, DialogContent as Bn, Drawer as Fn, DrawerHeader as Hn, DrawerTitle as Vn, DrawerContent as Gn, LinearProgress as zn } from "@map-colonies/react-core";
|
|
15
|
+
import { default as za } from "@material-ui/core/useMediaQuery";
|
|
16
|
+
import $n, { registerLocale as Wn } from "react-datepicker";
|
|
17
|
+
import Un from "date-fns/locale/he";
|
|
18
|
+
import Ie from "moment";
|
|
19
|
+
import jn from "@turf/rewind";
|
|
20
|
+
import { Map as Kn, View as qn } from "ol";
|
|
21
21
|
import "ol/ol.css";
|
|
22
|
-
import { format as
|
|
23
|
-
import { defaults as
|
|
24
|
-
import
|
|
25
|
-
import { transform as
|
|
26
|
-
import { Tile as
|
|
27
|
-
import { Vector as
|
|
28
|
-
import { GeoJSON as
|
|
29
|
-
import { Draw as
|
|
30
|
-
import { createBox as
|
|
31
|
-
import
|
|
32
|
-
import {
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import
|
|
36
|
-
import
|
|
22
|
+
import { format as wt } from "ol/coordinate";
|
|
23
|
+
import { defaults as Yn, FullScreen as Tt } from "ol/control";
|
|
24
|
+
import Ze from "ol/control/MousePosition";
|
|
25
|
+
import { transform as Xn, get as Zn } from "ol/proj";
|
|
26
|
+
import { Tile as Jn, Vector as Qn } from "ol/layer";
|
|
27
|
+
import { Vector as ei, OSM as ti, WMTS as ni } from "ol/source";
|
|
28
|
+
import { GeoJSON as qt, MVT as ii } from "ol/format";
|
|
29
|
+
import { Draw as ri } from "ol/interaction";
|
|
30
|
+
import { createBox as oi } from "ol/interaction/Draw";
|
|
31
|
+
import si from "ol/layer/VectorTile";
|
|
32
|
+
import { Fill as ai, Stroke as li, Style as ci, Circle as di } from "ol/style";
|
|
33
|
+
import ui from "ol/tilegrid/WMTS";
|
|
34
|
+
import { getWidth as hi, getTopLeft as mi } from "ol/extent";
|
|
35
|
+
import pi from "ol/source/TileWMS";
|
|
36
|
+
import gi from "ol/source/XYZ";
|
|
37
|
+
import fi from "ol/source/VectorTile";
|
|
38
|
+
import yi from "@material-ui/core/TableHead";
|
|
39
|
+
import { createSvgIcon as Yt } from "@material-ui/core/utils";
|
|
40
|
+
import vi from "@material-ui/core/CssBaseline";
|
|
41
|
+
import Ei from "@material-ui/core/ScopedCssBaseline";
|
|
42
|
+
import { createPortal as Ci } from "react-dom";
|
|
43
|
+
import { Viewer as wi, Cesium3DTileset as Ti, GeoJsonDataSource as bi, ImageryLayer as Si, Entity as Li, EntityDescription as Xt, PolygonGraphics as _i, RectangleGraphics as Mi, CustomDataSource as Pi, PolylineGraphics as Ii } from "resium";
|
|
37
44
|
import * as p from "cesium";
|
|
38
|
-
import { Math as ge, SceneMode as
|
|
39
|
-
import { Math as
|
|
40
|
-
import { get as Z, isNumber as
|
|
41
|
-
import
|
|
45
|
+
import { Math as ge, SceneMode as be, Cartesian2 as Ce, Cartographic as Be, PolylineDashMaterialProperty as Di, ConstantProperty as xi, ConstantPositionProperty as Oi, Cartesian3 as ve, BoundingSphere as Ai, Ellipsoid as Zt, GeographicTilingScheme as ki, Rectangle as De, Resource as Ri, EllipsoidTerrainProvider as Ni, CesiumTerrainProvider as Bi, VerticalOrigin as st, LabelStyle as Jt, ScreenSpaceEventType as Fi, WebMercatorProjection as Hi, EventHelper as Vi, EllipsoidGeodesic as Gi, UrlTemplateImageryProvider as ht, WebMapServiceImageryProvider as mt, WebMapTileServiceImageryProvider as pt, Event as zi, SingleTileImageryProvider as $i, Viewer as Wi, Matrix4 as Ui, OpenStreetMapImageryProvider as ji, Color as at, PolygonHierarchy as Ki, viewerCesiumInspectorMixin as qi, sampleTerrainMostDetailed as Yi } from "cesium";
|
|
46
|
+
import { Math as Wa, sampleTerrainMostDetailed as Ua } from "cesium";
|
|
47
|
+
import { get as Z, isNumber as We, isEmpty as lt, isArray as Xi, cloneDeep as Zi, find as bt } from "lodash";
|
|
48
|
+
import Ji from "@turf/boolean-point-in-polygon";
|
|
42
49
|
import "@map-colonies/react-core/dist/linear-progress/styles";
|
|
43
|
-
import
|
|
50
|
+
import Qi from "@cmcleese/cesium-navigation";
|
|
44
51
|
import "@cmcleese/cesium-navigation/dist/index.css";
|
|
45
|
-
import * as
|
|
46
|
-
import
|
|
47
|
-
import
|
|
48
|
-
import
|
|
49
|
-
import
|
|
50
|
-
import { ChonkyActions as
|
|
51
|
-
import { ChonkyIconFA as
|
|
52
|
-
import
|
|
53
|
-
var ae = /* @__PURE__ */ ((e) => (e.BOX = "BOX", e.POLYGON = "POLYGON", e.UNKNOWN = "UNKNOWN", e))(ae || {}), ue = /* @__PURE__ */ ((e) => (e.HE = "he", e.EN = "en", e.RU = "ru", e))(ue || {}),
|
|
52
|
+
import * as Qt from "@turf/helpers";
|
|
53
|
+
import en from "@turf/bbox";
|
|
54
|
+
import tn from "@turf/bbox-polygon";
|
|
55
|
+
import er from "textarea-caret";
|
|
56
|
+
import tr, { setCaretPosition as nr } from "get-input-selection";
|
|
57
|
+
import { ChonkyActions as V, FileHelper as nn, setChonkyDefaults as ir, FullFileBrowser as rr } from "chonky";
|
|
58
|
+
import { ChonkyIconFA as or } from "chonky-icon-fontawesome";
|
|
59
|
+
import sr from "filesize";
|
|
60
|
+
var ae = /* @__PURE__ */ ((e) => (e.BOX = "BOX", e.POLYGON = "POLYGON", e.UNKNOWN = "UNKNOWN", e))(ae || {}), ue = /* @__PURE__ */ ((e) => (e.HE = "he", e.EN = "en", e.RU = "ru", e))(ue || {}), ct = /* @__PURE__ */ ((e) => (e.TOP_RIGHT = "TOP_RIGHT", e.BOTTOM_LEFT = "BOTTOM_LEFT", e))(ct || {});
|
|
54
61
|
const J = {
|
|
55
62
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
56
63
|
DATE_PICKER: {
|
|
@@ -80,11 +87,11 @@ const J = {
|
|
|
80
87
|
}
|
|
81
88
|
}, ce = (e) => {
|
|
82
89
|
const { children: n, ...t } = e;
|
|
83
|
-
return /* @__PURE__ */ l(
|
|
84
|
-
},
|
|
90
|
+
return /* @__PURE__ */ l(bn, { ...t, children: n });
|
|
91
|
+
}, rn = (e) => {
|
|
85
92
|
const n = e.type === "dark";
|
|
86
|
-
return Ee.useMemo(() =>
|
|
87
|
-
},
|
|
93
|
+
return Ee.useMemo(() => ar(e, n), [n, e]);
|
|
94
|
+
}, ar = (e, n = !1) => Tn({
|
|
88
95
|
palette: {
|
|
89
96
|
type: n ? "dark" : "light",
|
|
90
97
|
primary: {
|
|
@@ -106,78 +113,78 @@ const J = {
|
|
|
106
113
|
}
|
|
107
114
|
}
|
|
108
115
|
});
|
|
109
|
-
const
|
|
110
|
-
(e) =>
|
|
116
|
+
const lr = 2, cr = 0.5, dr = Ne(
|
|
117
|
+
(e) => je({
|
|
111
118
|
container: {
|
|
112
|
-
padding: e.spacing(
|
|
119
|
+
padding: e.spacing(lr),
|
|
113
120
|
alignItems: "center"
|
|
114
121
|
},
|
|
115
122
|
setButton: {
|
|
116
123
|
marginTop: e.spacing(1)
|
|
117
124
|
},
|
|
118
125
|
margin: {
|
|
119
|
-
marginLeft: e.spacing(
|
|
126
|
+
marginLeft: e.spacing(cr)
|
|
120
127
|
}
|
|
121
128
|
})
|
|
122
|
-
),
|
|
123
|
-
var
|
|
124
|
-
const n =
|
|
125
|
-
|
|
129
|
+
), ur = (e) => {
|
|
130
|
+
var K, O, $, A;
|
|
131
|
+
const n = dr(), t = Kt(), i = rn(t), [o, r] = x(null), [c, u] = x(null), [m, g] = x(J.DATE_RANGE_PICKER.dateFormat), E = e.controlsLayout ?? J.DATE_RANGE_PICKER.controlsLayout, S = e.disableFuture ?? J.DATE_RANGE_PICKER.disableFuture, w = ((K = e.local) == null ? void 0 : K.startPlaceHolderText) ?? J.DATE_RANGE_PICKER.local.startPlaceHolderText, P = ((O = e.local) == null ? void 0 : O.endPlaceHolderText) ?? J.DATE_RANGE_PICKER.local.endPlaceHolderText, R = (($ = e.local) == null ? void 0 : $.setText) ?? J.DATE_RANGE_PICKER.local.setText, q = (((A = e.local) == null ? void 0 : A.calendarLocale) ?? J.DATE_RANGE_PICKER.local.calendarLocale) === ue.HE ? zt : $t;
|
|
132
|
+
D(() => {
|
|
126
133
|
r(e.from ?? null);
|
|
127
|
-
}, [e.from]),
|
|
134
|
+
}, [e.from]), D(() => {
|
|
128
135
|
u(e.to ?? null);
|
|
129
|
-
}, [e.to]),
|
|
130
|
-
|
|
136
|
+
}, [e.to]), D(() => {
|
|
137
|
+
g(e.dateFormat ?? J.DATE_RANGE_PICKER.dateFormat);
|
|
131
138
|
}, [e.dateFormat]);
|
|
132
139
|
const H = Boolean(
|
|
133
|
-
|
|
134
|
-
),
|
|
140
|
+
Pe(o) && !c || Pe(c) && !o || o && c && Pe(o) && Pe(c) && En(o, c)
|
|
141
|
+
), j = () => {
|
|
135
142
|
e.onChange({
|
|
136
|
-
from: o &&
|
|
137
|
-
to: c &&
|
|
143
|
+
from: o && Pe(o) ? o : void 0,
|
|
144
|
+
to: c && Pe(c) ? c : void 0
|
|
138
145
|
});
|
|
139
146
|
};
|
|
140
|
-
return /* @__PURE__ */ l(
|
|
147
|
+
return /* @__PURE__ */ l(jt, { theme: i, children: /* @__PURE__ */ l(
|
|
141
148
|
ce,
|
|
142
149
|
{
|
|
143
150
|
className: `${n.container} drpContainer`,
|
|
144
151
|
display: "flex",
|
|
145
152
|
flexDirection: E,
|
|
146
153
|
width: E === "column" ? e.contentWidth : "unset",
|
|
147
|
-
children: /* @__PURE__ */ N(
|
|
154
|
+
children: /* @__PURE__ */ N(Wt, { utils: Ut, locale: q, children: [
|
|
148
155
|
/* @__PURE__ */ l(
|
|
149
|
-
|
|
156
|
+
it,
|
|
150
157
|
{
|
|
151
158
|
variant: "inline",
|
|
152
159
|
placeholder: w,
|
|
153
160
|
onChange: (W) => r(W),
|
|
154
161
|
value: o,
|
|
155
|
-
disableFuture:
|
|
162
|
+
disableFuture: S,
|
|
156
163
|
format: m,
|
|
157
164
|
maxDate: e.maxDate,
|
|
158
165
|
minDate: e.minDate
|
|
159
166
|
}
|
|
160
167
|
),
|
|
161
168
|
/* @__PURE__ */ l(
|
|
162
|
-
|
|
169
|
+
it,
|
|
163
170
|
{
|
|
164
171
|
variant: "inline",
|
|
165
172
|
placeholder: P,
|
|
166
173
|
className: n.margin,
|
|
167
174
|
onChange: (W) => u(W),
|
|
168
175
|
value: c,
|
|
169
|
-
disableFuture:
|
|
176
|
+
disableFuture: S,
|
|
170
177
|
format: m,
|
|
171
178
|
maxDate: e.maxDate,
|
|
172
179
|
minDate: e.minDate
|
|
173
180
|
}
|
|
174
181
|
),
|
|
175
|
-
/* @__PURE__ */ l(
|
|
176
|
-
|
|
182
|
+
/* @__PURE__ */ l(An, { options: t, children: /* @__PURE__ */ l(
|
|
183
|
+
ke,
|
|
177
184
|
{
|
|
178
185
|
className: `${n.setButton} ${n.margin}`,
|
|
179
186
|
raised: !0,
|
|
180
|
-
onClick:
|
|
187
|
+
onClick: j,
|
|
181
188
|
disabled: !H,
|
|
182
189
|
children: R
|
|
183
190
|
}
|
|
@@ -185,35 +192,35 @@ const zi = 2, $i = 0.5, Wi = Ne(
|
|
|
185
192
|
] })
|
|
186
193
|
}
|
|
187
194
|
) });
|
|
188
|
-
},
|
|
195
|
+
}, hr = (e) => {
|
|
189
196
|
const { children: n, ...t } = e;
|
|
190
|
-
return /* @__PURE__ */ l(
|
|
197
|
+
return /* @__PURE__ */ l(Sn, { ...t, children: n });
|
|
191
198
|
};
|
|
192
|
-
const
|
|
193
|
-
var
|
|
194
|
-
const [n, t] =
|
|
195
|
-
m(
|
|
196
|
-
}, E = (
|
|
197
|
-
|
|
198
|
-
},
|
|
199
|
+
const Us = (e) => {
|
|
200
|
+
var O, $;
|
|
201
|
+
const [n, t] = x(null), [i, o] = x(null), [r, c] = x(J.DATE_RANGE_PICKER.dateFormat), [u, m] = Ee.useState(null), g = (A) => {
|
|
202
|
+
m(A.currentTarget);
|
|
203
|
+
}, E = (A) => {
|
|
204
|
+
A.currentTarget.tagName === "I" ? m(A.currentTarget.previousElementSibling) : m(A.currentTarget);
|
|
205
|
+
}, S = () => {
|
|
199
206
|
m(null);
|
|
200
207
|
}, w = Boolean(u), P = e.controlsLayout ?? "column";
|
|
201
|
-
|
|
208
|
+
D(() => {
|
|
202
209
|
t(e.from ?? null);
|
|
203
|
-
}, [e.from]),
|
|
210
|
+
}, [e.from]), D(() => {
|
|
204
211
|
o(e.to ?? null);
|
|
205
|
-
}, [e.to]),
|
|
212
|
+
}, [e.to]), D(() => {
|
|
206
213
|
c(e.dateFormat ?? J.DATE_RANGE_PICKER.dateFormat);
|
|
207
214
|
}, [e.dateFormat]);
|
|
208
|
-
const R = ((
|
|
215
|
+
const R = ((O = e.local) == null ? void 0 : O.startPlaceHolderText) ?? J.DATE_RANGE_PICKER.local.startPlaceHolderText, G = (($ = e.local) == null ? void 0 : $.endPlaceHolderText) ?? J.DATE_RANGE_PICKER.local.endPlaceHolderText, q = e.renderAsButton === void 0 ? J.DATE_RANGE_PICKER.renderAsButton : e.renderAsButton, H = e.offset === void 0 ? J.DATE_RANGE_PICKER.offset : e.offset, j = e.disableFuture === void 0 ? J.DATE_RANGE_PICKER.disableFuture : e.disableFuture, K = Re(() => `${n ? Et(n, r) : R} - ${i ? Et(i, r) : G}`, [n, i, r, R, G]);
|
|
209
216
|
return /* @__PURE__ */ N(te, { children: [
|
|
210
|
-
q ? /* @__PURE__ */ l(
|
|
211
|
-
|
|
217
|
+
q ? /* @__PURE__ */ l(ke, { style: { width: e.width }, raised: !0, onClick: g, className: "drpOpener", children: K }) : /* @__PURE__ */ l(
|
|
218
|
+
$e,
|
|
212
219
|
{
|
|
213
220
|
className: "drpOpener",
|
|
214
221
|
readOnly: !0,
|
|
215
222
|
style: { width: e.width },
|
|
216
|
-
value:
|
|
223
|
+
value: K,
|
|
217
224
|
onClick: E,
|
|
218
225
|
trailingIcon: {
|
|
219
226
|
icon: "date_range",
|
|
@@ -222,25 +229,25 @@ const hs = (e) => {
|
|
|
222
229
|
}
|
|
223
230
|
}
|
|
224
231
|
),
|
|
225
|
-
/* @__PURE__ */ l(
|
|
226
|
-
|
|
232
|
+
/* @__PURE__ */ l(hr, { open: w, anchorEl: u, onClose: S, anchorOrigin: { vertical: "bottom", horizontal: "left" }, keepMounted: !0, children: /* @__PURE__ */ l(
|
|
233
|
+
ur,
|
|
227
234
|
{
|
|
228
235
|
controlsLayout: P,
|
|
229
236
|
contentWidth: ((u == null ? void 0 : u.clientWidth) ?? 0) - H,
|
|
230
237
|
dateFormat: r,
|
|
231
|
-
disableFuture:
|
|
238
|
+
disableFuture: j,
|
|
232
239
|
minDate: e.minDate,
|
|
233
240
|
maxDate: e.maxDate,
|
|
234
241
|
local: e.local,
|
|
235
242
|
from: n ?? void 0,
|
|
236
243
|
to: i ?? void 0,
|
|
237
|
-
onChange: ({ from:
|
|
238
|
-
t(
|
|
244
|
+
onChange: ({ from: A, to: W }) => {
|
|
245
|
+
t(A ?? null), o(W ?? null), e.onChange({ from: A, to: W }), S();
|
|
239
246
|
}
|
|
240
247
|
}
|
|
241
248
|
) })
|
|
242
249
|
] });
|
|
243
|
-
},
|
|
250
|
+
}, Je = (e) => typeof e < "u" && e !== null && "startDate" in e && "endDate" in e, js = ({
|
|
244
251
|
endDate: e,
|
|
245
252
|
startDate: n,
|
|
246
253
|
setEndDate: t = () => {
|
|
@@ -252,20 +259,20 @@ const hs = (e) => {
|
|
|
252
259
|
endTimeWrapperClassName: c = "",
|
|
253
260
|
timeRangeInputsWrapperClassName: u = "",
|
|
254
261
|
startTimeInputClassName: m = "",
|
|
255
|
-
startTimeLabel:
|
|
262
|
+
startTimeLabel: g = "",
|
|
256
263
|
startTimeWrapperClassName: E = ""
|
|
257
264
|
}) => /* @__PURE__ */ N("div", { className: `timeRangeWrapper ${u}`, children: [
|
|
258
265
|
/* @__PURE__ */ l("div", { className: `startTimeWrapper ${E}`, children: /* @__PURE__ */ l(
|
|
259
|
-
|
|
266
|
+
$e,
|
|
260
267
|
{
|
|
261
|
-
label:
|
|
268
|
+
label: g,
|
|
262
269
|
disabled: n === null,
|
|
263
270
|
className: `timeRangeInput ${m}`,
|
|
264
271
|
name: "start-time",
|
|
265
272
|
type: "time",
|
|
266
|
-
value:
|
|
267
|
-
onChange: (
|
|
268
|
-
const w =
|
|
273
|
+
value: Ie(n).format("HH:mm"),
|
|
274
|
+
onChange: (S) => {
|
|
275
|
+
const w = Ie(n), P = Ie(S.currentTarget.value, "HH:mm"), R = w.set({
|
|
269
276
|
hours: P.get("hours"),
|
|
270
277
|
minutes: P.get("minutes")
|
|
271
278
|
});
|
|
@@ -274,16 +281,16 @@ const hs = (e) => {
|
|
|
274
281
|
}
|
|
275
282
|
) }),
|
|
276
283
|
/* @__PURE__ */ l("div", { className: `endTimeWrapper ${c}`, children: /* @__PURE__ */ l(
|
|
277
|
-
|
|
284
|
+
$e,
|
|
278
285
|
{
|
|
279
286
|
label: r,
|
|
280
287
|
disabled: e === null,
|
|
281
288
|
className: `timeRangeInput ${o}`,
|
|
282
289
|
name: "end-time",
|
|
283
290
|
type: "time",
|
|
284
|
-
value:
|
|
285
|
-
onChange: (
|
|
286
|
-
const w =
|
|
291
|
+
value: Ie(e).format("HH:mm"),
|
|
292
|
+
onChange: (S) => {
|
|
293
|
+
const w = Ie(e), P = Ie(S.currentTarget.value, "HH:mm"), R = w.set({
|
|
287
294
|
hours: P.get("hours"),
|
|
288
295
|
minutes: P.get("minutes")
|
|
289
296
|
});
|
|
@@ -291,9 +298,9 @@ const hs = (e) => {
|
|
|
291
298
|
}
|
|
292
299
|
}
|
|
293
300
|
) })
|
|
294
|
-
] }),
|
|
301
|
+
] }), mr = vn(
|
|
295
302
|
({ value: e, onClick: n, onInputClick: t, ...i }, o) => /* @__PURE__ */ l(
|
|
296
|
-
|
|
303
|
+
$e,
|
|
297
304
|
{
|
|
298
305
|
...i,
|
|
299
306
|
className: "dateRangeCustomInput",
|
|
@@ -305,37 +312,37 @@ const hs = (e) => {
|
|
|
305
312
|
value: e
|
|
306
313
|
}
|
|
307
314
|
)
|
|
308
|
-
),
|
|
315
|
+
), pr = ({ setStartDate: e = () => {
|
|
309
316
|
}, setEndDate: n = () => {
|
|
310
317
|
}, shortcuts: t, dateRange: i, onShortcut: o }) => {
|
|
311
|
-
const [r, c] =
|
|
318
|
+
const [r, c] = x(), u = Re(
|
|
312
319
|
() => t.map((m) => m instanceof Function ? m() : m),
|
|
313
320
|
[t]
|
|
314
321
|
);
|
|
315
|
-
return
|
|
322
|
+
return D(() => {
|
|
316
323
|
for (const m of u) {
|
|
317
|
-
const
|
|
318
|
-
r ? m.id === r && (
|
|
324
|
+
const g = i.startDate && i.endDate && Ct(m.startDate, i.startDate) && Ct(m.endDate, i.endDate);
|
|
325
|
+
r ? m.id === r && (g || c(void 0)) : g && c(m.id);
|
|
319
326
|
}
|
|
320
|
-
}, [i, r, u]), /* @__PURE__ */ l("div", { className: "shortcutsContainer", children: u.map((m,
|
|
327
|
+
}, [i, r, u]), /* @__PURE__ */ l("div", { className: "shortcutsContainer", children: u.map((m, g) => {
|
|
321
328
|
const E = () => {
|
|
322
329
|
e(m.startDate), n(m.endDate);
|
|
323
330
|
};
|
|
324
331
|
return /* @__PURE__ */ l(
|
|
325
|
-
|
|
332
|
+
ke,
|
|
326
333
|
{
|
|
327
334
|
type: "button",
|
|
328
335
|
className: `shortcut ${r === m.id ? "selected" : ""}`,
|
|
329
|
-
onClick: (
|
|
336
|
+
onClick: (S) => {
|
|
330
337
|
E(), o == null || o({ startDate: m.startDate, endDate: m.endDate });
|
|
331
338
|
},
|
|
332
339
|
outlined: !0,
|
|
333
340
|
children: m.label
|
|
334
341
|
},
|
|
335
|
-
m.id +
|
|
342
|
+
m.id + g
|
|
336
343
|
);
|
|
337
344
|
}) });
|
|
338
|
-
},
|
|
345
|
+
}, Ks = Ee.forwardRef((e, n) => {
|
|
339
346
|
const {
|
|
340
347
|
// Time range input props
|
|
341
348
|
// endTimeInputClassName,
|
|
@@ -354,77 +361,77 @@ const hs = (e) => {
|
|
|
354
361
|
inputName: u,
|
|
355
362
|
showMonthYearDropdown: m,
|
|
356
363
|
// withTimeRange,
|
|
357
|
-
withShortcuts:
|
|
364
|
+
withShortcuts: g,
|
|
358
365
|
locale: E = "en"
|
|
359
|
-
} = e, [
|
|
360
|
-
|
|
361
|
-
E === "he" &&
|
|
362
|
-
}, [E]),
|
|
363
|
-
var
|
|
364
|
-
((
|
|
365
|
-
}, [e.startDate, e.endDate,
|
|
366
|
-
const
|
|
367
|
-
let
|
|
368
|
-
return
|
|
369
|
-
}, [E,
|
|
366
|
+
} = e, [S, w] = x(null), [P, R] = x(null), [G, q] = x(!1), H = r ? { startDate: S, endDate: P } : S;
|
|
367
|
+
D(() => {
|
|
368
|
+
E === "he" && Wn("he", Un);
|
|
369
|
+
}, [E]), D(() => {
|
|
370
|
+
var O, $;
|
|
371
|
+
((O = e.startDate) == null ? void 0 : O.toString()) !== (S == null ? void 0 : S.toString()) && w(e.startDate), (($ = e.endDate) == null ? void 0 : $.toString()) !== (P == null ? void 0 : P.toString()) && R(e.endDate);
|
|
372
|
+
}, [e.startDate, e.endDate, S, P]);
|
|
373
|
+
const j = Re(() => {
|
|
374
|
+
let O = "pickerContainer" + (E === "he" ? " pickerContainer-rtl" : "");
|
|
375
|
+
return g && r && (O += " pickerContainer-withShortcuts"), O;
|
|
376
|
+
}, [E, g, r]), K = m ? {
|
|
370
377
|
showMonthDropdown: !0,
|
|
371
378
|
showYearDropdown: !0,
|
|
372
379
|
dropdownMode: "select"
|
|
373
380
|
} : {};
|
|
374
|
-
return /* @__PURE__ */ l("div", { className:
|
|
375
|
-
|
|
381
|
+
return /* @__PURE__ */ l("div", { className: j, style: { direction: E === "he" ? "rtl" : "ltr" }, children: /* @__PURE__ */ l(
|
|
382
|
+
$n,
|
|
376
383
|
{
|
|
377
384
|
...e,
|
|
378
385
|
ref: n,
|
|
379
386
|
onClickOutside: () => q(!1),
|
|
380
|
-
open:
|
|
381
|
-
startDate:
|
|
382
|
-
selected:
|
|
383
|
-
endDate:
|
|
387
|
+
open: G,
|
|
388
|
+
startDate: Je(H) ? S : void 0,
|
|
389
|
+
selected: S,
|
|
390
|
+
endDate: Je(H) ? P : void 0,
|
|
384
391
|
monthsShown: e.monthsShown ?? 2,
|
|
385
392
|
calendarClassName: `pickerCalendar ${t}`,
|
|
386
|
-
weekDayClassName: (
|
|
387
|
-
dayClassName: (
|
|
388
|
-
monthClassName: (
|
|
389
|
-
onChange: (
|
|
390
|
-
if (Array.isArray(
|
|
391
|
-
const [
|
|
392
|
-
w(
|
|
393
|
+
weekDayClassName: (O) => `pickerWeek ${(i == null ? void 0 : i(O)) ?? ""}`,
|
|
394
|
+
dayClassName: (O) => `pickerDay ${(i == null ? void 0 : i(O)) ?? ""}`,
|
|
395
|
+
monthClassName: (O) => `pickerMonth ${(o == null ? void 0 : o(O)) ?? ""}`,
|
|
396
|
+
onChange: (O, $) => {
|
|
397
|
+
if (Array.isArray(O)) {
|
|
398
|
+
const [A, W] = O;
|
|
399
|
+
w(A), R(W), c == null || c({ startDate: A, endDate: W && Cn(W) }, $);
|
|
393
400
|
} else
|
|
394
|
-
w(
|
|
401
|
+
w(O), c == null || c(O, $);
|
|
395
402
|
},
|
|
396
|
-
customInput: /* @__PURE__ */ l(
|
|
403
|
+
customInput: /* @__PURE__ */ l(mr, { name: u, onInputClick: () => {
|
|
397
404
|
q(!0);
|
|
398
405
|
} }),
|
|
399
|
-
showTimeInput: !!(
|
|
406
|
+
showTimeInput: !!(g && r),
|
|
400
407
|
timeInputLabel: "",
|
|
401
|
-
customTimeInput:
|
|
402
|
-
c == null || c(
|
|
403
|
-
}, shortcuts:
|
|
408
|
+
customTimeInput: g && Je(H) && /* @__PURE__ */ l(pr, { onShortcut: (O) => {
|
|
409
|
+
c == null || c(O), q(!1);
|
|
410
|
+
}, shortcuts: g, setEndDate: R, setStartDate: w, dateRange: H }),
|
|
404
411
|
showMonthYearDropdown: void 0,
|
|
405
|
-
...
|
|
412
|
+
...K
|
|
406
413
|
}
|
|
407
414
|
) });
|
|
408
415
|
});
|
|
409
|
-
const
|
|
410
|
-
const n =
|
|
416
|
+
const qs = (e) => {
|
|
417
|
+
const n = Kt(), t = rn(n), [i, o] = x(e.value), {
|
|
411
418
|
format: r = J.DATE_PICKER.dateFormat,
|
|
412
419
|
variant: c = J.DATE_PICKER.variant,
|
|
413
420
|
disableFuture: u = J.DATE_PICKER.disableFuture,
|
|
414
421
|
local: m,
|
|
415
|
-
onChange:
|
|
422
|
+
onChange: g,
|
|
416
423
|
showTime: E = J.DATE_PICKER.showTime,
|
|
417
|
-
value:
|
|
424
|
+
value: S,
|
|
418
425
|
...w
|
|
419
426
|
} = e, { placeHolderText: P = J.DATE_PICKER.local.placeHolderText, calendarLocale: R } = m ?? {
|
|
420
427
|
placeHolderText: J.DATE_PICKER.local.placeHolderText,
|
|
421
428
|
calendarLocale: ue.EN
|
|
422
|
-
},
|
|
423
|
-
o(H),
|
|
429
|
+
}, G = R === ue.HE ? zt : $t, q = (H) => {
|
|
430
|
+
o(H), g(H);
|
|
424
431
|
};
|
|
425
|
-
return /* @__PURE__ */ l(
|
|
432
|
+
return /* @__PURE__ */ l(jt, { theme: t, children: /* @__PURE__ */ N(Wt, { utils: Ut, locale: G, children: [
|
|
426
433
|
E && /* @__PURE__ */ l(
|
|
427
|
-
|
|
434
|
+
it,
|
|
428
435
|
{
|
|
429
436
|
variant: c,
|
|
430
437
|
placeholder: P,
|
|
@@ -436,7 +443,7 @@ const gs = (e) => {
|
|
|
436
443
|
}
|
|
437
444
|
),
|
|
438
445
|
!E && /* @__PURE__ */ l(
|
|
439
|
-
|
|
446
|
+
wn,
|
|
440
447
|
{
|
|
441
448
|
variant: c,
|
|
442
449
|
placeholder: P,
|
|
@@ -448,54 +455,54 @@ const gs = (e) => {
|
|
|
448
455
|
}
|
|
449
456
|
)
|
|
450
457
|
] }) });
|
|
451
|
-
},
|
|
452
|
-
(e) =>
|
|
458
|
+
}, gr = 18, fr = Ne(
|
|
459
|
+
(e) => je({
|
|
453
460
|
drawingButton: {
|
|
454
|
-
width: e.spacing(
|
|
461
|
+
width: e.spacing(gr)
|
|
455
462
|
},
|
|
456
463
|
fullWidth: {
|
|
457
464
|
width: "100%",
|
|
458
465
|
marginTop: "36px"
|
|
459
466
|
}
|
|
460
467
|
})
|
|
461
|
-
),
|
|
462
|
-
const n =
|
|
468
|
+
), yr = (e) => {
|
|
469
|
+
const n = fr(), [t, i] = Ee.useState(null), { isSelectionEnabled: o, onCancelDraw: r, onStartDraw: c, onReset: u } = e, m = (E) => {
|
|
463
470
|
i(E.currentTarget);
|
|
464
|
-
},
|
|
471
|
+
}, g = () => {
|
|
465
472
|
i(null);
|
|
466
473
|
};
|
|
467
|
-
return o ? /* @__PURE__ */ l(
|
|
468
|
-
/* @__PURE__ */ l(
|
|
474
|
+
return o ? /* @__PURE__ */ l(ot, { content: "Cancel the ongoing draw", align: "bottomLeft", children: /* @__PURE__ */ l(ke, { className: n.drawingButton, raised: !0, onClick: r, children: "Cancel Draw" }) }) : /* @__PURE__ */ N(ce, { position: "relative", children: [
|
|
475
|
+
/* @__PURE__ */ l(ot, { content: "draw an Area of interest to limit the search", align: "bottomLeft", children: /* @__PURE__ */ l(ke, { className: n.drawingButton, raised: !0, onClick: m, children: "Draw AOI" }) }),
|
|
469
476
|
/* @__PURE__ */ N(
|
|
470
|
-
|
|
477
|
+
kn,
|
|
471
478
|
{
|
|
472
479
|
className: n.fullWidth,
|
|
473
480
|
open: Boolean(t),
|
|
474
|
-
onClose:
|
|
481
|
+
onClose: g,
|
|
475
482
|
children: [
|
|
476
483
|
/* @__PURE__ */ l(
|
|
477
|
-
|
|
484
|
+
Xe,
|
|
478
485
|
{
|
|
479
486
|
onClick: () => {
|
|
480
|
-
c(ae.POLYGON),
|
|
487
|
+
c(ae.POLYGON), g();
|
|
481
488
|
},
|
|
482
489
|
children: "Polygon"
|
|
483
490
|
}
|
|
484
491
|
),
|
|
485
492
|
/* @__PURE__ */ l(
|
|
486
|
-
|
|
493
|
+
Xe,
|
|
487
494
|
{
|
|
488
495
|
onClick: () => {
|
|
489
|
-
c(ae.BOX),
|
|
496
|
+
c(ae.BOX), g();
|
|
490
497
|
},
|
|
491
498
|
children: "Box"
|
|
492
499
|
}
|
|
493
500
|
),
|
|
494
501
|
/* @__PURE__ */ l(
|
|
495
|
-
|
|
502
|
+
Xe,
|
|
496
503
|
{
|
|
497
504
|
onClick: () => {
|
|
498
|
-
u(),
|
|
505
|
+
u(), g();
|
|
499
506
|
},
|
|
500
507
|
children: "Clear"
|
|
501
508
|
}
|
|
@@ -506,106 +513,108 @@ const gs = (e) => {
|
|
|
506
513
|
] });
|
|
507
514
|
};
|
|
508
515
|
var pe = /* @__PURE__ */ ((e) => (e.WGS84 = "EPSG:4326", e.WEB_MERCATOR = "EPSG:3857", e))(pe || {});
|
|
509
|
-
const
|
|
516
|
+
const dt = 5, ut = 2, on = Le(null), vr = on.Provider, St = 35, Lt = 32, Er = 10, Cr = (e) => e !== void 0 && e !== pe.WGS84 ? Xn([St, Lt], pe.WGS84, e) : [St, Lt], wr = (e) => {
|
|
510
517
|
switch (e) {
|
|
511
518
|
case pe.WEB_MERCATOR:
|
|
512
|
-
return (n) =>
|
|
519
|
+
return (n) => wt(n, "Mercator: {y}m, {x}m", ut);
|
|
513
520
|
case pe.WGS84:
|
|
514
|
-
return (n) =>
|
|
521
|
+
return (n) => wt(n, "WGS84: {y}°N {x}°E", dt);
|
|
515
522
|
default:
|
|
516
523
|
return (n) => "";
|
|
517
524
|
}
|
|
518
|
-
},
|
|
519
|
-
const e =
|
|
525
|
+
}, Fe = () => {
|
|
526
|
+
const e = _e(on);
|
|
520
527
|
if (e === null)
|
|
521
528
|
throw new Error("map context is null, please check the provider");
|
|
522
529
|
return e;
|
|
523
|
-
},
|
|
524
|
-
const n =
|
|
525
|
-
new
|
|
526
|
-
view: new
|
|
530
|
+
}, Tr = (e) => {
|
|
531
|
+
const n = Se(null), { allowFullScreen: t, showMousePosition: i, projection: o } = e, [r] = x(
|
|
532
|
+
new Kn({
|
|
533
|
+
view: new qn({
|
|
527
534
|
projection: o ?? pe.WGS84
|
|
528
535
|
}),
|
|
529
|
-
controls:
|
|
536
|
+
controls: Yn()
|
|
530
537
|
})
|
|
531
538
|
);
|
|
532
|
-
|
|
533
|
-
r.getView().setCenter(e.center ??
|
|
534
|
-
}, [r, e.center, e.projection]),
|
|
535
|
-
r.getView().setZoom(e.zoom ??
|
|
539
|
+
D(() => {
|
|
540
|
+
r.getView().setCenter(e.center ?? Cr(e.projection));
|
|
541
|
+
}, [r, e.center, e.projection]), D(() => {
|
|
542
|
+
r.getView().setZoom(e.zoom ?? Er);
|
|
536
543
|
}, [r, e.zoom, e.projection]);
|
|
537
544
|
const c = (u, m) => {
|
|
538
545
|
m.getControls().forEach((E) => {
|
|
539
546
|
E instanceof u && m.removeControl(E);
|
|
540
547
|
});
|
|
541
548
|
};
|
|
542
|
-
return
|
|
543
|
-
r.setTarget(n.current), t !== void 0 && t ? r.addControl(new
|
|
544
|
-
}, [r, t]),
|
|
545
|
-
i !== void 0 && i ? (c(
|
|
546
|
-
new
|
|
547
|
-
coordinateFormat:
|
|
549
|
+
return D(() => {
|
|
550
|
+
r.setTarget(n.current), t !== void 0 && t ? r.addControl(new Tt()) : c(Tt, r);
|
|
551
|
+
}, [r, t]), D(() => {
|
|
552
|
+
i !== void 0 && i ? (c(Ze, r), r.addControl(
|
|
553
|
+
new Ze({
|
|
554
|
+
coordinateFormat: wr(o ?? pe.WGS84),
|
|
548
555
|
projection: o ?? pe.WGS84,
|
|
549
556
|
undefinedHTML: " "
|
|
550
557
|
})
|
|
551
|
-
)) : c(
|
|
552
|
-
}, [r, i, o]), /* @__PURE__ */ N(
|
|
558
|
+
)) : c(Ze, r);
|
|
559
|
+
}, [r, i, o]), /* @__PURE__ */ N(vr, { value: r, children: [
|
|
553
560
|
/* @__PURE__ */ l("div", { className: "map", ref: n }),
|
|
554
561
|
e.children
|
|
555
562
|
] });
|
|
556
|
-
},
|
|
557
|
-
const e =
|
|
563
|
+
}, sn = Le(null), br = sn.Provider, Ke = () => {
|
|
564
|
+
const e = _e(sn);
|
|
558
565
|
if (e === null)
|
|
559
566
|
throw new Error("tile layer context is null, please check the provider");
|
|
560
567
|
return e;
|
|
561
|
-
},
|
|
562
|
-
const t =
|
|
563
|
-
return
|
|
568
|
+
}, Sr = ({ options: e, children: n }) => {
|
|
569
|
+
const t = Fe(), [i] = x(new Jn(e));
|
|
570
|
+
return D(() => (t.addLayer(i), () => {
|
|
564
571
|
t.removeLayer(i);
|
|
565
|
-
}), [t, i]), /* @__PURE__ */ l(
|
|
566
|
-
},
|
|
567
|
-
const e =
|
|
572
|
+
}), [t, i]), /* @__PURE__ */ l(br, { value: i, children: n });
|
|
573
|
+
}, an = Le(null), Lr = an.Provider, _r = () => {
|
|
574
|
+
const e = _e(an);
|
|
568
575
|
if (e === null)
|
|
569
576
|
throw new Error("vector layer context is null, please check the provider");
|
|
570
577
|
return e;
|
|
571
|
-
},
|
|
572
|
-
const n =
|
|
573
|
-
return
|
|
578
|
+
}, Mr = ({ children: e }) => {
|
|
579
|
+
const n = Fe(), [t] = x(new Qn());
|
|
580
|
+
return D(() => (n.addLayer(t), () => {
|
|
574
581
|
n.removeLayer(t);
|
|
575
|
-
}), [n, t]), /* @__PURE__ */ l(
|
|
576
|
-
},
|
|
577
|
-
const e =
|
|
582
|
+
}), [n, t]), /* @__PURE__ */ l(Lr, { value: t, children: e });
|
|
583
|
+
}, ln = Le(null), Pr = ln.Provider, Ir = () => {
|
|
584
|
+
const e = _e(ln);
|
|
578
585
|
if (e === null)
|
|
579
586
|
throw new Error("vector source context is null, please check the provider");
|
|
580
587
|
return e;
|
|
581
|
-
},
|
|
582
|
-
const n =
|
|
583
|
-
return
|
|
588
|
+
}, Dr = ({ children: e }) => {
|
|
589
|
+
const n = _r(), [t] = x(new ei());
|
|
590
|
+
return D(() => {
|
|
584
591
|
n.setSource(t);
|
|
585
|
-
}, [t, n]), /* @__PURE__ */ l(
|
|
586
|
-
},
|
|
587
|
-
const
|
|
588
|
-
return
|
|
589
|
-
const
|
|
590
|
-
return
|
|
591
|
-
|
|
592
|
+
}, [t, n]), /* @__PURE__ */ l(Pr, { value: t, children: e });
|
|
593
|
+
}, xr = ({ geometry: e, fitOptions: n, fit: t }) => {
|
|
594
|
+
const i = Ir(), o = Fe();
|
|
595
|
+
return Gt(() => {
|
|
596
|
+
const c = new qt().readFeature(e);
|
|
597
|
+
return t && i.on("addfeature", function() {
|
|
598
|
+
o.getView().fit(i.getExtent(), n);
|
|
599
|
+
}), i.addFeature(c), () => {
|
|
600
|
+
i.removeFeature(c);
|
|
592
601
|
};
|
|
593
|
-
}, [e,
|
|
594
|
-
},
|
|
595
|
-
const n =
|
|
596
|
-
return
|
|
597
|
-
n.setSource(new
|
|
602
|
+
}, [e, i, t]), null;
|
|
603
|
+
}, Or = (e) => {
|
|
604
|
+
const n = Ke();
|
|
605
|
+
return D(() => {
|
|
606
|
+
n.setSource(new ti());
|
|
598
607
|
}, [n]), null;
|
|
599
|
-
},
|
|
600
|
-
const t =
|
|
601
|
-
return
|
|
608
|
+
}, Ar = ({ drawType: e, onPolygonSelected: n }) => {
|
|
609
|
+
const t = Fe();
|
|
610
|
+
return D(() => {
|
|
602
611
|
const i = {
|
|
603
612
|
type: "Circle"
|
|
604
613
|
/* CIRCLE */
|
|
605
614
|
};
|
|
606
615
|
switch (e) {
|
|
607
616
|
case ae.BOX:
|
|
608
|
-
i.geometryFunction =
|
|
617
|
+
i.geometryFunction = oi();
|
|
609
618
|
break;
|
|
610
619
|
case ae.POLYGON:
|
|
611
620
|
i.type = "Polygon";
|
|
@@ -613,10 +622,10 @@ const at = 5, lt = 2, Jt = Oe(null), Ji = Jt.Provider, bt = 35, Tt = 32, Qi = 10
|
|
|
613
622
|
default:
|
|
614
623
|
return;
|
|
615
624
|
}
|
|
616
|
-
const o = new
|
|
625
|
+
const o = new ri(i);
|
|
617
626
|
t.addInteraction(o);
|
|
618
627
|
const r = (c) => {
|
|
619
|
-
const m = new
|
|
628
|
+
const m = new qt().writeGeometryObject(c.feature.getGeometry());
|
|
620
629
|
n == null || n(m);
|
|
621
630
|
};
|
|
622
631
|
return o.on("drawend", r), () => {
|
|
@@ -624,19 +633,19 @@ const at = 5, lt = 2, Jt = Oe(null), Ji = Jt.Provider, bt = 35, Tt = 32, Qi = 10
|
|
|
624
633
|
};
|
|
625
634
|
}, [n, e, t]), null;
|
|
626
635
|
};
|
|
627
|
-
const
|
|
636
|
+
const kr = (e) => {
|
|
628
637
|
const n = (t) => {
|
|
629
|
-
const i =
|
|
638
|
+
const i = jn(t);
|
|
630
639
|
e.onPolygonSelection(i);
|
|
631
640
|
};
|
|
632
|
-
return /* @__PURE__ */ N(
|
|
633
|
-
/* @__PURE__ */ l(
|
|
634
|
-
e.selectionPolygon && /* @__PURE__ */ l(
|
|
641
|
+
return /* @__PURE__ */ N(Tr, { allowFullScreen: !0, showMousePosition: !0, children: [
|
|
642
|
+
/* @__PURE__ */ l(Sr, { children: /* @__PURE__ */ l(Or, {}) }),
|
|
643
|
+
e.selectionPolygon && /* @__PURE__ */ l(Mr, { children: /* @__PURE__ */ l(Dr, { children: /* @__PURE__ */ l(xr, { geometry: e.selectionPolygon }) }) }),
|
|
635
644
|
e.children,
|
|
636
|
-
e.drawType !== void 0 && /* @__PURE__ */ l(
|
|
645
|
+
e.drawType !== void 0 && /* @__PURE__ */ l(Ar, { drawType: e.drawType, onPolygonSelected: n })
|
|
637
646
|
] });
|
|
638
|
-
},
|
|
639
|
-
(e) =>
|
|
647
|
+
}, Qe = 1.5, Rr = 80, Nr = Ne(
|
|
648
|
+
(e) => je({
|
|
640
649
|
map: {
|
|
641
650
|
height: "100%",
|
|
642
651
|
width: "100%",
|
|
@@ -645,12 +654,12 @@ const gr = (e) => {
|
|
|
645
654
|
absolute: {
|
|
646
655
|
position: "absolute",
|
|
647
656
|
zIndex: 1e3,
|
|
648
|
-
left: e.spacing(
|
|
649
|
-
top: e.spacing(
|
|
657
|
+
left: e.spacing(Qe),
|
|
658
|
+
top: e.spacing(Qe)
|
|
650
659
|
},
|
|
651
660
|
contentContainer: {
|
|
652
|
-
marginTop: e.spacing(
|
|
653
|
-
width: e.spacing(
|
|
661
|
+
marginTop: e.spacing(Qe),
|
|
662
|
+
width: e.spacing(Rr)
|
|
654
663
|
},
|
|
655
664
|
filtersContainer: {
|
|
656
665
|
display: "flex",
|
|
@@ -660,18 +669,18 @@ const gr = (e) => {
|
|
|
660
669
|
marginLeft: e.spacing(1)
|
|
661
670
|
}
|
|
662
671
|
})
|
|
663
|
-
),
|
|
672
|
+
), Ys = (e) => {
|
|
664
673
|
var m;
|
|
665
|
-
const [n, t] =
|
|
666
|
-
o(
|
|
674
|
+
const [n, t] = x(), [i, o] = x(), r = Nr(), c = (g) => {
|
|
675
|
+
o(g), t(void 0), e.handlePolygonSelected(g);
|
|
667
676
|
}, u = () => {
|
|
668
677
|
o(void 0), e.handlePolygonReset();
|
|
669
678
|
};
|
|
670
679
|
return /* @__PURE__ */ N("div", { className: r.map, children: [
|
|
671
680
|
/* @__PURE__ */ N("div", { className: `${r.absolute}`, children: [
|
|
672
|
-
/* @__PURE__ */ N(
|
|
681
|
+
/* @__PURE__ */ N(rt, { className: r.filtersContainer, children: [
|
|
673
682
|
/* @__PURE__ */ l(
|
|
674
|
-
|
|
683
|
+
yr,
|
|
675
684
|
{
|
|
676
685
|
onCancelDraw: () => t(void 0),
|
|
677
686
|
onReset: u,
|
|
@@ -679,27 +688,125 @@ const gr = (e) => {
|
|
|
679
688
|
isSelectionEnabled: n !== void 0
|
|
680
689
|
}
|
|
681
690
|
),
|
|
682
|
-
(m = e.filters) == null ? void 0 : m.map((
|
|
691
|
+
(m = e.filters) == null ? void 0 : m.map((g, E) => /* @__PURE__ */ l("div", { className: r.filtersMargin, children: g }, E))
|
|
683
692
|
] }),
|
|
684
|
-
/* @__PURE__ */ l(
|
|
693
|
+
/* @__PURE__ */ l(rt, { color: "red", className: `${r.contentContainer}`, children: e.children })
|
|
685
694
|
] }),
|
|
686
|
-
/* @__PURE__ */ l(
|
|
695
|
+
/* @__PURE__ */ l(kr, { children: e.mapContent, onPolygonSelection: c, drawType: n, selectionPolygon: i })
|
|
687
696
|
] });
|
|
697
|
+
}, _t = new ai({
|
|
698
|
+
color: "rgba(255,255,255,0.4)"
|
|
699
|
+
}), Mt = new li({
|
|
700
|
+
color: "#3399CC",
|
|
701
|
+
width: 1.25
|
|
702
|
+
}), Pt = [
|
|
703
|
+
new ci({
|
|
704
|
+
image: new di({
|
|
705
|
+
fill: _t,
|
|
706
|
+
stroke: Mt,
|
|
707
|
+
radius: 5
|
|
708
|
+
}),
|
|
709
|
+
fill: _t,
|
|
710
|
+
stroke: Mt
|
|
711
|
+
})
|
|
712
|
+
], cn = Le(null), Br = cn.Provider, Fr = () => {
|
|
713
|
+
const e = _e(cn);
|
|
714
|
+
if (e === null)
|
|
715
|
+
throw new Error("vector tile layer context is null, please check the provider");
|
|
716
|
+
return e;
|
|
717
|
+
}, Xs = ({ children: e, options: n, style: t }) => {
|
|
718
|
+
const i = Fe(), [o] = x(
|
|
719
|
+
new si({
|
|
720
|
+
...n,
|
|
721
|
+
style: t || Pt
|
|
722
|
+
})
|
|
723
|
+
);
|
|
724
|
+
return D(() => (i.addLayer(o), () => {
|
|
725
|
+
i.removeLayer(o);
|
|
726
|
+
}), [i, o]), D(() => {
|
|
727
|
+
o.setStyle(t || Pt);
|
|
728
|
+
}, [o, t]), /* @__PURE__ */ l(Br, { value: o, children: e });
|
|
729
|
+
}, et = 20, Hr = 256, Vr = 2, Gr = 2, zr = "REST", Zs = (e) => {
|
|
730
|
+
const n = Zn(e.projection), t = n.getExtent(), i = new Array(et), o = new Array(et), r = hi(t) / Hr, c = e.heightWidthRatio !== void 0 ? e.heightWidthRatio : Gr, u = e.requestEncoding !== void 0 ? e.requestEncoding : zr;
|
|
731
|
+
for (let g = 0; g < et; ++g)
|
|
732
|
+
i[g] = r / Math.pow(Vr, g) / c, o[g] = g.toString();
|
|
733
|
+
return {
|
|
734
|
+
attributions: e.attributions,
|
|
735
|
+
url: e.url,
|
|
736
|
+
layer: e.layer,
|
|
737
|
+
matrixSet: e.matrixSet,
|
|
738
|
+
format: e.format,
|
|
739
|
+
projection: n,
|
|
740
|
+
tileGrid: new ui({
|
|
741
|
+
origin: mi(t),
|
|
742
|
+
resolutions: i,
|
|
743
|
+
matrixIds: o
|
|
744
|
+
}),
|
|
745
|
+
style: e.style,
|
|
746
|
+
requestEncoding: u,
|
|
747
|
+
wrapX: e.wrapX !== void 0 ? e.wrapX : !0
|
|
748
|
+
};
|
|
749
|
+
}, Js = (e) => {
|
|
750
|
+
const n = Ke(), { options: t } = e;
|
|
751
|
+
return D(() => {
|
|
752
|
+
n.setSource(new ni(t));
|
|
753
|
+
}, [n, t]), null;
|
|
754
|
+
}, Qs = (e) => {
|
|
755
|
+
const { attributions: n, url: t, params: i, serverType: o, transition: r } = e;
|
|
756
|
+
return {
|
|
757
|
+
attributions: n,
|
|
758
|
+
url: t,
|
|
759
|
+
params: i,
|
|
760
|
+
serverType: o,
|
|
761
|
+
transition: r
|
|
762
|
+
};
|
|
763
|
+
}, ea = (e) => {
|
|
764
|
+
const n = Ke(), { options: t } = e;
|
|
765
|
+
return D(() => {
|
|
766
|
+
n.setSource(new pi(t));
|
|
767
|
+
}, [n, t]), null;
|
|
768
|
+
}, ta = (e) => {
|
|
769
|
+
const { attributions: n, url: t } = e;
|
|
770
|
+
return {
|
|
771
|
+
attributions: n,
|
|
772
|
+
url: t
|
|
773
|
+
};
|
|
774
|
+
}, na = (e) => {
|
|
775
|
+
const n = Ke(), { options: t } = e;
|
|
776
|
+
return D(() => {
|
|
777
|
+
n.setSource(new gi(t));
|
|
778
|
+
}, [n, t]), null;
|
|
779
|
+
}, $r = Le(null), ia = () => {
|
|
780
|
+
const e = _e($r);
|
|
781
|
+
if (e === null)
|
|
782
|
+
throw new Error("vector tile source context is null, please check the provider");
|
|
783
|
+
return e;
|
|
784
|
+
}, ra = (e) => {
|
|
785
|
+
const { url: n } = e;
|
|
786
|
+
return {
|
|
787
|
+
url: n,
|
|
788
|
+
format: new ii()
|
|
789
|
+
};
|
|
790
|
+
}, oa = ({ children: e, options: n }) => {
|
|
791
|
+
const t = Fr();
|
|
792
|
+
return D(() => {
|
|
793
|
+
t.setSource(new fi(n));
|
|
794
|
+
}, [n, t]), null;
|
|
688
795
|
};
|
|
689
|
-
function
|
|
796
|
+
function Wr(e) {
|
|
690
797
|
const { headCells: n, order: t, orderBy: i, onRequestSort: o, isCollapseable: r } = e, c = (u) => (m) => {
|
|
691
798
|
o(m, u);
|
|
692
799
|
};
|
|
693
|
-
return /* @__PURE__ */ l(
|
|
694
|
-
r && /* @__PURE__ */ l(
|
|
800
|
+
return /* @__PURE__ */ l(yi, { children: /* @__PURE__ */ N(ze, { children: [
|
|
801
|
+
r && /* @__PURE__ */ l(xe, {}),
|
|
695
802
|
n.map((u) => /* @__PURE__ */ l(
|
|
696
|
-
|
|
803
|
+
xe,
|
|
697
804
|
{
|
|
698
805
|
align: u.numeric ? "right" : "left",
|
|
699
806
|
padding: u.disablePadding ? "none" : "default",
|
|
700
807
|
sortDirection: i === u.id ? t : !1,
|
|
701
808
|
children: /* @__PURE__ */ l(
|
|
702
|
-
|
|
809
|
+
Ln,
|
|
703
810
|
{
|
|
704
811
|
active: i === u.id,
|
|
705
812
|
direction: i === u.id ? t : "asc",
|
|
@@ -712,36 +819,36 @@ function vr(e) {
|
|
|
712
819
|
))
|
|
713
820
|
] }) });
|
|
714
821
|
}
|
|
715
|
-
const
|
|
716
|
-
/* @__PURE__ */
|
|
822
|
+
const Ur = Yt(
|
|
823
|
+
/* @__PURE__ */ Vt.createElement("path", {
|
|
717
824
|
d: "M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"
|
|
718
825
|
}),
|
|
719
826
|
"KeyboardArrowDown"
|
|
720
|
-
),
|
|
721
|
-
/* @__PURE__ */
|
|
827
|
+
), jr = Yt(
|
|
828
|
+
/* @__PURE__ */ Vt.createElement("path", {
|
|
722
829
|
d: "M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"
|
|
723
830
|
}),
|
|
724
831
|
"KeyboardArrowUp"
|
|
725
832
|
);
|
|
726
|
-
function
|
|
727
|
-
const { cellsMetadata: n, isRowSelected: t, item: i, onRowSelected: o, rowIndex: r, isCollapseable: c, collapsedElement: u } = e, [m,
|
|
833
|
+
function Kr(e) {
|
|
834
|
+
const { cellsMetadata: n, isRowSelected: t, item: i, onRowSelected: o, rowIndex: r, isCollapseable: c, collapsedElement: u } = e, [m, g] = x(!1), E = n.length;
|
|
728
835
|
return /* @__PURE__ */ N(te, { children: [
|
|
729
|
-
/* @__PURE__ */ N(
|
|
836
|
+
/* @__PURE__ */ N(ze, { hover: !0, selected: t, onClick: () => {
|
|
730
837
|
o == null || o(r);
|
|
731
838
|
}, children: [
|
|
732
|
-
c && /* @__PURE__ */ l(
|
|
733
|
-
|
|
839
|
+
c && /* @__PURE__ */ l(xe, { padding: "checkbox", children: /* @__PURE__ */ l(
|
|
840
|
+
_n,
|
|
734
841
|
{
|
|
735
842
|
"aria-label": "expand row",
|
|
736
843
|
size: "small",
|
|
737
844
|
onClick: (w) => {
|
|
738
|
-
w.stopPropagation(),
|
|
845
|
+
w.stopPropagation(), g(!m);
|
|
739
846
|
},
|
|
740
|
-
children: m ? /* @__PURE__ */ l(
|
|
847
|
+
children: m ? /* @__PURE__ */ l(jr, {}) : /* @__PURE__ */ l(Ur, {})
|
|
741
848
|
}
|
|
742
849
|
) }),
|
|
743
850
|
n.map((w) => /* @__PURE__ */ l(
|
|
744
|
-
|
|
851
|
+
xe,
|
|
745
852
|
{
|
|
746
853
|
align: w.numeric ? "right" : "left",
|
|
747
854
|
padding: w.disablePadding ? "none" : "default",
|
|
@@ -750,96 +857,96 @@ function wr(e) {
|
|
|
750
857
|
w.id + r.toString()
|
|
751
858
|
))
|
|
752
859
|
] }),
|
|
753
|
-
c && /* @__PURE__ */ l(
|
|
860
|
+
c && /* @__PURE__ */ l(ze, { children: /* @__PURE__ */ l(xe, { style: { paddingBottom: 0, paddingTop: 0 }, colSpan: E + 1, children: /* @__PURE__ */ l(Mn, { in: m, unmountOnExit: !0, timeout: "auto", children: u == null ? void 0 : u(i) }) }) })
|
|
754
861
|
] });
|
|
755
862
|
}
|
|
756
|
-
function
|
|
757
|
-
const [n, t] =
|
|
863
|
+
function sa(e) {
|
|
864
|
+
const [n, t] = x(""), [i, o] = x("asc"), {
|
|
758
865
|
cellsMetadata: r,
|
|
759
866
|
items: c,
|
|
760
867
|
onRequestSort: u,
|
|
761
868
|
onRowSelected: m,
|
|
762
|
-
isCollapseable:
|
|
869
|
+
isCollapseable: g,
|
|
763
870
|
collapsedElement: E,
|
|
764
|
-
isDense:
|
|
871
|
+
isDense: S,
|
|
765
872
|
page: w,
|
|
766
873
|
rowsPerPage: P,
|
|
767
874
|
count: R,
|
|
768
|
-
handleChangePage:
|
|
875
|
+
handleChangePage: G,
|
|
769
876
|
handleChangeRowsPerPage: q
|
|
770
877
|
} = e;
|
|
771
|
-
return /* @__PURE__ */ N(
|
|
772
|
-
/* @__PURE__ */ N(
|
|
878
|
+
return /* @__PURE__ */ N(Pn, { component: rt, children: [
|
|
879
|
+
/* @__PURE__ */ N(In, { size: S ? "small" : "medium", children: [
|
|
773
880
|
/* @__PURE__ */ l(
|
|
774
|
-
|
|
881
|
+
Wr,
|
|
775
882
|
{
|
|
776
883
|
headCells: r,
|
|
777
|
-
onRequestSort: (
|
|
778
|
-
const
|
|
779
|
-
o(
|
|
884
|
+
onRequestSort: (j, K) => {
|
|
885
|
+
const O = n === K && i === "asc";
|
|
886
|
+
o(O ? "desc" : "asc"), t(K), u(K, O ? "desc" : "asc");
|
|
780
887
|
},
|
|
781
888
|
order: i,
|
|
782
889
|
orderBy: n,
|
|
783
|
-
isCollapseable:
|
|
890
|
+
isCollapseable: g
|
|
784
891
|
}
|
|
785
892
|
),
|
|
786
|
-
/* @__PURE__ */ N(
|
|
787
|
-
c.map((
|
|
788
|
-
|
|
893
|
+
/* @__PURE__ */ N(Dn, { children: [
|
|
894
|
+
c.map((j, K) => /* @__PURE__ */ l(
|
|
895
|
+
Kr,
|
|
789
896
|
{
|
|
790
|
-
item:
|
|
791
|
-
rowIndex:
|
|
792
|
-
isCollapseable:
|
|
897
|
+
item: j,
|
|
898
|
+
rowIndex: K,
|
|
899
|
+
isCollapseable: g,
|
|
793
900
|
cellsMetadata: r,
|
|
794
901
|
collapsedElement: E,
|
|
795
902
|
isRowSelected: !1,
|
|
796
903
|
onRowSelected: m
|
|
797
904
|
},
|
|
798
|
-
|
|
905
|
+
K
|
|
799
906
|
)),
|
|
800
907
|
(c.length === 0 || P > c.length) && /* @__PURE__ */ l(
|
|
801
|
-
|
|
908
|
+
ze,
|
|
802
909
|
{
|
|
803
910
|
style: {
|
|
804
|
-
height: (
|
|
911
|
+
height: (S ? 33 : 53) * (P - c.length)
|
|
805
912
|
},
|
|
806
|
-
children: /* @__PURE__ */ l(
|
|
913
|
+
children: /* @__PURE__ */ l(xe, { colSpan: g ? r.length + 1 : r.length, children: c.length === 0 && /* @__PURE__ */ l(xn, { align: "center", children: "No results :(" }) })
|
|
807
914
|
}
|
|
808
915
|
)
|
|
809
916
|
] })
|
|
810
917
|
] }),
|
|
811
918
|
/* @__PURE__ */ l(
|
|
812
|
-
|
|
919
|
+
On,
|
|
813
920
|
{
|
|
814
921
|
rowsPerPage: P,
|
|
815
922
|
rowsPerPageOptions: [5, 10],
|
|
816
923
|
component: "div",
|
|
817
924
|
count: R,
|
|
818
925
|
page: w,
|
|
819
|
-
onPageChange:
|
|
926
|
+
onPageChange: G,
|
|
820
927
|
onRowsPerPageChange: q
|
|
821
928
|
}
|
|
822
929
|
)
|
|
823
930
|
] });
|
|
824
931
|
}
|
|
825
|
-
const
|
|
932
|
+
const aa = (e) => {
|
|
826
933
|
const { children: n, ...t } = e;
|
|
827
|
-
return /* @__PURE__ */ l(
|
|
828
|
-
},
|
|
934
|
+
return /* @__PURE__ */ l(vi, { ...t, children: n });
|
|
935
|
+
}, la = (e) => {
|
|
829
936
|
const { children: n, ...t } = e;
|
|
830
|
-
return /* @__PURE__ */ l(
|
|
831
|
-
},
|
|
832
|
-
const
|
|
937
|
+
return /* @__PURE__ */ l(Ei, { ...t, children: n });
|
|
938
|
+
}, It = (e) => e * Math.PI / 180, He = (e) => e * (180 / Math.PI), qr = (e) => 0.05 * (5916575505e-1 / Math.pow(2, e - 1) / 2) * (Math.cos(It(85.362 / 2)) / Math.sin(It(85.362 / 2)));
|
|
939
|
+
const dn = (e, n, t) => {
|
|
833
940
|
let i;
|
|
834
|
-
if (e.scene.mode !==
|
|
941
|
+
if (e.scene.mode !== be.SCENE2D)
|
|
835
942
|
i = e.scene.pickPosition(new Ce(n, t));
|
|
836
943
|
else {
|
|
837
944
|
const o = e.scene.globe.ellipsoid;
|
|
838
945
|
i = e.camera.pickEllipsoid(new Ce(n, t), o);
|
|
839
946
|
}
|
|
840
947
|
return Be.fromCartesian(i);
|
|
841
|
-
},
|
|
842
|
-
const i =
|
|
948
|
+
}, Yr = (e, n, t) => {
|
|
949
|
+
const i = dn(e, n, t);
|
|
843
950
|
return {
|
|
844
951
|
type: "Feature",
|
|
845
952
|
properties: {},
|
|
@@ -848,9 +955,9 @@ const nn = (e, n, t) => {
|
|
|
848
955
|
coordinates: [ge.toDegrees(i.longitude), ge.toDegrees(i.latitude)]
|
|
849
956
|
}
|
|
850
957
|
};
|
|
851
|
-
},
|
|
958
|
+
}, un = (e, n, t) => {
|
|
852
959
|
try {
|
|
853
|
-
const i =
|
|
960
|
+
const i = dn(e, n, t);
|
|
854
961
|
return {
|
|
855
962
|
longitude: ge.toDegrees(i.longitude),
|
|
856
963
|
latitude: ge.toDegrees(i.latitude)
|
|
@@ -859,60 +966,60 @@ const nn = (e, n, t) => {
|
|
|
859
966
|
return;
|
|
860
967
|
}
|
|
861
968
|
};
|
|
862
|
-
class
|
|
969
|
+
class ca extends Di {
|
|
863
970
|
}
|
|
864
|
-
class
|
|
971
|
+
class da extends xi {
|
|
865
972
|
}
|
|
866
|
-
class
|
|
973
|
+
class ua extends Oi {
|
|
867
974
|
}
|
|
868
|
-
class
|
|
975
|
+
class ha extends Ce {
|
|
869
976
|
}
|
|
870
|
-
class
|
|
977
|
+
class ma extends ve {
|
|
871
978
|
}
|
|
872
|
-
class
|
|
979
|
+
class Xr extends Be {
|
|
873
980
|
}
|
|
874
|
-
class
|
|
981
|
+
class pa extends Ai {
|
|
875
982
|
}
|
|
876
|
-
class
|
|
983
|
+
class ga extends Zt {
|
|
877
984
|
}
|
|
878
|
-
class
|
|
985
|
+
class fa extends ki {
|
|
879
986
|
}
|
|
880
|
-
class
|
|
987
|
+
class ya extends De {
|
|
881
988
|
}
|
|
882
|
-
class
|
|
989
|
+
class va extends Ri {
|
|
883
990
|
}
|
|
884
|
-
class
|
|
991
|
+
class Ea extends Ni {
|
|
885
992
|
}
|
|
886
|
-
class
|
|
993
|
+
class Ca extends Bi {
|
|
887
994
|
}
|
|
888
|
-
const
|
|
889
|
-
const n = le(), t =
|
|
890
|
-
return
|
|
995
|
+
const wa = st, Ta = Jt, Zr = (e) => {
|
|
996
|
+
const n = le(), t = Se(null), [i, o] = x({ x: 0, y: 0 });
|
|
997
|
+
return D(() => {
|
|
891
998
|
n.screenSpaceEventHandler.setInputAction((r) => {
|
|
892
999
|
if (r != null && r.endPosition) {
|
|
893
1000
|
const c = { ...r.endPosition };
|
|
894
1001
|
c.x = Math.ceil(c.x), c.y = Math.ceil(c.y), o(c);
|
|
895
1002
|
}
|
|
896
|
-
},
|
|
897
|
-
}, [t, n]),
|
|
1003
|
+
}, Fi.MOUSE_MOVE);
|
|
1004
|
+
}, [t, n]), D(() => {
|
|
898
1005
|
const r = n.scene.globe.ellipsoid;
|
|
899
1006
|
if (i) {
|
|
900
|
-
const c =
|
|
1007
|
+
const c = un(n, i.x, i.y);
|
|
901
1008
|
if (c) {
|
|
902
|
-
const u = new
|
|
1009
|
+
const u = new Xr(c.longitude, c.latitude);
|
|
903
1010
|
if (t.current) {
|
|
904
1011
|
let m = "";
|
|
905
1012
|
switch (e.projection) {
|
|
906
1013
|
case pe.WEB_MERCATOR: {
|
|
907
|
-
const E = new
|
|
908
|
-
m = `Mercator: ${E.y.toFixed(
|
|
909
|
-
|
|
1014
|
+
const E = new Hi(r).project(u);
|
|
1015
|
+
m = `Mercator: ${E.y.toFixed(ut)}m, ${E.x.toFixed(
|
|
1016
|
+
ut
|
|
910
1017
|
)}m`, t.current.style.width = "220px";
|
|
911
1018
|
break;
|
|
912
1019
|
}
|
|
913
1020
|
case pe.WGS84: {
|
|
914
|
-
const
|
|
915
|
-
m = `WGS84: ${u.latitude.toFixed(
|
|
1021
|
+
const g = u.longitude.toFixed(dt);
|
|
1022
|
+
m = `WGS84: ${u.latitude.toFixed(dt)}°N ${g}°E`, t.current.style.width = "200px";
|
|
916
1023
|
break;
|
|
917
1024
|
}
|
|
918
1025
|
}
|
|
@@ -922,7 +1029,7 @@ const As = it, ks = Kt, Lr = (e) => {
|
|
|
922
1029
|
}
|
|
923
1030
|
}, [i, t, n, e.projection]), /* @__PURE__ */ l("div", { className: "trackerPosition", ref: t });
|
|
924
1031
|
};
|
|
925
|
-
const
|
|
1032
|
+
const tt = [
|
|
926
1033
|
1,
|
|
927
1034
|
2,
|
|
928
1035
|
3,
|
|
@@ -955,39 +1062,39 @@ const Je = [
|
|
|
955
1062
|
2e7,
|
|
956
1063
|
3e7,
|
|
957
1064
|
5e7
|
|
958
|
-
],
|
|
1065
|
+
], Jr = (e, n, t, i) => {
|
|
959
1066
|
const o = Z(i, "METERS_UNIT") ?? "m", r = Z(i, "KILOMETERS_UNIT") ?? "km", c = {
|
|
960
1067
|
barWidth: void 0,
|
|
961
1068
|
distanceLabel: void 0,
|
|
962
1069
|
lastLegendUpdate: n.lastLegendUpdate
|
|
963
|
-
}, u = new
|
|
1070
|
+
}, u = new Gi(), m = new Date().getTime();
|
|
964
1071
|
if (m < c.lastLegendUpdate + 250)
|
|
965
1072
|
return;
|
|
966
1073
|
c.lastLegendUpdate = m;
|
|
967
|
-
const
|
|
968
|
-
if (!R || !
|
|
1074
|
+
const g = e.scene.canvas.clientWidth, E = e.scene.canvas.clientHeight, S = e.scene.camera.getPickRay(new Ce(g / 2 | 0, E - 1)), w = e.scene.camera.getPickRay(new Ce(1 + g / 2 | 0, E - 1)), P = e.scene.globe, R = P.pick(S, e.scene), G = P.pick(w, e.scene);
|
|
1075
|
+
if (!R || !G)
|
|
969
1076
|
return;
|
|
970
|
-
const q = P.ellipsoid.cartesianToCartographic(R), H = P.ellipsoid.cartesianToCartographic(
|
|
1077
|
+
const q = P.ellipsoid.cartesianToCartographic(R), H = P.ellipsoid.cartesianToCartographic(G);
|
|
971
1078
|
u.setEndPoints(q, H);
|
|
972
|
-
const
|
|
973
|
-
let
|
|
974
|
-
for (let $ =
|
|
975
|
-
|
|
976
|
-
if (
|
|
1079
|
+
const j = u.surfaceDistance, K = 100;
|
|
1080
|
+
let O;
|
|
1081
|
+
for (let $ = tt.length - 1; !We(O) && $ >= 0; --$)
|
|
1082
|
+
tt[$] / j < K && (O = tt[$]);
|
|
1083
|
+
if (We(O)) {
|
|
977
1084
|
let $ = "";
|
|
978
|
-
|
|
1085
|
+
O >= 1e3 ? $ = `${(O / 1e3).toString()} ${r}` : $ = `${O.toString()} ${o}`, c.barWidth = O / j | 0, c.distanceLabel = $;
|
|
979
1086
|
}
|
|
980
1087
|
t(c);
|
|
981
|
-
},
|
|
982
|
-
const n = le(), [t, i] =
|
|
1088
|
+
}, Qr = (e) => {
|
|
1089
|
+
const n = le(), [t, i] = x({
|
|
983
1090
|
barWidth: void 0,
|
|
984
1091
|
distanceLabel: void 0,
|
|
985
1092
|
lastLegendUpdate: -1
|
|
986
1093
|
});
|
|
987
|
-
|
|
1094
|
+
D(() => {
|
|
988
1095
|
const r = (m) => {
|
|
989
|
-
|
|
990
|
-
}, c = new
|
|
1096
|
+
Jr(n, t, i, e.locale);
|
|
1097
|
+
}, c = new Vi(), u = (m) => {
|
|
991
1098
|
n.scene.globe.tilesLoaded && (r(new MouseEvent("mouse")), c.removeAll());
|
|
992
1099
|
};
|
|
993
1100
|
return c.add(n.scene.globe.tileLoadProgressEvent, u), n.camera.moveEnd.addEventListener(r), () => {
|
|
@@ -999,7 +1106,7 @@ const Je = [
|
|
|
999
1106
|
};
|
|
1000
1107
|
}, [n, e.locale, t]);
|
|
1001
1108
|
const o = (r) => 5 + (125 - r) / 2;
|
|
1002
|
-
return /* @__PURE__ */ l("div", { className: "scalePosition", children:
|
|
1109
|
+
return /* @__PURE__ */ l("div", { className: "scalePosition", children: We(t.barWidth) && /* @__PURE__ */ N(te, { children: [
|
|
1003
1110
|
/* @__PURE__ */ l("div", { className: "scale-tracker-label", children: /* @__PURE__ */ l("bdi", { children: t.distanceLabel }) }),
|
|
1004
1111
|
/* @__PURE__ */ l(
|
|
1005
1112
|
"div",
|
|
@@ -1014,29 +1121,29 @@ const Je = [
|
|
|
1014
1121
|
)
|
|
1015
1122
|
] }) });
|
|
1016
1123
|
}, oe = {
|
|
1017
|
-
MORPHING:
|
|
1018
|
-
COLUMBUS_VIEW:
|
|
1019
|
-
SCENE2D:
|
|
1020
|
-
SCENE3D:
|
|
1124
|
+
MORPHING: be.MORPHING,
|
|
1125
|
+
COLUMBUS_VIEW: be.COLUMBUS_VIEW,
|
|
1126
|
+
SCENE2D: be.SCENE2D,
|
|
1127
|
+
SCENE3D: be.SCENE3D
|
|
1021
1128
|
};
|
|
1022
|
-
const
|
|
1129
|
+
const Dt = (e, n) => {
|
|
1023
1130
|
const i = Z(n.scene.globe, "_surface.tileProvider"), o = i._quadtree, r = n.canvas.height, c = Z(n.camera.frustum, "sseDenominator") ?? 1;
|
|
1024
1131
|
for (let u = 0; u <= 19; u++)
|
|
1025
1132
|
if (i.getLevelMaximumGeometricError(u) * r / (e * c) < o.maximumScreenSpaceError)
|
|
1026
1133
|
return u;
|
|
1027
1134
|
return null;
|
|
1028
|
-
},
|
|
1135
|
+
}, eo = (e, n) => {
|
|
1029
1136
|
e = e || 10;
|
|
1030
1137
|
const t = [];
|
|
1031
1138
|
let i = 1e5, o = 0;
|
|
1032
1139
|
for (let r = 1e8; r > i; r = r - i) {
|
|
1033
|
-
const c =
|
|
1140
|
+
const c = Dt(r, n);
|
|
1034
1141
|
if (c === null)
|
|
1035
1142
|
break;
|
|
1036
1143
|
if (c !== o) {
|
|
1037
1144
|
let u = r, m = r + i;
|
|
1038
1145
|
for (; m - u > e; )
|
|
1039
|
-
r = u + (m - u) / 2,
|
|
1146
|
+
r = u + (m - u) / 2, Dt(r, n) === c ? u = r : m = r;
|
|
1040
1147
|
t.push({
|
|
1041
1148
|
level: c,
|
|
1042
1149
|
height: Math.round(r)
|
|
@@ -1044,16 +1151,16 @@ const Lt = (e, n) => {
|
|
|
1044
1151
|
}
|
|
1045
1152
|
}
|
|
1046
1153
|
return t;
|
|
1047
|
-
},
|
|
1048
|
-
const t = le(), [i, o] =
|
|
1049
|
-
const E = t.camera,
|
|
1154
|
+
}, to = ({ locale: e = void 0, valueBy: n = "RENDERED_TILES" }) => {
|
|
1155
|
+
const t = le(), [i, o] = x(1), r = eo(1, t), c = me(() => {
|
|
1156
|
+
const E = t.camera, S = 0.5;
|
|
1050
1157
|
let w = 0;
|
|
1051
1158
|
switch (t.scene.mode) {
|
|
1052
1159
|
case oe.SCENE3D:
|
|
1053
1160
|
w = t.scene.mapProjection.ellipsoid.cartesianToCartographic(E.positionWC).height;
|
|
1054
1161
|
break;
|
|
1055
1162
|
case oe.SCENE2D:
|
|
1056
|
-
w = (E.frustum.right - E.frustum.left) *
|
|
1163
|
+
w = (E.frustum.right - E.frustum.left) * S;
|
|
1057
1164
|
break;
|
|
1058
1165
|
case oe.COLUMBUS_VIEW:
|
|
1059
1166
|
w = E.position.z;
|
|
@@ -1063,41 +1170,41 @@ const Lt = (e, n) => {
|
|
|
1063
1170
|
break;
|
|
1064
1171
|
}
|
|
1065
1172
|
if (r.length > 0) {
|
|
1066
|
-
const P = r.reduce((R,
|
|
1173
|
+
const P = r.reduce((R, G) => Math.abs(G.height - w) < Math.abs(R.height - w) ? G : R);
|
|
1067
1174
|
o(P.level);
|
|
1068
1175
|
}
|
|
1069
1176
|
}, [t, r]), u = me(() => {
|
|
1070
1177
|
let E = 0;
|
|
1071
|
-
t.scene.globe._surface.forEachRenderedTile(function(
|
|
1072
|
-
E = Math.max(E,
|
|
1178
|
+
t.scene.globe._surface.forEachRenderedTile(function(S) {
|
|
1179
|
+
E = Math.max(E, S.level);
|
|
1073
1180
|
}), o(E);
|
|
1074
|
-
}, [t]),
|
|
1181
|
+
}, [t]), g = Re(() => ({
|
|
1075
1182
|
CALCULATION: c,
|
|
1076
1183
|
RENDERED_TILES: u
|
|
1077
1184
|
}), [c, u])[n];
|
|
1078
|
-
return
|
|
1185
|
+
return D(() => {
|
|
1079
1186
|
const E = t.scene.globe.tileLoadProgressEvent.addEventListener(function() {
|
|
1080
|
-
t.scene.globe.tilesLoaded &&
|
|
1187
|
+
t.scene.globe.tilesLoaded && g();
|
|
1081
1188
|
});
|
|
1082
|
-
return t.camera.moveEnd.addEventListener(
|
|
1189
|
+
return t.camera.moveEnd.addEventListener(g), () => {
|
|
1083
1190
|
try {
|
|
1084
|
-
typeof Z(t, "_cesiumWidget") < "u" && (t.camera.moveEnd.removeEventListener(
|
|
1085
|
-
} catch (
|
|
1086
|
-
console.log('CESIUM camera "moveEnd"(from zoom tracker) remove listener failed',
|
|
1191
|
+
typeof Z(t, "_cesiumWidget") < "u" && (t.camera.moveEnd.removeEventListener(g), E());
|
|
1192
|
+
} catch (S) {
|
|
1193
|
+
console.log('CESIUM camera "moveEnd"(from zoom tracker) remove listener failed', S);
|
|
1087
1194
|
}
|
|
1088
1195
|
};
|
|
1089
|
-
}, [t,
|
|
1196
|
+
}, [t, g]), /* @__PURE__ */ N("div", { className: "zoomLevel", children: [
|
|
1090
1197
|
/* @__PURE__ */ l("div", { className: "zoomLevelValue", children: i }),
|
|
1091
1198
|
/* @__PURE__ */ l("div", { className: "zoomLevelLabel", children: Z(e, "ZOOM_LABEL") ?? "zoom" })
|
|
1092
1199
|
] });
|
|
1093
1200
|
};
|
|
1094
|
-
const
|
|
1095
|
-
const n = le(), [t, i] =
|
|
1096
|
-
return
|
|
1201
|
+
const no = -1, io = (e) => {
|
|
1202
|
+
const n = le(), [t, i] = x(), { sceneModes: o } = e, r = (c) => o.findIndex((u) => u === c) > no;
|
|
1203
|
+
return D(() => {
|
|
1097
1204
|
i(n.scene.mode);
|
|
1098
1205
|
}, []), /* @__PURE__ */ N(te, { children: [
|
|
1099
1206
|
r(oe.SCENE3D) && /* @__PURE__ */ l(
|
|
1100
|
-
|
|
1207
|
+
Oe,
|
|
1101
1208
|
{
|
|
1102
1209
|
icon: /* @__PURE__ */ l("div", { className: `mapViewIcon ${t === oe.SCENE3D ? "mapViewCurrent" : ""}`, children: /* @__PURE__ */ l("svg", { width: "100%", height: "100%", viewBox: "0 0 64 64", children: /* @__PURE__ */ l("path", { d: "m 32.401392,4.9330437 c -7.087603,0 -14.096095,2.884602 -19.10793,7.8946843 -5.0118352,5.010083 -7.9296167,11.987468 -7.9296167,19.072999 0,7.085531 2.9177815,14.097848 7.9296167,19.107931 4.837653,4.835961 11.541408,7.631372 18.374354,7.82482 0.05712,0.01231 0.454119,0.139729 0.454119,0.139729 l 0.03493,-0.104797 c 0.08246,7.84e-4 0.162033,0.03493 0.244525,0.03493 0.08304,0 0.161515,-0.03414 0.244526,-0.03493 l 0.03493,0.104797 c 0,0 0.309474,-0.129487 0.349323,-0.139729 6.867765,-0.168094 13.582903,-2.965206 18.444218,-7.82482 2.558195,-2.5573 4.551081,-5.638134 5.903547,-8.977584 1.297191,-3.202966 2.02607,-6.661489 2.02607,-10.130347 0,-6.237309 -2.366261,-12.31219 -6.322734,-17.116794 -0.0034,-0.02316 0.0049,-0.04488 0,-0.06986 -0.01733,-0.08745 -0.104529,-0.278855 -0.104797,-0.279458 -5.31e-4,-0.0012 -0.522988,-0.628147 -0.523984,-0.62878 -3.47e-4,-2.2e-4 -0.133444,-0.03532 -0.244525,-0.06987 C 51.944299,13.447603 51.751076,13.104317 51.474391,12.827728 46.462556,7.8176457 39.488996,4.9330437 32.401392,4.9330437 z m -2.130866,3.5281554 0.104797,9.6762289 c -4.111695,-0.08361 -7.109829,-0.423664 -9.257041,-0.943171 1.198093,-2.269271 2.524531,-4.124404 3.91241,-5.414496 2.167498,-2.0147811 3.950145,-2.8540169 5.239834,-3.3185619 z m 2.794579,0 c 1.280302,0.4754953 3.022186,1.3285948 5.065173,3.2486979 1.424667,1.338973 2.788862,3.303645 3.982275,5.728886 -2.29082,0.403367 -5.381258,0.621049 -8.942651,0.698645 L 33.065105,8.4611991 z m 5.728886,0.2445256 c 4.004072,1.1230822 7.793098,3.1481363 10.724195,6.0782083 0.03468,0.03466 0.07033,0.06991 0.104797,0.104797 -0.45375,0.313891 -0.923054,0.663002 -1.956205,1.082899 -0.647388,0.263114 -1.906242,0.477396 -2.829511,0.733577 -1.382296,-2.988132 -3.027146,-5.368585 -4.785716,-7.0213781 -0.422866,-0.397432 -0.835818,-0.6453247 -1.25756,-0.9781032 z m -15.33525,0.7685092 c -0.106753,0.09503 -0.207753,0.145402 -0.31439,0.244526 -1.684973,1.5662541 -3.298068,3.8232211 -4.680919,6.5672591 -0.343797,-0.14942 -1.035052,-0.273198 -1.292493,-0.419186 -0.956528,-0.542427 -1.362964,-1.022024 -1.537018,-1.292493 -0.0241,-0.03745 -0.01868,-0.0401 -0.03493,-0.06986 2.250095,-2.163342 4.948824,-3.869984 7.859752,-5.0302421 z m -9.641296,7.0912431 c 0.464973,0.571618 0.937729,1.169056 1.956205,1.746612 0.349907,0.198425 1.107143,0.335404 1.537018,0.523983 -1.20166,3.172984 -1.998037,7.051901 -2.165798,11.772162 C 14.256557,30.361384 12.934823,30.161483 12.280427,29.90959 10.644437,29.279855 9.6888882,28.674891 9.1714586,28.267775 8.6540289,27.860658 8.6474751,27.778724 8.6474751,27.778724 l -0.069864,0.03493 C 9.3100294,23.691285 11.163248,19.798527 13.817445,16.565477 z m 37.552149,0.523984 c 2.548924,3.289983 4.265057,7.202594 4.890513,11.318043 -0.650428,0.410896 -1.756876,1.001936 -3.563088,1.606882 -1.171552,0.392383 -3.163859,0.759153 -4.960377,1.117832 -0.04367,-4.752703 -0.784809,-8.591423 -1.88634,-11.807094 0.917574,-0.263678 2.170552,-0.486495 2.864443,-0.76851 1.274693,-0.518066 2.003942,-1.001558 2.654849,-1.467153 z m -31.439008,2.619917 c 2.487341,0.672766 5.775813,1.137775 10.479669,1.222628 l 0.104797,10.689263 0,0.03493 0,0.733577 c -5.435005,-0.09059 -9.512219,-0.519044 -12.610536,-1.117831 0.106127,-4.776683 0.879334,-8.55791 2.02607,-11.562569 z m 23.264866,0.31439 c 1.073459,3.067541 1.833795,6.821314 1.816476,11.702298 -3.054474,0.423245 -7.062018,0.648559 -11.702298,0.698644 l 0,-0.838373 -0.104796,-10.654331 c 4.082416,-0.0864 7.404468,-0.403886 9.990618,-0.908238 z M 8.2632205,30.922625 c 0.7558676,0.510548 1.5529563,1.013339 3.0041715,1.57195 0.937518,0.360875 2.612202,0.647642 3.91241,0.978102 0.112814,3.85566 0.703989,7.107756 1.606883,9.920754 -1.147172,-0.324262 -2.644553,-0.640648 -3.423359,-0.978102 -1.516688,-0.657177 -2.386627,-1.287332 -2.864443,-1.71168 -0.477816,-0.424347 -0.489051,-0.489051 -0.489051,-0.489051 L 9.8002387,40.319395 C 8.791691,37.621767 8.1584238,34.769583 8.1584238,31.900727 c 0,-0.330153 0.090589,-0.648169 0.1047967,-0.978102 z m 48.2763445,0.419186 c 0.0047,0.188973 0.06986,0.36991 0.06986,0.558916 0,2.938869 -0.620228,5.873558 -1.676747,8.628261 -0.07435,0.07583 -0.06552,0.07411 -0.454119,0.349323 -0.606965,0.429857 -1.631665,1.042044 -3.318562,1.676747 -1.208528,0.454713 -3.204964,0.850894 -5.135038,1.25756 0.84593,-2.765726 1.41808,-6.005357 1.606883,-9.815957 2.232369,-0.413371 4.483758,-0.840201 5.938479,-1.327425 1.410632,-0.472457 2.153108,-0.89469 2.96924,-1.327425 z m -38.530252,2.864443 c 3.208141,0.56697 7.372279,0.898588 12.575603,0.978103 l 0.174662,9.885821 c -4.392517,-0.06139 -8.106722,-0.320566 -10.863925,-0.803441 -1.051954,-2.664695 -1.692909,-6.043794 -1.88634,-10.060483 z m 26.793022,0.31439 c -0.246298,3.923551 -0.877762,7.263679 -1.816476,9.885822 -2.561957,0.361954 -5.766249,0.560708 -9.431703,0.62878 l -0.174661,-9.815957 c 4.491734,-0.04969 8.334769,-0.293032 11.42284,-0.698645 z M 12.035901,44.860585 c 0.09977,0.04523 0.105535,0.09465 0.209594,0.139729 1.337656,0.579602 3.441099,1.058072 5.589157,1.537018 1.545042,3.399208 3.548524,5.969402 5.589157,7.789888 -3.034411,-1.215537 -5.871615,-3.007978 -8.174142,-5.309699 -1.245911,-1.245475 -2.271794,-2.662961 -3.213766,-4.156936 z m 40.69605,0 c -0.941972,1.493975 -1.967855,2.911461 -3.213765,4.156936 -2.74253,2.741571 -6.244106,4.696717 -9.955686,5.868615 0.261347,-0.241079 0.507495,-0.394491 0.768509,-0.663713 1.674841,-1.727516 3.320792,-4.181056 4.645987,-7.265904 2.962447,-0.503021 5.408965,-1.122293 7.161107,-1.781544 0.284034,-0.106865 0.337297,-0.207323 0.593848,-0.31439 z m -31.404076,2.305527 c 2.645807,0.376448 5.701178,0.649995 9.466635,0.698645 l 0.139729,7.789888 c -1.38739,-0.480844 -3.316218,-1.29837 -5.659022,-3.388427 -1.388822,-1.238993 -2.743668,-3.0113 -3.947342,-5.100106 z m 20.365491,0.104797 c -1.04872,2.041937 -2.174337,3.779068 -3.353494,4.995309 -1.853177,1.911459 -3.425515,2.82679 -4.611055,3.353494 l -0.139729,-7.789887 c 3.13091,-0.05714 5.728238,-0.278725 8.104278,-0.558916 z" }) }) }),
|
|
1103
1210
|
onClick: () => {
|
|
@@ -1106,7 +1213,7 @@ const Ir = -1, xr = (e) => {
|
|
|
1106
1213
|
}
|
|
1107
1214
|
),
|
|
1108
1215
|
r(oe.SCENE2D) && /* @__PURE__ */ l(
|
|
1109
|
-
|
|
1216
|
+
Oe,
|
|
1110
1217
|
{
|
|
1111
1218
|
icon: /* @__PURE__ */ l("div", { className: `mapViewIcon ${t === oe.SCENE2D ? "mapViewCurrent" : ""}`, children: /* @__PURE__ */ l("svg", { width: "100%", height: "100%", viewBox: "0 0 64 64", children: /* @__PURE__ */ l("path", { d: "m 2.9825053,17.550598 0,1.368113 0,26.267766 0,1.368113 1.36811,0 54.9981397,0 1.36811,0 0,-1.368113 0,-26.267766 0,-1.368113 -1.36811,0 -54.9981397,0 -1.36811,0 z m 2.73623,2.736226 10.3292497,0 0,10.466063 -10.3292497,0 0,-10.466063 z m 13.0654697,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 10.32926,0 0,10.466063 -10.32926,0 0,-10.466063 z m -41.9326497,13.202288 10.3292497,0 0,10.329252 -10.3292497,0 0,-10.329252 z m 13.0654697,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 10.32926,0 0,10.329252 -10.32926,0 0,-10.329252 z" }) }) }),
|
|
1112
1219
|
onClick: () => {
|
|
@@ -1115,7 +1222,7 @@ const Ir = -1, xr = (e) => {
|
|
|
1115
1222
|
}
|
|
1116
1223
|
),
|
|
1117
1224
|
r(oe.COLUMBUS_VIEW) && /* @__PURE__ */ l(
|
|
1118
|
-
|
|
1225
|
+
Oe,
|
|
1119
1226
|
{
|
|
1120
1227
|
icon: /* @__PURE__ */ l("div", { className: `mapViewIcon ${t === oe.COLUMBUS_VIEW ? "mapViewCurrent" : ""}`, children: /* @__PURE__ */ l("svg", { width: "100%", height: "100%", viewBox: "0 0 64 64", children: /* @__PURE__ */ l("path", { d: "m 14.723969,17.675598 -0.340489,0.817175 -11.1680536,26.183638 -0.817175,1.872692 2.076986,0 54.7506996,0 2.07698,0 -0.81717,-1.872692 -11.16805,-26.183638 -0.34049,-0.817175 -0.91933,0 -32.414586,0 -0.919322,0 z m 1.838643,2.723916 6.196908,0 -2.928209,10.418977 -7.729111,0 4.460412,-10.418977 z m 9.02297,0 4.903049,0 0,10.418977 -7.831258,0 2.928209,-10.418977 z m 7.626964,0 5.584031,0 2.62176,10.418977 -8.205791,0 0,-10.418977 z m 8.410081,0 5.51593,0 4.46042,10.418977 -7.38863,0 -2.58772,-10.418977 z m -30.678091,13.142892 8.103649,0 -2.89416,10.282782 -9.6018026,0 4.3923136,-10.282782 z m 10.929711,0 8.614384,0 0,10.282782 -11.508544,0 2.89416,-10.282782 z m 11.338299,0 8.852721,0 2.58772,10.282782 -11.440441,0 0,-10.282782 z m 11.678781,0 7.86531,0 4.39231,10.282782 -9.6699,0 -2.58772,-10.282782 z" }) }) }),
|
|
1121
1228
|
onClick: () => {
|
|
@@ -1125,87 +1232,87 @@ const Ir = -1, xr = (e) => {
|
|
|
1125
1232
|
)
|
|
1126
1233
|
] });
|
|
1127
1234
|
};
|
|
1128
|
-
const
|
|
1129
|
-
(e) =>
|
|
1235
|
+
const ro = Ne(
|
|
1236
|
+
(e) => je({
|
|
1130
1237
|
mapContainer: {
|
|
1131
1238
|
width: "60px",
|
|
1132
1239
|
height: "60px",
|
|
1133
1240
|
border: `${e.palette.background.paper} 2px solid`
|
|
1134
1241
|
}
|
|
1135
1242
|
})
|
|
1136
|
-
),
|
|
1137
|
-
const n = le(), { baseMaps: t } = e, [i, o] =
|
|
1138
|
-
|
|
1139
|
-
const
|
|
1140
|
-
|
|
1243
|
+
), oo = (e) => {
|
|
1244
|
+
const n = le(), { baseMaps: t } = e, [i, o] = x(" "), [r, c] = x(), u = ro();
|
|
1245
|
+
D(() => {
|
|
1246
|
+
const g = t == null ? void 0 : t.maps.find((E) => E.isCurrent);
|
|
1247
|
+
g && (c(g), o(g.title !== void 0 ? g.title : " "));
|
|
1141
1248
|
}, [t]);
|
|
1142
|
-
const m = (
|
|
1143
|
-
var E,
|
|
1249
|
+
const m = (g) => {
|
|
1250
|
+
var E, S;
|
|
1144
1251
|
if (t) {
|
|
1145
1252
|
(E = n.layersManager) == null || E.removeBaseMapLayers();
|
|
1146
|
-
const w = t.maps.find((P) => P.id ===
|
|
1147
|
-
w && ((
|
|
1253
|
+
const w = t.maps.find((P) => P.id === g);
|
|
1254
|
+
w && ((S = n.layersManager) == null || S.setBaseMapLayers(w), c(w), t.maps.forEach((P) => {
|
|
1148
1255
|
P.isCurrent = w === P;
|
|
1149
1256
|
}));
|
|
1150
1257
|
}
|
|
1151
1258
|
};
|
|
1152
1259
|
return /* @__PURE__ */ N(te, { children: [
|
|
1153
1260
|
/* @__PURE__ */ l("label", { className: "mapLabel", children: i }),
|
|
1154
|
-
/* @__PURE__ */ l("ul", { className: "mapSelector", children: t == null ? void 0 : t.maps.map((
|
|
1261
|
+
/* @__PURE__ */ l("ul", { className: "mapSelector", children: t == null ? void 0 : t.maps.map((g) => /* @__PURE__ */ l("li", { className: `mapContainer ${u.mapContainer} ${g === r ? "mapContainerSelected" : ""}`, children: /* @__PURE__ */ l(
|
|
1155
1262
|
"img",
|
|
1156
1263
|
{
|
|
1157
1264
|
alt: "",
|
|
1158
1265
|
className: "mapContainerImg",
|
|
1159
|
-
src:
|
|
1266
|
+
src: g.thumbnail,
|
|
1160
1267
|
onMouseOver: () => {
|
|
1161
|
-
o(
|
|
1268
|
+
o(g.title);
|
|
1162
1269
|
},
|
|
1163
1270
|
onMouseOut: () => {
|
|
1164
1271
|
o((r == null ? void 0 : r.title) !== void 0 ? r.title : " ");
|
|
1165
1272
|
},
|
|
1166
1273
|
onClick: () => {
|
|
1167
|
-
m(
|
|
1274
|
+
m(g.id);
|
|
1168
1275
|
}
|
|
1169
1276
|
}
|
|
1170
|
-
) },
|
|
1277
|
+
) }, g.id)) })
|
|
1171
1278
|
] });
|
|
1172
1279
|
};
|
|
1173
|
-
const
|
|
1174
|
-
const [n, t] =
|
|
1175
|
-
return
|
|
1176
|
-
const E = (
|
|
1280
|
+
const nt = "ic_settings_24px", so = (e) => {
|
|
1281
|
+
const [n, t] = x(!1), { sceneModes: i, baseMaps: o, locale: r } = e, c = Se(null), u = Z(r, "MAP_SETTINGS_DIALOG_TITLE") ?? "Map Settings", m = Z(r, "MAP_SETTINGS_SCENE_MODE_TITLE") ?? "Scene Mode", g = Z(r, "MAP_SETTINGS_BASE_MAP_TITLE") ?? "Base Map";
|
|
1282
|
+
return D(() => {
|
|
1283
|
+
const E = (S) => {
|
|
1177
1284
|
var R;
|
|
1178
|
-
const w =
|
|
1179
|
-
P && !P.contains(w) && w.id !==
|
|
1285
|
+
const w = S.target, P = Z(c, "current");
|
|
1286
|
+
P && !P.contains(w) && w.id !== nt && ((R = w.parentElement) == null ? void 0 : R.id) !== nt && (document.removeEventListener("click", E, !1), t(!1));
|
|
1180
1287
|
};
|
|
1181
1288
|
return document.addEventListener("click", E, !1), () => {
|
|
1182
1289
|
document.removeEventListener("click", E, !1);
|
|
1183
1290
|
};
|
|
1184
1291
|
}), /* @__PURE__ */ N(te, { children: [
|
|
1185
1292
|
/* @__PURE__ */ l(
|
|
1186
|
-
|
|
1293
|
+
Oe,
|
|
1187
1294
|
{
|
|
1188
|
-
icon: /* @__PURE__ */ l("div", { className: "settingsIconContainer", children: /* @__PURE__ */ l("svg", { width: "100%", height: "100%", viewBox: "0 0 24 24", id:
|
|
1295
|
+
icon: /* @__PURE__ */ l("div", { className: "settingsIconContainer", children: /* @__PURE__ */ l("svg", { width: "100%", height: "100%", viewBox: "0 0 24 24", id: nt, x: "288", y: "24", children: /* @__PURE__ */ l("path", { d: "M19.43 12.98c.04-.32.07-.64.07-.98s-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.3-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65A.488.488 0 0 0 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.23-.09-.49 0-.61.22l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98s.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.12.22.39.3.61.22l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.23.09.49 0 .61-.22l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zM12 15.5c-1.93 0-3.5-1.57-3.5-3.5s1.57-3.5 3.5-3.5 3.5 1.57 3.5 3.5-1.57 3.5-3.5 3.5z" }) }) }),
|
|
1189
1296
|
onClick: () => {
|
|
1190
1297
|
t(!n);
|
|
1191
1298
|
}
|
|
1192
1299
|
}
|
|
1193
1300
|
),
|
|
1194
1301
|
n && /* @__PURE__ */ l("div", { id: "dialog-portal-example", className: "settingsDialogPortal", ref: c, children: /* @__PURE__ */ N(
|
|
1195
|
-
|
|
1302
|
+
Rn,
|
|
1196
1303
|
{
|
|
1197
1304
|
open: n,
|
|
1198
1305
|
onClosed: () => {
|
|
1199
1306
|
t(!1);
|
|
1200
1307
|
},
|
|
1201
1308
|
children: [
|
|
1202
|
-
/* @__PURE__ */ l(
|
|
1203
|
-
/* @__PURE__ */ N(
|
|
1309
|
+
/* @__PURE__ */ l(Nn, { children: u }),
|
|
1310
|
+
/* @__PURE__ */ N(Bn, { children: [
|
|
1204
1311
|
/* @__PURE__ */ l("h4", { className: "sectionLabel", children: m }),
|
|
1205
|
-
/* @__PURE__ */ l(ce, { className: "mapScenesContainer", children: /* @__PURE__ */ l(
|
|
1312
|
+
/* @__PURE__ */ l(ce, { className: "mapScenesContainer", children: /* @__PURE__ */ l(io, { sceneModes: i }) }),
|
|
1206
1313
|
/* @__PURE__ */ l(ce, { className: "baseMapsContainer", children: o && /* @__PURE__ */ N(te, { children: [
|
|
1207
|
-
/* @__PURE__ */ l("h4", { className: "sectionLabel", children:
|
|
1208
|
-
/* @__PURE__ */ l(
|
|
1314
|
+
/* @__PURE__ */ l("h4", { className: "sectionLabel", children: g }),
|
|
1315
|
+
/* @__PURE__ */ l(oo, { baseMaps: o })
|
|
1209
1316
|
] }) })
|
|
1210
1317
|
] })
|
|
1211
1318
|
]
|
|
@@ -1213,10 +1320,10 @@ const Qe = "ic_settings_24px", Or = (e) => {
|
|
|
1213
1320
|
) })
|
|
1214
1321
|
] });
|
|
1215
1322
|
};
|
|
1216
|
-
const
|
|
1323
|
+
const ao = /* @__PURE__ */ l("svg", { xmlns: "http://www.w3.org/2000/svg", enableBackground: "new 0 0 24 24", height: "24", width: "24", viewBox: "0 0 612 612", children: /* @__PURE__ */ N("g", { xmlns: "http://www.w3.org/2000/svg", children: [
|
|
1217
1324
|
/* @__PURE__ */ l("path", { d: "M322.4,173.9l-129,16.2l-4.6,21.4l25.3,4.7c16.5,3.9,19.8,9.9,16.2,26.4l-41.5,195.3c-10.9,50.5,5.9,74.3,45.5,74.3 c30.7,0,66.3-14.2,82.5-33.6l4.9-23.4c-11.3,9.9-27.7,13.9-38.6,13.9c-15.5,0-21.1-10.9-17.1-30L322.4,173.9z" }),
|
|
1218
1325
|
/* @__PURE__ */ l("circle", { cx: "270.1", cy: "56.3", r: "56.3" })
|
|
1219
|
-
] }) }),
|
|
1326
|
+
] }) }), lo = ({ onClick: e }) => /* @__PURE__ */ l(ce, { onClick: e, className: "mapLegendToggleContainer", children: /* @__PURE__ */ l(Oe, { icon: ao, className: "mapLegendIcon" }) }), co = ({ legend: { legendImg: e, legendDoc: n, layer: t }, docText: i, imgText: o }) => {
|
|
1220
1327
|
const r = me(() => {
|
|
1221
1328
|
window.open(e, "_blank");
|
|
1222
1329
|
}, [e]);
|
|
@@ -1224,8 +1331,8 @@ const Rr = /* @__PURE__ */ l("svg", { xmlns: "http://www.w3.org/2000/svg", enabl
|
|
|
1224
1331
|
window.open(n, "_blank");
|
|
1225
1332
|
}, [n]);
|
|
1226
1333
|
const c = me(() => {
|
|
1227
|
-
const
|
|
1228
|
-
return (t ?? "").length > 15 ? /* @__PURE__ */ l(
|
|
1334
|
+
const g = /* @__PURE__ */ l(ce, { className: "layerNameContainer", children: /* @__PURE__ */ l("h3", { style: { maxWidth: `${15}ch` }, className: "layerName", children: t }) });
|
|
1335
|
+
return (t ?? "").length > 15 ? /* @__PURE__ */ l(ot, { content: t, children: g }) : g;
|
|
1229
1336
|
}, [t]), u = me(() => [
|
|
1230
1337
|
typeof e == "string" && /* @__PURE__ */ l("a", { className: "legendAction", href: e, target: "_blank", rel: "noreferrer", children: o }),
|
|
1231
1338
|
typeof n == "string" && /* @__PURE__ */ l("a", { className: "legendAction", href: n, target: "_blank", rel: "noreferrer", children: i })
|
|
@@ -1235,29 +1342,29 @@ const Rr = /* @__PURE__ */ l("svg", { xmlns: "http://www.w3.org/2000/svg", enabl
|
|
|
1235
1342
|
/* @__PURE__ */ l("img", { alt: "Map Legend", className: "legendImg", src: e, onClick: r }),
|
|
1236
1343
|
/* @__PURE__ */ l(ce, { className: "legendActionsContainer", children: u() })
|
|
1237
1344
|
] });
|
|
1238
|
-
},
|
|
1239
|
-
const o = me(() => /* @__PURE__ */ l(ce, { className: "noLegendsContainer", children: /* @__PURE__ */ l("h2", { className: "noLegendsMsg", children: i }) }), [i]), r = me(() => e.length ? e.map((c, u) => /* @__PURE__ */ l(
|
|
1345
|
+
}, uo = ({ legends: e, actionsTexts: { docText: n, imgText: t }, noLegendsText: i }) => {
|
|
1346
|
+
const o = me(() => /* @__PURE__ */ l(ce, { className: "noLegendsContainer", children: /* @__PURE__ */ l("h2", { className: "noLegendsMsg", children: i }) }), [i]), r = me(() => e.length ? e.map((c, u) => /* @__PURE__ */ l(co, { legend: c, docText: n, imgText: t }, `${c.layer}_${u}`)) : o(), [e]);
|
|
1240
1347
|
return /* @__PURE__ */ l(ce, { className: "mapLegendsList", children: r() });
|
|
1241
|
-
},
|
|
1348
|
+
}, ho = ({
|
|
1242
1349
|
isOpen: e,
|
|
1243
1350
|
toggleSidebar: n,
|
|
1244
1351
|
title: t = "Map Legends",
|
|
1245
1352
|
noLegendsText: i = "No legends to display...",
|
|
1246
1353
|
actionsTexts: o = { docText: "Docs", imgText: "View Image" },
|
|
1247
1354
|
legends: r = []
|
|
1248
|
-
}) => e ? /* @__PURE__ */ N(
|
|
1249
|
-
/* @__PURE__ */ l(
|
|
1250
|
-
/* @__PURE__ */ N(
|
|
1251
|
-
/* @__PURE__ */ l(
|
|
1252
|
-
/* @__PURE__ */ l(
|
|
1355
|
+
}) => e ? /* @__PURE__ */ N(Fn, { className: "mapLegendSidebarContainer", modal: !1, dismissible: !0, open: e, children: [
|
|
1356
|
+
/* @__PURE__ */ l(Hn, { className: "sidebarHeaderContainer", children: /* @__PURE__ */ l(Vn, { className: "sidebarTitle", children: t }) }),
|
|
1357
|
+
/* @__PURE__ */ N(Gn, { className: "sidebarContent", children: [
|
|
1358
|
+
/* @__PURE__ */ l(Oe, { onClick: n, className: "mapLegendCloseBtn", icon: { icon: "close", size: "small" } }),
|
|
1359
|
+
/* @__PURE__ */ l(uo, { noLegendsText: i, legends: r, actionsTexts: o })
|
|
1253
1360
|
] })
|
|
1254
|
-
] }) : null, he = document.createElement("canvas"), re = he.getContext("2d"),
|
|
1361
|
+
] }) : null, he = document.createElement("canvas"), re = he.getContext("2d"), xt = (e) => {
|
|
1255
1362
|
const i = (e == null ? void 0 : e.data) ?? [];
|
|
1256
1363
|
for (let o = 3; o < i.length; o += 4)
|
|
1257
1364
|
if (i[o] < 255)
|
|
1258
1365
|
return !0;
|
|
1259
1366
|
return !1;
|
|
1260
|
-
},
|
|
1367
|
+
}, mo = async (e, n) => (n && n.tileTransparencyCheckedCounter++, new Promise((t, i) => {
|
|
1261
1368
|
try {
|
|
1262
1369
|
re == null || re.clearRect(0, 0, he.width, he.height);
|
|
1263
1370
|
let o;
|
|
@@ -1265,7 +1372,7 @@ const Rr = /* @__PURE__ */ l("svg", { xmlns: "http://www.w3.org/2000/svg", enabl
|
|
|
1265
1372
|
o = e;
|
|
1266
1373
|
else if (e instanceof ImageBitmap) {
|
|
1267
1374
|
he.width = e.width, he.height = e.height, re == null || re.drawImage(e, 0, 0);
|
|
1268
|
-
const r = re == null ? void 0 : re.getImageData(0, 0, he.width, he.height), c =
|
|
1375
|
+
const r = re == null ? void 0 : re.getImageData(0, 0, he.width, he.height), c = xt(r);
|
|
1269
1376
|
c && n && (n.tileTransparencyCheckedCounter = n.maxTilesForTransparencyCheck), t(c);
|
|
1270
1377
|
return;
|
|
1271
1378
|
} else
|
|
@@ -1273,80 +1380,80 @@ const Rr = /* @__PURE__ */ l("svg", { xmlns: "http://www.w3.org/2000/svg", enabl
|
|
|
1273
1380
|
o.onload = () => {
|
|
1274
1381
|
he.width = o.width, he.height = o.height, re == null || re.drawImage(o, 0, 0);
|
|
1275
1382
|
const r = re == null ? void 0 : re.getImageData(0, 0, he.width, he.height);
|
|
1276
|
-
|
|
1383
|
+
xt(r) ? (n && (n.tileTransparencyCheckedCounter = n.maxTilesForTransparencyCheck), t(!0)) : t(!1);
|
|
1277
1384
|
};
|
|
1278
1385
|
} catch (o) {
|
|
1279
1386
|
console.error("Could not determine image transparency. Error => ", o), i(o);
|
|
1280
1387
|
}
|
|
1281
|
-
})),
|
|
1282
|
-
const { west: t, east: i, north: o, south: r } = e, { west: c, east: u, north: m, south:
|
|
1283
|
-
return t >= c && i <= u && o <= m && r >=
|
|
1284
|
-
},
|
|
1285
|
-
function
|
|
1388
|
+
})), Ve = (e, n) => {
|
|
1389
|
+
const { west: t, east: i, north: o, south: r } = e, { west: c, east: u, north: m, south: g } = n;
|
|
1390
|
+
return t >= c && i <= u && o <= m && r >= g;
|
|
1391
|
+
}, qe = 3, Ue = "hasTransparency";
|
|
1392
|
+
function gt(e, n, t, i, o) {
|
|
1286
1393
|
return setTimeout(() => {
|
|
1287
1394
|
var u;
|
|
1288
1395
|
const r = (u = this.layerListInstance.find(
|
|
1289
1396
|
/* eslint-disable */
|
|
1290
1397
|
(m) => {
|
|
1291
|
-
var
|
|
1292
|
-
return ((
|
|
1398
|
+
var g, E;
|
|
1399
|
+
return ((g = m._imageryProvider._resource) == null ? void 0 : g._url) === ((E = this._resource) == null ? void 0 : E._url);
|
|
1293
1400
|
}
|
|
1294
1401
|
/* eslint-enable */
|
|
1295
|
-
)) == null ? void 0 : u.meta, c = Z(r,
|
|
1296
|
-
this.tileTransparencyCheckedCounter <
|
|
1297
|
-
var
|
|
1298
|
-
(
|
|
1299
|
-
{ [
|
|
1402
|
+
)) == null ? void 0 : u.meta, c = Z(r, Ue) === !0;
|
|
1403
|
+
this.tileTransparencyCheckedCounter < qe && !c && mo(o == null ? void 0 : o.url, this).then((m) => {
|
|
1404
|
+
var g;
|
|
1405
|
+
(g = this.mapViewer.layersManager) == null || g.addMetaToLayer(
|
|
1406
|
+
{ [Ue]: m },
|
|
1300
1407
|
/* eslint-disable */
|
|
1301
1408
|
(E) => E._imageryProvider._resource._url === this._resource._url
|
|
1302
1409
|
);
|
|
1303
1410
|
});
|
|
1304
1411
|
}, 0), e(n, t, i, o);
|
|
1305
1412
|
}
|
|
1306
|
-
class
|
|
1413
|
+
class hn extends ht {
|
|
1307
1414
|
constructor(t, i) {
|
|
1308
1415
|
var o;
|
|
1309
1416
|
super(t);
|
|
1310
1417
|
X(this, "layerListInstance");
|
|
1311
1418
|
X(this, "mapViewer");
|
|
1312
|
-
X(this, "maxTilesForTransparencyCheck",
|
|
1419
|
+
X(this, "maxTilesForTransparencyCheck", qe);
|
|
1313
1420
|
X(this, "tileTransparencyCheckedCounter", 0);
|
|
1314
1421
|
this.layerListInstance = (o = i.layersManager) == null ? void 0 : o.layerList, this.mapViewer = i;
|
|
1315
1422
|
}
|
|
1316
1423
|
requestImage(t, i, o, r) {
|
|
1317
|
-
return
|
|
1424
|
+
return gt.call(this, super.requestImage.bind(this), t, i, o, r);
|
|
1318
1425
|
}
|
|
1319
1426
|
}
|
|
1320
|
-
class
|
|
1427
|
+
class mn extends mt {
|
|
1321
1428
|
constructor(t, i) {
|
|
1322
1429
|
var o;
|
|
1323
1430
|
super(t);
|
|
1324
1431
|
X(this, "layerListInstance");
|
|
1325
1432
|
X(this, "mapViewer");
|
|
1326
|
-
X(this, "maxTilesForTransparencyCheck",
|
|
1433
|
+
X(this, "maxTilesForTransparencyCheck", qe);
|
|
1327
1434
|
X(this, "tileTransparencyCheckedCounter", 0);
|
|
1328
1435
|
this.layerListInstance = (o = i.layersManager) == null ? void 0 : o.layerList, this.mapViewer = i;
|
|
1329
1436
|
}
|
|
1330
1437
|
requestImage(t, i, o, r) {
|
|
1331
|
-
return
|
|
1438
|
+
return gt.call(this, super.requestImage.bind(this), t, i, o, r);
|
|
1332
1439
|
}
|
|
1333
1440
|
}
|
|
1334
|
-
class
|
|
1441
|
+
class pn extends pt {
|
|
1335
1442
|
constructor(t, i) {
|
|
1336
1443
|
var o;
|
|
1337
1444
|
super(t);
|
|
1338
1445
|
X(this, "layerListInstance");
|
|
1339
1446
|
X(this, "mapViewer");
|
|
1340
|
-
X(this, "maxTilesForTransparencyCheck",
|
|
1447
|
+
X(this, "maxTilesForTransparencyCheck", qe);
|
|
1341
1448
|
X(this, "tileTransparencyCheckedCounter", 0);
|
|
1342
1449
|
this.layerListInstance = (o = i.layersManager) == null ? void 0 : o.layerList, this.mapViewer = i;
|
|
1343
1450
|
}
|
|
1344
1451
|
requestImage(t, i, o, r) {
|
|
1345
|
-
return
|
|
1452
|
+
return gt.call(this, super.requestImage.bind(this), t, i, o, r);
|
|
1346
1453
|
}
|
|
1347
1454
|
}
|
|
1348
|
-
const
|
|
1349
|
-
class
|
|
1455
|
+
const po = 1, go = -1, Ot = "TRANSPARENT_BASE_LAYER";
|
|
1456
|
+
class fo {
|
|
1350
1457
|
constructor(n, t, i, o) {
|
|
1351
1458
|
X(this, "mapViewer");
|
|
1352
1459
|
X(this, "legendsList");
|
|
@@ -1354,9 +1461,9 @@ class $r {
|
|
|
1354
1461
|
X(this, "layers");
|
|
1355
1462
|
X(this, "legendsExtractor");
|
|
1356
1463
|
X(this, "layerManagerFootprintMetaFieldPath");
|
|
1357
|
-
this.mapViewer = n, this.layers = this.mapViewer.imageryLayers._layers, this.legendsList = [], this.legendsExtractor = t, this.layerUpdated = new
|
|
1464
|
+
this.mapViewer = n, this.layers = this.mapViewer.imageryLayers._layers, this.legendsList = [], this.legendsExtractor = t, this.layerUpdated = new zi(), this.layerManagerFootprintMetaFieldPath = o, i && this.layerUpdated.addEventListener(i, this), this.mapViewer.shouldOptimizedTileRequests && (this.layerUpdated.addEventListener((r) => {
|
|
1358
1465
|
const c = Object.keys(r);
|
|
1359
|
-
c.length === 1 && c[0] ===
|
|
1466
|
+
c.length === 1 && c[0] === Ue && (this.markRelevantLayersForExtent(), this.hideNonRelevantLayers());
|
|
1360
1467
|
}), this.mapViewer.imageryLayers.layerRemoved.addEventListener(() => {
|
|
1361
1468
|
this.setLegends(), this.markRelevantLayersForExtent(), this.hideNonRelevantLayers();
|
|
1362
1469
|
}), this.mapViewer.imageryLayers.layerMoved.addEventListener(() => {
|
|
@@ -1381,23 +1488,23 @@ class $r {
|
|
|
1381
1488
|
setBaseMapLayers(n) {
|
|
1382
1489
|
n.baseRasteLayers.sort((i, o) => i.zIndex - o.zIndex).forEach((i, o) => {
|
|
1383
1490
|
this.addRasterLayer(i, o, n.id);
|
|
1384
|
-
}), this.mapViewer.shouldOptimizedTileRequests && (this.removeLayer(
|
|
1491
|
+
}), this.mapViewer.shouldOptimizedTileRequests && (this.removeLayer(Ot), this.addTransparentImageryProvider());
|
|
1385
1492
|
}
|
|
1386
1493
|
addRasterLayer(n, t, i) {
|
|
1387
1494
|
let o;
|
|
1388
1495
|
switch (n.type) {
|
|
1389
1496
|
case "XYZ_LAYER": {
|
|
1390
|
-
const r = n.options, c = this.mapViewer.shouldOptimizedTileRequests ? new
|
|
1497
|
+
const r = n.options, c = this.mapViewer.shouldOptimizedTileRequests ? new hn(r, this.mapViewer) : new ht(r);
|
|
1391
1498
|
o = this.mapViewer.imageryLayers.addImageryProvider(c, t);
|
|
1392
1499
|
break;
|
|
1393
1500
|
}
|
|
1394
1501
|
case "WMS_LAYER": {
|
|
1395
|
-
const r = n.options, c = this.mapViewer.shouldOptimizedTileRequests ? new
|
|
1502
|
+
const r = n.options, c = this.mapViewer.shouldOptimizedTileRequests ? new mn(r, this.mapViewer) : new mt(r);
|
|
1396
1503
|
o = this.mapViewer.imageryLayers.addImageryProvider(c, t);
|
|
1397
1504
|
break;
|
|
1398
1505
|
}
|
|
1399
1506
|
case "WMTS_LAYER": {
|
|
1400
|
-
const r = n.options, c = this.mapViewer.shouldOptimizedTileRequests ? new
|
|
1507
|
+
const r = n.options, c = this.mapViewer.shouldOptimizedTileRequests ? new pn(r, this.mapViewer) : new pt(r);
|
|
1401
1508
|
o = this.mapViewer.imageryLayers.addImageryProvider(c, t);
|
|
1402
1509
|
break;
|
|
1403
1510
|
}
|
|
@@ -1469,33 +1576,33 @@ class $r {
|
|
|
1469
1576
|
}
|
|
1470
1577
|
findLayerByPOI(n, t, i = !0) {
|
|
1471
1578
|
if (this.layerManagerFootprintMetaFieldPath) {
|
|
1472
|
-
const o =
|
|
1579
|
+
const o = Yr(this.mapViewer, n, t);
|
|
1473
1580
|
return this.layers.filter((u) => !Z(u.meta, "parentBasetMapId")).filter((u) => {
|
|
1474
1581
|
const m = Z(u.meta, this.layerManagerFootprintMetaFieldPath);
|
|
1475
|
-
return m !== void 0 ?
|
|
1582
|
+
return m !== void 0 ? Ji(o.geometry, {
|
|
1476
1583
|
type: "Feature",
|
|
1477
1584
|
properties: {},
|
|
1478
1585
|
geometry: m
|
|
1479
1586
|
}) && (i ? u.show : !0) : (console.warn("[LayerManager] [findLayerByPOI] CesiumImageryLayer has no defined footprint", u.meta), !1);
|
|
1480
1587
|
}).sort((u, m) => {
|
|
1481
|
-
var
|
|
1482
|
-
return ((
|
|
1588
|
+
var g, E;
|
|
1589
|
+
return ((g = m.meta) == null ? void 0 : g.zIndex) - ((E = u.meta) == null ? void 0 : E.zIndex);
|
|
1483
1590
|
});
|
|
1484
1591
|
} else
|
|
1485
1592
|
return console.warn("[LayerManager] [findLayerByPOI]layerManagerFootprintMetaFieldPath is not defined"), [];
|
|
1486
1593
|
}
|
|
1487
1594
|
addTransparentImageryProvider() {
|
|
1488
1595
|
const n = this.mapViewer.imageryLayers.addImageryProvider(
|
|
1489
|
-
new
|
|
1596
|
+
new $i({
|
|
1490
1597
|
url: "./assets/img/transparent-tile.png",
|
|
1491
1598
|
/* eslint-disable @typescript-eslint/no-magic-numbers */
|
|
1492
|
-
rectangle: new
|
|
1599
|
+
rectangle: new De(-3.141592653589793, -1.5707963267948966, 3.141592653589793, 1.5707963267948966)
|
|
1493
1600
|
/* eslint-enable @typescript-eslint/no-magic-numbers */
|
|
1494
1601
|
}),
|
|
1495
1602
|
0
|
|
1496
1603
|
);
|
|
1497
1604
|
n.meta = {
|
|
1498
|
-
id:
|
|
1605
|
+
id: Ot,
|
|
1499
1606
|
skipRelevancyCheck: !0,
|
|
1500
1607
|
parentBasetMapId: "TRANSPARENT_LAYER"
|
|
1501
1608
|
};
|
|
@@ -1510,11 +1617,11 @@ class $r {
|
|
|
1510
1617
|
return this.layers.find((t) => t.meta !== void 0 ? t.meta.id === n : !1);
|
|
1511
1618
|
}
|
|
1512
1619
|
updateLayersOrder(n, t, i) {
|
|
1513
|
-
const o = t > i ?
|
|
1620
|
+
const o = t > i ? po : go, r = t < i ? t : i, c = t < i ? i : t;
|
|
1514
1621
|
this.layers.forEach((u) => {
|
|
1515
|
-
var
|
|
1622
|
+
var g;
|
|
1516
1623
|
if (!Z(u.meta, "parentBasetMapId")) {
|
|
1517
|
-
const E = (
|
|
1624
|
+
const E = (g = u.meta) == null ? void 0 : g.zIndex;
|
|
1518
1625
|
u.meta.zIndex = E >= r && E <= c && E !== t ? E + o : E === t ? i : E;
|
|
1519
1626
|
}
|
|
1520
1627
|
});
|
|
@@ -1529,17 +1636,17 @@ class $r {
|
|
|
1529
1636
|
try {
|
|
1530
1637
|
const i = this.mapViewer.camera.computeViewRectangle();
|
|
1531
1638
|
for (let o = this.layers.length - 1; o >= 0; o--) {
|
|
1532
|
-
const r = this.layers[o], c = !
|
|
1639
|
+
const r = this.layers[o], c = !lt(i) && !lt(r.rectangle) && De.intersection(i, r.rectangle);
|
|
1533
1640
|
for (let u = this.layers.length - 1; u >= o; u--) {
|
|
1534
1641
|
if (((n = r.meta) == null ? void 0 : n.skipRelevancyCheck) === !0) {
|
|
1535
1642
|
r.meta = { ...r.meta, relevantToExtent: !0 };
|
|
1536
1643
|
continue;
|
|
1537
1644
|
}
|
|
1538
|
-
const m = this.layers[u],
|
|
1645
|
+
const m = this.layers[u], g = ((t = m.meta) == null ? void 0 : t[Ue]) === !0;
|
|
1539
1646
|
if (r !== m)
|
|
1540
|
-
if (c instanceof
|
|
1541
|
-
if (
|
|
1542
|
-
if (
|
|
1647
|
+
if (c instanceof De) {
|
|
1648
|
+
if (Ve(i, r.rectangle))
|
|
1649
|
+
if (Ve(i, m.rectangle) && !g) {
|
|
1543
1650
|
r.meta = {
|
|
1544
1651
|
...r.meta ?? {},
|
|
1545
1652
|
relevantToExtent: !1
|
|
@@ -1550,15 +1657,15 @@ class $r {
|
|
|
1550
1657
|
...r.meta ?? {},
|
|
1551
1658
|
relevantToExtent: !0
|
|
1552
1659
|
};
|
|
1553
|
-
if (
|
|
1660
|
+
if (Ve(i, m.rectangle) && !g) {
|
|
1554
1661
|
r.meta = { ...r.meta ?? {}, relevantToExtent: !1 };
|
|
1555
1662
|
break;
|
|
1556
1663
|
}
|
|
1557
|
-
if (
|
|
1664
|
+
if (Ve(r.rectangle, m.rectangle)) {
|
|
1558
1665
|
if (r.meta = {
|
|
1559
1666
|
...r.meta ?? {},
|
|
1560
|
-
relevantToExtent:
|
|
1561
|
-
}, !
|
|
1667
|
+
relevantToExtent: g
|
|
1668
|
+
}, !g)
|
|
1562
1669
|
break;
|
|
1563
1670
|
} else
|
|
1564
1671
|
r.meta = { ...r.meta ?? {}, relevantToExtent: !0 };
|
|
@@ -1567,7 +1674,7 @@ class $r {
|
|
|
1567
1674
|
else
|
|
1568
1675
|
o === this.layers.length - 1 && (r.meta = {
|
|
1569
1676
|
...r.meta ?? {},
|
|
1570
|
-
relevantToExtent: c instanceof
|
|
1677
|
+
relevantToExtent: c instanceof De
|
|
1571
1678
|
});
|
|
1572
1679
|
}
|
|
1573
1680
|
}
|
|
@@ -1576,11 +1683,11 @@ class $r {
|
|
|
1576
1683
|
}
|
|
1577
1684
|
}
|
|
1578
1685
|
}
|
|
1579
|
-
const
|
|
1686
|
+
const yo = (e) => {
|
|
1580
1687
|
const n = le(), { enableCompass: t = !0, enableZoomControls: i = !1, lockCompassNavigation: o = !1, locale: r = { DIRECTION: "ltr" } } = e;
|
|
1581
|
-
return
|
|
1688
|
+
return D(() => {
|
|
1582
1689
|
if (typeof Z(n, "cesiumNavigation") > "u") {
|
|
1583
|
-
n.extend(
|
|
1690
|
+
n.extend(Qi, {
|
|
1584
1691
|
enableCompass: t,
|
|
1585
1692
|
enableZoomControls: i,
|
|
1586
1693
|
enableDistanceLegend: !1
|
|
@@ -1593,8 +1700,8 @@ const Wr = (e) => {
|
|
|
1593
1700
|
(c = n.cesiumNavigation) == null || c.destroy();
|
|
1594
1701
|
};
|
|
1595
1702
|
}, [n, t, i, r.DIRECTION, o]), null;
|
|
1596
|
-
},
|
|
1597
|
-
class
|
|
1703
|
+
}, At = 212, kt = 260, vo = 0;
|
|
1704
|
+
class ba extends Wi {
|
|
1598
1705
|
constructor(t, i) {
|
|
1599
1706
|
super(t, i);
|
|
1600
1707
|
X(this, "layersManager");
|
|
@@ -1607,14 +1714,14 @@ class Os extends _i {
|
|
|
1607
1714
|
this.useOptimizedTileRequests = t;
|
|
1608
1715
|
}
|
|
1609
1716
|
}
|
|
1610
|
-
const
|
|
1611
|
-
const e =
|
|
1717
|
+
const gn = Le(null), Eo = gn.Provider, le = () => {
|
|
1718
|
+
const e = _e(gn);
|
|
1612
1719
|
if (e === null)
|
|
1613
1720
|
throw new Error("map context is null, please check the provider");
|
|
1614
1721
|
return e;
|
|
1615
|
-
},
|
|
1616
|
-
var Y,
|
|
1617
|
-
const n =
|
|
1722
|
+
}, Sa = (e) => {
|
|
1723
|
+
var Y, k, z, Q, ie, fe, de, se;
|
|
1724
|
+
const n = Se(null), [t, i] = x(), [o, r] = x(), [c, u] = x(), [m, g] = x(), [E, S] = x(), [w, P] = x(), [R, G] = x(), [q, H] = x(!1), [j, K] = x(), O = Se(), [$, A] = x(), [W, ne] = x([]), [s, a] = x(), [v, d] = x(!1), y = Se(), [h, C] = x(void 0), [f, T] = x(!1), [_, L] = x(), b = {
|
|
1618
1725
|
fullscreenButton: !0,
|
|
1619
1726
|
timeline: !1,
|
|
1620
1727
|
animation: !1,
|
|
@@ -1625,28 +1732,28 @@ const ln = Oe(null), Kr = ln.Provider, le = () => {
|
|
|
1625
1732
|
sceneModePicker: !1,
|
|
1626
1733
|
imageryProvider: !1,
|
|
1627
1734
|
...e
|
|
1628
|
-
}, M = (B, F, ee, we,
|
|
1629
|
-
const ye = t.container,
|
|
1735
|
+
}, M = (B, F, ee, we, Me) => {
|
|
1736
|
+
const ye = t.container, Ae = ye.clientWidth, yt = ye.clientHeight, vt = we + Me;
|
|
1630
1737
|
return {
|
|
1631
|
-
left: `${
|
|
1632
|
-
top: `${
|
|
1738
|
+
left: `${Ae - B < ee ? B - (ee - (Ae - B)) : B}px`,
|
|
1739
|
+
top: `${yt - F < vt ? F - (vt - (yt - F)) : F}px`
|
|
1633
1740
|
};
|
|
1634
|
-
},
|
|
1741
|
+
}, I = me((B) => {
|
|
1635
1742
|
if (n.current !== null) {
|
|
1636
1743
|
const F = n.current.cesiumElement, ee = { x: B.offsetX, y: B.offsetY };
|
|
1637
|
-
d(!1), C(ee), L(
|
|
1744
|
+
d(!1), C(ee), L(un(F, ee.x, ee.y)), d(!0), y.current = B;
|
|
1638
1745
|
}
|
|
1639
1746
|
}, [n]);
|
|
1640
|
-
|
|
1747
|
+
D(() => {
|
|
1641
1748
|
var B;
|
|
1642
1749
|
if (n.current !== null) {
|
|
1643
1750
|
const F = n.current.cesiumElement;
|
|
1644
|
-
e.imageryContextMenu && (F.scene.canvas.removeEventListener("contextmenu",
|
|
1751
|
+
e.imageryContextMenu && (F.scene.canvas.removeEventListener("contextmenu", I), F.scene.canvas.addEventListener("contextmenu", I));
|
|
1645
1752
|
}
|
|
1646
1753
|
i((B = n.current) == null ? void 0 : B.cesiumElement);
|
|
1647
|
-
}, [n, e.imageryContextMenu]),
|
|
1754
|
+
}, [n, e.imageryContextMenu]), D(() => {
|
|
1648
1755
|
var B;
|
|
1649
|
-
t && (t.shouldOptimizedTileRequests = e.useOptimizedTileRequests ?? !1, t.layersManager = new
|
|
1756
|
+
t && (t.shouldOptimizedTileRequests = e.useOptimizedTileRequests ?? !1, t.layersManager = new fo(
|
|
1650
1757
|
t,
|
|
1651
1758
|
(B = e.legends) == null ? void 0 : B.mapLegendsExtractor,
|
|
1652
1759
|
() => {
|
|
@@ -1655,30 +1762,30 @@ const ln = Oe(null), Kr = ln.Provider, le = () => {
|
|
|
1655
1762
|
},
|
|
1656
1763
|
e.layerManagerFootprintMetaFieldPath
|
|
1657
1764
|
));
|
|
1658
|
-
}, [t]),
|
|
1765
|
+
}, [t]), D(() => {
|
|
1659
1766
|
t && (t.shouldOptimizedTileRequests = e.useOptimizedTileRequests ?? !1);
|
|
1660
|
-
}, [e.useOptimizedTileRequests, t]),
|
|
1661
|
-
|
|
1662
|
-
}, [e.sceneModes]),
|
|
1767
|
+
}, [e.useOptimizedTileRequests, t]), D(() => {
|
|
1768
|
+
A(e.sceneModes ?? [oe.SCENE2D, oe.SCENE3D, oe.COLUMBUS_VIEW]);
|
|
1769
|
+
}, [e.sceneModes]), D(() => {
|
|
1663
1770
|
var F, ee;
|
|
1664
1771
|
a(e.baseMaps);
|
|
1665
1772
|
const B = (F = e.baseMaps) == null ? void 0 : F.maps.find((we) => we.isCurrent);
|
|
1666
1773
|
B && t && ((ee = t.layersManager) == null || ee.setBaseMapLayers(B));
|
|
1667
|
-
}, [e.baseMaps, t]),
|
|
1774
|
+
}, [e.baseMaps, t]), D(() => {
|
|
1668
1775
|
r(e.projection ?? pe.WGS84);
|
|
1669
|
-
}, [e.projection]),
|
|
1670
|
-
|
|
1671
|
-
}, [e.locale]),
|
|
1776
|
+
}, [e.projection]), D(() => {
|
|
1777
|
+
K(e.locale);
|
|
1778
|
+
}, [e.locale]), D(() => {
|
|
1672
1779
|
u(e.showMousePosition ?? !0);
|
|
1673
|
-
}, [e.showMousePosition]),
|
|
1674
|
-
|
|
1675
|
-
}, [e.showZoomLevel]),
|
|
1676
|
-
|
|
1677
|
-
}, [e.showScale]),
|
|
1780
|
+
}, [e.showMousePosition]), D(() => {
|
|
1781
|
+
g(e.showZoomLevel ?? !0);
|
|
1782
|
+
}, [e.showZoomLevel]), D(() => {
|
|
1783
|
+
S(e.showScale ?? !0);
|
|
1784
|
+
}, [e.showScale]), D(() => {
|
|
1678
1785
|
P(e.showCompass ?? !0);
|
|
1679
|
-
}, [e.showCompass]),
|
|
1680
|
-
|
|
1681
|
-
}, [e.showLoadingProgress]),
|
|
1786
|
+
}, [e.showCompass]), D(() => {
|
|
1787
|
+
G(e.showLoadingProgress ?? !0);
|
|
1788
|
+
}, [e.showLoadingProgress]), D(() => {
|
|
1682
1789
|
const B = () => {
|
|
1683
1790
|
if (t === void 0)
|
|
1684
1791
|
return {
|
|
@@ -1689,35 +1796,35 @@ const ln = Oe(null), Kr = ln.Provider, le = () => {
|
|
|
1689
1796
|
const F = () => {
|
|
1690
1797
|
const ee = t.camera.positionCartographic;
|
|
1691
1798
|
return {
|
|
1692
|
-
longitude:
|
|
1693
|
-
latitude:
|
|
1799
|
+
longitude: He(ee.longitude),
|
|
1800
|
+
latitude: He(ee.latitude),
|
|
1694
1801
|
height: ee.height
|
|
1695
1802
|
};
|
|
1696
1803
|
};
|
|
1697
|
-
if (t.scene.mode ===
|
|
1804
|
+
if (t.scene.mode === be.SCENE3D) {
|
|
1698
1805
|
const ee = new Ce(
|
|
1699
1806
|
// eslint-disable-next-line @typescript-eslint/no-magic-numbers
|
|
1700
1807
|
t.container.clientWidth / 2,
|
|
1701
1808
|
// eslint-disable-next-line @typescript-eslint/no-magic-numbers
|
|
1702
1809
|
t.container.clientHeight / 2
|
|
1703
|
-
), we = t.scene.camera.getPickRay(ee),
|
|
1704
|
-
if (!
|
|
1810
|
+
), we = t.scene.camera.getPickRay(ee), Me = t.scene.globe.pick(we, t.scene);
|
|
1811
|
+
if (!Me)
|
|
1705
1812
|
return {
|
|
1706
1813
|
longitude: 0,
|
|
1707
1814
|
latitude: 0,
|
|
1708
1815
|
height: 0
|
|
1709
1816
|
};
|
|
1710
|
-
const ye = t.scene.globe.ellipsoid.cartesianToCartographic(
|
|
1817
|
+
const ye = t.scene.globe.ellipsoid.cartesianToCartographic(Me);
|
|
1711
1818
|
return ye !== void 0 ? {
|
|
1712
|
-
longitude:
|
|
1713
|
-
latitude:
|
|
1819
|
+
longitude: He(ye.longitude),
|
|
1820
|
+
latitude: He(ye.latitude),
|
|
1714
1821
|
height: t.scene.camera.positionCartographic.height
|
|
1715
1822
|
} : F();
|
|
1716
1823
|
} else
|
|
1717
1824
|
return F();
|
|
1718
1825
|
};
|
|
1719
1826
|
t && (t.camera.moveEnd.addEventListener(() => {
|
|
1720
|
-
if (t.scene.mode !==
|
|
1827
|
+
if (t.scene.mode !== be.MORPHING) {
|
|
1721
1828
|
const F = t.camera, ee = {
|
|
1722
1829
|
position: B(),
|
|
1723
1830
|
direction: F.direction.clone(),
|
|
@@ -1726,15 +1833,15 @@ const ln = Oe(null), Kr = ln.Provider, le = () => {
|
|
|
1726
1833
|
transform: F.transform.clone(),
|
|
1727
1834
|
frustum: F.frustum.clone()
|
|
1728
1835
|
};
|
|
1729
|
-
|
|
1836
|
+
O.current = ee;
|
|
1730
1837
|
}
|
|
1731
1838
|
}), R && t.scene.globe.tileLoadProgressEvent.addEventListener(function() {
|
|
1732
1839
|
t.scene.globe.tilesLoaded === !0 ? H(!1) : H(!0);
|
|
1733
1840
|
}));
|
|
1734
|
-
}, [t]),
|
|
1841
|
+
}, [t]), D(() => {
|
|
1735
1842
|
const B = () => {
|
|
1736
|
-
if (t &&
|
|
1737
|
-
const F =
|
|
1843
|
+
if (t && O.current) {
|
|
1844
|
+
const F = O.current;
|
|
1738
1845
|
t.camera.flyTo({
|
|
1739
1846
|
destination: ve.fromDegrees(F.position.longitude, F.position.latitude, F.position.height),
|
|
1740
1847
|
duration: 0
|
|
@@ -1749,130 +1856,130 @@ const ln = Oe(null), Kr = ln.Provider, le = () => {
|
|
|
1749
1856
|
console.error("morphCompleteHandler event not cleaned");
|
|
1750
1857
|
}
|
|
1751
1858
|
};
|
|
1752
|
-
}, [t]),
|
|
1859
|
+
}, [t]), D(() => {
|
|
1753
1860
|
const B = e.zoom, F = e.center;
|
|
1754
|
-
t &&
|
|
1755
|
-
destination: ve.fromDegrees(F[0], F[1],
|
|
1861
|
+
t && We(B) && Xi(F) && t.camera.flyTo({
|
|
1862
|
+
destination: ve.fromDegrees(F[0], F[1], qr(B)),
|
|
1756
1863
|
duration: 0
|
|
1757
1864
|
});
|
|
1758
1865
|
}, [e.zoom, e.center, t]);
|
|
1759
|
-
const U = me(() => t &&
|
|
1866
|
+
const U = me(() => t && Ci(
|
|
1760
1867
|
/* @__PURE__ */ N(te, { children: [
|
|
1761
|
-
R === !0 ? q && /* @__PURE__ */ l(
|
|
1868
|
+
R === !0 ? q && /* @__PURE__ */ l(zn, { style: { position: "absolute", top: 0, height: "10px", zIndex: 4 } }) : /* @__PURE__ */ l(te, {}),
|
|
1762
1869
|
/* @__PURE__ */ N(ce, { className: "sideToolsContainer", children: [
|
|
1763
|
-
/* @__PURE__ */ l(
|
|
1764
|
-
/* @__PURE__ */ l(
|
|
1870
|
+
/* @__PURE__ */ l(so, { sceneModes: $, baseMaps: s, locale: j }),
|
|
1871
|
+
/* @__PURE__ */ l(lo, { onClick: () => T(!f) })
|
|
1765
1872
|
] }),
|
|
1766
1873
|
/* @__PURE__ */ N(ce, { className: "toolsContainer", children: [
|
|
1767
|
-
c === !0 ? /* @__PURE__ */ l(
|
|
1768
|
-
m === !0 ? /* @__PURE__ */ l(
|
|
1769
|
-
E === !0 ? /* @__PURE__ */ l(
|
|
1770
|
-
w === !0 ? /* @__PURE__ */ l(
|
|
1874
|
+
c === !0 ? /* @__PURE__ */ l(Zr, { projection: o }) : /* @__PURE__ */ l(te, {}),
|
|
1875
|
+
m === !0 ? /* @__PURE__ */ l(to, { locale: j, valueBy: "RENDERED_TILES" }) : /* @__PURE__ */ l(te, {}),
|
|
1876
|
+
E === !0 ? /* @__PURE__ */ l(Qr, { locale: j }) : /* @__PURE__ */ l(te, {}),
|
|
1877
|
+
w === !0 ? /* @__PURE__ */ l(yo, { locale: j }) : /* @__PURE__ */ l(te, {})
|
|
1771
1878
|
] })
|
|
1772
1879
|
] }),
|
|
1773
1880
|
document.querySelector(".cesium-viewer")
|
|
1774
|
-
), [s,
|
|
1775
|
-
return /* @__PURE__ */ l(
|
|
1881
|
+
), [s, j, t, o, $, c, E, f, q]);
|
|
1882
|
+
return /* @__PURE__ */ l(wi, { className: "viewer", full: !0, ref: n, ...b, children: /* @__PURE__ */ N(Eo, { value: t, children: [
|
|
1776
1883
|
/* @__PURE__ */ l(
|
|
1777
|
-
|
|
1884
|
+
ho,
|
|
1778
1885
|
{
|
|
1779
1886
|
title: (Y = e.legends) == null ? void 0 : Y.title,
|
|
1780
|
-
isOpen:
|
|
1781
|
-
toggleSidebar: () =>
|
|
1782
|
-
noLegendsText: (
|
|
1887
|
+
isOpen: f,
|
|
1888
|
+
toggleSidebar: () => T(!f),
|
|
1889
|
+
noLegendsText: (k = e.legends) == null ? void 0 : k.emptyText,
|
|
1783
1890
|
legends: ((z = e.legends) == null ? void 0 : z.legendsList) ?? W,
|
|
1784
1891
|
actionsTexts: (Q = e.legends) == null ? void 0 : Q.actionsTexts
|
|
1785
1892
|
}
|
|
1786
1893
|
),
|
|
1787
1894
|
e.children,
|
|
1788
1895
|
U(),
|
|
1789
|
-
e.imageryContextMenu &&
|
|
1896
|
+
e.imageryContextMenu && v && h && _ && Ee.cloneElement(e.imageryContextMenu, {
|
|
1790
1897
|
data: (ie = t == null ? void 0 : t.layersManager) == null ? void 0 : ie.findLayerByPOI(h.x, h.y, !1),
|
|
1791
1898
|
position: {
|
|
1792
1899
|
x: h.x,
|
|
1793
1900
|
y: h.y
|
|
1794
1901
|
},
|
|
1795
|
-
coordinates:
|
|
1902
|
+
coordinates: _,
|
|
1796
1903
|
style: M(
|
|
1797
1904
|
h.x,
|
|
1798
1905
|
h.y,
|
|
1799
|
-
((fe = e.imageryContextMenuSize) == null ? void 0 : fe.width) ??
|
|
1800
|
-
((de = e.imageryContextMenuSize) == null ? void 0 : de.height) ??
|
|
1801
|
-
((se = e.imageryContextMenuSize) == null ? void 0 : se.dynamicHeightIncrement) ??
|
|
1906
|
+
((fe = e.imageryContextMenuSize) == null ? void 0 : fe.width) ?? kt,
|
|
1907
|
+
((de = e.imageryContextMenuSize) == null ? void 0 : de.height) ?? At,
|
|
1908
|
+
((se = e.imageryContextMenuSize) == null ? void 0 : se.dynamicHeightIncrement) ?? vo
|
|
1802
1909
|
),
|
|
1803
1910
|
size: e.imageryContextMenuSize ?? {
|
|
1804
|
-
height:
|
|
1805
|
-
width:
|
|
1911
|
+
height: At,
|
|
1912
|
+
width: kt
|
|
1806
1913
|
},
|
|
1807
1914
|
handleClose: () => {
|
|
1808
|
-
d(!
|
|
1915
|
+
d(!v);
|
|
1809
1916
|
},
|
|
1810
|
-
contextEvt:
|
|
1917
|
+
contextEvt: y.current
|
|
1811
1918
|
})
|
|
1812
1919
|
] }) });
|
|
1813
|
-
},
|
|
1920
|
+
}, Co = 0, La = (e) => {
|
|
1814
1921
|
const n = le();
|
|
1815
1922
|
return /* @__PURE__ */ l(
|
|
1816
|
-
|
|
1923
|
+
Ti,
|
|
1817
1924
|
{
|
|
1818
1925
|
...e,
|
|
1819
1926
|
onReady: (t) => {
|
|
1820
1927
|
e.isZoomTo === !0 && n.zoomTo(t);
|
|
1821
1928
|
const i = n.scene;
|
|
1822
1929
|
i.globe.depthTestAgainstTerrain = !0;
|
|
1823
|
-
const o = Be.fromCartesian(t.boundingSphere.center), r = e.heightFromGround ??
|
|
1930
|
+
const o = Be.fromCartesian(t.boundingSphere.center), r = e.heightFromGround ?? Co;
|
|
1824
1931
|
if (r) {
|
|
1825
1932
|
const c = ve.fromRadians(o.longitude, o.latitude, o.height), u = ve.fromRadians(o.longitude, o.latitude, o.height + r), m = ve.subtract(u, c, new ve());
|
|
1826
|
-
t.modelMatrix =
|
|
1933
|
+
t.modelMatrix = Ui.fromTranslation(m);
|
|
1827
1934
|
}
|
|
1828
1935
|
}
|
|
1829
1936
|
}
|
|
1830
1937
|
);
|
|
1831
|
-
}, Ge = 180,
|
|
1832
|
-
Ge - Math.abs(e[0]) <
|
|
1833
|
-
},
|
|
1938
|
+
}, Ge = 180, Rt = 1e-3, Nt = (e) => Math.abs(e) / e, Bt = (e) => {
|
|
1939
|
+
Ge - Math.abs(e[0]) < Rt && (e[0] = Nt(e[0]) * (Ge - 1)), Ge / 2 - Math.abs(e[1]) < Rt && (e[1] = Nt(e[1]) * (Ge / 2 - 1));
|
|
1940
|
+
}, Ft = (e) => {
|
|
1834
1941
|
switch (e.type) {
|
|
1835
1942
|
case "LineString":
|
|
1836
1943
|
e.coordinates.forEach((n) => {
|
|
1837
|
-
|
|
1944
|
+
Bt(n);
|
|
1838
1945
|
});
|
|
1839
1946
|
break;
|
|
1840
1947
|
case "Polygon":
|
|
1841
1948
|
e.coordinates.forEach((n) => {
|
|
1842
1949
|
n.forEach((t) => {
|
|
1843
|
-
|
|
1950
|
+
Bt(t);
|
|
1844
1951
|
});
|
|
1845
1952
|
});
|
|
1846
1953
|
break;
|
|
1847
1954
|
}
|
|
1848
|
-
},
|
|
1849
|
-
const { data: n, ...t } = e, i =
|
|
1955
|
+
}, _a = (e) => {
|
|
1956
|
+
const { data: n, ...t } = e, i = Zi(n);
|
|
1850
1957
|
return i && (typeof i.features < "u" ? i.features.forEach((o) => {
|
|
1851
|
-
|
|
1852
|
-
}) :
|
|
1853
|
-
},
|
|
1958
|
+
Ft(o.geometry);
|
|
1959
|
+
}) : Ft(i)), /* @__PURE__ */ l(bi, { data: i, ...t });
|
|
1960
|
+
}, Ye = (e) => {
|
|
1854
1961
|
const { meta: n, ...t } = e, i = le();
|
|
1855
|
-
return
|
|
1962
|
+
return Gt(() => {
|
|
1856
1963
|
var o;
|
|
1857
1964
|
(o = i.layersManager) == null || o.addMetaToLayer(n, n.searchLayerPredicate);
|
|
1858
|
-
}, [n, i]), /* @__PURE__ */ l(
|
|
1859
|
-
},
|
|
1860
|
-
const { options: n, ...t } = e, i = le(), o = i.shouldOptimizedTileRequests ? new
|
|
1861
|
-
return /* @__PURE__ */ l(
|
|
1862
|
-
},
|
|
1863
|
-
const { options: n, ...t } = e, i = le(), o = i.shouldOptimizedTileRequests ? new
|
|
1864
|
-
return /* @__PURE__ */ l(
|
|
1865
|
-
},
|
|
1866
|
-
const { options: n, ...t } = e, i = le(), o = i.shouldOptimizedTileRequests ? new
|
|
1867
|
-
return /* @__PURE__ */ l(
|
|
1868
|
-
},
|
|
1965
|
+
}, [n, i]), /* @__PURE__ */ l(Si, { ...t });
|
|
1966
|
+
}, Ma = (e) => {
|
|
1967
|
+
const { options: n, ...t } = e, i = le(), o = i.shouldOptimizedTileRequests ? new mn(n, i) : new mt(n);
|
|
1968
|
+
return /* @__PURE__ */ l(Ye, { ...t, imageryProvider: o });
|
|
1969
|
+
}, Pa = (e) => {
|
|
1970
|
+
const { options: n, ...t } = e, i = le(), o = i.shouldOptimizedTileRequests ? new pn(n, i) : new pt(n);
|
|
1971
|
+
return /* @__PURE__ */ l(Ye, { ...t, imageryProvider: o });
|
|
1972
|
+
}, Ia = (e) => {
|
|
1973
|
+
const { options: n, ...t } = e, i = le(), o = i.shouldOptimizedTileRequests ? new hn(n, i) : new ht(n);
|
|
1974
|
+
return /* @__PURE__ */ l(Ye, { ...t, imageryProvider: o });
|
|
1975
|
+
}, Da = (e) => {
|
|
1869
1976
|
const { options: n, ...t } = e;
|
|
1870
|
-
return /* @__PURE__ */ l(
|
|
1871
|
-
},
|
|
1872
|
-
var
|
|
1977
|
+
return /* @__PURE__ */ l(Ye, { ...t, imageryProvider: new ji(n) });
|
|
1978
|
+
}, wo = (e) => /* @__PURE__ */ l(Li, { ...e }), xa = (e) => /* @__PURE__ */ l(Xt, { ...e }), To = (e) => /* @__PURE__ */ l(Xt, { ...e }), bo = (e) => /* @__PURE__ */ l(_i, { ...e }), So = (e) => /* @__PURE__ */ l(Mi, { ...e }), Lo = (e) => /* @__PURE__ */ l(Pi, { ...e }), _o = (e) => /* @__PURE__ */ l(Ii, { ...e });
|
|
1979
|
+
var Te = function() {
|
|
1873
1980
|
var e = p.Ellipsoid.WGS84, n, t = p.Material.fromType(p.Material.ColorType);
|
|
1874
|
-
function i(s, a = new p.Color(1, 1, 0, 0.5),
|
|
1875
|
-
this._scene = s.scene, t.uniforms.color = a, n =
|
|
1981
|
+
function i(s, a = new p.Color(1, 1, 0, 0.5), v = new p.Color(1, 1, 1, 1)) {
|
|
1982
|
+
this._scene = s.scene, t.uniforms.color = a, n = v, this._tooltip = {
|
|
1876
1983
|
setVisible: () => {
|
|
1877
1984
|
},
|
|
1878
1985
|
showAt: () => {
|
|
@@ -1880,40 +1987,40 @@ var be = function() {
|
|
|
1880
1987
|
}, this._surfaces = [], this.initialiseHandlers(), this.enhancePrimitives();
|
|
1881
1988
|
}
|
|
1882
1989
|
i.prototype.initialiseHandlers = function() {
|
|
1883
|
-
var s = this._scene, a = this,
|
|
1990
|
+
var s = this._scene, a = this, v = new p.ScreenSpaceEventHandler(s.canvas);
|
|
1884
1991
|
function d(h, C) {
|
|
1885
1992
|
if (a._handlersMuted != !0) {
|
|
1886
|
-
var
|
|
1887
|
-
|
|
1993
|
+
var f = s.pick(C);
|
|
1994
|
+
f && f.primitive && f.primitive[h] && f.primitive[h](C);
|
|
1888
1995
|
}
|
|
1889
1996
|
}
|
|
1890
|
-
|
|
1997
|
+
v.setInputAction(function(h) {
|
|
1891
1998
|
d("leftClick", h.position);
|
|
1892
|
-
}, p.ScreenSpaceEventType.LEFT_CLICK),
|
|
1999
|
+
}, p.ScreenSpaceEventType.LEFT_CLICK), v.setInputAction(function(h) {
|
|
1893
2000
|
d("leftDoubleClick", h.position);
|
|
1894
2001
|
}, p.ScreenSpaceEventType.LEFT_DOUBLE_CLICK);
|
|
1895
|
-
var
|
|
1896
|
-
|
|
2002
|
+
var y;
|
|
2003
|
+
v.setInputAction(function(h) {
|
|
1897
2004
|
if (a._handlersMuted != !0) {
|
|
1898
2005
|
var C = s.pick(h.endPosition);
|
|
1899
|
-
|
|
2006
|
+
y && (!C || y != C.primitive) && (!(y.isDestroyed && y.isDestroyed()) && y.mouseOut(h.endPosition), y = null), C && C.primitive && (C = C.primitive, C.mouseOut && (y = C), C.mouseMove && C.mouseMove(h.endPosition));
|
|
1900
2007
|
}
|
|
1901
|
-
}, p.ScreenSpaceEventType.MOUSE_MOVE),
|
|
2008
|
+
}, p.ScreenSpaceEventType.MOUSE_MOVE), v.setInputAction(function(h) {
|
|
1902
2009
|
d("leftUp", h.position);
|
|
1903
|
-
}, p.ScreenSpaceEventType.LEFT_UP),
|
|
2010
|
+
}, p.ScreenSpaceEventType.LEFT_UP), v.setInputAction(function(h) {
|
|
1904
2011
|
d("leftDown", h.position);
|
|
1905
2012
|
}, p.ScreenSpaceEventType.LEFT_DOWN);
|
|
1906
|
-
}, i.prototype.setListener = function(s, a,
|
|
1907
|
-
s[a] =
|
|
2013
|
+
}, i.prototype.setListener = function(s, a, v) {
|
|
2014
|
+
s[a] = v;
|
|
1908
2015
|
}, i.prototype.muteHandlers = function(s) {
|
|
1909
2016
|
this._handlersMuted = s;
|
|
1910
2017
|
}, i.prototype.registerEditableShape = function(s) {
|
|
1911
2018
|
var a = this;
|
|
1912
|
-
W(s, "mouseMove", function(
|
|
1913
|
-
s.setHighlighted(!0), s._editMode || a._tooltip.showAt(
|
|
1914
|
-
}), W(s, "mouseOut", function(
|
|
2019
|
+
W(s, "mouseMove", function(v) {
|
|
2020
|
+
s.setHighlighted(!0), s._editMode || a._tooltip.showAt(v, "Click to edit this shape");
|
|
2021
|
+
}), W(s, "mouseOut", function(v) {
|
|
1915
2022
|
s.setHighlighted(!1), a._tooltip.setVisible(!1);
|
|
1916
|
-
}), W(s, "leftClick", function(
|
|
2023
|
+
}), W(s, "leftClick", function(v) {
|
|
1917
2024
|
s.setEditMode(!0);
|
|
1918
2025
|
});
|
|
1919
2026
|
}, i.prototype.startDrawing = function(s) {
|
|
@@ -1936,15 +2043,15 @@ var be = function() {
|
|
|
1936
2043
|
asynchronous: !0,
|
|
1937
2044
|
show: !0,
|
|
1938
2045
|
debugShowBoundingVolume: !1
|
|
1939
|
-
}, r =
|
|
2046
|
+
}, r = A(o, {
|
|
1940
2047
|
appearance: new p.EllipsoidSurfaceAppearance({
|
|
1941
2048
|
aboveGround: !1
|
|
1942
2049
|
}),
|
|
1943
2050
|
material: t,
|
|
1944
2051
|
granularity: Math.PI / 180
|
|
1945
|
-
}), c =
|
|
2052
|
+
}), c = A(o, {}), u = A(o, {}), m = A(o, {}), g = A(r, {
|
|
1946
2053
|
rotation: 0
|
|
1947
|
-
}), E =
|
|
2054
|
+
}), E = A(o, {
|
|
1948
2055
|
width: 5,
|
|
1949
2056
|
geodesic: !0,
|
|
1950
2057
|
granularity: 1e4,
|
|
@@ -1952,16 +2059,16 @@ var be = function() {
|
|
|
1952
2059
|
aboveGround: !1
|
|
1953
2060
|
}),
|
|
1954
2061
|
material: t
|
|
1955
|
-
}),
|
|
2062
|
+
}), S = function() {
|
|
1956
2063
|
function s() {
|
|
1957
2064
|
}
|
|
1958
2065
|
return s.prototype.initialiseOptions = function(a) {
|
|
1959
2066
|
$(this, a), this._ellipsoid = void 0, this._granularity = void 0, this._height = void 0, this._textureRotationAngle = void 0, this._id = void 0, this._createPrimitive = !0, this._primitive = void 0, this._outlinePolygon = void 0;
|
|
1960
|
-
}, s.prototype.setAttribute = function(a,
|
|
1961
|
-
this[a] =
|
|
2067
|
+
}, s.prototype.setAttribute = function(a, v) {
|
|
2068
|
+
this[a] = v, this._createPrimitive = !0;
|
|
1962
2069
|
}, s.prototype.getAttribute = function(a) {
|
|
1963
2070
|
return this[a];
|
|
1964
|
-
}, s.prototype.update = function(a,
|
|
2071
|
+
}, s.prototype.update = function(a, v, d) {
|
|
1965
2072
|
if (!p.defined(this.ellipsoid))
|
|
1966
2073
|
throw new p.DeveloperError("this.ellipsoid must be defined.");
|
|
1967
2074
|
if (!p.defined(this.appearance))
|
|
@@ -1970,12 +2077,12 @@ var be = function() {
|
|
|
1970
2077
|
throw new p.DeveloperError("this.granularity and scene2D/scene3D overrides must be greater than zero.");
|
|
1971
2078
|
if (this.show && !(!this._createPrimitive && !p.defined(this._primitive))) {
|
|
1972
2079
|
if (this._createPrimitive || this._ellipsoid !== this.ellipsoid || this._granularity !== this.granularity || this._height !== this.height || this._textureRotationAngle !== this.textureRotationAngle || this._id !== this.id) {
|
|
1973
|
-
var
|
|
1974
|
-
if (!
|
|
2080
|
+
var y = this.getGeometry();
|
|
2081
|
+
if (!y)
|
|
1975
2082
|
return;
|
|
1976
2083
|
this._createPrimitive = !1, this._ellipsoid = this.ellipsoid, this._granularity = this.granularity, this._height = this.height, this._textureRotationAngle = this.textureRotationAngle, this._id = this.id, this._primitive = this._primitive && this._primitive.destroy(), this._primitive = new p.Primitive({
|
|
1977
2084
|
geometryInstances: new p.GeometryInstance({
|
|
1978
|
-
geometry:
|
|
2085
|
+
geometry: y,
|
|
1979
2086
|
id: this.id,
|
|
1980
2087
|
pickPrimitive: this
|
|
1981
2088
|
}),
|
|
@@ -2002,23 +2109,23 @@ var be = function() {
|
|
|
2002
2109
|
}));
|
|
2003
2110
|
}
|
|
2004
2111
|
var h = this._primitive;
|
|
2005
|
-
h.appearance.material = this.material, h.debugShowBoundingVolume = this.debugShowBoundingVolume, h.update(a,
|
|
2112
|
+
h.appearance.material = this.material, h.debugShowBoundingVolume = this.debugShowBoundingVolume, h.update(a, v, d), this._outlinePolygon && this._outlinePolygon.update(a, v, d);
|
|
2006
2113
|
}
|
|
2007
2114
|
}, s.prototype.isDestroyed = function() {
|
|
2008
2115
|
return !1;
|
|
2009
2116
|
}, s.prototype.destroy = function() {
|
|
2010
2117
|
return this._primitive = this._primitive && this._primitive.destroy(), p.destroyObject(this);
|
|
2011
|
-
}, s.prototype.setStrokeStyle = function(a,
|
|
2012
|
-
(!this.strokeColor || !this.strokeColor.equals(a) || this.strokeWidth !=
|
|
2118
|
+
}, s.prototype.setStrokeStyle = function(a, v) {
|
|
2119
|
+
(!this.strokeColor || !this.strokeColor.equals(a) || this.strokeWidth != v) && (this._createPrimitive = !0, this.strokeColor = a, this.strokeWidth = v);
|
|
2013
2120
|
}, s;
|
|
2014
2121
|
}();
|
|
2015
2122
|
i.ExtentPrimitive = function() {
|
|
2016
2123
|
function s(a) {
|
|
2017
2124
|
if (!p.defined(a.extent))
|
|
2018
2125
|
throw new p.DeveloperError("Extent is required");
|
|
2019
|
-
a =
|
|
2126
|
+
a = A(a, r), this.initialiseOptions(a), this.setExtent(a.extent);
|
|
2020
2127
|
}
|
|
2021
|
-
return s.prototype = new
|
|
2128
|
+
return s.prototype = new S(), s.prototype.setExtent = function(a) {
|
|
2022
2129
|
this.setAttribute("extent", a);
|
|
2023
2130
|
}, s.prototype.getExtent = function() {
|
|
2024
2131
|
return this.getAttribute("extent");
|
|
@@ -2039,9 +2146,9 @@ var be = function() {
|
|
|
2039
2146
|
}, s;
|
|
2040
2147
|
}(), i.PolygonPrimitive = function() {
|
|
2041
2148
|
function s(a) {
|
|
2042
|
-
a =
|
|
2149
|
+
a = A(a, r), this.initialiseOptions(a), this.isPolygon = !0;
|
|
2043
2150
|
}
|
|
2044
|
-
return s.prototype = new
|
|
2151
|
+
return s.prototype = new S(), s.prototype.setPositions = function(a) {
|
|
2045
2152
|
this.setAttribute("positions", a);
|
|
2046
2153
|
}, s.prototype.getPositions = function() {
|
|
2047
2154
|
return this.getAttribute("positions");
|
|
@@ -2064,9 +2171,9 @@ var be = function() {
|
|
|
2064
2171
|
function s(a) {
|
|
2065
2172
|
if (!(p.defined(a.center) && p.defined(a.radius)))
|
|
2066
2173
|
throw new p.DeveloperError("Center and radius are required");
|
|
2067
|
-
a =
|
|
2174
|
+
a = A(a, r), this.initialiseOptions(a), this.setRadius(a.radius);
|
|
2068
2175
|
}
|
|
2069
|
-
return s.prototype = new
|
|
2176
|
+
return s.prototype = new S(), s.prototype.setCenter = function(a) {
|
|
2070
2177
|
this.setAttribute("center", a);
|
|
2071
2178
|
}, s.prototype.setRadius = function(a) {
|
|
2072
2179
|
this.setAttribute("radius", Math.max(0.1, a));
|
|
@@ -2095,9 +2202,9 @@ var be = function() {
|
|
|
2095
2202
|
function s(a) {
|
|
2096
2203
|
if (!(p.defined(a.center) && p.defined(a.semiMajorAxis) && p.defined(a.semiMinorAxis)))
|
|
2097
2204
|
throw new p.DeveloperError("Center and semi major and semi minor axis are required");
|
|
2098
|
-
a =
|
|
2205
|
+
a = A(a, g), this.initialiseOptions(a);
|
|
2099
2206
|
}
|
|
2100
|
-
return s.prototype = new
|
|
2207
|
+
return s.prototype = new S(), s.prototype.setCenter = function(a) {
|
|
2101
2208
|
this.setAttribute("center", a);
|
|
2102
2209
|
}, s.prototype.setSemiMajorAxis = function(a) {
|
|
2103
2210
|
a < this.getSemiMinorAxis() || this.setAttribute("semiMajorAxis", a);
|
|
@@ -2136,9 +2243,9 @@ var be = function() {
|
|
|
2136
2243
|
}, s;
|
|
2137
2244
|
}(), i.PolylinePrimitive = function() {
|
|
2138
2245
|
function s(a) {
|
|
2139
|
-
a =
|
|
2246
|
+
a = A(a, E), this.initialiseOptions(a);
|
|
2140
2247
|
}
|
|
2141
|
-
return s.prototype = new
|
|
2248
|
+
return s.prototype = new S(), s.prototype.setPositions = function(a) {
|
|
2142
2249
|
this.setAttribute("positions", a);
|
|
2143
2250
|
}, s.prototype.setWidth = function(a) {
|
|
2144
2251
|
this.setAttribute("width", a);
|
|
@@ -2174,15 +2281,15 @@ var be = function() {
|
|
|
2174
2281
|
shiftX: 0,
|
|
2175
2282
|
shiftY: 0
|
|
2176
2283
|
};
|
|
2177
|
-
i.prototype.createBillboardGroup = function(s, a,
|
|
2284
|
+
i.prototype.createBillboardGroup = function(s, a, v) {
|
|
2178
2285
|
var d = new i.BillboardGroup(this, a);
|
|
2179
|
-
return d.addBillboards(s,
|
|
2286
|
+
return d.addBillboards(s, v), d;
|
|
2180
2287
|
}, i.BillboardGroup = function(s, a) {
|
|
2181
|
-
this._drawHelper = s, this._scene = s._scene, this._options =
|
|
2182
|
-
var
|
|
2183
|
-
this._scene.primitives.add(
|
|
2288
|
+
this._drawHelper = s, this._scene = s._scene, this._options = A(a, w);
|
|
2289
|
+
var v = new p.BillboardCollection();
|
|
2290
|
+
this._scene.primitives.add(v), this._billboards = v, this._orderedBillboards = [];
|
|
2184
2291
|
}, i.BillboardGroup.prototype.createBillboard = function(s, a) {
|
|
2185
|
-
var
|
|
2292
|
+
var v = this._billboards.add({
|
|
2186
2293
|
show: !0,
|
|
2187
2294
|
position: s,
|
|
2188
2295
|
pixelOffset: new p.Cartesian2(this._options.shiftX, this._options.shiftY),
|
|
@@ -2194,53 +2301,53 @@ var be = function() {
|
|
|
2194
2301
|
color: n
|
|
2195
2302
|
});
|
|
2196
2303
|
if (a) {
|
|
2197
|
-
let h = function(
|
|
2198
|
-
|
|
2304
|
+
let h = function(f) {
|
|
2305
|
+
y.enableRotate = f;
|
|
2199
2306
|
}, C = function() {
|
|
2200
|
-
for (var
|
|
2307
|
+
for (var f = 0, T = d._orderedBillboards.length; f < T && d._orderedBillboards[f] != v; ++f)
|
|
2201
2308
|
;
|
|
2202
|
-
return
|
|
2309
|
+
return f;
|
|
2203
2310
|
};
|
|
2204
|
-
var d = this,
|
|
2311
|
+
var d = this, y = this._scene.screenSpaceCameraController;
|
|
2205
2312
|
if (a.dragHandlers) {
|
|
2206
2313
|
var d = this;
|
|
2207
|
-
W(
|
|
2208
|
-
function
|
|
2209
|
-
|
|
2210
|
-
for (var
|
|
2314
|
+
W(v, "leftDown", function(T) {
|
|
2315
|
+
function _(M) {
|
|
2316
|
+
v.position = M;
|
|
2317
|
+
for (var I = 0, U = d._orderedBillboards.length; I < U && d._orderedBillboards[I] != v; ++I)
|
|
2211
2318
|
;
|
|
2212
2319
|
a.dragHandlers.onDrag && a.dragHandlers.onDrag(C(), M);
|
|
2213
2320
|
}
|
|
2214
2321
|
function L(M) {
|
|
2215
|
-
|
|
2322
|
+
b.destroy(), h(!0), a.dragHandlers.onDragEnd && a.dragHandlers.onDragEnd(C(), M);
|
|
2216
2323
|
}
|
|
2217
|
-
var
|
|
2218
|
-
|
|
2219
|
-
var
|
|
2220
|
-
|
|
2221
|
-
}, p.ScreenSpaceEventType.MOUSE_MOVE),
|
|
2324
|
+
var b = new p.ScreenSpaceEventHandler(d._scene.canvas);
|
|
2325
|
+
b.setInputAction(function(M) {
|
|
2326
|
+
var I = d._scene.camera.pickEllipsoid(M.endPosition, e);
|
|
2327
|
+
I ? _(I) : L(I);
|
|
2328
|
+
}, p.ScreenSpaceEventType.MOUSE_MOVE), b.setInputAction(function(M) {
|
|
2222
2329
|
L(d._scene.camera.pickEllipsoid(M.position, e));
|
|
2223
|
-
}, p.ScreenSpaceEventType.LEFT_UP), h(!1), a.dragHandlers.onDragStart && a.dragHandlers.onDragStart(C(), d._scene.camera.pickEllipsoid(
|
|
2330
|
+
}, p.ScreenSpaceEventType.LEFT_UP), h(!1), a.dragHandlers.onDragStart && a.dragHandlers.onDragStart(C(), d._scene.camera.pickEllipsoid(T, e));
|
|
2224
2331
|
});
|
|
2225
2332
|
}
|
|
2226
|
-
a.onDoubleClick && W(
|
|
2333
|
+
a.onDoubleClick && W(v, "leftDoubleClick", function(f) {
|
|
2227
2334
|
a.onDoubleClick(C());
|
|
2228
|
-
}), a.onClick && W(
|
|
2335
|
+
}), a.onClick && W(v, "leftClick", function(f) {
|
|
2229
2336
|
a.onClick(C());
|
|
2230
|
-
}), a.tooltip && (W(
|
|
2231
|
-
d._drawHelper._tooltip.showAt(
|
|
2232
|
-
}), W(
|
|
2337
|
+
}), a.tooltip && (W(v, "mouseMove", function(f) {
|
|
2338
|
+
d._drawHelper._tooltip.showAt(f, a.tooltip());
|
|
2339
|
+
}), W(v, "mouseOut", function(f) {
|
|
2233
2340
|
d._drawHelper._tooltip.setVisible(!1);
|
|
2234
2341
|
}));
|
|
2235
2342
|
}
|
|
2236
|
-
return
|
|
2237
|
-
}, i.BillboardGroup.prototype.insertBillboard = function(s, a,
|
|
2238
|
-
this._orderedBillboards.splice(s, 0, this.createBillboard(a,
|
|
2343
|
+
return v;
|
|
2344
|
+
}, i.BillboardGroup.prototype.insertBillboard = function(s, a, v) {
|
|
2345
|
+
this._orderedBillboards.splice(s, 0, this.createBillboard(a, v));
|
|
2239
2346
|
}, i.BillboardGroup.prototype.addBillboard = function(s, a) {
|
|
2240
2347
|
this._orderedBillboards.push(this.createBillboard(s, a));
|
|
2241
2348
|
}, i.BillboardGroup.prototype.addBillboards = function(s, a) {
|
|
2242
|
-
for (var
|
|
2243
|
-
this.addBillboard(s[
|
|
2349
|
+
for (var v = 0; v < s.length; v++)
|
|
2350
|
+
this.addBillboard(s[v], a);
|
|
2244
2351
|
}, i.BillboardGroup.prototype.updateBillboardsPositions = function(s) {
|
|
2245
2352
|
for (var a = 0; a < s.length; a++)
|
|
2246
2353
|
this.getBillboard(a).position = s[a];
|
|
@@ -2255,69 +2362,69 @@ var be = function() {
|
|
|
2255
2362
|
}, i.BillboardGroup.prototype.setOnTop = function() {
|
|
2256
2363
|
this._scene.primitives.raiseToTop(this._billboards);
|
|
2257
2364
|
}, i.prototype.startDrawingMarker = function(a) {
|
|
2258
|
-
var a =
|
|
2365
|
+
var a = A(a, w);
|
|
2259
2366
|
this.startDrawing(function() {
|
|
2260
|
-
h.remove(), C.destroy(),
|
|
2367
|
+
h.remove(), C.destroy(), y.setVisible(!1);
|
|
2261
2368
|
});
|
|
2262
|
-
var
|
|
2369
|
+
var v = this, d = this._scene;
|
|
2263
2370
|
d.primitives;
|
|
2264
|
-
var
|
|
2265
|
-
C.setInputAction(function(
|
|
2266
|
-
if (
|
|
2267
|
-
var
|
|
2268
|
-
|
|
2371
|
+
var y = this._tooltip, h = new i.BillboardGroup(this, a), C = new p.ScreenSpaceEventHandler(d.canvas);
|
|
2372
|
+
C.setInputAction(function(f) {
|
|
2373
|
+
if (f.position != null) {
|
|
2374
|
+
var T = d.camera.pickEllipsoid(f.position, e);
|
|
2375
|
+
T && (h.addBillboard(T), v.stopDrawing(), a.callback(T));
|
|
2269
2376
|
}
|
|
2270
|
-
}, p.ScreenSpaceEventType.LEFT_CLICK), C.setInputAction(function(
|
|
2271
|
-
var
|
|
2272
|
-
if (
|
|
2273
|
-
var
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
"<p>Click to add your marker. Position is: </p>" +
|
|
2277
|
-
) :
|
|
2377
|
+
}, p.ScreenSpaceEventType.LEFT_CLICK), C.setInputAction(function(f) {
|
|
2378
|
+
var T = f.endPosition;
|
|
2379
|
+
if (T != null) {
|
|
2380
|
+
var _ = d.camera.pickEllipsoid(T, e);
|
|
2381
|
+
_ ? y.showAt(
|
|
2382
|
+
T,
|
|
2383
|
+
"<p>Click to add your marker. Position is: </p>" + K(e.cartesianToCartographic(_))
|
|
2384
|
+
) : y.showAt(T, "<p>Click on the globe to add your marker.</p>");
|
|
2278
2385
|
}
|
|
2279
2386
|
}, p.ScreenSpaceEventType.MOUSE_MOVE);
|
|
2280
2387
|
}, i.prototype.startDrawingPolygon = function(a) {
|
|
2281
|
-
var a =
|
|
2388
|
+
var a = A(a, r);
|
|
2282
2389
|
this.startDrawingPolyshape(!0, a);
|
|
2283
2390
|
}, i.prototype.startDrawingPolyline = function(a) {
|
|
2284
|
-
var a =
|
|
2391
|
+
var a = A(a, E);
|
|
2285
2392
|
this.startDrawingPolyshape(!1, a);
|
|
2286
2393
|
}, i.prototype.startDrawingPolyshape = function(s, a) {
|
|
2287
2394
|
this.startDrawing(function() {
|
|
2288
|
-
|
|
2395
|
+
y.remove(f), _.remove(), L.destroy(), h.setVisible(!1), H(d);
|
|
2289
2396
|
});
|
|
2290
|
-
var
|
|
2291
|
-
s ?
|
|
2292
|
-
var
|
|
2293
|
-
q(d), L.setInputAction(function(
|
|
2294
|
-
if (
|
|
2295
|
-
var M = d.camera.pickEllipsoid(
|
|
2296
|
-
M && (
|
|
2397
|
+
var v = this, d = this._scene, y = d.primitives, h = this._tooltip, C = s ? 3 : 2, f;
|
|
2398
|
+
s ? f = new Te.PolygonPrimitive(a) : f = new Te.PolylinePrimitive(a), f.asynchronous = !1, y.add(f);
|
|
2399
|
+
var T = [], _ = new i.BillboardGroup(this, w), L = new p.ScreenSpaceEventHandler(d.canvas);
|
|
2400
|
+
q(d), L.setInputAction(function(b) {
|
|
2401
|
+
if (b.position != null) {
|
|
2402
|
+
var M = d.camera.pickEllipsoid(b.position, e);
|
|
2403
|
+
M && (T.length == 0 && (T.push(M.clone()), _.addBillboard(T[0])), T.length >= C && (f.positions = T, f._createPrimitive = !0), T.push(M), _.addBillboard(M));
|
|
2297
2404
|
}
|
|
2298
|
-
}, p.ScreenSpaceEventType.LEFT_CLICK), L.setInputAction(function(
|
|
2299
|
-
var M =
|
|
2405
|
+
}, p.ScreenSpaceEventType.LEFT_CLICK), L.setInputAction(function(b) {
|
|
2406
|
+
var M = b.endPosition;
|
|
2300
2407
|
if (M != null)
|
|
2301
|
-
if (
|
|
2408
|
+
if (T.length == 0)
|
|
2302
2409
|
h.showAt(M, "<p>Click to add first point</p>");
|
|
2303
2410
|
else {
|
|
2304
|
-
var
|
|
2305
|
-
|
|
2411
|
+
var I = d.camera.pickEllipsoid(M, e);
|
|
2412
|
+
I && (T.pop(), I.y += 1 + Math.random(), T.push(I), T.length >= C && (f.positions = T, f._createPrimitive = !0), _.getBillboard(T.length - 1).position = I, h.showAt(
|
|
2306
2413
|
M,
|
|
2307
|
-
"<p>Click to add new point (" +
|
|
2414
|
+
"<p>Click to add new point (" + T.length + ")</p>" + (T.length > C ? "<p>Double click to finish drawing</p>" : "")
|
|
2308
2415
|
));
|
|
2309
2416
|
}
|
|
2310
|
-
}, p.ScreenSpaceEventType.MOUSE_MOVE), L.setInputAction(function(
|
|
2311
|
-
var M =
|
|
2417
|
+
}, p.ScreenSpaceEventType.MOUSE_MOVE), L.setInputAction(function(b) {
|
|
2418
|
+
var M = b.position;
|
|
2312
2419
|
if (M != null) {
|
|
2313
|
-
if (
|
|
2420
|
+
if (T.length < C + 2)
|
|
2314
2421
|
return;
|
|
2315
|
-
var
|
|
2316
|
-
|
|
2422
|
+
var I = d.camera.pickEllipsoid(M, e);
|
|
2423
|
+
I && (H(d), v.stopDrawing(), typeof a.callback == "function" && (T.length - 1, a.callback(T)));
|
|
2317
2424
|
}
|
|
2318
2425
|
}, p.ScreenSpaceEventType.LEFT_DOUBLE_CLICK);
|
|
2319
2426
|
};
|
|
2320
|
-
function
|
|
2427
|
+
function G(s) {
|
|
2321
2428
|
return e.cartographicArrayToCartesianArray([
|
|
2322
2429
|
p.Rectangle.northwest(s),
|
|
2323
2430
|
p.Rectangle.northeast(s),
|
|
@@ -2332,68 +2439,68 @@ var be = function() {
|
|
|
2332
2439
|
s && (s.canvas.style.cursor = "");
|
|
2333
2440
|
}
|
|
2334
2441
|
i.prototype.startDrawingExtent = function(a) {
|
|
2335
|
-
var a =
|
|
2442
|
+
var a = A(a, r);
|
|
2336
2443
|
this.startDrawing(function() {
|
|
2337
|
-
|
|
2444
|
+
f != null && y.remove(f), T != null && T.remove(), _.destroy(), h.setVisible(!1), H(d);
|
|
2338
2445
|
});
|
|
2339
|
-
var
|
|
2446
|
+
var v = this, d = this._scene, y = this._scene.primitives, h = this._tooltip, C = null, f = null, T = null, _ = new p.ScreenSpaceEventHandler(d.canvas);
|
|
2340
2447
|
q(d);
|
|
2341
|
-
function L(
|
|
2342
|
-
|
|
2343
|
-
extent:
|
|
2448
|
+
function L(b) {
|
|
2449
|
+
f == null && (f = new Te.ExtentPrimitive({
|
|
2450
|
+
extent: b,
|
|
2344
2451
|
material: a.material
|
|
2345
|
-
}),
|
|
2346
|
-
var M =
|
|
2347
|
-
|
|
2452
|
+
}), f.asynchronous = !1, y.add(f)), f.setExtent(b);
|
|
2453
|
+
var M = G(b);
|
|
2454
|
+
T == null ? (T = new i.BillboardGroup(v, w), T.addBillboards(M)) : T.updateBillboardsPositions(M);
|
|
2348
2455
|
}
|
|
2349
|
-
|
|
2350
|
-
if (
|
|
2351
|
-
var M = d.camera.pickEllipsoid(
|
|
2456
|
+
_.setInputAction(function(b) {
|
|
2457
|
+
if (b.position != null) {
|
|
2458
|
+
var M = d.camera.pickEllipsoid(b.position, e);
|
|
2352
2459
|
if (M)
|
|
2353
|
-
if (
|
|
2460
|
+
if (f == null) {
|
|
2354
2461
|
C = e.cartesianToCartographic(M);
|
|
2355
|
-
var
|
|
2356
|
-
L(
|
|
2462
|
+
var I = j(C, C);
|
|
2463
|
+
L(I);
|
|
2357
2464
|
} else
|
|
2358
|
-
|
|
2465
|
+
v.stopDrawing(), typeof a.callback == "function" && a.callback(j(C, e.cartesianToCartographic(M)));
|
|
2359
2466
|
}
|
|
2360
|
-
}, p.ScreenSpaceEventType.LEFT_DOWN),
|
|
2361
|
-
var M =
|
|
2467
|
+
}, p.ScreenSpaceEventType.LEFT_DOWN), _.setInputAction(function(b) {
|
|
2468
|
+
var M = b.endPosition;
|
|
2362
2469
|
if (M != null)
|
|
2363
|
-
if (
|
|
2470
|
+
if (f == null)
|
|
2364
2471
|
h.showAt(M, "<p>Click to start drawing rectangle</p>");
|
|
2365
2472
|
else {
|
|
2366
|
-
var
|
|
2367
|
-
if (
|
|
2368
|
-
var U =
|
|
2473
|
+
var I = d.camera.pickEllipsoid(M, e);
|
|
2474
|
+
if (I) {
|
|
2475
|
+
var U = j(C, e.cartesianToCartographic(I));
|
|
2369
2476
|
L(U), h.showAt(M, "<p>Drag to change rectangle extent</p><p>Click again to finish drawing</p>");
|
|
2370
2477
|
}
|
|
2371
2478
|
}
|
|
2372
2479
|
}, p.ScreenSpaceEventType.MOUSE_MOVE);
|
|
2373
2480
|
}, i.prototype.startDrawingCircle = function(a) {
|
|
2374
|
-
var a =
|
|
2481
|
+
var a = A(a, r);
|
|
2375
2482
|
this.startDrawing(function() {
|
|
2376
|
-
C != null &&
|
|
2483
|
+
C != null && y.remove(C), f.remove(), T.destroy(), h.setVisible(!1);
|
|
2377
2484
|
});
|
|
2378
|
-
var
|
|
2379
|
-
|
|
2380
|
-
if (
|
|
2381
|
-
var L = d.camera.pickEllipsoid(
|
|
2485
|
+
var v = this, d = this._scene, y = this._scene.primitives, h = this._tooltip, C = null, f = null, T = new p.ScreenSpaceEventHandler(d.canvas);
|
|
2486
|
+
T.setInputAction(function(_) {
|
|
2487
|
+
if (_.position != null) {
|
|
2488
|
+
var L = d.camera.pickEllipsoid(_.position, e);
|
|
2382
2489
|
L && (C == null ? (C = new i.CirclePrimitive({
|
|
2383
2490
|
center: L,
|
|
2384
2491
|
radius: 0,
|
|
2385
2492
|
asynchronous: !1,
|
|
2386
2493
|
material: a.material
|
|
2387
|
-
}),
|
|
2494
|
+
}), y.add(C), f = new i.BillboardGroup(v, w), f.addBillboards([L])) : (typeof a.callback == "function" && a.callback(C.getCenter(), C.getRadius()), v.stopDrawing()));
|
|
2388
2495
|
}
|
|
2389
|
-
}, p.ScreenSpaceEventType.LEFT_DOWN),
|
|
2390
|
-
var L =
|
|
2496
|
+
}, p.ScreenSpaceEventType.LEFT_DOWN), T.setInputAction(function(_) {
|
|
2497
|
+
var L = _.endPosition;
|
|
2391
2498
|
if (L != null)
|
|
2392
2499
|
if (C == null)
|
|
2393
2500
|
h.showAt(L, "<p>Click to start drawing the circle</p>");
|
|
2394
2501
|
else {
|
|
2395
|
-
var
|
|
2396
|
-
|
|
2502
|
+
var b = d.camera.pickEllipsoid(L, e);
|
|
2503
|
+
b && (C.setRadius(p.Cartesian3.distance(C.getCenter(), b)), f.updateBillboardsPositions(b), h.showAt(L, "<p>Move mouse to change circle radius</p><p>Click again to finish drawing</p>"));
|
|
2397
2504
|
}
|
|
2398
2505
|
}, p.ScreenSpaceEventType.MOUSE_MOVE);
|
|
2399
2506
|
}, i.prototype.enhancePrimitives = function() {
|
|
@@ -2402,140 +2509,140 @@ var be = function() {
|
|
|
2402
2509
|
if (this._editable)
|
|
2403
2510
|
return;
|
|
2404
2511
|
this._editable = !0;
|
|
2405
|
-
var d = this,
|
|
2512
|
+
var d = this, y = this;
|
|
2406
2513
|
function h(C) {
|
|
2407
2514
|
s._scene.screenSpaceCameraController.enableRotate = C;
|
|
2408
2515
|
}
|
|
2409
2516
|
W(d, "leftDown", function(C) {
|
|
2410
|
-
function
|
|
2411
|
-
d.position = L,
|
|
2517
|
+
function f(L) {
|
|
2518
|
+
d.position = L, y.executeListeners({ name: "drag", positions: L });
|
|
2412
2519
|
}
|
|
2413
|
-
function
|
|
2414
|
-
|
|
2520
|
+
function T(L) {
|
|
2521
|
+
_.destroy(), h(!0), y.executeListeners({ name: "dragEnd", positions: L });
|
|
2415
2522
|
}
|
|
2416
|
-
var
|
|
2417
|
-
|
|
2418
|
-
var
|
|
2419
|
-
|
|
2420
|
-
}, p.ScreenSpaceEventType.MOUSE_MOVE),
|
|
2421
|
-
|
|
2523
|
+
var _ = new p.ScreenSpaceEventHandler(s._scene.canvas);
|
|
2524
|
+
_.setInputAction(function(L) {
|
|
2525
|
+
var b = s._scene.camera.pickEllipsoid(L.endPosition, e);
|
|
2526
|
+
b ? f(b) : T(b);
|
|
2527
|
+
}, p.ScreenSpaceEventType.MOUSE_MOVE), _.setInputAction(function(L) {
|
|
2528
|
+
T(s._scene.camera.pickEllipsoid(L.position, e));
|
|
2422
2529
|
}, p.ScreenSpaceEventType.LEFT_UP), h(!1);
|
|
2423
2530
|
}), ne(d);
|
|
2424
2531
|
};
|
|
2425
2532
|
function a(d) {
|
|
2426
2533
|
s._scene, !(this._highlighted && this._highlighted == d) && this._editMode !== !0 && (this._highlighted = d, d ? (s.setHighlighted(this), this._strokeColor = this.strokeColor, this.setStrokeStyle(p.Color.fromCssColorString("white"), this.strokeWidth)) : this._strokeColor ? this.setStrokeStyle(this._strokeColor, this.strokeWidth) : this.setStrokeStyle(void 0, void 0));
|
|
2427
2534
|
}
|
|
2428
|
-
function
|
|
2535
|
+
function v(d) {
|
|
2429
2536
|
if (this._editMode != d)
|
|
2430
2537
|
if (s.disableAllHighlights(), d) {
|
|
2431
2538
|
s.setEdited(this);
|
|
2432
|
-
var
|
|
2539
|
+
var y = s._scene, h = this;
|
|
2433
2540
|
if (this._markers == null) {
|
|
2434
|
-
let
|
|
2435
|
-
var Q =
|
|
2436
|
-
Q <
|
|
2541
|
+
let I = function(k, z) {
|
|
2542
|
+
var Q = k - 1 < 0 ? z.length - 1 : k - 1;
|
|
2543
|
+
Q < f.countBillboards() && (f.getBillboard(Q).position = Y(Q)), Q = k, Q < f.countBillboards() && (f.getBillboard(Q).position = Y(Q));
|
|
2437
2544
|
}, U = function() {
|
|
2438
2545
|
h.executeListeners({
|
|
2439
2546
|
name: "onEdited",
|
|
2440
2547
|
positions: h.positions
|
|
2441
2548
|
});
|
|
2442
|
-
}, Y = function(
|
|
2549
|
+
}, Y = function(k) {
|
|
2443
2550
|
var z = h.positions;
|
|
2444
2551
|
return e.cartographicToCartesian(
|
|
2445
2552
|
new p.EllipsoidGeodesic(
|
|
2446
|
-
e.cartesianToCartographic(z[
|
|
2447
|
-
e.cartesianToCartographic(z[
|
|
2553
|
+
e.cartesianToCartographic(z[k]),
|
|
2554
|
+
e.cartesianToCartographic(z[k < z.length - 1 ? k + 1 : 0])
|
|
2448
2555
|
).interpolateUsingFraction(0.5)
|
|
2449
2556
|
);
|
|
2450
2557
|
};
|
|
2451
|
-
var C = new i.BillboardGroup(s, P),
|
|
2558
|
+
var C = new i.BillboardGroup(s, P), f = new i.BillboardGroup(s, R), T = {
|
|
2452
2559
|
dragHandlers: {
|
|
2453
|
-
onDrag: function(
|
|
2454
|
-
h.positions[
|
|
2560
|
+
onDrag: function(k, z) {
|
|
2561
|
+
h.positions[k] = z, I(k, h.positions), h._createPrimitive = !0;
|
|
2455
2562
|
},
|
|
2456
|
-
onDragEnd: function(
|
|
2563
|
+
onDragEnd: function(k, z) {
|
|
2457
2564
|
h._createPrimitive = !0, U();
|
|
2458
2565
|
}
|
|
2459
2566
|
},
|
|
2460
|
-
onDoubleClick: function(
|
|
2461
|
-
h.positions.length < 4 || (h.positions.splice(
|
|
2567
|
+
onDoubleClick: function(k) {
|
|
2568
|
+
h.positions.length < 4 || (h.positions.splice(k, 1), h._createPrimitive = !0, C.removeBillboard(k), f.removeBillboard(k), I(k, h.positions), U());
|
|
2462
2569
|
},
|
|
2463
2570
|
tooltip: function() {
|
|
2464
2571
|
if (h.positions.length > 3)
|
|
2465
2572
|
return "Double click to remove this point";
|
|
2466
2573
|
}
|
|
2467
2574
|
};
|
|
2468
|
-
C.addBillboards(h.positions,
|
|
2469
|
-
for (var
|
|
2470
|
-
|
|
2575
|
+
C.addBillboards(h.positions, T), this._markers = C;
|
|
2576
|
+
for (var _ = [], L = 0, b = h.positions.length + (this.isPolygon ? 0 : -1); L < b; L++)
|
|
2577
|
+
_.push(Y(L));
|
|
2471
2578
|
var M = {
|
|
2472
2579
|
dragHandlers: {
|
|
2473
|
-
onDragStart: function(
|
|
2474
|
-
this.index =
|
|
2580
|
+
onDragStart: function(k, z) {
|
|
2581
|
+
this.index = k + 1, h.positions.splice(this.index, 0, z), h._createPrimitive = !0;
|
|
2475
2582
|
},
|
|
2476
|
-
onDrag: function(
|
|
2583
|
+
onDrag: function(k, z) {
|
|
2477
2584
|
h.positions[this.index] = z, h._createPrimitive = !0;
|
|
2478
2585
|
},
|
|
2479
|
-
onDragEnd: function(
|
|
2480
|
-
C.insertBillboard(this.index, z,
|
|
2586
|
+
onDragEnd: function(k, z) {
|
|
2587
|
+
C.insertBillboard(this.index, z, T), f.getBillboard(this.index - 1).position = Y(this.index - 1), f.insertBillboard(this.index, Y(this.index), M), h._createPrimitive = !0, U();
|
|
2481
2588
|
}
|
|
2482
2589
|
},
|
|
2483
2590
|
tooltip: function() {
|
|
2484
2591
|
return "Drag to create a new point";
|
|
2485
2592
|
}
|
|
2486
2593
|
};
|
|
2487
|
-
|
|
2488
|
-
var z =
|
|
2594
|
+
f.addBillboards(_, M), this._editMarkers = f, this._globeClickhandler = new p.ScreenSpaceEventHandler(y.canvas), this._globeClickhandler.setInputAction(function(k) {
|
|
2595
|
+
var z = y.pick(k.position);
|
|
2489
2596
|
z && z.primitive || h.setEditMode(!1);
|
|
2490
|
-
}, p.ScreenSpaceEventType.LEFT_CLICK), C.setOnTop(),
|
|
2597
|
+
}, p.ScreenSpaceEventType.LEFT_CLICK), C.setOnTop(), f.setOnTop();
|
|
2491
2598
|
}
|
|
2492
2599
|
this._editMode = !0;
|
|
2493
2600
|
} else
|
|
2494
2601
|
this._markers != null && (this._markers.remove(), this._editMarkers.remove(), this._markers = null, this._editMarkers = null, this._globeClickhandler.destroy()), this._editMode = !1;
|
|
2495
2602
|
}
|
|
2496
|
-
|
|
2603
|
+
Te.PolylinePrimitive.prototype.setEditable = function() {
|
|
2497
2604
|
if (!this.setEditMode) {
|
|
2498
2605
|
var d = this;
|
|
2499
|
-
d.isPolygon = !1, d.asynchronous = !1, s.registerEditableShape(d), d.setEditMode =
|
|
2500
|
-
var
|
|
2606
|
+
d.isPolygon = !1, d.asynchronous = !1, s.registerEditableShape(d), d.setEditMode = v;
|
|
2607
|
+
var y = this.width;
|
|
2501
2608
|
d.setHighlighted = function(h) {
|
|
2502
|
-
this._editMode !== !0 && (h ? (s.setHighlighted(this), this.setWidth(
|
|
2609
|
+
this._editMode !== !0 && (h ? (s.setHighlighted(this), this.setWidth(y * 2)) : this.setWidth(y));
|
|
2503
2610
|
}, d.getExtent = function() {
|
|
2504
2611
|
return p.Rectangle.fromCartographicArray(e.cartesianArrayToCartographicArray(this.positions));
|
|
2505
2612
|
}, ne(d), d.setEditMode(!1);
|
|
2506
2613
|
}
|
|
2507
|
-
},
|
|
2614
|
+
}, Te.PolygonPrimitive.prototype.setEditable = function() {
|
|
2508
2615
|
var d = this;
|
|
2509
|
-
d.asynchronous = !1, s._scene, s.registerEditableShape(d), d.setEditMode =
|
|
2510
|
-
},
|
|
2616
|
+
d.asynchronous = !1, s._scene, s.registerEditableShape(d), d.setEditMode = v, d.setHighlighted = a, ne(d), d.setEditMode(!1);
|
|
2617
|
+
}, Te.ExtentPrimitive.prototype.setEditable = function() {
|
|
2511
2618
|
if (!this.setEditMode) {
|
|
2512
|
-
var d = this,
|
|
2619
|
+
var d = this, y = s._scene;
|
|
2513
2620
|
s.registerEditableShape(d), d.asynchronous = !1, d.setEditMode = function(h) {
|
|
2514
2621
|
if (this._editMode != h)
|
|
2515
2622
|
if (s.disableAllHighlights(), h) {
|
|
2516
2623
|
if (s.setEdited(this), this._markers == null) {
|
|
2517
|
-
let
|
|
2624
|
+
let T = function() {
|
|
2518
2625
|
d.executeListeners({
|
|
2519
2626
|
name: "onEdited",
|
|
2520
2627
|
extent: d.extent
|
|
2521
2628
|
});
|
|
2522
2629
|
};
|
|
2523
|
-
var C = new i.BillboardGroup(s, P),
|
|
2630
|
+
var C = new i.BillboardGroup(s, P), f = {
|
|
2524
2631
|
dragHandlers: {
|
|
2525
|
-
onDrag: function(
|
|
2526
|
-
var
|
|
2527
|
-
d.setExtent(
|
|
2632
|
+
onDrag: function(_, L) {
|
|
2633
|
+
var b = C.getBillboard((_ + 2) % 4).position;
|
|
2634
|
+
d.setExtent(j(e.cartesianToCartographic(b), e.cartesianToCartographic(L))), C.updateBillboardsPositions(G(d.extent));
|
|
2528
2635
|
},
|
|
2529
|
-
onDragEnd: function(
|
|
2530
|
-
|
|
2636
|
+
onDragEnd: function(_, L) {
|
|
2637
|
+
T();
|
|
2531
2638
|
}
|
|
2532
2639
|
},
|
|
2533
2640
|
tooltip: function() {
|
|
2534
2641
|
return "Drag to change the corners of this extent";
|
|
2535
2642
|
}
|
|
2536
2643
|
};
|
|
2537
|
-
C.addBillboards(
|
|
2538
|
-
var L =
|
|
2644
|
+
C.addBillboards(G(d.extent), f), this._markers = C, this._globeClickhandler = new p.ScreenSpaceEventHandler(y.canvas), this._globeClickhandler.setInputAction(function(_) {
|
|
2645
|
+
var L = y.pick(_.position);
|
|
2539
2646
|
L && !L.isDestroyed() && L.primitive || d.setEditMode(!1);
|
|
2540
2647
|
}, p.ScreenSpaceEventType.LEFT_CLICK), C.setOnTop();
|
|
2541
2648
|
}
|
|
@@ -2546,14 +2653,14 @@ var be = function() {
|
|
|
2546
2653
|
}
|
|
2547
2654
|
}, i.EllipsePrimitive.prototype.setEditable = function() {
|
|
2548
2655
|
if (!this.setEditMode) {
|
|
2549
|
-
var d = this,
|
|
2656
|
+
var d = this, y = s._scene;
|
|
2550
2657
|
d.asynchronous = !1, s.registerEditableShape(d), d.setEditMode = function(h) {
|
|
2551
2658
|
if (this._editMode != h)
|
|
2552
2659
|
if (s.disableAllHighlights(), h) {
|
|
2553
2660
|
s.setEdited(this);
|
|
2554
2661
|
var C = this;
|
|
2555
2662
|
if (this._markers == null) {
|
|
2556
|
-
let
|
|
2663
|
+
let _ = function() {
|
|
2557
2664
|
return p.EllipseOutlineGeometry(
|
|
2558
2665
|
e,
|
|
2559
2666
|
d.getCenter(),
|
|
@@ -2571,13 +2678,13 @@ var be = function() {
|
|
|
2571
2678
|
rotation: 0
|
|
2572
2679
|
});
|
|
2573
2680
|
};
|
|
2574
|
-
var
|
|
2681
|
+
var f = new i.BillboardGroup(s, P), T = {
|
|
2575
2682
|
dragHandlers: {
|
|
2576
|
-
onDrag: function(
|
|
2577
|
-
var
|
|
2578
|
-
|
|
2683
|
+
onDrag: function(b, M) {
|
|
2684
|
+
var I = p.Cartesian3.distance(d.getCenter(), M);
|
|
2685
|
+
b % 2 == 0 ? d.setSemiMajorAxis(I) : d.setSemiMinorAxis(I), f.updateBillboardsPositions(_());
|
|
2579
2686
|
},
|
|
2580
|
-
onDragEnd: function(
|
|
2687
|
+
onDragEnd: function(b, M) {
|
|
2581
2688
|
L();
|
|
2582
2689
|
}
|
|
2583
2690
|
},
|
|
@@ -2585,10 +2692,10 @@ var be = function() {
|
|
|
2585
2692
|
return "Drag to change the excentricity and radius";
|
|
2586
2693
|
}
|
|
2587
2694
|
};
|
|
2588
|
-
|
|
2589
|
-
var M =
|
|
2695
|
+
f.addBillboards(_(), T), this._markers = f, this._globeClickhandler = new p.ScreenSpaceEventHandler(y.canvas), this._globeClickhandler.setInputAction(function(b) {
|
|
2696
|
+
var M = y.pick(b.position);
|
|
2590
2697
|
M && M.primitive || C.setEditMode(!1);
|
|
2591
|
-
}, p.ScreenSpaceEventType.LEFT_CLICK),
|
|
2698
|
+
}, p.ScreenSpaceEventType.LEFT_CLICK), f.setOnTop();
|
|
2592
2699
|
}
|
|
2593
2700
|
this._editMode = !0;
|
|
2594
2701
|
} else
|
|
@@ -2596,26 +2703,26 @@ var be = function() {
|
|
|
2596
2703
|
}, d.setHighlighted = a, ne(d), d.setEditMode(!1);
|
|
2597
2704
|
}
|
|
2598
2705
|
}, i.CirclePrimitive.prototype.getCircleCartesianCoordinates = function(d) {
|
|
2599
|
-
for (var
|
|
2706
|
+
for (var y = p.CircleOutlineGeometry.createGeometry(
|
|
2600
2707
|
new p.CircleOutlineGeometry({
|
|
2601
2708
|
ellipsoid: e,
|
|
2602
2709
|
center: this.getCenter(),
|
|
2603
2710
|
radius: this.getRadius(),
|
|
2604
2711
|
granularity: d
|
|
2605
2712
|
})
|
|
2606
|
-
), h = 0, C,
|
|
2607
|
-
C =
|
|
2608
|
-
return
|
|
2713
|
+
), h = 0, C, f = []; h < y.attributes.position.values.length; h += 3)
|
|
2714
|
+
C = y.attributes.position.values, f.push(new p.Cartesian3(C[h], C[h + 1], C[h + 2]));
|
|
2715
|
+
return f;
|
|
2609
2716
|
}, i.CirclePrimitive.prototype.setEditable = function() {
|
|
2610
2717
|
if (!this.setEditMode) {
|
|
2611
|
-
var d = this,
|
|
2718
|
+
var d = this, y = s._scene;
|
|
2612
2719
|
d.asynchronous = !1, s.registerEditableShape(d), d.setEditMode = function(h) {
|
|
2613
2720
|
if (this._editMode != h)
|
|
2614
2721
|
if (s.disableAllHighlights(), h) {
|
|
2615
2722
|
s.setEdited(this);
|
|
2616
2723
|
var C = this;
|
|
2617
2724
|
if (this._markers == null) {
|
|
2618
|
-
let
|
|
2725
|
+
let _ = function() {
|
|
2619
2726
|
return C.getCircleCartesianCoordinates(p.Math.PI_OVER_TWO);
|
|
2620
2727
|
}, L = function() {
|
|
2621
2728
|
d.executeListeners({
|
|
@@ -2624,12 +2731,12 @@ var be = function() {
|
|
|
2624
2731
|
radius: d.getRadius()
|
|
2625
2732
|
});
|
|
2626
2733
|
};
|
|
2627
|
-
var
|
|
2734
|
+
var f = new i.BillboardGroup(s, P), T = {
|
|
2628
2735
|
dragHandlers: {
|
|
2629
|
-
onDrag: function(
|
|
2630
|
-
d.setRadius(p.Cartesian3.distance(d.getCenter(), M)),
|
|
2736
|
+
onDrag: function(b, M) {
|
|
2737
|
+
d.setRadius(p.Cartesian3.distance(d.getCenter(), M)), f.updateBillboardsPositions(_());
|
|
2631
2738
|
},
|
|
2632
|
-
onDragEnd: function(
|
|
2739
|
+
onDragEnd: function(b, M) {
|
|
2633
2740
|
L();
|
|
2634
2741
|
}
|
|
2635
2742
|
},
|
|
@@ -2637,10 +2744,10 @@ var be = function() {
|
|
|
2637
2744
|
return "Drag to change the radius";
|
|
2638
2745
|
}
|
|
2639
2746
|
};
|
|
2640
|
-
|
|
2641
|
-
var M =
|
|
2747
|
+
f.addBillboards(_(), T), this._markers = f, this._globeClickhandler = new p.ScreenSpaceEventHandler(y.canvas), this._globeClickhandler.setInputAction(function(b) {
|
|
2748
|
+
var M = y.pick(b.position);
|
|
2642
2749
|
M && M.primitive || C.setEditMode(!1);
|
|
2643
|
-
}, p.ScreenSpaceEventType.LEFT_CLICK),
|
|
2750
|
+
}, p.ScreenSpaceEventType.LEFT_CLICK), f.setOnTop();
|
|
2644
2751
|
}
|
|
2645
2752
|
this._editMode = !0;
|
|
2646
2753
|
} else
|
|
@@ -2649,8 +2756,8 @@ var be = function() {
|
|
|
2649
2756
|
}
|
|
2650
2757
|
};
|
|
2651
2758
|
}, i.DrawHelperWidget = function() {
|
|
2652
|
-
function s(a,
|
|
2653
|
-
if (!p.defined(
|
|
2759
|
+
function s(a, v) {
|
|
2760
|
+
if (!p.defined(v.container))
|
|
2654
2761
|
throw new p.DeveloperError("Container is required");
|
|
2655
2762
|
var d = {
|
|
2656
2763
|
markerIcon: "./assets/img/glyphicons_242_google_maps.png",
|
|
@@ -2664,134 +2771,134 @@ var be = function() {
|
|
|
2664
2771
|
extentDrawingOptions: u,
|
|
2665
2772
|
circleDrawingOptions: m
|
|
2666
2773
|
};
|
|
2667
|
-
$(
|
|
2668
|
-
var
|
|
2669
|
-
h.className = "toolbar",
|
|
2670
|
-
function C(
|
|
2671
|
-
var
|
|
2672
|
-
|
|
2774
|
+
$(v, d);
|
|
2775
|
+
var y = this, h = document.createElement("DIV");
|
|
2776
|
+
h.className = "toolbar", v.container.appendChild(h);
|
|
2777
|
+
function C(_, L, b, M) {
|
|
2778
|
+
var I = document.createElement("DIV");
|
|
2779
|
+
I.className = "button", I.title = b, h.appendChild(I), I.onclick = M;
|
|
2673
2780
|
var U = document.createElement("SPAN");
|
|
2674
|
-
|
|
2781
|
+
I.appendChild(U);
|
|
2675
2782
|
var Y = document.createElement("IMG");
|
|
2676
|
-
return Y.src = L, U.appendChild(Y),
|
|
2783
|
+
return Y.src = L, U.appendChild(Y), I;
|
|
2677
2784
|
}
|
|
2678
|
-
var
|
|
2679
|
-
C("marker",
|
|
2785
|
+
var f = a._scene;
|
|
2786
|
+
C("marker", v.markerIcon, "Click to start drawing a 2D marker", function() {
|
|
2680
2787
|
a.startDrawingMarker({
|
|
2681
|
-
callback: function(
|
|
2682
|
-
|
|
2788
|
+
callback: function(_) {
|
|
2789
|
+
y.executeListeners({
|
|
2683
2790
|
name: "markerCreated",
|
|
2684
|
-
position:
|
|
2791
|
+
position: _
|
|
2685
2792
|
});
|
|
2686
2793
|
}
|
|
2687
2794
|
});
|
|
2688
|
-
}), C("polyline",
|
|
2795
|
+
}), C("polyline", v.polylineIcon, "Click to start drawing a 2D polyline", function() {
|
|
2689
2796
|
a.startDrawingPolyline({
|
|
2690
|
-
callback: function(
|
|
2691
|
-
|
|
2797
|
+
callback: function(_) {
|
|
2798
|
+
y.executeListeners({
|
|
2692
2799
|
name: "polylineCreated",
|
|
2693
|
-
positions:
|
|
2800
|
+
positions: _
|
|
2694
2801
|
});
|
|
2695
2802
|
}
|
|
2696
2803
|
});
|
|
2697
|
-
}), C("polygon",
|
|
2804
|
+
}), C("polygon", v.polygonIcon, "Click to start drawing a 2D polygon", function() {
|
|
2698
2805
|
a.startDrawingPolygon({
|
|
2699
|
-
callback: function(
|
|
2700
|
-
|
|
2806
|
+
callback: function(_) {
|
|
2807
|
+
y.executeListeners({
|
|
2701
2808
|
name: "polygonCreated",
|
|
2702
|
-
positions:
|
|
2809
|
+
positions: _
|
|
2703
2810
|
});
|
|
2704
2811
|
}
|
|
2705
2812
|
});
|
|
2706
|
-
}), C("extent",
|
|
2813
|
+
}), C("extent", v.extentIcon, "Click to start drawing an Extent", function() {
|
|
2707
2814
|
a.startDrawingExtent({
|
|
2708
|
-
callback: function(
|
|
2709
|
-
|
|
2815
|
+
callback: function(_) {
|
|
2816
|
+
y.executeListeners({ name: "extentCreated", extent: _ });
|
|
2710
2817
|
}
|
|
2711
2818
|
});
|
|
2712
|
-
}), C("circle",
|
|
2819
|
+
}), C("circle", v.circleIcon, "Click to start drawing a Circle", function() {
|
|
2713
2820
|
a.startDrawingCircle({
|
|
2714
|
-
callback: function(
|
|
2715
|
-
|
|
2821
|
+
callback: function(_, L) {
|
|
2822
|
+
y.executeListeners({
|
|
2716
2823
|
name: "circleCreated",
|
|
2717
|
-
center:
|
|
2824
|
+
center: _,
|
|
2718
2825
|
radius: L
|
|
2719
2826
|
});
|
|
2720
2827
|
}
|
|
2721
2828
|
});
|
|
2722
2829
|
});
|
|
2723
|
-
var
|
|
2724
|
-
|
|
2725
|
-
|
|
2830
|
+
var T = document.createElement("DIV");
|
|
2831
|
+
T.className = "divider", h.appendChild(T), C("clear", v.clearIcon, "Remove all primitives", function() {
|
|
2832
|
+
f.primitives.removeAll();
|
|
2726
2833
|
}), ne(this);
|
|
2727
2834
|
}
|
|
2728
2835
|
return s;
|
|
2729
2836
|
}(), i.prototype.addToolbar = function(s, a) {
|
|
2730
|
-
return a =
|
|
2837
|
+
return a = A(a, { container: s }), new i.DrawHelperWidget(this, a);
|
|
2731
2838
|
};
|
|
2732
|
-
function
|
|
2733
|
-
var
|
|
2734
|
-
|
|
2839
|
+
function j(s, a) {
|
|
2840
|
+
var v = new p.Rectangle();
|
|
2841
|
+
v.west = Math.min(s.longitude, a.longitude), v.east = Math.max(s.longitude, a.longitude), v.south = Math.min(s.latitude, a.latitude), v.north = Math.max(s.latitude, a.latitude);
|
|
2735
2842
|
var d = p.Math.EPSILON7;
|
|
2736
|
-
return
|
|
2843
|
+
return v.east - v.west < d && (v.east += d * 2), v.north - v.south < d && (v.north += d * 2), v;
|
|
2737
2844
|
}
|
|
2738
|
-
function
|
|
2845
|
+
function K(s, a) {
|
|
2739
2846
|
return s.longitude.toFixed(a || 3) + ", " + s.latitude.toFixed(a || 3);
|
|
2740
2847
|
}
|
|
2741
|
-
function
|
|
2848
|
+
function O(s, a) {
|
|
2742
2849
|
if (s == null || typeof s != "object" || s.constructor != Object && s.constructor != Array)
|
|
2743
2850
|
return s;
|
|
2744
2851
|
if (s.constructor == Date || s.constructor == RegExp || s.constructor == Function || s.constructor == String || s.constructor == Number || s.constructor == Boolean)
|
|
2745
2852
|
return new s.constructor(s);
|
|
2746
2853
|
a = a || new s.constructor();
|
|
2747
|
-
for (var
|
|
2748
|
-
a[
|
|
2854
|
+
for (var v in s)
|
|
2855
|
+
a[v] = typeof a[v] > "u" ? O(s[v], null) : a[v];
|
|
2749
2856
|
return a;
|
|
2750
2857
|
}
|
|
2751
2858
|
function $(s, a) {
|
|
2752
2859
|
s = s || {};
|
|
2753
|
-
var
|
|
2754
|
-
for (
|
|
2755
|
-
s[
|
|
2860
|
+
var v;
|
|
2861
|
+
for (v in a)
|
|
2862
|
+
s[v] === void 0 && (s[v] = O(a[v]));
|
|
2756
2863
|
}
|
|
2757
|
-
function
|
|
2758
|
-
var
|
|
2864
|
+
function A(s, a) {
|
|
2865
|
+
var v = O(s), d;
|
|
2759
2866
|
for (d in a)
|
|
2760
|
-
|
|
2761
|
-
return
|
|
2867
|
+
v[d] === void 0 && (v[d] = O(a[d]));
|
|
2868
|
+
return v;
|
|
2762
2869
|
}
|
|
2763
|
-
function W(s, a,
|
|
2764
|
-
s[a] =
|
|
2870
|
+
function W(s, a, v) {
|
|
2871
|
+
s[a] = v;
|
|
2765
2872
|
}
|
|
2766
2873
|
function ne(s) {
|
|
2767
|
-
s._listeners = {}, s.addListener = function(a,
|
|
2768
|
-
return this._listeners[a] = this._listeners[a] || [], this._listeners[a].push(
|
|
2769
|
-
}, s.executeListeners = function(a,
|
|
2874
|
+
s._listeners = {}, s.addListener = function(a, v) {
|
|
2875
|
+
return this._listeners[a] = this._listeners[a] || [], this._listeners[a].push(v), this._listeners[a].length;
|
|
2876
|
+
}, s.executeListeners = function(a, v) {
|
|
2770
2877
|
if (this._listeners[a.name] && this._listeners[a.name].length > 0)
|
|
2771
2878
|
for (var d = 0; d < this._listeners[a.name].length; d++)
|
|
2772
2879
|
this._listeners[a.name][d](a);
|
|
2773
2880
|
else
|
|
2774
|
-
|
|
2881
|
+
v && v(a);
|
|
2775
2882
|
};
|
|
2776
2883
|
}
|
|
2777
2884
|
return i;
|
|
2778
2885
|
}();
|
|
2779
|
-
const
|
|
2886
|
+
const Mo = 2, Po = (e, n) => {
|
|
2780
2887
|
switch (e) {
|
|
2781
2888
|
case ae.BOX: {
|
|
2782
|
-
if (n.features.length !==
|
|
2889
|
+
if (n.features.length !== Mo)
|
|
2783
2890
|
throw new Error(`${e} must have 2 points`);
|
|
2784
|
-
const t =
|
|
2891
|
+
const t = bt(n.features, (o) => {
|
|
2785
2892
|
var r;
|
|
2786
|
-
return ((r = o.properties) == null ? void 0 : r.type) ===
|
|
2787
|
-
}), i =
|
|
2893
|
+
return ((r = o.properties) == null ? void 0 : r.type) === ct.BOTTOM_LEFT;
|
|
2894
|
+
}), i = bt(n.features, (o) => {
|
|
2788
2895
|
var r;
|
|
2789
|
-
return ((r = o.properties) == null ? void 0 : r.type) ===
|
|
2896
|
+
return ((r = o.properties) == null ? void 0 : r.type) === ct.TOP_RIGHT;
|
|
2790
2897
|
});
|
|
2791
2898
|
if (i && t) {
|
|
2792
2899
|
if (t.geometry.coordinates[0] === i.geometry.coordinates[0] && t.geometry.coordinates[1] === i.geometry.coordinates[1])
|
|
2793
2900
|
throw new Error(`${e} must define BOTTOM_LEFT and TOP_RIGHT different points`);
|
|
2794
|
-
return
|
|
2901
|
+
return De.fromDegrees(
|
|
2795
2902
|
t.geometry.coordinates[0],
|
|
2796
2903
|
t.geometry.coordinates[1],
|
|
2797
2904
|
i.geometry.coordinates[0],
|
|
@@ -2803,7 +2910,7 @@ const eo = 2, to = (e, n) => {
|
|
|
2803
2910
|
default:
|
|
2804
2911
|
throw new Error(`${e} type geoJSON still not supported`);
|
|
2805
2912
|
}
|
|
2806
|
-
},
|
|
2913
|
+
}, Io = (e) => {
|
|
2807
2914
|
const n = e.map((t) => {
|
|
2808
2915
|
const i = Be.fromCartesian(t);
|
|
2809
2916
|
return [ge.toDegrees(i.longitude), ge.toDegrees(i.latitude)];
|
|
@@ -2816,51 +2923,51 @@ const eo = 2, to = (e, n) => {
|
|
|
2816
2923
|
coordinates: [n]
|
|
2817
2924
|
}
|
|
2818
2925
|
};
|
|
2819
|
-
},
|
|
2820
|
-
const n =
|
|
2926
|
+
}, Do = (e) => {
|
|
2927
|
+
const n = Qt.lineString([
|
|
2821
2928
|
[ge.toDegrees(e.west), ge.toDegrees(e.south)],
|
|
2822
2929
|
[ge.toDegrees(e.east), ge.toDegrees(e.north)]
|
|
2823
2930
|
]);
|
|
2824
|
-
return
|
|
2825
|
-
},
|
|
2826
|
-
const n =
|
|
2931
|
+
return tn(en(n));
|
|
2932
|
+
}, xo = (e) => {
|
|
2933
|
+
const n = Qt.lineString([
|
|
2827
2934
|
[e.west, e.south],
|
|
2828
2935
|
[e.east, e.north]
|
|
2829
2936
|
]);
|
|
2830
|
-
return
|
|
2937
|
+
return tn(en(n)).geometry.coordinates[0].map((i) => ve.fromRadiansArray(i)[0]);
|
|
2831
2938
|
};
|
|
2832
|
-
class
|
|
2939
|
+
class Oa extends at {
|
|
2833
2940
|
}
|
|
2834
|
-
const
|
|
2835
|
-
const { drawState: n, drawingMaterial: t, drawingVertexColor: i, material: o, hollow: r, outlineWidth: c } = e, u = le(), [m,
|
|
2836
|
-
|
|
2837
|
-
|
|
2941
|
+
const Aa = (e) => {
|
|
2942
|
+
const { drawState: n, drawingMaterial: t, drawingVertexColor: i, material: o, hollow: r, outlineWidth: c } = e, u = le(), [m, g] = x();
|
|
2943
|
+
D(() => {
|
|
2944
|
+
g(
|
|
2838
2945
|
// eslint-disable-next-line
|
|
2839
|
-
new
|
|
2946
|
+
new Te(u, t, i)
|
|
2840
2947
|
);
|
|
2841
|
-
}, []),
|
|
2948
|
+
}, []), D(() => {
|
|
2842
2949
|
if (m) {
|
|
2843
|
-
const
|
|
2950
|
+
const S = m;
|
|
2844
2951
|
if (n.drawing)
|
|
2845
2952
|
switch (n.type) {
|
|
2846
2953
|
case ae.POLYGON:
|
|
2847
|
-
u.scene.globe.depthTestAgainstTerrain = !1,
|
|
2954
|
+
u.scene.globe.depthTestAgainstTerrain = !1, S.startDrawingPolygon({
|
|
2848
2955
|
callback: (w) => {
|
|
2849
2956
|
n.handler({
|
|
2850
2957
|
primitive: w,
|
|
2851
2958
|
type: ae.POLYGON,
|
|
2852
|
-
geojson:
|
|
2959
|
+
geojson: Io(w)
|
|
2853
2960
|
});
|
|
2854
2961
|
}
|
|
2855
2962
|
});
|
|
2856
2963
|
break;
|
|
2857
2964
|
case ae.BOX:
|
|
2858
|
-
u.scene.globe.depthTestAgainstTerrain = !1,
|
|
2965
|
+
u.scene.globe.depthTestAgainstTerrain = !1, S.startDrawingExtent({
|
|
2859
2966
|
callback: (w) => {
|
|
2860
2967
|
n.handler({
|
|
2861
2968
|
primitive: w,
|
|
2862
2969
|
type: ae.BOX,
|
|
2863
|
-
geojson:
|
|
2970
|
+
geojson: Do(w)
|
|
2864
2971
|
});
|
|
2865
2972
|
}
|
|
2866
2973
|
});
|
|
@@ -2869,25 +2976,25 @@ const Ws = (e) => {
|
|
|
2869
2976
|
throw new Error(`[CESIUM DRAW]: ${n.type} unrecognized primitive to draw.`);
|
|
2870
2977
|
}
|
|
2871
2978
|
else
|
|
2872
|
-
|
|
2979
|
+
S.stopDrawing(), u.scene.globe.depthTestAgainstTerrain = !0;
|
|
2873
2980
|
}
|
|
2874
2981
|
}, [n, m]);
|
|
2875
|
-
const E = (
|
|
2982
|
+
const E = (S) => {
|
|
2876
2983
|
try {
|
|
2877
|
-
let w =
|
|
2984
|
+
let w = S.coordinates !== void 0 ? S.coordinates : Po(S.type, S.geojson);
|
|
2878
2985
|
if (r !== !0)
|
|
2879
|
-
switch (
|
|
2986
|
+
switch (S.type) {
|
|
2880
2987
|
case ae.BOX:
|
|
2881
|
-
return /* @__PURE__ */ l(
|
|
2988
|
+
return /* @__PURE__ */ l(So, { coordinates: w, material: o ?? t });
|
|
2882
2989
|
case ae.POLYGON:
|
|
2883
|
-
return /* @__PURE__ */ l(
|
|
2990
|
+
return /* @__PURE__ */ l(bo, { hierarchy: new Ki(w), material: o ?? t });
|
|
2884
2991
|
default:
|
|
2885
2992
|
return /* @__PURE__ */ l(te, {});
|
|
2886
2993
|
}
|
|
2887
2994
|
else {
|
|
2888
|
-
switch (
|
|
2995
|
+
switch (S.type) {
|
|
2889
2996
|
case ae.BOX:
|
|
2890
|
-
w =
|
|
2997
|
+
w = xo(w);
|
|
2891
2998
|
break;
|
|
2892
2999
|
case ae.POLYGON:
|
|
2893
3000
|
w = [...w, w[0]];
|
|
@@ -2895,32 +3002,32 @@ const Ws = (e) => {
|
|
|
2895
3002
|
default:
|
|
2896
3003
|
return /* @__PURE__ */ l(te, {});
|
|
2897
3004
|
}
|
|
2898
|
-
return /* @__PURE__ */ l(
|
|
3005
|
+
return /* @__PURE__ */ l(_o, { clampToGround: !0, positions: w, width: c ?? 1, material: o ?? t });
|
|
2899
3006
|
}
|
|
2900
3007
|
} catch (w) {
|
|
2901
3008
|
return console.error(w), /* @__PURE__ */ l(te, {});
|
|
2902
3009
|
}
|
|
2903
3010
|
};
|
|
2904
|
-
return /* @__PURE__ */ l(
|
|
2905
|
-
/* @__PURE__ */ N(
|
|
3011
|
+
return /* @__PURE__ */ l(Lo, { ...e, children: e.drawings.map((S, w) => /* @__PURE__ */ N(wo, { name: S.name, children: [
|
|
3012
|
+
/* @__PURE__ */ N(To, { children: [
|
|
2906
3013
|
/* @__PURE__ */ N("h1", { children: [
|
|
2907
3014
|
"Drawed Entity ",
|
|
2908
|
-
|
|
3015
|
+
S.name
|
|
2909
3016
|
] }),
|
|
2910
3017
|
/* @__PURE__ */ l("p", { children: "This is description of drawed entity" })
|
|
2911
3018
|
] }),
|
|
2912
|
-
E(
|
|
2913
|
-
] },
|
|
2914
|
-
},
|
|
3019
|
+
E(S)
|
|
3020
|
+
] }, S.id)) });
|
|
3021
|
+
}, ka = (e) => {
|
|
2915
3022
|
const n = le();
|
|
2916
|
-
return
|
|
2917
|
-
n.extend(
|
|
3023
|
+
return D(() => {
|
|
3024
|
+
n.extend(qi);
|
|
2918
3025
|
}, [n]), /* @__PURE__ */ l(te, {});
|
|
2919
|
-
},
|
|
3026
|
+
}, Oo = -25, Ht = 2, Ra = (e) => {
|
|
2920
3027
|
const n = le(), t = (r, c = ",") => r.slice(r.indexOf(`
|
|
2921
3028
|
`) + 1).split(`
|
|
2922
|
-
`).map((
|
|
2923
|
-
const E =
|
|
3029
|
+
`).map((g) => {
|
|
3030
|
+
const E = g.split(c);
|
|
2924
3031
|
return {
|
|
2925
3032
|
cartographic: Be.fromDegrees(parseFloat(E[0]), parseFloat(E[1])),
|
|
2926
3033
|
cartesian: new Ce(parseFloat(E[0]), parseFloat(E[1]))
|
|
@@ -2931,35 +3038,35 @@ const Ws = (e) => {
|
|
|
2931
3038
|
const c = new FileReader();
|
|
2932
3039
|
c.onload = (m) => {
|
|
2933
3040
|
var w;
|
|
2934
|
-
const
|
|
3041
|
+
const g = (w = m.target) == null ? void 0 : w.result, E = t(g), S = Zt.WGS84;
|
|
2935
3042
|
console.log(`Loaded CSV content:
|
|
2936
|
-
`,
|
|
3043
|
+
`, g), Yi(
|
|
2937
3044
|
n.terrainProvider,
|
|
2938
3045
|
E.map((P) => P.cartographic)
|
|
2939
3046
|
).then(
|
|
2940
3047
|
(P) => {
|
|
2941
|
-
console.log(P), P = P.slice(0, P.length - 1), n.scene.globe.depthTestAgainstTerrain = !0, n.entities.suspendEvents(), n.entities.removeAll(), P.forEach((R,
|
|
3048
|
+
console.log(P), P = P.slice(0, P.length - 1), n.scene.globe.depthTestAgainstTerrain = !0, n.entities.suspendEvents(), n.entities.removeAll(), P.forEach((R, G) => {
|
|
2942
3049
|
n.entities.add({
|
|
2943
|
-
name: (
|
|
2944
|
-
position:
|
|
3050
|
+
name: (G + Ht).toString(),
|
|
3051
|
+
position: S.cartographicToCartesian(R),
|
|
2945
3052
|
billboard: {
|
|
2946
|
-
verticalOrigin:
|
|
3053
|
+
verticalOrigin: st.BOTTOM,
|
|
2947
3054
|
scale: 0.7,
|
|
2948
3055
|
image: "assets/img/map-marker.gif"
|
|
2949
3056
|
},
|
|
2950
3057
|
label: {
|
|
2951
|
-
text: (
|
|
3058
|
+
text: (G + Ht).toString(),
|
|
2952
3059
|
font: "14pt monospace",
|
|
2953
|
-
fillColor:
|
|
2954
|
-
style:
|
|
3060
|
+
fillColor: at.BLACK,
|
|
3061
|
+
style: Jt.FILL_AND_OUTLINE,
|
|
2955
3062
|
outlineWidth: 4,
|
|
2956
|
-
outlineColor:
|
|
2957
|
-
verticalOrigin:
|
|
2958
|
-
pixelOffset: new Ce(0,
|
|
3063
|
+
outlineColor: at.BLACK,
|
|
3064
|
+
verticalOrigin: st.BOTTOM,
|
|
3065
|
+
pixelOffset: new Ce(0, Oo)
|
|
2959
3066
|
},
|
|
2960
3067
|
description: `
|
|
2961
|
-
Long: ${E[
|
|
2962
|
-
Lat: ${E[
|
|
3068
|
+
Long: ${E[G].cartesian.x} </br>
|
|
3069
|
+
Lat: ${E[G].cartesian.y} </br>
|
|
2963
3070
|
Height(m): <span style="font-weight: 500">${R.height}</span>
|
|
2964
3071
|
`
|
|
2965
3072
|
});
|
|
@@ -2981,8 +3088,8 @@ const Ws = (e) => {
|
|
|
2981
3088
|
c.forEach((w) => {
|
|
2982
3089
|
m += u(w);
|
|
2983
3090
|
});
|
|
2984
|
-
const
|
|
2985
|
-
E.setAttribute("href",
|
|
3091
|
+
const g = new Blob([m], { type: "text/csv;charset=utf-8;" }), E = document.createElement("a"), S = URL.createObjectURL(g);
|
|
3092
|
+
E.setAttribute("href", S), E.setAttribute("download", r), E.style.visibility = "hidden", document.body.appendChild(E), E.click(), document.body.removeChild(E);
|
|
2986
3093
|
};
|
|
2987
3094
|
return /* @__PURE__ */ l(te, { children: /* @__PURE__ */ l(
|
|
2988
3095
|
"input",
|
|
@@ -2996,8 +3103,8 @@ const Ws = (e) => {
|
|
|
2996
3103
|
}
|
|
2997
3104
|
) });
|
|
2998
3105
|
};
|
|
2999
|
-
const
|
|
3000
|
-
const [n, t] =
|
|
3106
|
+
const Ao = 38, ko = 40, Ro = 13, No = 14, Bo = 27, Fo = 9, Ho = 10, Vo = 100, Go = (e) => {
|
|
3107
|
+
const [n, t] = x(e.defaultValue ?? ""), [i, o] = x(!1), [r, c] = x({
|
|
3001
3108
|
helperVisible: !1,
|
|
3002
3109
|
left: 0,
|
|
3003
3110
|
right: 0,
|
|
@@ -3010,37 +3117,37 @@ const so = 38, ao = 40, lo = 13, co = 14, uo = 27, ho = 9, mo = 10, po = 100, go
|
|
|
3010
3117
|
value: "",
|
|
3011
3118
|
caret: 0,
|
|
3012
3119
|
width: "unset"
|
|
3013
|
-
}), u =
|
|
3014
|
-
|
|
3120
|
+
}), u = Se(null);
|
|
3121
|
+
D(() => (window.addEventListener("resize", R), () => {
|
|
3015
3122
|
try {
|
|
3016
3123
|
window.removeEventListener("resize", R);
|
|
3017
|
-
} catch (
|
|
3018
|
-
console.log('WINDOW "resize" remove listener failed',
|
|
3124
|
+
} catch (y) {
|
|
3125
|
+
console.log('WINDOW "resize" remove listener failed', y);
|
|
3019
3126
|
}
|
|
3020
|
-
}), []),
|
|
3127
|
+
}), []), D(() => {
|
|
3021
3128
|
typeof e.value < "u" && t(e.value), typeof e.defaultValue < "u" && t(e.defaultValue);
|
|
3022
|
-
}, [e.value, e.defaultValue]),
|
|
3023
|
-
const { options:
|
|
3024
|
-
|
|
3129
|
+
}, [e.value, e.defaultValue]), D(() => {
|
|
3130
|
+
const { options: y } = e, { caret: h } = r;
|
|
3131
|
+
j(n, h, y);
|
|
3025
3132
|
}, [e]);
|
|
3026
|
-
const m = (
|
|
3027
|
-
const { trigger:
|
|
3028
|
-
let
|
|
3029
|
-
Array.isArray(
|
|
3133
|
+
const m = (y, h, C) => {
|
|
3134
|
+
const { trigger: f, matchAny: T, regex: _ } = e, L = new RegExp(_);
|
|
3135
|
+
let b = f;
|
|
3136
|
+
Array.isArray(b) || (b = new Array(f)), b.sort();
|
|
3030
3137
|
const M = {};
|
|
3031
|
-
Array.isArray(C) &&
|
|
3138
|
+
Array.isArray(C) && b.forEach((Y) => {
|
|
3032
3139
|
M[Y] = C;
|
|
3033
3140
|
});
|
|
3034
|
-
const
|
|
3141
|
+
const I = g(b, L);
|
|
3035
3142
|
let U = {};
|
|
3036
|
-
for (let Y = 0; Y <
|
|
3037
|
-
const { triggerStr:
|
|
3143
|
+
for (let Y = 0; Y < I.length; Y++) {
|
|
3144
|
+
const { triggerStr: k, triggerMatch: z, triggerLength: Q } = I[Y];
|
|
3038
3145
|
for (let ie = h - 1; ie >= 0; --ie) {
|
|
3039
|
-
const de =
|
|
3146
|
+
const de = y.substring(ie, h).match(L);
|
|
3040
3147
|
let se = -1;
|
|
3041
3148
|
if (Q > 0) {
|
|
3042
3149
|
const B = z ? ie : ie - Q + 1;
|
|
3043
|
-
if (B < 0 || (E(
|
|
3150
|
+
if (B < 0 || (E(k, y, B) && (se = B + Q), !de && se < 0))
|
|
3044
3151
|
break;
|
|
3045
3152
|
} else {
|
|
3046
3153
|
if (de && ie > 0)
|
|
@@ -3049,45 +3156,45 @@ const so = 38, ao = 40, lo = 13, co = 14, uo = 27, ho = 9, mo = 10, po = 100, go
|
|
|
3049
3156
|
break;
|
|
3050
3157
|
}
|
|
3051
3158
|
if (se >= 0) {
|
|
3052
|
-
const B = M[
|
|
3159
|
+
const B = M[k];
|
|
3053
3160
|
if (!Array.isArray(B))
|
|
3054
3161
|
continue;
|
|
3055
|
-
const F =
|
|
3056
|
-
const
|
|
3057
|
-
return
|
|
3058
|
-
}), we =
|
|
3162
|
+
const F = y.substring(se, h), ee = B.filter((ye) => {
|
|
3163
|
+
const Ae = ye.toLowerCase().indexOf(F.toLowerCase());
|
|
3164
|
+
return Ae !== -1 && (T || Ae === 0);
|
|
3165
|
+
}), we = k, Me = F.length;
|
|
3059
3166
|
U = {
|
|
3060
3167
|
...U,
|
|
3061
3168
|
trigger: we,
|
|
3062
3169
|
matchStart: se,
|
|
3063
|
-
matchLength:
|
|
3170
|
+
matchLength: Me,
|
|
3064
3171
|
options: ee
|
|
3065
3172
|
};
|
|
3066
3173
|
}
|
|
3067
3174
|
}
|
|
3068
3175
|
}
|
|
3069
3176
|
return U;
|
|
3070
|
-
},
|
|
3071
|
-
triggerStr:
|
|
3072
|
-
triggerMatch:
|
|
3073
|
-
triggerLength:
|
|
3074
|
-
})), E = (
|
|
3075
|
-
const { onChange: h, options: C, spaceRemovers:
|
|
3076
|
-
if (
|
|
3177
|
+
}, g = (y, h) => y.map((f) => ({
|
|
3178
|
+
triggerStr: f,
|
|
3179
|
+
triggerMatch: f.match(h),
|
|
3180
|
+
triggerLength: f.length
|
|
3181
|
+
})), E = (y, h, C) => !y || !y.length || h.substr(C, y.length) === y, S = (y) => {
|
|
3182
|
+
const { onChange: h, options: C, spaceRemovers: f, spacer: T, value: _ } = e, L = n, b = y.target.value, M = tr(w(y.target)).end;
|
|
3183
|
+
if (b.length || H({
|
|
3077
3184
|
...r,
|
|
3078
3185
|
helperVisible: !1
|
|
3079
|
-
}), t(
|
|
3186
|
+
}), t(b), H({
|
|
3080
3187
|
...r,
|
|
3081
3188
|
caret: M,
|
|
3082
|
-
value:
|
|
3083
|
-
}), !
|
|
3084
|
-
return h(
|
|
3085
|
-
if (i &&
|
|
3086
|
-
for (let
|
|
3087
|
-
if (L[
|
|
3088
|
-
if (
|
|
3089
|
-
const U = `${
|
|
3090
|
-
return q(
|
|
3189
|
+
value: y.target.value
|
|
3190
|
+
}), !b.length || !M)
|
|
3191
|
+
return h(y.target.value);
|
|
3192
|
+
if (i && f.length && b.length > 2 && T.length) {
|
|
3193
|
+
for (let I = 0; I < Math.max(L.length, b.length); ++I)
|
|
3194
|
+
if (L[I] !== b[I]) {
|
|
3195
|
+
if (I >= 2 && b[I - 1] === T && f.indexOf(b[I - 2]) === -1 && f.indexOf(b[I]) !== -1 && !lt(m(b.substring(0, I - 2), M - 3, C))) {
|
|
3196
|
+
const U = `${b.slice(0, I - 1)}${b.slice(I, I + 1)}${b.slice(I - 1, I)}${b.slice(I + 1)}`;
|
|
3197
|
+
return q(I + 1), u.current !== null && (u.current.value = U), _ || H({
|
|
3091
3198
|
...r,
|
|
3092
3199
|
value: U
|
|
3093
3200
|
}), h(U);
|
|
@@ -3096,95 +3203,95 @@ const so = 38, ao = 40, lo = 13, co = 14, uo = 27, ho = 9, mo = 10, po = 100, go
|
|
|
3096
3203
|
}
|
|
3097
3204
|
o(!1);
|
|
3098
3205
|
}
|
|
3099
|
-
return
|
|
3100
|
-
}, w = (
|
|
3101
|
-
if (
|
|
3102
|
-
if (
|
|
3103
|
-
const h =
|
|
3206
|
+
return j(b, M, C), h(y.target.value);
|
|
3207
|
+
}, w = (y) => {
|
|
3208
|
+
if (y !== void 0)
|
|
3209
|
+
if (y.children.length > 0) {
|
|
3210
|
+
const h = y.getElementsByTagName("textarea");
|
|
3104
3211
|
if (h.length > 0)
|
|
3105
3212
|
return h[0];
|
|
3106
|
-
const C =
|
|
3213
|
+
const C = y.getElementsByTagName("input");
|
|
3107
3214
|
if (C.length > 0)
|
|
3108
3215
|
return C[0];
|
|
3109
3216
|
} else
|
|
3110
|
-
return
|
|
3111
|
-
}, P = (
|
|
3112
|
-
const { helperVisible: h, options: C, selection:
|
|
3217
|
+
return y;
|
|
3218
|
+
}, P = (y) => {
|
|
3219
|
+
const { helperVisible: h, options: C, selection: f } = r, { onKeyDown: T, passThroughEnter: _ } = e;
|
|
3113
3220
|
if (h)
|
|
3114
|
-
switch (
|
|
3115
|
-
case
|
|
3116
|
-
|
|
3221
|
+
switch (y.keyCode) {
|
|
3222
|
+
case Bo:
|
|
3223
|
+
y.preventDefault(), K();
|
|
3117
3224
|
break;
|
|
3118
|
-
case
|
|
3119
|
-
|
|
3225
|
+
case Ao:
|
|
3226
|
+
y.preventDefault(), H({
|
|
3120
3227
|
...r,
|
|
3121
|
-
selection: (C.length +
|
|
3228
|
+
selection: (C.length + f - 1) % C.length
|
|
3122
3229
|
});
|
|
3123
3230
|
break;
|
|
3124
|
-
case
|
|
3125
|
-
|
|
3231
|
+
case ko:
|
|
3232
|
+
y.preventDefault(), H({
|
|
3126
3233
|
...r,
|
|
3127
|
-
selection: (
|
|
3234
|
+
selection: (f + 1) % C.length
|
|
3128
3235
|
});
|
|
3129
3236
|
break;
|
|
3130
|
-
case
|
|
3131
|
-
case
|
|
3132
|
-
|
|
3237
|
+
case No:
|
|
3238
|
+
case Ro:
|
|
3239
|
+
_ || y.preventDefault(), G(f);
|
|
3133
3240
|
break;
|
|
3134
|
-
case
|
|
3135
|
-
|
|
3241
|
+
case Fo:
|
|
3242
|
+
G(f);
|
|
3136
3243
|
break;
|
|
3137
3244
|
default:
|
|
3138
|
-
|
|
3245
|
+
T(y);
|
|
3139
3246
|
break;
|
|
3140
3247
|
}
|
|
3141
3248
|
else
|
|
3142
|
-
|
|
3249
|
+
T(y);
|
|
3143
3250
|
}, R = () => {
|
|
3144
3251
|
H({
|
|
3145
3252
|
...r,
|
|
3146
3253
|
helperVisible: !1
|
|
3147
3254
|
});
|
|
3148
|
-
},
|
|
3149
|
-
const { spacer: h, onSelect: C, changeOnSelect:
|
|
3150
|
-
|
|
3151
|
-
}, q = (
|
|
3255
|
+
}, G = (y) => {
|
|
3256
|
+
const { spacer: h, onSelect: C, changeOnSelect: f } = e, { matchStart: T, matchLength: _, options: L, trigger: b } = r, M = L[y], I = n, U = I.substring(0, T - b.length), Y = I.substring(T + _), k = { target: u.current }, z = f(b, M);
|
|
3257
|
+
k.target !== null && (k.target.value = `${U}${z}${h}${Y}`), S(k), k.target !== null && C(k.target.value), K(), q(U.length + z.length + 1), o(!0);
|
|
3258
|
+
}, q = (y) => {
|
|
3152
3259
|
H({
|
|
3153
3260
|
...r,
|
|
3154
|
-
caret:
|
|
3261
|
+
caret: y
|
|
3155
3262
|
});
|
|
3156
3263
|
const h = w(u.current);
|
|
3157
|
-
|
|
3158
|
-
}, H = (
|
|
3264
|
+
nr(h, y);
|
|
3265
|
+
}, H = (y) => {
|
|
3159
3266
|
setTimeout(() => {
|
|
3160
3267
|
c({
|
|
3161
|
-
...
|
|
3268
|
+
...y
|
|
3162
3269
|
});
|
|
3163
3270
|
}, 0);
|
|
3164
|
-
},
|
|
3165
|
-
const
|
|
3271
|
+
}, j = (y, h, C) => {
|
|
3272
|
+
const f = u.current;
|
|
3166
3273
|
if (u.current === null)
|
|
3167
3274
|
return;
|
|
3168
|
-
const
|
|
3169
|
-
if (
|
|
3275
|
+
const T = w(f);
|
|
3276
|
+
if (T === void 0)
|
|
3170
3277
|
return;
|
|
3171
|
-
const
|
|
3172
|
-
if (Object.keys(L).length > 0 &&
|
|
3173
|
-
const
|
|
3278
|
+
const _ = f.getBoundingClientRect(), L = m(y, h, C);
|
|
3279
|
+
if (Object.keys(L).length > 0 && T !== null) {
|
|
3280
|
+
const b = er(T, h), M = T.getBoundingClientRect(), { minChars: I, onRequestOptions: U, requestOnlyIfNoOptions: Y, mode: k } = e;
|
|
3174
3281
|
let z, Q, ie, fe = "unset";
|
|
3175
|
-
|
|
3282
|
+
k === "assist" ? (z = f === T ? b.top + T.offsetTop : b.top + _.top, Q = Math.min(b.left + T.offsetLeft - Ho, T.offsetLeft + M.width - Vo)) : (z = _.top + f.offsetHeight, Q = f.offsetLeft, ie = f.offsetLeft - f.offsetWidth, fe = `${_.width}px`), L.matchLength >= I && (L.options.length > 1 || L.options.length === 1 && L.options[0].length !== L.matchLength) ? H({
|
|
3176
3283
|
...r,
|
|
3177
|
-
value:
|
|
3284
|
+
value: y,
|
|
3178
3285
|
helperVisible: !0,
|
|
3179
3286
|
top: z,
|
|
3180
3287
|
left: Q,
|
|
3181
3288
|
right: ie,
|
|
3182
3289
|
width: fe,
|
|
3183
3290
|
...L
|
|
3184
|
-
}) : ((!Y || !L.options.length) && U(
|
|
3291
|
+
}) : ((!Y || !L.options.length) && U(y.substr(L.matchStart, L.matchLength)), K());
|
|
3185
3292
|
} else
|
|
3186
|
-
|
|
3187
|
-
},
|
|
3293
|
+
K();
|
|
3294
|
+
}, K = () => {
|
|
3188
3295
|
setTimeout(() => {
|
|
3189
3296
|
H({
|
|
3190
3297
|
...r,
|
|
@@ -3192,26 +3299,26 @@ const so = 38, ao = 40, lo = 13, co = 14, uo = 27, ho = 9, mo = 10, po = 100, go
|
|
|
3192
3299
|
selection: 0
|
|
3193
3300
|
});
|
|
3194
3301
|
}, 100);
|
|
3195
|
-
},
|
|
3196
|
-
const { helperVisible:
|
|
3197
|
-
if (!
|
|
3302
|
+
}, O = () => {
|
|
3303
|
+
const { helperVisible: y, left: h, right: C, matchStart: f, matchLength: T, options: _, selection: L, top: b, value: M, width: I } = r;
|
|
3304
|
+
if (!y)
|
|
3198
3305
|
return null;
|
|
3199
|
-
const { maxOptions: U, offsetX: Y, offsetY:
|
|
3200
|
-
if (
|
|
3306
|
+
const { maxOptions: U, offsetX: Y, offsetY: k, direction: z } = e;
|
|
3307
|
+
if (_.length === 0)
|
|
3201
3308
|
return null;
|
|
3202
|
-
if (L >=
|
|
3309
|
+
if (L >= _.length)
|
|
3203
3310
|
return H({
|
|
3204
3311
|
...r,
|
|
3205
3312
|
selection: 0
|
|
3206
3313
|
}), null;
|
|
3207
|
-
const Q = U === 0 ?
|
|
3208
|
-
const B = de.toLowerCase().indexOf(M.substr(
|
|
3314
|
+
const Q = U === 0 ? _.length : U, ie = _.slice(0, Q).map((de, se) => {
|
|
3315
|
+
const B = de.toLowerCase().indexOf(M.substr(f, T).toLowerCase());
|
|
3209
3316
|
return /* @__PURE__ */ N(
|
|
3210
3317
|
"li",
|
|
3211
3318
|
{
|
|
3212
3319
|
className: se === L ? "active" : void 0,
|
|
3213
3320
|
onClick: () => {
|
|
3214
|
-
|
|
3321
|
+
G(se);
|
|
3215
3322
|
},
|
|
3216
3323
|
onMouseEnter: () => {
|
|
3217
3324
|
H({
|
|
@@ -3221,31 +3328,31 @@ const so = 38, ao = 40, lo = 13, co = 14, uo = 27, ho = 9, mo = 10, po = 100, go
|
|
|
3221
3328
|
},
|
|
3222
3329
|
children: [
|
|
3223
3330
|
de.slice(0, B),
|
|
3224
|
-
/* @__PURE__ */ l("strong", { children: de.substr(B,
|
|
3225
|
-
de.slice(B +
|
|
3331
|
+
/* @__PURE__ */ l("strong", { children: de.substr(B, T) }),
|
|
3332
|
+
de.slice(B + T)
|
|
3226
3333
|
]
|
|
3227
3334
|
},
|
|
3228
3335
|
de
|
|
3229
3336
|
);
|
|
3230
3337
|
}), fe = z === "ltr" ? { left: h + Y } : { right: C + Y };
|
|
3231
|
-
return /* @__PURE__ */ l("ul", { className: "react-autocomplete-input", style: { ...fe, top:
|
|
3232
|
-
}, { Component: $, ComponentProps:
|
|
3233
|
-
return Object.keys(e).forEach((
|
|
3234
|
-
delete d[
|
|
3338
|
+
return /* @__PURE__ */ l("ul", { className: "react-autocomplete-input", style: { ...fe, top: b + k, width: I }, children: ie });
|
|
3339
|
+
}, { Component: $, ComponentProps: A, defaultValue: W, disabled: ne, onBlur: s, value: a, ...v } = e, d = Object.assign({}, v);
|
|
3340
|
+
return Object.keys(e).forEach((y) => {
|
|
3341
|
+
delete d[y];
|
|
3235
3342
|
}), /* @__PURE__ */ N(te, { children: [
|
|
3236
3343
|
Ee.cloneElement($, {
|
|
3237
3344
|
disabled: ne,
|
|
3238
3345
|
onBlur: s,
|
|
3239
|
-
onChange:
|
|
3346
|
+
onChange: S,
|
|
3240
3347
|
onKeyDown: P,
|
|
3241
3348
|
ref: u,
|
|
3242
3349
|
value: n,
|
|
3243
3350
|
...d,
|
|
3244
|
-
...
|
|
3351
|
+
...A
|
|
3245
3352
|
}),
|
|
3246
|
-
|
|
3353
|
+
O()
|
|
3247
3354
|
] });
|
|
3248
|
-
},
|
|
3355
|
+
}, zo = {
|
|
3249
3356
|
Component: /* @__PURE__ */ l("textarea", {}),
|
|
3250
3357
|
ComponentProps: {},
|
|
3251
3358
|
defaultValue: void 0,
|
|
@@ -3276,9 +3383,9 @@ const so = 38, ao = 40, lo = 13, co = 14, uo = 27, ho = 9, mo = 10, po = 100, go
|
|
|
3276
3383
|
passThroughEnter: !1,
|
|
3277
3384
|
mode: "assist",
|
|
3278
3385
|
direction: "ltr"
|
|
3279
|
-
},
|
|
3386
|
+
}, Na = (e) => {
|
|
3280
3387
|
let n = {
|
|
3281
|
-
...
|
|
3388
|
+
...zo,
|
|
3282
3389
|
...e
|
|
3283
3390
|
};
|
|
3284
3391
|
return e.mode === "autocomplete" && (n = {
|
|
@@ -3286,10 +3393,10 @@ const so = 38, ao = 40, lo = 13, co = 14, uo = 27, ho = 9, mo = 10, po = 100, go
|
|
|
3286
3393
|
trigger: "",
|
|
3287
3394
|
regex: ".",
|
|
3288
3395
|
spacer: ""
|
|
3289
|
-
}), /* @__PURE__ */ l(
|
|
3290
|
-
},
|
|
3396
|
+
}), /* @__PURE__ */ l(Go, { ...n });
|
|
3397
|
+
}, ft = {
|
|
3291
3398
|
formatFileModDate: (e, n) => {
|
|
3292
|
-
const t =
|
|
3399
|
+
const t = nn.getModDate(n);
|
|
3293
3400
|
return t ? e.formatDate(t, {
|
|
3294
3401
|
dateStyle: "short",
|
|
3295
3402
|
timeStyle: "short"
|
|
@@ -3298,18 +3405,18 @@ const so = 38, ao = 40, lo = 13, co = 14, uo = 27, ho = 9, mo = 10, po = 100, go
|
|
|
3298
3405
|
formatFileSize: (e, n) => {
|
|
3299
3406
|
if (!n || typeof n.size != "number")
|
|
3300
3407
|
return null;
|
|
3301
|
-
const t = n.size, i =
|
|
3408
|
+
const t = n.size, i = sr(t, {
|
|
3302
3409
|
bits: !1,
|
|
3303
3410
|
output: "object"
|
|
3304
3411
|
});
|
|
3305
3412
|
return i.symbol === "B" ? `${Math.round(i.value / 10) / 100} KB` : i.symbol === "KB" ? `${Math.round(i.value)} ${i.symbol}` : `${i.value} ${i.symbol.toUpperCase()}`;
|
|
3306
3413
|
}
|
|
3307
|
-
},
|
|
3414
|
+
}, $o = {
|
|
3308
3415
|
locale: ue.EN,
|
|
3309
|
-
formatters: { ...
|
|
3310
|
-
},
|
|
3416
|
+
formatters: { ...ft }
|
|
3417
|
+
}, Wo = {
|
|
3311
3418
|
locale: ue.RU,
|
|
3312
|
-
formatters: { ...
|
|
3419
|
+
formatters: { ...ft },
|
|
3313
3420
|
messages: {
|
|
3314
3421
|
"chonky.toolbar.searchPlaceholder": "Поиск",
|
|
3315
3422
|
"chonky.toolbar.visibleFileCount": `{fileCount, plural,
|
|
@@ -3332,24 +3439,24 @@ const so = 38, ao = 40, lo = 13, co = 14, uo = 27, ho = 9, mo = 10, po = 100, go
|
|
|
3332
3439
|
// Actions
|
|
3333
3440
|
["chonky.actionGroups.Actions"]: "Действия",
|
|
3334
3441
|
["chonky.actionGroups.Options"]: "Опции",
|
|
3335
|
-
[`chonky.actions.${
|
|
3336
|
-
[`chonky.actions.${
|
|
3337
|
-
[`chonky.actions.${
|
|
3338
|
-
[`chonky.actions.${
|
|
3339
|
-
[`chonky.actions.${
|
|
3340
|
-
[`chonky.actions.${
|
|
3341
|
-
[`chonky.actions.${
|
|
3342
|
-
[`chonky.actions.${
|
|
3343
|
-
[`chonky.actions.${
|
|
3344
|
-
[`chonky.actions.${
|
|
3345
|
-
[`chonky.actions.${
|
|
3346
|
-
[`chonky.actions.${
|
|
3347
|
-
[`chonky.actions.${
|
|
3348
|
-
[`chonky.actions.${
|
|
3442
|
+
[`chonky.actions.${V.OpenParentFolder.id}.button.name`]: "Открыть родительскую папку",
|
|
3443
|
+
[`chonky.actions.${V.CreateFolder.id}.button.name`]: "Новая папка",
|
|
3444
|
+
[`chonky.actions.${V.CreateFolder.id}.button.tooltip`]: "Создать новую папку",
|
|
3445
|
+
[`chonky.actions.${V.DeleteFiles.id}.button.name`]: "Удалить файлы",
|
|
3446
|
+
[`chonky.actions.${V.OpenSelection.id}.button.name`]: "Открыть выделение",
|
|
3447
|
+
[`chonky.actions.${V.SelectAllFiles.id}.button.name`]: "Выделить все",
|
|
3448
|
+
[`chonky.actions.${V.ClearSelection.id}.button.name`]: "Сбросить выделение",
|
|
3449
|
+
[`chonky.actions.${V.EnableListView.id}.button.name`]: "Показать список",
|
|
3450
|
+
[`chonky.actions.${V.EnableGridView.id}.button.name`]: "Показать иконки",
|
|
3451
|
+
[`chonky.actions.${V.SortFilesByName.id}.button.name`]: "Сорт. по имени",
|
|
3452
|
+
[`chonky.actions.${V.SortFilesBySize.id}.button.name`]: "Сорт. по размеру",
|
|
3453
|
+
[`chonky.actions.${V.SortFilesByDate.id}.button.name`]: "Сорт. по дате",
|
|
3454
|
+
[`chonky.actions.${V.ToggleHiddenFiles.id}.button.name`]: "Скрытые файлы",
|
|
3455
|
+
[`chonky.actions.${V.ToggleShowFoldersFirst.id}.button.name`]: "Папки в начале"
|
|
3349
3456
|
}
|
|
3350
|
-
},
|
|
3457
|
+
}, Uo = {
|
|
3351
3458
|
locale: ue.HE,
|
|
3352
|
-
formatters: { ...
|
|
3459
|
+
formatters: { ...ft },
|
|
3353
3460
|
messages: {
|
|
3354
3461
|
"chonky.toolbar.searchPlaceholder": "חיפוש",
|
|
3355
3462
|
"chonky.toolbar.visibleFileCount": `{fileCount, plural,
|
|
@@ -3371,46 +3478,46 @@ const so = 38, ao = 40, lo = 13, co = 14, uo = 27, ho = 9, mo = 10, po = 100, go
|
|
|
3371
3478
|
// Actions
|
|
3372
3479
|
["chonky.actionGroups.Actions"]: "פעולות",
|
|
3373
3480
|
["chonky.actionGroups.Options"]: "אפשרויות",
|
|
3374
|
-
[`chonky.actions.${
|
|
3375
|
-
[`chonky.actions.${
|
|
3376
|
-
[`chonky.actions.${
|
|
3377
|
-
[`chonky.actions.${
|
|
3378
|
-
[`chonky.actions.${
|
|
3379
|
-
[`chonky.actions.${
|
|
3380
|
-
[`chonky.actions.${
|
|
3381
|
-
[`chonky.actions.${
|
|
3382
|
-
[`chonky.actions.${
|
|
3383
|
-
[`chonky.actions.${
|
|
3384
|
-
[`chonky.actions.${
|
|
3385
|
-
[`chonky.actions.${
|
|
3386
|
-
[`chonky.actions.${
|
|
3387
|
-
[`chonky.actions.${
|
|
3481
|
+
[`chonky.actions.${V.OpenParentFolder.id}.button.name`]: "פתח סיפריית אב",
|
|
3482
|
+
[`chonky.actions.${V.CreateFolder.id}.button.name`]: "סיפרייה חדשה",
|
|
3483
|
+
[`chonky.actions.${V.CreateFolder.id}.button.tooltip`]: "צור סיפרייה חדשה",
|
|
3484
|
+
[`chonky.actions.${V.DeleteFiles.id}.button.name`]: "מחק",
|
|
3485
|
+
[`chonky.actions.${V.OpenSelection.id}.button.name`]: "פתח את הבחירה",
|
|
3486
|
+
[`chonky.actions.${V.SelectAllFiles.id}.button.name`]: "בחר הכל",
|
|
3487
|
+
[`chonky.actions.${V.ClearSelection.id}.button.name`]: "אפס את הבחירה",
|
|
3488
|
+
[`chonky.actions.${V.EnableListView.id}.button.name`]: "תצוגת רשימה",
|
|
3489
|
+
[`chonky.actions.${V.EnableGridView.id}.button.name`]: "תצוגת גריד",
|
|
3490
|
+
[`chonky.actions.${V.SortFilesByName.id}.button.name`]: "מיון לפי שם",
|
|
3491
|
+
[`chonky.actions.${V.SortFilesBySize.id}.button.name`]: "מיון לפי גודל",
|
|
3492
|
+
[`chonky.actions.${V.SortFilesByDate.id}.button.name`]: "מיון לפי תאריך",
|
|
3493
|
+
[`chonky.actions.${V.ToggleHiddenFiles.id}.button.name`]: "קבצים נסתרים",
|
|
3494
|
+
[`chonky.actions.${V.ToggleShowFoldersFirst.id}.button.name`]: "הצגת תיקיות בראש הרשימה"
|
|
3388
3495
|
}
|
|
3389
|
-
},
|
|
3390
|
-
[ue.EN]:
|
|
3391
|
-
[ue.RU]:
|
|
3392
|
-
[ue.HE]:
|
|
3496
|
+
}, jo = {
|
|
3497
|
+
[ue.EN]: $o,
|
|
3498
|
+
[ue.RU]: Wo,
|
|
3499
|
+
[ue.HE]: Uo
|
|
3393
3500
|
};
|
|
3394
|
-
class
|
|
3501
|
+
class Ba extends nn {
|
|
3395
3502
|
}
|
|
3396
|
-
const
|
|
3397
|
-
listView:
|
|
3398
|
-
gridView:
|
|
3503
|
+
const Fa = V, Ko = {
|
|
3504
|
+
listView: V.EnableListView.id,
|
|
3505
|
+
gridView: V.EnableGridView.id
|
|
3399
3506
|
};
|
|
3400
|
-
|
|
3401
|
-
const
|
|
3507
|
+
ir({ iconComponent: or });
|
|
3508
|
+
const Ha = Ee.memo(
|
|
3402
3509
|
Ee.forwardRef(
|
|
3403
3510
|
({
|
|
3404
3511
|
theme: e,
|
|
3405
3512
|
styles: n = { height: "100%", minWidth: "600px" },
|
|
3406
|
-
defaultView: t =
|
|
3513
|
+
defaultView: t = Ko.listView,
|
|
3407
3514
|
readOnlyMode: i = !1,
|
|
3408
3515
|
locale: o,
|
|
3409
3516
|
files: r,
|
|
3410
3517
|
folderChain: c,
|
|
3411
3518
|
onFileAction: u,
|
|
3412
3519
|
...m
|
|
3413
|
-
},
|
|
3520
|
+
}, g) => {
|
|
3414
3521
|
const E = me(
|
|
3415
3522
|
(W) => null,
|
|
3416
3523
|
// file.thumbnailUrl ? `https://chonky.io${file.thumbnailUrl}` : null,
|
|
@@ -3426,12 +3533,12 @@ const Xs = Ee.memo(
|
|
|
3426
3533
|
}
|
|
3427
3534
|
}
|
|
3428
3535
|
})();
|
|
3429
|
-
const
|
|
3536
|
+
const S = (W) => W.replace(/([A-Z])/g, (ne) => "-" + ne.toLowerCase()), w = Re(() => e !== void 0 ? Object.keys(e).reduce((ne, s) => {
|
|
3430
3537
|
const a = e[s];
|
|
3431
|
-
return s = s.startsWith("--") ? s : `--fp-theme-${
|
|
3432
|
-
}, {}) : {}, [e]), [P, R] =
|
|
3433
|
-
return
|
|
3434
|
-
e && R(!0), q(t), i ?
|
|
3538
|
+
return s = s.startsWith("--") ? s : `--fp-theme-${S(s)}`, ne[s] = a, ne;
|
|
3539
|
+
}, {}) : {}, [e]), [P, R] = x(!1), [G, q] = x(), [H, j] = x(!1), [K, O] = x(), [$, A] = x();
|
|
3540
|
+
return D(() => {
|
|
3541
|
+
e && R(!0), q(t), i ? j(!0) : O([V.CreateFolder, V.DeleteFiles]), o !== void 0 && A(jo[o]);
|
|
3435
3542
|
}, [e, t, i, o]), /* @__PURE__ */ l(
|
|
3436
3543
|
ce,
|
|
3437
3544
|
{
|
|
@@ -3440,18 +3547,18 @@ const Xs = Ee.memo(
|
|
|
3440
3547
|
...w
|
|
3441
3548
|
},
|
|
3442
3549
|
children: /* @__PURE__ */ l(
|
|
3443
|
-
|
|
3550
|
+
rr,
|
|
3444
3551
|
{
|
|
3445
|
-
ref:
|
|
3552
|
+
ref: g,
|
|
3446
3553
|
files: r ?? [],
|
|
3447
3554
|
folderChain: c,
|
|
3448
3555
|
onFileAction: (W) => {
|
|
3449
3556
|
typeof u == "function" && u(W);
|
|
3450
3557
|
},
|
|
3451
3558
|
thumbnailGenerator: E,
|
|
3452
|
-
defaultFileViewActionId:
|
|
3559
|
+
defaultFileViewActionId: G,
|
|
3453
3560
|
disableDragAndDrop: H,
|
|
3454
|
-
fileActions:
|
|
3561
|
+
fileActions: K,
|
|
3455
3562
|
darkMode: P,
|
|
3456
3563
|
i18n: $,
|
|
3457
3564
|
...m
|
|
@@ -3463,76 +3570,98 @@ const Xs = Ee.memo(
|
|
|
3463
3570
|
)
|
|
3464
3571
|
);
|
|
3465
3572
|
export {
|
|
3466
|
-
|
|
3467
|
-
|
|
3573
|
+
Na as Autocomplete,
|
|
3574
|
+
ct as BboxCorner,
|
|
3468
3575
|
ce as Box,
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3576
|
+
ut as COORDINATES_MERCATOR_FRACTION_DIGITS,
|
|
3577
|
+
dt as COORDINATES_WGS_FRACTION_DIGITS,
|
|
3578
|
+
La as Cesium3DTileset,
|
|
3579
|
+
pa as CesiumBoundingSphere,
|
|
3580
|
+
ha as CesiumCartesian2,
|
|
3581
|
+
ma as CesiumCartesian3,
|
|
3582
|
+
Xr as CesiumCartographic,
|
|
3583
|
+
Ca as CesiumCesiumTerrainProvider,
|
|
3584
|
+
Oa as CesiumColor,
|
|
3585
|
+
ua as CesiumConstantPositionProperty,
|
|
3586
|
+
da as CesiumConstantProperty,
|
|
3587
|
+
Lo as CesiumCustomDataSource,
|
|
3588
|
+
Aa as CesiumDrawingsDataSource,
|
|
3589
|
+
ga as CesiumEllipsoid,
|
|
3590
|
+
Ea as CesiumEllipsoidTerrainProvider,
|
|
3591
|
+
wo as CesiumEntity,
|
|
3592
|
+
xa as CesiumEntityDescription,
|
|
3593
|
+
To as CesiumEntityStaticDescription,
|
|
3594
|
+
fa as CesiumGeographicTilingScheme,
|
|
3595
|
+
_a as CesiumGeojsonLayer,
|
|
3596
|
+
Ye as CesiumImageryLayer,
|
|
3597
|
+
Ta as CesiumLabelStyle,
|
|
3598
|
+
Sa as CesiumMap,
|
|
3599
|
+
Wa as CesiumMath,
|
|
3600
|
+
Da as CesiumOSMLayer,
|
|
3601
|
+
bo as CesiumPolygonGraphics,
|
|
3602
|
+
ca as CesiumPolylineDashMaterialProperty,
|
|
3603
|
+
ya as CesiumRectangle,
|
|
3604
|
+
So as CesiumRectangleGraphics,
|
|
3605
|
+
va as CesiumResource,
|
|
3499
3606
|
oe as CesiumSceneMode,
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3607
|
+
wa as CesiumVerticalOrigin,
|
|
3608
|
+
ba as CesiumViewer,
|
|
3609
|
+
Ma as CesiumWMSLayer,
|
|
3610
|
+
Pa as CesiumWMTSLayer,
|
|
3611
|
+
Ia as CesiumXYZLayer,
|
|
3612
|
+
Zr as CoordinatesTrackerTool,
|
|
3613
|
+
aa as CssBaseline,
|
|
3614
|
+
Ks as DateRangePicker,
|
|
3615
|
+
qs as DateTimePicker,
|
|
3616
|
+
ur as DateTimeRangePicker,
|
|
3617
|
+
Us as DateTimeRangePickerFormControl,
|
|
3618
|
+
Te as DrawHelper,
|
|
3619
|
+
Ar as DrawInteraction,
|
|
3512
3620
|
ae as DrawType,
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3621
|
+
Ba as FileHelper,
|
|
3622
|
+
Ha as FilePicker,
|
|
3623
|
+
Fa as FilePickerActions,
|
|
3624
|
+
Ko as FilePickerViewObj,
|
|
3625
|
+
xr as GeoJSONFeature,
|
|
3626
|
+
ka as InspectorTool,
|
|
3627
|
+
oa as MVTSource,
|
|
3628
|
+
Tr as Map,
|
|
3629
|
+
Ys as MapFilterContainer,
|
|
3630
|
+
hr as Popover,
|
|
3520
3631
|
pe as Proj,
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3632
|
+
Qr as ScaleTrackerTool,
|
|
3633
|
+
la as ScopedCssBaseline,
|
|
3634
|
+
sa as SmartTable,
|
|
3524
3635
|
ue as SupportedLocales,
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
|
|
3636
|
+
Ra as TerrainianHeightTool,
|
|
3637
|
+
Sr as TileLayer,
|
|
3638
|
+
Or as TileOsm,
|
|
3639
|
+
ea as TileWMS,
|
|
3640
|
+
Js as TileWMTS,
|
|
3641
|
+
na as TileXYZ,
|
|
3642
|
+
js as TimeRangeInput,
|
|
3643
|
+
Mr as VectorLayer,
|
|
3644
|
+
Dr as VectorSource,
|
|
3645
|
+
Xs as VectorTileLayer,
|
|
3646
|
+
to as ZoomLevelTrackerTool,
|
|
3647
|
+
Ua as cesiumSampleTerrainMostDetailed,
|
|
3648
|
+
ft as defaultFormatters,
|
|
3649
|
+
ra as getMVTOptions,
|
|
3650
|
+
Qs as getWMSOptions,
|
|
3651
|
+
Zs as getWMTSOptions,
|
|
3652
|
+
ta as getXYZOptions,
|
|
3653
|
+
Je as isDateRange,
|
|
3654
|
+
ar as mapMcToMuiTheme,
|
|
3655
|
+
Io as polygonToGeoJSON,
|
|
3656
|
+
Do as rectangleToGeoJSON,
|
|
3657
|
+
xo as rectangleToPositions,
|
|
3535
3658
|
le as useCesiumMap,
|
|
3536
|
-
|
|
3537
|
-
|
|
3659
|
+
Fe as useMap,
|
|
3660
|
+
rn as useMappedMuiTheme,
|
|
3661
|
+
za as useMediaQuery,
|
|
3662
|
+
Ke as useTileLayer,
|
|
3663
|
+
_r as useVectorLayer,
|
|
3664
|
+
Ir as useVectorSource,
|
|
3665
|
+
Fr as useVectorTileLayer,
|
|
3666
|
+
ia as useVectorTileSource
|
|
3538
3667
|
};
|