@vcmap/viewshed 2.0.3 → 2.0.4

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/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  var fe = Object.defineProperty;
2
- var ve = (s, e, t) => e in s ? fe(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
3
- var Z = (s, e, t) => (ve(s, typeof e != "symbol" ? e + "" : e, t), t);
4
- import { VcsCameraPrimitive as pe, VcsObject as we, VcsEvent as L, AbstractInteraction as me, EventType as D, Projection as I, SessionType as ge, CesiumMap as B, startEditFeaturesSession as _e, startEditGeometrySession as Ce, VectorLayer as Ee, wgs84Projection as Ve, maxZIndex as ye, markVolatile as be, Viewpoint as Me, TransformationMode as Te, Category as Oe, moduleIdSymbol as Se } from "../../../assets/core.js";
5
- import { Color as k, Matrix4 as Pe, Transforms as Ae, Primitive as q, GeometryInstance as Q, SphereGeometry as Ie, ColorGeometryInstanceAttribute as ee, PerInstanceColorAppearance as te, SphereOutlineGeometry as Re, Math as O, Cartesian3 as S, ShadowMap as $e, Camera as Ne, HeightReference as xe } from "../../../assets/cesium.js";
6
- import { shallowRef as H, ref as A, nextTick as De, inject as ie, computed as se, reactive as j, watchEffect as Le, watch as R, onMounted as Fe, onUnmounted as ke } from "../../../assets/vue.js";
2
+ var ve = (s, e, i) => e in s ? fe(s, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : s[e] = i;
3
+ var Z = (s, e, i) => (ve(s, typeof e != "symbol" ? e + "" : e, i), i);
4
+ import { VcsCameraPrimitive as pe, VcsObject as we, VcsEvent as L, AbstractInteraction as me, EventType as D, Projection as I, SessionType as ge, CesiumMap as B, startEditFeaturesSession as _e, startEditGeometrySession as Ce, VectorLayer as Ee, wgs84Projection as ye, maxZIndex as Ve, markVolatile as be, Viewpoint as Te, TransformationMode as Me, Category as Oe, moduleIdSymbol as Se } from "../../../assets/core.js";
5
+ import { Color as F, Matrix4 as Pe, Transforms as Ae, Primitive as q, GeometryInstance as Q, SphereGeometry as Ie, ColorGeometryInstanceAttribute as ee, PerInstanceColorAppearance as te, SphereOutlineGeometry as Re, Math as O, Cartesian3 as S, ShadowMap as $e, Camera as Ne, HeightReference as xe } from "../../../assets/cesium.js";
6
+ import { shallowRef as U, ref as A, nextTick as De, inject as ie, computed as se, reactive as j, watchEffect as Le, watch as R, onMounted as ke, onUnmounted as Fe } from "../../../assets/vue.js";
7
7
  import { ol$Observable$unByKey as je, Feature as We, ol$geom$Point as Be, ol$style$Style as ze } from "../../../assets/ol.js";
8
- import { VcsTextField as Ge, VcsSlider as Ue, VcsLabel as ne, VcsFormSection as re, VcsSelect as ae, VcsFormButton as He, VcsFeatureTransforms as Xe, makeEditorCollectionComponentClass as Ke, WindowSlot as Ye, ToolboxType as Je, createListExportAction as Ze, downloadText as qe, createListImportAction as Qe, AbstractConfigEditor as et } from "../../../assets/ui.js";
8
+ import { VcsTextField as Ge, VcsSlider as He, VcsLabel as ne, VcsFormSection as re, VcsSelect as ae, VcsFormButton as Ue, VcsFeatureTransforms as Ke, makeEditorCollectionComponentClass as Xe, WindowSlot as Ye, ToolboxType as Je, createListExportAction as Ze, downloadText as qe, createListImportAction as Qe, AbstractConfigEditor as et } from "../../../assets/ui.js";
9
9
  import { VContainer as le, VRow as ce, VCol as de, VDivider as tt, VColorPicker as it } from "../../../assets/vuetify.js";
10
10
  const x = [
11
11
  [String, "string"],
@@ -19,61 +19,61 @@ function W(s) {
19
19
  const e = {};
20
20
  if (!s || e.toString(s) !== "[object Object]")
21
21
  return !1;
22
- const t = Object.getPrototypeOf(s);
23
- if (!t)
22
+ const i = Object.getPrototypeOf(s);
23
+ if (!i)
24
24
  return !0;
25
- const i = e.hasOwnProperty, o = i.call(t, "constructor") && t.constructor;
26
- return typeof o == "function" && i.toString.call(o) === i.toString.call(Object);
25
+ const t = e.hasOwnProperty, o = t.call(i, "constructor") && i.constructor;
26
+ return typeof o == "function" && t.toString.call(o) === t.toString.call(Object);
27
27
  }
28
- function M(s, e) {
28
+ function T(s, e) {
29
29
  if (s === null)
30
30
  return "null";
31
31
  if (typeof s > "u")
32
32
  return "undefined";
33
33
  if (e)
34
34
  return typeof s;
35
- let t;
35
+ let i;
36
36
  if (Array.isArray(s))
37
- t = `[${s.map((o) => M(o, e)).join(",")}]`;
37
+ i = `[${s.map((o) => T(o, e)).join(",")}]`;
38
38
  else
39
39
  try {
40
- t = JSON.stringify(s);
40
+ i = JSON.stringify(s);
41
41
  } catch {
42
- t = typeof s;
42
+ i = typeof s;
43
43
  }
44
- return t = t || typeof s, t.length > 20 ? `${t.substr(0, 20)}...` : t;
44
+ return i = i || typeof s, i.length > 20 ? `${i.substr(0, 20)}...` : i;
45
45
  }
46
46
  function st(s, e) {
47
- return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || typeof e == "symbol" ? s === e ? !1 : `Expected ${M(s)} to equal ${e.toString()}` : null;
47
+ return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || typeof e == "symbol" ? s === e ? !1 : `Expected ${T(s)} to equal ${e.toString()}` : null;
48
48
  }
49
- function ot(s, e, t) {
49
+ function ot(s, e, i) {
50
50
  if (Array.isArray(e)) {
51
51
  if (e.length !== 1)
52
52
  throw new Error("Array patterns may only have on type");
53
53
  if (Array.isArray(s)) {
54
- let i = !1;
54
+ let t = !1;
55
55
  return s.findIndex((r) => {
56
56
  try {
57
- z(r, e[0], t);
57
+ z(r, e[0], i);
58
58
  } catch (a) {
59
- i = a.message.replace(/Match failed:\s/, "");
59
+ t = a.message.replace(/Match failed:\s/, "");
60
60
  }
61
- return i;
62
- }) > -1 ? `${i} in ${M(s)}` : !1;
61
+ return t;
62
+ }) > -1 ? `${t} in ${T(s)}` : !1;
63
63
  }
64
- return `Expected ${M(s)} to be an Array`;
64
+ return `Expected ${T(s)} to be an Array`;
65
65
  }
66
66
  return null;
67
67
  }
68
- function X(s, e, t) {
69
- const i = t ? `${t}.` : "";
68
+ function K(s, e, i) {
69
+ const t = i ? `${i}.` : "";
70
70
  if (!W(s))
71
- return `Expected ${M(s)} to be a plain Object`;
71
+ return `Expected ${T(s)} to be a plain Object`;
72
72
  let r = !1;
73
73
  const a = Object.keys(e).find((l) => {
74
74
  const n = s[l];
75
75
  if (W(e[l]))
76
- r = X(n, e[l], i + l);
76
+ r = K(n, e[l], t + l);
77
77
  else
78
78
  try {
79
79
  z(n, e[l]);
@@ -82,57 +82,57 @@ function X(s, e, t) {
82
82
  }
83
83
  return r;
84
84
  });
85
- return a ? `${r} in object.${i}${a}` : !1;
85
+ return a ? `${r} in object.${t}${a}` : !1;
86
86
  }
87
87
  function nt(s, e) {
88
88
  if (e === Number)
89
- return Number.isFinite(s) ? !1 : `expected ${M(s)} to be a number, excluding NaN`;
90
- for (let t = x.length; t--; )
91
- if (e === x[t][0])
92
- return typeof s === x[t][1] ? !1 : `expected ${M(s)} to be a ${x[t][1]}`;
89
+ return Number.isFinite(s) ? !1 : `expected ${T(s)} to be a number, excluding NaN`;
90
+ for (let i = x.length; i--; )
91
+ if (e === x[i][0])
92
+ return typeof s === x[i][1] ? !1 : `expected ${T(s)} to be a ${x[i][1]}`;
93
93
  return null;
94
94
  }
95
- function K(s) {
95
+ function X(s) {
96
96
  if (s === null)
97
97
  return "null";
98
98
  const e = x.find((o) => o[0] === s);
99
99
  if (e)
100
100
  return e[1];
101
- let t = s.toString();
101
+ let i = s.toString();
102
102
  if (s.className)
103
103
  return s.className;
104
- const i = t.match(/function (.*)\(/);
105
- if (i && i.length > 1)
106
- return i[1];
104
+ const t = i.match(/function (.*)\(/);
105
+ if (t && t.length > 1)
106
+ return t[1];
107
107
  if (W(s)) {
108
108
  const o = {};
109
109
  Object.keys(s).forEach((r) => {
110
- o[r] = K(s[r]);
110
+ o[r] = X(s[r]);
111
111
  });
112
112
  try {
113
- t = `Object of ${JSON.stringify(o)}`;
113
+ i = `Object of ${JSON.stringify(o)}`;
114
114
  } catch {
115
- t = "Object";
115
+ i = "Object";
116
116
  }
117
117
  }
118
- return t;
118
+ return i;
119
119
  }
120
- function he(s, e, t) {
121
- const i = t ? `${t}.` : "";
120
+ function he(s, e, i) {
121
+ const t = i ? `${i}.` : "";
122
122
  let o = !1;
123
123
  return Object.keys(s).find((a) => {
124
124
  if (W(e[a])) {
125
125
  const l = s[a];
126
- o = he(l, e[a], i + a);
126
+ o = he(l, e[a], t + a);
127
127
  } else
128
- e[a] || (o = `Found additional key ${i}${a}`);
128
+ e[a] || (o = `Found additional key ${t}${a}`);
129
129
  return o = o ? o.replace(/\sin.*/, "") : !1, o;
130
- }) ? `${o} in ${M(s)}` : !1;
130
+ }) ? `${o} in ${T(s)}` : !1;
131
131
  }
132
- function rt(s, e, t) {
133
- const i = function(a, l) {
132
+ function rt(s, e, i) {
133
+ const t = function(a, l) {
134
134
  if (l == null)
135
- return a === l ? !1 : `Expected ${M(a)} to be ${l}`;
135
+ return a === l ? !1 : `Expected ${T(a)} to be ${l}`;
136
136
  const n = nt(a, l);
137
137
  if (n !== null)
138
138
  return n;
@@ -140,34 +140,34 @@ function rt(s, e, t) {
140
140
  if (u !== null)
141
141
  return u;
142
142
  if (Array.isArray(l))
143
- return ot(a, l, t);
143
+ return ot(a, l, i);
144
144
  if (l instanceof Function)
145
- return a instanceof l ? !1 : `Expected ${M(a, !0)} to be of Type ${K(l)}`;
145
+ return a instanceof l ? !1 : `Expected ${T(a, !0)} to be of Type ${X(l)}`;
146
146
  if (l === Object)
147
- return X(a, {});
147
+ return K(a, {});
148
148
  if (typeof l != "object")
149
149
  throw new Error(`Cannot handler pattern ${l}`);
150
- const c = X(a, l);
151
- return c || (t ? he(a, l) : !1);
150
+ const c = K(a, l);
151
+ return c || (i ? he(a, l) : !1);
152
152
  };
153
153
  let o;
154
- return Array.isArray(e) && e.length > 1 ? e.every((a) => i(s, a)) && (o = `Expected ${M(s)} to be a ${e.map((a) => K(a)).join(" or ")}`) : o = i(s, e), o;
154
+ return Array.isArray(e) && e.length > 1 ? e.every((a) => t(s, a)) && (o = `Expected ${T(s)} to be a ${e.map((a) => X(a)).join(" or ")}`) : o = t(s, e), o;
155
155
  }
156
- function z(s, e, t) {
157
- const i = rt(s, e, t);
158
- if (i)
159
- throw new Error(`Match failed: ${i}`);
156
+ function z(s, e, i) {
157
+ const t = rt(s, e, i);
158
+ if (t)
159
+ throw new Error(`Match failed: ${t}`);
160
160
  return !1;
161
161
  }
162
- function at(s, e, t) {
162
+ function at(s, e, i) {
163
163
  if (s != null) {
164
- const i = Object.values(e).find((o) => o == s);
165
- if (i != null)
166
- return i;
164
+ const t = Object.values(e).find((o) => o == s);
165
+ if (t != null)
166
+ return t;
167
167
  }
168
- return t;
168
+ return i;
169
169
  }
170
- const lt = new k(), G = new Pe();
170
+ const lt = new F(), G = new Pe();
171
171
  class ct extends pe {
172
172
  constructor(e) {
173
173
  super(e), this.spot = e.spot;
@@ -181,12 +181,12 @@ class ct extends pe {
181
181
  if (this.spot)
182
182
  super.update(e);
183
183
  else {
184
- const t = this._planesPrimitives, i = this._outlinePrimitives;
185
- t.length === 0 && (Ae.eastNorthUpToFixedFrame(
184
+ const i = this._planesPrimitives, t = this._outlinePrimitives;
185
+ i.length === 0 && (Ae.eastNorthUpToFixedFrame(
186
186
  this._camera.positionWC,
187
187
  void 0,
188
188
  G
189
- ), t[0] = new q({
189
+ ), i[0] = new q({
190
190
  allowPicking: this.allowPicking,
191
191
  geometryInstances: new Q({
192
192
  geometry: new Ie({
@@ -194,7 +194,7 @@ class ct extends pe {
194
194
  }),
195
195
  attributes: {
196
196
  color: ee.fromColor(
197
- k.fromAlpha(this._color, 0.1, lt)
197
+ F.fromAlpha(this._color, 0.1, lt)
198
198
  )
199
199
  },
200
200
  modelMatrix: G
@@ -204,7 +204,7 @@ class ct extends pe {
204
204
  flat: !0
205
205
  }),
206
206
  asynchronous: !1
207
- }), i[0] = new q({
207
+ }), t[0] = new q({
208
208
  allowPicking: this.allowPicking,
209
209
  geometryInstances: new Q({
210
210
  geometry: new Re({
@@ -221,9 +221,9 @@ class ct extends pe {
221
221
  }),
222
222
  asynchronous: !1
223
223
  }));
224
- const { length: o } = t;
224
+ const { length: o } = i;
225
225
  for (let r = 0; r < o; ++r)
226
- i[r].update(e), t[r].update(e);
226
+ t[r].update(e), i[r].update(e);
227
227
  }
228
228
  }
229
229
  }
@@ -232,11 +232,11 @@ const w = {
232
232
  THREESIXTY: "360"
233
233
  };
234
234
  function dt(s, e) {
235
- const t = new Ne(s), i = (
235
+ const i = new Ne(s), t = (
236
236
  /** @type {import("@vcmap-cesium/engine").PerspectiveFrustum} */
237
- t.frustum
237
+ i.frustum
238
238
  );
239
- return i.fov = e.fov, i.near = e.near, i.aspectRatio = e.aspectRatio, i.far = e.far, t;
239
+ return t.fov = e.fov, t.near = e.near, t.aspectRatio = e.aspectRatio, t.far = e.far, i;
240
240
  }
241
241
  const E = class E extends we {
242
242
  static get className() {
@@ -268,23 +268,23 @@ const E = class E extends we {
268
268
  * @param {ViewshedOptions} options The options for the viewshed.
269
269
  * @param {import("@vcmap/core").CesiumMap} [cesiumMap] The cesiumMap the viewshed should be applied to. If this parameter is passed, the viewshed is activated and all other viewsheds are deactivated.
270
270
  */
271
- constructor(e, t) {
272
- var i, o, r, a, l, n;
271
+ constructor(e, i) {
272
+ var t, o, r, a, l, n;
273
273
  super(e), this._cesiumMap = null, this._shadowCamera = null, this._scene = null, this._frustumOptions = {
274
- fov: ((i = e.frustumOptions) == null ? void 0 : i.fov) || E.getDefaultOptions().frustum.fov,
274
+ fov: ((t = e.frustumOptions) == null ? void 0 : t.fov) || E.getDefaultOptions().frustum.fov,
275
275
  far: ((o = e.frustumOptions) == null ? void 0 : o.far) || E.getDefaultOptions().frustum.far,
276
276
  near: ((r = e.frustumOptions) == null ? void 0 : r.near) || E.getDefaultOptions().frustum.near,
277
277
  aspectRatio: ((a = e.frustumOptions) == null ? void 0 : a.aspectRatio) || E.getDefaultOptions().frustum.aspectRatio
278
278
  }, this._headingPitchRollValues = e.orientation || {
279
279
  ...E.getDefaultOptions().orientation
280
280
  }, this._position = e.position || E.getDefaultOptions().position, this._viewshedType = at(e.viewshedType, w), this._colors = {
281
- visibleColor: k.fromCssColorString(
281
+ visibleColor: F.fromCssColorString(
282
282
  ((l = e.colorOptions) == null ? void 0 : l.visibleColor) || E.getDefaultOptions().visibleColor
283
283
  ),
284
- shadowColor: k.fromCssColorString(
284
+ shadowColor: F.fromCssColorString(
285
285
  ((n = e.colorOptions) == null ? void 0 : n.shadowColor) || E.getDefaultOptions().shadowColor
286
286
  )
287
- }, this._heightOffset = e.heightOffset || 0, this._shadowMap = null, this._primitive = null, this._showPrimitive = !!e.showPrimitive, this._shadowMapChangedListener = null, this._positionChanged = new L(), t ? this.activate(t) : this._active = !1;
287
+ }, this._heightOffset = e.heightOffset || 0, this._shadowMap = null, this._primitive = null, this._showPrimitive = !!e.showPrimitive, this._shadowMapChangedListener = null, this._positionChanged = new L(), i ? this.activate(i) : this._active = !1;
288
288
  }
289
289
  /**
290
290
  * Sets a new position for the shadow map. If no shadow map was created yet, due to missing position, this method triggers the creation of a shadow map.
@@ -319,7 +319,7 @@ const E = class E extends we {
319
319
  this.position[0],
320
320
  this.position[1],
321
321
  this.position[2] + e
322
- ), this._updateShadowMap(), this._updatePrimitive());
322
+ ), this._updatePrimitive());
323
323
  }
324
324
  /**
325
325
  * Getter for height offset.
@@ -333,7 +333,7 @@ const E = class E extends we {
333
333
  * @param {number} value The distance in meters.
334
334
  */
335
335
  set distance(e) {
336
- this._frustumOptions.far = e > E.MIN_DISTANCE ? e : E.MIN_DISTANCE, this._shadowCamera && (this._shadowCamera.frustum.far = this._frustumOptions.far, this._updateShadowMap(), this._viewshedType === w.CONE && this._updatePrimitive());
336
+ this._frustumOptions.far = e > E.MIN_DISTANCE ? e : E.MIN_DISTANCE, this._shadowCamera && (this._shadowCamera.frustum.far = this._frustumOptions.far, this._viewshedType === w.THREESIXTY && this._updateShadowMap(), this._viewshedType === w.CONE && this._updatePrimitive());
337
337
  }
338
338
  /**
339
339
  * Returns the reach of the viewshed.
@@ -347,7 +347,7 @@ const E = class E extends we {
347
347
  * @param {number} value The field of view in degrees.
348
348
  */
349
349
  set fov(e) {
350
- this._frustumOptions.fov = e * O.RADIANS_PER_DEGREE, this._shadowCamera && (this._shadowCamera.frustum.fov = e * O.RADIANS_PER_DEGREE, this._updateShadowMap(), this._viewshedType === w.CONE && this._updatePrimitive());
350
+ this._frustumOptions.fov = e * O.RADIANS_PER_DEGREE, this._shadowCamera && (this._shadowCamera.frustum.fov = e * O.RADIANS_PER_DEGREE, this._viewshedType === w.CONE && this._updatePrimitive());
351
351
  }
352
352
  /**
353
353
  * Returns the field of view.
@@ -382,8 +382,8 @@ const E = class E extends we {
382
382
  */
383
383
  set pitch(e) {
384
384
  if (this._headingPitchRollValues.pitch = e * O.RADIANS_PER_DEGREE, this._shadowCamera) {
385
- const t = e * O.RADIANS_PER_DEGREE - this._shadowCamera.pitch;
386
- this._shadowCamera.lookUp(t), this._viewshedType === w.CONE && this._updatePrimitive();
385
+ const i = e * O.RADIANS_PER_DEGREE - this._shadowCamera.pitch;
386
+ this._shadowCamera.lookUp(i), this._viewshedType === w.CONE && this._updatePrimitive();
387
387
  }
388
388
  }
389
389
  /**
@@ -418,8 +418,8 @@ const E = class E extends we {
418
418
  * Deactivates the viewshed by removing primitve and removing shadowMap.
419
419
  */
420
420
  deactivate() {
421
- var e, t, i, o;
422
- this._active && (this._removePrimitive(), (e = this._shadowMapChangedListener) == null || e.call(this), ((i = (t = this._cesiumMap) == null ? void 0 : t.getScene()) == null ? void 0 : i.shadowMap) === this._shadowMap && this._cesiumMap.setDefaultShadowMap(), (o = this._shadowMap) == null || o.destroy(), this._shadowCamera = null, this._scene = null, this._cesiumMap = null, this._active = !1);
421
+ var e, i, t, o;
422
+ this._active && (this._removePrimitive(), (e = this._shadowMapChangedListener) == null || e.call(this), ((t = (i = this._cesiumMap) == null ? void 0 : i.getScene()) == null ? void 0 : t.shadowMap) === this._shadowMap && this._cesiumMap.setDefaultShadowMap(), (o = this._shadowMap) == null || o.destroy(), this._shadowCamera = null, this._scene = null, this._cesiumMap = null, this._active = !1);
423
423
  }
424
424
  /**
425
425
  * Activates viewshed. Sets the CesiumMap and adds shadowMapChanged listener to CesiumMap. If viewshed is active but
@@ -428,13 +428,13 @@ const E = class E extends we {
428
428
  activate(e) {
429
429
  if (this._active || (this._active = !0), e !== this._cesiumMap) {
430
430
  this._cesiumMap = e;
431
- const t = e.getScene();
432
- if (t)
433
- this._shadowCamera = dt(t, this._frustumOptions), this._position && (this.position = this._position), this._scene = t;
431
+ const i = e.getScene();
432
+ if (i)
433
+ this._shadowCamera = dt(i, this._frustumOptions), this._position && (this.position = this._position), this._scene = i;
434
434
  else
435
435
  throw new Error("CesiumMap contains no scene");
436
- this._updateShadowMap(), this._updatePrimitive(), this._shadowMapChangedListener = this._cesiumMap.shadowMapChanged.addEventListener(() => {
437
- this.deactivate();
436
+ this._updateShadowMap(), this._updatePrimitive(), this._shadowMapChangedListener = this._cesiumMap.shadowMapChanged.addEventListener((t) => {
437
+ this._shadowMap !== t && this.deactivate();
438
438
  });
439
439
  }
440
440
  }
@@ -442,7 +442,8 @@ const E = class E extends we {
442
442
  * Updates the shadow map by creating a new one and applying all the current parameters.
443
443
  */
444
444
  _updateShadowMap() {
445
- !this._active || !this._shadowCamera || !this._cesiumMap || !this._scene || (this._shadowMap = new $e({
445
+ var e;
446
+ !this._active || !this._shadowCamera || !this._cesiumMap || !this._scene || ((e = this._shadowMap) == null || e.destroy(), this._shadowMap = new $e({
446
447
  // @ts-ignore
447
448
  context: this._scene.context,
448
449
  lightCamera: this._shadowCamera,
@@ -474,13 +475,13 @@ const E = class E extends we {
474
475
  lookAt(e) {
475
476
  if (!this._shadowCamera)
476
477
  return;
477
- const t = S.fromDegrees(e[0], e[1], e[2]);
478
- if (this.distance = S.distance(this._shadowCamera.position, t), this.type === w.CONE && !t.equals(this._shadowCamera.position)) {
479
- const i = new S();
480
- S.subtract(t, this._shadowCamera.position, t), S.normalize(t, t), S.normalize(this._shadowCamera.position, i), this._shadowCamera.setView({
478
+ const i = S.fromDegrees(e[0], e[1], e[2]);
479
+ if (this.distance = S.distance(this._shadowCamera.position, i), this.type === w.CONE && !i.equals(this._shadowCamera.position)) {
480
+ const t = new S();
481
+ S.subtract(i, this._shadowCamera.position, i), S.normalize(i, i), S.normalize(this._shadowCamera.position, t), this._shadowCamera.setView({
481
482
  orientation: {
482
- direction: t,
483
- up: i
483
+ direction: i,
484
+ up: t
484
485
  }
485
486
  }), this._headingPitchRollValues.heading = this._shadowCamera.heading, this._headingPitchRollValues.pitch = this._shadowCamera.pitch;
486
487
  }
@@ -513,7 +514,7 @@ const E = class E extends we {
513
514
  }
514
515
  };
515
516
  Z(E, "MIN_DISTANCE", 10);
516
- let T = E;
517
+ let M = E;
517
518
  class ht extends me {
518
519
  /**
519
520
  *
@@ -535,7 +536,7 @@ class ht extends me {
535
536
  super.destroy(), this._finished.destroy(), this._positioned.destroy();
536
537
  }
537
538
  }
538
- const V = {
539
+ const y = {
539
540
  ABSOLUTE: "absolute",
540
541
  RELATIVE: "relative"
541
542
  }, g = {
@@ -547,53 +548,53 @@ const V = {
547
548
  }, oe = 1.8;
548
549
  function ut(s) {
549
550
  const e = new Ee({
550
- projection: Ve.toJSON(),
551
- zIndex: ye - 1
551
+ projection: ye.toJSON(),
552
+ zIndex: Ve - 1
552
553
  });
553
554
  be(e), e.activate();
554
- const t = new We(new Be(s));
555
- return t.setStyle(new ze({})), e.addFeatures([t]), e.vectorProperties.altitudeMode = xe.NONE, {
555
+ const i = new We(new Be(s));
556
+ return i.setStyle(new ze({})), e.addFeatures([i]), e.vectorProperties.altitudeMode = xe.NONE, {
556
557
  layer: e,
557
- feature: t,
558
+ feature: i,
558
559
  destroy() {
559
- t.dispose(), e.destroy();
560
+ i.dispose(), e.destroy();
560
561
  }
561
562
  };
562
563
  }
563
- function U(s, e) {
564
- const t = e === V.ABSOLUTE ? D.CLICKMOVE : D.NONE;
565
- s.setActive(t), s.pickPosition = t, s.pullPickedPosition = 1.8;
564
+ function H(s, e) {
565
+ const i = e === y.ABSOLUTE ? D.CLICKMOVE : D.NONE;
566
+ s.setActive(i), s.pickPosition = i, s.pullPickedPosition = 1.8;
566
567
  }
567
- function ft(s, e, t) {
568
- const i = H(null), o = A(null), r = A(null), a = A(V.ABSOLUTE);
568
+ function ft(s, e, i) {
569
+ const t = U(null), o = A(null), r = A(null), a = A(y.ABSOLUTE);
569
570
  let l = () => {
570
571
  };
571
- const n = H(null);
572
+ const n = U(null);
572
573
  function u(h) {
573
574
  var f, d;
574
- o.value && i.value ? (i.value.deactivate(), t.setVisibility(i.value.name, !1)) : (f = i.value) == null || f.destroy(), i.value = h, (d = i.value) == null || d.activate(s.maps.activeMap);
575
+ o.value && t.value ? (t.value.deactivate(), i.setVisibility(t.value.name, !1)) : (f = t.value) == null || f.destroy(), t.value = h, (d = t.value) == null || d.activate(s.maps.activeMap);
575
576
  }
576
577
  function c(h = !0) {
577
- l(), u(null), h && t.clearSelection(), o.value = null, r.value = null;
578
+ l(), u(null), h && i.clearSelection(), o.value = null, r.value = null;
578
579
  }
579
580
  async function m(h) {
580
581
  c(), await De();
581
582
  const { eventHandler: f } = s.maps, { featureInteraction: d } = f;
582
- i.value = new T(
583
+ t.value = new M(
583
584
  {
584
585
  viewshedType: h,
585
586
  colorOptions: {
586
587
  visibleColor: e.visibleColor,
587
588
  shadowColor: e.shadowColor
588
589
  },
589
- heightOffset: a.value === V.ABSOLUTE ? 0 : oe
590
+ heightOffset: a.value === y.ABSOLUTE ? 0 : oe
590
591
  },
591
592
  /** @type {import("@vcmap/core").CesiumMap} */
592
593
  s.maps.activeMap
593
594
  );
594
- const p = new ht(i.value);
595
+ const p = new ht(t.value);
595
596
  p.finished.addEventListener(() => {
596
- l(), i.value ? (i.value.showPrimitive = !0, r.value = g.EDIT) : c();
597
+ l(), t.value ? (t.value.showPrimitive = !0, r.value = g.EDIT) : c();
597
598
  });
598
599
  const C = f.addExclusiveInteraction(
599
600
  p,
@@ -601,8 +602,8 @@ function ft(s, e, t) {
601
602
  p.destroy();
602
603
  }
603
604
  );
604
- U(d, a.value), p.positioned.addEventListener(() => {
605
- U(d, V.ABSOLUTE);
605
+ H(d, a.value), p.positioned.addEventListener(() => {
606
+ H(d, y.ABSOLUTE);
606
607
  }), l = () => {
607
608
  C(), p.destroy(), d.setActive(), l = () => {
608
609
  };
@@ -610,18 +611,18 @@ function ft(s, e, t) {
610
611
  }
611
612
  function v(h) {
612
613
  var f;
613
- if (i.value && h) {
614
+ if (t.value && h) {
614
615
  l();
615
616
  const {
616
617
  layer: d,
617
618
  feature: p,
618
619
  destroy: C
619
- } = ut(i.value.position);
620
- s.layers.add(d), a.value === V.ABSOLUTE ? (n.value = _e(s, d), n.value.setFeatures([p])) : (n.value = Ce(s, d), n.value.setFeature(p)), n.value.stopped.addEventListener(() => {
620
+ } = ut(t.value.position);
621
+ s.layers.add(d), a.value === y.ABSOLUTE ? (n.value = _e(s, d), n.value.setFeatures([p])) : (n.value = Ce(s, d), n.value.setFeature(p)), n.value.stopped.addEventListener(() => {
621
622
  l();
622
623
  });
623
624
  const b = (f = p.getGeometry()) == null ? void 0 : f.on("change", () => {
624
- i.value ? i.value.position = I.mercatorToWgs84(
625
+ t.value ? t.value.position = I.mercatorToWgs84(
625
626
  /** @type {import("ol/geom").Point} */
626
627
  p.getGeometry().getCoordinates()
627
628
  ) : c();
@@ -635,50 +636,50 @@ function ft(s, e, t) {
635
636
  l();
636
637
  }
637
638
  function _(h, f) {
638
- l(), i.value !== f && (u(f), a.value = f.heightOffset ? V.RELATIVE : V.ABSOLUTE), o.value = !!f.properties.title, r.value = h, o.value && t.setVisibility(f.name, !0);
639
+ l(), t.value !== f && (u(f), a.value = f.heightOffset ? y.RELATIVE : y.ABSOLUTE), o.value = !!f.properties.title, r.value = h, o.value && i.setVisibility(f.name, !0);
639
640
  }
640
- const y = [
641
- t.collectionComponent.collection.removed.addEventListener(
641
+ const V = [
642
+ i.collectionComponent.collection.removed.addEventListener(
642
643
  (h) => {
643
644
  var f;
644
- t.remove(h.name), ((f = i.value) == null ? void 0 : f.name) === h.name && c();
645
+ i.remove(h.name), ((f = t.value) == null ? void 0 : f.name) === h.name && c();
645
646
  }
646
647
  ),
647
- t.renamed.addEventListener(({ item: h, title: f }) => {
648
+ i.renamed.addEventListener(({ item: h, title: f }) => {
648
649
  var p;
649
650
  const d = s.windowManager.get(
650
- `${t.collectionComponent.id}-editor`
651
+ `${i.collectionComponent.id}-editor`
651
652
  );
652
- d && ((p = i.value) == null ? void 0 : p.name) === h.name && (d.state.headerTitle = f);
653
+ d && ((p = t.value) == null ? void 0 : p.name) === h.name && (d.state.headerTitle = f);
653
654
  }),
654
- t.visibilityChanged.addEventListener((h) => {
655
+ i.visibilityChanged.addEventListener((h) => {
655
656
  var d;
656
- const f = ((d = i.value) == null ? void 0 : d.name) === h.name;
657
- f ? c() : (_(g.VIEW, h), t.clearSelection()), t.setVisibility(h.name, !f);
657
+ const f = ((d = t.value) == null ? void 0 : d.name) === h.name;
658
+ f ? c() : (_(g.VIEW, h), i.clearSelection()), i.setVisibility(h.name, !f);
658
659
  })
659
660
  ];
660
661
  function $(h) {
661
- if (!(h === a.value || !i.value)) {
662
+ if (!(h === a.value || !t.value)) {
662
663
  if (a.value = h, r.value === g.MOVE && l(), r.value === g.CREATE)
663
- U(
664
+ H(
664
665
  s.maps.eventHandler.featureInteraction,
665
666
  h
666
- ), i.value.heightOffset = h === V.ABSOLUTE ? 0 : oe;
667
+ ), t.value.heightOffset = h === y.ABSOLUTE ? 0 : oe;
667
668
  else if (r.value === g.EDIT) {
668
- const { position: f, heightOffset: d } = i.value;
669
- h === V.RELATIVE ? s.maps.activeMap.getHeightFromTerrain([I.wgs84ToMercator(f)]).then((p) => {
669
+ const { position: f, heightOffset: d } = t.value;
670
+ h === y.RELATIVE ? s.maps.activeMap.getHeightFromTerrain([I.wgs84ToMercator(f)]).then((p) => {
670
671
  const C = I.mercatorToWgs84(p[0]);
671
- i.value && (i.value.heightOffset = f[2] - C[2], i.value.position = C);
672
- }) : (i.value.position = [
672
+ t.value && (t.value.heightOffset = f[2] - C[2], t.value.position = C);
673
+ }) : (t.value.position = [
673
674
  f[0],
674
675
  f[1],
675
676
  f[2] + d
676
- ], i.value.heightOffset = 0);
677
+ ], t.value.heightOffset = 0);
677
678
  }
678
679
  }
679
680
  }
680
681
  return {
681
- currentViewshed: i,
682
+ currentViewshed: t,
682
683
  currentIsPersisted: o,
683
684
  currentEditSession: n,
684
685
  createViewshed: m,
@@ -686,10 +687,10 @@ function ft(s, e, t) {
686
687
  _(g.VIEW, h);
687
688
  },
688
689
  editViewshed(h) {
689
- _(g.EDIT, h), o.value && (t.setSelection(h.name), t.collectionComponent.openEditorWindow(h));
690
+ _(g.EDIT, h), o.value && (i.setSelection(h.name), i.collectionComponent.openEditorWindow(h));
690
691
  },
691
692
  persistCurrent() {
692
- i.value && (t.add(i.value), o.value = !0, t.setSelection(i.value.name), t.setVisibility(i.value.name, !0));
693
+ t.value && (i.add(t.value), o.value = !0, i.setSelection(t.value.name), i.setVisibility(t.value.name, !0));
693
694
  },
694
695
  moveCurrentViewshed: v,
695
696
  setupMultiSelect() {
@@ -700,22 +701,22 @@ function ft(s, e, t) {
700
701
  changeHeightMode: $,
701
702
  async placeCurrentFeaturesOnTerrain() {
702
703
  var h, f;
703
- if (i.value && ((h = n.value) == null ? void 0 : h.type) === ge.EDIT_FEATURES && s.maps.activeMap instanceof B) {
704
+ if (t.value && ((h = n.value) == null ? void 0 : h.type) === ge.EDIT_FEATURES && s.maps.activeMap instanceof B) {
704
705
  const p = (await s.maps.activeMap.getHeightFromTerrain([
705
- I.wgs84ToMercator((f = i.value) == null ? void 0 : f.position)
706
- ]))[0][2] - i.value.position[2];
706
+ I.wgs84ToMercator((f = t.value) == null ? void 0 : f.position)
707
+ ]))[0][2] - t.value.position[2];
707
708
  n.value.translate(0, 0, p);
708
709
  }
709
710
  },
710
711
  stop: c,
711
712
  destroy() {
712
- c(), y.forEach((h) => h());
713
+ c(), V.forEach((h) => h());
713
714
  }
714
715
  };
715
716
  }
716
- function ue(s, e, t, i, o, r, a, l) {
717
+ function ue(s, e, i, t, o, r, a, l) {
717
718
  var n = typeof s == "function" ? s.options : s;
718
- e && (n.render = e, n.staticRenderFns = t, n._compiled = !0), i && (n.functional = !0), r && (n._scopeId = "data-v-" + r);
719
+ e && (n.render = e, n.staticRenderFns = i, n._compiled = !0), t && (n.functional = !0), r && (n._scopeId = "data-v-" + r);
719
720
  var u;
720
721
  if (a ? (u = function(v) {
721
722
  v = v || // cached call
@@ -730,8 +731,8 @@ function ue(s, e, t, i, o, r, a, l) {
730
731
  if (n.functional) {
731
732
  n._injectStyles = u;
732
733
  var c = n.render;
733
- n.render = function(_, y) {
734
- return u.call(y), c(_, y);
734
+ n.render = function(_, V) {
735
+ return u.call(V), c(_, V);
735
736
  };
736
737
  } else {
737
738
  var m = n.beforeCreate;
@@ -743,7 +744,7 @@ function ue(s, e, t, i, o, r, a, l) {
743
744
  };
744
745
  }
745
746
  const vt = {
746
- distance: [T.MIN_DISTANCE, 2e3],
747
+ distance: [M.MIN_DISTANCE, 2e3],
747
748
  fov: [25, 85],
748
749
  heading: [0, 360],
749
750
  pitch: [-90, 90]
@@ -753,13 +754,13 @@ const vt = {
753
754
  VContainer: le,
754
755
  VRow: ce,
755
756
  VCol: de,
756
- VcsSlider: Ue,
757
+ VcsSlider: He,
757
758
  VcsLabel: ne,
758
759
  VcsFormSection: re,
759
760
  VDivider: tt,
760
761
  VcsSelect: ae,
761
- VcsFormButton: He,
762
- VcsFeatureTransforms: Xe
762
+ VcsFormButton: Ue,
763
+ VcsFeatureTransforms: Ke
763
764
  },
764
765
  name: "ViewshedWindow",
765
766
  props: {
@@ -778,11 +779,11 @@ const vt = {
778
779
  const e = (
779
780
  /** @type {import("./viewshedManager.js").ViewshedManager} */
780
781
  ie("manager")
781
- ), t = (
782
+ ), i = (
782
783
  /** @type {import("@vcmap/ui").VcsUiApp} */
783
784
  ie("vcsApp")
784
785
  ), {
785
- currentViewshed: i,
786
+ currentViewshed: t,
786
787
  mode: o,
787
788
  currentIsPersisted: r
788
789
  } = e, a = se(() => s.selection);
@@ -792,7 +793,7 @@ const vt = {
792
793
  X: void 0,
793
794
  Y: void 0,
794
795
  Z: void 0
795
- }), u = H();
796
+ }), u = U();
796
797
  let c = () => {
797
798
  };
798
799
  const m = j({
@@ -803,17 +804,17 @@ const vt = {
803
804
  pitch: void 0
804
805
  }), v = A();
805
806
  function _() {
806
- i.value && (n.X = i.value.position[0], n.Y = i.value.position[1], n.Z = e.heightMode.value === V.ABSOLUTE ? i.value.position[2] : i.value.heightOffset);
807
+ t.value && (n.X = t.value.position[0], n.Y = t.value.position[1], n.Z = e.heightMode.value === y.ABSOLUTE ? t.value.position[2] : t.value.heightOffset);
807
808
  }
808
- function y() {
809
- _(), i.value && (m.distance = i.value.distance, m.fov = i.value.fov, m.heading = i.value.heading, m.pitch = i.value.pitch, m.showPrimitive = i.value.showPrimitive, v.value = i.value.type);
809
+ function V() {
810
+ _(), t.value && (m.distance = t.value.distance, m.fov = t.value.fov, m.heading = t.value.heading, m.pitch = t.value.pitch, m.showPrimitive = t.value.showPrimitive, v.value = t.value.type);
810
811
  }
811
812
  Le(() => {
812
- i.value && o.value !== g.CREATE && y();
813
+ t.value && o.value !== g.CREATE && V();
813
814
  }), R(
814
- i,
815
+ t,
815
816
  () => {
816
- i.value && (l(), l = i.value.positionChanged.addEventListener(() => {
817
+ t.value && (l(), l = t.value.positionChanged.addEventListener(() => {
817
818
  _(), c();
818
819
  }));
819
820
  },
@@ -821,31 +822,31 @@ const vt = {
821
822
  );
822
823
  async function $() {
823
824
  var C, b;
824
- (C = i.value) == null || C.deactivate();
825
+ (C = t.value) == null || C.deactivate();
825
826
  const d = (
826
827
  /** @type {import("@vcmap/core").CesiumMap} */
827
- (b = t.maps.activeMap.getScene()) == null ? void 0 : b.camera
828
+ (b = i.maps.activeMap.getScene()) == null ? void 0 : b.camera
828
829
  ), p = d == null ? void 0 : d.changed.addEventListener(() => {
829
830
  c();
830
831
  });
831
832
  c = () => {
832
833
  var N;
833
- p == null || p(), u.value = null, (N = i.value) == null || N.activate(t.maps.activeMap), c = () => {
834
+ p == null || p(), u.value = null, (N = t.value) == null || N.activate(i.maps.activeMap), c = () => {
834
835
  };
835
836
  };
836
837
  }
837
- Fe(() => {
838
+ ke(() => {
838
839
  var p;
839
840
  const d = (p = s.getViewshed) == null ? void 0 : p.call(s);
840
841
  d && e.editViewshed(d);
841
- }), ke(() => {
842
- l(), c(), r.value || ((o.value === g.EDIT || o.value === g.MOVE) && i.value ? e.viewViewshed(i.value) : o.value === g.CREATE && e.stop()), a.value && (a.value.length > 1 ? e.setupMultiSelect() : a.value.length === 1 && i.value ? e.viewViewshed(i.value) : (
842
+ }), Fe(() => {
843
+ l(), c(), r.value || ((o.value === g.EDIT || o.value === g.MOVE) && t.value ? e.viewViewshed(t.value) : o.value === g.CREATE && e.stop()), a.value && (a.value.length > 1 ? e.setupMultiSelect() : a.value.length === 1 && t.value ? e.viewViewshed(t.value) : (
843
844
  // when a persited viewshed is deselected, stops plugin
844
845
  !a.value.length && o.value === g.EDIT && e.stop(!1)
845
846
  ));
846
- }), y();
847
+ }), V();
847
848
  function h(d, p) {
848
- c(), i.value && (m[d] = p, i.value[d] = p);
849
+ c(), t.value && (m[d] = p, t.value[d] = p);
849
850
  }
850
851
  const f = se(() => {
851
852
  const d = [];
@@ -856,25 +857,25 @@ const vt = {
856
857
  active: !!u.value,
857
858
  async callback() {
858
859
  var p, C, b;
859
- e.moveCurrentViewshed(!1), i.value && !u.value ? (u.value = await ((p = t.maps.activeMap) == null ? void 0 : p.getViewpoint()), await ((C = t.maps.activeMap) == null ? void 0 : C.gotoViewpoint(
860
- new Me({
860
+ e.moveCurrentViewshed(!1), t.value && !u.value ? (u.value = await ((p = i.maps.activeMap) == null ? void 0 : p.getViewpoint()), await ((C = i.maps.activeMap) == null ? void 0 : C.gotoViewpoint(
861
+ new Te({
861
862
  groundPosition: [
862
- i.value.position[0],
863
- i.value.position[1],
864
- i.value.position[2] + i.value.heightOffset
863
+ t.value.position[0],
864
+ t.value.position[1],
865
+ t.value.position[2] + t.value.heightOffset
865
866
  ],
866
- heading: i.value.heading,
867
- pitch: i.value.pitch,
867
+ heading: t.value.heading,
868
+ pitch: t.value.pitch,
868
869
  distance: 0,
869
870
  animate: !0
870
871
  // if not animate, async does not work and the cameraChanged listener is triggered immediately. alternatively set timeout
871
872
  })
872
- )), $()) : u.value && ((b = t.maps.activeMap) == null || b.gotoViewpoint(u.value), c());
873
+ )), $()) : u.value && ((b = i.maps.activeMap) == null || b.gotoViewpoint(u.value), c());
873
874
  }
874
875
  }), d.push({
875
876
  name: "moveViewshed",
876
877
  title: "viewshed.move",
877
- icon: e.heightMode.value === V.RELATIVE ? "$vcsEditVertices" : "mdi-axis-arrow",
878
+ icon: e.heightMode.value === y.RELATIVE ? "$vcsEditVertices" : "mdi-axis-arrow",
878
879
  active: o.value === g.MOVE,
879
880
  callback() {
880
881
  e.moveCurrentViewshed(
@@ -894,12 +895,12 @@ const vt = {
894
895
  return {
895
896
  position: n,
896
897
  setPosition(d, p, C) {
897
- if (c(), !!i.value) {
898
- if (C === 2 && e.heightMode.value === V.RELATIVE)
899
- i.value.heightOffset = Number(d);
898
+ if (c(), !!t.value) {
899
+ if (C === 2 && e.heightMode.value === y.RELATIVE)
900
+ t.value.heightOffset = Number(d);
900
901
  else {
901
- const b = [...i.value.position];
902
- b[C] = Number(d), i.value.position = b;
902
+ const b = [...t.value.position];
903
+ b[C] = Number(d), t.value.position = b;
903
904
  }
904
905
  n[p] = Number(d);
905
906
  }
@@ -912,9 +913,9 @@ const vt = {
912
913
  currentIsPersisted: r,
913
914
  viewshedType: v,
914
915
  ViewshedTypes: w,
915
- HeightModes: V,
916
+ HeightModes: y,
916
917
  heightMode: e.heightMode,
917
- TransformationMode: Te,
918
+ TransformationMode: Me,
918
919
  changeHeightMode: e.changeHeightMode,
919
920
  async createNewViewshed() {
920
921
  await e.createViewshed(v.value);
@@ -926,19 +927,19 @@ const vt = {
926
927
  }
927
928
  };
928
929
  var wt = function() {
929
- var e = this, t = e._self._c;
930
- return t("div", [e.viewshedMode === e.ViewshedPluginModes.CREATE ? t("div", { staticClass: "px-2 py-1" }, [e._v(" " + e._s(e.$t("viewshed.createDescription")) + " ")]) : e.viewshedMode === e.ViewshedPluginModes.EDIT || e.viewshedMode === e.ViewshedPluginModes.MOVE ? t("VcsFormSection", { attrs: { "header-actions": e.headerActions, heading: "viewshed.viewpoint", "action-button-list-overflow-count": 3 } }, [t("v-container", { staticClass: "px-1 py-0" }, [t("v-row", { attrs: { "no-gutters": "" } }, [t("span", { staticClass: "px-1 py-0" }, [e._v(e._s(e.$t("viewshed.position")))])]), e.viewshedMode === e.ViewshedPluginModes.MOVE && e.heightMode === e.HeightModes.ABSOLUTE ? t("v-row", { attrs: { "no-gutters": "" } }, [t("VcsFeatureTransforms", { attrs: { "transformation-mode": e.TransformationMode.TRANSLATE, "feature-properties": { altitudeMode: "absolute" }, "allow-z-input": !0 } })], 1) : t("v-row", { attrs: { "no-gutters": "" } }, e._l(e.position, function(i, o, r) {
931
- return t("v-col", { key: r, staticClass: "pb-1" }, [t("VcsTextField", { attrs: { value: i, type: "number", prefix: o, "show-spin-buttons": !0, step: o === "Z" ? 1 : 1e-4, unit: o === "Z" ? "m" : "°", decimals: o === "Z" ? 2 : 8, disabled: e.viewshedMode === e.ViewshedPluginModes.MOVE && !(o === "Z" && e.heightMode === e.HeightModes.RELATIVE) }, on: { input: (a) => e.setPosition(a, o, r) } })], 1);
932
- }), 1)], 1)], 1) : e._e(), t("v-divider"), t("v-container", { staticClass: "px-1 py-0" }, [t("v-row", { attrs: { "no-gutters": "" } }, [t("v-col", [t("VcsLabel", [e._v(" " + e._s(e.$t("viewshed.heightMode")) + " ")])], 1), t("v-col", [t("VcsSelect", { attrs: { items: Object.values(e.HeightModes).map((i) => ({
933
- value: i,
934
- text: `viewshed.${i}`
935
- })), value: e.heightMode }, on: { input: e.changeHeightMode } })], 1)], 1)], 1), e.viewshedMode === e.ViewshedPluginModes.EDIT || e.viewshedMode === e.ViewshedPluginModes.MOVE ? t("v-container", { staticClass: "px-1 pt-0 pb-2" }, e._l(e.parameters, function(i, o) {
936
- return t("v-row", { key: o, attrs: { "no-gutters": "" } }, [o === "distance" || e.viewshedType === e.ViewshedTypes.CONE && o !== "showPrimitive" ? t("v-col", [t("v-row", { staticClass: "pr-1", attrs: { "no-gutters": "" } }, [t("v-col", [t("VcsLabel", { attrs: { "html-for": o } }, [e._v(" " + e._s(e.$t(`viewshed.${o}`)) + " ")])], 1), t("v-col", { staticClass: "d-flex justify-end align-center" }, [o === "distance" ? t("span", [e._v(e._s(`${i} m`))]) : t("span", [e._v(e._s(`${i} °`))])])], 1), t("v-row", { attrs: { "no-gutters": "" } }, [t("v-col", [t("VcsSlider", { attrs: { id: o, value: i, type: "number", step: "1", min: e.parameterRanges[o][0], max: e.parameterRanges[o][1], height: "15" }, on: { input: (r) => e.setParameter(o, r) } })], 1)], 1)], 1) : e._e()], 1);
937
- }), 1) : e._e(), t("v-divider"), e.viewshedMode === e.ViewshedPluginModes.EDIT || e.viewshedMode === e.ViewshedPluginModes.MOVE ? t("div", { staticClass: "d-flex w-full justify-space-between px-2 pt-2 pb-1" }, [t("VcsFormButton", { attrs: { tooltip: "viewshed.addToMyWorkspace", icon: "$vcsComponentsPlus", disabled: e.currentIsPersisted || void 0 }, on: { click: function(i) {
930
+ var e = this, i = e._self._c;
931
+ return i("div", [e.viewshedMode === e.ViewshedPluginModes.CREATE ? i("div", { staticClass: "px-2 py-1" }, [e.viewshedType === e.ViewshedTypes.CONE ? [e._v(" " + e._s(e.$t("viewshed.createDescription")) + " ")] : e.viewshedType === e.ViewshedTypes.THREESIXTY ? [e._v(" " + e._s(e.$t("viewshed.createThreeSixtyDescription")) + " ")] : e._e()], 2) : e.viewshedMode === e.ViewshedPluginModes.EDIT || e.viewshedMode === e.ViewshedPluginModes.MOVE ? i("VcsFormSection", { attrs: { "header-actions": e.headerActions, heading: "viewshed.viewpoint", "action-button-list-overflow-count": 3 } }, [i("v-container", { staticClass: "px-1 py-0" }, [i("v-row", { attrs: { "no-gutters": "" } }, [i("span", { staticClass: "px-1 py-0" }, [e._v(e._s(e.$t("viewshed.position")))])]), e.viewshedMode === e.ViewshedPluginModes.MOVE && e.heightMode === e.HeightModes.ABSOLUTE ? i("v-row", { attrs: { "no-gutters": "" } }, [i("VcsFeatureTransforms", { attrs: { "transformation-mode": e.TransformationMode.TRANSLATE, "feature-properties": { altitudeMode: "absolute" }, "allow-z-input": !0 } })], 1) : i("v-row", { attrs: { "no-gutters": "" } }, e._l(e.position, function(t, o, r) {
932
+ return i("v-col", { key: r, staticClass: "pb-1" }, [i("VcsTextField", { attrs: { value: t, type: "number", prefix: o, "show-spin-buttons": !0, step: o === "Z" ? 1 : 1e-4, unit: o === "Z" ? "m" : "°", decimals: o === "Z" ? 2 : 8, disabled: e.viewshedMode === e.ViewshedPluginModes.MOVE && !(o === "Z" && e.heightMode === e.HeightModes.RELATIVE) }, on: { input: (a) => e.setPosition(a, o, r) } })], 1);
933
+ }), 1)], 1)], 1) : e._e(), i("v-divider"), i("v-container", { staticClass: "px-1 py-0" }, [i("v-row", { attrs: { "no-gutters": "" } }, [i("v-col", [i("VcsLabel", [e._v(" " + e._s(e.$t("viewshed.heightMode")) + " ")])], 1), i("v-col", [i("VcsSelect", { attrs: { items: Object.values(e.HeightModes).map((t) => ({
934
+ value: t,
935
+ text: `viewshed.${t}`
936
+ })), value: e.heightMode }, on: { input: e.changeHeightMode } })], 1)], 1)], 1), e.viewshedMode === e.ViewshedPluginModes.EDIT || e.viewshedMode === e.ViewshedPluginModes.MOVE ? i("v-container", { staticClass: "px-1 pt-0 pb-2" }, e._l(e.parameters, function(t, o) {
937
+ return i("v-row", { key: o, attrs: { "no-gutters": "" } }, [o === "distance" || e.viewshedType === e.ViewshedTypes.CONE && o !== "showPrimitive" ? i("v-col", [i("v-row", { staticClass: "pr-1", attrs: { "no-gutters": "" } }, [i("v-col", [i("VcsLabel", { attrs: { "html-for": o } }, [e._v(" " + e._s(e.$t(`viewshed.${o}`)) + " ")])], 1), i("v-col", { staticClass: "d-flex justify-end align-center" }, [o === "distance" ? i("span", [e._v(e._s(`${t} m`))]) : i("span", [e._v(e._s(`${t} °`))])])], 1), i("v-row", { attrs: { "no-gutters": "" } }, [i("v-col", [i("VcsSlider", { attrs: { id: o, value: t, type: "number", step: "1", min: e.parameterRanges[o][0], max: e.parameterRanges[o][1], height: "15" }, on: { input: (r) => e.setParameter(o, r) } })], 1)], 1)], 1) : e._e()], 1);
938
+ }), 1) : e._e(), i("v-divider"), e.viewshedMode === e.ViewshedPluginModes.EDIT || e.viewshedMode === e.ViewshedPluginModes.MOVE ? i("div", { staticClass: "d-flex w-full justify-space-between px-2 pt-2 pb-1" }, [i("VcsFormButton", { attrs: { tooltip: "viewshed.addToMyWorkspace", icon: "$vcsComponentsPlus", disabled: e.currentIsPersisted || void 0 }, on: { click: function(t) {
938
939
  return e.addToMyWorkspace();
939
- } } }), t("VcsFormButton", { attrs: { variant: "filled" }, on: { click: function(i) {
940
+ } } }), i("VcsFormButton", { attrs: { variant: "filled" }, on: { click: function(t) {
940
941
  return e.createNewViewshed();
941
- } } }, [e._v(" " + e._s(e.$t("viewshed.new")) + " ")])], 1) : e.viewshedMode === e.ViewshedPluginModes.CREATE ? t("div", { staticClass: "d-flex w-full justify-end px-2 pt-2 pb-1" }, [t("VcsFormButton", { attrs: { variant: "filled" }, on: { click: function(i) {
942
+ } } }, [e._v(" " + e._s(e.$t("viewshed.new")) + " ")])], 1) : e.viewshedMode === e.ViewshedPluginModes.CREATE ? i("div", { staticClass: "d-flex w-full justify-end px-2 pt-2 pb-1" }, [i("VcsFormButton", { attrs: { variant: "filled" }, on: { click: function(t) {
942
943
  return e.cancel();
943
944
  } } }, [e._v(" " + e._s(e.$t("viewshed.cancel")) + " ")])], 1) : e._e()], 1);
944
945
  }, mt = [], gt = /* @__PURE__ */ ue(
@@ -951,37 +952,37 @@ var wt = function() {
951
952
  null,
952
953
  null
953
954
  );
954
- const _t = gt.exports, P = "@vcmap/viewshed", Ct = "2.0.3", Et = "^5.1", Y = {
955
+ const _t = gt.exports, P = "@vcmap/viewshed", Ct = "2.0.4", Et = "^5.1", Y = {
955
956
  [w.CONE]: "$vcsViewshed",
956
957
  [w.THREESIXTY]: "$vcsViewshedCone"
957
958
  };
958
- function Vt(s, e, t) {
959
- const i = A(), o = A(), r = `${t.id}-editor`, a = {
959
+ function yt(s, e, i) {
960
+ const t = A(), o = A(), r = `${i.id}-editor`, a = {
960
961
  component: _t,
961
962
  provides: {
962
963
  manager: s
963
964
  },
964
965
  state: {
965
- headerTitle: i,
966
+ headerTitle: t,
966
967
  headerIcon: o,
967
968
  styles: { width: "280px", height: "auto" },
968
969
  infoUrlCallback: e.getHelpUrlCallback("tools/viewshedTool.html")
969
970
  }
970
971
  };
971
- Ke(e, t, {
972
+ Xe(e, i, {
972
973
  editor: (v) => ({
973
974
  ...a,
974
975
  props: {
975
- selection: t.selection,
976
- getViewshed: () => t.collection.getByKey(v.name)
976
+ selection: i.selection,
977
+ getViewshed: () => i.collection.getByKey(v.name)
977
978
  }
978
979
  })
979
980
  });
980
981
  function l() {
981
- s.currentViewshed.value && (o.value = Y[s.currentViewshed.value.type], s.currentIsPersisted.value ? i.value = s.currentViewshed.value.properties.title : s.mode.value === g.CREATE ? i.value = [
982
+ s.currentViewshed.value && (o.value = Y[s.currentViewshed.value.type], s.currentIsPersisted.value ? t.value = s.currentViewshed.value.properties.title : s.mode.value === g.CREATE ? t.value = [
982
983
  "viewshed.create",
983
984
  `viewshed.${s.currentViewshed.value.type}`
984
- ] : i.value = [
985
+ ] : t.value = [
985
986
  "viewshed.temporary",
986
987
  `viewshed.${s.currentViewshed.value.type}`
987
988
  ]);
@@ -1010,11 +1011,11 @@ function Vt(s, e, t) {
1010
1011
  }
1011
1012
  };
1012
1013
  }
1013
- function yt(s, e, t, i) {
1014
+ function Vt(s, e, i, t) {
1014
1015
  const o = {
1015
1016
  type: Je.SELECT,
1016
1017
  action: j({
1017
- name: t,
1018
+ name: i,
1018
1019
  currentIndex: 0,
1019
1020
  active: !1,
1020
1021
  background: !1,
@@ -1034,7 +1035,7 @@ function yt(s, e, t, i) {
1034
1035
  e.createViewshed(u);
1035
1036
  }
1036
1037
  },
1037
- tools: i.flatMap((n) => n === w.CONE ? {
1038
+ tools: t.flatMap((n) => n === w.CONE ? {
1038
1039
  name: w.CONE,
1039
1040
  icon: Y[w.CONE],
1040
1041
  title: `viewshed.${w.CONE}`
@@ -1063,9 +1064,9 @@ function yt(s, e, t, i) {
1063
1064
  toolbox: o
1064
1065
  };
1065
1066
  }
1066
- function bt(s, e, t, i) {
1067
- z(i, [Object.values(w)]);
1068
- const { toolbox: o, destroy: r } = yt(s, e, t, i), a = s.toolboxManager.add(o, t).id;
1067
+ function bt(s, e, i, t) {
1068
+ z(t, [Object.values(w)]);
1069
+ const { toolbox: o, destroy: r } = Vt(s, e, i, t), a = s.toolboxManager.add(o, i).id;
1069
1070
  return () => {
1070
1071
  s.toolboxManager.remove(a), r();
1071
1072
  };
@@ -1075,28 +1076,28 @@ class J extends Oe {
1075
1076
  return "ViewshedCategory";
1076
1077
  }
1077
1078
  async _deserializeItem(e) {
1078
- var i;
1079
- const t = (
1079
+ var t;
1080
+ const i = (
1080
1081
  /** @type {import("@vcmap/core").CesiumMap | undefined} */
1081
- (i = this._app) == null ? void 0 : i.maps.getByType(B.className)[0]
1082
+ (t = this._app) == null ? void 0 : t.maps.getByType(B.className)[0]
1082
1083
  );
1083
- if (t)
1084
- return new T(e, t);
1084
+ if (i)
1085
+ return new M(e, i);
1085
1086
  throw new Error("No CesiumMap available");
1086
1087
  }
1087
1088
  }
1088
- function Mt(s, e) {
1089
- let t, i = 0;
1089
+ function Tt(s, e) {
1090
+ let i, t = 0;
1090
1091
  const o = new Set(
1091
1092
  e.filter((r) => r.type === s).map((r) => r.properties.title)
1092
1093
  );
1093
1094
  do
1094
- i += 1, o.has(`${s}-${i}`) || (t = `${s}-${i}`);
1095
- while (!t);
1096
- return t;
1095
+ t += 1, o.has(`${s}-${t}`) || (i = `${s}-${t}`);
1096
+ while (!i);
1097
+ return i;
1097
1098
  }
1098
- async function Tt(s) {
1099
- const e = new L(), t = new L(), { collectionComponent: i, category: o } = await s.categoryManager.requestCategory(
1099
+ async function Mt(s) {
1100
+ const e = new L(), i = new L(), { collectionComponent: t, category: o } = await s.categoryManager.requestCategory(
1100
1101
  {
1101
1102
  type: J.className,
1102
1103
  name: "Viewsheds",
@@ -1116,7 +1117,7 @@ async function Tt(s) {
1116
1117
  name: "visibilityAction",
1117
1118
  icon: "$vcsCheckbox",
1118
1119
  callback() {
1119
- t.raiseEvent(c);
1120
+ i.raiseEvent(c);
1120
1121
  }
1121
1122
  })
1122
1123
  );
@@ -1125,13 +1126,13 @@ async function Tt(s) {
1125
1126
  () => !0,
1126
1127
  r,
1127
1128
  P,
1128
- [i.id]
1129
+ [t.id]
1129
1130
  );
1130
1131
  const { action: a, destroy: l } = Ze(
1131
- i.selection,
1132
+ t.selection,
1132
1133
  () => {
1133
- const c = i.selection.value.map(
1134
- (m) => i.collection.getByKey(m.name)
1134
+ const c = t.selection.value.map(
1135
+ (m) => t.collection.getByKey(m.name)
1135
1136
  );
1136
1137
  qe(JSON.stringify(c), "viewsheds.json");
1137
1138
  },
@@ -1141,8 +1142,8 @@ async function Tt(s) {
1141
1142
  await Promise.all(
1142
1143
  c.map(async (m) => {
1143
1144
  const v = await m.text();
1144
- JSON.parse(v).forEach((y) => {
1145
- const $ = new T(y);
1145
+ JSON.parse(v).forEach((V) => {
1146
+ const $ = new M(V);
1146
1147
  o.collection.add($);
1147
1148
  });
1148
1149
  })
@@ -1152,28 +1153,28 @@ async function Tt(s) {
1152
1153
  P,
1153
1154
  "category-manager"
1154
1155
  );
1155
- return i.addActions([a, n]), {
1156
+ return t.addActions([a, n]), {
1156
1157
  renamed: e,
1157
- visibilityChanged: t,
1158
+ visibilityChanged: i,
1158
1159
  setSelection(c) {
1159
- c && (i.selection.value = i.items.value.filter((m) => c === m.name));
1160
+ c && (t.selection.value = t.items.value.filter((m) => c === m.name));
1160
1161
  },
1161
1162
  clearSelection() {
1162
- i.selection.value.length && (i.selection.value = []);
1163
+ t.selection.value.length && (t.selection.value = []);
1163
1164
  },
1164
1165
  setVisibility(c, m) {
1165
- const v = i.items.value.find(
1166
+ const v = t.items.value.find(
1166
1167
  (_) => c === _.name
1167
1168
  );
1168
1169
  if (v) {
1169
1170
  const _ = v.actions.find(
1170
- (y) => y.name === "visibilityAction"
1171
+ (V) => V.name === "visibilityAction"
1171
1172
  );
1172
1173
  _ && (_.icon = m ? "$vcsCheckboxChecked" : "$vcsCheckbox");
1173
1174
  }
1174
1175
  },
1175
1176
  add(c) {
1176
- c.properties.title = Mt(
1177
+ c.properties.title = Tt(
1177
1178
  c.type,
1178
1179
  /** @type {import("./viewshed.js").default[]} */
1179
1180
  [
@@ -1185,16 +1186,16 @@ async function Tt(s) {
1185
1186
  const m = o.collection.getByKey(c);
1186
1187
  m && o.collection.remove(m);
1187
1188
  },
1188
- collectionComponent: i,
1189
+ collectionComponent: t,
1189
1190
  destroy() {
1190
- s.categoryManager.removeOwner(P), e.destroy(), t.destroy(), l(), u();
1191
+ s.categoryManager.removeOwner(P), e.destroy(), i.destroy(), l(), u();
1191
1192
  }
1192
1193
  };
1193
1194
  }
1194
- function F() {
1195
+ function k() {
1195
1196
  return {
1196
- visibleColor: T.getDefaultOptions().visibleColor,
1197
- shadowColor: T.getDefaultOptions().shadowColor,
1197
+ visibleColor: M.getDefaultOptions().visibleColor,
1198
+ shadowColor: M.getDefaultOptions().shadowColor,
1198
1199
  tools: [...Object.values(w)]
1199
1200
  };
1200
1201
  }
@@ -1223,31 +1224,31 @@ const Ot = {
1223
1224
  },
1224
1225
  setup(s) {
1225
1226
  const e = A({});
1226
- s.getConfig().then((i) => {
1227
- e.value = Object.assign(F(), i);
1227
+ s.getConfig().then((t) => {
1228
+ e.value = Object.assign(k(), t);
1228
1229
  });
1229
- async function t() {
1230
+ async function i() {
1230
1231
  await s.setConfig(e.value);
1231
1232
  }
1232
1233
  return {
1233
1234
  localConfig: e,
1234
1235
  ViewshedTypes: w,
1235
- apply: t,
1236
- toolItems: Object.values(w).map((i) => ({
1237
- value: i,
1238
- text: `viewshed.${i}`
1236
+ apply: i,
1237
+ toolItems: Object.values(w).map((t) => ({
1238
+ value: t,
1239
+ text: `viewshed.${t}`
1239
1240
  }))
1240
1241
  };
1241
1242
  }
1242
1243
  };
1243
1244
  var St = function() {
1244
- var e = this, t = e._self._c;
1245
- return t("AbstractConfigEditor", e._b({ on: { submit: e.apply } }, "AbstractConfigEditor", { ...e.$attrs, ...e.$props }, !1), [e.localConfig ? t("VcsFormSection", { attrs: { heading: "viewshed.editor.general" } }, [t("v-container", { staticClass: "px-1 py-0" }, [t("v-row", { attrs: { "no-gutters": "" } }, [t("v-col", [t("VcsLabel", { attrs: { "html-for": "viewshed-editor-tools" } }, [e._v(e._s(e.$t("viewshed.editor.tools")))])], 1), t("v-col", [t("VcsSelect", { attrs: { id: "viewshed-tools", items: e.toolItems, multiple: !0 }, model: { value: e.localConfig.tools, callback: function(i) {
1246
- e.$set(e.localConfig, "tools", i);
1247
- }, expression: "localConfig.tools" } })], 1)], 1), t("v-row", { attrs: { "no-gutters": "" } }, [t("v-col", [t("VcsLabel", { attrs: { "html-for": "viewshed-editor-visible-color" } }, [e._v(e._s(e.$t("viewshed.editor.visibleColor")))])], 1), t("v-col", [t("VColorPicker", { attrs: { mode: "rgba" }, model: { value: e.localConfig.visibleColor, callback: function(i) {
1248
- e.$set(e.localConfig, "visibleColor", i);
1249
- }, expression: "localConfig.visibleColor" } })], 1)], 1), t("v-row", { attrs: { "no-gutters": "" } }, [t("v-col", [t("VcsLabel", { attrs: { "html-for": "viewshed-editor-shadow-color" } }, [e._v(e._s(e.$t("viewshed.editor.shadowColor")))])], 1), t("v-col", [t("VColorPicker", { attrs: { mode: "rgba" }, model: { value: e.localConfig.shadowColor, callback: function(i) {
1250
- e.$set(e.localConfig, "shadowColor", i);
1245
+ var e = this, i = e._self._c;
1246
+ return i("AbstractConfigEditor", e._b({ on: { submit: e.apply } }, "AbstractConfigEditor", { ...e.$attrs, ...e.$props }, !1), [e.localConfig ? i("VcsFormSection", { attrs: { heading: "viewshed.editor.general" } }, [i("v-container", { staticClass: "px-1 py-0" }, [i("v-row", { attrs: { "no-gutters": "" } }, [i("v-col", [i("VcsLabel", { attrs: { "html-for": "viewshed-editor-tools" } }, [e._v(e._s(e.$t("viewshed.editor.tools")))])], 1), i("v-col", [i("VcsSelect", { attrs: { id: "viewshed-tools", items: e.toolItems, multiple: !0 }, model: { value: e.localConfig.tools, callback: function(t) {
1247
+ e.$set(e.localConfig, "tools", t);
1248
+ }, expression: "localConfig.tools" } })], 1)], 1), i("v-row", { attrs: { "no-gutters": "" } }, [i("v-col", [i("VcsLabel", { attrs: { "html-for": "viewshed-editor-visible-color" } }, [e._v(e._s(e.$t("viewshed.editor.visibleColor")))])], 1), i("v-col", [i("VColorPicker", { attrs: { mode: "rgba" }, model: { value: e.localConfig.visibleColor, callback: function(t) {
1249
+ e.$set(e.localConfig, "visibleColor", t);
1250
+ }, expression: "localConfig.visibleColor" } })], 1)], 1), i("v-row", { attrs: { "no-gutters": "" } }, [i("v-col", [i("VcsLabel", { attrs: { "html-for": "viewshed-editor-shadow-color" } }, [e._v(e._s(e.$t("viewshed.editor.shadowColor")))])], 1), i("v-col", [i("VColorPicker", { attrs: { mode: "rgba" }, model: { value: e.localConfig.shadowColor, callback: function(t) {
1251
+ e.$set(e.localConfig, "shadowColor", t);
1251
1252
  }, expression: "localConfig.shadowColor" } })], 1)], 1)], 1)], 1) : e._e()], 1);
1252
1253
  }, Pt = [], At = /* @__PURE__ */ ue(
1253
1254
  Ot,
@@ -1260,8 +1261,8 @@ var St = function() {
1260
1261
  null
1261
1262
  );
1262
1263
  const It = At.exports;
1263
- function kt(s) {
1264
- let e, t = () => {
1264
+ function Ft(s) {
1265
+ let e, i = () => {
1265
1266
  };
1266
1267
  return {
1267
1268
  get name() {
@@ -1278,34 +1279,34 @@ function kt(s) {
1278
1279
  * @param {ViewshedPluginState=} state
1279
1280
  * @returns {Promise<void>}
1280
1281
  */
1281
- async initialize(i, o) {
1282
- i.categoryClassRegistry.registerClass(
1282
+ async initialize(t, o) {
1283
+ t.categoryClassRegistry.registerClass(
1283
1284
  this[Se],
1284
1285
  J.className,
1285
1286
  J
1286
1287
  );
1287
- const r = await Tt(i);
1288
+ const r = await Mt(t);
1288
1289
  e = ft(
1289
- i,
1290
+ t,
1290
1291
  s,
1291
1292
  r
1292
1293
  );
1293
1294
  const a = bt(
1294
- i,
1295
+ t,
1295
1296
  e,
1296
1297
  P,
1297
- s.tools || F().tools
1298
- ), { destroy: l } = Vt(
1298
+ s.tools || k().tools
1299
+ ), { destroy: l } = yt(
1299
1300
  e,
1300
- i,
1301
+ t,
1301
1302
  r.collectionComponent
1302
1303
  );
1303
- t = () => {
1304
+ i = () => {
1304
1305
  a(), l(), r.destroy();
1305
1306
  };
1306
- const { activeMap: n } = i.maps;
1307
+ const { activeMap: n } = t.maps;
1307
1308
  if (o != null && o.mode && o.currentViewshed && n instanceof B) {
1308
- const u = new T(o.currentViewshed, n);
1309
+ const u = new M(o.currentViewshed, n);
1309
1310
  o.mode === g.VIEW ? e.viewViewshed(u) : e.editViewshed(u);
1310
1311
  }
1311
1312
  },
@@ -1313,24 +1314,24 @@ function kt(s) {
1313
1314
  * should return all default values of the configuration
1314
1315
  * @returns {ViewshedPluginOptions}
1315
1316
  */
1316
- getDefaultOptions: F,
1317
+ getDefaultOptions: k,
1317
1318
  /**
1318
1319
  * should return the plugin's serialization excluding all default values
1319
1320
  * @returns {ViewshedPluginOptions}
1320
1321
  */
1321
1322
  toJSON() {
1322
- const i = {};
1323
- return s.tools && F().tools.length !== s.tools.length && (i.tools = [...s.tools]), s.shadowColor && s.shadowColor !== T.getDefaultOptions().shadowColor && (i.shadowColor = s.shadowColor), s.visibleColor && s.visibleColor !== T.getDefaultOptions().visibleColor && (i.visibleColor = s.visibleColor), i;
1323
+ const t = {};
1324
+ return s.tools && k().tools.length !== s.tools.length && (t.tools = [...s.tools]), s.shadowColor && s.shadowColor !== M.getDefaultOptions().shadowColor && (t.shadowColor = s.shadowColor), s.visibleColor && s.visibleColor !== M.getDefaultOptions().visibleColor && (t.visibleColor = s.visibleColor), t;
1324
1325
  },
1325
1326
  /**
1326
1327
  * should return the plugins state
1327
1328
  * @returns {ViewshedPluginState}
1328
1329
  */
1329
1330
  getState() {
1330
- var i;
1331
+ var t;
1331
1332
  return {
1332
1333
  mode: e.mode.value,
1333
- currentViewshed: (i = e.currentViewshed.value) == null ? void 0 : i.toJSON()
1334
+ currentViewshed: (t = e.currentViewshed.value) == null ? void 0 : t.toJSON()
1334
1335
  };
1335
1336
  },
1336
1337
  /**
@@ -1340,7 +1341,7 @@ function kt(s) {
1340
1341
  getConfigEditors() {
1341
1342
  return [{ component: It }];
1342
1343
  },
1343
- destroy: t,
1344
+ destroy: i,
1344
1345
  i18n: {
1345
1346
  en: {
1346
1347
  viewshed: {
@@ -1366,9 +1367,10 @@ function kt(s) {
1366
1367
  returnToViewpoint: "Return to previous viewpoint",
1367
1368
  move: "Move viewpoint",
1368
1369
  createDescription: "Click the map twice. First click places the origin, second defines the distance and direction of the viewshed.",
1370
+ createThreeSixtyDescription: "Click the map twice. First click places the origin, second defines the distance of the viewshed.",
1369
1371
  remove: "Remove",
1370
1372
  editor: {
1371
- general: "General",
1373
+ general: "General Settings",
1372
1374
  visibleColor: "Visible color",
1373
1375
  shadowColor: "Shadow color",
1374
1376
  tools: "Tools"
@@ -1399,11 +1401,12 @@ function kt(s) {
1399
1401
  returnToViewpoint: "Zu vorherigem Viewpoint zurück springen",
1400
1402
  move: "Viewpoint verschieben",
1401
1403
  createDescription: "Klicke zweimal in die Karte. Der erste Klick platziert den Ursprung, der zweite die Distanz und die Richtung des Viewsheds.",
1404
+ createThreeSixtyDescription: "Klicke zweimal in die Karte. Der erste Klick platziert den Ursprung, der zweite die Distanz des Viewsheds.",
1402
1405
  remove: "Entfernen",
1403
1406
  editor: {
1404
- general: "Generelles",
1407
+ general: "Allgemeine Einstellungen",
1405
1408
  visibleColor: "Sichtbarer Bereich",
1406
- shadowColor: "Schatten Bereich",
1409
+ shadowColor: "Nicht sichtbarer Bereich",
1407
1410
  tools: "Werkzeuge"
1408
1411
  }
1409
1412
  }
@@ -1412,5 +1415,5 @@ function kt(s) {
1412
1415
  };
1413
1416
  }
1414
1417
  export {
1415
- kt as default
1418
+ Ft as default
1416
1419
  };