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