@map-colonies/react-components 4.0.2 → 4.1.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 +1448 -1891
- package/dist/@map-colonies/react-components.umd.js +3 -3
- package/dist/assets/img/dragIcon.png +0 -0
- package/dist/assets/img/dragIconLight.png +0 -0
- package/dist/assets/img/glyphicons_067_cleaning.png +0 -0
- package/dist/assets/img/glyphicons_094_vector_path_square.png +0 -0
- package/dist/assets/img/glyphicons_095_vector_path_circle.png +0 -0
- package/dist/assets/img/glyphicons_096_vector_path_polygon.png +0 -0
- package/dist/assets/img/glyphicons_097_vector_path_line.png +0 -0
- package/dist/assets/img/glyphicons_242_google_maps.png +0 -0
- package/dist/assets/img/map-marker.gif +0 -0
- package/dist/assets/img/transparent-tile.png +0 -0
- package/dist/cesium-map/layers-manager.d.ts +4 -1
- package/dist/cesium-map/map.d.ts +3 -1
- package/dist/cesium-map/proxied.types.d.ts +1 -1
- package/dist/cssbaseline/index.d.ts +1 -1
- package/dist/file-picker/file-picker.d.ts +2 -2
- package/dist/smart-table/icons/KeyboardArrowDown.d.ts +1 -0
- package/dist/smart-table/icons/KeyboardArrowDown.js +8 -0
- package/dist/smart-table/icons/KeyboardArrowUp.d.ts +1 -0
- package/dist/smart-table/icons/KeyboardArrowUp.js +8 -0
- package/dist/smart-table/icons/utils/createSvgIcon.d.ts +1 -0
- package/dist/smart-table/icons/utils/createSvgIcon.js +1 -0
- package/package.json +8 -9
- package/dist/fonts/material-icons/MaterialIcons-Regular.eot +0 -0
- package/dist/fonts/material-icons/MaterialIcons-Regular.ijmap +0 -1
- package/dist/fonts/material-icons/MaterialIcons-Regular.svg +0 -2373
- package/dist/fonts/material-icons/MaterialIcons-Regular.ttf +0 -0
- package/dist/fonts/material-icons/MaterialIcons-Regular.woff +0 -0
- package/dist/fonts/material-icons/MaterialIcons-Regular.woff2 +0 -0
- package/dist/fonts/material-icons/README.md +0 -9
- package/dist/fonts/material-icons/codepoints +0 -932
- package/dist/fonts/material-icons/material-icons.css +0 -36
|
@@ -1,49 +1,50 @@
|
|
|
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}.distance-legend-label{text-align:center}.distance-legend-scale-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}.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
|
|
5
|
-
import { jsx as l, jsxs as
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import
|
|
16
|
-
import
|
|
2
|
+
var Xt = Object.defineProperty;
|
|
3
|
+
var Zt = (e, n, t) => n in e ? Xt(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
|
|
4
|
+
var X = (e, n, t) => (Zt(e, typeof n != "symbol" ? n + "" : n, t), t);
|
|
5
|
+
import { jsx as l, jsxs as R, Fragment as re } from "react/jsx-runtime";
|
|
6
|
+
import * as bt from "react";
|
|
7
|
+
import Ee, { useState as k, useEffect as I, useMemo as Tt, createContext as Le, useRef as ve, useContext as Pe, useCallback as me, useLayoutEffect as Jt } from "react";
|
|
8
|
+
import { isValid as Ce, isBefore as Qt, format as ot } from "date-fns";
|
|
9
|
+
import { he as _t, enUS as St } from "date-fns/locale";
|
|
10
|
+
import { MuiPickersUtilsProvider as Lt, KeyboardDateTimePicker as We, KeyboardDatePicker as en } from "@material-ui/pickers";
|
|
11
|
+
import Pt from "@date-io/date-fns";
|
|
12
|
+
import { createTheme as tn, makeStyles as Me, createStyles as Be } from "@material-ui/core/styles";
|
|
13
|
+
import { Box as nn, ThemeProvider as Mt, Popover as rn, Paper as je, TableRow as Ie, TableCell as be, TableSortLabel as on, IconButton as sn, Collapse as an, TableContainer as ln, Table as cn, TableBody as dn, Typography as un, TablePagination as hn } from "@material-ui/core";
|
|
14
|
+
import { useTheme as At, ThemeProvider as pn, Button as Oe, TextField as mn, Tooltip as Ke, Menu as gn, MenuItem as He, Icon as Te, Dialog as fn, DialogTitle as yn, DialogContent as vn, Drawer as En, DrawerHeader as Cn, DrawerTitle as wn, DrawerContent as bn } from "@map-colonies/react-core";
|
|
15
|
+
import { default as _s } from "@material-ui/core/useMediaQuery";
|
|
16
|
+
import Tn from "@turf/rewind";
|
|
17
|
+
import { Map as _n, View as Sn } from "ol";
|
|
17
18
|
import "ol/ol.css";
|
|
18
|
-
import { format as
|
|
19
|
-
import { defaults as
|
|
20
|
-
import
|
|
21
|
-
import { transform as
|
|
22
|
-
import { Tile as
|
|
23
|
-
import { Vector as
|
|
24
|
-
import { GeoJSON as
|
|
25
|
-
import { Draw as
|
|
26
|
-
import { createBox as
|
|
27
|
-
import
|
|
28
|
-
import {
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import { createPortal as
|
|
32
|
-
import { Viewer as
|
|
19
|
+
import { format as st } from "ol/coordinate";
|
|
20
|
+
import { defaults as Ln, FullScreen as at } from "ol/control";
|
|
21
|
+
import Ve from "ol/control/MousePosition";
|
|
22
|
+
import { transform as Pn } from "ol/proj";
|
|
23
|
+
import { Tile as Mn, Vector as An } from "ol/layer";
|
|
24
|
+
import { Vector as xn, OSM as kn } from "ol/source";
|
|
25
|
+
import { GeoJSON as xt } from "ol/format";
|
|
26
|
+
import { Draw as In } from "ol/interaction";
|
|
27
|
+
import { createBox as On } from "ol/interaction/Draw";
|
|
28
|
+
import Dn from "@material-ui/core/TableHead";
|
|
29
|
+
import { createSvgIcon as kt } from "@material-ui/core/utils";
|
|
30
|
+
import Rn from "@material-ui/core/CssBaseline";
|
|
31
|
+
import Bn from "@material-ui/core/ScopedCssBaseline";
|
|
32
|
+
import { createPortal as Nn } from "react-dom";
|
|
33
|
+
import { Viewer as Fn, Cesium3DTileset as Gn, GeoJsonDataSource as Hn, ImageryLayer as Vn, Entity as zn, EntityDescription as It, PolygonGraphics as $n, RectangleGraphics as Un, CustomDataSource as Wn, PolylineGraphics as jn } from "resium";
|
|
33
34
|
import * as p from "cesium";
|
|
34
|
-
import { ScreenSpaceEventType as
|
|
35
|
-
import { Math as
|
|
36
|
-
import { get as Q, isNumber as
|
|
37
|
-
import
|
|
38
|
-
import * as
|
|
39
|
-
import
|
|
40
|
-
import
|
|
41
|
-
import
|
|
42
|
-
import
|
|
43
|
-
import { ChonkyActions as N, FileHelper as
|
|
44
|
-
import { ChonkyIconFA as
|
|
45
|
-
import
|
|
46
|
-
var
|
|
35
|
+
import { ScreenSpaceEventType as Kn, Cartesian3 as ge, Math as le, WebMercatorProjection as qn, EventHelper as Yn, EllipsoidGeodesic as Xn, Cartesian2 as _e, SceneMode as ye, Cartographic as Ne, UrlTemplateImageryProvider as Je, WebMapServiceImageryProvider as Qe, WebMapTileServiceImageryProvider as et, Event as Zn, SingleTileImageryProvider as Jn, Rectangle as we, Viewer as Qn, Matrix4 as ei, OpenStreetMapImageryProvider as ti, Color as ni, PolygonHierarchy as ii, PolylineDashMaterialProperty as ri, ConstantProperty as oi, ConstantPositionProperty as si, BoundingSphere as ai, Ellipsoid as li, GeographicTilingScheme as ci, Resource as di, EllipsoidTerrainProvider as ui, CesiumTerrainProvider as hi, VerticalOrigin as pi, LabelStyle as mi } from "cesium";
|
|
36
|
+
import { Math as Ls, sampleTerrainMostDetailed as Ps } from "cesium";
|
|
37
|
+
import { get as Q, isNumber as De, isEmpty as qe, isArray as gi, find as lt } from "lodash";
|
|
38
|
+
import fi from "@turf/boolean-point-in-polygon";
|
|
39
|
+
import * as Ot from "@turf/helpers";
|
|
40
|
+
import Dt from "@turf/bbox";
|
|
41
|
+
import Rt from "@turf/bbox-polygon";
|
|
42
|
+
import yi from "textarea-caret";
|
|
43
|
+
import vi, { setCaretPosition as Ei } from "get-input-selection";
|
|
44
|
+
import { ChonkyActions as N, FileHelper as Bt, setChonkyDefaults as Ci, FullFileBrowser as wi } from "chonky";
|
|
45
|
+
import { ChonkyIconFA as bi } from "chonky-icon-fontawesome";
|
|
46
|
+
import Ti from "filesize";
|
|
47
|
+
var ie = /* @__PURE__ */ ((e) => (e.BOX = "BOX", e.POLYGON = "POLYGON", e.UNKNOWN = "UNKNOWN", e))(ie || {}), ce = /* @__PURE__ */ ((e) => (e.HE = "he", e.EN = "en", e.RU = "ru", e))(ce || {}), Ye = /* @__PURE__ */ ((e) => (e.TOP_RIGHT = "TOP_RIGHT", e.BOTTOM_LEFT = "BOTTOM_LEFT", e))(Ye || {});
|
|
47
48
|
const Z = {
|
|
48
49
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
49
50
|
DATE_PICKER: {
|
|
@@ -72,17 +73,14 @@ const Z = {
|
|
|
72
73
|
disableFuture: !0
|
|
73
74
|
}
|
|
74
75
|
}, ae = (e) => {
|
|
75
|
-
const { children:
|
|
76
|
-
return /* @__PURE__ */ l(
|
|
77
|
-
},
|
|
78
|
-
const
|
|
79
|
-
return
|
|
80
|
-
|
|
81
|
-
e
|
|
82
|
-
]);
|
|
83
|
-
}, En = (e, i = !1) => Yt({
|
|
76
|
+
const { children: n, ...t } = e;
|
|
77
|
+
return /* @__PURE__ */ l(nn, { ...t, children: n });
|
|
78
|
+
}, Nt = (e) => {
|
|
79
|
+
const n = e.type === "dark";
|
|
80
|
+
return Ee.useMemo(() => _i(e, n), [n, e]);
|
|
81
|
+
}, _i = (e, n = !1) => tn({
|
|
84
82
|
palette: {
|
|
85
|
-
type:
|
|
83
|
+
type: n ? "dark" : "light",
|
|
86
84
|
primary: {
|
|
87
85
|
main: e.primary
|
|
88
86
|
},
|
|
@@ -97,111 +95,103 @@ const Z = {
|
|
|
97
95
|
paper: e.background
|
|
98
96
|
},
|
|
99
97
|
text: {
|
|
100
|
-
primary:
|
|
101
|
-
secondary:
|
|
98
|
+
primary: n ? e.textPrimaryOnDark : e.textPrimaryOnLight,
|
|
99
|
+
secondary: n ? e.textSecondaryOnDark : e.textSecondaryOnLight
|
|
102
100
|
}
|
|
103
101
|
}
|
|
104
102
|
});
|
|
105
|
-
const
|
|
106
|
-
(e) =>
|
|
103
|
+
const Si = 2, Li = 0.5, Pi = Me(
|
|
104
|
+
(e) => Be({
|
|
107
105
|
container: {
|
|
108
|
-
padding: e.spacing(
|
|
106
|
+
padding: e.spacing(Si),
|
|
109
107
|
alignItems: "center"
|
|
110
108
|
},
|
|
111
109
|
setButton: {
|
|
112
110
|
marginTop: e.spacing(1)
|
|
113
111
|
},
|
|
114
112
|
margin: {
|
|
115
|
-
marginLeft: e.spacing(
|
|
113
|
+
marginLeft: e.spacing(Li)
|
|
116
114
|
}
|
|
117
115
|
})
|
|
118
|
-
),
|
|
119
|
-
var
|
|
120
|
-
const
|
|
121
|
-
Z.DATE_RANGE_PICKER.dateFormat
|
|
122
|
-
), S = e.controlsLayout ?? Z.DATE_RANGE_PICKER.controlsLayout, A = e.disableFuture ?? Z.DATE_RANGE_PICKER.disableFuture, L = ((U = e.local) == null ? void 0 : U.startPlaceHolderText) ?? Z.DATE_RANGE_PICKER.local.startPlaceHolderText, R = ((V = e.local) == null ? void 0 : V.endPlaceHolderText) ?? Z.DATE_RANGE_PICKER.local.endPlaceHolderText, z = ((j = e.local) == null ? void 0 : j.setText) ?? Z.DATE_RANGE_PICKER.local.setText, Y = (((O = e.local) == null ? void 0 : O.calendarLocale) ?? Z.DATE_RANGE_PICKER.local.calendarLocale) === ce.HE ? yt : vt;
|
|
116
|
+
), Mi = (e) => {
|
|
117
|
+
var z, V, W, D;
|
|
118
|
+
const n = Pi(), t = At(), i = Nt(t), [a, r] = k(null), [d, h] = k(null), [v, C] = k(Z.DATE_RANGE_PICKER.dateFormat), S = e.controlsLayout ?? Z.DATE_RANGE_PICKER.controlsLayout, x = e.disableFuture ?? Z.DATE_RANGE_PICKER.disableFuture, L = ((z = e.local) == null ? void 0 : z.startPlaceHolderText) ?? Z.DATE_RANGE_PICKER.local.startPlaceHolderText, B = ((V = e.local) == null ? void 0 : V.endPlaceHolderText) ?? Z.DATE_RANGE_PICKER.local.endPlaceHolderText, U = ((W = e.local) == null ? void 0 : W.setText) ?? Z.DATE_RANGE_PICKER.local.setText, J = (((D = e.local) == null ? void 0 : D.calendarLocale) ?? Z.DATE_RANGE_PICKER.local.calendarLocale) === ce.HE ? _t : St;
|
|
123
119
|
I(() => {
|
|
124
|
-
|
|
120
|
+
r(e.from ?? null);
|
|
125
121
|
}, [e.from]), I(() => {
|
|
126
|
-
|
|
122
|
+
h(e.to ?? null);
|
|
127
123
|
}, [e.to]), I(() => {
|
|
128
124
|
C(e.dateFormat ?? Z.DATE_RANGE_PICKER.dateFormat);
|
|
129
125
|
}, [e.dateFormat]);
|
|
130
|
-
const
|
|
131
|
-
|
|
132
|
-
),
|
|
126
|
+
const G = Boolean(
|
|
127
|
+
Ce(a) && !d || Ce(d) && !a || a && d && Ce(a) && Ce(d) && Qt(a, d)
|
|
128
|
+
), Y = () => {
|
|
133
129
|
e.onChange({
|
|
134
|
-
from: a &&
|
|
135
|
-
to: d &&
|
|
130
|
+
from: a && Ce(a) ? a : void 0,
|
|
131
|
+
to: d && Ce(d) ? d : void 0
|
|
136
132
|
});
|
|
137
133
|
};
|
|
138
|
-
return /* @__PURE__ */ l(
|
|
134
|
+
return /* @__PURE__ */ l(Mt, { theme: i, children: /* @__PURE__ */ l(
|
|
139
135
|
ae,
|
|
140
136
|
{
|
|
141
|
-
className: `${
|
|
137
|
+
className: `${n.container} drpContainer`,
|
|
142
138
|
display: "flex",
|
|
143
139
|
flexDirection: S,
|
|
144
140
|
width: S === "column" ? e.contentWidth : "unset",
|
|
145
|
-
children: /* @__PURE__ */
|
|
141
|
+
children: /* @__PURE__ */ R(Lt, { utils: Pt, locale: J, children: [
|
|
146
142
|
/* @__PURE__ */ l(
|
|
147
|
-
|
|
143
|
+
We,
|
|
148
144
|
{
|
|
149
145
|
variant: "inline",
|
|
150
146
|
placeholder: L,
|
|
151
|
-
onChange: ($) =>
|
|
147
|
+
onChange: ($) => r($),
|
|
152
148
|
value: a,
|
|
153
|
-
disableFuture:
|
|
149
|
+
disableFuture: x,
|
|
154
150
|
format: v,
|
|
155
151
|
maxDate: e.maxDate,
|
|
156
152
|
minDate: e.minDate
|
|
157
153
|
}
|
|
158
154
|
),
|
|
159
155
|
/* @__PURE__ */ l(
|
|
160
|
-
|
|
156
|
+
We,
|
|
161
157
|
{
|
|
162
158
|
variant: "inline",
|
|
163
|
-
placeholder:
|
|
164
|
-
className:
|
|
165
|
-
onChange: ($) =>
|
|
159
|
+
placeholder: B,
|
|
160
|
+
className: n.margin,
|
|
161
|
+
onChange: ($) => h($),
|
|
166
162
|
value: d,
|
|
167
|
-
disableFuture:
|
|
163
|
+
disableFuture: x,
|
|
168
164
|
format: v,
|
|
169
165
|
maxDate: e.maxDate,
|
|
170
166
|
minDate: e.minDate
|
|
171
167
|
}
|
|
172
168
|
),
|
|
173
|
-
/* @__PURE__ */ l(
|
|
174
|
-
|
|
169
|
+
/* @__PURE__ */ l(pn, { use: t, children: /* @__PURE__ */ l(
|
|
170
|
+
Oe,
|
|
175
171
|
{
|
|
176
|
-
className: `${
|
|
172
|
+
className: `${n.setButton} ${n.margin}`,
|
|
177
173
|
raised: !0,
|
|
178
|
-
onClick:
|
|
179
|
-
disabled: !
|
|
180
|
-
children:
|
|
174
|
+
onClick: Y,
|
|
175
|
+
disabled: !G,
|
|
176
|
+
children: U
|
|
181
177
|
}
|
|
182
178
|
) })
|
|
183
179
|
] })
|
|
184
180
|
}
|
|
185
181
|
) });
|
|
186
|
-
},
|
|
187
|
-
const { children:
|
|
188
|
-
return /* @__PURE__ */ l(
|
|
182
|
+
}, Ai = (e) => {
|
|
183
|
+
const { children: n, ...t } = e;
|
|
184
|
+
return /* @__PURE__ */ l(rn, { ...t, children: n });
|
|
189
185
|
};
|
|
190
|
-
const
|
|
191
|
-
var V,
|
|
192
|
-
const [
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
v(O.currentTarget);
|
|
198
|
-
}, S = (O) => {
|
|
199
|
-
O.currentTarget.tagName === "I" ? v(
|
|
200
|
-
O.currentTarget.previousElementSibling
|
|
201
|
-
) : v(O.currentTarget);
|
|
202
|
-
}, A = () => {
|
|
186
|
+
const Ho = (e) => {
|
|
187
|
+
var V, W;
|
|
188
|
+
const [n, t] = k(null), [i, a] = k(null), [r, d] = k(Z.DATE_RANGE_PICKER.dateFormat), [h, v] = Ee.useState(null), C = (D) => {
|
|
189
|
+
v(D.currentTarget);
|
|
190
|
+
}, S = (D) => {
|
|
191
|
+
D.currentTarget.tagName === "I" ? v(D.currentTarget.previousElementSibling) : v(D.currentTarget);
|
|
192
|
+
}, x = () => {
|
|
203
193
|
v(null);
|
|
204
|
-
}, L = Boolean(
|
|
194
|
+
}, L = Boolean(h), B = e.controlsLayout ?? "column";
|
|
205
195
|
I(() => {
|
|
206
196
|
t(e.from ?? null);
|
|
207
197
|
}, [e.from]), I(() => {
|
|
@@ -209,24 +199,15 @@ const Oo = (e) => {
|
|
|
209
199
|
}, [e.to]), I(() => {
|
|
210
200
|
d(e.dateFormat ?? Z.DATE_RANGE_PICKER.dateFormat);
|
|
211
201
|
}, [e.dateFormat]);
|
|
212
|
-
const
|
|
213
|
-
return /* @__PURE__ */
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
{
|
|
217
|
-
style: { width: e.width },
|
|
218
|
-
raised: !0,
|
|
219
|
-
onClick: C,
|
|
220
|
-
className: "drpOpener",
|
|
221
|
-
children: U
|
|
222
|
-
}
|
|
223
|
-
) : /* @__PURE__ */ l(
|
|
224
|
-
ai,
|
|
202
|
+
const U = ((V = e.local) == null ? void 0 : V.startPlaceHolderText) ?? Z.DATE_RANGE_PICKER.local.startPlaceHolderText, K = ((W = e.local) == null ? void 0 : W.endPlaceHolderText) ?? Z.DATE_RANGE_PICKER.local.endPlaceHolderText, J = e.renderAsButton === void 0 ? Z.DATE_RANGE_PICKER.renderAsButton : e.renderAsButton, G = e.offset === void 0 ? Z.DATE_RANGE_PICKER.offset : e.offset, Y = e.disableFuture === void 0 ? Z.DATE_RANGE_PICKER.disableFuture : e.disableFuture, z = Tt(() => `${n ? ot(n, r) : U} - ${i ? ot(i, r) : K}`, [n, i, r, U, K]);
|
|
203
|
+
return /* @__PURE__ */ R(re, { children: [
|
|
204
|
+
J ? /* @__PURE__ */ l(Oe, { style: { width: e.width }, raised: !0, onClick: C, className: "drpOpener", children: z }) : /* @__PURE__ */ l(
|
|
205
|
+
mn,
|
|
225
206
|
{
|
|
226
207
|
className: "drpOpener",
|
|
227
208
|
readOnly: !0,
|
|
228
209
|
style: { width: e.width },
|
|
229
|
-
value:
|
|
210
|
+
value: z,
|
|
230
211
|
onClick: S,
|
|
231
212
|
trailingIcon: {
|
|
232
213
|
icon: "date_range",
|
|
@@ -235,117 +216,89 @@ const Oo = (e) => {
|
|
|
235
216
|
}
|
|
236
217
|
}
|
|
237
218
|
),
|
|
238
|
-
/* @__PURE__ */ l(
|
|
239
|
-
|
|
219
|
+
/* @__PURE__ */ l(Ai, { open: L, anchorEl: h, onClose: x, anchorOrigin: { vertical: "bottom", horizontal: "left" }, keepMounted: !0, children: /* @__PURE__ */ l(
|
|
220
|
+
Mi,
|
|
240
221
|
{
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
minDate: e.minDate,
|
|
254
|
-
maxDate: e.maxDate,
|
|
255
|
-
local: e.local,
|
|
256
|
-
from: i ?? void 0,
|
|
257
|
-
to: n ?? void 0,
|
|
258
|
-
onChange: ({ from: O, to: $ }) => {
|
|
259
|
-
t(O ?? null), a($ ?? null), e.onChange({ from: O, to: $ }), A();
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
)
|
|
222
|
+
controlsLayout: B,
|
|
223
|
+
contentWidth: ((h == null ? void 0 : h.clientWidth) ?? 0) - G,
|
|
224
|
+
dateFormat: r,
|
|
225
|
+
disableFuture: Y,
|
|
226
|
+
minDate: e.minDate,
|
|
227
|
+
maxDate: e.maxDate,
|
|
228
|
+
local: e.local,
|
|
229
|
+
from: n ?? void 0,
|
|
230
|
+
to: i ?? void 0,
|
|
231
|
+
onChange: ({ from: D, to: $ }) => {
|
|
232
|
+
t(D ?? null), a($ ?? null), e.onChange({ from: D, to: $ }), x();
|
|
233
|
+
}
|
|
263
234
|
}
|
|
264
|
-
)
|
|
235
|
+
) })
|
|
265
236
|
] });
|
|
266
237
|
};
|
|
267
|
-
const
|
|
268
|
-
const
|
|
269
|
-
format:
|
|
238
|
+
const Vo = (e) => {
|
|
239
|
+
const n = At(), t = Nt(n), [i, a] = k(e.value), {
|
|
240
|
+
format: r = Z.DATE_PICKER.dateFormat,
|
|
270
241
|
variant: d = Z.DATE_PICKER.variant,
|
|
271
|
-
disableFuture:
|
|
242
|
+
disableFuture: h = Z.DATE_PICKER.disableFuture,
|
|
272
243
|
local: v,
|
|
273
244
|
onChange: C,
|
|
274
245
|
showTime: S = Z.DATE_PICKER.showTime,
|
|
275
|
-
value:
|
|
246
|
+
value: x,
|
|
276
247
|
...L
|
|
277
|
-
} = e, {
|
|
278
|
-
placeHolderText: R = Z.DATE_PICKER.local.placeHolderText,
|
|
279
|
-
calendarLocale: z
|
|
280
|
-
} = v ?? {
|
|
248
|
+
} = e, { placeHolderText: B = Z.DATE_PICKER.local.placeHolderText, calendarLocale: U } = v ?? {
|
|
281
249
|
placeHolderText: Z.DATE_PICKER.local.placeHolderText,
|
|
282
250
|
calendarLocale: ce.EN
|
|
283
|
-
}, K =
|
|
284
|
-
a(
|
|
251
|
+
}, K = U === ce.HE ? _t : St, J = (G) => {
|
|
252
|
+
a(G), C(G);
|
|
285
253
|
};
|
|
286
|
-
return /* @__PURE__ */ l(
|
|
254
|
+
return /* @__PURE__ */ l(Mt, { theme: t, children: /* @__PURE__ */ R(Lt, { utils: Pt, locale: K, children: [
|
|
287
255
|
S && /* @__PURE__ */ l(
|
|
288
|
-
|
|
256
|
+
We,
|
|
289
257
|
{
|
|
290
258
|
variant: d,
|
|
291
|
-
placeholder:
|
|
292
|
-
onChange:
|
|
293
|
-
value:
|
|
294
|
-
disableFuture:
|
|
295
|
-
format:
|
|
259
|
+
placeholder: B,
|
|
260
|
+
onChange: J,
|
|
261
|
+
value: i,
|
|
262
|
+
disableFuture: h,
|
|
263
|
+
format: r,
|
|
296
264
|
...L
|
|
297
265
|
}
|
|
298
266
|
),
|
|
299
267
|
!S && /* @__PURE__ */ l(
|
|
300
|
-
|
|
268
|
+
en,
|
|
301
269
|
{
|
|
302
270
|
variant: d,
|
|
303
|
-
placeholder:
|
|
304
|
-
onChange:
|
|
305
|
-
value:
|
|
306
|
-
disableFuture:
|
|
307
|
-
format:
|
|
271
|
+
placeholder: B,
|
|
272
|
+
onChange: J,
|
|
273
|
+
value: i,
|
|
274
|
+
disableFuture: h,
|
|
275
|
+
format: r,
|
|
308
276
|
...L
|
|
309
277
|
}
|
|
310
278
|
)
|
|
311
279
|
] }) });
|
|
312
|
-
},
|
|
313
|
-
(e) =>
|
|
280
|
+
}, xi = 18, ki = Me(
|
|
281
|
+
(e) => Be({
|
|
314
282
|
drawingButton: {
|
|
315
|
-
width: e.spacing(
|
|
283
|
+
width: e.spacing(xi)
|
|
316
284
|
},
|
|
317
285
|
fullWidth: {
|
|
318
286
|
width: "100%",
|
|
319
287
|
marginTop: "36px"
|
|
320
288
|
}
|
|
321
289
|
})
|
|
322
|
-
),
|
|
323
|
-
const
|
|
324
|
-
|
|
290
|
+
), Ii = (e) => {
|
|
291
|
+
const n = ki(), [t, i] = Ee.useState(null), { isSelectionEnabled: a, onCancelDraw: r, onStartDraw: d, onReset: h } = e, v = (S) => {
|
|
292
|
+
i(S.currentTarget);
|
|
325
293
|
}, C = () => {
|
|
326
|
-
|
|
294
|
+
i(null);
|
|
327
295
|
};
|
|
328
|
-
return a ? /* @__PURE__ */ l(
|
|
329
|
-
/* @__PURE__ */ l(
|
|
330
|
-
|
|
296
|
+
return a ? /* @__PURE__ */ l(Ke, { content: "Cancel the ongoing draw", align: "bottomLeft", children: /* @__PURE__ */ l(Oe, { className: n.drawingButton, raised: !0, onClick: r, children: "Cancel Draw" }) }) : /* @__PURE__ */ R(ae, { position: "relative", children: [
|
|
297
|
+
/* @__PURE__ */ l(Ke, { content: "draw an Area of interest to limit the search", align: "bottomLeft", children: /* @__PURE__ */ l(Oe, { className: n.drawingButton, raised: !0, onClick: v, children: "Draw AOI" }) }),
|
|
298
|
+
/* @__PURE__ */ R(
|
|
299
|
+
gn,
|
|
331
300
|
{
|
|
332
|
-
|
|
333
|
-
align: "bottomLeft",
|
|
334
|
-
children: /* @__PURE__ */ l(
|
|
335
|
-
Ie,
|
|
336
|
-
{
|
|
337
|
-
className: i.drawingButton,
|
|
338
|
-
raised: !0,
|
|
339
|
-
onClick: v,
|
|
340
|
-
children: "Draw AOI"
|
|
341
|
-
}
|
|
342
|
-
)
|
|
343
|
-
}
|
|
344
|
-
),
|
|
345
|
-
/* @__PURE__ */ D(
|
|
346
|
-
li,
|
|
347
|
-
{
|
|
348
|
-
className: i.fullWidth,
|
|
301
|
+
className: n.fullWidth,
|
|
349
302
|
open: Boolean(t),
|
|
350
303
|
onClose: C,
|
|
351
304
|
children: [
|
|
@@ -353,7 +306,7 @@ const Do = (e) => {
|
|
|
353
306
|
He,
|
|
354
307
|
{
|
|
355
308
|
onClick: () => {
|
|
356
|
-
d(
|
|
309
|
+
d(ie.POLYGON), C();
|
|
357
310
|
},
|
|
358
311
|
children: "Polygon"
|
|
359
312
|
}
|
|
@@ -362,7 +315,7 @@ const Do = (e) => {
|
|
|
362
315
|
He,
|
|
363
316
|
{
|
|
364
317
|
onClick: () => {
|
|
365
|
-
d(
|
|
318
|
+
d(ie.BOX), C();
|
|
366
319
|
},
|
|
367
320
|
children: "Box"
|
|
368
321
|
}
|
|
@@ -371,7 +324,7 @@ const Do = (e) => {
|
|
|
371
324
|
He,
|
|
372
325
|
{
|
|
373
326
|
onClick: () => {
|
|
374
|
-
|
|
327
|
+
h(), C();
|
|
375
328
|
},
|
|
376
329
|
children: "Clear"
|
|
377
330
|
}
|
|
@@ -381,155 +334,138 @@ const Do = (e) => {
|
|
|
381
334
|
)
|
|
382
335
|
] });
|
|
383
336
|
};
|
|
384
|
-
var
|
|
385
|
-
const
|
|
337
|
+
var he = /* @__PURE__ */ ((e) => (e.WGS84 = "EPSG:4326", e.WEB_MERCATOR = "EPSG:3857", e))(he || {});
|
|
338
|
+
const Xe = 5, Ze = 2, Ft = Le(null), Oi = Ft.Provider, ct = 35, dt = 32, Di = 10, Ri = (e) => e !== void 0 && e !== he.WGS84 ? Pn([ct, dt], he.WGS84, e) : [ct, dt], Bi = (e) => {
|
|
386
339
|
switch (e) {
|
|
387
|
-
case
|
|
388
|
-
return (
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
Xe
|
|
392
|
-
);
|
|
393
|
-
case ue.WGS84:
|
|
394
|
-
return (i) => ot(
|
|
395
|
-
i,
|
|
396
|
-
"WGS84: {y}°N {x}°E",
|
|
397
|
-
Ye
|
|
398
|
-
);
|
|
340
|
+
case he.WEB_MERCATOR:
|
|
341
|
+
return (n) => st(n, "Mercator: {y}m, {x}m", Ze);
|
|
342
|
+
case he.WGS84:
|
|
343
|
+
return (n) => st(n, "WGS84: {y}°N {x}°E", Xe);
|
|
399
344
|
default:
|
|
400
|
-
return (
|
|
345
|
+
return (n) => "";
|
|
401
346
|
}
|
|
402
|
-
},
|
|
403
|
-
const e = Pe(
|
|
347
|
+
}, tt = () => {
|
|
348
|
+
const e = Pe(Ft);
|
|
404
349
|
if (e === null)
|
|
405
350
|
throw new Error("map context is null, please check the provider");
|
|
406
351
|
return e;
|
|
407
|
-
},
|
|
408
|
-
const
|
|
409
|
-
new
|
|
410
|
-
view: new
|
|
411
|
-
projection: a ??
|
|
352
|
+
}, Ni = (e) => {
|
|
353
|
+
const n = ve(null), { allowFullScreen: t, showMousePosition: i, projection: a } = e, [r] = k(
|
|
354
|
+
new _n({
|
|
355
|
+
view: new Sn({
|
|
356
|
+
projection: a ?? he.WGS84
|
|
412
357
|
}),
|
|
413
|
-
controls:
|
|
358
|
+
controls: Ln()
|
|
414
359
|
})
|
|
415
360
|
);
|
|
416
361
|
I(() => {
|
|
417
|
-
|
|
418
|
-
}, [
|
|
419
|
-
|
|
420
|
-
}, [
|
|
421
|
-
const d = (
|
|
362
|
+
r.getView().setCenter(e.center ?? Ri(e.projection));
|
|
363
|
+
}, [r, e.center, e.projection]), I(() => {
|
|
364
|
+
r.getView().setZoom(e.zoom ?? Di);
|
|
365
|
+
}, [r, e.zoom, e.projection]);
|
|
366
|
+
const d = (h, v) => {
|
|
422
367
|
v.getControls().forEach((S) => {
|
|
423
|
-
S instanceof
|
|
368
|
+
S instanceof h && v.removeControl(S);
|
|
424
369
|
});
|
|
425
370
|
};
|
|
426
371
|
return I(() => {
|
|
427
|
-
|
|
428
|
-
}, [
|
|
429
|
-
|
|
430
|
-
new
|
|
431
|
-
coordinateFormat:
|
|
432
|
-
projection: a ??
|
|
372
|
+
r.setTarget(n.current), t !== void 0 && t ? r.addControl(new at()) : d(at, r);
|
|
373
|
+
}, [r, t]), I(() => {
|
|
374
|
+
i !== void 0 && i ? (d(Ve, r), r.addControl(
|
|
375
|
+
new Ve({
|
|
376
|
+
coordinateFormat: Bi(a ?? he.WGS84),
|
|
377
|
+
projection: a ?? he.WGS84,
|
|
433
378
|
undefinedHTML: " "
|
|
434
379
|
})
|
|
435
|
-
)) : d(
|
|
436
|
-
}, [
|
|
437
|
-
/* @__PURE__ */ l("div", { className: "map", ref:
|
|
380
|
+
)) : d(Ve, r);
|
|
381
|
+
}, [r, i, a]), /* @__PURE__ */ R(Oi, { value: r, children: [
|
|
382
|
+
/* @__PURE__ */ l("div", { className: "map", ref: n }),
|
|
438
383
|
e.children
|
|
439
384
|
] });
|
|
440
|
-
},
|
|
441
|
-
const e = Pe(
|
|
385
|
+
}, Gt = Le(null), Fi = Gt.Provider, Gi = () => {
|
|
386
|
+
const e = Pe(Gt);
|
|
442
387
|
if (e === null)
|
|
443
388
|
throw new Error("tile layer context is null, please check the provider");
|
|
444
389
|
return e;
|
|
445
|
-
},
|
|
446
|
-
const t =
|
|
447
|
-
return I(() => (t.addLayer(
|
|
448
|
-
t.removeLayer(
|
|
449
|
-
}), [t,
|
|
450
|
-
},
|
|
451
|
-
const e = Pe(
|
|
390
|
+
}, Hi = ({ options: e, children: n }) => {
|
|
391
|
+
const t = tt(), [i] = k(new Mn(e));
|
|
392
|
+
return I(() => (t.addLayer(i), () => {
|
|
393
|
+
t.removeLayer(i);
|
|
394
|
+
}), [t, i]), /* @__PURE__ */ l(Fi, { value: i, children: n });
|
|
395
|
+
}, Ht = Le(null), Vi = Ht.Provider, zi = () => {
|
|
396
|
+
const e = Pe(Ht);
|
|
452
397
|
if (e === null)
|
|
453
398
|
throw new Error("vector layer context is null, please check the provider");
|
|
454
399
|
return e;
|
|
455
|
-
},
|
|
456
|
-
const
|
|
457
|
-
return I(() => (
|
|
458
|
-
|
|
459
|
-
}), [
|
|
460
|
-
},
|
|
461
|
-
const e = Pe(
|
|
400
|
+
}, $i = ({ children: e }) => {
|
|
401
|
+
const n = tt(), [t] = k(new An());
|
|
402
|
+
return I(() => (n.addLayer(t), () => {
|
|
403
|
+
n.removeLayer(t);
|
|
404
|
+
}), [n, t]), /* @__PURE__ */ l(Vi, { value: t, children: e });
|
|
405
|
+
}, Vt = Le(null), Ui = Vt.Provider, Wi = () => {
|
|
406
|
+
const e = Pe(Vt);
|
|
462
407
|
if (e === null)
|
|
463
408
|
throw new Error("vector source context is null, please check the provider");
|
|
464
409
|
return e;
|
|
465
|
-
},
|
|
466
|
-
const
|
|
410
|
+
}, ji = ({ children: e }) => {
|
|
411
|
+
const n = zi(), [t] = k(new xn());
|
|
467
412
|
return I(() => {
|
|
468
|
-
|
|
469
|
-
}, [t,
|
|
470
|
-
},
|
|
471
|
-
const
|
|
413
|
+
n.setSource(t);
|
|
414
|
+
}, [t, n]), /* @__PURE__ */ l(Ui, { value: t, children: e });
|
|
415
|
+
}, Ki = ({ geometry: e }) => {
|
|
416
|
+
const n = Wi();
|
|
472
417
|
return I(() => {
|
|
473
|
-
const
|
|
474
|
-
return
|
|
475
|
-
|
|
418
|
+
const i = new xt().readFeature(e);
|
|
419
|
+
return n.addFeature(i), () => {
|
|
420
|
+
n.removeFeature(i);
|
|
476
421
|
};
|
|
477
|
-
}, [e,
|
|
478
|
-
},
|
|
479
|
-
const
|
|
422
|
+
}, [e, n]), null;
|
|
423
|
+
}, qi = (e) => {
|
|
424
|
+
const n = Gi();
|
|
480
425
|
return I(() => {
|
|
481
|
-
|
|
482
|
-
}, [
|
|
483
|
-
},
|
|
484
|
-
|
|
485
|
-
onPolygonSelected: i
|
|
486
|
-
}) => {
|
|
487
|
-
const t = et();
|
|
426
|
+
n.setSource(new kn());
|
|
427
|
+
}, [n]), null;
|
|
428
|
+
}, Yi = ({ drawType: e, onPolygonSelected: n }) => {
|
|
429
|
+
const t = tt();
|
|
488
430
|
return I(() => {
|
|
489
|
-
const
|
|
431
|
+
const i = {
|
|
490
432
|
type: "Circle"
|
|
491
433
|
/* CIRCLE */
|
|
492
434
|
};
|
|
493
435
|
switch (e) {
|
|
494
|
-
case
|
|
495
|
-
|
|
436
|
+
case ie.BOX:
|
|
437
|
+
i.geometryFunction = On();
|
|
496
438
|
break;
|
|
497
|
-
case
|
|
498
|
-
|
|
439
|
+
case ie.POLYGON:
|
|
440
|
+
i.type = "Polygon";
|
|
499
441
|
break;
|
|
500
442
|
default:
|
|
501
443
|
return;
|
|
502
444
|
}
|
|
503
|
-
const a = new
|
|
445
|
+
const a = new In(i);
|
|
504
446
|
t.addInteraction(a);
|
|
505
|
-
const
|
|
506
|
-
const v = new
|
|
507
|
-
|
|
447
|
+
const r = (d) => {
|
|
448
|
+
const v = new xt().writeGeometryObject(d.feature.getGeometry());
|
|
449
|
+
n == null || n(v);
|
|
508
450
|
};
|
|
509
|
-
return a.on("drawend",
|
|
510
|
-
a.un("drawend",
|
|
451
|
+
return a.on("drawend", r), () => {
|
|
452
|
+
a.un("drawend", r), t.removeInteraction(a);
|
|
511
453
|
};
|
|
512
|
-
}, [
|
|
454
|
+
}, [n, e, t]), null;
|
|
513
455
|
};
|
|
514
|
-
const
|
|
515
|
-
const
|
|
516
|
-
const
|
|
517
|
-
e.onPolygonSelection(
|
|
456
|
+
const Xi = (e) => {
|
|
457
|
+
const n = (t) => {
|
|
458
|
+
const i = Tn(t);
|
|
459
|
+
e.onPolygonSelection(i);
|
|
518
460
|
};
|
|
519
|
-
return /* @__PURE__ */
|
|
520
|
-
/* @__PURE__ */ l(
|
|
521
|
-
e.selectionPolygon && /* @__PURE__ */ l(
|
|
461
|
+
return /* @__PURE__ */ R(Ni, { allowFullScreen: !0, showMousePosition: !0, children: [
|
|
462
|
+
/* @__PURE__ */ l(Hi, { children: /* @__PURE__ */ l(qi, {}) }),
|
|
463
|
+
e.selectionPolygon && /* @__PURE__ */ l($i, { children: /* @__PURE__ */ l(ji, { children: /* @__PURE__ */ l(Ki, { geometry: e.selectionPolygon }) }) }),
|
|
522
464
|
e.children,
|
|
523
|
-
e.drawType !== void 0 && /* @__PURE__ */ l(
|
|
524
|
-
Un,
|
|
525
|
-
{
|
|
526
|
-
drawType: e.drawType,
|
|
527
|
-
onPolygonSelected: i
|
|
528
|
-
}
|
|
529
|
-
)
|
|
465
|
+
e.drawType !== void 0 && /* @__PURE__ */ l(Yi, { drawType: e.drawType, onPolygonSelected: n })
|
|
530
466
|
] });
|
|
531
|
-
},
|
|
532
|
-
(e) =>
|
|
467
|
+
}, ze = 1.5, Zi = 80, Ji = Me(
|
|
468
|
+
(e) => Be({
|
|
533
469
|
map: {
|
|
534
470
|
height: "100%",
|
|
535
471
|
width: "100%",
|
|
@@ -538,12 +474,12 @@ const Wn = (e) => {
|
|
|
538
474
|
absolute: {
|
|
539
475
|
position: "absolute",
|
|
540
476
|
zIndex: 1e3,
|
|
541
|
-
left: e.spacing(
|
|
542
|
-
top: e.spacing(
|
|
477
|
+
left: e.spacing(ze),
|
|
478
|
+
top: e.spacing(ze)
|
|
543
479
|
},
|
|
544
480
|
contentContainer: {
|
|
545
|
-
marginTop: e.spacing(
|
|
546
|
-
width: e.spacing(
|
|
481
|
+
marginTop: e.spacing(ze),
|
|
482
|
+
width: e.spacing(Zi)
|
|
547
483
|
},
|
|
548
484
|
filtersContainer: {
|
|
549
485
|
display: "flex",
|
|
@@ -553,235 +489,207 @@ const Wn = (e) => {
|
|
|
553
489
|
marginLeft: e.spacing(1)
|
|
554
490
|
}
|
|
555
491
|
})
|
|
556
|
-
),
|
|
492
|
+
), zo = (e) => {
|
|
557
493
|
var v;
|
|
558
|
-
const [
|
|
494
|
+
const [n, t] = k(), [i, a] = k(), r = Ji(), d = (C) => {
|
|
559
495
|
a(C), t(void 0), e.handlePolygonSelected(C);
|
|
560
|
-
},
|
|
496
|
+
}, h = () => {
|
|
561
497
|
a(void 0), e.handlePolygonReset();
|
|
562
498
|
};
|
|
563
|
-
return /* @__PURE__ */
|
|
564
|
-
/* @__PURE__ */
|
|
565
|
-
/* @__PURE__ */
|
|
499
|
+
return /* @__PURE__ */ R("div", { className: r.map, children: [
|
|
500
|
+
/* @__PURE__ */ R("div", { className: `${r.absolute}`, children: [
|
|
501
|
+
/* @__PURE__ */ R(je, { className: r.filtersContainer, children: [
|
|
566
502
|
/* @__PURE__ */ l(
|
|
567
|
-
|
|
503
|
+
Ii,
|
|
568
504
|
{
|
|
569
505
|
onCancelDraw: () => t(void 0),
|
|
570
|
-
onReset:
|
|
506
|
+
onReset: h,
|
|
571
507
|
onStartDraw: t,
|
|
572
|
-
isSelectionEnabled:
|
|
508
|
+
isSelectionEnabled: n !== void 0
|
|
573
509
|
}
|
|
574
510
|
),
|
|
575
|
-
(v = e.filters) == null ? void 0 : v.map((C, S) => /* @__PURE__ */ l("div", { className:
|
|
511
|
+
(v = e.filters) == null ? void 0 : v.map((C, S) => /* @__PURE__ */ l("div", { className: r.filtersMargin, children: C }, S))
|
|
576
512
|
] }),
|
|
577
|
-
/* @__PURE__ */ l(
|
|
513
|
+
/* @__PURE__ */ l(je, { color: "red", className: `${r.contentContainer}`, children: e.children })
|
|
578
514
|
] }),
|
|
579
|
-
/* @__PURE__ */ l(
|
|
580
|
-
Wn,
|
|
581
|
-
{
|
|
582
|
-
children: e.mapContent,
|
|
583
|
-
onPolygonSelection: d,
|
|
584
|
-
drawType: i,
|
|
585
|
-
selectionPolygon: n
|
|
586
|
-
}
|
|
587
|
-
)
|
|
515
|
+
/* @__PURE__ */ l(Xi, { children: e.mapContent, onPolygonSelection: d, drawType: n, selectionPolygon: i })
|
|
588
516
|
] });
|
|
589
517
|
};
|
|
590
|
-
function
|
|
591
|
-
const { headCells:
|
|
592
|
-
a(v,
|
|
518
|
+
function Qi(e) {
|
|
519
|
+
const { headCells: n, order: t, orderBy: i, onRequestSort: a, isCollapseable: r } = e, d = (h) => (v) => {
|
|
520
|
+
a(v, h);
|
|
593
521
|
};
|
|
594
|
-
return /* @__PURE__ */ l(
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
522
|
+
return /* @__PURE__ */ l(Dn, { children: /* @__PURE__ */ R(Ie, { children: [
|
|
523
|
+
r && /* @__PURE__ */ l(be, {}),
|
|
524
|
+
n.map((h) => /* @__PURE__ */ l(
|
|
525
|
+
be,
|
|
598
526
|
{
|
|
599
|
-
align:
|
|
600
|
-
padding:
|
|
601
|
-
sortDirection:
|
|
527
|
+
align: h.numeric ? "right" : "left",
|
|
528
|
+
padding: h.disablePadding ? "none" : "default",
|
|
529
|
+
sortDirection: i === h.id ? t : !1,
|
|
602
530
|
children: /* @__PURE__ */ l(
|
|
603
|
-
|
|
531
|
+
on,
|
|
604
532
|
{
|
|
605
|
-
active:
|
|
606
|
-
direction:
|
|
607
|
-
onClick: d(
|
|
608
|
-
children:
|
|
533
|
+
active: i === h.id,
|
|
534
|
+
direction: i === h.id ? t : "asc",
|
|
535
|
+
onClick: d(h.id),
|
|
536
|
+
children: h.label
|
|
609
537
|
}
|
|
610
538
|
)
|
|
611
539
|
},
|
|
612
|
-
|
|
540
|
+
h.id
|
|
613
541
|
))
|
|
614
542
|
] }) });
|
|
615
543
|
}
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
544
|
+
const er = kt(
|
|
545
|
+
/* @__PURE__ */ bt.createElement("path", {
|
|
546
|
+
d: "M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"
|
|
547
|
+
}),
|
|
548
|
+
"KeyboardArrowDown"
|
|
549
|
+
), tr = kt(
|
|
550
|
+
/* @__PURE__ */ bt.createElement("path", {
|
|
551
|
+
d: "M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"
|
|
552
|
+
}),
|
|
553
|
+
"KeyboardArrowUp"
|
|
554
|
+
);
|
|
555
|
+
function nr(e) {
|
|
556
|
+
const { cellsMetadata: n, isRowSelected: t, item: i, onRowSelected: a, rowIndex: r, isCollapseable: d, collapsedElement: h } = e, [v, C] = k(!1), S = n.length;
|
|
557
|
+
return /* @__PURE__ */ R(re, { children: [
|
|
558
|
+
/* @__PURE__ */ R(Ie, { hover: !0, selected: t, onClick: () => {
|
|
559
|
+
a == null || a(r);
|
|
629
560
|
}, children: [
|
|
630
|
-
d && /* @__PURE__ */ l(
|
|
631
|
-
|
|
561
|
+
d && /* @__PURE__ */ l(be, { padding: "checkbox", children: /* @__PURE__ */ l(
|
|
562
|
+
sn,
|
|
632
563
|
{
|
|
633
564
|
"aria-label": "expand row",
|
|
634
565
|
size: "small",
|
|
635
566
|
onClick: (L) => {
|
|
636
567
|
L.stopPropagation(), C(!v);
|
|
637
568
|
},
|
|
638
|
-
children: v ? /* @__PURE__ */ l(
|
|
569
|
+
children: v ? /* @__PURE__ */ l(tr, {}) : /* @__PURE__ */ l(er, {})
|
|
639
570
|
}
|
|
640
571
|
) }),
|
|
641
|
-
|
|
642
|
-
|
|
572
|
+
n.map((L) => /* @__PURE__ */ l(
|
|
573
|
+
be,
|
|
643
574
|
{
|
|
644
575
|
align: L.numeric ? "right" : "left",
|
|
645
576
|
padding: L.disablePadding ? "none" : "default",
|
|
646
|
-
children: L.transform ? L.transform(
|
|
577
|
+
children: L.transform ? L.transform(i[L.id]) : i[L.id]
|
|
647
578
|
},
|
|
648
|
-
L.id +
|
|
579
|
+
L.id + r.toString()
|
|
649
580
|
))
|
|
650
581
|
] }),
|
|
651
|
-
d && /* @__PURE__ */ l(
|
|
652
|
-
we,
|
|
653
|
-
{
|
|
654
|
-
style: { paddingBottom: 0, paddingTop: 0 },
|
|
655
|
-
colSpan: S + 1,
|
|
656
|
-
children: /* @__PURE__ */ l(ei, { in: v, unmountOnExit: !0, timeout: "auto", children: u == null ? void 0 : u(n) })
|
|
657
|
-
}
|
|
658
|
-
) })
|
|
582
|
+
d && /* @__PURE__ */ l(Ie, { children: /* @__PURE__ */ l(be, { style: { paddingBottom: 0, paddingTop: 0 }, colSpan: S + 1, children: /* @__PURE__ */ l(an, { in: v, unmountOnExit: !0, timeout: "auto", children: h == null ? void 0 : h(i) }) }) })
|
|
659
583
|
] });
|
|
660
584
|
}
|
|
661
|
-
function
|
|
662
|
-
const [
|
|
663
|
-
cellsMetadata:
|
|
585
|
+
function $o(e) {
|
|
586
|
+
const [n, t] = k(""), [i, a] = k("asc"), {
|
|
587
|
+
cellsMetadata: r,
|
|
664
588
|
items: d,
|
|
665
|
-
onRequestSort:
|
|
589
|
+
onRequestSort: h,
|
|
666
590
|
onRowSelected: v,
|
|
667
591
|
isCollapseable: C,
|
|
668
592
|
collapsedElement: S,
|
|
669
|
-
isDense:
|
|
593
|
+
isDense: x,
|
|
670
594
|
page: L,
|
|
671
|
-
rowsPerPage:
|
|
672
|
-
count:
|
|
595
|
+
rowsPerPage: B,
|
|
596
|
+
count: U,
|
|
673
597
|
handleChangePage: K,
|
|
674
|
-
handleChangeRowsPerPage:
|
|
598
|
+
handleChangeRowsPerPage: J
|
|
675
599
|
} = e;
|
|
676
|
-
return /* @__PURE__ */
|
|
677
|
-
/* @__PURE__ */
|
|
600
|
+
return /* @__PURE__ */ R(ln, { component: je, children: [
|
|
601
|
+
/* @__PURE__ */ R(cn, { size: x ? "small" : "medium", children: [
|
|
678
602
|
/* @__PURE__ */ l(
|
|
679
|
-
|
|
603
|
+
Qi,
|
|
680
604
|
{
|
|
681
|
-
headCells:
|
|
682
|
-
onRequestSort: (
|
|
683
|
-
const V =
|
|
684
|
-
a(V ? "desc" : "asc"), t(
|
|
605
|
+
headCells: r,
|
|
606
|
+
onRequestSort: (Y, z) => {
|
|
607
|
+
const V = n === z && i === "asc";
|
|
608
|
+
a(V ? "desc" : "asc"), t(z), h(z, V ? "desc" : "asc");
|
|
685
609
|
},
|
|
686
|
-
order:
|
|
687
|
-
orderBy:
|
|
610
|
+
order: i,
|
|
611
|
+
orderBy: n,
|
|
688
612
|
isCollapseable: C
|
|
689
613
|
}
|
|
690
614
|
),
|
|
691
|
-
/* @__PURE__ */
|
|
692
|
-
d.map((
|
|
693
|
-
|
|
615
|
+
/* @__PURE__ */ R(dn, { children: [
|
|
616
|
+
d.map((Y, z) => /* @__PURE__ */ l(
|
|
617
|
+
nr,
|
|
694
618
|
{
|
|
695
|
-
item:
|
|
696
|
-
rowIndex:
|
|
619
|
+
item: Y,
|
|
620
|
+
rowIndex: z,
|
|
697
621
|
isCollapseable: C,
|
|
698
|
-
cellsMetadata:
|
|
622
|
+
cellsMetadata: r,
|
|
699
623
|
collapsedElement: S,
|
|
700
624
|
isRowSelected: !1,
|
|
701
625
|
onRowSelected: v
|
|
702
626
|
},
|
|
703
|
-
|
|
627
|
+
z
|
|
704
628
|
)),
|
|
705
|
-
(d.length === 0 ||
|
|
706
|
-
|
|
629
|
+
(d.length === 0 || B > d.length) && /* @__PURE__ */ l(
|
|
630
|
+
Ie,
|
|
707
631
|
{
|
|
708
632
|
style: {
|
|
709
|
-
height: (
|
|
633
|
+
height: (x ? 33 : 53) * (B - d.length)
|
|
710
634
|
},
|
|
711
|
-
children: /* @__PURE__ */ l(
|
|
712
|
-
we,
|
|
713
|
-
{
|
|
714
|
-
colSpan: C ? o.length + 1 : o.length,
|
|
715
|
-
children: d.length === 0 && /* @__PURE__ */ l(ri, { align: "center", children: "No results :(" })
|
|
716
|
-
}
|
|
717
|
-
)
|
|
635
|
+
children: /* @__PURE__ */ l(be, { colSpan: C ? r.length + 1 : r.length, children: d.length === 0 && /* @__PURE__ */ l(un, { align: "center", children: "No results :(" }) })
|
|
718
636
|
}
|
|
719
637
|
)
|
|
720
638
|
] })
|
|
721
639
|
] }),
|
|
722
640
|
/* @__PURE__ */ l(
|
|
723
|
-
|
|
641
|
+
hn,
|
|
724
642
|
{
|
|
725
|
-
rowsPerPage:
|
|
643
|
+
rowsPerPage: B,
|
|
726
644
|
rowsPerPageOptions: [5, 10],
|
|
727
645
|
component: "div",
|
|
728
|
-
count:
|
|
646
|
+
count: U,
|
|
729
647
|
page: L,
|
|
730
648
|
onPageChange: K,
|
|
731
|
-
onRowsPerPageChange:
|
|
649
|
+
onRowsPerPageChange: J
|
|
732
650
|
}
|
|
733
651
|
)
|
|
734
652
|
] });
|
|
735
653
|
}
|
|
736
|
-
const
|
|
737
|
-
const { children:
|
|
738
|
-
return /* @__PURE__ */ l(
|
|
739
|
-
},
|
|
740
|
-
const { children:
|
|
741
|
-
return /* @__PURE__ */ l(
|
|
742
|
-
},
|
|
743
|
-
const
|
|
744
|
-
const
|
|
654
|
+
const Uo = (e) => {
|
|
655
|
+
const { children: n, ...t } = e;
|
|
656
|
+
return /* @__PURE__ */ l(Rn, { ...t, children: n });
|
|
657
|
+
}, Wo = (e) => {
|
|
658
|
+
const { children: n, ...t } = e;
|
|
659
|
+
return /* @__PURE__ */ l(Bn, { ...t, children: n });
|
|
660
|
+
}, ut = (e) => e * Math.PI / 180, xe = (e) => e * (180 / Math.PI), ir = (e) => 0.05 * (5916575505e-1 / Math.pow(2, e - 1) / 2) * (Math.cos(ut(85.362 / 2)) / Math.sin(ut(85.362 / 2)));
|
|
661
|
+
const rr = (e) => {
|
|
662
|
+
const n = pe(), t = ve(null), [i, a] = k({ x: 0, y: 0 });
|
|
745
663
|
return I(() => {
|
|
746
|
-
|
|
747
|
-
(
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
);
|
|
752
|
-
}, [t, i]), I(() => {
|
|
753
|
-
const o = i.scene.globe.ellipsoid, d = i.camera.pickEllipsoid(
|
|
754
|
-
new me(n.x, n.y),
|
|
755
|
-
o
|
|
756
|
-
);
|
|
664
|
+
n.screenSpaceEventHandler.setInputAction((r) => {
|
|
665
|
+
r != null && r.endPosition && a({ ...r.endPosition });
|
|
666
|
+
}, Kn.MOUSE_MOVE);
|
|
667
|
+
}, [t, n]), I(() => {
|
|
668
|
+
const r = n.scene.globe.ellipsoid, d = n.camera.pickEllipsoid(new ge(i.x, i.y), r);
|
|
757
669
|
if (d) {
|
|
758
|
-
const
|
|
670
|
+
const h = r.cartesianToCartographic(d);
|
|
759
671
|
if (t.current) {
|
|
760
672
|
let v = "";
|
|
761
673
|
switch (e.projection) {
|
|
762
|
-
case
|
|
763
|
-
const S = new
|
|
764
|
-
v = `Mercator: ${S.y.toFixed(
|
|
765
|
-
|
|
766
|
-
)}m
|
|
674
|
+
case he.WEB_MERCATOR: {
|
|
675
|
+
const S = new qn(r).project(h);
|
|
676
|
+
v = `Mercator: ${S.y.toFixed(Ze)}m, ${S.x.toFixed(
|
|
677
|
+
Ze
|
|
678
|
+
)}m`, t.current.style.width = "220px";
|
|
767
679
|
break;
|
|
768
680
|
}
|
|
769
|
-
case
|
|
770
|
-
const C = le.toDegrees(
|
|
771
|
-
|
|
772
|
-
).toFixed(Ye);
|
|
773
|
-
v = `WGS84: ${le.toDegrees(
|
|
774
|
-
u.latitude
|
|
775
|
-
).toFixed(Ye)}°N ${C}°E`, t.current.style.width = "200px";
|
|
681
|
+
case he.WGS84: {
|
|
682
|
+
const C = le.toDegrees(h.longitude).toFixed(Xe);
|
|
683
|
+
v = `WGS84: ${le.toDegrees(h.latitude).toFixed(Xe)}°N ${C}°E`, t.current.style.width = "200px";
|
|
776
684
|
break;
|
|
777
685
|
}
|
|
778
686
|
}
|
|
779
687
|
t.current.innerHTML = v;
|
|
780
688
|
}
|
|
781
689
|
}
|
|
782
|
-
}, [
|
|
690
|
+
}, [i, t, n, e.projection]), /* @__PURE__ */ l("div", { className: "trackerPosition", ref: t });
|
|
783
691
|
};
|
|
784
|
-
const
|
|
692
|
+
const $e = [
|
|
785
693
|
1,
|
|
786
694
|
2,
|
|
787
695
|
3,
|
|
@@ -814,64 +722,51 @@ const ze = [
|
|
|
814
722
|
2e7,
|
|
815
723
|
3e7,
|
|
816
724
|
5e7
|
|
817
|
-
],
|
|
818
|
-
const a = Q(
|
|
725
|
+
], or = (e, n, t, i) => {
|
|
726
|
+
const a = Q(i, "METERS_UNIT") ?? "m", r = Q(i, "KILOMETERS_UNIT") ?? "km", d = {
|
|
819
727
|
barWidth: void 0,
|
|
820
728
|
distanceLabel: void 0,
|
|
821
|
-
lastLegendUpdate:
|
|
822
|
-
},
|
|
729
|
+
lastLegendUpdate: n.lastLegendUpdate
|
|
730
|
+
}, h = new Xn(), v = new Date().getTime();
|
|
823
731
|
if (v < d.lastLegendUpdate + 250)
|
|
824
732
|
return;
|
|
825
733
|
d.lastLegendUpdate = v;
|
|
826
|
-
const C = e.scene.canvas.clientWidth, S = e.scene.canvas.clientHeight,
|
|
827
|
-
|
|
828
|
-
), L = e.scene.camera.getPickRay(
|
|
829
|
-
new Te(1 + C / 2 | 0, S - 1)
|
|
830
|
-
), R = e.scene.globe, z = R.pick(A, e.scene), K = R.pick(L, e.scene);
|
|
831
|
-
if (!z || !K)
|
|
734
|
+
const C = e.scene.canvas.clientWidth, S = e.scene.canvas.clientHeight, x = e.scene.camera.getPickRay(new _e(C / 2 | 0, S - 1)), L = e.scene.camera.getPickRay(new _e(1 + C / 2 | 0, S - 1)), B = e.scene.globe, U = B.pick(x, e.scene), K = B.pick(L, e.scene);
|
|
735
|
+
if (!U || !K)
|
|
832
736
|
return;
|
|
833
|
-
const
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
K
|
|
837
|
-
);
|
|
838
|
-
u.setEndPoints(Y, F);
|
|
839
|
-
const X = u.surfaceDistance, U = 100;
|
|
737
|
+
const J = B.ellipsoid.cartesianToCartographic(U), G = B.ellipsoid.cartesianToCartographic(K);
|
|
738
|
+
h.setEndPoints(J, G);
|
|
739
|
+
const Y = h.surfaceDistance, z = 100;
|
|
840
740
|
let V;
|
|
841
|
-
for (let
|
|
842
|
-
|
|
843
|
-
if (
|
|
844
|
-
let
|
|
845
|
-
V >= 1e3 ?
|
|
741
|
+
for (let W = $e.length - 1; !De(V) && W >= 0; --W)
|
|
742
|
+
$e[W] / Y < z && (V = $e[W]);
|
|
743
|
+
if (De(V)) {
|
|
744
|
+
let W = "";
|
|
745
|
+
V >= 1e3 ? W = `${(V / 1e3).toString()} ${r}` : W = `${V.toString()} ${a}`, d.barWidth = V / Y | 0, d.distanceLabel = W;
|
|
846
746
|
}
|
|
847
747
|
t(d);
|
|
848
|
-
},
|
|
849
|
-
const
|
|
748
|
+
}, sr = (e) => {
|
|
749
|
+
const n = pe(), [t, i] = k({
|
|
850
750
|
barWidth: void 0,
|
|
851
751
|
distanceLabel: void 0,
|
|
852
752
|
lastLegendUpdate: -1
|
|
853
753
|
});
|
|
854
754
|
I(() => {
|
|
855
|
-
const
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
n,
|
|
860
|
-
e.locale
|
|
861
|
-
);
|
|
862
|
-
}, d = new $i(), u = (v) => {
|
|
863
|
-
i.scene.globe.tilesLoaded && (o(new MouseEvent("mouse")), d.removeAll());
|
|
755
|
+
const r = (v) => {
|
|
756
|
+
or(n, t, i, e.locale);
|
|
757
|
+
}, d = new Yn(), h = (v) => {
|
|
758
|
+
n.scene.globe.tilesLoaded && (r(new MouseEvent("mouse")), d.removeAll());
|
|
864
759
|
};
|
|
865
|
-
return d.add(
|
|
760
|
+
return d.add(n.scene.globe.tileLoadProgressEvent, h), n.camera.moveEnd.addEventListener(r), () => {
|
|
866
761
|
try {
|
|
867
|
-
Q(
|
|
762
|
+
Q(n, "_cesiumWidget") != null && n.camera.moveEnd.removeEventListener(r);
|
|
868
763
|
} catch (v) {
|
|
869
764
|
console.log('CESIUM camera "moveEnd" remove listener failed', v);
|
|
870
765
|
}
|
|
871
766
|
};
|
|
872
|
-
}, [
|
|
873
|
-
const a = (
|
|
874
|
-
return /* @__PURE__ */ l("div", { className: "scalePosition", children:
|
|
767
|
+
}, [n, e.locale, t]);
|
|
768
|
+
const a = (r) => 5 + (125 - r) / 2;
|
|
769
|
+
return /* @__PURE__ */ l("div", { className: "scalePosition", children: De(t.barWidth) && /* @__PURE__ */ R(re, { children: [
|
|
875
770
|
/* @__PURE__ */ l("div", { className: "distance-legend-label", children: t.distanceLabel }),
|
|
876
771
|
/* @__PURE__ */ l(
|
|
877
772
|
"div",
|
|
@@ -885,53 +780,51 @@ const ze = [
|
|
|
885
780
|
}
|
|
886
781
|
)
|
|
887
782
|
] }) });
|
|
888
|
-
},
|
|
783
|
+
}, ne = {
|
|
889
784
|
MORPHING: ye.MORPHING,
|
|
890
785
|
COLUMBUS_VIEW: ye.COLUMBUS_VIEW,
|
|
891
786
|
SCENE2D: ye.SCENE2D,
|
|
892
787
|
SCENE3D: ye.SCENE3D
|
|
893
788
|
};
|
|
894
|
-
const
|
|
895
|
-
const
|
|
896
|
-
for (let
|
|
897
|
-
if (
|
|
898
|
-
return
|
|
789
|
+
const ht = (e, n) => {
|
|
790
|
+
const i = Q(n.scene.globe, "_surface.tileProvider"), a = i._quadtree, r = n.canvas.height, d = Q(n.camera.frustum, "sseDenominator") ?? 1;
|
|
791
|
+
for (let h = 0; h <= 19; h++)
|
|
792
|
+
if (i.getLevelMaximumGeometricError(h) * r / (e * d) < a.maximumScreenSpaceError)
|
|
793
|
+
return h;
|
|
899
794
|
return null;
|
|
900
|
-
},
|
|
795
|
+
}, ar = (e, n) => {
|
|
901
796
|
e = e || 10;
|
|
902
797
|
const t = [];
|
|
903
|
-
let
|
|
904
|
-
for (let
|
|
905
|
-
const d =
|
|
798
|
+
let i = 1e5, a = 0;
|
|
799
|
+
for (let r = 1e8; r > i; r = r - i) {
|
|
800
|
+
const d = ht(r, n);
|
|
906
801
|
if (d === null)
|
|
907
802
|
break;
|
|
908
803
|
if (d !== a) {
|
|
909
|
-
let
|
|
910
|
-
for (; v -
|
|
911
|
-
|
|
804
|
+
let h = r, v = r + i;
|
|
805
|
+
for (; v - h > e; )
|
|
806
|
+
r = h + (v - h) / 2, ht(r, n) === d ? h = r : v = r;
|
|
912
807
|
t.push({
|
|
913
808
|
level: d,
|
|
914
|
-
height: Math.round(
|
|
915
|
-
}), a = d, t.length >= 2 && (
|
|
809
|
+
height: Math.round(r)
|
|
810
|
+
}), a = d, t.length >= 2 && (i = (t[t.length - 2].height - r) / 1e3);
|
|
916
811
|
}
|
|
917
812
|
}
|
|
918
813
|
return t;
|
|
919
|
-
},
|
|
920
|
-
const
|
|
814
|
+
}, lr = (e) => {
|
|
815
|
+
const n = pe(), [t, i] = k(1), a = ar(1, n);
|
|
921
816
|
return I(() => {
|
|
922
|
-
const
|
|
923
|
-
const d =
|
|
817
|
+
const r = () => {
|
|
818
|
+
const d = n.camera, h = 0.5;
|
|
924
819
|
let v = 0;
|
|
925
|
-
switch (
|
|
926
|
-
case
|
|
927
|
-
v =
|
|
928
|
-
d.positionWC
|
|
929
|
-
).height;
|
|
820
|
+
switch (n.scene.mode) {
|
|
821
|
+
case ne.SCENE3D:
|
|
822
|
+
v = n.scene.mapProjection.ellipsoid.cartesianToCartographic(d.positionWC).height;
|
|
930
823
|
break;
|
|
931
|
-
case
|
|
932
|
-
v = (d.frustum.right - d.frustum.left) *
|
|
824
|
+
case ne.SCENE2D:
|
|
825
|
+
v = (d.frustum.right - d.frustum.left) * h;
|
|
933
826
|
break;
|
|
934
|
-
case
|
|
827
|
+
case ne.COLUMBUS_VIEW:
|
|
935
828
|
v = d.position.z;
|
|
936
829
|
break;
|
|
937
830
|
default:
|
|
@@ -939,490 +832,317 @@ const ut = (e, i) => {
|
|
|
939
832
|
break;
|
|
940
833
|
}
|
|
941
834
|
if (a.length > 0) {
|
|
942
|
-
const C = a.reduce((S,
|
|
943
|
-
|
|
835
|
+
const C = a.reduce((S, x) => Math.abs(x.height - v) < Math.abs(S.height - v) ? x : S);
|
|
836
|
+
i(C.level);
|
|
944
837
|
}
|
|
945
838
|
};
|
|
946
|
-
return
|
|
839
|
+
return n.camera.moveEnd.addEventListener(r), () => {
|
|
947
840
|
try {
|
|
948
|
-
Q(
|
|
841
|
+
Q(n, "_cesiumWidget") != null && n.camera.moveEnd.removeEventListener(r);
|
|
949
842
|
} catch (d) {
|
|
950
|
-
console.log(
|
|
951
|
-
'CESIUM camera "moveEnd"(from zoom tracker) remove listener failed',
|
|
952
|
-
d
|
|
953
|
-
);
|
|
843
|
+
console.log('CESIUM camera "moveEnd"(from zoom tracker) remove listener failed', d);
|
|
954
844
|
}
|
|
955
845
|
};
|
|
956
|
-
}, [
|
|
846
|
+
}, [n, a.length]), /* @__PURE__ */ R("div", { className: "zoomLevel", children: [
|
|
957
847
|
/* @__PURE__ */ l("div", { className: "zoomLevelValue", children: t }),
|
|
958
848
|
/* @__PURE__ */ l("div", { className: "zoomLevelLabel", children: Q(e.locale, "ZOOM_LABEL") ?? "zoom" })
|
|
959
849
|
] });
|
|
960
850
|
};
|
|
961
|
-
const
|
|
962
|
-
const
|
|
851
|
+
const cr = -1, dr = (e) => {
|
|
852
|
+
const n = pe(), [t, i] = k(), { sceneModes: a } = e, r = (d) => a.findIndex((h) => h === d) > cr;
|
|
963
853
|
return I(() => {
|
|
964
|
-
n
|
|
965
|
-
}, []), /* @__PURE__ */
|
|
966
|
-
|
|
967
|
-
|
|
854
|
+
i(n.scene.mode);
|
|
855
|
+
}, []), /* @__PURE__ */ R(re, { children: [
|
|
856
|
+
r(ne.SCENE3D) && /* @__PURE__ */ l(
|
|
857
|
+
Te,
|
|
968
858
|
{
|
|
969
|
-
icon: /* @__PURE__ */ l(
|
|
970
|
-
"div",
|
|
971
|
-
{
|
|
972
|
-
className: `mapViewIcon ${t === ie.SCENE3D ? "mapViewCurrent" : ""}`,
|
|
973
|
-
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" }) })
|
|
974
|
-
}
|
|
975
|
-
),
|
|
859
|
+
icon: /* @__PURE__ */ l("div", { className: `mapViewIcon ${t === ne.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" }) }) }),
|
|
976
860
|
onClick: () => {
|
|
977
|
-
|
|
861
|
+
n.scene.morphTo3D(), i(ne.SCENE3D);
|
|
978
862
|
}
|
|
979
863
|
}
|
|
980
864
|
),
|
|
981
|
-
|
|
982
|
-
|
|
865
|
+
r(ne.SCENE2D) && /* @__PURE__ */ l(
|
|
866
|
+
Te,
|
|
983
867
|
{
|
|
984
|
-
icon: /* @__PURE__ */ l(
|
|
985
|
-
"div",
|
|
986
|
-
{
|
|
987
|
-
className: `mapViewIcon ${t === ie.SCENE2D ? "mapViewCurrent" : ""}`,
|
|
988
|
-
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" }) })
|
|
989
|
-
}
|
|
990
|
-
),
|
|
868
|
+
icon: /* @__PURE__ */ l("div", { className: `mapViewIcon ${t === ne.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" }) }) }),
|
|
991
869
|
onClick: () => {
|
|
992
|
-
|
|
870
|
+
n.scene.morphTo2D(), i(ne.SCENE2D);
|
|
993
871
|
}
|
|
994
872
|
}
|
|
995
873
|
),
|
|
996
|
-
|
|
997
|
-
|
|
874
|
+
r(ne.COLUMBUS_VIEW) && /* @__PURE__ */ l(
|
|
875
|
+
Te,
|
|
998
876
|
{
|
|
999
|
-
icon: /* @__PURE__ */ l(
|
|
1000
|
-
"div",
|
|
1001
|
-
{
|
|
1002
|
-
className: `mapViewIcon ${t === ie.COLUMBUS_VIEW ? "mapViewCurrent" : ""}`,
|
|
1003
|
-
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" }) })
|
|
1004
|
-
}
|
|
1005
|
-
),
|
|
877
|
+
icon: /* @__PURE__ */ l("div", { className: `mapViewIcon ${t === ne.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" }) }) }),
|
|
1006
878
|
onClick: () => {
|
|
1007
|
-
|
|
879
|
+
n.scene.morphToColumbusView(), i(ne.COLUMBUS_VIEW);
|
|
1008
880
|
}
|
|
1009
881
|
}
|
|
1010
882
|
)
|
|
1011
883
|
] });
|
|
1012
884
|
};
|
|
1013
|
-
const
|
|
1014
|
-
(e) =>
|
|
885
|
+
const ur = Me(
|
|
886
|
+
(e) => Be({
|
|
1015
887
|
mapContainer: {
|
|
1016
888
|
width: "60px",
|
|
1017
889
|
height: "60px",
|
|
1018
890
|
border: `${e.palette.background.paper} 2px solid`
|
|
1019
891
|
}
|
|
1020
892
|
})
|
|
1021
|
-
),
|
|
1022
|
-
const
|
|
893
|
+
), hr = (e) => {
|
|
894
|
+
const n = pe(), { baseMaps: t } = e, [i, a] = k(" "), [r, d] = k(), h = ur();
|
|
1023
895
|
I(() => {
|
|
1024
896
|
const C = t == null ? void 0 : t.maps.find((S) => S.isCurrent);
|
|
1025
897
|
C && (d(C), a(C.title !== void 0 ? C.title : " "));
|
|
1026
898
|
}, [t]);
|
|
1027
899
|
const v = (C) => {
|
|
1028
|
-
var S,
|
|
900
|
+
var S, x;
|
|
1029
901
|
if (t) {
|
|
1030
|
-
(S =
|
|
1031
|
-
const L = t.maps.find(
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
L && ((A = i.layersManager) == null || A.setBaseMapLayers(L), d(L), t.maps.forEach((R) => {
|
|
1035
|
-
R.isCurrent = L === R;
|
|
902
|
+
(S = n.layersManager) == null || S.removeBaseMapLayers();
|
|
903
|
+
const L = t.maps.find((B) => B.id === C);
|
|
904
|
+
L && ((x = n.layersManager) == null || x.setBaseMapLayers(L), d(L), t.maps.forEach((B) => {
|
|
905
|
+
B.isCurrent = L === B;
|
|
1036
906
|
}));
|
|
1037
907
|
}
|
|
1038
908
|
};
|
|
1039
|
-
return /* @__PURE__ */
|
|
1040
|
-
/* @__PURE__ */ l("label", { className: "mapLabel", children:
|
|
1041
|
-
/* @__PURE__ */ l("ul", { className: "mapSelector", children: t == null ? void 0 : t.maps.map((C) => /* @__PURE__ */ l(
|
|
1042
|
-
"
|
|
909
|
+
return /* @__PURE__ */ R(re, { children: [
|
|
910
|
+
/* @__PURE__ */ l("label", { className: "mapLabel", children: i }),
|
|
911
|
+
/* @__PURE__ */ l("ul", { className: "mapSelector", children: t == null ? void 0 : t.maps.map((C) => /* @__PURE__ */ l("li", { className: `mapContainer ${h.mapContainer} ${C === r ? "mapContainerSelected" : ""}`, children: /* @__PURE__ */ l(
|
|
912
|
+
"img",
|
|
1043
913
|
{
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
},
|
|
1059
|
-
onClick: () => {
|
|
1060
|
-
v(C.id);
|
|
1061
|
-
}
|
|
1062
|
-
}
|
|
1063
|
-
)
|
|
1064
|
-
},
|
|
1065
|
-
C.id
|
|
1066
|
-
)) })
|
|
914
|
+
alt: "",
|
|
915
|
+
className: "mapContainerImg",
|
|
916
|
+
src: C.thumbnail,
|
|
917
|
+
onMouseOver: () => {
|
|
918
|
+
a(C.title);
|
|
919
|
+
},
|
|
920
|
+
onMouseOut: () => {
|
|
921
|
+
a((r == null ? void 0 : r.title) !== void 0 ? r.title : " ");
|
|
922
|
+
},
|
|
923
|
+
onClick: () => {
|
|
924
|
+
v(C.id);
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
) }, C.id)) })
|
|
1067
928
|
] });
|
|
1068
929
|
};
|
|
1069
|
-
const
|
|
1070
|
-
const [
|
|
930
|
+
const Ue = "ic_settings_24px", pr = (e) => {
|
|
931
|
+
const [n, t] = k(!1), { sceneModes: i, baseMaps: a, locale: r } = e, d = ve(null), h = Q(r, "MAP_SETTINGS_DIALOG_TITLE") ?? "Map Settings", v = Q(r, "MAP_SETTINGS_SCENE_MODE_TITLE") ?? "Scene Mode", C = Q(r, "MAP_SETTINGS_BASE_MAP_TITLE") ?? "Base Map";
|
|
1071
932
|
return I(() => {
|
|
1072
|
-
const S = (
|
|
1073
|
-
var
|
|
1074
|
-
const L =
|
|
1075
|
-
|
|
933
|
+
const S = (x) => {
|
|
934
|
+
var U;
|
|
935
|
+
const L = x.target, B = Q(d, "current");
|
|
936
|
+
B && !B.contains(L) && L.id !== Ue && ((U = L.parentElement) == null ? void 0 : U.id) !== Ue && (document.removeEventListener("click", S, !1), t(!1));
|
|
1076
937
|
};
|
|
1077
938
|
return document.addEventListener("click", S, !1), () => {
|
|
1078
939
|
document.removeEventListener("click", S, !1);
|
|
1079
940
|
};
|
|
1080
|
-
}), /* @__PURE__ */
|
|
941
|
+
}), /* @__PURE__ */ R(re, { children: [
|
|
1081
942
|
/* @__PURE__ */ l(
|
|
1082
|
-
|
|
943
|
+
Te,
|
|
1083
944
|
{
|
|
1084
|
-
icon: /* @__PURE__ */ l("div", { className: "settingsIconContainer", children: /* @__PURE__ */ l(
|
|
1085
|
-
"svg",
|
|
1086
|
-
{
|
|
1087
|
-
width: "100%",
|
|
1088
|
-
height: "100%",
|
|
1089
|
-
viewBox: "0 0 24 24",
|
|
1090
|
-
id: $e,
|
|
1091
|
-
x: "288",
|
|
1092
|
-
y: "24",
|
|
1093
|
-
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" })
|
|
1094
|
-
}
|
|
1095
|
-
) }),
|
|
945
|
+
icon: /* @__PURE__ */ l("div", { className: "settingsIconContainer", children: /* @__PURE__ */ l("svg", { width: "100%", height: "100%", viewBox: "0 0 24 24", id: Ue, 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" }) }) }),
|
|
1096
946
|
onClick: () => {
|
|
1097
|
-
t(!
|
|
947
|
+
t(!n);
|
|
1098
948
|
}
|
|
1099
949
|
}
|
|
1100
950
|
),
|
|
1101
|
-
|
|
1102
|
-
|
|
951
|
+
n && /* @__PURE__ */ l("div", { id: "dialog-portal-example", className: "settingsDialogPortal", ref: d, children: /* @__PURE__ */ R(
|
|
952
|
+
fn,
|
|
1103
953
|
{
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
{
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
/* @__PURE__ */ l(
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
/* @__PURE__ */ l(ae, { className: "baseMapsContainer", children: a && /* @__PURE__ */ D(oe, { children: [
|
|
1120
|
-
/* @__PURE__ */ l("h4", { className: "sectionLabel", children: C }),
|
|
1121
|
-
/* @__PURE__ */ l(or, { baseMaps: a })
|
|
1122
|
-
] }) })
|
|
1123
|
-
] })
|
|
1124
|
-
]
|
|
1125
|
-
}
|
|
1126
|
-
)
|
|
954
|
+
open: n,
|
|
955
|
+
onClosed: () => {
|
|
956
|
+
t(!1);
|
|
957
|
+
},
|
|
958
|
+
children: [
|
|
959
|
+
/* @__PURE__ */ l(yn, { children: h }),
|
|
960
|
+
/* @__PURE__ */ R(vn, { children: [
|
|
961
|
+
/* @__PURE__ */ l("h4", { className: "sectionLabel", children: v }),
|
|
962
|
+
/* @__PURE__ */ l(ae, { className: "mapScenesContainer", children: /* @__PURE__ */ l(dr, { sceneModes: i }) }),
|
|
963
|
+
/* @__PURE__ */ l(ae, { className: "baseMapsContainer", children: a && /* @__PURE__ */ R(re, { children: [
|
|
964
|
+
/* @__PURE__ */ l("h4", { className: "sectionLabel", children: C }),
|
|
965
|
+
/* @__PURE__ */ l(hr, { baseMaps: a })
|
|
966
|
+
] }) })
|
|
967
|
+
] })
|
|
968
|
+
]
|
|
1127
969
|
}
|
|
1128
|
-
)
|
|
970
|
+
) })
|
|
1129
971
|
] });
|
|
1130
972
|
};
|
|
1131
|
-
const
|
|
1132
|
-
"
|
|
1133
|
-
{
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
height: "24",
|
|
1137
|
-
width: "24",
|
|
1138
|
-
viewBox: "0 0 612 612",
|
|
1139
|
-
children: /* @__PURE__ */ D("g", { xmlns: "http://www.w3.org/2000/svg", children: [
|
|
1140
|
-
/* @__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" }),
|
|
1141
|
-
/* @__PURE__ */ l("circle", { cx: "270.1", cy: "56.3", r: "56.3" })
|
|
1142
|
-
] })
|
|
1143
|
-
}
|
|
1144
|
-
), lr = ({ onClick: e }) => /* @__PURE__ */ l(ae, { onClick: e, className: "mapLegendToggleContainer", children: /* @__PURE__ */ l(be, { icon: ar, className: "mapLegendIcon" }) }), cr = ({
|
|
1145
|
-
legend: { legendImg: e, legendDoc: i, layer: t },
|
|
1146
|
-
docText: n,
|
|
1147
|
-
imgText: a
|
|
1148
|
-
}) => {
|
|
1149
|
-
const o = ge(() => {
|
|
973
|
+
const mr = /* @__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__ */ R("g", { xmlns: "http://www.w3.org/2000/svg", children: [
|
|
974
|
+
/* @__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" }),
|
|
975
|
+
/* @__PURE__ */ l("circle", { cx: "270.1", cy: "56.3", r: "56.3" })
|
|
976
|
+
] }) }), gr = ({ onClick: e }) => /* @__PURE__ */ l(ae, { onClick: e, className: "mapLegendToggleContainer", children: /* @__PURE__ */ l(Te, { icon: mr, className: "mapLegendIcon" }) }), fr = ({ legend: { legendImg: e, legendDoc: n, layer: t }, docText: i, imgText: a }) => {
|
|
977
|
+
const r = me(() => {
|
|
1150
978
|
window.open(e, "_blank");
|
|
1151
979
|
}, [e]);
|
|
1152
|
-
|
|
1153
|
-
window.open(
|
|
1154
|
-
}, [
|
|
1155
|
-
const d =
|
|
1156
|
-
const C = /* @__PURE__ */ l(ae, { className: "layerNameContainer", children: /* @__PURE__ */ l(
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
) });
|
|
1164
|
-
return (t ?? "").length > 15 ? /* @__PURE__ */ l(je, { content: t, children: C }) : C;
|
|
1165
|
-
}, [t]), u = ge(() => [
|
|
1166
|
-
typeof e == "string" && /* @__PURE__ */ l(
|
|
1167
|
-
"a",
|
|
1168
|
-
{
|
|
1169
|
-
className: "legendAction",
|
|
1170
|
-
href: e,
|
|
1171
|
-
target: "_blank",
|
|
1172
|
-
rel: "noreferrer",
|
|
1173
|
-
children: a
|
|
1174
|
-
}
|
|
1175
|
-
),
|
|
1176
|
-
typeof i == "string" && /* @__PURE__ */ l(
|
|
1177
|
-
"a",
|
|
1178
|
-
{
|
|
1179
|
-
className: "legendAction",
|
|
1180
|
-
href: i,
|
|
1181
|
-
target: "_blank",
|
|
1182
|
-
rel: "noreferrer",
|
|
1183
|
-
children: n
|
|
1184
|
-
}
|
|
1185
|
-
)
|
|
1186
|
-
], [e, a, i, n]);
|
|
1187
|
-
return /* @__PURE__ */ D(ae, { className: "mapLegend", children: [
|
|
980
|
+
me(() => {
|
|
981
|
+
window.open(n, "_blank");
|
|
982
|
+
}, [n]);
|
|
983
|
+
const d = me(() => {
|
|
984
|
+
const C = /* @__PURE__ */ l(ae, { className: "layerNameContainer", children: /* @__PURE__ */ l("h3", { style: { maxWidth: `${15}ch` }, className: "layerName", children: t }) });
|
|
985
|
+
return (t ?? "").length > 15 ? /* @__PURE__ */ l(Ke, { content: t, children: C }) : C;
|
|
986
|
+
}, [t]), h = me(() => [
|
|
987
|
+
typeof e == "string" && /* @__PURE__ */ l("a", { className: "legendAction", href: e, target: "_blank", rel: "noreferrer", children: a }),
|
|
988
|
+
typeof n == "string" && /* @__PURE__ */ l("a", { className: "legendAction", href: n, target: "_blank", rel: "noreferrer", children: i })
|
|
989
|
+
], [e, a, n, i]);
|
|
990
|
+
return /* @__PURE__ */ R(ae, { className: "mapLegend", children: [
|
|
1188
991
|
d(),
|
|
1189
|
-
/* @__PURE__ */ l(
|
|
1190
|
-
|
|
1191
|
-
{
|
|
1192
|
-
alt: "Map Legend",
|
|
1193
|
-
className: "legendImg",
|
|
1194
|
-
src: e,
|
|
1195
|
-
onClick: o
|
|
1196
|
-
}
|
|
1197
|
-
),
|
|
1198
|
-
/* @__PURE__ */ l(ae, { className: "legendActionsContainer", children: u() })
|
|
992
|
+
/* @__PURE__ */ l("img", { alt: "Map Legend", className: "legendImg", src: e, onClick: r }),
|
|
993
|
+
/* @__PURE__ */ l(ae, { className: "legendActionsContainer", children: h() })
|
|
1199
994
|
] });
|
|
1200
|
-
},
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
}) => {
|
|
1205
|
-
const a = ge(() => /* @__PURE__ */ l(ae, { className: "noLegendsContainer", children: /* @__PURE__ */ l("h2", { className: "noLegendsMsg", children: n }) }), [n]), o = ge(() => e.length ? e.map((d, u) => /* @__PURE__ */ l(
|
|
1206
|
-
cr,
|
|
1207
|
-
{
|
|
1208
|
-
legend: d,
|
|
1209
|
-
docText: i,
|
|
1210
|
-
imgText: t
|
|
1211
|
-
},
|
|
1212
|
-
`${d.layer}_${u}`
|
|
1213
|
-
)) : a(), [e]);
|
|
1214
|
-
return /* @__PURE__ */ l(ae, { className: "mapLegendsList", children: o() });
|
|
1215
|
-
}, ur = ({
|
|
995
|
+
}, yr = ({ legends: e, actionsTexts: { docText: n, imgText: t }, noLegendsText: i }) => {
|
|
996
|
+
const a = me(() => /* @__PURE__ */ l(ae, { className: "noLegendsContainer", children: /* @__PURE__ */ l("h2", { className: "noLegendsMsg", children: i }) }), [i]), r = me(() => e.length ? e.map((d, h) => /* @__PURE__ */ l(fr, { legend: d, docText: n, imgText: t }, `${d.layer}_${h}`)) : a(), [e]);
|
|
997
|
+
return /* @__PURE__ */ l(ae, { className: "mapLegendsList", children: r() });
|
|
998
|
+
}, vr = ({
|
|
1216
999
|
isOpen: e,
|
|
1217
|
-
toggleSidebar:
|
|
1000
|
+
toggleSidebar: n,
|
|
1218
1001
|
title: t = "Map Legends",
|
|
1219
|
-
noLegendsText:
|
|
1002
|
+
noLegendsText: i = "No legends to display...",
|
|
1220
1003
|
actionsTexts: a = { docText: "Docs", imgText: "View Image" },
|
|
1221
|
-
legends:
|
|
1222
|
-
}) => e ? /* @__PURE__ */
|
|
1223
|
-
|
|
1224
|
-
{
|
|
1225
|
-
className: "
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
/* @__PURE__ */ l(pi, { className: "sidebarHeaderContainer", children: /* @__PURE__ */ l(mi, { className: "sidebarTitle", children: t }) }),
|
|
1231
|
-
/* @__PURE__ */ D(gi, { className: "sidebarContent", children: [
|
|
1232
|
-
/* @__PURE__ */ l(
|
|
1233
|
-
be,
|
|
1234
|
-
{
|
|
1235
|
-
onClick: i,
|
|
1236
|
-
className: "mapLegendCloseBtn",
|
|
1237
|
-
icon: { icon: "close", size: "small" }
|
|
1238
|
-
}
|
|
1239
|
-
),
|
|
1240
|
-
/* @__PURE__ */ l(
|
|
1241
|
-
dr,
|
|
1242
|
-
{
|
|
1243
|
-
noLegendsText: n,
|
|
1244
|
-
legends: o,
|
|
1245
|
-
actionsTexts: a
|
|
1246
|
-
}
|
|
1247
|
-
)
|
|
1248
|
-
] })
|
|
1249
|
-
]
|
|
1250
|
-
}
|
|
1251
|
-
) : null, Rt = (e, i, t) => {
|
|
1252
|
-
let n;
|
|
1004
|
+
legends: r = []
|
|
1005
|
+
}) => e ? /* @__PURE__ */ R(En, { className: "mapLegendSidebarContainer", modal: !1, dismissible: !0, open: e, children: [
|
|
1006
|
+
/* @__PURE__ */ l(Cn, { className: "sidebarHeaderContainer", children: /* @__PURE__ */ l(wn, { className: "sidebarTitle", children: t }) }),
|
|
1007
|
+
/* @__PURE__ */ R(bn, { className: "sidebarContent", children: [
|
|
1008
|
+
/* @__PURE__ */ l(Te, { onClick: n, className: "mapLegendCloseBtn", icon: { icon: "close", size: "small" } }),
|
|
1009
|
+
/* @__PURE__ */ l(yr, { noLegendsText: i, legends: r, actionsTexts: a })
|
|
1010
|
+
] })
|
|
1011
|
+
] }) : null, zt = (e, n, t) => {
|
|
1012
|
+
let i;
|
|
1253
1013
|
if (e.scene.mode !== ye.SCENE2D)
|
|
1254
|
-
|
|
1014
|
+
i = e.scene.pickPosition(new _e(n, t));
|
|
1255
1015
|
else {
|
|
1256
1016
|
const a = e.scene.globe.ellipsoid;
|
|
1257
|
-
|
|
1017
|
+
i = e.camera.pickEllipsoid(new _e(n, t), a);
|
|
1258
1018
|
}
|
|
1259
|
-
return
|
|
1260
|
-
},
|
|
1261
|
-
const
|
|
1019
|
+
return Ne.fromCartesian(i);
|
|
1020
|
+
}, Er = (e, n, t) => {
|
|
1021
|
+
const i = zt(e, n, t);
|
|
1262
1022
|
return {
|
|
1263
1023
|
type: "Feature",
|
|
1264
1024
|
properties: {},
|
|
1265
1025
|
geometry: {
|
|
1266
1026
|
type: "Point",
|
|
1267
|
-
coordinates: [
|
|
1268
|
-
le.toDegrees(n.longitude),
|
|
1269
|
-
le.toDegrees(n.latitude)
|
|
1270
|
-
]
|
|
1027
|
+
coordinates: [le.toDegrees(i.longitude), le.toDegrees(i.latitude)]
|
|
1271
1028
|
}
|
|
1272
1029
|
};
|
|
1273
|
-
},
|
|
1030
|
+
}, Cr = (e, n, t) => {
|
|
1274
1031
|
try {
|
|
1275
|
-
const
|
|
1032
|
+
const i = zt(e, n, t);
|
|
1276
1033
|
return {
|
|
1277
|
-
longitude: le.toDegrees(
|
|
1278
|
-
latitude: le.toDegrees(
|
|
1034
|
+
longitude: le.toDegrees(i.longitude),
|
|
1035
|
+
latitude: le.toDegrees(i.latitude)
|
|
1279
1036
|
};
|
|
1280
1037
|
} catch {
|
|
1281
1038
|
return;
|
|
1282
1039
|
}
|
|
1283
|
-
},
|
|
1284
|
-
const
|
|
1285
|
-
for (let a = 3; a <
|
|
1286
|
-
if (
|
|
1040
|
+
}, ue = document.createElement("canvas"), te = ue.getContext("2d"), pt = (e) => {
|
|
1041
|
+
const i = (e == null ? void 0 : e.data) ?? [];
|
|
1042
|
+
for (let a = 3; a < i.length; a += 4)
|
|
1043
|
+
if (i[a] < 255)
|
|
1287
1044
|
return !0;
|
|
1288
1045
|
return !1;
|
|
1289
|
-
},
|
|
1046
|
+
}, wr = async (e, n) => (n && n.tileTransparencyCheckedCounter++, new Promise((t, i) => {
|
|
1290
1047
|
try {
|
|
1291
|
-
te == null || te.clearRect(0, 0,
|
|
1048
|
+
te == null || te.clearRect(0, 0, ue.width, ue.height);
|
|
1292
1049
|
let a;
|
|
1293
1050
|
if (e instanceof HTMLImageElement)
|
|
1294
1051
|
a = e;
|
|
1295
1052
|
else if (e instanceof ImageBitmap) {
|
|
1296
|
-
|
|
1297
|
-
const
|
|
1298
|
-
|
|
1299
|
-
0,
|
|
1300
|
-
de.width,
|
|
1301
|
-
de.height
|
|
1302
|
-
), d = ht(o);
|
|
1303
|
-
d && i && (i.tileTransparencyCheckedCounter = i.maxTilesForTransparencyCheck), t(d);
|
|
1053
|
+
ue.width = e.width, ue.height = e.height, te == null || te.drawImage(e, 0, 0);
|
|
1054
|
+
const r = te == null ? void 0 : te.getImageData(0, 0, ue.width, ue.height), d = pt(r);
|
|
1055
|
+
d && n && (n.tileTransparencyCheckedCounter = n.maxTilesForTransparencyCheck), t(d);
|
|
1304
1056
|
return;
|
|
1305
1057
|
} else
|
|
1306
1058
|
a = new Image(), a.crossOrigin = "anonymous", a.src = e;
|
|
1307
1059
|
a.onload = () => {
|
|
1308
|
-
|
|
1309
|
-
const
|
|
1310
|
-
|
|
1311
|
-
0,
|
|
1312
|
-
de.width,
|
|
1313
|
-
de.height
|
|
1314
|
-
);
|
|
1315
|
-
ht(o) ? (i && (i.tileTransparencyCheckedCounter = i.maxTilesForTransparencyCheck), t(!0)) : t(!1);
|
|
1060
|
+
ue.width = a.width, ue.height = a.height, te == null || te.drawImage(a, 0, 0);
|
|
1061
|
+
const r = te == null ? void 0 : te.getImageData(0, 0, ue.width, ue.height);
|
|
1062
|
+
pt(r) ? (n && (n.tileTransparencyCheckedCounter = n.maxTilesForTransparencyCheck), t(!0)) : t(!1);
|
|
1316
1063
|
};
|
|
1317
1064
|
} catch (a) {
|
|
1318
|
-
console.error("Could not determine image transparency. Error => ", a),
|
|
1065
|
+
console.error("Could not determine image transparency. Error => ", a), i(a);
|
|
1319
1066
|
}
|
|
1320
|
-
})),
|
|
1321
|
-
const { west: t, east:
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
south: C
|
|
1326
|
-
} = i;
|
|
1327
|
-
return t >= d && n <= u && a <= v && o >= C;
|
|
1328
|
-
}, Ne = 3, De = "hasTransparency";
|
|
1329
|
-
function tt(e, i, t, n, a) {
|
|
1067
|
+
})), ke = (e, n) => {
|
|
1068
|
+
const { west: t, east: i, north: a, south: r } = e, { west: d, east: h, north: v, south: C } = n;
|
|
1069
|
+
return t >= d && i <= h && a <= v && r >= C;
|
|
1070
|
+
}, Fe = 3, Re = "hasTransparency";
|
|
1071
|
+
function nt(e, n, t, i, a) {
|
|
1330
1072
|
return setTimeout(() => {
|
|
1331
|
-
var
|
|
1332
|
-
const
|
|
1073
|
+
var h;
|
|
1074
|
+
const r = (h = this.layerListInstance.find(
|
|
1333
1075
|
/* eslint-disable */
|
|
1334
1076
|
(v) => {
|
|
1335
1077
|
var C, S;
|
|
1336
1078
|
return ((C = v._imageryProvider._resource) == null ? void 0 : C._url) === ((S = this._resource) == null ? void 0 : S._url);
|
|
1337
1079
|
}
|
|
1338
1080
|
/* eslint-enable */
|
|
1339
|
-
)) == null ? void 0 :
|
|
1340
|
-
this.tileTransparencyCheckedCounter <
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
);
|
|
1350
|
-
}, 0), e(i, t, n, a);
|
|
1081
|
+
)) == null ? void 0 : h.meta, d = Q(r, Re) === !0;
|
|
1082
|
+
this.tileTransparencyCheckedCounter < Fe && !d && wr(a == null ? void 0 : a.url, this).then((v) => {
|
|
1083
|
+
var C;
|
|
1084
|
+
(C = this.mapViewer.layersManager) == null || C.addMetaToLayer(
|
|
1085
|
+
{ [Re]: v },
|
|
1086
|
+
/* eslint-disable */
|
|
1087
|
+
(S) => S._imageryProvider._resource._url === this._resource._url
|
|
1088
|
+
);
|
|
1089
|
+
});
|
|
1090
|
+
}, 0), e(n, t, i, a);
|
|
1351
1091
|
}
|
|
1352
|
-
class
|
|
1353
|
-
constructor(t,
|
|
1092
|
+
class $t extends Je {
|
|
1093
|
+
constructor(t, i) {
|
|
1354
1094
|
var a;
|
|
1355
1095
|
super(t);
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
this.layerListInstance = (a =
|
|
1096
|
+
X(this, "layerListInstance");
|
|
1097
|
+
X(this, "mapViewer");
|
|
1098
|
+
X(this, "maxTilesForTransparencyCheck", Fe);
|
|
1099
|
+
X(this, "tileTransparencyCheckedCounter", 0);
|
|
1100
|
+
this.layerListInstance = (a = i.layersManager) == null ? void 0 : a.layerList, this.mapViewer = i;
|
|
1361
1101
|
}
|
|
1362
|
-
requestImage(t,
|
|
1363
|
-
return
|
|
1364
|
-
this,
|
|
1365
|
-
super.requestImage.bind(this),
|
|
1366
|
-
t,
|
|
1367
|
-
n,
|
|
1368
|
-
a,
|
|
1369
|
-
o
|
|
1370
|
-
);
|
|
1102
|
+
requestImage(t, i, a, r) {
|
|
1103
|
+
return nt.call(this, super.requestImage.bind(this), t, i, a, r);
|
|
1371
1104
|
}
|
|
1372
1105
|
}
|
|
1373
|
-
class
|
|
1374
|
-
constructor(t,
|
|
1106
|
+
class Ut extends Qe {
|
|
1107
|
+
constructor(t, i) {
|
|
1375
1108
|
var a;
|
|
1376
1109
|
super(t);
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
this.layerListInstance = (a =
|
|
1110
|
+
X(this, "layerListInstance");
|
|
1111
|
+
X(this, "mapViewer");
|
|
1112
|
+
X(this, "maxTilesForTransparencyCheck", Fe);
|
|
1113
|
+
X(this, "tileTransparencyCheckedCounter", 0);
|
|
1114
|
+
this.layerListInstance = (a = i.layersManager) == null ? void 0 : a.layerList, this.mapViewer = i;
|
|
1382
1115
|
}
|
|
1383
|
-
requestImage(t,
|
|
1384
|
-
return
|
|
1385
|
-
this,
|
|
1386
|
-
super.requestImage.bind(this),
|
|
1387
|
-
t,
|
|
1388
|
-
n,
|
|
1389
|
-
a,
|
|
1390
|
-
o
|
|
1391
|
-
);
|
|
1116
|
+
requestImage(t, i, a, r) {
|
|
1117
|
+
return nt.call(this, super.requestImage.bind(this), t, i, a, r);
|
|
1392
1118
|
}
|
|
1393
1119
|
}
|
|
1394
|
-
class
|
|
1395
|
-
constructor(t,
|
|
1120
|
+
class Wt extends et {
|
|
1121
|
+
constructor(t, i) {
|
|
1396
1122
|
var a;
|
|
1397
1123
|
super(t);
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
this.layerListInstance = (a =
|
|
1124
|
+
X(this, "layerListInstance");
|
|
1125
|
+
X(this, "mapViewer");
|
|
1126
|
+
X(this, "maxTilesForTransparencyCheck", Fe);
|
|
1127
|
+
X(this, "tileTransparencyCheckedCounter", 0);
|
|
1128
|
+
this.layerListInstance = (a = i.layersManager) == null ? void 0 : a.layerList, this.mapViewer = i;
|
|
1403
1129
|
}
|
|
1404
|
-
requestImage(t,
|
|
1405
|
-
return
|
|
1406
|
-
this,
|
|
1407
|
-
super.requestImage.bind(this),
|
|
1408
|
-
t,
|
|
1409
|
-
n,
|
|
1410
|
-
a,
|
|
1411
|
-
o
|
|
1412
|
-
);
|
|
1130
|
+
requestImage(t, i, a, r) {
|
|
1131
|
+
return nt.call(this, super.requestImage.bind(this), t, i, a, r);
|
|
1413
1132
|
}
|
|
1414
1133
|
}
|
|
1415
|
-
const
|
|
1416
|
-
class
|
|
1417
|
-
constructor(
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1134
|
+
const br = 1, Tr = -1, mt = "TRANSPARENT_BASE_LAYER";
|
|
1135
|
+
class _r {
|
|
1136
|
+
constructor(n, t, i, a) {
|
|
1137
|
+
X(this, "mapViewer");
|
|
1138
|
+
X(this, "legendsList");
|
|
1139
|
+
X(this, "layerUpdated");
|
|
1140
|
+
X(this, "layers");
|
|
1141
|
+
X(this, "legendsExtractor");
|
|
1142
|
+
X(this, "layerManagerFootprintMetaFieldPath");
|
|
1143
|
+
this.mapViewer = n, this.layers = this.mapViewer.imageryLayers._layers, this.legendsList = [], this.legendsExtractor = t, this.layerUpdated = new Zn(), this.layerManagerFootprintMetaFieldPath = a, i && this.layerUpdated.addEventListener(i, this), this.mapViewer.shouldOptimizedTileRequests && (this.layerUpdated.addEventListener((r) => {
|
|
1144
|
+
const d = Object.keys(r);
|
|
1145
|
+
d.length === 1 && d[0] === Re && (this.markRelevantLayersForExtent(), this.hideNonRelevantLayers());
|
|
1426
1146
|
}), this.mapViewer.imageryLayers.layerRemoved.addEventListener(() => {
|
|
1427
1147
|
this.setLegends(), this.markRelevantLayersForExtent(), this.hideNonRelevantLayers();
|
|
1428
1148
|
}), this.mapViewer.imageryLayers.layerMoved.addEventListener(() => {
|
|
@@ -1436,54 +1156,45 @@ class yr {
|
|
|
1436
1156
|
get layerList() {
|
|
1437
1157
|
return this.layers;
|
|
1438
1158
|
}
|
|
1439
|
-
|
|
1440
|
-
addMetaToLayer(
|
|
1441
|
-
const
|
|
1442
|
-
|
|
1159
|
+
// It's a general place to extend layer's data. Should be done when all providers(different types) are initialized
|
|
1160
|
+
addMetaToLayer(n, t) {
|
|
1161
|
+
const i = this.layers.map((a) => a.imageryProvider.readyPromise);
|
|
1162
|
+
Promise.all(i).then((a) => {
|
|
1163
|
+
const r = this.layers.find(t);
|
|
1164
|
+
r && (r.meta = { ...r.meta ?? {}, ...n }, this.setLegends(), this.layerUpdated.raiseEvent(n));
|
|
1165
|
+
});
|
|
1443
1166
|
}
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
).forEach((n, a) => {
|
|
1449
|
-
this.addRasterLayer(n, a, i.id);
|
|
1450
|
-
}), this.mapViewer.shouldOptimizedTileRequests && (this.removeLayer(pt), this.addTransparentImageryProvider());
|
|
1167
|
+
setBaseMapLayers(n) {
|
|
1168
|
+
n.baseRasteLayers.sort((i, a) => i.zIndex - a.zIndex).forEach((i, a) => {
|
|
1169
|
+
this.addRasterLayer(i, a, n.id);
|
|
1170
|
+
}), this.mapViewer.shouldOptimizedTileRequests && (this.removeLayer(mt), this.addTransparentImageryProvider());
|
|
1451
1171
|
}
|
|
1452
|
-
addRasterLayer(
|
|
1172
|
+
addRasterLayer(n, t, i) {
|
|
1453
1173
|
let a;
|
|
1454
|
-
switch (
|
|
1174
|
+
switch (n.type) {
|
|
1455
1175
|
case "XYZ_LAYER": {
|
|
1456
|
-
const
|
|
1457
|
-
a = this.mapViewer.imageryLayers.addImageryProvider(
|
|
1458
|
-
d,
|
|
1459
|
-
t
|
|
1460
|
-
);
|
|
1176
|
+
const r = n.options, d = this.mapViewer.shouldOptimizedTileRequests ? new $t(r, this.mapViewer) : new Je(r);
|
|
1177
|
+
a = this.mapViewer.imageryLayers.addImageryProvider(d, t);
|
|
1461
1178
|
break;
|
|
1462
1179
|
}
|
|
1463
1180
|
case "WMS_LAYER": {
|
|
1464
|
-
const
|
|
1465
|
-
a = this.mapViewer.imageryLayers.addImageryProvider(
|
|
1466
|
-
d,
|
|
1467
|
-
t
|
|
1468
|
-
);
|
|
1181
|
+
const r = n.options, d = this.mapViewer.shouldOptimizedTileRequests ? new Ut(r, this.mapViewer) : new Qe(r);
|
|
1182
|
+
a = this.mapViewer.imageryLayers.addImageryProvider(d, t);
|
|
1469
1183
|
break;
|
|
1470
1184
|
}
|
|
1471
1185
|
case "WMTS_LAYER": {
|
|
1472
|
-
const
|
|
1473
|
-
a = this.mapViewer.imageryLayers.addImageryProvider(
|
|
1474
|
-
d,
|
|
1475
|
-
t
|
|
1476
|
-
);
|
|
1186
|
+
const r = n.options, d = this.mapViewer.shouldOptimizedTileRequests ? new Wt(r, this.mapViewer) : new et(r);
|
|
1187
|
+
a = this.mapViewer.imageryLayers.addImageryProvider(d, t);
|
|
1477
1188
|
break;
|
|
1478
1189
|
}
|
|
1479
1190
|
}
|
|
1480
|
-
a && (a.alpha =
|
|
1481
|
-
parentBasetMapId:
|
|
1482
|
-
...
|
|
1483
|
-
},
|
|
1191
|
+
a && (a.alpha = n.opacity, a.meta = {
|
|
1192
|
+
parentBasetMapId: i,
|
|
1193
|
+
...n
|
|
1194
|
+
}, n.show !== void 0 && (a.show = n.show));
|
|
1484
1195
|
}
|
|
1485
|
-
removeLayer(
|
|
1486
|
-
const t = this.findLayerById(
|
|
1196
|
+
removeLayer(n) {
|
|
1197
|
+
const t = this.findLayerById(n);
|
|
1487
1198
|
t && this.mapViewer.imageryLayers.remove(t, !0);
|
|
1488
1199
|
}
|
|
1489
1200
|
removeBaseMapLayers() {
|
|
@@ -1497,87 +1208,82 @@ class yr {
|
|
|
1497
1208
|
this.mapViewer.imageryLayers.remove(t, !0);
|
|
1498
1209
|
});
|
|
1499
1210
|
}
|
|
1500
|
-
raise(
|
|
1501
|
-
const
|
|
1502
|
-
if (
|
|
1503
|
-
for (let
|
|
1504
|
-
this.mapViewer.imageryLayers.raise(
|
|
1505
|
-
this.updateLayersOrder(
|
|
1211
|
+
raise(n, t = 1) {
|
|
1212
|
+
const i = this.findLayerById(n), a = (i == null ? void 0 : i.meta).zIndex;
|
|
1213
|
+
if (i)
|
|
1214
|
+
for (let r = 0; r < t; r++)
|
|
1215
|
+
this.mapViewer.imageryLayers.raise(i);
|
|
1216
|
+
this.updateLayersOrder(n, a, a + t);
|
|
1506
1217
|
}
|
|
1507
|
-
lower(
|
|
1508
|
-
const
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
this.mapViewer.imageryLayers.lower(n);
|
|
1514
|
-
this.updateLayersOrder(i, a, a - t);
|
|
1218
|
+
lower(n, t = 1) {
|
|
1219
|
+
const i = this.findLayerById(n), a = (i == null ? void 0 : i.meta).zIndex, r = this.getBaseLayersCount(), d = this.mapViewer.imageryLayers.indexOf(i);
|
|
1220
|
+
if (d - t <= r && (t = d - r), i)
|
|
1221
|
+
for (let h = 0; h < t; h++)
|
|
1222
|
+
this.mapViewer.imageryLayers.lower(i);
|
|
1223
|
+
this.updateLayersOrder(n, a, a - t);
|
|
1515
1224
|
}
|
|
1516
|
-
raiseToTop(
|
|
1517
|
-
const t = this.findLayerById(
|
|
1518
|
-
t && this.mapViewer.imageryLayers.raiseToTop(t), this.updateLayersOrder(
|
|
1519
|
-
i,
|
|
1520
|
-
n,
|
|
1521
|
-
this.mapViewer.imageryLayers.length - this.getBaseLayersCount() - 1
|
|
1522
|
-
);
|
|
1225
|
+
raiseToTop(n) {
|
|
1226
|
+
const t = this.findLayerById(n), i = (t == null ? void 0 : t.meta).zIndex;
|
|
1227
|
+
t && this.mapViewer.imageryLayers.raiseToTop(t), this.updateLayersOrder(n, i, this.mapViewer.imageryLayers.length - this.getBaseLayersCount() - 1);
|
|
1523
1228
|
}
|
|
1524
|
-
lowerToBottom(
|
|
1525
|
-
const t = this.findLayerById(
|
|
1526
|
-
|
|
1527
|
-
);
|
|
1528
|
-
this.lower(i, a - n);
|
|
1229
|
+
lowerToBottom(n) {
|
|
1230
|
+
const t = this.findLayerById(n), i = this.getBaseLayersCount(), a = this.mapViewer.imageryLayers.indexOf(t);
|
|
1231
|
+
this.lower(n, a - i);
|
|
1529
1232
|
}
|
|
1530
1233
|
length() {
|
|
1531
1234
|
return this.mapViewer.imageryLayers.length;
|
|
1532
1235
|
}
|
|
1533
|
-
show(
|
|
1534
|
-
const
|
|
1535
|
-
|
|
1236
|
+
show(n, t) {
|
|
1237
|
+
const i = this.get(n);
|
|
1238
|
+
i !== void 0 && (i.show = t);
|
|
1536
1239
|
}
|
|
1537
|
-
showAllNotBase(
|
|
1538
|
-
this.layers.filter((
|
|
1240
|
+
showAllNotBase(n) {
|
|
1241
|
+
this.layers.filter((i) => !Q(i.meta, "parentBasetMapId")).forEach((i) => {
|
|
1539
1242
|
var a;
|
|
1540
|
-
this.show((a =
|
|
1243
|
+
this.show((a = i.meta) == null ? void 0 : a.id, n);
|
|
1541
1244
|
});
|
|
1542
1245
|
}
|
|
1543
|
-
get(
|
|
1544
|
-
const t = this.findLayerById(
|
|
1545
|
-
|
|
1546
|
-
);
|
|
1547
|
-
return n ? this.mapViewer.imageryLayers.get(n) : void 0;
|
|
1246
|
+
get(n) {
|
|
1247
|
+
const t = this.findLayerById(n), i = this.mapViewer.imageryLayers.indexOf(t);
|
|
1248
|
+
return i ? this.mapViewer.imageryLayers.get(i) : void 0;
|
|
1548
1249
|
}
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1250
|
+
pickImageryLayers(n) {
|
|
1251
|
+
var a;
|
|
1252
|
+
const t = this.mapViewer.camera.getPickRay(n);
|
|
1253
|
+
let i;
|
|
1254
|
+
return t && (i = (a = this.mapViewer.imageryLayers.pickImageryLayers(t, this.mapViewer.scene)) == null ? void 0 : a.filter((r) => !Q(r.meta, "parentBasetMapId"))), i;
|
|
1255
|
+
}
|
|
1256
|
+
findLayerByPOI(n, t) {
|
|
1257
|
+
if (this.layerManagerFootprintMetaFieldPath) {
|
|
1258
|
+
const i = Er(this.mapViewer, n, t);
|
|
1259
|
+
return this.layers.filter((d) => !Q(d.meta, "parentBasetMapId")).filter((d) => {
|
|
1260
|
+
const h = Q(d.meta, this.layerManagerFootprintMetaFieldPath);
|
|
1261
|
+
return h !== void 0 ? fi(i.geometry, {
|
|
1262
|
+
type: "Feature",
|
|
1263
|
+
properties: {},
|
|
1264
|
+
geometry: h
|
|
1265
|
+
}) && d.show : (console.warn("[LayerManager] [findLayerByPOI] CesiumImageryLayer has no defined footprint", d.meta), !1);
|
|
1266
|
+
}).sort((d, h) => {
|
|
1267
|
+
var v, C;
|
|
1268
|
+
return ((v = h.meta) == null ? void 0 : v.zIndex) - ((C = d.meta) == null ? void 0 : C.zIndex);
|
|
1269
|
+
});
|
|
1270
|
+
} else
|
|
1271
|
+
return console.warn("[LayerManager] [findLayerByPOI]layerManagerFootprintMetaFieldPath is not defined"), [];
|
|
1562
1272
|
}
|
|
1563
1273
|
addTransparentImageryProvider() {
|
|
1564
|
-
const
|
|
1565
|
-
new
|
|
1274
|
+
const n = this.mapViewer.imageryLayers.addImageryProvider(
|
|
1275
|
+
new Jn({
|
|
1566
1276
|
url: "./assets/img/transparent-tile.png",
|
|
1567
1277
|
/* eslint-disable @typescript-eslint/no-magic-numbers */
|
|
1568
|
-
rectangle: new
|
|
1569
|
-
-3.141592653589793,
|
|
1570
|
-
-1.5707963267948966,
|
|
1571
|
-
3.141592653589793,
|
|
1572
|
-
1.5707963267948966
|
|
1573
|
-
)
|
|
1278
|
+
rectangle: new we(-3.141592653589793, -1.5707963267948966, 3.141592653589793, 1.5707963267948966)
|
|
1574
1279
|
/* eslint-enable @typescript-eslint/no-magic-numbers */
|
|
1575
1280
|
}),
|
|
1576
1281
|
0
|
|
1577
1282
|
);
|
|
1578
|
-
|
|
1579
|
-
id:
|
|
1580
|
-
skipRelevancyCheck: !0
|
|
1283
|
+
n.meta = {
|
|
1284
|
+
id: mt,
|
|
1285
|
+
skipRelevancyCheck: !0,
|
|
1286
|
+
parentBasetMapId: "TRANSPARENT_LAYER"
|
|
1581
1287
|
};
|
|
1582
1288
|
}
|
|
1583
1289
|
setLegends() {
|
|
@@ -1586,82 +1292,82 @@ class yr {
|
|
|
1586
1292
|
getBaseLayersCount() {
|
|
1587
1293
|
return this.layers.filter((t) => !!Q(t.meta, "parentBasetMapId")).length;
|
|
1588
1294
|
}
|
|
1589
|
-
findLayerById(
|
|
1590
|
-
return this.layers.find((t) => t.meta !== void 0 ? t.meta.id ===
|
|
1295
|
+
findLayerById(n) {
|
|
1296
|
+
return this.layers.find((t) => t.meta !== void 0 ? t.meta.id === n : !1);
|
|
1591
1297
|
}
|
|
1592
|
-
updateLayersOrder(
|
|
1593
|
-
const a = t >
|
|
1594
|
-
this.layers.forEach((
|
|
1298
|
+
updateLayersOrder(n, t, i) {
|
|
1299
|
+
const a = t > i ? br : Tr, r = t < i ? t : i, d = t < i ? i : t;
|
|
1300
|
+
this.layers.forEach((h) => {
|
|
1595
1301
|
var C;
|
|
1596
|
-
if (!Q(
|
|
1597
|
-
const S = (C =
|
|
1598
|
-
|
|
1302
|
+
if (!Q(h.meta, "parentBasetMapId")) {
|
|
1303
|
+
const S = (C = h.meta) == null ? void 0 : C.zIndex;
|
|
1304
|
+
h.meta.zIndex = S >= r && S <= d && S !== t ? S + a : S === t ? i : S;
|
|
1599
1305
|
}
|
|
1600
1306
|
});
|
|
1601
1307
|
}
|
|
1602
1308
|
hideNonRelevantLayers() {
|
|
1603
|
-
var
|
|
1604
|
-
for (const
|
|
1605
|
-
((
|
|
1309
|
+
var n, t;
|
|
1310
|
+
for (const i of this.layers)
|
|
1311
|
+
((n = i.meta) == null ? void 0 : n.relevantToExtent) !== i.show && i.imageryProvider.ready && (i.show = ((t = i.meta) == null ? void 0 : t.relevantToExtent) ?? !0);
|
|
1606
1312
|
}
|
|
1607
1313
|
markRelevantLayersForExtent() {
|
|
1608
|
-
var
|
|
1314
|
+
var n, t;
|
|
1609
1315
|
try {
|
|
1610
|
-
const
|
|
1316
|
+
const i = this.mapViewer.camera.computeViewRectangle();
|
|
1611
1317
|
for (let a = this.layers.length - 1; a >= 0; a--) {
|
|
1612
|
-
const
|
|
1613
|
-
for (let
|
|
1614
|
-
if (((
|
|
1615
|
-
|
|
1318
|
+
const r = this.layers[a], d = !qe(i) && !qe(r.rectangle) && we.intersection(i, r.rectangle);
|
|
1319
|
+
for (let h = this.layers.length - 1; h >= a; h--) {
|
|
1320
|
+
if (((n = r.meta) == null ? void 0 : n.skipRelevancyCheck) === !0) {
|
|
1321
|
+
r.meta = { ...r.meta, relevantToExtent: !0 };
|
|
1616
1322
|
continue;
|
|
1617
1323
|
}
|
|
1618
|
-
const v = this.layers[
|
|
1619
|
-
if (
|
|
1620
|
-
if (d instanceof
|
|
1621
|
-
if (
|
|
1622
|
-
if (
|
|
1623
|
-
|
|
1624
|
-
...
|
|
1324
|
+
const v = this.layers[h], C = ((t = v.meta) == null ? void 0 : t[Re]) === !0;
|
|
1325
|
+
if (r !== v)
|
|
1326
|
+
if (d instanceof we) {
|
|
1327
|
+
if (ke(i, r.rectangle))
|
|
1328
|
+
if (ke(i, v.rectangle) && !C) {
|
|
1329
|
+
r.meta = {
|
|
1330
|
+
...r.meta ?? {},
|
|
1625
1331
|
relevantToExtent: !1
|
|
1626
1332
|
};
|
|
1627
1333
|
break;
|
|
1628
1334
|
} else
|
|
1629
|
-
|
|
1630
|
-
...
|
|
1335
|
+
r.meta = {
|
|
1336
|
+
...r.meta ?? {},
|
|
1631
1337
|
relevantToExtent: !0
|
|
1632
1338
|
};
|
|
1633
|
-
if (
|
|
1634
|
-
|
|
1339
|
+
if (ke(i, v.rectangle) && !C) {
|
|
1340
|
+
r.meta = { ...r.meta ?? {}, relevantToExtent: !1 };
|
|
1635
1341
|
break;
|
|
1636
1342
|
}
|
|
1637
|
-
if (
|
|
1638
|
-
if (
|
|
1639
|
-
...
|
|
1343
|
+
if (ke(r.rectangle, v.rectangle)) {
|
|
1344
|
+
if (r.meta = {
|
|
1345
|
+
...r.meta ?? {},
|
|
1640
1346
|
relevantToExtent: C
|
|
1641
1347
|
}, !C)
|
|
1642
1348
|
break;
|
|
1643
1349
|
} else
|
|
1644
|
-
|
|
1350
|
+
r.meta = { ...r.meta ?? {}, relevantToExtent: !0 };
|
|
1645
1351
|
} else
|
|
1646
|
-
|
|
1352
|
+
r.meta = { ...r.meta ?? {}, relevantToExtent: !1 };
|
|
1647
1353
|
else
|
|
1648
|
-
a === this.layers.length - 1 && (
|
|
1649
|
-
...
|
|
1650
|
-
relevantToExtent: d instanceof
|
|
1354
|
+
a === this.layers.length - 1 && (r.meta = {
|
|
1355
|
+
...r.meta ?? {},
|
|
1356
|
+
relevantToExtent: d instanceof we
|
|
1651
1357
|
});
|
|
1652
1358
|
}
|
|
1653
1359
|
}
|
|
1654
|
-
} catch (
|
|
1655
|
-
console.error(
|
|
1360
|
+
} catch (i) {
|
|
1361
|
+
console.error(i);
|
|
1656
1362
|
}
|
|
1657
1363
|
}
|
|
1658
1364
|
}
|
|
1659
|
-
const
|
|
1660
|
-
class
|
|
1661
|
-
constructor(t,
|
|
1662
|
-
super(t,
|
|
1663
|
-
|
|
1664
|
-
|
|
1365
|
+
const gt = 212, ft = 260, Sr = 0;
|
|
1366
|
+
class jo extends Qn {
|
|
1367
|
+
constructor(t, i) {
|
|
1368
|
+
super(t, i);
|
|
1369
|
+
X(this, "layersManager");
|
|
1370
|
+
X(this, "useOptimizedTileRequests");
|
|
1665
1371
|
}
|
|
1666
1372
|
get shouldOptimizedTileRequests() {
|
|
1667
1373
|
return this.useOptimizedTileRequests ?? !1;
|
|
@@ -1670,16 +1376,14 @@ class Ho extends Ki {
|
|
|
1670
1376
|
this.useOptimizedTileRequests = t;
|
|
1671
1377
|
}
|
|
1672
1378
|
}
|
|
1673
|
-
const
|
|
1674
|
-
const e = Pe(
|
|
1379
|
+
const jt = Le(null), Lr = jt.Provider, pe = () => {
|
|
1380
|
+
const e = Pe(jt);
|
|
1675
1381
|
if (e === null)
|
|
1676
1382
|
throw new Error("map context is null, please check the provider");
|
|
1677
1383
|
return e;
|
|
1678
|
-
},
|
|
1679
|
-
var
|
|
1680
|
-
const
|
|
1681
|
-
!1
|
|
1682
|
-
), [c, g] = k(), h = {
|
|
1384
|
+
}, Ko = (e) => {
|
|
1385
|
+
var T, b, w, _, P, H, j, O;
|
|
1386
|
+
const n = ve(null), [t, i] = k(), [a, r] = k(), [d, h] = k(), [v, C] = k(), [S, x] = k(), [L, B] = k(), U = ve(), [K, J] = k(), [G, Y] = k([]), [z, V] = k(), [W, D] = k(!1), $ = ve(), [q, o] = k(void 0), [s, f] = k(!1), [c, g] = k(), u = {
|
|
1683
1387
|
fullscreenButton: !0,
|
|
1684
1388
|
timeline: !1,
|
|
1685
1389
|
animation: !1,
|
|
@@ -1689,67 +1393,55 @@ const Ht = Se(null), Er = Ht.Provider, Cr = 1e4, he = () => {
|
|
|
1689
1393
|
homeButton: !1,
|
|
1690
1394
|
sceneModePicker: !1,
|
|
1691
1395
|
...e
|
|
1692
|
-
}, y = (M,
|
|
1693
|
-
const
|
|
1396
|
+
}, y = (M, A, F, de, oe) => {
|
|
1397
|
+
const ee = t.container, se = ee.clientWidth, Se = ee.clientHeight, Ae = de + oe;
|
|
1694
1398
|
return {
|
|
1695
|
-
left: `${
|
|
1696
|
-
top: `${
|
|
1399
|
+
left: `${se - M < F ? M - (F - (se - M)) : M}px`,
|
|
1400
|
+
top: `${Se - A < Ae ? A - (Ae - (Se - A)) : A}px`
|
|
1697
1401
|
};
|
|
1698
|
-
}
|
|
1402
|
+
}, m = me((M) => {
|
|
1403
|
+
if (n.current !== null) {
|
|
1404
|
+
const A = n.current.cesiumElement, F = { x: M.offsetX, y: M.offsetY };
|
|
1405
|
+
D(!1), o(F), g(Cr(A, F.x, F.y)), D(!0), $.current = M;
|
|
1406
|
+
}
|
|
1407
|
+
}, [n]);
|
|
1699
1408
|
I(() => {
|
|
1700
1409
|
var M;
|
|
1701
|
-
if (
|
|
1702
|
-
const
|
|
1703
|
-
e.imageryContextMenu &&
|
|
1704
|
-
(B) => {
|
|
1705
|
-
const G = B.position;
|
|
1706
|
-
$(!1), r(G), g(
|
|
1707
|
-
pr(x, G.x, G.y)
|
|
1708
|
-
), $(!0);
|
|
1709
|
-
},
|
|
1710
|
-
St.RIGHT_CLICK
|
|
1711
|
-
);
|
|
1410
|
+
if (n.current !== null) {
|
|
1411
|
+
const A = n.current.cesiumElement;
|
|
1412
|
+
e.imageryContextMenu && (A.scene.canvas.removeEventListener("contextmenu", m), A.scene.canvas.addEventListener("contextmenu", m));
|
|
1712
1413
|
}
|
|
1713
|
-
|
|
1714
|
-
}, [
|
|
1414
|
+
i((M = n.current) == null ? void 0 : M.cesiumElement);
|
|
1415
|
+
}, [n, e.imageryContextMenu]), I(() => {
|
|
1715
1416
|
var M;
|
|
1716
|
-
t && (t.shouldOptimizedTileRequests = e.useOptimizedTileRequests ?? !1, t.layersManager = new
|
|
1417
|
+
t && (t.shouldOptimizedTileRequests = e.useOptimizedTileRequests ?? !1, t.layersManager = new _r(
|
|
1717
1418
|
t,
|
|
1718
1419
|
(M = e.legends) == null ? void 0 : M.mapLegendsExtractor,
|
|
1719
1420
|
() => {
|
|
1720
|
-
var
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
}
|
|
1421
|
+
var A;
|
|
1422
|
+
Y((A = t.layersManager) == null ? void 0 : A.legendsList);
|
|
1423
|
+
},
|
|
1424
|
+
e.layerManagerFootprintMetaFieldPath
|
|
1725
1425
|
));
|
|
1726
1426
|
}, [t]), I(() => {
|
|
1727
1427
|
t && (t.shouldOptimizedTileRequests = e.useOptimizedTileRequests ?? !1);
|
|
1728
1428
|
}, [e.useOptimizedTileRequests, t]), I(() => {
|
|
1729
|
-
|
|
1730
|
-
e.sceneModes ?? [
|
|
1731
|
-
ie.SCENE2D,
|
|
1732
|
-
ie.SCENE3D,
|
|
1733
|
-
ie.COLUMBUS_VIEW
|
|
1734
|
-
]
|
|
1735
|
-
);
|
|
1429
|
+
J(e.sceneModes ?? [ne.SCENE2D, ne.SCENE3D, ne.COLUMBUS_VIEW]);
|
|
1736
1430
|
}, [e.sceneModes]), I(() => {
|
|
1737
|
-
var
|
|
1738
|
-
|
|
1739
|
-
const M = (
|
|
1740
|
-
|
|
1741
|
-
);
|
|
1742
|
-
M && t && ((B = t.layersManager) == null || B.setBaseMapLayers(M));
|
|
1431
|
+
var A, F;
|
|
1432
|
+
V(e.baseMaps);
|
|
1433
|
+
const M = (A = e.baseMaps) == null ? void 0 : A.maps.find((de) => de.isCurrent);
|
|
1434
|
+
M && t && ((F = t.layersManager) == null || F.setBaseMapLayers(M));
|
|
1743
1435
|
}, [e.baseMaps, t]), I(() => {
|
|
1744
|
-
|
|
1436
|
+
r(e.projection ?? he.WGS84);
|
|
1745
1437
|
}, [e.projection]), I(() => {
|
|
1746
|
-
|
|
1438
|
+
B(e.locale);
|
|
1747
1439
|
}, [e.locale]), I(() => {
|
|
1748
|
-
|
|
1440
|
+
h(e.showMousePosition ?? !0);
|
|
1749
1441
|
}, [e.showMousePosition]), I(() => {
|
|
1750
1442
|
C(e.showZoomLevel ?? !0);
|
|
1751
1443
|
}, [e.showZoomLevel]), I(() => {
|
|
1752
|
-
|
|
1444
|
+
x(e.showScale ?? !0);
|
|
1753
1445
|
}, [e.showScale]), I(() => {
|
|
1754
1446
|
const M = () => {
|
|
1755
1447
|
if (t === void 0)
|
|
@@ -1758,135 +1450,97 @@ const Ht = Se(null), Er = Ht.Provider, Cr = 1e4, he = () => {
|
|
|
1758
1450
|
latitude: 0,
|
|
1759
1451
|
height: 0
|
|
1760
1452
|
};
|
|
1761
|
-
const
|
|
1762
|
-
const
|
|
1453
|
+
const A = () => {
|
|
1454
|
+
const F = t.camera.positionCartographic;
|
|
1763
1455
|
return {
|
|
1764
|
-
longitude:
|
|
1765
|
-
latitude:
|
|
1766
|
-
height:
|
|
1456
|
+
longitude: xe(F.longitude),
|
|
1457
|
+
latitude: xe(F.latitude),
|
|
1458
|
+
height: F.height
|
|
1767
1459
|
};
|
|
1768
1460
|
};
|
|
1769
1461
|
if (t.scene.mode === ye.SCENE3D) {
|
|
1770
|
-
const
|
|
1462
|
+
const F = new _e(
|
|
1771
1463
|
// eslint-disable-next-line @typescript-eslint/no-magic-numbers
|
|
1772
1464
|
t.container.clientWidth / 2,
|
|
1773
1465
|
// eslint-disable-next-line @typescript-eslint/no-magic-numbers
|
|
1774
1466
|
t.container.clientHeight / 2
|
|
1775
|
-
),
|
|
1776
|
-
pe,
|
|
1777
|
-
t.scene
|
|
1778
|
-
), ee = t.scene.globe.ellipsoid.cartesianToCartographic(
|
|
1779
|
-
ne
|
|
1780
|
-
);
|
|
1467
|
+
), de = t.scene.camera.getPickRay(F), oe = t.scene.globe.pick(de, t.scene), ee = t.scene.globe.ellipsoid.cartesianToCartographic(oe);
|
|
1781
1468
|
return ee !== void 0 ? {
|
|
1782
|
-
longitude:
|
|
1783
|
-
latitude:
|
|
1469
|
+
longitude: xe(ee.longitude),
|
|
1470
|
+
latitude: xe(ee.latitude),
|
|
1784
1471
|
height: t.scene.camera.positionCartographic.height
|
|
1785
|
-
} :
|
|
1472
|
+
} : A();
|
|
1786
1473
|
} else
|
|
1787
|
-
return
|
|
1788
|
-
}
|
|
1789
|
-
|
|
1790
|
-
|
|
1474
|
+
return A();
|
|
1475
|
+
};
|
|
1476
|
+
t && t.camera.moveEnd.addEventListener(() => {
|
|
1477
|
+
if (t.scene.mode !== ye.MORPHING) {
|
|
1478
|
+
const A = t.camera, F = {
|
|
1791
1479
|
position: M(),
|
|
1792
|
-
direction:
|
|
1793
|
-
up:
|
|
1794
|
-
right:
|
|
1795
|
-
transform:
|
|
1796
|
-
frustum:
|
|
1480
|
+
direction: A.direction.clone(),
|
|
1481
|
+
up: A.up.clone(),
|
|
1482
|
+
right: A.right.clone(),
|
|
1483
|
+
transform: A.transform.clone(),
|
|
1484
|
+
frustum: A.frustum.clone()
|
|
1797
1485
|
};
|
|
1798
|
-
|
|
1486
|
+
U.current = F;
|
|
1799
1487
|
}
|
|
1800
|
-
}
|
|
1801
|
-
return () => {
|
|
1802
|
-
clearInterval(x);
|
|
1803
|
-
};
|
|
1488
|
+
});
|
|
1804
1489
|
}, [t]), I(() => {
|
|
1805
1490
|
const M = () => {
|
|
1806
|
-
t &&
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
)
|
|
1812
|
-
|
|
1813
|
-
});
|
|
1491
|
+
if (t && U.current) {
|
|
1492
|
+
const A = U.current;
|
|
1493
|
+
t.camera.flyTo({
|
|
1494
|
+
destination: ge.fromDegrees(A.position.longitude, A.position.latitude, A.position.height),
|
|
1495
|
+
duration: 0
|
|
1496
|
+
});
|
|
1497
|
+
}
|
|
1814
1498
|
};
|
|
1815
1499
|
return t && t.scene.morphComplete.addEventListener(M), () => {
|
|
1816
1500
|
if (t)
|
|
1817
1501
|
try {
|
|
1818
|
-
t.scene.morphComplete.removeEventListener(
|
|
1819
|
-
M
|
|
1820
|
-
);
|
|
1502
|
+
t.scene.morphComplete.removeEventListener(M);
|
|
1821
1503
|
} catch {
|
|
1822
1504
|
console.error("morphCompleteHandler event not cleaned");
|
|
1823
1505
|
}
|
|
1824
1506
|
};
|
|
1825
|
-
}, [t
|
|
1826
|
-
const M = e.zoom,
|
|
1827
|
-
t &&
|
|
1828
|
-
destination:
|
|
1829
|
-
x[0],
|
|
1830
|
-
x[1],
|
|
1831
|
-
Xn(M)
|
|
1832
|
-
),
|
|
1507
|
+
}, [t]), I(() => {
|
|
1508
|
+
const M = e.zoom, A = e.center;
|
|
1509
|
+
t && De(M) && gi(A) && t.camera.flyTo({
|
|
1510
|
+
destination: ge.fromDegrees(A[0], A[1], ir(M)),
|
|
1833
1511
|
duration: 0
|
|
1834
1512
|
});
|
|
1835
1513
|
}, [e.zoom, e.center, t]);
|
|
1836
|
-
const
|
|
1837
|
-
/* @__PURE__ */
|
|
1838
|
-
/* @__PURE__ */
|
|
1839
|
-
/* @__PURE__ */ l(
|
|
1840
|
-
|
|
1841
|
-
{
|
|
1842
|
-
sceneModes: Y,
|
|
1843
|
-
baseMaps: V,
|
|
1844
|
-
locale: L
|
|
1845
|
-
}
|
|
1846
|
-
),
|
|
1847
|
-
/* @__PURE__ */ l(
|
|
1848
|
-
lr,
|
|
1849
|
-
{
|
|
1850
|
-
onClick: () => f(!s)
|
|
1851
|
-
}
|
|
1852
|
-
)
|
|
1514
|
+
const E = me(() => t && Nn(
|
|
1515
|
+
/* @__PURE__ */ R(re, { children: [
|
|
1516
|
+
/* @__PURE__ */ R(ae, { className: "sideToolsContainer", children: [
|
|
1517
|
+
/* @__PURE__ */ l(pr, { sceneModes: K, baseMaps: z, locale: L }),
|
|
1518
|
+
/* @__PURE__ */ l(gr, { onClick: () => f(!s) })
|
|
1853
1519
|
] }),
|
|
1854
|
-
/* @__PURE__ */
|
|
1855
|
-
d === !0 ? /* @__PURE__ */ l(
|
|
1856
|
-
v === !0 ? /* @__PURE__ */ l(
|
|
1857
|
-
S === !0 ? /* @__PURE__ */ l(
|
|
1520
|
+
/* @__PURE__ */ R(ae, { className: "toolsContainer", children: [
|
|
1521
|
+
d === !0 ? /* @__PURE__ */ l(rr, { projection: a }) : /* @__PURE__ */ l(re, {}),
|
|
1522
|
+
v === !0 ? /* @__PURE__ */ l(lr, { locale: L }) : /* @__PURE__ */ l(re, {}),
|
|
1523
|
+
S === !0 ? /* @__PURE__ */ l(sr, { locale: L }) : /* @__PURE__ */ l(re, {})
|
|
1858
1524
|
] })
|
|
1859
1525
|
] }),
|
|
1860
1526
|
document.querySelector(".cesium-viewer")
|
|
1861
|
-
), [
|
|
1862
|
-
|
|
1863
|
-
L,
|
|
1864
|
-
t,
|
|
1865
|
-
a,
|
|
1866
|
-
Y,
|
|
1867
|
-
d,
|
|
1868
|
-
S,
|
|
1869
|
-
s
|
|
1870
|
-
]);
|
|
1871
|
-
return /* @__PURE__ */ l(Oi, { className: "viewer", full: !0, ref: i, ...h, children: /* @__PURE__ */ D(Er, { value: t, children: [
|
|
1527
|
+
), [z, L, t, a, K, d, S, s]);
|
|
1528
|
+
return /* @__PURE__ */ l(Fn, { className: "viewer", full: !0, ref: n, ...u, children: /* @__PURE__ */ R(Lr, { value: t, children: [
|
|
1872
1529
|
/* @__PURE__ */ l(
|
|
1873
|
-
|
|
1530
|
+
vr,
|
|
1874
1531
|
{
|
|
1875
|
-
title: (
|
|
1532
|
+
title: (T = e.legends) == null ? void 0 : T.title,
|
|
1876
1533
|
isOpen: s,
|
|
1877
1534
|
toggleSidebar: () => f(!s),
|
|
1878
|
-
noLegendsText: (
|
|
1879
|
-
legends: ((
|
|
1880
|
-
actionsTexts: (
|
|
1535
|
+
noLegendsText: (b = e.legends) == null ? void 0 : b.emptyText,
|
|
1536
|
+
legends: ((w = e.legends) == null ? void 0 : w.legendsList) ?? G,
|
|
1537
|
+
actionsTexts: (_ = e.legends) == null ? void 0 : _.actionsTexts
|
|
1881
1538
|
}
|
|
1882
1539
|
),
|
|
1883
1540
|
e.children,
|
|
1884
|
-
|
|
1885
|
-
e.imageryContextMenu &&
|
|
1886
|
-
data: (
|
|
1887
|
-
q.x,
|
|
1888
|
-
q.y
|
|
1889
|
-
),
|
|
1541
|
+
E(),
|
|
1542
|
+
e.imageryContextMenu && W && q && c && Ee.cloneElement(e.imageryContextMenu, {
|
|
1543
|
+
data: (P = t == null ? void 0 : t.layersManager) == null ? void 0 : P.findLayerByPOI(q.x, q.y),
|
|
1890
1544
|
position: {
|
|
1891
1545
|
x: q.x,
|
|
1892
1546
|
y: q.y
|
|
@@ -1895,142 +1549,139 @@ const Ht = Se(null), Er = Ht.Provider, Cr = 1e4, he = () => {
|
|
|
1895
1549
|
style: y(
|
|
1896
1550
|
q.x,
|
|
1897
1551
|
q.y,
|
|
1898
|
-
((
|
|
1899
|
-
((
|
|
1900
|
-
((
|
|
1552
|
+
((H = e.imageryContextMenuSize) == null ? void 0 : H.width) ?? ft,
|
|
1553
|
+
((j = e.imageryContextMenuSize) == null ? void 0 : j.height) ?? gt,
|
|
1554
|
+
((O = e.imageryContextMenuSize) == null ? void 0 : O.dynamicHeightIncrement) ?? Sr
|
|
1901
1555
|
),
|
|
1902
1556
|
size: e.imageryContextMenuSize ?? {
|
|
1903
|
-
height:
|
|
1904
|
-
width:
|
|
1557
|
+
height: gt,
|
|
1558
|
+
width: ft
|
|
1905
1559
|
},
|
|
1906
1560
|
handleClose: () => {
|
|
1907
|
-
|
|
1908
|
-
}
|
|
1561
|
+
D(!W);
|
|
1562
|
+
},
|
|
1563
|
+
contextEvt: $.current
|
|
1909
1564
|
})
|
|
1910
1565
|
] }) });
|
|
1911
|
-
},
|
|
1912
|
-
const
|
|
1566
|
+
}, Pr = 0, qo = (e) => {
|
|
1567
|
+
const n = pe();
|
|
1913
1568
|
return /* @__PURE__ */ l(
|
|
1914
|
-
|
|
1569
|
+
Gn,
|
|
1915
1570
|
{
|
|
1916
1571
|
...e,
|
|
1917
1572
|
onReady: (t) => {
|
|
1918
|
-
e.isZoomTo === !0 &&
|
|
1919
|
-
const
|
|
1920
|
-
|
|
1921
|
-
const a =
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
const d = me.fromRadians(
|
|
1926
|
-
a.longitude,
|
|
1927
|
-
a.latitude,
|
|
1928
|
-
a.height
|
|
1929
|
-
), u = me.fromRadians(
|
|
1930
|
-
a.longitude,
|
|
1931
|
-
a.latitude,
|
|
1932
|
-
a.height + o
|
|
1933
|
-
), v = me.subtract(
|
|
1934
|
-
u,
|
|
1935
|
-
d,
|
|
1936
|
-
new me()
|
|
1937
|
-
);
|
|
1938
|
-
t.modelMatrix = qi.fromTranslation(v);
|
|
1573
|
+
e.isZoomTo === !0 && n.zoomTo(t);
|
|
1574
|
+
const i = n.scene;
|
|
1575
|
+
i.globe.depthTestAgainstTerrain = !0;
|
|
1576
|
+
const a = Ne.fromCartesian(t.boundingSphere.center), r = e.heightFromGround ?? Pr;
|
|
1577
|
+
if (r) {
|
|
1578
|
+
const d = ge.fromRadians(a.longitude, a.latitude, a.height), h = ge.fromRadians(a.longitude, a.latitude, a.height + r), v = ge.subtract(h, d, new ge());
|
|
1579
|
+
t.modelMatrix = ei.fromTranslation(v);
|
|
1939
1580
|
}
|
|
1940
1581
|
}
|
|
1941
1582
|
}
|
|
1942
1583
|
);
|
|
1943
|
-
},
|
|
1944
|
-
|
|
1945
|
-
|
|
1584
|
+
}, yt = 180, vt = 1e-3, Et = -1, Ct = (e) => Math.abs(e) / e, wt = (e) => {
|
|
1585
|
+
Math.abs(e[0]) === yt && Math.abs(e[1]) === yt / 2 && (e[0] += Et * Ct(e[0]) * vt, e[1] += Et * Ct(e[1]) * vt);
|
|
1586
|
+
}, Mr = (e) => {
|
|
1587
|
+
switch (e.type) {
|
|
1588
|
+
case "LineString":
|
|
1589
|
+
e.coordinates.forEach((n) => {
|
|
1590
|
+
wt(n);
|
|
1591
|
+
});
|
|
1592
|
+
break;
|
|
1593
|
+
case "Polygon":
|
|
1594
|
+
e.coordinates.forEach((n) => {
|
|
1595
|
+
n.forEach((t) => {
|
|
1596
|
+
wt(t);
|
|
1597
|
+
});
|
|
1598
|
+
});
|
|
1599
|
+
break;
|
|
1600
|
+
}
|
|
1601
|
+
}, Yo = (e) => {
|
|
1602
|
+
var i;
|
|
1603
|
+
const { data: n, ...t } = e;
|
|
1604
|
+
return (i = n == null ? void 0 : n.features) == null || i.forEach((a) => {
|
|
1605
|
+
Mr(a.geometry);
|
|
1606
|
+
}), /* @__PURE__ */ l(Hn, { data: n, ...t });
|
|
1607
|
+
}, Ge = (e) => {
|
|
1608
|
+
const { meta: n, ...t } = e, i = pe();
|
|
1609
|
+
return Jt(() => {
|
|
1946
1610
|
var a;
|
|
1947
|
-
(a =
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
},
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
}, Wo = (e) => {
|
|
1963
|
-
const { options: i, ...t } = e, n = he(), a = n.shouldOptimizedTileRequests ? new Bt(i, n) : new Ze(i);
|
|
1964
|
-
return /* @__PURE__ */ l(Fe, { ...t, imageryProvider: a });
|
|
1965
|
-
}, jo = (e) => {
|
|
1966
|
-
const { options: i, ...t } = e;
|
|
1967
|
-
return /* @__PURE__ */ l(
|
|
1968
|
-
Fe,
|
|
1969
|
-
{
|
|
1970
|
-
...t,
|
|
1971
|
-
imageryProvider: new Yi(i)
|
|
1972
|
-
}
|
|
1973
|
-
);
|
|
1974
|
-
}, br = (e) => /* @__PURE__ */ l(Ni, { ...e }), Ko = (e) => /* @__PURE__ */ l(_t, { ...e }), Tr = (e) => /* @__PURE__ */ l(_t, { ...e }), _r = (e) => /* @__PURE__ */ l(Fi, { ...e }), Sr = (e) => /* @__PURE__ */ l(Hi, { ...e }), Lr = (e) => /* @__PURE__ */ l(Gi, { ...e }), Pr = (e) => /* @__PURE__ */ l(Vi, { ...e });
|
|
1611
|
+
(a = i.layersManager) == null || a.addMetaToLayer(n, n.searchLayerPredicate);
|
|
1612
|
+
}, [n, i]), /* @__PURE__ */ l(Vn, { ...t });
|
|
1613
|
+
}, Xo = (e) => {
|
|
1614
|
+
const { options: n, ...t } = e, i = pe(), a = i.shouldOptimizedTileRequests ? new Ut(n, i) : new Qe(n);
|
|
1615
|
+
return /* @__PURE__ */ l(Ge, { ...t, imageryProvider: a });
|
|
1616
|
+
}, Zo = (e) => {
|
|
1617
|
+
const { options: n, ...t } = e, i = pe(), a = i.shouldOptimizedTileRequests ? new Wt(n, i) : new et(n);
|
|
1618
|
+
return /* @__PURE__ */ l(Ge, { ...t, imageryProvider: a });
|
|
1619
|
+
}, Jo = (e) => {
|
|
1620
|
+
const { options: n, ...t } = e, i = pe(), a = i.shouldOptimizedTileRequests ? new $t(n, i) : new Je(n);
|
|
1621
|
+
return /* @__PURE__ */ l(Ge, { ...t, imageryProvider: a });
|
|
1622
|
+
}, Qo = (e) => {
|
|
1623
|
+
const { options: n, ...t } = e;
|
|
1624
|
+
return /* @__PURE__ */ l(Ge, { ...t, imageryProvider: new ti(n) });
|
|
1625
|
+
}, Ar = (e) => /* @__PURE__ */ l(zn, { ...e }), es = (e) => /* @__PURE__ */ l(It, { ...e }), xr = (e) => /* @__PURE__ */ l(It, { ...e }), kr = (e) => /* @__PURE__ */ l($n, { ...e }), Ir = (e) => /* @__PURE__ */ l(Un, { ...e }), Or = (e) => /* @__PURE__ */ l(Wn, { ...e }), Dr = (e) => /* @__PURE__ */ l(jn, { ...e });
|
|
1975
1626
|
var fe = function() {
|
|
1976
|
-
var e = p.Ellipsoid.WGS84,
|
|
1977
|
-
function
|
|
1978
|
-
this._scene =
|
|
1627
|
+
var e = p.Ellipsoid.WGS84, n, t = p.Material.fromType(p.Material.ColorType);
|
|
1628
|
+
function i(o, s = new p.Color(1, 1, 0, 0.5), f = new p.Color(1, 1, 1, 1)) {
|
|
1629
|
+
this._scene = o.scene, t.uniforms.color = s, n = f, this._tooltip = {
|
|
1979
1630
|
setVisible: () => {
|
|
1980
1631
|
},
|
|
1981
1632
|
showAt: () => {
|
|
1982
1633
|
}
|
|
1983
1634
|
}, this._surfaces = [], this.initialiseHandlers(), this.enhancePrimitives();
|
|
1984
1635
|
}
|
|
1985
|
-
|
|
1986
|
-
var
|
|
1987
|
-
function c(
|
|
1636
|
+
i.prototype.initialiseHandlers = function() {
|
|
1637
|
+
var o = this._scene, s = this, f = new p.ScreenSpaceEventHandler(o.canvas);
|
|
1638
|
+
function c(u, y) {
|
|
1988
1639
|
if (s._handlersMuted != !0) {
|
|
1989
|
-
var m =
|
|
1990
|
-
m && m.primitive && m.primitive[
|
|
1640
|
+
var m = o.pick(y);
|
|
1641
|
+
m && m.primitive && m.primitive[u] && m.primitive[u](y);
|
|
1991
1642
|
}
|
|
1992
1643
|
}
|
|
1993
|
-
f.setInputAction(function(
|
|
1994
|
-
c("leftClick",
|
|
1995
|
-
}, p.ScreenSpaceEventType.LEFT_CLICK), f.setInputAction(function(
|
|
1996
|
-
c("leftDoubleClick",
|
|
1644
|
+
f.setInputAction(function(u) {
|
|
1645
|
+
c("leftClick", u.position);
|
|
1646
|
+
}, p.ScreenSpaceEventType.LEFT_CLICK), f.setInputAction(function(u) {
|
|
1647
|
+
c("leftDoubleClick", u.position);
|
|
1997
1648
|
}, p.ScreenSpaceEventType.LEFT_DOUBLE_CLICK);
|
|
1998
1649
|
var g;
|
|
1999
|
-
f.setInputAction(function(
|
|
1650
|
+
f.setInputAction(function(u) {
|
|
2000
1651
|
if (s._handlersMuted != !0) {
|
|
2001
|
-
var y =
|
|
2002
|
-
g && (!y || g != y.primitive) && (!(g.isDestroyed && g.isDestroyed()) && g.mouseOut(
|
|
1652
|
+
var y = o.pick(u.endPosition);
|
|
1653
|
+
g && (!y || g != y.primitive) && (!(g.isDestroyed && g.isDestroyed()) && g.mouseOut(u.endPosition), g = null), y && y.primitive && (y = y.primitive, y.mouseOut && (g = y), y.mouseMove && y.mouseMove(u.endPosition));
|
|
2003
1654
|
}
|
|
2004
|
-
}, p.ScreenSpaceEventType.MOUSE_MOVE), f.setInputAction(function(
|
|
2005
|
-
c("leftUp",
|
|
2006
|
-
}, p.ScreenSpaceEventType.LEFT_UP), f.setInputAction(function(
|
|
2007
|
-
c("leftDown",
|
|
1655
|
+
}, p.ScreenSpaceEventType.MOUSE_MOVE), f.setInputAction(function(u) {
|
|
1656
|
+
c("leftUp", u.position);
|
|
1657
|
+
}, p.ScreenSpaceEventType.LEFT_UP), f.setInputAction(function(u) {
|
|
1658
|
+
c("leftDown", u.position);
|
|
2008
1659
|
}, p.ScreenSpaceEventType.LEFT_DOWN);
|
|
2009
|
-
},
|
|
2010
|
-
|
|
2011
|
-
},
|
|
2012
|
-
this._handlersMuted =
|
|
2013
|
-
},
|
|
1660
|
+
}, i.prototype.setListener = function(o, s, f) {
|
|
1661
|
+
o[s] = f;
|
|
1662
|
+
}, i.prototype.muteHandlers = function(o) {
|
|
1663
|
+
this._handlersMuted = o;
|
|
1664
|
+
}, i.prototype.registerEditableShape = function(o) {
|
|
2014
1665
|
var s = this;
|
|
2015
|
-
$(
|
|
2016
|
-
|
|
2017
|
-
}), $(
|
|
2018
|
-
|
|
2019
|
-
}), $(
|
|
2020
|
-
|
|
1666
|
+
$(o, "mouseMove", function(f) {
|
|
1667
|
+
o.setHighlighted(!0), o._editMode || s._tooltip.showAt(f, "Click to edit this shape");
|
|
1668
|
+
}), $(o, "mouseOut", function(f) {
|
|
1669
|
+
o.setHighlighted(!1), s._tooltip.setVisible(!1);
|
|
1670
|
+
}), $(o, "leftClick", function(f) {
|
|
1671
|
+
o.setEditMode(!0);
|
|
2021
1672
|
});
|
|
2022
|
-
},
|
|
2023
|
-
this.disableAllEditMode(), this.editCleanUp && this.editCleanUp(), this.editCleanUp =
|
|
2024
|
-
},
|
|
1673
|
+
}, i.prototype.startDrawing = function(o) {
|
|
1674
|
+
this.disableAllEditMode(), this.editCleanUp && this.editCleanUp(), this.editCleanUp = o, this.muteHandlers(!0);
|
|
1675
|
+
}, i.prototype.stopDrawing = function() {
|
|
2025
1676
|
this.editCleanUp && (this.editCleanUp(), this.editCleanUp = null), this.muteHandlers(!1);
|
|
2026
|
-
},
|
|
1677
|
+
}, i.prototype.disableAllHighlights = function() {
|
|
2027
1678
|
this.setHighlighted(void 0);
|
|
2028
|
-
},
|
|
2029
|
-
this._highlightedSurface && !this._highlightedSurface.isDestroyed() && this._highlightedSurface !=
|
|
2030
|
-
},
|
|
1679
|
+
}, i.prototype.setHighlighted = function(o) {
|
|
1680
|
+
this._highlightedSurface && !this._highlightedSurface.isDestroyed() && this._highlightedSurface != o && this._highlightedSurface.setHighlighted(!1), this._highlightedSurface = o;
|
|
1681
|
+
}, i.prototype.disableAllEditMode = function() {
|
|
2031
1682
|
this.setEdited(void 0);
|
|
2032
|
-
},
|
|
2033
|
-
this._editedSurface && !this._editedSurface.isDestroyed() && this._editedSurface.setEditMode(!1), this._editedSurface =
|
|
1683
|
+
}, i.prototype.setEdited = function(o) {
|
|
1684
|
+
this._editedSurface && !this._editedSurface.isDestroyed() && this._editedSurface.setEditMode(!1), this._editedSurface = o;
|
|
2034
1685
|
};
|
|
2035
1686
|
var a = {
|
|
2036
1687
|
ellipsoid: p.Ellipsoid.WGS84,
|
|
@@ -2039,15 +1690,15 @@ var fe = function() {
|
|
|
2039
1690
|
asynchronous: !0,
|
|
2040
1691
|
show: !0,
|
|
2041
1692
|
debugShowBoundingVolume: !1
|
|
2042
|
-
},
|
|
1693
|
+
}, r = D(a, {
|
|
2043
1694
|
appearance: new p.EllipsoidSurfaceAppearance({
|
|
2044
1695
|
aboveGround: !1
|
|
2045
1696
|
}),
|
|
2046
1697
|
material: t,
|
|
2047
1698
|
granularity: Math.PI / 180
|
|
2048
|
-
}), d =
|
|
1699
|
+
}), d = D(a, {}), h = D(a, {}), v = D(a, {}), C = D(r, {
|
|
2049
1700
|
rotation: 0
|
|
2050
|
-
}), S =
|
|
1701
|
+
}), S = D(a, {
|
|
2051
1702
|
width: 5,
|
|
2052
1703
|
geodesic: !0,
|
|
2053
1704
|
granularity: 1e4,
|
|
@@ -2055,16 +1706,16 @@ var fe = function() {
|
|
|
2055
1706
|
aboveGround: !1
|
|
2056
1707
|
}),
|
|
2057
1708
|
material: t
|
|
2058
|
-
}),
|
|
2059
|
-
function
|
|
1709
|
+
}), x = function() {
|
|
1710
|
+
function o() {
|
|
2060
1711
|
}
|
|
2061
|
-
return
|
|
2062
|
-
|
|
2063
|
-
},
|
|
1712
|
+
return o.prototype.initialiseOptions = function(s) {
|
|
1713
|
+
W(this, s), 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;
|
|
1714
|
+
}, o.prototype.setAttribute = function(s, f) {
|
|
2064
1715
|
this[s] = f, this._createPrimitive = !0;
|
|
2065
|
-
},
|
|
1716
|
+
}, o.prototype.getAttribute = function(s) {
|
|
2066
1717
|
return this[s];
|
|
2067
|
-
},
|
|
1718
|
+
}, o.prototype.update = function(s, f, c) {
|
|
2068
1719
|
if (!p.defined(this.ellipsoid))
|
|
2069
1720
|
throw new p.DeveloperError("this.ellipsoid must be defined.");
|
|
2070
1721
|
if (!p.defined(this.appearance))
|
|
@@ -2104,28 +1755,28 @@ var fe = function() {
|
|
|
2104
1755
|
})
|
|
2105
1756
|
}));
|
|
2106
1757
|
}
|
|
2107
|
-
var
|
|
2108
|
-
|
|
1758
|
+
var u = this._primitive;
|
|
1759
|
+
u.appearance.material = this.material, u.debugShowBoundingVolume = this.debugShowBoundingVolume, u.update(s, f, c), this._outlinePolygon && this._outlinePolygon.update(s, f, c);
|
|
2109
1760
|
}
|
|
2110
|
-
},
|
|
1761
|
+
}, o.prototype.isDestroyed = function() {
|
|
2111
1762
|
return !1;
|
|
2112
|
-
},
|
|
1763
|
+
}, o.prototype.destroy = function() {
|
|
2113
1764
|
return this._primitive = this._primitive && this._primitive.destroy(), p.destroyObject(this);
|
|
2114
|
-
},
|
|
1765
|
+
}, o.prototype.setStrokeStyle = function(s, f) {
|
|
2115
1766
|
(!this.strokeColor || !this.strokeColor.equals(s) || this.strokeWidth != f) && (this._createPrimitive = !0, this.strokeColor = s, this.strokeWidth = f);
|
|
2116
|
-
},
|
|
1767
|
+
}, o;
|
|
2117
1768
|
}();
|
|
2118
|
-
|
|
2119
|
-
function
|
|
1769
|
+
i.ExtentPrimitive = function() {
|
|
1770
|
+
function o(s) {
|
|
2120
1771
|
if (!p.defined(s.extent))
|
|
2121
1772
|
throw new p.DeveloperError("Extent is required");
|
|
2122
|
-
s =
|
|
1773
|
+
s = D(s, r), this.initialiseOptions(s), this.setExtent(s.extent);
|
|
2123
1774
|
}
|
|
2124
|
-
return
|
|
1775
|
+
return o.prototype = new x(), o.prototype.setExtent = function(s) {
|
|
2125
1776
|
this.setAttribute("extent", s);
|
|
2126
|
-
},
|
|
1777
|
+
}, o.prototype.getExtent = function() {
|
|
2127
1778
|
return this.getAttribute("extent");
|
|
2128
|
-
},
|
|
1779
|
+
}, o.prototype.getGeometry = function() {
|
|
2129
1780
|
if (p.defined(this.extent))
|
|
2130
1781
|
return new p.RectangleGeometry({
|
|
2131
1782
|
rectangle: this.extent,
|
|
@@ -2135,20 +1786,20 @@ var fe = function() {
|
|
|
2135
1786
|
ellipsoid: this.ellipsoid,
|
|
2136
1787
|
granularity: this.granularity
|
|
2137
1788
|
});
|
|
2138
|
-
},
|
|
1789
|
+
}, o.prototype.getOutlineGeometry = function() {
|
|
2139
1790
|
return new p.RectangleOutlineGeometry({
|
|
2140
1791
|
rectangle: this.extent
|
|
2141
1792
|
});
|
|
2142
|
-
},
|
|
2143
|
-
}(),
|
|
2144
|
-
function
|
|
2145
|
-
s =
|
|
1793
|
+
}, o;
|
|
1794
|
+
}(), i.PolygonPrimitive = function() {
|
|
1795
|
+
function o(s) {
|
|
1796
|
+
s = D(s, r), this.initialiseOptions(s), this.isPolygon = !0;
|
|
2146
1797
|
}
|
|
2147
|
-
return
|
|
1798
|
+
return o.prototype = new x(), o.prototype.setPositions = function(s) {
|
|
2148
1799
|
this.setAttribute("positions", s);
|
|
2149
|
-
},
|
|
1800
|
+
}, o.prototype.getPositions = function() {
|
|
2150
1801
|
return this.getAttribute("positions");
|
|
2151
|
-
},
|
|
1802
|
+
}, o.prototype.getGeometry = function() {
|
|
2152
1803
|
if (!(!p.defined(this.positions) || this.positions.length < 3))
|
|
2153
1804
|
return p.PolygonGeometry.fromPositions({
|
|
2154
1805
|
positions: this.positions,
|
|
@@ -2158,26 +1809,26 @@ var fe = function() {
|
|
|
2158
1809
|
ellipsoid: this.ellipsoid,
|
|
2159
1810
|
granularity: this.granularity
|
|
2160
1811
|
});
|
|
2161
|
-
},
|
|
1812
|
+
}, o.prototype.getOutlineGeometry = function() {
|
|
2162
1813
|
return p.PolygonOutlineGeometry.fromPositions({
|
|
2163
1814
|
positions: this.getPositions()
|
|
2164
1815
|
});
|
|
2165
|
-
},
|
|
2166
|
-
}(),
|
|
2167
|
-
function
|
|
1816
|
+
}, o;
|
|
1817
|
+
}(), i.CirclePrimitive = function() {
|
|
1818
|
+
function o(s) {
|
|
2168
1819
|
if (!(p.defined(s.center) && p.defined(s.radius)))
|
|
2169
1820
|
throw new p.DeveloperError("Center and radius are required");
|
|
2170
|
-
s =
|
|
1821
|
+
s = D(s, r), this.initialiseOptions(s), this.setRadius(s.radius);
|
|
2171
1822
|
}
|
|
2172
|
-
return
|
|
1823
|
+
return o.prototype = new x(), o.prototype.setCenter = function(s) {
|
|
2173
1824
|
this.setAttribute("center", s);
|
|
2174
|
-
},
|
|
1825
|
+
}, o.prototype.setRadius = function(s) {
|
|
2175
1826
|
this.setAttribute("radius", Math.max(0.1, s));
|
|
2176
|
-
},
|
|
1827
|
+
}, o.prototype.getCenter = function() {
|
|
2177
1828
|
return this.getAttribute("center");
|
|
2178
|
-
},
|
|
1829
|
+
}, o.prototype.getRadius = function() {
|
|
2179
1830
|
return this.getAttribute("radius");
|
|
2180
|
-
},
|
|
1831
|
+
}, o.prototype.getGeometry = function() {
|
|
2181
1832
|
if (p.defined(this.center) && p.defined(this.radius))
|
|
2182
1833
|
return new p.CircleGeometry({
|
|
2183
1834
|
center: this.center,
|
|
@@ -2188,35 +1839,35 @@ var fe = function() {
|
|
|
2188
1839
|
ellipsoid: this.ellipsoid,
|
|
2189
1840
|
granularity: this.granularity
|
|
2190
1841
|
});
|
|
2191
|
-
},
|
|
1842
|
+
}, o.prototype.getOutlineGeometry = function() {
|
|
2192
1843
|
return new p.CircleOutlineGeometry({
|
|
2193
1844
|
center: this.getCenter(),
|
|
2194
1845
|
radius: this.getRadius()
|
|
2195
1846
|
});
|
|
2196
|
-
},
|
|
2197
|
-
}(),
|
|
2198
|
-
function
|
|
1847
|
+
}, o;
|
|
1848
|
+
}(), i.EllipsePrimitive = function() {
|
|
1849
|
+
function o(s) {
|
|
2199
1850
|
if (!(p.defined(s.center) && p.defined(s.semiMajorAxis) && p.defined(s.semiMinorAxis)))
|
|
2200
1851
|
throw new p.DeveloperError("Center and semi major and semi minor axis are required");
|
|
2201
|
-
s =
|
|
1852
|
+
s = D(s, C), this.initialiseOptions(s);
|
|
2202
1853
|
}
|
|
2203
|
-
return
|
|
1854
|
+
return o.prototype = new x(), o.prototype.setCenter = function(s) {
|
|
2204
1855
|
this.setAttribute("center", s);
|
|
2205
|
-
},
|
|
1856
|
+
}, o.prototype.setSemiMajorAxis = function(s) {
|
|
2206
1857
|
s < this.getSemiMinorAxis() || this.setAttribute("semiMajorAxis", s);
|
|
2207
|
-
},
|
|
1858
|
+
}, o.prototype.setSemiMinorAxis = function(s) {
|
|
2208
1859
|
s > this.getSemiMajorAxis() || this.setAttribute("semiMinorAxis", s);
|
|
2209
|
-
},
|
|
1860
|
+
}, o.prototype.setRotation = function(s) {
|
|
2210
1861
|
return this.setAttribute("rotation", s);
|
|
2211
|
-
},
|
|
1862
|
+
}, o.prototype.getCenter = function() {
|
|
2212
1863
|
return this.getAttribute("center");
|
|
2213
|
-
},
|
|
1864
|
+
}, o.prototype.getSemiMajorAxis = function() {
|
|
2214
1865
|
return this.getAttribute("semiMajorAxis");
|
|
2215
|
-
},
|
|
1866
|
+
}, o.prototype.getSemiMinorAxis = function() {
|
|
2216
1867
|
return this.getAttribute("semiMinorAxis");
|
|
2217
|
-
},
|
|
1868
|
+
}, o.prototype.getRotation = function() {
|
|
2218
1869
|
return this.getAttribute("rotation");
|
|
2219
|
-
},
|
|
1870
|
+
}, o.prototype.getGeometry = function() {
|
|
2220
1871
|
if (p.defined(this.center) && p.defined(this.semiMajorAxis) && p.defined(this.semiMinorAxis))
|
|
2221
1872
|
return new p.EllipseGeometry({
|
|
2222
1873
|
ellipsoid: this.ellipsoid,
|
|
@@ -2229,31 +1880,31 @@ var fe = function() {
|
|
|
2229
1880
|
stRotation: this.textureRotationAngle,
|
|
2230
1881
|
granularity: this.granularity
|
|
2231
1882
|
});
|
|
2232
|
-
},
|
|
1883
|
+
}, o.prototype.getOutlineGeometry = function() {
|
|
2233
1884
|
return new p.EllipseOutlineGeometry({
|
|
2234
1885
|
center: this.getCenter(),
|
|
2235
1886
|
semiMajorAxis: this.getSemiMajorAxis(),
|
|
2236
1887
|
semiMinorAxis: this.getSemiMinorAxis(),
|
|
2237
1888
|
rotation: this.getRotation()
|
|
2238
1889
|
});
|
|
2239
|
-
},
|
|
2240
|
-
}(),
|
|
2241
|
-
function
|
|
2242
|
-
s =
|
|
1890
|
+
}, o;
|
|
1891
|
+
}(), i.PolylinePrimitive = function() {
|
|
1892
|
+
function o(s) {
|
|
1893
|
+
s = D(s, S), this.initialiseOptions(s);
|
|
2243
1894
|
}
|
|
2244
|
-
return
|
|
1895
|
+
return o.prototype = new x(), o.prototype.setPositions = function(s) {
|
|
2245
1896
|
this.setAttribute("positions", s);
|
|
2246
|
-
},
|
|
1897
|
+
}, o.prototype.setWidth = function(s) {
|
|
2247
1898
|
this.setAttribute("width", s);
|
|
2248
|
-
},
|
|
1899
|
+
}, o.prototype.setGeodesic = function(s) {
|
|
2249
1900
|
this.setAttribute("geodesic", s);
|
|
2250
|
-
},
|
|
1901
|
+
}, o.prototype.getPositions = function() {
|
|
2251
1902
|
return this.getAttribute("positions");
|
|
2252
|
-
},
|
|
1903
|
+
}, o.prototype.getWidth = function() {
|
|
2253
1904
|
return this.getAttribute("width");
|
|
2254
|
-
},
|
|
1905
|
+
}, o.prototype.getGeodesic = function(s) {
|
|
2255
1906
|
return this.getAttribute("geodesic");
|
|
2256
|
-
},
|
|
1907
|
+
}, o.prototype.getGeometry = function() {
|
|
2257
1908
|
if (!(!p.defined(this.positions) || this.positions.length < 2))
|
|
2258
1909
|
return new p.PolylineGeometry({
|
|
2259
1910
|
positions: this.positions,
|
|
@@ -2262,42 +1913,42 @@ var fe = function() {
|
|
|
2262
1913
|
vertexFormat: p.EllipsoidSurfaceAppearance.VERTEX_FORMAT,
|
|
2263
1914
|
ellipsoid: this.ellipsoid
|
|
2264
1915
|
});
|
|
2265
|
-
},
|
|
1916
|
+
}, o;
|
|
2266
1917
|
}();
|
|
2267
1918
|
var L = {
|
|
2268
1919
|
iconUrl: "./assets/img/dragIcon.png",
|
|
2269
1920
|
shiftX: 0,
|
|
2270
1921
|
shiftY: 0
|
|
2271
|
-
},
|
|
1922
|
+
}, B = {
|
|
2272
1923
|
iconUrl: "./assets/img/dragIcon.png",
|
|
2273
1924
|
shiftX: 0,
|
|
2274
1925
|
shiftY: 0
|
|
2275
|
-
},
|
|
1926
|
+
}, U = {
|
|
2276
1927
|
iconUrl: "./assets/img/dragIconLight.png",
|
|
2277
1928
|
shiftX: 0,
|
|
2278
1929
|
shiftY: 0
|
|
2279
1930
|
};
|
|
2280
|
-
|
|
2281
|
-
var c = new
|
|
2282
|
-
return c.addBillboards(
|
|
2283
|
-
},
|
|
2284
|
-
this._drawHelper =
|
|
1931
|
+
i.prototype.createBillboardGroup = function(o, s, f) {
|
|
1932
|
+
var c = new i.BillboardGroup(this, s);
|
|
1933
|
+
return c.addBillboards(o, f), c;
|
|
1934
|
+
}, i.BillboardGroup = function(o, s) {
|
|
1935
|
+
this._drawHelper = o, this._scene = o._scene, this._options = D(s, L);
|
|
2285
1936
|
var f = new p.BillboardCollection();
|
|
2286
1937
|
this._scene.primitives.add(f), this._billboards = f, this._orderedBillboards = [];
|
|
2287
|
-
},
|
|
1938
|
+
}, i.BillboardGroup.prototype.createBillboard = function(o, s) {
|
|
2288
1939
|
var f = this._billboards.add({
|
|
2289
1940
|
show: !0,
|
|
2290
|
-
position:
|
|
1941
|
+
position: o,
|
|
2291
1942
|
pixelOffset: new p.Cartesian2(this._options.shiftX, this._options.shiftY),
|
|
2292
1943
|
eyeOffset: new p.Cartesian3(0, 0, 0),
|
|
2293
1944
|
horizontalOrigin: p.HorizontalOrigin.CENTER,
|
|
2294
1945
|
verticalOrigin: p.VerticalOrigin.CENTER,
|
|
2295
1946
|
scale: 1,
|
|
2296
1947
|
image: this._options.iconUrl,
|
|
2297
|
-
color:
|
|
1948
|
+
color: n
|
|
2298
1949
|
});
|
|
2299
1950
|
if (s) {
|
|
2300
|
-
let
|
|
1951
|
+
let u = function(m) {
|
|
2301
1952
|
g.enableRotate = m;
|
|
2302
1953
|
}, y = function() {
|
|
2303
1954
|
for (var m = 0, E = c._orderedBillboards.length; m < E && c._orderedBillboards[m] != f; ++m)
|
|
@@ -2315,7 +1966,7 @@ var fe = function() {
|
|
|
2315
1966
|
s.dragHandlers.onDrag && s.dragHandlers.onDrag(y(), _);
|
|
2316
1967
|
}
|
|
2317
1968
|
function b(_) {
|
|
2318
|
-
w.destroy(),
|
|
1969
|
+
w.destroy(), u(!0), s.dragHandlers.onDragEnd && s.dragHandlers.onDragEnd(y(), _);
|
|
2319
1970
|
}
|
|
2320
1971
|
var w = new p.ScreenSpaceEventHandler(c._scene.canvas);
|
|
2321
1972
|
w.setInputAction(function(_) {
|
|
@@ -2323,7 +1974,7 @@ var fe = function() {
|
|
|
2323
1974
|
P ? T(P) : b(P);
|
|
2324
1975
|
}, p.ScreenSpaceEventType.MOUSE_MOVE), w.setInputAction(function(_) {
|
|
2325
1976
|
b(c._scene.camera.pickEllipsoid(_.position, e));
|
|
2326
|
-
}, p.ScreenSpaceEventType.LEFT_UP),
|
|
1977
|
+
}, p.ScreenSpaceEventType.LEFT_UP), u(!1), s.dragHandlers.onDragStart && s.dragHandlers.onDragStart(y(), c._scene.camera.pickEllipsoid(E, e));
|
|
2327
1978
|
});
|
|
2328
1979
|
}
|
|
2329
1980
|
s.onDoubleClick && $(f, "leftDoubleClick", function(m) {
|
|
@@ -2337,38 +1988,38 @@ var fe = function() {
|
|
|
2337
1988
|
}));
|
|
2338
1989
|
}
|
|
2339
1990
|
return f;
|
|
2340
|
-
},
|
|
2341
|
-
this._orderedBillboards.splice(
|
|
2342
|
-
},
|
|
2343
|
-
this._orderedBillboards.push(this.createBillboard(
|
|
2344
|
-
},
|
|
2345
|
-
for (var f = 0; f <
|
|
2346
|
-
this.addBillboard(
|
|
2347
|
-
},
|
|
2348
|
-
for (var s = 0; s <
|
|
2349
|
-
this.getBillboard(s).position =
|
|
2350
|
-
},
|
|
1991
|
+
}, i.BillboardGroup.prototype.insertBillboard = function(o, s, f) {
|
|
1992
|
+
this._orderedBillboards.splice(o, 0, this.createBillboard(s, f));
|
|
1993
|
+
}, i.BillboardGroup.prototype.addBillboard = function(o, s) {
|
|
1994
|
+
this._orderedBillboards.push(this.createBillboard(o, s));
|
|
1995
|
+
}, i.BillboardGroup.prototype.addBillboards = function(o, s) {
|
|
1996
|
+
for (var f = 0; f < o.length; f++)
|
|
1997
|
+
this.addBillboard(o[f], s);
|
|
1998
|
+
}, i.BillboardGroup.prototype.updateBillboardsPositions = function(o) {
|
|
1999
|
+
for (var s = 0; s < o.length; s++)
|
|
2000
|
+
this.getBillboard(s).position = o[s];
|
|
2001
|
+
}, i.BillboardGroup.prototype.countBillboards = function() {
|
|
2351
2002
|
return this._orderedBillboards.length;
|
|
2352
|
-
},
|
|
2353
|
-
return this._orderedBillboards[
|
|
2354
|
-
},
|
|
2355
|
-
this._billboards.remove(this.getBillboard(
|
|
2356
|
-
},
|
|
2003
|
+
}, i.BillboardGroup.prototype.getBillboard = function(o) {
|
|
2004
|
+
return this._orderedBillboards[o];
|
|
2005
|
+
}, i.BillboardGroup.prototype.removeBillboard = function(o) {
|
|
2006
|
+
this._billboards.remove(this.getBillboard(o)), this._orderedBillboards.splice(o, 1);
|
|
2007
|
+
}, i.BillboardGroup.prototype.remove = function() {
|
|
2357
2008
|
this._billboards = this._billboards && this._billboards.removeAll() && this._billboards.destroy();
|
|
2358
|
-
},
|
|
2009
|
+
}, i.BillboardGroup.prototype.setOnTop = function() {
|
|
2359
2010
|
this._scene.primitives.raiseToTop(this._billboards);
|
|
2360
|
-
},
|
|
2361
|
-
var s =
|
|
2011
|
+
}, i.prototype.startDrawingMarker = function(s) {
|
|
2012
|
+
var s = D(s, L);
|
|
2362
2013
|
this.startDrawing(function() {
|
|
2363
|
-
|
|
2014
|
+
u.remove(), y.destroy(), g.setVisible(!1);
|
|
2364
2015
|
});
|
|
2365
2016
|
var f = this, c = this._scene;
|
|
2366
2017
|
c.primitives;
|
|
2367
|
-
var g = this._tooltip,
|
|
2018
|
+
var g = this._tooltip, u = new i.BillboardGroup(this, s), y = new p.ScreenSpaceEventHandler(c.canvas);
|
|
2368
2019
|
y.setInputAction(function(m) {
|
|
2369
2020
|
if (m.position != null) {
|
|
2370
2021
|
var E = c.camera.pickEllipsoid(m.position, e);
|
|
2371
|
-
E && (
|
|
2022
|
+
E && (u.addBillboard(E), f.stopDrawing(), s.callback(E));
|
|
2372
2023
|
}
|
|
2373
2024
|
}, p.ScreenSpaceEventType.LEFT_CLICK), y.setInputAction(function(m) {
|
|
2374
2025
|
var E = m.endPosition;
|
|
@@ -2376,24 +2027,24 @@ var fe = function() {
|
|
|
2376
2027
|
var T = c.camera.pickEllipsoid(E, e);
|
|
2377
2028
|
T ? g.showAt(
|
|
2378
2029
|
E,
|
|
2379
|
-
"<p>Click to add your marker. Position is: </p>" +
|
|
2030
|
+
"<p>Click to add your marker. Position is: </p>" + z(e.cartesianToCartographic(T))
|
|
2380
2031
|
) : g.showAt(E, "<p>Click on the globe to add your marker.</p>");
|
|
2381
2032
|
}
|
|
2382
2033
|
}, p.ScreenSpaceEventType.MOUSE_MOVE);
|
|
2383
|
-
},
|
|
2384
|
-
var s =
|
|
2034
|
+
}, i.prototype.startDrawingPolygon = function(s) {
|
|
2035
|
+
var s = D(s, r);
|
|
2385
2036
|
this.startDrawingPolyshape(!0, s);
|
|
2386
|
-
},
|
|
2387
|
-
var s =
|
|
2037
|
+
}, i.prototype.startDrawingPolyline = function(s) {
|
|
2038
|
+
var s = D(s, S);
|
|
2388
2039
|
this.startDrawingPolyshape(!1, s);
|
|
2389
|
-
},
|
|
2040
|
+
}, i.prototype.startDrawingPolyshape = function(o, s) {
|
|
2390
2041
|
this.startDrawing(function() {
|
|
2391
|
-
g.remove(m), T.remove(), b.destroy(),
|
|
2042
|
+
g.remove(m), T.remove(), b.destroy(), u.setVisible(!1), G(c);
|
|
2392
2043
|
});
|
|
2393
|
-
var f = this, c = this._scene, g = c.primitives,
|
|
2394
|
-
|
|
2395
|
-
var E = [], T = new
|
|
2396
|
-
|
|
2044
|
+
var f = this, c = this._scene, g = c.primitives, u = this._tooltip, y = o ? 3 : 2, m;
|
|
2045
|
+
o ? m = new fe.PolygonPrimitive(s) : m = new fe.PolylinePrimitive(s), m.asynchronous = !1, g.add(m);
|
|
2046
|
+
var E = [], T = new i.BillboardGroup(this, L), b = new p.ScreenSpaceEventHandler(c.canvas);
|
|
2047
|
+
J(c), b.setInputAction(function(w) {
|
|
2397
2048
|
if (w.position != null) {
|
|
2398
2049
|
var _ = c.camera.pickEllipsoid(w.position, e);
|
|
2399
2050
|
_ && (E.length == 0 && (E.push(_.clone()), T.addBillboard(E[0])), E.length >= y && (m.positions = E, m._createPrimitive = !0), E.push(_), T.addBillboard(_));
|
|
@@ -2402,10 +2053,10 @@ var fe = function() {
|
|
|
2402
2053
|
var _ = w.endPosition;
|
|
2403
2054
|
if (_ != null)
|
|
2404
2055
|
if (E.length == 0)
|
|
2405
|
-
|
|
2056
|
+
u.showAt(_, "<p>Click to add first point</p>");
|
|
2406
2057
|
else {
|
|
2407
2058
|
var P = c.camera.pickEllipsoid(_, e);
|
|
2408
|
-
P && (E.pop(), P.y += 1 + Math.random(), E.push(P), E.length >= y && (m.positions = E, m._createPrimitive = !0), T.getBillboard(E.length - 1).position = P,
|
|
2059
|
+
P && (E.pop(), P.y += 1 + Math.random(), E.push(P), E.length >= y && (m.positions = E, m._createPrimitive = !0), T.getBillboard(E.length - 1).position = P, u.showAt(
|
|
2409
2060
|
_,
|
|
2410
2061
|
"<p>Click to add new point (" + E.length + ")</p>" + (E.length > y ? "<p>Double click to finish drawing</p>" : "")
|
|
2411
2062
|
));
|
|
@@ -2416,38 +2067,38 @@ var fe = function() {
|
|
|
2416
2067
|
if (E.length < y + 2)
|
|
2417
2068
|
return;
|
|
2418
2069
|
var P = c.camera.pickEllipsoid(_, e);
|
|
2419
|
-
P && (
|
|
2070
|
+
P && (G(c), f.stopDrawing(), typeof s.callback == "function" && (E.length - 1, s.callback(E)));
|
|
2420
2071
|
}
|
|
2421
2072
|
}, p.ScreenSpaceEventType.LEFT_DOUBLE_CLICK);
|
|
2422
2073
|
};
|
|
2423
|
-
function K(
|
|
2074
|
+
function K(o) {
|
|
2424
2075
|
return e.cartographicArrayToCartesianArray([
|
|
2425
|
-
p.Rectangle.northwest(
|
|
2426
|
-
p.Rectangle.northeast(
|
|
2427
|
-
p.Rectangle.southeast(
|
|
2428
|
-
p.Rectangle.southwest(
|
|
2076
|
+
p.Rectangle.northwest(o),
|
|
2077
|
+
p.Rectangle.northeast(o),
|
|
2078
|
+
p.Rectangle.southeast(o),
|
|
2079
|
+
p.Rectangle.southwest(o)
|
|
2429
2080
|
]);
|
|
2430
2081
|
}
|
|
2431
|
-
function
|
|
2432
|
-
|
|
2082
|
+
function J(o) {
|
|
2083
|
+
o && (o.canvas.style.cursor = "crosshair");
|
|
2433
2084
|
}
|
|
2434
|
-
function
|
|
2435
|
-
|
|
2085
|
+
function G(o) {
|
|
2086
|
+
o && (o.canvas.style.cursor = "");
|
|
2436
2087
|
}
|
|
2437
|
-
|
|
2438
|
-
var s =
|
|
2088
|
+
i.prototype.startDrawingExtent = function(s) {
|
|
2089
|
+
var s = D(s, r);
|
|
2439
2090
|
this.startDrawing(function() {
|
|
2440
|
-
m != null && g.remove(m), E != null && E.remove(), T.destroy(),
|
|
2091
|
+
m != null && g.remove(m), E != null && E.remove(), T.destroy(), u.setVisible(!1), G(c);
|
|
2441
2092
|
});
|
|
2442
|
-
var f = this, c = this._scene, g = this._scene.primitives,
|
|
2443
|
-
|
|
2093
|
+
var f = this, c = this._scene, g = this._scene.primitives, u = this._tooltip, y = null, m = null, E = null, T = new p.ScreenSpaceEventHandler(c.canvas);
|
|
2094
|
+
J(c);
|
|
2444
2095
|
function b(w) {
|
|
2445
2096
|
m == null && (m = new fe.ExtentPrimitive({
|
|
2446
2097
|
extent: w,
|
|
2447
2098
|
material: s.material
|
|
2448
2099
|
}), m.asynchronous = !1, g.add(m)), m.setExtent(w);
|
|
2449
2100
|
var _ = K(w);
|
|
2450
|
-
E == null ? (E = new
|
|
2101
|
+
E == null ? (E = new i.BillboardGroup(f, L), E.addBillboards(_)) : E.updateBillboardsPositions(_);
|
|
2451
2102
|
}
|
|
2452
2103
|
T.setInputAction(function(w) {
|
|
2453
2104
|
if (w.position != null) {
|
|
@@ -2455,141 +2106,141 @@ var fe = function() {
|
|
|
2455
2106
|
if (_)
|
|
2456
2107
|
if (m == null) {
|
|
2457
2108
|
y = e.cartesianToCartographic(_);
|
|
2458
|
-
var P =
|
|
2109
|
+
var P = Y(y, y);
|
|
2459
2110
|
b(P);
|
|
2460
2111
|
} else
|
|
2461
|
-
f.stopDrawing(), typeof s.callback == "function" && s.callback(
|
|
2112
|
+
f.stopDrawing(), typeof s.callback == "function" && s.callback(Y(y, e.cartesianToCartographic(_)));
|
|
2462
2113
|
}
|
|
2463
2114
|
}, p.ScreenSpaceEventType.LEFT_DOWN), T.setInputAction(function(w) {
|
|
2464
2115
|
var _ = w.endPosition;
|
|
2465
2116
|
if (_ != null)
|
|
2466
2117
|
if (m == null)
|
|
2467
|
-
|
|
2118
|
+
u.showAt(_, "<p>Click to start drawing rectangle</p>");
|
|
2468
2119
|
else {
|
|
2469
2120
|
var P = c.camera.pickEllipsoid(_, e);
|
|
2470
2121
|
if (P) {
|
|
2471
|
-
var H =
|
|
2472
|
-
b(H),
|
|
2122
|
+
var H = Y(y, e.cartesianToCartographic(P));
|
|
2123
|
+
b(H), u.showAt(_, "<p>Drag to change rectangle extent</p><p>Click again to finish drawing</p>");
|
|
2473
2124
|
}
|
|
2474
2125
|
}
|
|
2475
2126
|
}, p.ScreenSpaceEventType.MOUSE_MOVE);
|
|
2476
|
-
},
|
|
2477
|
-
var s =
|
|
2127
|
+
}, i.prototype.startDrawingCircle = function(s) {
|
|
2128
|
+
var s = D(s, r);
|
|
2478
2129
|
this.startDrawing(function() {
|
|
2479
|
-
y != null && g.remove(y), m.remove(), E.destroy(),
|
|
2130
|
+
y != null && g.remove(y), m.remove(), E.destroy(), u.setVisible(!1);
|
|
2480
2131
|
});
|
|
2481
|
-
var f = this, c = this._scene, g = this._scene.primitives,
|
|
2132
|
+
var f = this, c = this._scene, g = this._scene.primitives, u = this._tooltip, y = null, m = null, E = new p.ScreenSpaceEventHandler(c.canvas);
|
|
2482
2133
|
E.setInputAction(function(T) {
|
|
2483
2134
|
if (T.position != null) {
|
|
2484
2135
|
var b = c.camera.pickEllipsoid(T.position, e);
|
|
2485
|
-
b && (y == null ? (y = new
|
|
2136
|
+
b && (y == null ? (y = new i.CirclePrimitive({
|
|
2486
2137
|
center: b,
|
|
2487
2138
|
radius: 0,
|
|
2488
2139
|
asynchronous: !1,
|
|
2489
2140
|
material: s.material
|
|
2490
|
-
}), g.add(y), m = new
|
|
2141
|
+
}), g.add(y), m = new i.BillboardGroup(f, L), m.addBillboards([b])) : (typeof s.callback == "function" && s.callback(y.getCenter(), y.getRadius()), f.stopDrawing()));
|
|
2491
2142
|
}
|
|
2492
2143
|
}, p.ScreenSpaceEventType.LEFT_DOWN), E.setInputAction(function(T) {
|
|
2493
2144
|
var b = T.endPosition;
|
|
2494
2145
|
if (b != null)
|
|
2495
2146
|
if (y == null)
|
|
2496
|
-
|
|
2147
|
+
u.showAt(b, "<p>Click to start drawing the circle</p>");
|
|
2497
2148
|
else {
|
|
2498
2149
|
var w = c.camera.pickEllipsoid(b, e);
|
|
2499
|
-
w && (y.setRadius(p.Cartesian3.distance(y.getCenter(), w)), m.updateBillboardsPositions(w),
|
|
2150
|
+
w && (y.setRadius(p.Cartesian3.distance(y.getCenter(), w)), m.updateBillboardsPositions(w), u.showAt(b, "<p>Move mouse to change circle radius</p><p>Click again to finish drawing</p>"));
|
|
2500
2151
|
}
|
|
2501
2152
|
}, p.ScreenSpaceEventType.MOUSE_MOVE);
|
|
2502
|
-
},
|
|
2503
|
-
var
|
|
2153
|
+
}, i.prototype.enhancePrimitives = function() {
|
|
2154
|
+
var o = this;
|
|
2504
2155
|
p.Billboard.prototype.setEditable = function() {
|
|
2505
2156
|
if (this._editable)
|
|
2506
2157
|
return;
|
|
2507
2158
|
this._editable = !0;
|
|
2508
2159
|
var c = this, g = this;
|
|
2509
|
-
function
|
|
2510
|
-
|
|
2160
|
+
function u(y) {
|
|
2161
|
+
o._scene.screenSpaceCameraController.enableRotate = y;
|
|
2511
2162
|
}
|
|
2512
2163
|
$(c, "leftDown", function(y) {
|
|
2513
2164
|
function m(b) {
|
|
2514
2165
|
c.position = b, g.executeListeners({ name: "drag", positions: b });
|
|
2515
2166
|
}
|
|
2516
2167
|
function E(b) {
|
|
2517
|
-
T.destroy(),
|
|
2168
|
+
T.destroy(), u(!0), g.executeListeners({ name: "dragEnd", positions: b });
|
|
2518
2169
|
}
|
|
2519
|
-
var T = new p.ScreenSpaceEventHandler(
|
|
2170
|
+
var T = new p.ScreenSpaceEventHandler(o._scene.canvas);
|
|
2520
2171
|
T.setInputAction(function(b) {
|
|
2521
|
-
var w =
|
|
2172
|
+
var w = o._scene.camera.pickEllipsoid(b.endPosition, e);
|
|
2522
2173
|
w ? m(w) : E(w);
|
|
2523
2174
|
}, p.ScreenSpaceEventType.MOUSE_MOVE), T.setInputAction(function(b) {
|
|
2524
|
-
E(
|
|
2525
|
-
}, p.ScreenSpaceEventType.LEFT_UP),
|
|
2175
|
+
E(o._scene.camera.pickEllipsoid(b.position, e));
|
|
2176
|
+
}, p.ScreenSpaceEventType.LEFT_UP), u(!1);
|
|
2526
2177
|
}), q(c);
|
|
2527
2178
|
};
|
|
2528
2179
|
function s(c) {
|
|
2529
|
-
|
|
2180
|
+
o._scene, !(this._highlighted && this._highlighted == c) && this._editMode !== !0 && (this._highlighted = c, c ? (o.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));
|
|
2530
2181
|
}
|
|
2531
2182
|
function f(c) {
|
|
2532
2183
|
if (this._editMode != c)
|
|
2533
|
-
if (
|
|
2534
|
-
|
|
2535
|
-
var g =
|
|
2184
|
+
if (o.disableAllHighlights(), c) {
|
|
2185
|
+
o.setEdited(this);
|
|
2186
|
+
var g = o._scene, u = this;
|
|
2536
2187
|
if (this._markers == null) {
|
|
2537
|
-
let P = function(
|
|
2538
|
-
var
|
|
2539
|
-
|
|
2188
|
+
let P = function(O, M) {
|
|
2189
|
+
var A = O - 1 < 0 ? M.length - 1 : O - 1;
|
|
2190
|
+
A < m.countBillboards() && (m.getBillboard(A).position = j(A)), A = O, A < m.countBillboards() && (m.getBillboard(A).position = j(A));
|
|
2540
2191
|
}, H = function() {
|
|
2541
|
-
|
|
2192
|
+
u.executeListeners({
|
|
2542
2193
|
name: "onEdited",
|
|
2543
|
-
positions:
|
|
2194
|
+
positions: u.positions
|
|
2544
2195
|
});
|
|
2545
|
-
},
|
|
2546
|
-
var
|
|
2196
|
+
}, j = function(O) {
|
|
2197
|
+
var M = u.positions;
|
|
2547
2198
|
return e.cartographicToCartesian(
|
|
2548
2199
|
new p.EllipsoidGeodesic(
|
|
2549
|
-
e.cartesianToCartographic(
|
|
2550
|
-
e.cartesianToCartographic(
|
|
2200
|
+
e.cartesianToCartographic(M[O]),
|
|
2201
|
+
e.cartesianToCartographic(M[O < M.length - 1 ? O + 1 : 0])
|
|
2551
2202
|
).interpolateUsingFraction(0.5)
|
|
2552
2203
|
);
|
|
2553
2204
|
};
|
|
2554
|
-
var y = new
|
|
2205
|
+
var y = new i.BillboardGroup(o, B), m = new i.BillboardGroup(o, U), E = {
|
|
2555
2206
|
dragHandlers: {
|
|
2556
|
-
onDrag: function(
|
|
2557
|
-
|
|
2207
|
+
onDrag: function(O, M) {
|
|
2208
|
+
u.positions[O] = M, P(O, u.positions), u._createPrimitive = !0;
|
|
2558
2209
|
},
|
|
2559
|
-
onDragEnd: function(
|
|
2560
|
-
|
|
2210
|
+
onDragEnd: function(O, M) {
|
|
2211
|
+
u._createPrimitive = !0, H();
|
|
2561
2212
|
}
|
|
2562
2213
|
},
|
|
2563
|
-
onDoubleClick: function(
|
|
2564
|
-
|
|
2214
|
+
onDoubleClick: function(O) {
|
|
2215
|
+
u.positions.length < 4 || (u.positions.splice(O, 1), u._createPrimitive = !0, y.removeBillboard(O), m.removeBillboard(O), P(O, u.positions), H());
|
|
2565
2216
|
},
|
|
2566
2217
|
tooltip: function() {
|
|
2567
|
-
if (
|
|
2218
|
+
if (u.positions.length > 3)
|
|
2568
2219
|
return "Double click to remove this point";
|
|
2569
2220
|
}
|
|
2570
2221
|
};
|
|
2571
|
-
y.addBillboards(
|
|
2572
|
-
for (var T = [], b = 0, w =
|
|
2573
|
-
T.push(
|
|
2222
|
+
y.addBillboards(u.positions, E), this._markers = y;
|
|
2223
|
+
for (var T = [], b = 0, w = u.positions.length + (this.isPolygon ? 0 : -1); b < w; b++)
|
|
2224
|
+
T.push(j(b));
|
|
2574
2225
|
var _ = {
|
|
2575
2226
|
dragHandlers: {
|
|
2576
|
-
onDragStart: function(
|
|
2577
|
-
this.index =
|
|
2227
|
+
onDragStart: function(O, M) {
|
|
2228
|
+
this.index = O + 1, u.positions.splice(this.index, 0, M), u._createPrimitive = !0;
|
|
2578
2229
|
},
|
|
2579
|
-
onDrag: function(
|
|
2580
|
-
|
|
2230
|
+
onDrag: function(O, M) {
|
|
2231
|
+
u.positions[this.index] = M, u._createPrimitive = !0;
|
|
2581
2232
|
},
|
|
2582
|
-
onDragEnd: function(
|
|
2583
|
-
y.insertBillboard(this.index,
|
|
2233
|
+
onDragEnd: function(O, M) {
|
|
2234
|
+
y.insertBillboard(this.index, M, E), m.getBillboard(this.index - 1).position = j(this.index - 1), m.insertBillboard(this.index, j(this.index), _), u._createPrimitive = !0, H();
|
|
2584
2235
|
}
|
|
2585
2236
|
},
|
|
2586
2237
|
tooltip: function() {
|
|
2587
2238
|
return "Drag to create a new point";
|
|
2588
2239
|
}
|
|
2589
2240
|
};
|
|
2590
|
-
m.addBillboards(T, _), this._editMarkers = m, this._globeClickhandler = new p.ScreenSpaceEventHandler(g.canvas), this._globeClickhandler.setInputAction(function(
|
|
2591
|
-
var
|
|
2592
|
-
|
|
2241
|
+
m.addBillboards(T, _), this._editMarkers = m, this._globeClickhandler = new p.ScreenSpaceEventHandler(g.canvas), this._globeClickhandler.setInputAction(function(O) {
|
|
2242
|
+
var M = g.pick(O.position);
|
|
2243
|
+
M && M.primitive || u.setEditMode(!1);
|
|
2593
2244
|
}, p.ScreenSpaceEventType.LEFT_CLICK), y.setOnTop(), m.setOnTop();
|
|
2594
2245
|
}
|
|
2595
2246
|
this._editMode = !0;
|
|
@@ -2599,35 +2250,35 @@ var fe = function() {
|
|
|
2599
2250
|
fe.PolylinePrimitive.prototype.setEditable = function() {
|
|
2600
2251
|
if (!this.setEditMode) {
|
|
2601
2252
|
var c = this;
|
|
2602
|
-
c.isPolygon = !1, c.asynchronous = !1,
|
|
2253
|
+
c.isPolygon = !1, c.asynchronous = !1, o.registerEditableShape(c), c.setEditMode = f;
|
|
2603
2254
|
var g = this.width;
|
|
2604
|
-
c.setHighlighted = function(
|
|
2605
|
-
this._editMode !== !0 && (
|
|
2255
|
+
c.setHighlighted = function(u) {
|
|
2256
|
+
this._editMode !== !0 && (u ? (o.setHighlighted(this), this.setWidth(g * 2)) : this.setWidth(g));
|
|
2606
2257
|
}, c.getExtent = function() {
|
|
2607
2258
|
return p.Rectangle.fromCartographicArray(e.cartesianArrayToCartographicArray(this.positions));
|
|
2608
2259
|
}, q(c), c.setEditMode(!1);
|
|
2609
2260
|
}
|
|
2610
2261
|
}, fe.PolygonPrimitive.prototype.setEditable = function() {
|
|
2611
2262
|
var c = this;
|
|
2612
|
-
c.asynchronous = !1,
|
|
2263
|
+
c.asynchronous = !1, o._scene, o.registerEditableShape(c), c.setEditMode = f, c.setHighlighted = s, q(c), c.setEditMode(!1);
|
|
2613
2264
|
}, fe.ExtentPrimitive.prototype.setEditable = function() {
|
|
2614
2265
|
if (!this.setEditMode) {
|
|
2615
|
-
var c = this, g =
|
|
2616
|
-
|
|
2617
|
-
if (this._editMode !=
|
|
2618
|
-
if (
|
|
2619
|
-
if (
|
|
2266
|
+
var c = this, g = o._scene;
|
|
2267
|
+
o.registerEditableShape(c), c.asynchronous = !1, c.setEditMode = function(u) {
|
|
2268
|
+
if (this._editMode != u)
|
|
2269
|
+
if (o.disableAllHighlights(), u) {
|
|
2270
|
+
if (o.setEdited(this), this._markers == null) {
|
|
2620
2271
|
let E = function() {
|
|
2621
2272
|
c.executeListeners({
|
|
2622
2273
|
name: "onEdited",
|
|
2623
2274
|
extent: c.extent
|
|
2624
2275
|
});
|
|
2625
2276
|
};
|
|
2626
|
-
var y = new
|
|
2277
|
+
var y = new i.BillboardGroup(o, B), m = {
|
|
2627
2278
|
dragHandlers: {
|
|
2628
2279
|
onDrag: function(T, b) {
|
|
2629
2280
|
var w = y.getBillboard((T + 2) % 4).position;
|
|
2630
|
-
c.setExtent(
|
|
2281
|
+
c.setExtent(Y(e.cartesianToCartographic(w), e.cartesianToCartographic(b))), y.updateBillboardsPositions(K(c.extent));
|
|
2631
2282
|
},
|
|
2632
2283
|
onDragEnd: function(T, b) {
|
|
2633
2284
|
E();
|
|
@@ -2647,13 +2298,13 @@ var fe = function() {
|
|
|
2647
2298
|
this._markers != null && (this._markers.remove(), this._markers = null, this._globeClickhandler.destroy()), this._editMode = !1;
|
|
2648
2299
|
}, c.setHighlighted = s, q(c), c.setEditMode(!1);
|
|
2649
2300
|
}
|
|
2650
|
-
},
|
|
2301
|
+
}, i.EllipsePrimitive.prototype.setEditable = function() {
|
|
2651
2302
|
if (!this.setEditMode) {
|
|
2652
|
-
var c = this, g =
|
|
2653
|
-
c.asynchronous = !1,
|
|
2654
|
-
if (this._editMode !=
|
|
2655
|
-
if (
|
|
2656
|
-
|
|
2303
|
+
var c = this, g = o._scene;
|
|
2304
|
+
c.asynchronous = !1, o.registerEditableShape(c), c.setEditMode = function(u) {
|
|
2305
|
+
if (this._editMode != u)
|
|
2306
|
+
if (o.disableAllHighlights(), u) {
|
|
2307
|
+
o.setEdited(this);
|
|
2657
2308
|
var y = this;
|
|
2658
2309
|
if (this._markers == null) {
|
|
2659
2310
|
let T = function() {
|
|
@@ -2674,7 +2325,7 @@ var fe = function() {
|
|
|
2674
2325
|
rotation: 0
|
|
2675
2326
|
});
|
|
2676
2327
|
};
|
|
2677
|
-
var m = new
|
|
2328
|
+
var m = new i.BillboardGroup(o, B), E = {
|
|
2678
2329
|
dragHandlers: {
|
|
2679
2330
|
onDrag: function(w, _) {
|
|
2680
2331
|
var P = p.Cartesian3.distance(c.getCenter(), _);
|
|
@@ -2698,7 +2349,7 @@ var fe = function() {
|
|
|
2698
2349
|
this._markers != null && (this._markers.remove(), this._markers = null, this._globeClickhandler.destroy()), this._editMode = !1;
|
|
2699
2350
|
}, c.setHighlighted = s, q(c), c.setEditMode(!1);
|
|
2700
2351
|
}
|
|
2701
|
-
},
|
|
2352
|
+
}, i.CirclePrimitive.prototype.getCircleCartesianCoordinates = function(c) {
|
|
2702
2353
|
for (var g = p.CircleOutlineGeometry.createGeometry(
|
|
2703
2354
|
new p.CircleOutlineGeometry({
|
|
2704
2355
|
ellipsoid: e,
|
|
@@ -2706,16 +2357,16 @@ var fe = function() {
|
|
|
2706
2357
|
radius: this.getRadius(),
|
|
2707
2358
|
granularity: c
|
|
2708
2359
|
})
|
|
2709
|
-
),
|
|
2710
|
-
y = g.attributes.position.values, m.push(new p.Cartesian3(y[
|
|
2360
|
+
), u = 0, y, m = []; u < g.attributes.position.values.length; u += 3)
|
|
2361
|
+
y = g.attributes.position.values, m.push(new p.Cartesian3(y[u], y[u + 1], y[u + 2]));
|
|
2711
2362
|
return m;
|
|
2712
|
-
},
|
|
2363
|
+
}, i.CirclePrimitive.prototype.setEditable = function() {
|
|
2713
2364
|
if (!this.setEditMode) {
|
|
2714
|
-
var c = this, g =
|
|
2715
|
-
c.asynchronous = !1,
|
|
2716
|
-
if (this._editMode !=
|
|
2717
|
-
if (
|
|
2718
|
-
|
|
2365
|
+
var c = this, g = o._scene;
|
|
2366
|
+
c.asynchronous = !1, o.registerEditableShape(c), c.setEditMode = function(u) {
|
|
2367
|
+
if (this._editMode != u)
|
|
2368
|
+
if (o.disableAllHighlights(), u) {
|
|
2369
|
+
o.setEdited(this);
|
|
2719
2370
|
var y = this;
|
|
2720
2371
|
if (this._markers == null) {
|
|
2721
2372
|
let T = function() {
|
|
@@ -2727,7 +2378,7 @@ var fe = function() {
|
|
|
2727
2378
|
radius: c.getRadius()
|
|
2728
2379
|
});
|
|
2729
2380
|
};
|
|
2730
|
-
var m = new
|
|
2381
|
+
var m = new i.BillboardGroup(o, B), E = {
|
|
2731
2382
|
dragHandlers: {
|
|
2732
2383
|
onDrag: function(w, _) {
|
|
2733
2384
|
c.setRadius(p.Cartesian3.distance(c.getCenter(), _)), m.updateBillboardsPositions(T());
|
|
@@ -2751,8 +2402,8 @@ var fe = function() {
|
|
|
2751
2402
|
}, c.setHighlighted = s, q(c), c.setEditMode(!1);
|
|
2752
2403
|
}
|
|
2753
2404
|
};
|
|
2754
|
-
},
|
|
2755
|
-
function
|
|
2405
|
+
}, i.DrawHelperWidget = function() {
|
|
2406
|
+
function o(s, f) {
|
|
2756
2407
|
if (!p.defined(f.container))
|
|
2757
2408
|
throw new p.DeveloperError("Container is required");
|
|
2758
2409
|
var c = {
|
|
@@ -2764,19 +2415,19 @@ var fe = function() {
|
|
|
2764
2415
|
clearIcon: "./assets/img/glyphicons_067_cleaning.png",
|
|
2765
2416
|
polylineDrawingOptions: S,
|
|
2766
2417
|
polygonDrawingOptions: d,
|
|
2767
|
-
extentDrawingOptions:
|
|
2418
|
+
extentDrawingOptions: h,
|
|
2768
2419
|
circleDrawingOptions: v
|
|
2769
2420
|
};
|
|
2770
|
-
|
|
2771
|
-
var g = this,
|
|
2772
|
-
|
|
2421
|
+
W(f, c);
|
|
2422
|
+
var g = this, u = document.createElement("DIV");
|
|
2423
|
+
u.className = "toolbar", f.container.appendChild(u);
|
|
2773
2424
|
function y(T, b, w, _) {
|
|
2774
2425
|
var P = document.createElement("DIV");
|
|
2775
|
-
P.className = "button", P.title = w,
|
|
2426
|
+
P.className = "button", P.title = w, u.appendChild(P), P.onclick = _;
|
|
2776
2427
|
var H = document.createElement("SPAN");
|
|
2777
2428
|
P.appendChild(H);
|
|
2778
|
-
var
|
|
2779
|
-
return
|
|
2429
|
+
var j = document.createElement("IMG");
|
|
2430
|
+
return j.src = b, H.appendChild(j), P;
|
|
2780
2431
|
}
|
|
2781
2432
|
var m = s._scene;
|
|
2782
2433
|
y("marker", f.markerIcon, "Click to start drawing a 2D marker", function() {
|
|
@@ -2824,52 +2475,52 @@ var fe = function() {
|
|
|
2824
2475
|
});
|
|
2825
2476
|
});
|
|
2826
2477
|
var E = document.createElement("DIV");
|
|
2827
|
-
E.className = "divider",
|
|
2478
|
+
E.className = "divider", u.appendChild(E), y("clear", f.clearIcon, "Remove all primitives", function() {
|
|
2828
2479
|
m.primitives.removeAll();
|
|
2829
2480
|
}), q(this);
|
|
2830
2481
|
}
|
|
2831
|
-
return
|
|
2832
|
-
}(),
|
|
2833
|
-
return s =
|
|
2482
|
+
return o;
|
|
2483
|
+
}(), i.prototype.addToolbar = function(o, s) {
|
|
2484
|
+
return s = D(s, { container: o }), new i.DrawHelperWidget(this, s);
|
|
2834
2485
|
};
|
|
2835
|
-
function
|
|
2486
|
+
function Y(o, s) {
|
|
2836
2487
|
var f = new p.Rectangle();
|
|
2837
|
-
f.west = Math.min(
|
|
2488
|
+
f.west = Math.min(o.longitude, s.longitude), f.east = Math.max(o.longitude, s.longitude), f.south = Math.min(o.latitude, s.latitude), f.north = Math.max(o.latitude, s.latitude);
|
|
2838
2489
|
var c = p.Math.EPSILON7;
|
|
2839
2490
|
return f.east - f.west < c && (f.east += c * 2), f.north - f.south < c && (f.north += c * 2), f;
|
|
2840
2491
|
}
|
|
2841
|
-
function
|
|
2842
|
-
return
|
|
2492
|
+
function z(o, s) {
|
|
2493
|
+
return o.longitude.toFixed(s || 3) + ", " + o.latitude.toFixed(s || 3);
|
|
2843
2494
|
}
|
|
2844
|
-
function V(
|
|
2845
|
-
if (
|
|
2846
|
-
return
|
|
2847
|
-
if (
|
|
2848
|
-
return new
|
|
2849
|
-
s = s || new
|
|
2850
|
-
for (var f in
|
|
2851
|
-
s[f] = typeof s[f] > "u" ? V(
|
|
2495
|
+
function V(o, s) {
|
|
2496
|
+
if (o == null || typeof o != "object" || o.constructor != Object && o.constructor != Array)
|
|
2497
|
+
return o;
|
|
2498
|
+
if (o.constructor == Date || o.constructor == RegExp || o.constructor == Function || o.constructor == String || o.constructor == Number || o.constructor == Boolean)
|
|
2499
|
+
return new o.constructor(o);
|
|
2500
|
+
s = s || new o.constructor();
|
|
2501
|
+
for (var f in o)
|
|
2502
|
+
s[f] = typeof s[f] > "u" ? V(o[f], null) : s[f];
|
|
2852
2503
|
return s;
|
|
2853
2504
|
}
|
|
2854
|
-
function
|
|
2855
|
-
|
|
2505
|
+
function W(o, s) {
|
|
2506
|
+
o = o || {};
|
|
2856
2507
|
var f;
|
|
2857
2508
|
for (f in s)
|
|
2858
|
-
|
|
2509
|
+
o[f] === void 0 && (o[f] = V(s[f]));
|
|
2859
2510
|
}
|
|
2860
|
-
function
|
|
2861
|
-
var f = V(
|
|
2511
|
+
function D(o, s) {
|
|
2512
|
+
var f = V(o), c;
|
|
2862
2513
|
for (c in s)
|
|
2863
2514
|
f[c] === void 0 && (f[c] = V(s[c]));
|
|
2864
2515
|
return f;
|
|
2865
2516
|
}
|
|
2866
|
-
function $(
|
|
2867
|
-
|
|
2517
|
+
function $(o, s, f) {
|
|
2518
|
+
o[s] = f;
|
|
2868
2519
|
}
|
|
2869
|
-
function q(
|
|
2870
|
-
|
|
2520
|
+
function q(o) {
|
|
2521
|
+
o._listeners = {}, o.addListener = function(s, f) {
|
|
2871
2522
|
return this._listeners[s] = this._listeners[s] || [], this._listeners[s].push(f), this._listeners[s].length;
|
|
2872
|
-
},
|
|
2523
|
+
}, o.executeListeners = function(s, f) {
|
|
2873
2524
|
if (this._listeners[s.name] && this._listeners[s.name].length > 0)
|
|
2874
2525
|
for (var c = 0; c < this._listeners[s.name].length; c++)
|
|
2875
2526
|
this._listeners[s.name][c](s);
|
|
@@ -2877,218 +2528,169 @@ var fe = function() {
|
|
|
2877
2528
|
f && f(s);
|
|
2878
2529
|
};
|
|
2879
2530
|
}
|
|
2880
|
-
return
|
|
2531
|
+
return i;
|
|
2881
2532
|
}();
|
|
2882
|
-
const
|
|
2533
|
+
const Rr = 2, Br = (e, n) => {
|
|
2883
2534
|
switch (e) {
|
|
2884
|
-
case
|
|
2885
|
-
if (
|
|
2535
|
+
case ie.BOX: {
|
|
2536
|
+
if (n.features.length !== Rr)
|
|
2886
2537
|
throw new Error(`${e} must have 2 points`);
|
|
2887
|
-
const t =
|
|
2888
|
-
var
|
|
2889
|
-
return ((
|
|
2890
|
-
}),
|
|
2891
|
-
var
|
|
2892
|
-
return ((
|
|
2538
|
+
const t = lt(n.features, (a) => {
|
|
2539
|
+
var r;
|
|
2540
|
+
return ((r = a.properties) == null ? void 0 : r.type) === Ye.BOTTOM_LEFT;
|
|
2541
|
+
}), i = lt(n.features, (a) => {
|
|
2542
|
+
var r;
|
|
2543
|
+
return ((r = a.properties) == null ? void 0 : r.type) === Ye.TOP_RIGHT;
|
|
2893
2544
|
});
|
|
2894
|
-
if (
|
|
2895
|
-
if (t.geometry.coordinates[0] ===
|
|
2896
|
-
throw new Error(
|
|
2897
|
-
|
|
2898
|
-
);
|
|
2899
|
-
return Ce.fromDegrees(
|
|
2545
|
+
if (i && t) {
|
|
2546
|
+
if (t.geometry.coordinates[0] === i.geometry.coordinates[0] && t.geometry.coordinates[1] === i.geometry.coordinates[1])
|
|
2547
|
+
throw new Error(`${e} must define BOTTOM_LEFT and TOP_RIGHT different points`);
|
|
2548
|
+
return we.fromDegrees(
|
|
2900
2549
|
t.geometry.coordinates[0],
|
|
2901
2550
|
t.geometry.coordinates[1],
|
|
2902
|
-
|
|
2903
|
-
|
|
2551
|
+
i.geometry.coordinates[0],
|
|
2552
|
+
i.geometry.coordinates[1]
|
|
2904
2553
|
);
|
|
2905
2554
|
} else
|
|
2906
|
-
throw new Error(
|
|
2907
|
-
`${e} geojson must define BOTTOM_LEFT and TOP_RIGHT points`
|
|
2908
|
-
);
|
|
2555
|
+
throw new Error(`${e} geojson must define BOTTOM_LEFT and TOP_RIGHT points`);
|
|
2909
2556
|
}
|
|
2910
2557
|
default:
|
|
2911
2558
|
throw new Error(`${e} type geoJSON still not supported`);
|
|
2912
2559
|
}
|
|
2913
|
-
},
|
|
2914
|
-
const
|
|
2915
|
-
const
|
|
2916
|
-
return [
|
|
2917
|
-
le.toDegrees(n.longitude),
|
|
2918
|
-
le.toDegrees(n.latitude)
|
|
2919
|
-
];
|
|
2560
|
+
}, Nr = (e) => {
|
|
2561
|
+
const n = e.map((t) => {
|
|
2562
|
+
const i = Ne.fromCartesian(t);
|
|
2563
|
+
return [le.toDegrees(i.longitude), le.toDegrees(i.latitude)];
|
|
2920
2564
|
});
|
|
2921
|
-
return
|
|
2565
|
+
return n.push(n[0]), {
|
|
2922
2566
|
type: "Feature",
|
|
2923
2567
|
properties: {},
|
|
2924
2568
|
geometry: {
|
|
2925
2569
|
type: "Polygon",
|
|
2926
|
-
coordinates: [
|
|
2570
|
+
coordinates: [n]
|
|
2927
2571
|
}
|
|
2928
2572
|
};
|
|
2929
|
-
},
|
|
2930
|
-
const
|
|
2931
|
-
[
|
|
2932
|
-
|
|
2933
|
-
le.toDegrees(e.south)
|
|
2934
|
-
],
|
|
2935
|
-
[
|
|
2936
|
-
le.toDegrees(e.east),
|
|
2937
|
-
le.toDegrees(e.north)
|
|
2938
|
-
]
|
|
2573
|
+
}, Fr = (e) => {
|
|
2574
|
+
const n = Ot.lineString([
|
|
2575
|
+
[le.toDegrees(e.west), le.toDegrees(e.south)],
|
|
2576
|
+
[le.toDegrees(e.east), le.toDegrees(e.north)]
|
|
2939
2577
|
]);
|
|
2940
|
-
return
|
|
2941
|
-
},
|
|
2942
|
-
const
|
|
2578
|
+
return Rt(Dt(n));
|
|
2579
|
+
}, Gr = (e) => {
|
|
2580
|
+
const n = Ot.lineString([
|
|
2943
2581
|
[e.west, e.south],
|
|
2944
2582
|
[e.east, e.north]
|
|
2945
2583
|
]);
|
|
2946
|
-
return
|
|
2947
|
-
(n) => me.fromRadiansArray(n)[0]
|
|
2948
|
-
);
|
|
2584
|
+
return Rt(Dt(n)).geometry.coordinates[0].map((i) => ge.fromRadiansArray(i)[0]);
|
|
2949
2585
|
};
|
|
2950
|
-
class
|
|
2586
|
+
class ts extends ni {
|
|
2951
2587
|
}
|
|
2952
|
-
const
|
|
2953
|
-
const {
|
|
2954
|
-
drawState: i,
|
|
2955
|
-
drawingMaterial: t,
|
|
2956
|
-
drawingVertexColor: n,
|
|
2957
|
-
material: a,
|
|
2958
|
-
hollow: o,
|
|
2959
|
-
outlineWidth: d
|
|
2960
|
-
} = e, u = he(), [v, C] = k();
|
|
2588
|
+
const ns = (e) => {
|
|
2589
|
+
const { drawState: n, drawingMaterial: t, drawingVertexColor: i, material: a, hollow: r, outlineWidth: d } = e, h = pe(), [v, C] = k();
|
|
2961
2590
|
I(() => {
|
|
2962
2591
|
C(
|
|
2963
2592
|
// eslint-disable-next-line
|
|
2964
|
-
new fe(
|
|
2593
|
+
new fe(h, t, i)
|
|
2965
2594
|
);
|
|
2966
2595
|
}, []), I(() => {
|
|
2967
2596
|
if (v) {
|
|
2968
|
-
const
|
|
2969
|
-
if (
|
|
2970
|
-
switch (
|
|
2971
|
-
case
|
|
2972
|
-
|
|
2597
|
+
const x = v;
|
|
2598
|
+
if (n.drawing)
|
|
2599
|
+
switch (n.type) {
|
|
2600
|
+
case ie.POLYGON:
|
|
2601
|
+
h.scene.globe.depthTestAgainstTerrain = !1, x.startDrawingPolygon({
|
|
2973
2602
|
callback: (L) => {
|
|
2974
|
-
|
|
2603
|
+
n.handler({
|
|
2975
2604
|
primitive: L,
|
|
2976
|
-
type:
|
|
2977
|
-
geojson:
|
|
2605
|
+
type: ie.POLYGON,
|
|
2606
|
+
geojson: Nr(L)
|
|
2978
2607
|
});
|
|
2979
2608
|
}
|
|
2980
2609
|
});
|
|
2981
2610
|
break;
|
|
2982
|
-
case
|
|
2983
|
-
|
|
2611
|
+
case ie.BOX:
|
|
2612
|
+
h.scene.globe.depthTestAgainstTerrain = !1, x.startDrawingExtent({
|
|
2984
2613
|
callback: (L) => {
|
|
2985
|
-
|
|
2614
|
+
n.handler({
|
|
2986
2615
|
primitive: L,
|
|
2987
|
-
type:
|
|
2988
|
-
geojson:
|
|
2616
|
+
type: ie.BOX,
|
|
2617
|
+
geojson: Fr(L)
|
|
2989
2618
|
});
|
|
2990
2619
|
}
|
|
2991
2620
|
});
|
|
2992
2621
|
break;
|
|
2993
2622
|
default:
|
|
2994
|
-
throw new Error(
|
|
2995
|
-
`[CESIUM DRAW]: ${i.type} unrecognized primitive to draw.`
|
|
2996
|
-
);
|
|
2623
|
+
throw new Error(`[CESIUM DRAW]: ${n.type} unrecognized primitive to draw.`);
|
|
2997
2624
|
}
|
|
2998
2625
|
else
|
|
2999
|
-
|
|
2626
|
+
x.stopDrawing(), h.scene.globe.depthTestAgainstTerrain = !0;
|
|
3000
2627
|
}
|
|
3001
|
-
}, [
|
|
3002
|
-
const S = (
|
|
3003
|
-
let L =
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
return /* @__PURE__ */ l(
|
|
3011
|
-
Sr,
|
|
3012
|
-
{
|
|
3013
|
-
coordinates: L,
|
|
3014
|
-
material: a ?? t
|
|
3015
|
-
}
|
|
3016
|
-
);
|
|
3017
|
-
case re.POLYGON:
|
|
3018
|
-
return /* @__PURE__ */ l(
|
|
3019
|
-
_r,
|
|
3020
|
-
{
|
|
3021
|
-
hierarchy: new Zi(L),
|
|
3022
|
-
material: a ?? t
|
|
3023
|
-
}
|
|
3024
|
-
);
|
|
2628
|
+
}, [n, v]);
|
|
2629
|
+
const S = (x) => {
|
|
2630
|
+
let L = x.coordinates !== void 0 ? x.coordinates : Br(x.type, x.geojson);
|
|
2631
|
+
if (r !== !0)
|
|
2632
|
+
switch (x.type) {
|
|
2633
|
+
case ie.BOX:
|
|
2634
|
+
return /* @__PURE__ */ l(Ir, { coordinates: L, material: a ?? t });
|
|
2635
|
+
case ie.POLYGON:
|
|
2636
|
+
return /* @__PURE__ */ l(kr, { hierarchy: new ii(L), material: a ?? t });
|
|
3025
2637
|
default:
|
|
3026
|
-
return /* @__PURE__ */ l(
|
|
2638
|
+
return /* @__PURE__ */ l(re, {});
|
|
3027
2639
|
}
|
|
3028
2640
|
else {
|
|
3029
|
-
switch (
|
|
3030
|
-
case
|
|
3031
|
-
L =
|
|
2641
|
+
switch (x.type) {
|
|
2642
|
+
case ie.BOX:
|
|
2643
|
+
L = Gr(L);
|
|
3032
2644
|
break;
|
|
3033
|
-
case
|
|
3034
|
-
L = [
|
|
3035
|
-
...L,
|
|
3036
|
-
L[0]
|
|
3037
|
-
];
|
|
2645
|
+
case ie.POLYGON:
|
|
2646
|
+
L = [...L, L[0]];
|
|
3038
2647
|
break;
|
|
3039
2648
|
default:
|
|
3040
|
-
return /* @__PURE__ */ l(
|
|
2649
|
+
return /* @__PURE__ */ l(re, {});
|
|
3041
2650
|
}
|
|
3042
|
-
return /* @__PURE__ */ l(
|
|
3043
|
-
Pr,
|
|
3044
|
-
{
|
|
3045
|
-
positions: L,
|
|
3046
|
-
width: d ?? 1,
|
|
3047
|
-
material: a ?? t
|
|
3048
|
-
}
|
|
3049
|
-
);
|
|
2651
|
+
return /* @__PURE__ */ l(Dr, { positions: L, width: d ?? 1, material: a ?? t });
|
|
3050
2652
|
}
|
|
3051
2653
|
};
|
|
3052
|
-
return /* @__PURE__ */ l(
|
|
3053
|
-
/* @__PURE__ */
|
|
3054
|
-
/* @__PURE__ */
|
|
2654
|
+
return /* @__PURE__ */ l(Or, { ...e, children: e.drawings.map((x, L) => /* @__PURE__ */ R(Ar, { name: x.name, children: [
|
|
2655
|
+
/* @__PURE__ */ R(xr, { children: [
|
|
2656
|
+
/* @__PURE__ */ R("h1", { children: [
|
|
3055
2657
|
"Drawed Entity ",
|
|
3056
|
-
|
|
2658
|
+
x.name
|
|
3057
2659
|
] }),
|
|
3058
2660
|
/* @__PURE__ */ l("p", { children: "This is description of drawed entity" })
|
|
3059
2661
|
] }),
|
|
3060
|
-
S(
|
|
3061
|
-
] },
|
|
2662
|
+
S(x)
|
|
2663
|
+
] }, x.id)) });
|
|
3062
2664
|
};
|
|
3063
|
-
class
|
|
2665
|
+
class is extends ri {
|
|
3064
2666
|
}
|
|
3065
|
-
class
|
|
2667
|
+
class rs extends oi {
|
|
3066
2668
|
}
|
|
3067
|
-
class
|
|
2669
|
+
class os extends si {
|
|
3068
2670
|
}
|
|
3069
|
-
class
|
|
2671
|
+
class ss extends _e {
|
|
3070
2672
|
}
|
|
3071
|
-
class
|
|
2673
|
+
class as extends ge {
|
|
3072
2674
|
}
|
|
3073
|
-
class
|
|
2675
|
+
class ls extends Ne {
|
|
3074
2676
|
}
|
|
3075
|
-
class
|
|
2677
|
+
class cs extends ai {
|
|
3076
2678
|
}
|
|
3077
|
-
class
|
|
2679
|
+
class ds extends li {
|
|
3078
2680
|
}
|
|
3079
|
-
class
|
|
2681
|
+
class us extends ci {
|
|
3080
2682
|
}
|
|
3081
|
-
class
|
|
2683
|
+
class hs extends we {
|
|
3082
2684
|
}
|
|
3083
|
-
class
|
|
2685
|
+
class ps extends di {
|
|
3084
2686
|
}
|
|
3085
|
-
class
|
|
2687
|
+
class ms extends ui {
|
|
3086
2688
|
}
|
|
3087
|
-
class
|
|
2689
|
+
class gs extends hi {
|
|
3088
2690
|
}
|
|
3089
|
-
const
|
|
3090
|
-
const
|
|
3091
|
-
const [
|
|
2691
|
+
const fs = pi, ys = mi;
|
|
2692
|
+
const Hr = 38, Vr = 40, zr = 13, $r = 14, Ur = 27, Wr = 9, jr = 10, Kr = 100, qr = (e) => {
|
|
2693
|
+
const [n, t] = k(e.defaultValue ?? ""), [i, a] = k(!1), [r, d] = k({
|
|
3092
2694
|
helperVisible: !1,
|
|
3093
2695
|
left: 0,
|
|
3094
2696
|
right: 0,
|
|
@@ -3101,131 +2703,128 @@ const Or = 38, Dr = 40, Rr = 13, Br = 14, Nr = 27, Fr = 9, Hr = 10, Gr = 100, Vr
|
|
|
3101
2703
|
value: "",
|
|
3102
2704
|
caret: 0,
|
|
3103
2705
|
width: "unset"
|
|
3104
|
-
}),
|
|
3105
|
-
I(() => (window.addEventListener("resize",
|
|
2706
|
+
}), h = ve(null);
|
|
2707
|
+
I(() => (window.addEventListener("resize", U), () => {
|
|
3106
2708
|
try {
|
|
3107
|
-
window.removeEventListener("resize",
|
|
2709
|
+
window.removeEventListener("resize", U);
|
|
3108
2710
|
} catch (g) {
|
|
3109
2711
|
console.log('WINDOW "resize" remove listener failed', g);
|
|
3110
2712
|
}
|
|
3111
2713
|
}), []), I(() => {
|
|
3112
2714
|
typeof e.value < "u" && t(e.value), typeof e.defaultValue < "u" && t(e.defaultValue);
|
|
3113
2715
|
}, [e.value, e.defaultValue]), I(() => {
|
|
3114
|
-
const { options: g } = e, { caret:
|
|
3115
|
-
|
|
2716
|
+
const { options: g } = e, { caret: u } = r;
|
|
2717
|
+
Y(n, u, g);
|
|
3116
2718
|
}, [e]);
|
|
3117
|
-
const v = (g,
|
|
2719
|
+
const v = (g, u, y) => {
|
|
3118
2720
|
const { trigger: m, matchAny: E, regex: T } = e, b = new RegExp(T);
|
|
3119
2721
|
let w = m;
|
|
3120
2722
|
Array.isArray(w) || (w = new Array(m)), w.sort();
|
|
3121
2723
|
const _ = {};
|
|
3122
|
-
Array.isArray(y) && w.forEach((
|
|
3123
|
-
_[
|
|
2724
|
+
Array.isArray(y) && w.forEach((j) => {
|
|
2725
|
+
_[j] = y;
|
|
3124
2726
|
});
|
|
3125
2727
|
const P = C(w, b);
|
|
3126
2728
|
let H = {};
|
|
3127
|
-
for (let
|
|
3128
|
-
const { triggerStr:
|
|
3129
|
-
for (let
|
|
3130
|
-
const
|
|
2729
|
+
for (let j = 0; j < P.length; j++) {
|
|
2730
|
+
const { triggerStr: O, triggerMatch: M, triggerLength: A } = P[j];
|
|
2731
|
+
for (let F = u - 1; F >= 0; --F) {
|
|
2732
|
+
const oe = g.substring(F, u).match(b);
|
|
3131
2733
|
let ee = -1;
|
|
3132
|
-
if (
|
|
3133
|
-
const se =
|
|
3134
|
-
if (se < 0 || (S(
|
|
2734
|
+
if (A > 0) {
|
|
2735
|
+
const se = M ? F : F - A + 1;
|
|
2736
|
+
if (se < 0 || (S(O, g, se) && (ee = se + A), !oe && ee < 0))
|
|
3135
2737
|
break;
|
|
3136
2738
|
} else {
|
|
3137
|
-
if (
|
|
2739
|
+
if (oe && F > 0)
|
|
3138
2740
|
continue;
|
|
3139
|
-
if (ee =
|
|
2741
|
+
if (ee = F === 0 && oe ? 0 : F + 1, u - ee === 0)
|
|
3140
2742
|
break;
|
|
3141
2743
|
}
|
|
3142
2744
|
if (ee >= 0) {
|
|
3143
|
-
const se = _[
|
|
2745
|
+
const se = _[O];
|
|
3144
2746
|
if (!Array.isArray(se))
|
|
3145
2747
|
continue;
|
|
3146
|
-
const
|
|
3147
|
-
const
|
|
3148
|
-
return
|
|
3149
|
-
}),
|
|
2748
|
+
const Se = g.substring(ee, u), Ae = se.filter((Yt) => {
|
|
2749
|
+
const rt = Yt.toLowerCase().indexOf(Se.toLowerCase());
|
|
2750
|
+
return rt !== -1 && (E || rt === 0);
|
|
2751
|
+
}), Kt = O, qt = Se.length;
|
|
3150
2752
|
H = {
|
|
3151
2753
|
...H,
|
|
3152
|
-
trigger:
|
|
2754
|
+
trigger: Kt,
|
|
3153
2755
|
matchStart: ee,
|
|
3154
|
-
matchLength:
|
|
3155
|
-
options:
|
|
2756
|
+
matchLength: qt,
|
|
2757
|
+
options: Ae
|
|
3156
2758
|
};
|
|
3157
2759
|
}
|
|
3158
2760
|
}
|
|
3159
2761
|
}
|
|
3160
2762
|
return H;
|
|
3161
|
-
}, C = (g,
|
|
2763
|
+
}, C = (g, u) => g.map((m) => ({
|
|
3162
2764
|
triggerStr: m,
|
|
3163
|
-
triggerMatch: m.match(
|
|
2765
|
+
triggerMatch: m.match(u),
|
|
3164
2766
|
triggerLength: m.length
|
|
3165
|
-
})), S = (g,
|
|
3166
|
-
const { onChange:
|
|
3167
|
-
if (w.length ||
|
|
3168
|
-
...
|
|
2767
|
+
})), S = (g, u, y) => !g || !g.length || u.substr(y, g.length) === g, x = (g) => {
|
|
2768
|
+
const { onChange: u, options: y, spaceRemovers: m, spacer: E, value: T } = e, b = n, w = g.target.value, _ = vi(L(g.target)).end;
|
|
2769
|
+
if (w.length || G({
|
|
2770
|
+
...r,
|
|
3169
2771
|
helperVisible: !1
|
|
3170
|
-
}), t(w),
|
|
3171
|
-
...
|
|
2772
|
+
}), t(w), G({
|
|
2773
|
+
...r,
|
|
3172
2774
|
caret: _,
|
|
3173
2775
|
value: g.target.value
|
|
3174
2776
|
}), !w.length || !_)
|
|
3175
|
-
return
|
|
3176
|
-
if (
|
|
2777
|
+
return u(g.target.value);
|
|
2778
|
+
if (i && m.length && w.length > 2 && E.length) {
|
|
3177
2779
|
for (let P = 0; P < Math.max(b.length, w.length); ++P)
|
|
3178
2780
|
if (b[P] !== w[P]) {
|
|
3179
|
-
if (P >= 2 && w[P - 1] === E && m.indexOf(w[P - 2]) === -1 && m.indexOf(w[P]) !== -1 && !
|
|
3180
|
-
const H = `${w.slice(0, P - 1)}${w.slice(
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
)}${w.slice(P - 1, P)}${w.slice(P + 1)}`;
|
|
3184
|
-
return Y(P + 1), u.current !== null && (u.current.value = H), T || F({
|
|
3185
|
-
...o,
|
|
2781
|
+
if (P >= 2 && w[P - 1] === E && m.indexOf(w[P - 2]) === -1 && m.indexOf(w[P]) !== -1 && !qe(v(w.substring(0, P - 2), _ - 3, y))) {
|
|
2782
|
+
const H = `${w.slice(0, P - 1)}${w.slice(P, P + 1)}${w.slice(P - 1, P)}${w.slice(P + 1)}`;
|
|
2783
|
+
return J(P + 1), h.current !== null && (h.current.value = H), T || G({
|
|
2784
|
+
...r,
|
|
3186
2785
|
value: H
|
|
3187
|
-
}),
|
|
2786
|
+
}), u(H);
|
|
3188
2787
|
}
|
|
3189
2788
|
break;
|
|
3190
2789
|
}
|
|
3191
2790
|
a(!1);
|
|
3192
2791
|
}
|
|
3193
|
-
return
|
|
2792
|
+
return Y(w, _, y), u(g.target.value);
|
|
3194
2793
|
}, L = (g) => {
|
|
3195
2794
|
if (g !== void 0)
|
|
3196
2795
|
if (g.children.length > 0) {
|
|
3197
|
-
const
|
|
3198
|
-
if (
|
|
3199
|
-
return
|
|
2796
|
+
const u = g.getElementsByTagName("textarea");
|
|
2797
|
+
if (u.length > 0)
|
|
2798
|
+
return u[0];
|
|
3200
2799
|
const y = g.getElementsByTagName("input");
|
|
3201
2800
|
if (y.length > 0)
|
|
3202
2801
|
return y[0];
|
|
3203
2802
|
} else
|
|
3204
2803
|
return g;
|
|
3205
|
-
},
|
|
3206
|
-
const { helperVisible:
|
|
3207
|
-
if (
|
|
2804
|
+
}, B = (g) => {
|
|
2805
|
+
const { helperVisible: u, options: y, selection: m } = r, { onKeyDown: E, passThroughEnter: T } = e;
|
|
2806
|
+
if (u)
|
|
3208
2807
|
switch (g.keyCode) {
|
|
3209
|
-
case
|
|
3210
|
-
g.preventDefault(),
|
|
2808
|
+
case Ur:
|
|
2809
|
+
g.preventDefault(), z();
|
|
3211
2810
|
break;
|
|
3212
|
-
case
|
|
3213
|
-
g.preventDefault(),
|
|
3214
|
-
...
|
|
2811
|
+
case Hr:
|
|
2812
|
+
g.preventDefault(), G({
|
|
2813
|
+
...r,
|
|
3215
2814
|
selection: (y.length + m - 1) % y.length
|
|
3216
2815
|
});
|
|
3217
2816
|
break;
|
|
3218
|
-
case
|
|
3219
|
-
g.preventDefault(),
|
|
3220
|
-
...
|
|
2817
|
+
case Vr:
|
|
2818
|
+
g.preventDefault(), G({
|
|
2819
|
+
...r,
|
|
3221
2820
|
selection: (m + 1) % y.length
|
|
3222
2821
|
});
|
|
3223
2822
|
break;
|
|
3224
|
-
case
|
|
3225
|
-
case
|
|
2823
|
+
case $r:
|
|
2824
|
+
case zr:
|
|
3226
2825
|
T || g.preventDefault(), K(m);
|
|
3227
2826
|
break;
|
|
3228
|
-
case
|
|
2827
|
+
case Wr:
|
|
3229
2828
|
K(m);
|
|
3230
2829
|
break;
|
|
3231
2830
|
default:
|
|
@@ -3234,92 +2833,73 @@ const Or = 38, Dr = 40, Rr = 13, Br = 14, Nr = 27, Fr = 9, Hr = 10, Gr = 100, Vr
|
|
|
3234
2833
|
}
|
|
3235
2834
|
else
|
|
3236
2835
|
E(g);
|
|
3237
|
-
},
|
|
3238
|
-
|
|
3239
|
-
...
|
|
2836
|
+
}, U = () => {
|
|
2837
|
+
G({
|
|
2838
|
+
...r,
|
|
3240
2839
|
helperVisible: !1
|
|
3241
2840
|
});
|
|
3242
2841
|
}, K = (g) => {
|
|
3243
|
-
const { spacer:
|
|
3244
|
-
|
|
3245
|
-
},
|
|
3246
|
-
|
|
3247
|
-
...
|
|
2842
|
+
const { spacer: u, onSelect: y, changeOnSelect: m } = e, { matchStart: E, matchLength: T, options: b, trigger: w } = r, _ = b[g], P = n, H = P.substring(0, E - w.length), j = P.substring(E + T), O = { target: h.current }, M = m(w, _);
|
|
2843
|
+
O.target !== null && (O.target.value = `${H}${M}${u}${j}`), x(O), O.target !== null && y(O.target.value), z(), J(H.length + M.length + 1), a(!0);
|
|
2844
|
+
}, J = (g) => {
|
|
2845
|
+
G({
|
|
2846
|
+
...r,
|
|
3248
2847
|
caret: g
|
|
3249
2848
|
});
|
|
3250
|
-
const
|
|
3251
|
-
|
|
3252
|
-
},
|
|
2849
|
+
const u = L(h.current);
|
|
2850
|
+
Ei(u, g);
|
|
2851
|
+
}, G = (g) => {
|
|
3253
2852
|
setTimeout(() => {
|
|
3254
2853
|
d({
|
|
3255
2854
|
...g
|
|
3256
2855
|
});
|
|
3257
2856
|
}, 0);
|
|
3258
|
-
},
|
|
3259
|
-
const m =
|
|
3260
|
-
if (
|
|
2857
|
+
}, Y = (g, u, y) => {
|
|
2858
|
+
const m = h.current;
|
|
2859
|
+
if (h.current === null)
|
|
3261
2860
|
return;
|
|
3262
2861
|
const E = L(m);
|
|
3263
2862
|
if (E === void 0)
|
|
3264
2863
|
return;
|
|
3265
|
-
const T = m.getBoundingClientRect(), b = v(g,
|
|
2864
|
+
const T = m.getBoundingClientRect(), b = v(g, u, y);
|
|
3266
2865
|
if (Object.keys(b).length > 0 && E !== null) {
|
|
3267
|
-
const w =
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
mode: M
|
|
3272
|
-
} = e;
|
|
3273
|
-
let x, B, G, pe = "unset";
|
|
3274
|
-
M === "assist" ? (x = m === E ? w.top + E.offsetTop : w.top + T.top, B = Math.min(
|
|
3275
|
-
w.left + E.offsetLeft - Hr,
|
|
3276
|
-
E.offsetLeft + _.width - Gr
|
|
3277
|
-
)) : (x = T.top + m.offsetHeight, B = m.offsetLeft, G = m.offsetLeft - m.offsetWidth, pe = `${T.width}px`), b.matchLength >= P && (b.options.length > 1 || b.options.length === 1 && b.options[0].length !== b.matchLength) ? F({
|
|
3278
|
-
...o,
|
|
2866
|
+
const w = yi(E, u), _ = E.getBoundingClientRect(), { minChars: P, onRequestOptions: H, requestOnlyIfNoOptions: j, mode: O } = e;
|
|
2867
|
+
let M, A, F, de = "unset";
|
|
2868
|
+
O === "assist" ? (M = m === E ? w.top + E.offsetTop : w.top + T.top, A = Math.min(w.left + E.offsetLeft - jr, E.offsetLeft + _.width - Kr)) : (M = T.top + m.offsetHeight, A = m.offsetLeft, F = m.offsetLeft - m.offsetWidth, de = `${T.width}px`), b.matchLength >= P && (b.options.length > 1 || b.options.length === 1 && b.options[0].length !== b.matchLength) ? G({
|
|
2869
|
+
...r,
|
|
3279
2870
|
value: g,
|
|
3280
2871
|
helperVisible: !0,
|
|
3281
|
-
top:
|
|
3282
|
-
left:
|
|
3283
|
-
right:
|
|
3284
|
-
width:
|
|
2872
|
+
top: M,
|
|
2873
|
+
left: A,
|
|
2874
|
+
right: F,
|
|
2875
|
+
width: de,
|
|
3285
2876
|
...b
|
|
3286
|
-
}) : ((!
|
|
2877
|
+
}) : ((!j || !b.options.length) && H(g.substr(b.matchStart, b.matchLength)), z());
|
|
3287
2878
|
} else
|
|
3288
|
-
|
|
3289
|
-
},
|
|
2879
|
+
z();
|
|
2880
|
+
}, z = () => {
|
|
3290
2881
|
setTimeout(() => {
|
|
3291
|
-
|
|
3292
|
-
...
|
|
2882
|
+
G({
|
|
2883
|
+
...r,
|
|
3293
2884
|
helperVisible: !1,
|
|
3294
2885
|
selection: 0
|
|
3295
2886
|
});
|
|
3296
2887
|
}, 100);
|
|
3297
2888
|
}, V = () => {
|
|
3298
|
-
const {
|
|
3299
|
-
helperVisible: g,
|
|
3300
|
-
left: h,
|
|
3301
|
-
right: y,
|
|
3302
|
-
matchStart: m,
|
|
3303
|
-
matchLength: E,
|
|
3304
|
-
options: T,
|
|
3305
|
-
selection: b,
|
|
3306
|
-
top: w,
|
|
3307
|
-
value: _,
|
|
3308
|
-
width: P
|
|
3309
|
-
} = o;
|
|
2889
|
+
const { helperVisible: g, left: u, right: y, matchStart: m, matchLength: E, options: T, selection: b, top: w, value: _, width: P } = r;
|
|
3310
2890
|
if (!g)
|
|
3311
2891
|
return null;
|
|
3312
|
-
const { maxOptions: H, offsetX:
|
|
2892
|
+
const { maxOptions: H, offsetX: j, offsetY: O, direction: M } = e;
|
|
3313
2893
|
if (T.length === 0)
|
|
3314
2894
|
return null;
|
|
3315
2895
|
if (b >= T.length)
|
|
3316
|
-
return
|
|
3317
|
-
...
|
|
2896
|
+
return G({
|
|
2897
|
+
...r,
|
|
3318
2898
|
selection: 0
|
|
3319
2899
|
}), null;
|
|
3320
|
-
const
|
|
3321
|
-
const se =
|
|
3322
|
-
return /* @__PURE__ */
|
|
2900
|
+
const A = H === 0 ? T.length : H, F = T.slice(0, A).map((oe, ee) => {
|
|
2901
|
+
const se = oe.toLowerCase().indexOf(_.substr(m, E).toLowerCase());
|
|
2902
|
+
return /* @__PURE__ */ R(
|
|
3323
2903
|
"li",
|
|
3324
2904
|
{
|
|
3325
2905
|
className: ee === b ? "active" : void 0,
|
|
@@ -3327,53 +2907,38 @@ const Or = 38, Dr = 40, Rr = 13, Br = 14, Nr = 27, Fr = 9, Hr = 10, Gr = 100, Vr
|
|
|
3327
2907
|
K(ee);
|
|
3328
2908
|
},
|
|
3329
2909
|
onMouseEnter: () => {
|
|
3330
|
-
|
|
3331
|
-
...
|
|
2910
|
+
G({
|
|
2911
|
+
...r,
|
|
3332
2912
|
selection: ee
|
|
3333
2913
|
});
|
|
3334
2914
|
},
|
|
3335
2915
|
children: [
|
|
3336
|
-
|
|
3337
|
-
/* @__PURE__ */ l("strong", { children:
|
|
3338
|
-
|
|
2916
|
+
oe.slice(0, se),
|
|
2917
|
+
/* @__PURE__ */ l("strong", { children: oe.substr(se, E) }),
|
|
2918
|
+
oe.slice(se + E)
|
|
3339
2919
|
]
|
|
3340
2920
|
},
|
|
3341
|
-
|
|
2921
|
+
oe
|
|
3342
2922
|
);
|
|
3343
|
-
}),
|
|
3344
|
-
return /* @__PURE__ */ l(
|
|
3345
|
-
|
|
3346
|
-
{
|
|
3347
|
-
className: "react-autocomplete-input",
|
|
3348
|
-
style: { ...pe, top: w + M, width: P },
|
|
3349
|
-
children: G
|
|
3350
|
-
}
|
|
3351
|
-
);
|
|
3352
|
-
}, {
|
|
3353
|
-
Component: j,
|
|
3354
|
-
ComponentProps: O,
|
|
3355
|
-
defaultValue: $,
|
|
3356
|
-
disabled: q,
|
|
3357
|
-
onBlur: r,
|
|
3358
|
-
value: s,
|
|
3359
|
-
...f
|
|
3360
|
-
} = e, c = Object.assign({}, f);
|
|
2923
|
+
}), de = M === "ltr" ? { left: u + j } : { right: y + j };
|
|
2924
|
+
return /* @__PURE__ */ l("ul", { className: "react-autocomplete-input", style: { ...de, top: w + O, width: P }, children: F });
|
|
2925
|
+
}, { Component: W, ComponentProps: D, defaultValue: $, disabled: q, onBlur: o, value: s, ...f } = e, c = Object.assign({}, f);
|
|
3361
2926
|
return Object.keys(e).forEach((g) => {
|
|
3362
2927
|
delete c[g];
|
|
3363
|
-
}), /* @__PURE__ */
|
|
3364
|
-
|
|
2928
|
+
}), /* @__PURE__ */ R(re, { children: [
|
|
2929
|
+
Ee.cloneElement(W, {
|
|
3365
2930
|
disabled: q,
|
|
3366
|
-
onBlur:
|
|
3367
|
-
onChange:
|
|
3368
|
-
onKeyDown:
|
|
3369
|
-
ref:
|
|
3370
|
-
value:
|
|
2931
|
+
onBlur: o,
|
|
2932
|
+
onChange: x,
|
|
2933
|
+
onKeyDown: B,
|
|
2934
|
+
ref: h,
|
|
2935
|
+
value: n,
|
|
3371
2936
|
...c,
|
|
3372
|
-
...
|
|
2937
|
+
...D
|
|
3373
2938
|
}),
|
|
3374
2939
|
V()
|
|
3375
2940
|
] });
|
|
3376
|
-
},
|
|
2941
|
+
}, Yr = {
|
|
3377
2942
|
Component: /* @__PURE__ */ l("textarea", {}),
|
|
3378
2943
|
ComponentProps: {},
|
|
3379
2944
|
defaultValue: void 0,
|
|
@@ -3389,7 +2954,7 @@ const Or = 38, Dr = 40, Rr = 13, Br = 14, Nr = 27, Fr = 9, Hr = 10, Gr = 100, Vr
|
|
|
3389
2954
|
},
|
|
3390
2955
|
onSelect: (e) => {
|
|
3391
2956
|
},
|
|
3392
|
-
changeOnSelect: (e,
|
|
2957
|
+
changeOnSelect: (e, n) => `${e}${n}`,
|
|
3393
2958
|
options: [],
|
|
3394
2959
|
regex: "^[A-Za-z0-9\\-_]+$",
|
|
3395
2960
|
matchAny: !1,
|
|
@@ -3404,38 +2969,38 @@ const Or = 38, Dr = 40, Rr = 13, Br = 14, Nr = 27, Fr = 9, Hr = 10, Gr = 100, Vr
|
|
|
3404
2969
|
passThroughEnter: !1,
|
|
3405
2970
|
mode: "assist",
|
|
3406
2971
|
direction: "ltr"
|
|
3407
|
-
},
|
|
3408
|
-
let
|
|
3409
|
-
...
|
|
2972
|
+
}, vs = (e) => {
|
|
2973
|
+
let n = {
|
|
2974
|
+
...Yr,
|
|
3410
2975
|
...e
|
|
3411
2976
|
};
|
|
3412
|
-
return e.mode === "autocomplete" && (
|
|
3413
|
-
...
|
|
2977
|
+
return e.mode === "autocomplete" && (n = {
|
|
2978
|
+
...n,
|
|
3414
2979
|
trigger: "",
|
|
3415
2980
|
regex: ".",
|
|
3416
2981
|
spacer: ""
|
|
3417
|
-
}), /* @__PURE__ */ l(
|
|
2982
|
+
}), /* @__PURE__ */ l(qr, { ...n });
|
|
3418
2983
|
}, it = {
|
|
3419
|
-
formatFileModDate: (e,
|
|
3420
|
-
const t =
|
|
2984
|
+
formatFileModDate: (e, n) => {
|
|
2985
|
+
const t = Bt.getModDate(n);
|
|
3421
2986
|
return t ? e.formatDate(t, {
|
|
3422
2987
|
dateStyle: "short",
|
|
3423
2988
|
timeStyle: "short"
|
|
3424
2989
|
}) : null;
|
|
3425
2990
|
},
|
|
3426
|
-
formatFileSize: (e,
|
|
3427
|
-
if (!
|
|
2991
|
+
formatFileSize: (e, n) => {
|
|
2992
|
+
if (!n || typeof n.size != "number")
|
|
3428
2993
|
return null;
|
|
3429
|
-
const t =
|
|
2994
|
+
const t = n.size, i = Ti(t, {
|
|
3430
2995
|
bits: !1,
|
|
3431
2996
|
output: "object"
|
|
3432
2997
|
});
|
|
3433
|
-
return
|
|
2998
|
+
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()}`;
|
|
3434
2999
|
}
|
|
3435
|
-
},
|
|
3000
|
+
}, Xr = {
|
|
3436
3001
|
locale: ce.EN,
|
|
3437
3002
|
formatters: { ...it }
|
|
3438
|
-
},
|
|
3003
|
+
}, Zr = {
|
|
3439
3004
|
locale: ce.RU,
|
|
3440
3005
|
formatters: { ...it },
|
|
3441
3006
|
messages: {
|
|
@@ -3475,7 +3040,7 @@ const Or = 38, Dr = 40, Rr = 13, Br = 14, Nr = 27, Fr = 9, Hr = 10, Gr = 100, Vr
|
|
|
3475
3040
|
[`chonky.actions.${N.ToggleHiddenFiles.id}.button.name`]: "Скрытые файлы",
|
|
3476
3041
|
[`chonky.actions.${N.ToggleShowFoldersFirst.id}.button.name`]: "Папки в начале"
|
|
3477
3042
|
}
|
|
3478
|
-
},
|
|
3043
|
+
}, Jr = {
|
|
3479
3044
|
locale: ce.HE,
|
|
3480
3045
|
formatters: { ...it },
|
|
3481
3046
|
messages: {
|
|
@@ -3514,32 +3079,32 @@ const Or = 38, Dr = 40, Rr = 13, Br = 14, Nr = 27, Fr = 9, Hr = 10, Gr = 100, Vr
|
|
|
3514
3079
|
[`chonky.actions.${N.ToggleHiddenFiles.id}.button.name`]: "קבצים נסתרים",
|
|
3515
3080
|
[`chonky.actions.${N.ToggleShowFoldersFirst.id}.button.name`]: "הצגת תיקיות בראש הרשימה"
|
|
3516
3081
|
}
|
|
3517
|
-
},
|
|
3518
|
-
[ce.EN]:
|
|
3519
|
-
[ce.RU]:
|
|
3520
|
-
[ce.HE]:
|
|
3082
|
+
}, Qr = {
|
|
3083
|
+
[ce.EN]: Xr,
|
|
3084
|
+
[ce.RU]: Zr,
|
|
3085
|
+
[ce.HE]: Jr
|
|
3521
3086
|
};
|
|
3522
|
-
class
|
|
3087
|
+
class Es extends Bt {
|
|
3523
3088
|
}
|
|
3524
|
-
const
|
|
3089
|
+
const Cs = N, eo = {
|
|
3525
3090
|
listView: N.EnableListView.id,
|
|
3526
3091
|
gridView: N.EnableGridView.id
|
|
3527
3092
|
};
|
|
3528
|
-
|
|
3529
|
-
const
|
|
3530
|
-
|
|
3093
|
+
Ci({ iconComponent: bi });
|
|
3094
|
+
const ws = Ee.memo(
|
|
3095
|
+
Ee.forwardRef(
|
|
3531
3096
|
({
|
|
3532
3097
|
theme: e,
|
|
3533
|
-
styles:
|
|
3534
|
-
defaultView: t =
|
|
3535
|
-
readOnlyMode:
|
|
3098
|
+
styles: n = { height: "100%", minWidth: "600px" },
|
|
3099
|
+
defaultView: t = eo.listView,
|
|
3100
|
+
readOnlyMode: i = !1,
|
|
3536
3101
|
locale: a,
|
|
3537
|
-
files:
|
|
3102
|
+
files: r,
|
|
3538
3103
|
folderChain: d,
|
|
3539
|
-
onFileAction:
|
|
3104
|
+
onFileAction: h,
|
|
3540
3105
|
...v
|
|
3541
3106
|
}, C) => {
|
|
3542
|
-
const S =
|
|
3107
|
+
const S = me(
|
|
3543
3108
|
($) => null,
|
|
3544
3109
|
// file.thumbnailUrl ? `https://chonky.io${file.thumbnailUrl}` : null,
|
|
3545
3110
|
[]
|
|
@@ -3554,42 +3119,34 @@ const ms = ve.memo(
|
|
|
3554
3119
|
}
|
|
3555
3120
|
}
|
|
3556
3121
|
})();
|
|
3557
|
-
const
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
},
|
|
3562
|
-
{}
|
|
3563
|
-
) : {}, [e]), [R, z] = k(!1), [K, Y] = k(), [F, X] = k(
|
|
3564
|
-
!1
|
|
3565
|
-
), [U, V] = k(), [j, O] = k();
|
|
3122
|
+
const x = ($) => $.replace(/([A-Z])/g, (q) => "-" + q.toLowerCase()), L = Tt(() => e !== void 0 ? Object.keys(e).reduce((q, o) => {
|
|
3123
|
+
const s = e[o];
|
|
3124
|
+
return o = o.startsWith("--") ? o : `--fp-theme-${x(o)}`, q[o] = s, q;
|
|
3125
|
+
}, {}) : {}, [e]), [B, U] = k(!1), [K, J] = k(), [G, Y] = k(!1), [z, V] = k(), [W, D] = k();
|
|
3566
3126
|
return I(() => {
|
|
3567
|
-
e &&
|
|
3568
|
-
|
|
3569
|
-
N.DeleteFiles
|
|
3570
|
-
]), a !== void 0 && O(jr[a]);
|
|
3571
|
-
}, [e, t, n, a]), /* @__PURE__ */ l(
|
|
3127
|
+
e && U(!0), J(t), i ? Y(!0) : V([N.CreateFolder, N.DeleteFiles]), a !== void 0 && D(Qr[a]);
|
|
3128
|
+
}, [e, t, i, a]), /* @__PURE__ */ l(
|
|
3572
3129
|
ae,
|
|
3573
3130
|
{
|
|
3574
3131
|
style: {
|
|
3575
|
-
...
|
|
3132
|
+
...n,
|
|
3576
3133
|
...L
|
|
3577
3134
|
},
|
|
3578
3135
|
children: /* @__PURE__ */ l(
|
|
3579
|
-
|
|
3136
|
+
wi,
|
|
3580
3137
|
{
|
|
3581
3138
|
ref: C,
|
|
3582
|
-
files:
|
|
3139
|
+
files: r ?? [],
|
|
3583
3140
|
folderChain: d,
|
|
3584
3141
|
onFileAction: ($) => {
|
|
3585
|
-
typeof
|
|
3142
|
+
typeof h == "function" && h($);
|
|
3586
3143
|
},
|
|
3587
3144
|
thumbnailGenerator: S,
|
|
3588
3145
|
defaultFileViewActionId: K,
|
|
3589
|
-
disableDragAndDrop:
|
|
3590
|
-
fileActions:
|
|
3591
|
-
darkMode:
|
|
3592
|
-
i18n:
|
|
3146
|
+
disableDragAndDrop: G,
|
|
3147
|
+
fileActions: z,
|
|
3148
|
+
darkMode: B,
|
|
3149
|
+
i18n: W,
|
|
3593
3150
|
...v
|
|
3594
3151
|
}
|
|
3595
3152
|
)
|
|
@@ -3599,64 +3156,64 @@ const ms = ve.memo(
|
|
|
3599
3156
|
)
|
|
3600
3157
|
);
|
|
3601
3158
|
export {
|
|
3602
|
-
|
|
3603
|
-
|
|
3159
|
+
vs as Autocomplete,
|
|
3160
|
+
Ye as BboxCorner,
|
|
3604
3161
|
ae as Box,
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3162
|
+
Ze as COORDINATES_MERCATOR_FRACTION_DIGITS,
|
|
3163
|
+
Xe as COORDINATES_WGS_FRACTION_DIGITS,
|
|
3164
|
+
qo as Cesium3DTileset,
|
|
3165
|
+
cs as CesiumBoundingSphere,
|
|
3166
|
+
ss as CesiumCartesian2,
|
|
3167
|
+
as as CesiumCartesian3,
|
|
3168
|
+
ls as CesiumCartographic,
|
|
3169
|
+
gs as CesiumCesiumTerrainProvider,
|
|
3170
|
+
ts as CesiumColor,
|
|
3171
|
+
os as CesiumConstantPositionProperty,
|
|
3172
|
+
rs as CesiumConstantProperty,
|
|
3173
|
+
Or as CesiumCustomDataSource,
|
|
3174
|
+
ns as CesiumDrawingsDataSource,
|
|
3175
|
+
ds as CesiumEllipsoid,
|
|
3176
|
+
ms as CesiumEllipsoidTerrainProvider,
|
|
3177
|
+
Ar as CesiumEntity,
|
|
3178
|
+
es as CesiumEntityDescription,
|
|
3179
|
+
xr as CesiumEntityStaticDescription,
|
|
3180
|
+
us as CesiumGeographicTilingScheme,
|
|
3181
|
+
Yo as CesiumGeojsonLayer,
|
|
3182
|
+
Ge as CesiumImageryLayer,
|
|
3183
|
+
ys as CesiumLabelStyle,
|
|
3184
|
+
Ko as CesiumMap,
|
|
3185
|
+
Ls as CesiumMath,
|
|
3186
|
+
Qo as CesiumOSMLayer,
|
|
3187
|
+
kr as CesiumPolygonGraphics,
|
|
3188
|
+
is as CesiumPolylineDashMaterialProperty,
|
|
3189
|
+
hs as CesiumRectangle,
|
|
3190
|
+
Ir as CesiumRectangleGraphics,
|
|
3191
|
+
ps as CesiumResource,
|
|
3192
|
+
ne as CesiumSceneMode,
|
|
3193
|
+
fs as CesiumVerticalOrigin,
|
|
3194
|
+
jo as CesiumViewer,
|
|
3195
|
+
Xo as CesiumWMSLayer,
|
|
3196
|
+
Zo as CesiumWMTSLayer,
|
|
3197
|
+
Jo as CesiumXYZLayer,
|
|
3198
|
+
Uo as CssBaseline,
|
|
3199
|
+
Vo as DateTimePicker,
|
|
3200
|
+
Mi as DateTimeRangePicker,
|
|
3201
|
+
Ho as DateTimeRangePickerFormControl,
|
|
3202
|
+
ie as DrawType,
|
|
3203
|
+
Es as FileHelper,
|
|
3204
|
+
ws as FilePicker,
|
|
3205
|
+
Cs as FilePickerActions,
|
|
3206
|
+
eo as FilePickerViewObj,
|
|
3207
|
+
zo as MapFilterContainer,
|
|
3208
|
+
Ai as Popover,
|
|
3209
|
+
he as Proj,
|
|
3210
|
+
Wo as ScopedCssBaseline,
|
|
3211
|
+
$o as SmartTable,
|
|
3655
3212
|
ce as SupportedLocales,
|
|
3656
|
-
|
|
3213
|
+
Ps as cesiumSampleTerrainMostDetailed,
|
|
3657
3214
|
it as defaultFormatters,
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3215
|
+
_i as mapMcToMuiTheme,
|
|
3216
|
+
pe as useCesiumMap,
|
|
3217
|
+
Nt as useMappedMuiTheme,
|
|
3218
|
+
_s as useMediaQuery
|
|
3662
3219
|
};
|