@vcmap/viewshed 2.0.8 → 2.0.9

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,13 +1,13 @@
1
- var pe = Object.defineProperty;
2
- var we = (s, e, i) => e in s ? pe(s, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : s[e] = i;
3
- var Q = (s, e, i) => (we(s, typeof e != "symbol" ? e + "" : e, i), i);
4
- import { VcsCameraPrimitive as me, VcsObject as ge, VcsEvent as D, AbstractInteraction as _e, EventType as x, Projection as A, SessionType as Ce, CesiumMap as $, startEditFeaturesSession as Ee, startEditGeometrySession as ye, VectorLayer as Ve, wgs84Projection as be, maxZIndex as Me, markVolatile as Te, Viewpoint as Oe, TransformationMode as Se, Category as Pe, moduleIdSymbol as Ie } from "../../../assets/core.js";
5
- import { Color as j, Matrix4 as Ae, Transforms as Re, Primitive as ee, GeometryInstance as te, SphereGeometry as $e, ColorGeometryInstanceAttribute as ie, PerInstanceColorAppearance as se, SphereOutlineGeometry as Ne, Math as T, Cartesian3 as S, ShadowMap as xe, Camera as De, HeightReference as Le } from "../../../assets/cesium.js";
6
- import { shallowRef as K, ref as I, nextTick as Fe, inject as oe, computed as ne, reactive as W, watchEffect as ke, watch as R, onMounted as je, onUnmounted as We } from "../../../assets/vue.js";
7
- import { ol$Observable$unByKey as Be, Feature as ze, ol$geom$Point as He, ol$style$Style as Ge } from "../../../assets/ol.js";
8
- import { VcsTextField as Ue, VcsSlider as Ke, VcsLabel as ae, VcsFormSection as le, VcsSelect as ce, VcsFormButton as Xe, VcsFeatureTransforms as Ye, makeEditorCollectionComponentClass as Je, WindowSlot as Ze, ToolboxType as qe, createSupportedMapMappingFunction as Qe, createListExportAction as et, downloadText as tt, createListImportAction as it, AbstractConfigEditor as st } from "../../../assets/ui.js";
9
- import { VContainer as de, VRow as he, VCol as ue, VDivider as ot, VColorPicker as nt } from "../../../assets/vuetify.js";
10
- const N = [
1
+ var we = Object.defineProperty;
2
+ var me = (s, e, i) => e in s ? we(s, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : s[e] = i;
3
+ var ee = (s, e, i) => (me(s, typeof e != "symbol" ? e + "" : e, i), i);
4
+ import { VcsCameraPrimitive as ge, VcsObject as _e, VcsEvent as F, AbstractInteraction as Ce, EventType as L, Projection as A, SessionType as Ee, CesiumMap as N, startEditFeaturesSession as ye, startEditGeometrySession as Ve, VectorLayer as be, wgs84Projection as Me, maxZIndex as Te, markVolatile as Oe, Viewpoint as Se, TransformationMode as Pe, Category as Ie, moduleIdSymbol as Re } from "../../../assets/core.js";
5
+ import { Color as B, Matrix4 as Ae, Transforms as $e, Primitive as te, GeometryInstance as ie, SphereGeometry as Ne, ColorGeometryInstanceAttribute as se, PerInstanceColorAppearance as oe, SphereOutlineGeometry as xe, Math as O, Cartesian3 as I, ShadowMap as De, Camera as Le, HeightReference as Fe } from "../../../assets/cesium.js";
6
+ import { shallowRef as X, ref as R, nextTick as ke, inject as ne, computed as re, reactive as z, watchEffect as je, watch as $, onMounted as We, onUnmounted as Be } from "../../../assets/vue.js";
7
+ import { ol$Observable$unByKey as ze, Feature as Ge, ol$geom$Point as He, ol$style$Style as Ue } from "../../../assets/ol.js";
8
+ import { VcsTextField as Ke, VcsSlider as Xe, VcsLabel as le, VcsFormSection as ce, VcsSelect as de, VcsFormButton as Ye, VcsFeatureTransforms as Je, makeEditorCollectionComponentClass as Ze, WindowSlot as qe, ToolboxType as Qe, createSupportedMapMappingFunction as et, createListExportAction as tt, downloadText as it, createListImportAction as st, NotificationType as j, AbstractConfigEditor as ot } from "../../../assets/ui.js";
9
+ import { VContainer as he, VRow as ue, VCol as fe, VDivider as nt, VColorPicker as rt } from "../../../assets/vuetify.js";
10
+ const D = [
11
11
  [String, "string"],
12
12
  [Number, "number"],
13
13
  [Boolean, "boolean"],
@@ -15,7 +15,7 @@ const N = [
15
15
  [void 0, "undefined"],
16
16
  [Symbol, "symbol"]
17
17
  ];
18
- function B(s) {
18
+ function G(s) {
19
19
  const e = {};
20
20
  if (!s || e.toString(s) !== "[object Object]")
21
21
  return !1;
@@ -25,7 +25,7 @@ function B(s) {
25
25
  const t = e.hasOwnProperty, o = t.call(i, "constructor") && i.constructor;
26
26
  return typeof o == "function" && t.toString.call(o) === t.toString.call(Object);
27
27
  }
28
- function b(s, e) {
28
+ function M(s, e) {
29
29
  if (s === null)
30
30
  return "null";
31
31
  if (typeof s > "u")
@@ -34,7 +34,7 @@ function b(s, e) {
34
34
  return typeof s;
35
35
  let i;
36
36
  if (Array.isArray(s))
37
- i = `[${s.map((o) => b(o, e)).join(",")}]`;
37
+ i = `[${s.map((o) => M(o, e)).join(",")}]`;
38
38
  else
39
39
  try {
40
40
  i = JSON.stringify(s);
@@ -43,10 +43,10 @@ function b(s, e) {
43
43
  }
44
44
  return i = i || typeof s, i.length > 20 ? `${i.substr(0, 20)}...` : i;
45
45
  }
46
- function rt(s, e) {
47
- return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || typeof e == "symbol" ? s === e ? !1 : `Expected ${b(s)} to equal ${e.toString()}` : null;
46
+ function at(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;
48
48
  }
49
- function at(s, e, i) {
49
+ function lt(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");
@@ -54,48 +54,48 @@ function at(s, e, i) {
54
54
  let t = !1;
55
55
  return s.findIndex((n) => {
56
56
  try {
57
- z(n, e[0], i);
58
- } catch (a) {
59
- t = a.message.replace(/Match failed:\s/, "");
57
+ H(n, e[0], i);
58
+ } catch (l) {
59
+ t = l.message.replace(/Match failed:\s/, "");
60
60
  }
61
61
  return t;
62
- }) > -1 ? `${t} in ${b(s)}` : !1;
62
+ }) > -1 ? `${t} in ${M(s)}` : !1;
63
63
  }
64
- return `Expected ${b(s)} to be an Array`;
64
+ return `Expected ${M(s)} to be an Array`;
65
65
  }
66
66
  return null;
67
67
  }
68
- function X(s, e, i) {
68
+ function Y(s, e, i) {
69
69
  const t = i ? `${i}.` : "";
70
- if (!B(s))
71
- return `Expected ${b(s)} to be a plain Object`;
70
+ if (!G(s))
71
+ return `Expected ${M(s)} to be a plain Object`;
72
72
  let n = !1;
73
- const a = Object.keys(e).find((c) => {
73
+ const l = Object.keys(e).find((c) => {
74
74
  const r = s[c];
75
- if (B(e[c]))
76
- n = X(r, e[c], t + c);
75
+ if (G(e[c]))
76
+ n = Y(r, e[c], t + c);
77
77
  else
78
78
  try {
79
- z(r, e[c]);
79
+ H(r, e[c]);
80
80
  } catch (f) {
81
81
  n = f.message.replace(/Match failed:\s/, "");
82
82
  }
83
83
  return n;
84
84
  });
85
- return a ? `${n} in object.${t}${a}` : !1;
85
+ return l ? `${n} in object.${t}${l}` : !1;
86
86
  }
87
- function lt(s, e) {
87
+ function ct(s, e) {
88
88
  if (e === Number)
89
- return Number.isFinite(s) ? !1 : `expected ${b(s)} to be a number, excluding NaN`;
90
- for (let i = N.length; i--; )
91
- if (e === N[i][0])
92
- return typeof s === N[i][1] ? !1 : `expected ${b(s)} to be a ${N[i][1]}`;
89
+ return Number.isFinite(s) ? !1 : `expected ${M(s)} to be a number, excluding NaN`;
90
+ for (let i = D.length; i--; )
91
+ if (e === D[i][0])
92
+ return typeof s === D[i][1] ? !1 : `expected ${M(s)} to be a ${D[i][1]}`;
93
93
  return null;
94
94
  }
95
- function Y(s) {
95
+ function J(s) {
96
96
  if (s === null)
97
97
  return "null";
98
- const e = N.find((o) => o[0] === s);
98
+ const e = D.find((o) => o[0] === s);
99
99
  if (e)
100
100
  return e[1];
101
101
  let i = s.toString();
@@ -104,10 +104,10 @@ function Y(s) {
104
104
  const t = i.match(/function (.*)\(/);
105
105
  if (t && t.length > 1)
106
106
  return t[1];
107
- if (B(s)) {
107
+ if (G(s)) {
108
108
  const o = {};
109
109
  Object.keys(s).forEach((n) => {
110
- o[n] = Y(s[n]);
110
+ o[n] = J(s[n]);
111
111
  });
112
112
  try {
113
113
  i = `Object of ${JSON.stringify(o)}`;
@@ -117,49 +117,49 @@ function Y(s) {
117
117
  }
118
118
  return i;
119
119
  }
120
- function fe(s, e, i) {
120
+ function ve(s, e, i) {
121
121
  const t = i ? `${i}.` : "";
122
122
  let o = !1;
123
- return Object.keys(s).find((a) => {
124
- if (B(e[a])) {
125
- const c = s[a];
126
- o = fe(c, e[a], t + a);
123
+ return Object.keys(s).find((l) => {
124
+ if (G(e[l])) {
125
+ const c = s[l];
126
+ o = ve(c, e[l], t + l);
127
127
  } else
128
- e[a] || (o = `Found additional key ${t}${a}`);
128
+ e[l] || (o = `Found additional key ${t}${l}`);
129
129
  return o = o ? o.replace(/\sin.*/, "") : !1, o;
130
- }) ? `${o} in ${b(s)}` : !1;
130
+ }) ? `${o} in ${M(s)}` : !1;
131
131
  }
132
- function ct(s, e, i) {
133
- const t = function(a, c) {
132
+ function dt(s, e, i) {
133
+ const t = function(l, c) {
134
134
  if (c == null)
135
- return a === c ? !1 : `Expected ${b(a)} to be ${c}`;
136
- const r = lt(a, c);
135
+ return l === c ? !1 : `Expected ${M(l)} to be ${c}`;
136
+ const r = ct(l, c);
137
137
  if (r !== null)
138
138
  return r;
139
- const f = rt(a, c);
139
+ const f = at(l, c);
140
140
  if (f !== null)
141
141
  return f;
142
142
  if (Array.isArray(c))
143
- return at(a, c, i);
143
+ return lt(l, c, i);
144
144
  if (c instanceof Function)
145
- return a instanceof c ? !1 : `Expected ${b(a, !0)} to be of Type ${Y(c)}`;
145
+ return l instanceof c ? !1 : `Expected ${M(l, !0)} to be of Type ${J(c)}`;
146
146
  if (c === Object)
147
- return X(a, {});
147
+ return Y(l, {});
148
148
  if (typeof c != "object")
149
149
  throw new Error(`Cannot handler pattern ${c}`);
150
- const h = X(a, c);
151
- return h || (i ? fe(a, c) : !1);
150
+ const h = Y(l, c);
151
+ return h || (i ? ve(l, c) : !1);
152
152
  };
153
153
  let o;
154
- return Array.isArray(e) && e.length > 1 ? e.every((a) => t(s, a)) && (o = `Expected ${b(s)} to be a ${e.map((a) => Y(a)).join(" or ")}`) : o = t(s, e), o;
154
+ return Array.isArray(e) && e.length > 1 ? e.every((l) => t(s, l)) && (o = `Expected ${M(s)} to be a ${e.map((l) => J(l)).join(" or ")}`) : o = t(s, e), o;
155
155
  }
156
- function z(s, e, i) {
157
- const t = ct(s, e, i);
156
+ function H(s, e, i) {
157
+ const t = dt(s, e, i);
158
158
  if (t)
159
159
  throw new Error(`Match failed: ${t}`);
160
160
  return !1;
161
161
  }
162
- function dt(s, e, i) {
162
+ function ht(s, e, i) {
163
163
  if (s != null) {
164
164
  const t = Object.values(e).find((o) => o == s);
165
165
  if (t != null)
@@ -167,8 +167,8 @@ function dt(s, e, i) {
167
167
  }
168
168
  return i;
169
169
  }
170
- const ht = new j(), G = new Ae();
171
- class ut extends me {
170
+ const ut = new B(), U = new Ae();
171
+ class ft extends ge {
172
172
  constructor(e) {
173
173
  super(e), this.spot = e.spot;
174
174
  }
@@ -182,40 +182,40 @@ class ut extends me {
182
182
  super.update(e);
183
183
  else {
184
184
  const i = this._planesPrimitives, t = this._outlinePrimitives;
185
- i.length === 0 && (Re.eastNorthUpToFixedFrame(
185
+ i.length === 0 && ($e.eastNorthUpToFixedFrame(
186
186
  this._camera.positionWC,
187
187
  void 0,
188
- G
189
- ), i[0] = new ee({
188
+ U
189
+ ), i[0] = new te({
190
190
  allowPicking: this.allowPicking,
191
- geometryInstances: new te({
192
- geometry: new $e({
191
+ geometryInstances: new ie({
192
+ geometry: new Ne({
193
193
  radius: 2
194
194
  }),
195
195
  attributes: {
196
- color: ie.fromColor(
197
- j.fromAlpha(this._color, 0.1, ht)
196
+ color: se.fromColor(
197
+ B.fromAlpha(this._color, 0.1, ut)
198
198
  )
199
199
  },
200
- modelMatrix: G
200
+ modelMatrix: U
201
201
  }),
202
- appearance: new se({
202
+ appearance: new oe({
203
203
  translucent: !0,
204
204
  flat: !0
205
205
  }),
206
206
  asynchronous: !1
207
- }), t[0] = new ee({
207
+ }), t[0] = new te({
208
208
  allowPicking: this.allowPicking,
209
- geometryInstances: new te({
210
- geometry: new Ne({
209
+ geometryInstances: new ie({
210
+ geometry: new xe({
211
211
  radius: 2
212
212
  }),
213
213
  attributes: {
214
- color: ie.fromColor(this._color)
214
+ color: se.fromColor(this._color)
215
215
  },
216
- modelMatrix: G
216
+ modelMatrix: U
217
217
  }),
218
- appearance: new se({
218
+ appearance: new oe({
219
219
  translucent: !1,
220
220
  flat: !0
221
221
  }),
@@ -231,14 +231,14 @@ const w = {
231
231
  CONE: "cone",
232
232
  THREESIXTY: "360"
233
233
  };
234
- function ft(s, e) {
235
- const i = new De(s), t = (
234
+ function vt(s, e) {
235
+ const i = new Le(s), t = (
236
236
  /** @type {import("@vcmap-cesium/engine").PerspectiveFrustum} */
237
237
  i.frustum
238
238
  );
239
239
  return t.fov = e.fov, t.near = e.near, t.aspectRatio = e.aspectRatio, t.far = e.far, i;
240
240
  }
241
- const E = class E extends ge {
241
+ const y = class y extends _e {
242
242
  static get className() {
243
243
  return "Viewshed";
244
244
  }
@@ -249,7 +249,7 @@ const E = class E extends ge {
249
249
  static getDefaultOptions() {
250
250
  return {
251
251
  frustum: {
252
- fov: T.PI / 3,
252
+ fov: O.PI / 3,
253
253
  near: 1,
254
254
  aspectRatio: 1,
255
255
  far: 300
@@ -268,29 +268,29 @@ const E = class E extends ge {
268
268
  * @param {ViewshedOptions} options The options for the viewshed.
269
269
  */
270
270
  constructor(e) {
271
- var i, t, o, n, a, c;
271
+ var i, t, o, n, l, c;
272
272
  super(e), this._cesiumMap = null, this._shadowCamera = null, this._scene = null, this._frustumOptions = {
273
- fov: ((i = e.frustumOptions) == null ? void 0 : i.fov) || E.getDefaultOptions().frustum.fov,
274
- far: ((t = e.frustumOptions) == null ? void 0 : t.far) || E.getDefaultOptions().frustum.far,
275
- near: ((o = e.frustumOptions) == null ? void 0 : o.near) || E.getDefaultOptions().frustum.near,
276
- aspectRatio: ((n = e.frustumOptions) == null ? void 0 : n.aspectRatio) || E.getDefaultOptions().frustum.aspectRatio
273
+ fov: ((i = e.frustumOptions) == null ? void 0 : i.fov) || y.getDefaultOptions().frustum.fov,
274
+ far: ((t = e.frustumOptions) == null ? void 0 : t.far) || y.getDefaultOptions().frustum.far,
275
+ near: ((o = e.frustumOptions) == null ? void 0 : o.near) || y.getDefaultOptions().frustum.near,
276
+ aspectRatio: ((n = e.frustumOptions) == null ? void 0 : n.aspectRatio) || y.getDefaultOptions().frustum.aspectRatio
277
277
  }, this._headingPitchRollValues = e.orientation || {
278
- ...E.getDefaultOptions().orientation
279
- }, this._position = e.position || E.getDefaultOptions().position, this._viewshedType = dt(e.viewshedType, w), this._colors = {
280
- visibleColor: j.fromCssColorString(
281
- ((a = e.colorOptions) == null ? void 0 : a.visibleColor) || E.getDefaultOptions().visibleColor
278
+ ...y.getDefaultOptions().orientation
279
+ }, this._position = e.position || y.getDefaultOptions().position, this._viewshedType = ht(e.viewshedType, w), this._colors = {
280
+ visibleColor: B.fromCssColorString(
281
+ ((l = e.colorOptions) == null ? void 0 : l.visibleColor) || y.getDefaultOptions().visibleColor
282
282
  ),
283
- shadowColor: j.fromCssColorString(
284
- ((c = e.colorOptions) == null ? void 0 : c.shadowColor) || E.getDefaultOptions().shadowColor
283
+ shadowColor: B.fromCssColorString(
284
+ ((c = e.colorOptions) == null ? void 0 : c.shadowColor) || y.getDefaultOptions().shadowColor
285
285
  )
286
- }, this._heightOffset = e.heightOffset || 0, this._shadowMap = null, this._primitive = null, this._showPrimitive = !!e.showPrimitive, this._positionChanged = new D(), this._active = !1;
286
+ }, this._heightOffset = e.heightOffset || 0, this._shadowMap = null, this._primitive = null, this._showPrimitive = !!e.showPrimitive, this._positionChanged = new F(), this._active = !1;
287
287
  }
288
288
  /**
289
289
  * 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.
290
290
  * @param {import("ol/coordinate").Coordinate} coords The new positions coordinates in degrees
291
291
  */
292
292
  set position(e) {
293
- z(e, [Number]), this._position = e, this._shadowCamera && (this._shadowCamera.position = S.fromDegrees(
293
+ H(e, [Number]), this._position = e, this._shadowCamera && (this._shadowCamera.position = I.fromDegrees(
294
294
  e[0],
295
295
  e[1],
296
296
  e[2] + this._heightOffset
@@ -314,7 +314,7 @@ const E = class E extends ge {
314
314
  * @param {number} value the offset that is added to the position height.
315
315
  */
316
316
  set heightOffset(e) {
317
- this._heightOffset = e, this._shadowCamera && (this._shadowCamera.position = S.fromDegrees(
317
+ this._heightOffset = e, this._shadowCamera && (this._shadowCamera.position = I.fromDegrees(
318
318
  this.position[0],
319
319
  this.position[1],
320
320
  this.position[2] + e
@@ -332,7 +332,7 @@ const E = class E extends ge {
332
332
  * @param {number} value The distance in meters.
333
333
  */
334
334
  set distance(e) {
335
- 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());
335
+ this._frustumOptions.far = e > y.MIN_DISTANCE ? e : y.MIN_DISTANCE, this._shadowCamera && (this._shadowCamera.frustum.far = this._frustumOptions.far, this._viewshedType === w.THREESIXTY && this._updateShadowMap(), this._viewshedType === w.CONE && this._updatePrimitive());
336
336
  }
337
337
  /**
338
338
  * Returns the reach of the viewshed.
@@ -346,23 +346,23 @@ const E = class E extends ge {
346
346
  * @param {number} value The field of view in degrees.
347
347
  */
348
348
  set fov(e) {
349
- this._frustumOptions.fov = e * T.RADIANS_PER_DEGREE, this._shadowCamera && (this._shadowCamera.frustum.fov = e * T.RADIANS_PER_DEGREE, this._viewshedType === w.CONE && this._updatePrimitive());
349
+ 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());
350
350
  }
351
351
  /**
352
352
  * Returns the field of view.
353
353
  * @returns {number} The field of view in degrees.
354
354
  */
355
355
  get fov() {
356
- return this._frustumOptions.fov * T.DEGREES_PER_RADIAN;
356
+ return this._frustumOptions.fov * O.DEGREES_PER_RADIAN;
357
357
  }
358
358
  /**
359
359
  * Sets the heading of a cone viewshed. Does not have impact on 360 viewshed.
360
360
  * @param {number} value Heading in degrees.
361
361
  */
362
362
  set heading(e) {
363
- this._headingPitchRollValues.heading = e * T.RADIANS_PER_DEGREE, this._shadowCamera && (this._shadowCamera.setView({
363
+ this._headingPitchRollValues.heading = e * O.RADIANS_PER_DEGREE, this._shadowCamera && (this._shadowCamera.setView({
364
364
  orientation: {
365
- heading: e * T.RADIANS_PER_DEGREE,
365
+ heading: e * O.RADIANS_PER_DEGREE,
366
366
  pitch: this._shadowCamera.pitch,
367
367
  roll: 0
368
368
  }
@@ -373,15 +373,15 @@ const E = class E extends ge {
373
373
  * @returns {number} The heading in degress.
374
374
  */
375
375
  get heading() {
376
- return this._headingPitchRollValues.heading * T.DEGREES_PER_RADIAN;
376
+ return this._headingPitchRollValues.heading * O.DEGREES_PER_RADIAN;
377
377
  }
378
378
  /**
379
379
  * Sets the pitch of a cone viewshed. 0 is horizontal. Does not have impact on 360 viewshed.
380
380
  * @param {number} value The pitch in degrees.
381
381
  */
382
382
  set pitch(e) {
383
- if (this._headingPitchRollValues.pitch = e * T.RADIANS_PER_DEGREE, this._shadowCamera) {
384
- const i = e * T.RADIANS_PER_DEGREE - this._shadowCamera.pitch;
383
+ if (this._headingPitchRollValues.pitch = e * O.RADIANS_PER_DEGREE, this._shadowCamera) {
384
+ const i = e * O.RADIANS_PER_DEGREE - this._shadowCamera.pitch;
385
385
  this._shadowCamera.lookUp(i), this._viewshedType === w.CONE && this._updatePrimitive();
386
386
  }
387
387
  }
@@ -390,7 +390,7 @@ const E = class E extends ge {
390
390
  * @returns {number} The pitch in degrees.
391
391
  */
392
392
  get pitch() {
393
- return this._headingPitchRollValues.pitch * T.DEGREES_PER_RADIAN;
393
+ return this._headingPitchRollValues.pitch * O.DEGREES_PER_RADIAN;
394
394
  }
395
395
  /**
396
396
  * Sets whether the primitive of the viewshed should be shown or not.
@@ -435,7 +435,7 @@ const E = class E extends ge {
435
435
  this._cesiumMap = e;
436
436
  const i = e.getScene();
437
437
  if (i)
438
- this._shadowCamera = ft(i, this._frustumOptions), this._position && (this.position = this._position), this._scene = i;
438
+ this._shadowCamera = vt(i, this._frustumOptions), this._position && (this.position = this._position), this._scene = i;
439
439
  else
440
440
  throw new Error("CesiumMap contains no scene");
441
441
  this._updateShadowMap(), this._updatePrimitive();
@@ -446,7 +446,7 @@ const E = class E extends ge {
446
446
  */
447
447
  _updateShadowMap() {
448
448
  var e;
449
- !this._active || !this._shadowCamera || !this._cesiumMap || !this._scene || ((e = this._shadowMap) == null || e.destroy(), this._shadowMap = new xe({
449
+ !this._active || !this._shadowCamera || !this._cesiumMap || !this._scene || ((e = this._shadowMap) == null || e.destroy(), this._shadowMap = new De({
450
450
  // @ts-ignore
451
451
  context: this._scene.context,
452
452
  lightCamera: this._shadowCamera,
@@ -465,7 +465,7 @@ const E = class E extends ge {
465
465
  this._primitive && !((i = (e = this._primitive).isDestroyed) != null && i.call(e)) && ((t = this._scene) == null || t.primitives.remove(this._primitive), this._primitive.destroy(), this._primitive = null);
466
466
  }
467
467
  _updatePrimitive() {
468
- this._showPrimitive && this._active && this._scene ? (this._removePrimitive(), this._primitive = new ut({
468
+ this._showPrimitive && this._active && this._scene ? (this._removePrimitive(), this._primitive = new ft({
469
469
  camera: this._shadowCamera,
470
470
  allowPicking: !1,
471
471
  spot: this._viewshedType === w.CONE
@@ -478,10 +478,10 @@ const E = class E extends ge {
478
478
  lookAt(e) {
479
479
  if (!this._shadowCamera)
480
480
  return;
481
- const i = S.fromDegrees(e[0], e[1], e[2]);
482
- if (this.distance = S.distance(this._shadowCamera.position, i), this.type === w.CONE && !i.equals(this._shadowCamera.position)) {
483
- const t = new S();
484
- S.subtract(i, this._shadowCamera.position, i), S.normalize(i, i), S.normalize(this._shadowCamera.position, t), this._shadowCamera.setView({
481
+ const i = I.fromDegrees(e[0], e[1], e[2]);
482
+ if (this.distance = I.distance(this._shadowCamera.position, i), this.type === w.CONE && !i.equals(this._shadowCamera.position)) {
483
+ const t = new I();
484
+ I.subtract(i, this._shadowCamera.position, i), I.normalize(i, i), I.normalize(this._shadowCamera.position, t), this._shadowCamera.setView({
485
485
  orientation: {
486
486
  direction: i,
487
487
  up: t
@@ -518,15 +518,15 @@ const E = class E extends ge {
518
518
  this.deactivate(), ((t = e == null ? void 0 : e.getScene()) == null ? void 0 : t.shadowMap) === i && e.setDefaultShadowMap();
519
519
  }
520
520
  };
521
- Q(E, "MIN_DISTANCE", 10);
522
- let M = E;
523
- class vt extends _e {
521
+ ee(y, "MIN_DISTANCE", 10);
522
+ let T = y;
523
+ class pt extends Ce {
524
524
  /**
525
525
  *
526
526
  * @param {import("./viewshed").default} viewshed
527
527
  */
528
528
  constructor(e) {
529
- super(x.CLICKMOVE), this._viewshed = e, this._positioned = new D(), this._finished = new D(), this._position = !1, this.setActive();
529
+ super(L.CLICKMOVE), this._viewshed = e, this._positioned = new F(), this._finished = new F(), this._position = !1, this.setActive();
530
530
  }
531
531
  get finished() {
532
532
  return this._finished;
@@ -535,13 +535,13 @@ class vt extends _e {
535
535
  return this._positioned;
536
536
  }
537
537
  async pipe(e) {
538
- return e.position && (this._position ? (this._viewshed.lookAt(A.mercatorToWgs84(e.position)), e.type & x.CLICK && (this.setActive(!1), this._finished.raiseEvent(null))) : (this._viewshed.position = A.mercatorToWgs84(e.position), e.type & x.CLICK && (this._position = !0, this._positioned.raiseEvent(null)))), e;
538
+ return e.position && (this._position ? (this._viewshed.lookAt(A.mercatorToWgs84(e.position)), e.type & L.CLICK && (this.setActive(!1), this._finished.raiseEvent(null))) : (this._viewshed.position = A.mercatorToWgs84(e.position), e.type & L.CLICK && (this._position = !0, this._positioned.raiseEvent(null)))), e;
539
539
  }
540
540
  destroy() {
541
541
  super.destroy(), this._finished.destroy(), this._positioned.destroy();
542
542
  }
543
543
  }
544
- const y = {
544
+ const V = {
545
545
  ABSOLUTE: "absolute",
546
546
  RELATIVE: "relative"
547
547
  }, m = {
@@ -550,15 +550,15 @@ const y = {
550
550
  EDIT: "edit",
551
551
  MOVE: "move",
552
552
  MULTI_SELECT: "multiSelect"
553
- }, re = 1.8;
554
- function pt(s) {
555
- const e = new Ve({
556
- projection: be.toJSON(),
557
- zIndex: Me - 1
553
+ }, ae = 1.8;
554
+ function wt(s) {
555
+ const e = new be({
556
+ projection: Me.toJSON(),
557
+ zIndex: Te - 1
558
558
  });
559
- Te(e), e.activate();
560
- const i = new ze(new He(s));
561
- return i.setStyle(new Ge({})), e.addFeatures([i]), e.vectorProperties.altitudeMode = Le.NONE, {
559
+ Oe(e), e.activate();
560
+ const i = new Ge(new He(s));
561
+ return i.setStyle(new Ue({})), e.addFeatures([i]), e.vectorProperties.altitudeMode = Fe.NONE, {
562
562
  layer: e,
563
563
  feature: i,
564
564
  destroy() {
@@ -566,119 +566,119 @@ function pt(s) {
566
566
  }
567
567
  };
568
568
  }
569
- function U(s, e) {
570
- const i = e === y.ABSOLUTE ? x.CLICKMOVE : x.NONE;
569
+ function K(s, e) {
570
+ const i = e === V.ABSOLUTE ? L.CLICKMOVE : L.NONE;
571
571
  s.setActive(i), s.pickPosition = i, s.pullPickedPosition = 1.8;
572
572
  }
573
- function wt(s, e, i) {
574
- const t = K(null), o = I(null), n = I(null), a = I(y.ABSOLUTE);
573
+ function mt(s, e, i) {
574
+ const t = X(null), o = R(null), n = R(null), l = R(V.ABSOLUTE);
575
575
  let c = () => {
576
576
  };
577
- const r = K(null);
577
+ const r = X(null);
578
578
  let f = () => {
579
579
  };
580
580
  function h() {
581
- var l;
582
- o.value && t.value ? (t.value.deactivate(), i.setVisibility(t.value.name, !1)) : (l = t.value) == null || l.destroy();
581
+ var a;
582
+ o.value && t.value ? (t.value.deactivate(), i.setVisibility(t.value.name, !1)) : (a = t.value) == null || a.destroy();
583
583
  }
584
- function v(l = !0) {
585
- f(), c(), h(), t.value = null, l && i.clearSelection(), o.value = null, n.value = null;
584
+ function u(a = !0) {
585
+ f(), c(), h(), t.value = null, a && i.clearSelection(), o.value = null, n.value = null;
586
586
  }
587
- function u(l) {
588
- f(), h(), s.maps.activeMap instanceof $ && (t.value = l, l.activate(s.maps.activeMap), f = s.maps.activeMap.shadowMapChanged.addEventListener((d) => {
587
+ function v(a) {
588
+ f(), h(), s.maps.activeMap instanceof N && (t.value = a, a.activate(s.maps.activeMap), f = s.maps.activeMap.shadowMapChanged.addEventListener((d) => {
589
589
  var p;
590
- d !== ((p = t.value) == null ? void 0 : p.shadowMap) && v(!1);
590
+ d !== ((p = t.value) == null ? void 0 : p.shadowMap) && u(!1);
591
591
  }));
592
592
  }
593
- async function _(l) {
594
- v(), await Fe();
595
- const { eventHandler: d } = s.maps, { featureInteraction: p } = d, g = new M({
596
- viewshedType: l,
593
+ async function _(a) {
594
+ u(), await ke();
595
+ const { eventHandler: d } = s.maps, { featureInteraction: p } = d, g = new T({
596
+ viewshedType: a,
597
597
  colorOptions: {
598
598
  visibleColor: e.visibleColor,
599
599
  shadowColor: e.shadowColor
600
600
  },
601
- heightOffset: a.value === y.ABSOLUTE ? 0 : re
601
+ heightOffset: l.value === V.ABSOLUTE ? 0 : ae
602
602
  });
603
- u(g);
604
- const C = new vt(t.value);
605
- C.finished.addEventListener(() => {
606
- c(), t.value ? (t.value.showPrimitive = !0, n.value = m.EDIT) : v();
603
+ v(g);
604
+ const E = new pt(t.value);
605
+ E.finished.addEventListener(() => {
606
+ c(), t.value ? (t.value.showPrimitive = !0, n.value = m.EDIT) : u();
607
607
  });
608
- const F = d.addExclusiveInteraction(
609
- C,
608
+ const k = d.addExclusiveInteraction(
609
+ E,
610
610
  () => {
611
- C.destroy();
611
+ E.destroy();
612
612
  }
613
613
  );
614
- U(p, a.value), C.positioned.addEventListener(() => {
615
- U(p, y.ABSOLUTE);
614
+ K(p, l.value), E.positioned.addEventListener(() => {
615
+ K(p, V.ABSOLUTE);
616
616
  }), c = () => {
617
- F(), C.destroy(), p.setActive(), c = () => {
617
+ k(), E.destroy(), p.setActive(), c = () => {
618
618
  };
619
619
  }, n.value = m.CREATE;
620
620
  }
621
- function V(l) {
621
+ function C(a) {
622
622
  var d;
623
- if (t.value && l) {
623
+ if (t.value && a) {
624
624
  c();
625
625
  const {
626
626
  layer: p,
627
627
  feature: g,
628
- destroy: C
629
- } = pt(t.value.position);
630
- s.layers.add(p), a.value === y.ABSOLUTE ? (r.value = Ee(s, p), r.value.setFeatures([g])) : (r.value = ye(s, p), r.value.setFeature(g)), r.value.stopped.addEventListener(() => {
628
+ destroy: E
629
+ } = wt(t.value.position);
630
+ s.layers.add(p), l.value === V.ABSOLUTE ? (r.value = ye(s, p), r.value.setFeatures([g])) : (r.value = Ve(s, p), r.value.setFeature(g)), r.value.stopped.addEventListener(() => {
631
631
  c();
632
632
  });
633
- const F = (d = g.getGeometry()) == null ? void 0 : d.on("change", () => {
633
+ const k = (d = g.getGeometry()) == null ? void 0 : d.on("change", () => {
634
634
  t.value ? t.value.position = A.mercatorToWgs84(
635
635
  /** @type {import("ol/geom").Point} */
636
636
  g.getGeometry().getCoordinates()
637
- ) : v();
637
+ ) : u();
638
638
  });
639
639
  n.value = m.MOVE, c = () => {
640
- var q;
640
+ var Q;
641
641
  c = () => {
642
- }, F && Be(F), (q = r.value) == null || q.stop(), r.value = null, s.layers.remove(p), C(), n.value = m.EDIT;
642
+ }, k && ze(k), (Q = r.value) == null || Q.stop(), r.value = null, s.layers.remove(p), E(), n.value = m.EDIT;
643
643
  };
644
644
  } else
645
645
  c();
646
646
  }
647
- function P(l, d) {
648
- c(), t.value !== d && (u(d), a.value = d.heightOffset ? y.RELATIVE : y.ABSOLUTE), o.value = !!d.properties.title, n.value = l, o.value && i.setVisibility(d.name, !0);
647
+ function P(a, d) {
648
+ c(), t.value !== d && (v(d), l.value = d.heightOffset ? V.RELATIVE : V.ABSOLUTE), o.value = !!d.properties.title, n.value = a, o.value && i.setVisibility(d.name, !0);
649
649
  }
650
- const L = [
650
+ const b = [
651
651
  i.collectionComponent.collection.removed.addEventListener(
652
- (l) => {
652
+ (a) => {
653
653
  var d;
654
- i.remove(l.name), ((d = t.value) == null ? void 0 : d.name) === l.name && v();
654
+ i.remove(a.name), ((d = t.value) == null ? void 0 : d.name) === a.name && u();
655
655
  }
656
656
  ),
657
- i.renamed.addEventListener(({ item: l, title: d }) => {
657
+ i.renamed.addEventListener(({ item: a, title: d }) => {
658
658
  var g;
659
659
  const p = s.windowManager.get(
660
660
  `${i.collectionComponent.id}-editor`
661
661
  );
662
- p && ((g = t.value) == null ? void 0 : g.name) === l.name && (p.state.headerTitle = d);
662
+ p && ((g = t.value) == null ? void 0 : g.name) === a.name && (p.state.headerTitle = d);
663
663
  }),
664
- i.visibilityChanged.addEventListener((l) => {
664
+ i.visibilityChanged.addEventListener((a) => {
665
665
  var p;
666
- const d = ((p = t.value) == null ? void 0 : p.name) === l.name;
667
- d ? v() : (P(m.VIEW, l), i.clearSelection()), i.setVisibility(l.name, !d);
666
+ const d = ((p = t.value) == null ? void 0 : p.name) === a.name;
667
+ d ? u() : (P(m.VIEW, a), i.clearSelection()), i.setVisibility(a.name, !d);
668
668
  })
669
669
  ];
670
- function H(l) {
671
- if (!(l === a.value || !t.value)) {
672
- if (a.value = l, n.value === m.MOVE && c(), n.value === m.CREATE)
673
- U(
670
+ function x(a) {
671
+ if (!(a === l.value || !t.value)) {
672
+ if (l.value = a, n.value === m.MOVE && c(), n.value === m.CREATE)
673
+ K(
674
674
  s.maps.eventHandler.featureInteraction,
675
- l
676
- ), t.value.heightOffset = l === y.ABSOLUTE ? 0 : re;
675
+ a
676
+ ), t.value.heightOffset = a === V.ABSOLUTE ? 0 : ae;
677
677
  else if (n.value === m.EDIT) {
678
678
  const { position: d, heightOffset: p } = t.value;
679
- l === y.RELATIVE ? s.maps.activeMap.getHeightFromTerrain([A.wgs84ToMercator(d)]).then((g) => {
680
- const C = A.mercatorToWgs84(g[0]);
681
- t.value && (t.value.heightOffset = d[2] - C[2], t.value.position = C);
679
+ a === V.RELATIVE ? s.maps.activeMap.getHeightFromTerrain([A.wgs84ToMercator(d)]).then((g) => {
680
+ const E = A.mercatorToWgs84(g[0]);
681
+ t.value && (t.value.heightOffset = d[2] - E[2], t.value.position = E);
682
682
  }) : (t.value.position = [
683
683
  d[0],
684
684
  d[1],
@@ -692,45 +692,45 @@ function wt(s, e, i) {
692
692
  currentIsPersisted: o,
693
693
  currentEditSession: r,
694
694
  createViewshed: _,
695
- viewViewshed(l) {
696
- P(m.VIEW, l);
695
+ viewViewshed(a) {
696
+ P(m.VIEW, a);
697
697
  },
698
- editViewshed(l) {
699
- P(m.EDIT, l), o.value && (i.setSelection(l.name), i.collectionComponent.openEditorWindow(l));
698
+ editViewshed(a) {
699
+ P(m.EDIT, a), o.value && (i.setSelection(a.name), i.collectionComponent.openEditorWindow(a));
700
700
  },
701
701
  persistCurrent() {
702
702
  t.value && (i.add(t.value), o.value = !0, i.setSelection(t.value.name), i.setVisibility(t.value.name, !0));
703
703
  },
704
- moveCurrentViewshed: V,
704
+ moveCurrentViewshed: C,
705
705
  setupMultiSelect() {
706
706
  c(), n.value = m.MULTI_SELECT, h(), t.value = null;
707
707
  },
708
708
  mode: n,
709
- heightMode: a,
710
- changeHeightMode: H,
709
+ heightMode: l,
710
+ changeHeightMode: x,
711
711
  async placeCurrentFeaturesOnTerrain() {
712
- var l, d;
713
- if (t.value && ((l = r.value) == null ? void 0 : l.type) === Ce.EDIT_FEATURES && s.maps.activeMap instanceof $) {
712
+ var a, d;
713
+ if (t.value && ((a = r.value) == null ? void 0 : a.type) === Ee.EDIT_FEATURES && s.maps.activeMap instanceof N) {
714
714
  const g = (await s.maps.activeMap.getHeightFromTerrain([
715
715
  A.wgs84ToMercator((d = t.value) == null ? void 0 : d.position)
716
716
  ]))[0][2] - t.value.position[2];
717
717
  r.value.translate(0, 0, g);
718
718
  }
719
719
  },
720
- stop: v,
720
+ stop: u,
721
721
  destroy() {
722
- v(), L.forEach((l) => l());
722
+ u(), b.forEach((a) => a());
723
723
  }
724
724
  };
725
725
  }
726
- function ve(s, e, i, t, o, n, a, c) {
726
+ function pe(s, e, i, t, o, n, l, c) {
727
727
  var r = typeof s == "function" ? s.options : s;
728
728
  e && (r.render = e, r.staticRenderFns = i, r._compiled = !0), t && (r.functional = !0), n && (r._scopeId = "data-v-" + n);
729
729
  var f;
730
- if (a ? (f = function(u) {
731
- u = u || // cached call
730
+ if (l ? (f = function(v) {
731
+ v = v || // cached call
732
732
  this.$vnode && this.$vnode.ssrContext || // stateful
733
- this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !u && typeof __VUE_SSR_CONTEXT__ < "u" && (u = __VUE_SSR_CONTEXT__), o && o.call(this, u), u && u._registeredComponents && u._registeredComponents.add(a);
733
+ this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !v && typeof __VUE_SSR_CONTEXT__ < "u" && (v = __VUE_SSR_CONTEXT__), o && o.call(this, v), v && v._registeredComponents && v._registeredComponents.add(l);
734
734
  }, r._ssrRegister = f) : o && (f = c ? function() {
735
735
  o.call(
736
736
  this,
@@ -740,36 +740,36 @@ function ve(s, e, i, t, o, n, a, c) {
740
740
  if (r.functional) {
741
741
  r._injectStyles = f;
742
742
  var h = r.render;
743
- r.render = function(_, V) {
744
- return f.call(V), h(_, V);
743
+ r.render = function(_, C) {
744
+ return f.call(C), h(_, C);
745
745
  };
746
746
  } else {
747
- var v = r.beforeCreate;
748
- r.beforeCreate = v ? [].concat(v, f) : [f];
747
+ var u = r.beforeCreate;
748
+ r.beforeCreate = u ? [].concat(u, f) : [f];
749
749
  }
750
750
  return {
751
751
  exports: s,
752
752
  options: r
753
753
  };
754
754
  }
755
- const mt = {
756
- distance: [M.MIN_DISTANCE, 2e3],
755
+ const gt = {
756
+ distance: [T.MIN_DISTANCE, 2e3],
757
757
  fov: [25, 85],
758
758
  heading: [0, 360],
759
759
  pitch: [-90, 90]
760
- }, gt = {
760
+ }, _t = {
761
761
  components: {
762
- VcsTextField: Ue,
763
- VContainer: de,
764
- VRow: he,
765
- VCol: ue,
766
- VcsSlider: Ke,
767
- VcsLabel: ae,
768
- VcsFormSection: le,
769
- VDivider: ot,
770
- VcsSelect: ce,
771
- VcsFormButton: Xe,
772
- VcsFeatureTransforms: Ye
762
+ VcsTextField: Ke,
763
+ VContainer: he,
764
+ VRow: ue,
765
+ VCol: fe,
766
+ VcsSlider: Xe,
767
+ VcsLabel: le,
768
+ VcsFormSection: ce,
769
+ VDivider: nt,
770
+ VcsSelect: de,
771
+ VcsFormButton: Ye,
772
+ VcsFeatureTransforms: Je
773
773
  },
774
774
  name: "ViewshedWindow",
775
775
  props: {
@@ -787,40 +787,40 @@ const mt = {
787
787
  setup(s) {
788
788
  const e = (
789
789
  /** @type {import("./viewshedManager.js").ViewshedManager} */
790
- oe("manager")
790
+ ne("manager")
791
791
  ), i = (
792
792
  /** @type {import("@vcmap/ui").VcsUiApp} */
793
- oe("vcsApp")
793
+ ne("vcsApp")
794
794
  ), {
795
795
  currentViewshed: t,
796
796
  mode: o,
797
797
  currentIsPersisted: n
798
- } = e, a = ne(() => s.selection);
798
+ } = e, l = re(() => s.selection);
799
799
  let c = () => {
800
800
  };
801
- const r = W({
801
+ const r = z({
802
802
  X: void 0,
803
803
  Y: void 0,
804
804
  Z: void 0
805
- }), f = K();
805
+ }), f = X();
806
806
  let h = () => {
807
807
  };
808
- const v = W({
808
+ const u = z({
809
809
  showPrimitive: !1,
810
810
  distance: void 0,
811
811
  fov: void 0,
812
812
  heading: void 0,
813
813
  pitch: void 0
814
- }), u = I();
814
+ }), v = R();
815
815
  function _() {
816
- t.value && (r.X = t.value.position[0], r.Y = t.value.position[1], r.Z = e.heightMode.value === y.ABSOLUTE ? t.value.position[2] : t.value.heightOffset);
816
+ t.value && (r.X = t.value.position[0], r.Y = t.value.position[1], r.Z = e.heightMode.value === V.ABSOLUTE ? t.value.position[2] : t.value.heightOffset);
817
817
  }
818
- function V() {
819
- _(), t.value && (v.distance = t.value.distance, v.fov = t.value.fov, v.heading = t.value.heading, v.pitch = t.value.pitch, v.showPrimitive = t.value.showPrimitive, u.value = t.value.type);
818
+ function C() {
819
+ _(), t.value && (u.distance = t.value.distance, u.fov = t.value.fov, u.heading = t.value.heading, u.pitch = t.value.pitch, u.showPrimitive = t.value.showPrimitive, v.value = t.value.type);
820
820
  }
821
- ke(() => {
822
- t.value && o.value !== m.CREATE && V();
823
- }), R(
821
+ je(() => {
822
+ t.value && o.value !== m.CREATE && C();
823
+ }), $(
824
824
  t,
825
825
  () => {
826
826
  t.value && (c(), c = t.value.positionChanged.addEventListener(() => {
@@ -832,34 +832,34 @@ const mt = {
832
832
  async function P() {
833
833
  var p, g;
834
834
  (p = t.value) == null || p.deactivate();
835
- const l = (
835
+ const a = (
836
836
  /** @type {import("@vcmap/core").CesiumMap} */
837
837
  (g = i.maps.activeMap.getScene()) == null ? void 0 : g.camera
838
- ), d = l == null ? void 0 : l.changed.addEventListener(() => {
838
+ ), d = a == null ? void 0 : a.changed.addEventListener(() => {
839
839
  h();
840
840
  });
841
841
  h = () => {
842
- var C;
843
- d == null || d(), f.value = null, (C = t.value) == null || C.activate(i.maps.activeMap), h = () => {
842
+ var E;
843
+ d == null || d(), f.value = null, (E = t.value) == null || E.activate(i.maps.activeMap), h = () => {
844
844
  };
845
845
  };
846
846
  }
847
- je(() => {
847
+ We(() => {
848
848
  var d;
849
- const l = (d = s.getViewshed) == null ? void 0 : d.call(s);
850
- l && e.editViewshed(l);
851
- }), We(() => {
852
- c(), h(), n.value || ((o.value === m.EDIT || o.value === m.MOVE) && t.value ? e.viewViewshed(t.value) : o.value === m.CREATE && e.stop()), a.value && (a.value.length > 1 ? e.setupMultiSelect() : a.value.length === 1 && t.value ? e.viewViewshed(t.value) : (
849
+ const a = (d = s.getViewshed) == null ? void 0 : d.call(s);
850
+ a && e.editViewshed(a);
851
+ }), Be(() => {
852
+ c(), h(), n.value || ((o.value === m.EDIT || o.value === m.MOVE) && t.value ? e.viewViewshed(t.value) : o.value === m.CREATE && e.stop()), l.value && (l.value.length > 1 ? e.setupMultiSelect() : l.value.length === 1 && t.value ? e.viewViewshed(t.value) : (
853
853
  // when a persited viewshed is deselected, stops plugin
854
- !a.value.length && o.value === m.EDIT && e.stop(!1)
854
+ !l.value.length && o.value === m.EDIT && e.stop(!1)
855
855
  ));
856
- }), V();
857
- function L(l, d) {
858
- h(), t.value && (v[l] = d, t.value[l] = d);
856
+ }), C();
857
+ function b(a, d) {
858
+ h(), t.value && (u[a] = d, t.value[a] = d);
859
859
  }
860
- const H = ne(() => {
861
- const l = [];
862
- return u.value === w.CONE && l.push({
860
+ const x = re(() => {
861
+ const a = [];
862
+ return v.value === w.CONE && a.push({
863
863
  name: "jumpToViewpoint",
864
864
  title: f.value ? "viewshed.returnToViewpoint" : "viewshed.jumpToViewpoint",
865
865
  icon: "mdi-human-male",
@@ -867,7 +867,7 @@ const mt = {
867
867
  async callback() {
868
868
  var d, p, g;
869
869
  e.moveCurrentViewshed(!1), t.value && !f.value ? (f.value = await ((d = i.maps.activeMap) == null ? void 0 : d.getViewpoint()), await ((p = i.maps.activeMap) == null ? void 0 : p.gotoViewpoint(
870
- new Oe({
870
+ new Se({
871
871
  groundPosition: [
872
872
  t.value.position[0],
873
873
  t.value.position[1],
@@ -881,64 +881,64 @@ const mt = {
881
881
  })
882
882
  )), P()) : f.value && ((g = i.maps.activeMap) == null || g.gotoViewpoint(f.value), h());
883
883
  }
884
- }), l.push({
884
+ }), a.push({
885
885
  name: "moveViewshed",
886
886
  title: "viewshed.move",
887
- icon: e.heightMode.value === y.RELATIVE ? "$vcsEditVertices" : "mdi-axis-arrow",
887
+ icon: e.heightMode.value === V.RELATIVE ? "$vcsEditVertices" : "mdi-axis-arrow",
888
888
  active: o.value === m.MOVE,
889
889
  callback() {
890
890
  e.moveCurrentViewshed(
891
891
  o.value !== m.MOVE
892
892
  );
893
893
  }
894
- }), l.unshift({
894
+ }), a.unshift({
895
895
  name: "showPrimitive",
896
896
  title: "viewshed.showPrimitive",
897
897
  icon: "mdi-eye",
898
- active: v.showPrimitive,
898
+ active: u.showPrimitive,
899
899
  callback() {
900
- this.active = !this.active, L("showPrimitive", this.active);
900
+ this.active = !this.active, b("showPrimitive", this.active);
901
901
  }
902
- }), l;
902
+ }), a;
903
903
  });
904
904
  return {
905
905
  position: r,
906
- setPosition(l, d, p) {
906
+ setPosition(a, d, p) {
907
907
  if (h(), !!t.value) {
908
- if (p === 2 && e.heightMode.value === y.RELATIVE)
909
- t.value.heightOffset = Number(l);
908
+ if (p === 2 && e.heightMode.value === V.RELATIVE)
909
+ t.value.heightOffset = Number(a);
910
910
  else {
911
911
  const g = [...t.value.position];
912
- g[p] = Number(l), t.value.position = g;
912
+ g[p] = Number(a), t.value.position = g;
913
913
  }
914
- r[d] = Number(l);
914
+ r[d] = Number(a);
915
915
  }
916
916
  },
917
- parameters: v,
918
- setParameter: L,
919
- parameterRanges: mt,
917
+ parameters: u,
918
+ setParameter: b,
919
+ parameterRanges: gt,
920
920
  ViewshedPluginModes: m,
921
921
  viewshedMode: o,
922
922
  currentIsPersisted: n,
923
- viewshedType: u,
923
+ viewshedType: v,
924
924
  ViewshedTypes: w,
925
- HeightModes: y,
925
+ HeightModes: V,
926
926
  heightMode: e.heightMode,
927
- TransformationMode: Se,
927
+ TransformationMode: Pe,
928
928
  changeHeightMode: e.changeHeightMode,
929
929
  async createNewViewshed() {
930
- await e.createViewshed(u.value);
930
+ await e.createViewshed(v.value);
931
931
  },
932
932
  addToMyWorkspace: () => e.persistCurrent(),
933
933
  cancel: () => e.stop(),
934
- headerActions: H
934
+ headerActions: x
935
935
  };
936
936
  }
937
937
  };
938
- var _t = function() {
938
+ var Ct = function() {
939
939
  var e = this, i = e._self._c;
940
940
  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, n) {
941
- return i("v-col", { key: n, 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, n) } })], 1);
941
+ return i("v-col", { key: n, 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: (l) => e.setPosition(l, o, n) } })], 1);
942
942
  }), 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) => ({
943
943
  value: t,
944
944
  text: `viewshed.${t}`
@@ -951,23 +951,23 @@ var _t = function() {
951
951
  } } }, [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) {
952
952
  return e.cancel();
953
953
  } } }, [e._v(" " + e._s(e.$t("viewshed.cancel")) + " ")])], 1) : e._e()], 1);
954
- }, Ct = [], Et = /* @__PURE__ */ ve(
955
- gt,
954
+ }, Et = [], yt = /* @__PURE__ */ pe(
956
955
  _t,
957
956
  Ct,
957
+ Et,
958
958
  !1,
959
959
  null,
960
960
  null,
961
961
  null,
962
962
  null
963
963
  );
964
- const yt = Et.exports, O = "@vcmap/viewshed", Vt = "2.0.8", bt = "^5.1", J = {
964
+ const Vt = yt.exports, S = "@vcmap/viewshed", bt = "2.0.9", Mt = "^5.1", Z = {
965
965
  [w.CONE]: "$vcsViewshed",
966
966
  [w.THREESIXTY]: "$vcsViewshedCone"
967
967
  };
968
- function Mt(s, e, i) {
969
- const t = I(), o = I(), n = `${i.id}-editor`, a = {
970
- component: yt,
968
+ function Tt(s, e, i) {
969
+ const t = R(), o = R(), n = `${i.id}-editor`, l = {
970
+ component: Vt,
971
971
  provides: {
972
972
  manager: s
973
973
  },
@@ -978,17 +978,17 @@ function Mt(s, e, i) {
978
978
  infoUrlCallback: e.getHelpUrlCallback("tools/viewshedTool.html")
979
979
  }
980
980
  };
981
- Je(e, i, {
982
- editor: (u) => ({
983
- ...a,
981
+ Ze(e, i, {
982
+ editor: (v) => ({
983
+ ...l,
984
984
  props: {
985
985
  selection: i.selection,
986
- getViewshed: () => i.collection.getByKey(u.name)
986
+ getViewshed: () => i.collection.getByKey(v.name)
987
987
  }
988
988
  })
989
989
  });
990
990
  function c() {
991
- s.currentViewshed.value && (o.value = J[s.currentViewshed.value.type], s.currentIsPersisted.value ? t.value = s.currentViewshed.value.properties.title : s.mode.value === m.CREATE ? t.value = [
991
+ s.currentViewshed.value && (o.value = Z[s.currentViewshed.value.type], s.currentIsPersisted.value ? t.value = s.currentViewshed.value.properties.title : s.mode.value === m.CREATE ? t.value = [
992
992
  "viewshed.create",
993
993
  `viewshed.${s.currentViewshed.value.type}`
994
994
  ] : t.value = [
@@ -999,31 +999,31 @@ function Mt(s, e, i) {
999
999
  function r() {
1000
1000
  c(), s.currentViewshed.value && !s.currentIsPersisted.value && (s.mode.value === m.EDIT || s.mode.value === m.MOVE || s.mode.value === m.CREATE) && (e.windowManager.has(n) || e.windowManager.add(
1001
1001
  {
1002
- ...a,
1002
+ ...l,
1003
1003
  id: n,
1004
1004
  parentId: "category-manager",
1005
- slot: Ze.DYNAMIC_CHILD
1005
+ slot: qe.DYNAMIC_CHILD
1006
1006
  },
1007
- O
1007
+ S
1008
1008
  ));
1009
1009
  }
1010
- const f = R(s.currentViewshed, (u) => {
1011
- u && r();
1012
- }), h = R(s.currentIsPersisted, (u) => {
1013
- u && c();
1014
- }), v = R(s.mode, () => {
1010
+ const f = $(s.currentViewshed, (v) => {
1011
+ v && r();
1012
+ }), h = $(s.currentIsPersisted, (v) => {
1013
+ v && c();
1014
+ }), u = $(s.mode, () => {
1015
1015
  s.mode.value ? r() : e.windowManager.remove(n);
1016
1016
  });
1017
1017
  return {
1018
1018
  destroy() {
1019
- e.windowManager.remove(n), f(), v(), h();
1019
+ e.windowManager.remove(n), f(), u(), h();
1020
1020
  }
1021
1021
  };
1022
1022
  }
1023
- function Tt(s, e, i, t) {
1023
+ function Ot(s, e, i, t) {
1024
1024
  const o = {
1025
- type: qe.SELECT,
1026
- action: W({
1025
+ type: Qe.SELECT,
1026
+ action: z({
1027
1027
  name: i,
1028
1028
  currentIndex: 0,
1029
1029
  active: !1,
@@ -1046,17 +1046,17 @@ function Tt(s, e, i, t) {
1046
1046
  },
1047
1047
  tools: t.flatMap((r) => r === w.CONE ? {
1048
1048
  name: w.CONE,
1049
- icon: J[w.CONE],
1049
+ icon: Z[w.CONE],
1050
1050
  title: `viewshed.${w.CONE}`
1051
1051
  } : r === w.THREESIXTY ? {
1052
1052
  name: w.THREESIXTY,
1053
- icon: J[w.THREESIXTY],
1053
+ icon: Z[w.THREESIXTY],
1054
1054
  title: `viewshed.${w.THREESIXTY}`
1055
1055
  } : [])
1056
1056
  })
1057
- }, n = R(e.mode, (r) => {
1057
+ }, n = $(e.mode, (r) => {
1058
1058
  r === m.VIEW ? (o.action.background = !0, o.action.active = !0) : r ? (o.action.background = !1, o.action.active = !0) : (o.action.background = !1, o.action.active = !1);
1059
- }), a = R(
1059
+ }), l = $(
1060
1060
  e.currentViewshed,
1061
1061
  (r) => {
1062
1062
  r && (o.action.currentIndex = o.action.tools.findIndex(
@@ -1064,23 +1064,23 @@ function Tt(s, e, i, t) {
1064
1064
  ));
1065
1065
  }
1066
1066
  ), c = s.maps.mapActivated.addEventListener((r) => {
1067
- r instanceof $ ? o.action.disabled = !1 : o.action.disabled = !0;
1067
+ r instanceof N ? o.action.disabled = !1 : o.action.disabled = !0;
1068
1068
  });
1069
1069
  return {
1070
1070
  destroy() {
1071
- n(), a(), c();
1071
+ n(), l(), c();
1072
1072
  },
1073
1073
  toolbox: o
1074
1074
  };
1075
1075
  }
1076
- function Ot(s, e, i, t) {
1077
- z(t, [Object.values(w)]);
1078
- const { toolbox: o, destroy: n } = Tt(s, e, i, t), a = s.toolboxManager.add(o, i).id;
1076
+ function St(s, e, i, t) {
1077
+ H(t, [Object.values(w)]);
1078
+ const { toolbox: o, destroy: n } = Ot(s, e, i, t), l = s.toolboxManager.add(o, i).id;
1079
1079
  return () => {
1080
- s.toolboxManager.remove(a), n();
1080
+ s.toolboxManager.remove(l), n();
1081
1081
  };
1082
1082
  }
1083
- class Z extends Pe {
1083
+ class q extends Ie {
1084
1084
  static get className() {
1085
1085
  return "ViewshedCategory";
1086
1086
  }
@@ -1088,14 +1088,14 @@ class Z extends Pe {
1088
1088
  var t;
1089
1089
  const i = (
1090
1090
  /** @type {import("@vcmap/core").CesiumMap | undefined} */
1091
- (t = this._app) == null ? void 0 : t.maps.getByType($.className)[0]
1091
+ (t = this._app) == null ? void 0 : t.maps.getByType(N.className)[0]
1092
1092
  );
1093
1093
  if (i)
1094
- return new M(e, i);
1094
+ return new T(e, i);
1095
1095
  throw new Error("No CesiumMap available");
1096
1096
  }
1097
1097
  }
1098
- function St(s, e) {
1098
+ function Pt(s, e) {
1099
1099
  let i, t = 0;
1100
1100
  const o = new Set(
1101
1101
  e.filter((n) => n.type === s).map((n) => n.properties.title)
@@ -1105,14 +1105,14 @@ function St(s, e) {
1105
1105
  while (!i);
1106
1106
  return i;
1107
1107
  }
1108
- async function Pt(s) {
1109
- const e = new D(), i = new D(), { collectionComponent: t, category: o } = await s.categoryManager.requestCategory(
1108
+ async function It(s) {
1109
+ const e = new F(), i = new F(), { collectionComponent: t, category: o } = await s.categoryManager.requestCategory(
1110
1110
  {
1111
- type: Z.className,
1111
+ type: q.className,
1112
1112
  name: "Viewsheds",
1113
1113
  title: "Viewsheds"
1114
1114
  },
1115
- O,
1115
+ S,
1116
1116
  {
1117
1117
  selectable: !0,
1118
1118
  renamable: !0,
@@ -1120,17 +1120,17 @@ async function Pt(s) {
1120
1120
  }
1121
1121
  );
1122
1122
  t.addItemMapping({
1123
- mappingFunction: Qe(
1124
- [$.className],
1123
+ mappingFunction: et(
1124
+ [N.className],
1125
1125
  s.maps
1126
1126
  ),
1127
- owner: O
1127
+ owner: S
1128
1128
  });
1129
- const n = (h, v, u) => {
1130
- u.title = h.properties.title, u.titleChanged = (_) => {
1131
- h.properties.title = _, u.title = _, e.raiseEvent({ item: h, title: _ });
1132
- }, u.actions.push(
1133
- W({
1129
+ const n = (h, u, v) => {
1130
+ v.title = h.properties.title, v.titleChanged = (_) => {
1131
+ h.properties.title = _, v.title = _, e.raiseEvent({ item: h, title: _ });
1132
+ }, v.actions.push(
1133
+ z({
1134
1134
  name: "visibilityAction",
1135
1135
  icon: "$vcsCheckbox",
1136
1136
  callback() {
@@ -1142,56 +1142,81 @@ async function Pt(s) {
1142
1142
  s.categoryManager.addMappingFunction(
1143
1143
  () => !0,
1144
1144
  n,
1145
- O,
1145
+ S,
1146
1146
  [t.id]
1147
1147
  );
1148
- const { action: a, destroy: c } = et(
1148
+ const { action: l, destroy: c } = tt(
1149
1149
  t.selection,
1150
1150
  () => {
1151
1151
  const h = t.selection.value.map(
1152
- (v) => t.collection.getByKey(v.name)
1152
+ (u) => t.collection.getByKey(u.name)
1153
1153
  );
1154
- tt(JSON.stringify(h), "viewsheds.json");
1154
+ it(JSON.stringify(h), "viewsheds.json");
1155
1155
  },
1156
- O
1157
- ), { action: r, destroy: f } = it(
1156
+ S
1157
+ ), { action: r, destroy: f } = st(
1158
1158
  async (h) => {
1159
- await Promise.all(
1160
- h.map(async (v) => {
1161
- const u = await v.text();
1162
- JSON.parse(u).forEach((V) => {
1163
- const P = new M(V);
1164
- o.collection.add(P);
1165
- });
1159
+ const { vueI18n: u } = s, _ = (await Promise.all(
1160
+ h.map(async (b) => {
1161
+ const x = await b.text();
1162
+ try {
1163
+ return JSON.parse(x).map((d) => new T(d));
1164
+ } catch {
1165
+ s.notifier.add({
1166
+ type: j.ERROR,
1167
+ message: u.t("components.import.failure", {
1168
+ fileName: b.name
1169
+ })
1170
+ });
1171
+ }
1172
+ return [];
1166
1173
  })
1167
- );
1174
+ )).flat(), C = _.map((b) => o.collection.add(b)).filter((b) => b != null), P = _.length - C.length;
1175
+ if (P > 0)
1176
+ return s.notifier.add({
1177
+ type: j.WARNING,
1178
+ message: u.t("components.import.addFailure", [P])
1179
+ }), !1;
1180
+ if (C.length > 0)
1181
+ s.notifier.add({
1182
+ type: j.SUCCESS,
1183
+ message: u.t("components.import.featuresAdded", [
1184
+ C.length
1185
+ ])
1186
+ });
1187
+ else
1188
+ return s.notifier.add({
1189
+ type: j.ERROR,
1190
+ message: u.t("components.import.nothingAdded")
1191
+ }), !1;
1192
+ return !0;
1168
1193
  },
1169
1194
  s.windowManager,
1170
- O,
1195
+ S,
1171
1196
  "category-manager"
1172
1197
  );
1173
- return t.addActions([a, r]), {
1198
+ return t.addActions([l, r]), {
1174
1199
  renamed: e,
1175
1200
  visibilityChanged: i,
1176
1201
  setSelection(h) {
1177
- h && (t.selection.value = t.items.value.filter((v) => h === v.name));
1202
+ h && (t.selection.value = t.items.value.filter((u) => h === u.name));
1178
1203
  },
1179
1204
  clearSelection() {
1180
1205
  t.selection.value.length && (t.selection.value = []);
1181
1206
  },
1182
- setVisibility(h, v) {
1183
- const u = t.items.value.find(
1207
+ setVisibility(h, u) {
1208
+ const v = t.items.value.find(
1184
1209
  (_) => h === _.name
1185
1210
  );
1186
- if (u) {
1187
- const _ = u.actions.find(
1188
- (V) => V.name === "visibilityAction"
1211
+ if (v) {
1212
+ const _ = v.actions.find(
1213
+ (C) => C.name === "visibilityAction"
1189
1214
  );
1190
- _ && (_.icon = v ? "$vcsCheckboxChecked" : "$vcsCheckbox");
1215
+ _ && (_.icon = u ? "$vcsCheckboxChecked" : "$vcsCheckbox");
1191
1216
  }
1192
1217
  },
1193
1218
  add(h) {
1194
- h.properties.title = St(
1219
+ h.properties.title = Pt(
1195
1220
  h.type,
1196
1221
  /** @type {import("./viewshed.js").default[]} */
1197
1222
  [
@@ -1200,34 +1225,34 @@ async function Pt(s) {
1200
1225
  ), o.collection.add(h);
1201
1226
  },
1202
1227
  remove(h) {
1203
- const v = o.collection.getByKey(h);
1204
- v && o.collection.remove(v);
1228
+ const u = o.collection.getByKey(h);
1229
+ u && o.collection.remove(u);
1205
1230
  },
1206
1231
  collectionComponent: t,
1207
1232
  destroy() {
1208
- s.categoryManager.removeOwner(O), e.destroy(), i.destroy(), c(), f();
1233
+ s.categoryManager.removeOwner(S), e.destroy(), i.destroy(), c(), f();
1209
1234
  }
1210
1235
  };
1211
1236
  }
1212
- function k() {
1237
+ function W() {
1213
1238
  return {
1214
- visibleColor: M.getDefaultOptions().visibleColor,
1215
- shadowColor: M.getDefaultOptions().shadowColor,
1239
+ visibleColor: T.getDefaultOptions().visibleColor,
1240
+ shadowColor: T.getDefaultOptions().shadowColor,
1216
1241
  tools: [...Object.values(w)]
1217
1242
  };
1218
1243
  }
1219
- const It = {
1244
+ const Rt = {
1220
1245
  name: "ViewshedConfigEditor",
1221
1246
  title: "Viewshed Editor",
1222
1247
  components: {
1223
- AbstractConfigEditor: st,
1224
- VcsFormSection: le,
1225
- VContainer: de,
1226
- VRow: he,
1227
- VCol: ue,
1228
- VcsLabel: ae,
1229
- VcsSelect: ce,
1230
- VColorPicker: nt
1248
+ AbstractConfigEditor: ot,
1249
+ VcsFormSection: ce,
1250
+ VContainer: he,
1251
+ VRow: ue,
1252
+ VCol: fe,
1253
+ VcsLabel: le,
1254
+ VcsSelect: de,
1255
+ VColorPicker: rt
1231
1256
  },
1232
1257
  props: {
1233
1258
  getConfig: {
@@ -1240,9 +1265,9 @@ const It = {
1240
1265
  }
1241
1266
  },
1242
1267
  setup(s) {
1243
- const e = I({});
1268
+ const e = R({});
1244
1269
  s.getConfig().then((t) => {
1245
- e.value = Object.assign(k(), t);
1270
+ e.value = Object.assign(W(), t);
1246
1271
  });
1247
1272
  async function i() {
1248
1273
  await s.setConfig(e.value);
@@ -1267,29 +1292,29 @@ var At = function() {
1267
1292
  }, 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) {
1268
1293
  e.$set(e.localConfig, "shadowColor", t);
1269
1294
  }, expression: "localConfig.shadowColor" } })], 1)], 1)], 1)], 1) : e._e()], 1);
1270
- }, Rt = [], $t = /* @__PURE__ */ ve(
1271
- It,
1272
- At,
1295
+ }, $t = [], Nt = /* @__PURE__ */ pe(
1273
1296
  Rt,
1297
+ At,
1298
+ $t,
1274
1299
  !1,
1275
1300
  null,
1276
1301
  null,
1277
1302
  null,
1278
1303
  null
1279
1304
  );
1280
- const Nt = $t.exports;
1281
- function Bt(s) {
1305
+ const xt = Nt.exports;
1306
+ function zt(s) {
1282
1307
  let e, i = () => {
1283
1308
  };
1284
1309
  return {
1285
1310
  get name() {
1286
- return O;
1311
+ return S;
1287
1312
  },
1288
1313
  get version() {
1289
- return Vt;
1314
+ return bt;
1290
1315
  },
1291
1316
  get mapVersion() {
1292
- return bt;
1317
+ return Mt;
1293
1318
  },
1294
1319
  /**
1295
1320
  * @param {import("@vcmap/ui").VcsUiApp} vcsUiApp
@@ -1298,55 +1323,55 @@ function Bt(s) {
1298
1323
  */
1299
1324
  async initialize(t, o) {
1300
1325
  t.categoryClassRegistry.registerClass(
1301
- this[Ie],
1302
- Z.className,
1303
- Z
1326
+ this[Re],
1327
+ q.className,
1328
+ q
1304
1329
  );
1305
- const n = await Pt(t);
1306
- e = wt(
1330
+ const n = await It(t);
1331
+ e = mt(
1307
1332
  t,
1308
1333
  s,
1309
1334
  n
1310
1335
  );
1311
- const a = Ot(
1336
+ const l = St(
1312
1337
  t,
1313
1338
  e,
1314
- O,
1315
- s.tools || k().tools
1316
- ), { destroy: c } = Mt(
1339
+ S,
1340
+ s.tools || W().tools
1341
+ ), { destroy: c } = Tt(
1317
1342
  e,
1318
1343
  t,
1319
1344
  n.collectionComponent
1320
1345
  ), { activeMap: r } = t.maps;
1321
- function f(u) {
1322
- if (o != null && o.mode && o.currentViewshed && u instanceof $) {
1323
- const _ = new M(o.currentViewshed, r);
1346
+ function f(v) {
1347
+ if (o != null && o.mode && o.currentViewshed && v instanceof N) {
1348
+ const _ = new T(o.currentViewshed, r);
1324
1349
  o.mode === m.VIEW ? e.viewViewshed(_) : e.editViewshed(_);
1325
1350
  }
1326
1351
  }
1327
1352
  let h = !1;
1328
1353
  r && (h = !0, f(r));
1329
- const v = t.maps.mapActivated.addEventListener(
1330
- (u) => {
1331
- e.stop(), h || (f(u), h = !0);
1354
+ const u = t.maps.mapActivated.addEventListener(
1355
+ (v) => {
1356
+ e.stop(), h || (f(v), h = !0);
1332
1357
  }
1333
1358
  );
1334
1359
  i = () => {
1335
- v(), a(), c(), n.destroy(), e.destroy();
1360
+ u(), l(), c(), n.destroy(), e.destroy();
1336
1361
  };
1337
1362
  },
1338
1363
  /**
1339
1364
  * should return all default values of the configuration
1340
1365
  * @returns {ViewshedPluginOptions}
1341
1366
  */
1342
- getDefaultOptions: k,
1367
+ getDefaultOptions: W,
1343
1368
  /**
1344
1369
  * should return the plugin's serialization excluding all default values
1345
1370
  * @returns {ViewshedPluginOptions}
1346
1371
  */
1347
1372
  toJSON() {
1348
1373
  const t = {};
1349
- 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;
1374
+ return s.tools && W().tools.length !== s.tools.length && (t.tools = [...s.tools]), s.shadowColor && s.shadowColor !== T.getDefaultOptions().shadowColor && (t.shadowColor = s.shadowColor), s.visibleColor && s.visibleColor !== T.getDefaultOptions().visibleColor && (t.visibleColor = s.visibleColor), t;
1350
1375
  },
1351
1376
  /**
1352
1377
  * should return the plugins state
@@ -1364,7 +1389,7 @@ function Bt(s) {
1364
1389
  * @returns {Array<import("@vcmap/ui").PluginConfigEditor>}
1365
1390
  */
1366
1391
  getConfigEditors() {
1367
- return [{ component: Nt }];
1392
+ return [{ component: xt }];
1368
1393
  },
1369
1394
  destroy: i,
1370
1395
  i18n: {
@@ -1440,5 +1465,5 @@ function Bt(s) {
1440
1465
  };
1441
1466
  }
1442
1467
  export {
1443
- Bt as default
1468
+ zt as default
1444
1469
  };