@arcgis/map-components 5.2.0-next.50 → 5.2.0-next.52

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.
Files changed (42) hide show
  1. package/README.md +2 -2
  2. package/dist/cdn/4JAQPYHG.js +2 -0
  3. package/dist/cdn/7RN4FELN.js +2 -0
  4. package/dist/cdn/{TXPI3GGA.js → AIVVE6PW.js} +1 -1
  5. package/dist/cdn/{KBQRHXQ4.js → BCDL4T34.js} +1 -1
  6. package/dist/cdn/H5DDBPGU.js +2 -0
  7. package/dist/cdn/HFJDGHMV.js +2 -0
  8. package/dist/cdn/HGL6PAIG.js +2 -0
  9. package/dist/cdn/NWUV3BTR.js +2 -0
  10. package/dist/cdn/{6RSIIYYJ.js → QA56535U.js} +1 -1
  11. package/dist/cdn/U26MQUQF.js +2 -0
  12. package/dist/cdn/UOXJUYC7.js +2 -0
  13. package/dist/cdn/index.js +1 -1
  14. package/dist/chunks/useArcgisViewReadyError.js +14 -7
  15. package/dist/components/arcgis-paste/customElement.js +1 -4
  16. package/dist/components/arcgis-unit-radio-button-group/customElement.js +1 -4
  17. package/dist/components/arcgis-unit-select/customElement.js +1 -4
  18. package/dist/components/arcgis-utility-network-aggregated-geometry/customElement.js +59 -53
  19. package/dist/components/arcgis-utility-network-subnetwork-info/customElement.d.ts +1 -1
  20. package/dist/components/arcgis-utility-network-subnetwork-info/customElement.js +12 -12
  21. package/dist/components/arcgis-utility-network-trace-analysis/customElement.js +116 -105
  22. package/dist/components/arcgis-utility-network-trace-inputs/customElement.js +199 -182
  23. package/dist/components/arcgis-utility-network-trace-location/customElement.js +68 -67
  24. package/dist/components/arcgis-utility-network-trace-location-list/customElement.js +26 -26
  25. package/dist/components/arcgis-utility-network-trace-results/customElement.js +128 -108
  26. package/dist/docs/api.json +1 -1
  27. package/dist/docs/docs.json +1 -1
  28. package/dist/docs/web-types.json +1 -1
  29. package/dist/loader.js +1 -1
  30. package/dist/types/lumina.d.ts +1 -1
  31. package/dist/types/preact.d.ts +1 -1
  32. package/dist/types/react.d.ts +1 -1
  33. package/dist/types/stencil.d.ts +1 -1
  34. package/package.json +4 -4
  35. package/dist/cdn/3BU2B6F7.js +0 -2
  36. package/dist/cdn/3HHUVV6D.js +0 -2
  37. package/dist/cdn/4GZ7DNJF.js +0 -2
  38. package/dist/cdn/CWFOZVE7.js +0 -2
  39. package/dist/cdn/J6ZHNOE2.js +0 -2
  40. package/dist/cdn/MUAJSX4F.js +0 -2
  41. package/dist/cdn/MUFXNQE3.js +0 -2
  42. package/dist/cdn/NKWXCVN3.js +0 -2
@@ -1,46 +1,40 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import { c as f } from "../../chunks/runtime.js";
2
+ import { c as y } from "../../chunks/runtime.js";
3
3
  import { ref as d } from "lit/directives/ref.js";
4
4
  import c from "@arcgis/core/core/Collection.js";
5
5
  import { watch as w } from "@arcgis/core/core/reactiveUtils.js";
6
- import { substitute as y } from "@arcgis/core/intl.js";
7
- import k from "@arcgis/core/layers/GraphicsLayer.js";
8
- import S from "@arcgis/core/networks/support/UNTraceConfiguration.js";
9
- import T from "@arcgis/core/rest/networks/support/TraceLocation.js";
10
- import m from "@arcgis/core/views/interactive/snapping/FeatureSnappingLayerSource.js";
11
- import N from "@arcgis/core/widgets/Sketch/SketchViewModel.js";
6
+ import { substitute as k } from "@arcgis/core/intl.js";
7
+ import S from "@arcgis/core/layers/GraphicsLayer.js";
8
+ import T from "@arcgis/core/networks/support/UNTraceConfiguration.js";
9
+ import N from "@arcgis/core/rest/networks/support/TraceLocation.js";
10
+ import g from "@arcgis/core/views/interactive/snapping/FeatureSnappingLayerSource.js";
11
+ import $ from "@arcgis/core/widgets/Sketch/SketchViewModel.js";
12
12
  import { LitElement as C, createEvent as l } from "@arcgis/lumina";
13
13
  import { usePropertyChange as L } from "@arcgis/lumina/controllers";
14
- import { log as h, composeMissingPropertyMessage as $, composeEmptyPropertyMessage as v } from "@arcgis/toolkit/log";
15
- import { css as I, html as r } from "lit";
16
- import { u as P } from "../../chunks/useT9n.js";
17
- import { l as g } from "../../chunks/async-utils.js";
18
- import { a as E, i as p, c as F, q as _, b as x } from "../../chunks/layer-utils.js";
19
- const U = I`:host{height:100%;flex-grow:1}calcite-flow{min-height:var(--arcgis-internal-panel-height-sm, 240px)}calcite-block-group{flex-grow:1;padding-bottom:var(--calcite-spacing-md);background-color:var(--calcite-color-foreground-1)}calcite-block{--calcite-block-content-space: 0;--calcite-block-border-color: transparent;margin:0}calcite-block calcite-combobox,calcite-block calcite-input{margin:0 var(--calcite-spacing-md)}calcite-block calcite-input-message{padding:var(--calcite-spacing-sm) var(--calcite-spacing-md) 0}calcite-notice{margin:var(--calcite-spacing-md)}#subnetwork-info-block{margin:var(--calcite-spacing-md) var(--calcite-spacing-md) 0}#results-limited-message{padding:var(--calcite-spacing-sm)}.inline-loader{--calcite-loader-spacing: var(--calcite-spacing-md)}.add-spatial-mode{display:flex;flex-direction:column;gap:var(--calcite-spacing-md);margin:var(--calcite-spacing-md)}.heading{color:var(--calcite-color-text-1);margin:0 0 var(--calcite-spacing-md);font-size:var(--calcite-font-size);font-weight:var(--calcite-font-weight-medium)}`, u = `utility-network-trace-inputs-sketch-${Date.now()}`, A = 20;
20
- class D extends C {
14
+ import { log as h, composeMissingPropertyMessage as _, composeEmptyPropertyMessage as v } from "@arcgis/toolkit/log";
15
+ import { css as I, html as s } from "lit";
16
+ import { u as x } from "../../chunks/useT9n.js";
17
+ import { l as p } from "../../chunks/async-utils.js";
18
+ import { a as F, i as f, c as E, q as b, b as U } from "../../chunks/layer-utils.js";
19
+ const P = I`:host{height:100%;flex-grow:1}calcite-flow{min-height:var(--arcgis-internal-panel-height-sm, 240px)}calcite-block-group{flex-grow:1;padding-bottom:var(--calcite-spacing-md);background-color:var(--calcite-color-foreground-1)}calcite-block{--calcite-block-content-space: 0;--calcite-block-border-color: transparent;margin:0}calcite-block calcite-combobox,calcite-block calcite-input{margin:0 var(--calcite-spacing-md)}calcite-block calcite-input-message{padding:var(--calcite-spacing-sm) var(--calcite-spacing-md) 0}calcite-notice{margin:var(--calcite-spacing-md)}#subnetwork-info-block{margin:var(--calcite-spacing-md) var(--calcite-spacing-md) 0}#results-limited-message{padding:var(--calcite-spacing-sm)}.inline-loader{--calcite-loader-spacing: var(--calcite-spacing-md)}.add-spatial-mode{display:flex;flex-direction:column;gap:var(--calcite-spacing-md);margin:var(--calcite-spacing-md)}.heading{color:var(--calcite-color-text-1);margin:0 0 var(--calcite-spacing-md);font-size:var(--calcite-font-size);font-weight:var(--calcite-font-weight-medium)}`, m = `utility-network-trace-inputs-sketch-${Date.now()}`, D = 20;
20
+ class A extends C {
21
21
  constructor() {
22
- super(...arguments), this._defaultPopupTemplateEnabled = !0, this._messages = P({ blocking: !0 }), this._layerIdToLayer = /* @__PURE__ */ new Map(), this._startingPoints = new c(), this._barriers = new c(), this._stoppingPoints = new c(), this._subnetworkTraceTypes = /* @__PURE__ */ new Set([
23
- "subnetwork",
24
- "subnetwork-controller",
25
- "upstream",
26
- "downstream",
27
- "isolation"
28
- ]), this._setUpMap = () => {
22
+ super(...arguments), this._messages = x({ blocking: !0 }), this.#h = !0, this.#u = /* @__PURE__ */ new Map(), this.#r = new c(), this.#s = new c(), this.#o = new c(), this.#y = /* @__PURE__ */ new Set(["subnetwork", "subnetwork-controller", "upstream", "downstream", "isolation"]), this.#m = () => {
29
23
  if (this._error = void 0, !this.view?.map) {
30
24
  this._error = this._messages.errors.noView, this._utilityNetworks = void 0;
31
25
  return;
32
26
  }
33
27
  const e = this.view.map;
34
- this._setupUtilityNetworks(e), this._setupSketchViewModel(e);
35
- }, this._hitTestPromise = null, this._maxNumCandidateFeatures = 20, this._traceLocationStartingRefChange = (e) => {
36
- e && (this._traceLocationStartingElement = e);
37
- }, this._traceLocationBarrierRefChange = (e) => {
38
- e && (this._traceLocationBarrierElement = e);
39
- }, this._traceLocationStoppingRefChange = (e) => {
40
- e && (this._traceLocationStoppingElement = e);
41
- }, this._featuresComponentRefChange = (e) => {
42
- e && (this._featuresComponentElement = e);
43
- }, this._handleFeaturesPropertyChange = ({ detail: e, target: t }) => {
28
+ this.#J(e), this.#B(e);
29
+ }, this.#i = null, this.#l = 20, this.#T = (e) => {
30
+ e && (this.#w = e);
31
+ }, this.#N = (e) => {
32
+ e && (this.#k = e);
33
+ }, this.#$ = (e) => {
34
+ e && (this.#S = e);
35
+ }, this.#C = (e) => {
36
+ e && (this.#c = e);
37
+ }, this.#v = ({ detail: e, target: t }) => {
44
38
  (e.name === "selectedDrillInFeature" || e.name === "selectedFeature") && (this._selectedFeature = t.selectedDrillInFeature ?? t.selectedFeature ?? void 0);
45
39
  }, this._candidateFeatures = [], this._compatibleSubnetworkNames = [], this._namedTraceConfigurations = [], this._subnetworkNamesState = "ready", this._exceedDisplayLimit = !1, this.autoDestroyDisabled = !1, this.hideActionBar = !1, this.mode = "default", this.arcgisPropertyChange = L()("mode"), this.arcgisSelectedNamedTraceConfigurationChange = l(), this.arcgisTraceInputsChange = l(), this.arcgisTraceLocationSelectEnd = l(), this.arcgisTraceLocationSelectStart = l(), this.arcgisUtilityNetworkChange = l();
46
40
  }
@@ -48,29 +42,49 @@ class D extends C {
48
42
  this.properties = { _selectedFeature: 16, _candidateFeatures: 16, _compatibleSubnetworkNames: 16, _subnetworksTable: 16, _namedTraceConfigurations: 16, _utilityNetworks: 16, _traceConfiguration: 16, _error: 16, _subnetworkNamesState: 16, _activeTraceLocationType: 16, _exceedDisplayLimit: 16, beforeTraceLocationSelectStart: 0, view: 0, selectedUtilityNetwork: 0, selectedNamedTraceConfiguration: 0, autoDestroyDisabled: 5, hideActionBar: 5, traceConfiguration: 32, isSubnetworkNameTraceSelected: 32, referenceElement: 1, mode: 3, traceLocationFlagInfos: 32, traceLocations: 32 };
49
43
  }
50
44
  static {
51
- this.styles = U;
45
+ this.styles = P;
52
46
  }
53
- get _selectedSubnetworkName() {
47
+ get #e() {
54
48
  return this._traceConfiguration?.subnetworkName ?? void 0;
55
49
  }
56
- set _selectedSubnetworkName(e) {
50
+ set #e(e) {
57
51
  this._traceConfiguration && (this._traceConfiguration.subnetworkName = e);
58
52
  }
59
- get _allLayersAndTables() {
53
+ #h;
54
+ get #E() {
60
55
  const { view: e } = this;
61
56
  return e?.map ? e.map.allLayers.toArray().concat(e.map.allTables.toArray()) : [];
62
57
  }
63
- get _showStartingPoints() {
58
+ #t;
59
+ #a;
60
+ #u;
61
+ #r;
62
+ #s;
63
+ #o;
64
+ #y;
65
+ #m;
66
+ #i;
67
+ #c;
68
+ #w;
69
+ #k;
70
+ #S;
71
+ #l;
72
+ #T;
73
+ #N;
74
+ #$;
75
+ #C;
76
+ get #L() {
64
77
  return !this.isSubnetworkNameTraceSelected;
65
78
  }
66
- get _showStoppingPoints() {
79
+ get #_() {
67
80
  const e = this.selectedNamedTraceConfiguration?.traceType;
68
81
  return e === "path" || e === "circuit";
69
82
  }
70
- get _subnetworkLayerIds() {
83
+ get #U() {
71
84
  const e = this.selectedUtilityNetwork?.dataElement?.domainNetworks;
72
85
  return e ? e.map((t) => t.subnetworkLayerId).filter((t) => t != null && t > -1) : [];
73
86
  }
87
+ #v;
74
88
  get traceConfiguration() {
75
89
  return this._traceConfiguration;
76
90
  }
@@ -79,29 +93,29 @@ class D extends C {
79
93
  return !!e?.traceConfiguration?.subnetworkName && e?.traceType === "subnetwork";
80
94
  }
81
95
  get traceLocationFlagInfos() {
82
- return new c([...this._startingPoints, ...this._barriers, ...this._stoppingPoints]);
96
+ return new c([...this.#r, ...this.#s, ...this.#o]);
83
97
  }
84
98
  get traceLocations() {
85
99
  const e = [];
86
- return this._showStartingPoints && this._startingPoints.forEach((t) => e.push(...this._createTraceLocations(t))), this._showStoppingPoints && this._stoppingPoints.forEach((t) => e.push(...this._createTraceLocations(t))), this._barriers.forEach((t) => e.push(...this._createTraceLocations(t))), e;
100
+ return this.#L && this.#r.forEach((t) => e.push(...this.#g(t))), this.#_ && this.#o.forEach((t) => e.push(...this.#g(t))), this.#s.forEach((t) => e.push(...this.#g(t))), e;
87
101
  }
88
102
  async destroy() {
89
- this._removeGraphicsLayerById(u), this._clearTraceLocations(), this._sketchViewModel?.cancel(), this._featuresComponentElement?.destroy(), this._traceLocationStartingElement?.destroy(), this._traceLocationBarrierElement?.destroy(), this._traceLocationStoppingElement?.destroy(), await this.manager.destroy();
103
+ this.#A(m), this.#I(), this.#t?.cancel(), this.#c?.destroy(), this.#w?.destroy(), this.#k?.destroy(), this.#S?.destroy(), await this.manager.destroy();
90
104
  }
91
105
  load() {
92
- this._setUpMap(), this.manager.onLifecycle(() => [
93
- w(() => this.view?.map, () => this._setUpMap())
106
+ this.#m(), this.manager.onLifecycle(() => [
107
+ w(() => this.view?.map, () => this.#m())
94
108
  ]);
95
109
  }
96
110
  willUpdate(e) {
97
- e.has("_utilityNetworks") && this._handleUtilityNetworksChange(), e.has("selectedUtilityNetwork") && (this.arcgisUtilityNetworkChange.emit(), this._handleSelectedUtilityNetworkChange()), e.has("selectedNamedTraceConfiguration") && (this.arcgisTraceInputsChange.emit(), this.arcgisSelectedNamedTraceConfigurationChange.emit(), this._handleTraceConfigChange());
111
+ e.has("_utilityNetworks") && this.#K(), e.has("selectedUtilityNetwork") && (this.arcgisUtilityNetworkChange.emit(), this.#H()), e.has("selectedNamedTraceConfiguration") && (this.arcgisTraceInputsChange.emit(), this.arcgisSelectedNamedTraceConfigurationChange.emit(), this.#z());
98
112
  }
99
113
  disconnectedCallback() {
100
- super.disconnectedCallback(), this._layerIdToLayer.clear();
114
+ super.disconnectedCallback(), this.#u.clear();
101
115
  }
102
- _createTraceLocations(e) {
116
+ #g(e) {
103
117
  const t = e.flagProperties.selectedTerminals;
104
- return e.flagProperties.terminalConfiguration && t?.size ? Array.from(t, (i) => new T({
118
+ return e.flagProperties.terminalConfiguration && t?.size ? Array.from(t, (i) => new N({
105
119
  type: e.traceLocation.type,
106
120
  isFilterBarrier: e.traceLocation.isFilterBarrier,
107
121
  globalId: e.traceLocation.globalId,
@@ -109,87 +123,88 @@ class D extends C {
109
123
  terminalId: i
110
124
  })) : [e.traceLocation];
111
125
  }
112
- _clearTraceLocations() {
113
- this._startingPoints.forEach((e) => {
114
- e.spatialProperties.flagGraphic && this.view?.graphics.remove(e.spatialProperties.flagGraphic);
115
- }), this._startingPoints.removeAll(), this._barriers.forEach((e) => {
116
- e.spatialProperties.flagGraphic && this.view?.graphics.remove(e.spatialProperties.flagGraphic);
117
- }), this._barriers.removeAll(), this._stoppingPoints.forEach((e) => {
118
- e.spatialProperties.flagGraphic && this.view?.graphics.remove(e.spatialProperties.flagGraphic);
119
- }), this._stoppingPoints.removeAll();
120
- }
121
- _createGraphicsLayerById(e, t) {
126
+ #I() {
127
+ const { view: e } = this;
128
+ this.#r.forEach((t) => {
129
+ t.spatialProperties.flagGraphic && e?.graphics.remove(t.spatialProperties.flagGraphic);
130
+ }), this.#r.removeAll(), this.#s.forEach((t) => {
131
+ t.spatialProperties.flagGraphic && e?.graphics.remove(t.spatialProperties.flagGraphic);
132
+ }), this.#s.removeAll(), this.#o.forEach((t) => {
133
+ t.spatialProperties.flagGraphic && e?.graphics.remove(t.spatialProperties.flagGraphic);
134
+ }), this.#o.removeAll();
135
+ }
136
+ #P(e, t) {
122
137
  if (!e.findLayerById(t)) {
123
- const a = new k({
138
+ const a = new S({
124
139
  id: t,
125
140
  listMode: "hide",
126
141
  title: t
127
142
  });
128
- E(this.view, a);
143
+ F(this.view, a);
129
144
  }
130
145
  }
131
- _getGraphicsLayerById(e, t) {
146
+ #D(e, t) {
132
147
  const i = e.findLayerById(t);
133
- return p(i) ? (e.reorder(i, e.layers.length - 1), i) : null;
148
+ return f(i) ? (e.reorder(i, e.layers.length - 1), i) : null;
134
149
  }
135
- _removeGraphicsLayerById(e) {
150
+ #A(e) {
136
151
  if (!this.view?.map)
137
152
  return;
138
153
  const { map: t } = this.view, i = t?.findLayerById(e);
139
- i && p(i) && t?.remove(i);
154
+ i && f(i) && t?.remove(i);
140
155
  }
141
- _setSnappingOptions() {
142
- if (!this._sketchViewModel)
156
+ #x() {
157
+ if (!this.#t)
143
158
  return;
144
159
  const e = new c();
145
- this._utilityNetworkLayers?.forEach((t) => {
146
- F(t) ? t.sublayers.forEach((i) => {
147
- e.add(new m({
160
+ this.#a?.forEach((t) => {
161
+ E(t) ? t.sublayers.forEach((i) => {
162
+ e.add(new g({
148
163
  layer: i,
149
164
  enabled: !0
150
165
  }));
151
- }) : e.add(new m({
166
+ }) : e.add(new g({
152
167
  layer: t,
153
168
  enabled: !0
154
169
  }));
155
- }), this._sketchViewModel.snappingOptions = {
170
+ }), this.#t.snappingOptions = {
156
171
  enabled: !1,
157
172
  featureSources: e
158
173
  };
159
174
  }
160
- _initializeSketchViewModel(e) {
161
- const { view: t } = this, i = this._getGraphicsLayerById(e, u);
162
- return new N({
175
+ #M(e) {
176
+ const { view: t } = this, i = this.#D(e, m);
177
+ return new $({
163
178
  layer: i,
164
179
  view: t
165
180
  });
166
181
  }
167
- _setupSketchViewModel(e) {
168
- this._createGraphicsLayerById(e, u), this._sketchViewModel = this._initializeSketchViewModel(e), this._setSnappingOptions();
182
+ #B(e) {
183
+ this.#P(e, m), this.#t = this.#M(e), this.#x();
169
184
  }
170
- _clearSubnetworks() {
171
- this._selectedSubnetworkName = void 0, this._subnetworksTable = void 0, this._compatibleSubnetworkNames = [];
185
+ #G() {
186
+ this.#e = void 0, this._subnetworksTable = void 0, this._compatibleSubnetworkNames = [];
172
187
  }
173
- async _loadSubnetworksTable() {
188
+ async #V() {
174
189
  this._subnetworksTable || (this._subnetworksTable = await this.selectedUtilityNetwork?.loadSubnetworksTable());
175
190
  }
176
- async _querySubnetworks() {
191
+ async #q() {
177
192
  const { _subnetworksTable: e } = this;
178
193
  if (!e)
179
194
  return;
180
- const t = e.fieldsIndex.get("SUBNETWORKNAME"), i = (o, n, b) => n === 0 || o.getAttribute(t.name) !== b[n - 1].getAttribute(t.name), a = e.createQuery();
181
- a.gdbVersion = this.selectedUtilityNetwork?.gdbVersion, a.where = this._getSubnetworkQueryWhereClause(), a.outFields = [t.name], a.orderByFields = [t.name];
182
- const { features: s } = await _(e, a, void 0, !1);
183
- this._compatibleSubnetworkNames = s.filter(i).map((o) => o.getAttribute(t.name));
195
+ const t = e.fieldsIndex.get("SUBNETWORKNAME"), i = (o, n, u) => n === 0 || o.getAttribute(t.name) !== u[n - 1].getAttribute(t.name), a = e.createQuery();
196
+ a.gdbVersion = this.selectedUtilityNetwork?.gdbVersion, a.where = this.#O(), a.outFields = [t.name], a.orderByFields = [t.name];
197
+ const { features: r } = await b(e, a, void 0, !1);
198
+ this._compatibleSubnetworkNames = r.filter(i).map((o) => o.getAttribute(t.name));
184
199
  }
185
- _getSubnetworkQueryWhereClause() {
200
+ #O() {
186
201
  const e = this._traceConfiguration, t = `DOMAINNETWORKNAME = '${e.domainNetworkName}'`, i = `TIERNAME = '${e.tierName}'`;
187
202
  return [t, i].join(" AND ");
188
203
  }
189
- async _handleSubnetworkTraceConfigurationChange(e) {
190
- await this._loadSubnetworksTable(), await this._querySubnetworks(), e.subnetworkName && !this._compatibleSubnetworkNames.some((t) => t === e.subnetworkName) && (this._selectedSubnetworkName = this._compatibleSubnetworkNames.at(0));
204
+ async #R(e) {
205
+ await this.#V(), await this.#q(), e.subnetworkName && !this._compatibleSubnetworkNames.some((t) => t === e.subnetworkName) && (this.#e = this._compatibleSubnetworkNames.at(0));
191
206
  }
192
- _selectTraceConfigurationByGlobalId(e) {
207
+ #j(e) {
193
208
  const t = this.selectedUtilityNetwork?.sharedNamedTraceConfigurations.find((i) => i.globalId === e);
194
209
  if (!t) {
195
210
  h("error", this, "`traceConfig` not found in `selectedUtilityNetwork.sharedNamedTraceConfigurations`");
@@ -197,188 +212,190 @@ class D extends C {
197
212
  }
198
213
  this.selectedNamedTraceConfiguration = t;
199
214
  }
200
- async _handleTraceConfigChange() {
215
+ async #z() {
201
216
  const { selectedNamedTraceConfiguration: e } = this;
202
- if (!(e?.traceConfiguration instanceof S)) {
203
- h("error", this, $("selectedNamedTraceConfiguration.traceConfiguration")), this._traceConfiguration = void 0;
217
+ if (!(e?.traceConfiguration instanceof T)) {
218
+ h("error", this, _("selectedNamedTraceConfiguration.traceConfiguration")), this._traceConfiguration = void 0;
204
219
  return;
205
220
  }
206
- this._traceConfiguration = e.traceConfiguration.clone(), this.isSubnetworkNameTraceSelected && (this._subnetworkNamesState = "loading", await this._handleSubnetworkTraceConfigurationChange(this._traceConfiguration), this._subnetworkNamesState = "ready");
221
+ this._traceConfiguration = e.traceConfiguration.clone(), this.isSubnetworkNameTraceSelected && (this._subnetworkNamesState = "loading", await this.#R(this._traceConfiguration), this._subnetworkNamesState = "ready");
207
222
  }
208
- async _handleSelectedUtilityNetworkChange() {
223
+ async #H() {
209
224
  const { selectedUtilityNetwork: e } = this;
210
225
  try {
211
226
  e && !e.loaded && await e.load();
212
227
  } catch (t) {
213
- g(t, this, "Error while loading the selected utility network");
228
+ p(t, this, "Error while loading the selected utility network");
214
229
  }
215
- this._clearSubnetworks(), this._setupTraceConfigurations(), this._setUtilityNetworkLayers(), this._clearTraceLocations();
230
+ this.#G(), this.#W(), this.#Q(), this.#I();
216
231
  }
217
- _setupTraceConfigurations() {
232
+ #W() {
218
233
  this._traceConfiguration = void 0, this.selectedNamedTraceConfiguration = void 0, this._namedTraceConfigurations = this.selectedUtilityNetwork?.sharedNamedTraceConfigurations.filter(Boolean).filter((e) => e.traceType !== "circuit").sort((e, t) => e.title.localeCompare(t.title)) || [], this._namedTraceConfigurations.length ? this.selectedNamedTraceConfiguration = this._namedTraceConfigurations.at(0) : h("error", this, "The selected utility network has no compatible named trace configurations.");
219
234
  }
220
- _setUtilityNetworkLayers() {
235
+ #Q() {
221
236
  const { selectedUtilityNetwork: e } = this;
222
- this._utilityNetworkLayers = new c(this._allLayersAndTables.filter((t) => e?.isUtilityLayer(t) && !this._subnetworkLayerIds.includes(t.layerId))), this._setSnappingOptions();
237
+ this.#a = new c(this.#E.filter((t) => e?.isUtilityLayer(t) && !this.#U.includes(t.layerId))), this.#x();
223
238
  }
224
- _handleUtilityNetworksChange() {
239
+ #K() {
225
240
  const { _utilityNetworks: e, selectedUtilityNetwork: t } = this;
226
241
  e?.length ? (!t || !e.includes(t)) && (this.selectedUtilityNetwork = e.at(0)) : (h("error", this, v("_utilityNetworks")), this.selectedUtilityNetwork = void 0, this._error = this._messages.errors.noUtilityNetwork);
227
242
  }
228
- async _setupUtilityNetworks(e) {
243
+ async #J(e) {
229
244
  try {
230
245
  e.loaded || await e.load();
231
246
  } catch (t) {
232
- g(t, this, "Error while loading `view.map`");
247
+ p(t, this, "Error while loading `view.map`");
233
248
  } finally {
234
249
  this._utilityNetworks = e.utilityNetworks || new c();
235
250
  }
236
251
  }
237
- _handleTraceLocationSelectStart(e) {
252
+ #p(e) {
238
253
  if (e.stopPropagation(), this.arcgisTraceLocationSelectStart.emit(e.detail).defaultPrevented) {
239
254
  e.preventDefault();
240
255
  return;
241
256
  }
242
257
  this._activeTraceLocationType = e?.target?.traceLocationType, this.mode = "add-spatial-instructions";
243
258
  }
244
- _getLayerByLayerId(e) {
259
+ #X(e) {
245
260
  if (e == null)
246
261
  return;
247
- const { _layerIdToLayer: t, _utilityNetworkLayers: i } = this;
248
- if (t.get(e))
249
- return t.get(e);
262
+ const t = this.#u, i = this.#a, a = t.get(e);
263
+ if (a)
264
+ return a;
250
265
  if (!i)
251
266
  return;
252
- const a = i.find((s) => "layerId" in s && s.layerId === e);
253
- return a && t.set(e, a), a;
267
+ const r = i.find((o) => "layerId" in o && o.layerId === e);
268
+ return r && t.set(e, r), r;
254
269
  }
255
- async _queryFeaturesOnLayer(e, t) {
270
+ async #Y(e, t) {
256
271
  const i = e.createQuery();
257
- i.gdbVersion = this.selectedUtilityNetwork?.gdbVersion, i.objectIds = t.map((s) => s.getObjectId()), i.outFields = ["*"];
258
- const { features: a } = await _(e, i);
259
- return a.forEach((s) => {
260
- if (!s.getEffectivePopupTemplate(this._defaultPopupTemplateEnabled)) {
261
- const o = s.layer;
262
- s.popupTemplate = o.createPopupTemplate();
272
+ i.gdbVersion = this.selectedUtilityNetwork?.gdbVersion, i.objectIds = t.map((r) => r.getObjectId()), i.outFields = ["*"];
273
+ const { features: a } = await b(e, i);
274
+ return a.forEach((r) => {
275
+ if (!r.getEffectivePopupTemplate(this.#h)) {
276
+ const o = r.layer;
277
+ r.popupTemplate = o.createPopupTemplate();
263
278
  }
264
279
  }), a;
265
280
  }
266
- async _queryFeatures(e) {
281
+ async #Z(e) {
267
282
  const t = /* @__PURE__ */ new Map(), i = [];
268
283
  return e.forEach((a) => {
269
- const s = x(a.layer) ? a.layer.parent : a.layer;
270
- if (s) {
271
- const o = this._getLayerByLayerId(s.layerId);
284
+ const r = U(a.layer) ? a.layer.parent : a.layer;
285
+ if (r) {
286
+ const o = this.#X(r.layerId);
272
287
  if (o) {
273
288
  const n = t.get(o) || [];
274
289
  n.push(a), t.set(o, n);
275
290
  }
276
291
  }
277
292
  }), await Promise.all(Array.from(t.keys()).map(async (a) => {
278
- const s = t.get(a) ?? [], o = await this._queryFeaturesOnLayer(a, s);
293
+ const r = t.get(a) ?? [], o = await this.#Y(a, r);
279
294
  i.push(...o);
280
295
  })), i;
281
296
  }
282
- async _handleHitTestComplete(e) {
283
- return this._exceedDisplayLimit = e.length > this._maxNumCandidateFeatures, this._candidateFeatures = await this._queryFeatures(e.slice(0, this._maxNumCandidateFeatures)), this._candidateFeatures.length === 0 ? (this._handleAddSpatialCancelClick(), await Promise.reject(Error("No features found"))) : (this._candidateFeatures.length === 1 && (this._selectedFeature = this._candidateFeatures.at(0)), this.mode = "add-spatial-feature", this._hitTestPromise?.reject(), this._hitTestPromise = Promise.withResolvers(), await this._hitTestPromise.promise);
297
+ async #f(e) {
298
+ return this._exceedDisplayLimit = e.length > this.#l, this._candidateFeatures = await this.#Z(e.slice(0, this.#l)), this._candidateFeatures.length === 0 ? (this.#d(), await Promise.reject(Error("No features found"))) : (this._candidateFeatures.length === 1 && (this._selectedFeature = this._candidateFeatures.at(0)), this.mode = "add-spatial-feature", this.#i?.reject(), this.#i = Promise.withResolvers(), await this.#i.promise);
284
299
  }
285
- _handleTraceLocationSelectEnd(e) {
286
- e.stopPropagation(), this.arcgisTraceLocationSelectEnd.emit(), this._activeTraceLocationType = void 0, this.mode = "default", this._handleAddSpatialCancelClick();
300
+ #b(e) {
301
+ e.stopPropagation(), this.arcgisTraceLocationSelectEnd.emit(), this._activeTraceLocationType = void 0, this.mode = "default", this.#d();
287
302
  }
288
- _handleAddSpatialCancelClick(e) {
289
- e?.stopPropagation(), this._featuresComponentElement?.clear(), this._handleFeaturesClose(), this._sketchViewModel?.cancel();
303
+ #d(e) {
304
+ e?.stopPropagation(), this.#c?.clear(), this.#F(), this.#t?.cancel();
290
305
  }
291
- _handleFeaturesClose() {
292
- this.mode = "default", this._candidateFeatures = [], this._selectedFeature = void 0, this._hitTestPromise?.reject(), this._hitTestPromise = null;
306
+ #F() {
307
+ this.mode = "default", this._candidateFeatures = [], this._selectedFeature = void 0, this.#i?.reject(), this.#i = null;
293
308
  }
294
- _handleAddSpatialAddClick() {
295
- const { _hitTestPromise: e, _featuresComponentElement: t, _selectedFeature: i } = this;
309
+ #ee() {
310
+ const e = this.#i, t = this.#c, { _selectedFeature: i } = this;
296
311
  if (e && t) {
297
312
  if (!i)
298
313
  return;
299
- e.resolve(i), this._hitTestPromise = null;
314
+ e.resolve(i), this.#i = null;
300
315
  }
301
316
  }
302
- _renderError(e, t = !1, i) {
303
- return r`<calcite-notice .closable=${t} kind=danger open scale=s width=auto .icon=${i}><div slot=message>${e}</div></calcite-notice>`;
317
+ #n(e, t = !1, i) {
318
+ return s`<calcite-notice .closable=${t} kind=danger open scale=s width=auto .icon=${i}><div slot=message>${e}</div></calcite-notice>`;
304
319
  }
305
- _renderLoader() {
306
- return r`<calcite-loader label=loading></calcite-loader>`;
320
+ #te() {
321
+ return s`<calcite-loader label=loading></calcite-loader>`;
307
322
  }
308
- _renderTraceSelection() {
309
- const e = this._namedTraceConfigurations.map((i) => r`<calcite-combobox-item .value=${i.globalId} .heading=${i.title} .selected=${i.globalId === this.selectedNamedTraceConfiguration?.globalId}></calcite-combobox-item>`), t = this._messages.labels.traceConfiguration;
310
- return r`<calcite-block .heading=${t} .label=${t} expanded><calcite-combobox .label=${t} selection-mode=single-persist @calciteComboboxChange=${({ currentTarget: i }) => {
323
+ #ie() {
324
+ const e = this._namedTraceConfigurations.map((i) => s`<calcite-combobox-item .value=${i.globalId} .heading=${i.title} .selected=${i.globalId === this.selectedNamedTraceConfiguration?.globalId}></calcite-combobox-item>`), t = this._messages.labels.traceConfiguration;
325
+ return s`<calcite-block .heading=${t} .label=${t} expanded><calcite-combobox .label=${t} selection-mode=single-persist @calciteComboboxChange=${({ currentTarget: i }) => {
311
326
  const a = i.selectedItems[0]?.value;
312
- this._selectTraceConfigurationByGlobalId(a);
327
+ this.#j(a);
313
328
  }}>${e}</calcite-combobox></calcite-block>`;
314
329
  }
315
- _renderUtilityNetworkSelection() {
316
- const e = this._messages.labels.utilityNetwork, t = this._utilityNetworks?.map((i) => r`<calcite-combobox-item .value=${i.id} .heading=${i.title || i.id} .selected=${i.id === this.selectedUtilityNetwork?.id}></calcite-combobox-item>`);
317
- return r`<calcite-block .heading=${e} .label=${e} expanded><calcite-combobox .label=${e} selection-mode=single-persist @calciteComboboxChange=${({ currentTarget: i }) => {
330
+ #ae() {
331
+ const e = this._messages.labels.utilityNetwork, t = this._utilityNetworks?.map((i) => s`<calcite-combobox-item .value=${i.id} .heading=${i.title || i.id} .selected=${i.id === this.selectedUtilityNetwork?.id}></calcite-combobox-item>`);
332
+ return s`<calcite-block .heading=${e} .label=${e} expanded><calcite-combobox .label=${e} selection-mode=single-persist @calciteComboboxChange=${({ currentTarget: i }) => {
318
333
  const a = i.selectedItems[0]?.value;
319
- this.selectedUtilityNetwork?.id !== a && (this.selectedUtilityNetwork = this._utilityNetworks?.find((s) => s.id === a));
334
+ this.selectedUtilityNetwork?.id !== a && (this.selectedUtilityNetwork = this._utilityNetworks?.find((r) => r.id === a));
320
335
  }}>${t}</calcite-combobox></calcite-block>`;
321
336
  }
322
- _renderDefaultMode() {
323
- const { selectedUtilityNetwork: e } = this, { noView: t, noUtilityNetwork: i } = this._messages.errors;
324
- let a;
325
- return this._error === t || this._error === i ? a = this._renderError(this._error, !1, "exclamation-mark-triangle") : !e?.loaded && !e?.loadError ? a = this._renderLoader() : a = this._renderContent(), r`<calcite-flow-item .selected=${this.mode === "default"}>${a}</calcite-flow-item>`;
337
+ #re() {
338
+ const { _error: e, selectedUtilityNetwork: t } = this, { noView: i, noUtilityNetwork: a } = this._messages.errors;
339
+ let r;
340
+ return e === i || e === a ? r = this.#n(e, !1, "exclamation-mark-triangle") : !t?.loaded && !t?.loadError ? r = this.#te() : r = this.#pe(), s`<calcite-flow-item .selected=${this.mode === "default"}>${r}</calcite-flow-item>`;
326
341
  }
327
- _renderSpatialSelectInstructions() {
342
+ #se() {
328
343
  const { _messages: e, mode: t } = this, i = this._activeTraceLocationType === "starting-point" ? e.labels.addSpatial.startingPoint : this._activeTraceLocationType === "barrier" ? e.labels.addSpatial.barrier : e.labels.addSpatial.stoppingPoint;
329
- return r`<calcite-flow-item .selected=${t === "add-spatial-instructions"} .heading=${i} @calciteFlowItemBack=${(a) => this._handleAddSpatialCancelClick(a)}><div class="add-spatial-mode"><div><h5 class="heading">${e.instructions.addSpatial.selectFeature.heading}</h5>${e.instructions.addSpatial.selectFeature.subheading}</div><div><h5 class="heading">${e.instructions.addSpatial.selectAssociatedFeature.heading}</h5>${e.instructions.addSpatial.selectAssociatedFeature.subheading}</div></div></calcite-flow-item>`;
344
+ return s`<calcite-flow-item .selected=${t === "add-spatial-instructions"} .heading=${i} @calciteFlowItemBack=${(a) => this.#d(a)}><div class="add-spatial-mode"><div><h5 class="heading">${e.instructions.addSpatial.selectFeature.heading}</h5>${e.instructions.addSpatial.selectFeature.subheading}</div><div><h5 class="heading">${e.instructions.addSpatial.selectAssociatedFeature.heading}</h5>${e.instructions.addSpatial.selectAssociatedFeature.subheading}</div></div></calcite-flow-item>`;
330
345
  }
331
- _renderCandidateFeatures() {
332
- if (!this._candidateFeatures.length)
346
+ #oe() {
347
+ const { _activeTraceLocationType: e, _candidateFeatures: t, _messages: i } = this;
348
+ if (!t.length)
333
349
  return this.mode = "default", null;
334
- const e = this._activeTraceLocationType === "starting-point" ? this._messages.labels.addSpatial.startingPoint : this._activeTraceLocationType === "barrier" ? this._messages.labels.addSpatial.barrier : this._messages.labels.addSpatial.stoppingPoint, t = this._candidateFeatures.length === 1 ? "feature" : "list";
335
- return r`<arcgis-features-next .autoDestroyDisabled=${this.autoDestroyDisabled} .defaultPopupTemplateEnabled=${this._defaultPopupTemplateEnabled} .features=${this._candidateFeatures} .featureMenuTitle=${e} .hideActionBar=${this.hideActionBar} hide-select-feature .initialDisplayMode=${t} @arcgisClose=${() => this._handleFeaturesClose()} @arcgisPropertyChange=${this._handleFeaturesPropertyChange} open .referenceElement=${this.referenceElement} .view=${this.view} ${d(this._featuresComponentRefChange)}></arcgis-features-next>`;
350
+ const a = e === "starting-point" ? i.labels.addSpatial.startingPoint : e === "barrier" ? i.labels.addSpatial.barrier : i.labels.addSpatial.stoppingPoint, r = t.length === 1 ? "feature" : "list";
351
+ return s`<arcgis-features-next .autoDestroyDisabled=${this.autoDestroyDisabled} .defaultPopupTemplateEnabled=${this.#h} .features=${this._candidateFeatures} .featureMenuTitle=${a} .hideActionBar=${this.hideActionBar} hide-select-feature .initialDisplayMode=${r} @arcgisClose=${() => this.#F()} @arcgisPropertyChange=${this.#v} open .referenceElement=${this.referenceElement} .view=${this.view} ${d(this.#C)}></arcgis-features-next>`;
336
352
  }
337
- _renderAddSpatialFooter() {
338
- const { mode: e, _messages: t, _selectedFeature: i, selectedUtilityNetwork: a } = this, s = e === "add-spatial-feature" && this._exceedDisplayLimit && !i, o = y(t.warnings.exceededDisplayLimit, {
339
- limit: this._maxNumCandidateFeatures.toString()
353
+ #ne() {
354
+ const { mode: e, _messages: t, _selectedFeature: i, selectedUtilityNetwork: a } = this, r = e === "add-spatial-feature" && this._exceedDisplayLimit && !i, o = k(t.warnings.exceededDisplayLimit, {
355
+ limit: this.#l.toString()
340
356
  }), n = i ? !(a?.isUtilityLayer(i.layer) ?? !0) : !0;
341
- return r`${s && r`<calcite-input-message id=results-limited-message icon=exclamation-mark-circle status=idle>${o}</calcite-input-message>` || ""}<calcite-button appearance=outline width=full @click=${() => this._handleAddSpatialCancelClick()} slot=footer>${t.buttons.cancel}</calcite-button>${e === "add-spatial-feature" && r`<calcite-button width=full slot=footer appearance=solid @click=${() => this._handleAddSpatialAddClick()} .disabled=${n}>${t.buttons.add}</calcite-button>` || ""}`;
357
+ return s`${r && s`<calcite-input-message id=results-limited-message icon=exclamation-mark-circle status=idle>${o}</calcite-input-message>` || ""}<calcite-button appearance=outline width=full @click=${() => this.#d()} slot=footer>${t.buttons.cancel}</calcite-button>${e === "add-spatial-feature" && s`<calcite-button width=full slot=footer appearance=solid @click=${() => this.#ee()} .disabled=${n}>${t.buttons.add}</calcite-button>` || ""}`;
342
358
  }
343
- _renderStartingPointSelection() {
344
- return r`<arcgis-utility-network-trace-location .view=${this.view} trace-location-type=starting-point .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this._handleTraceLocationSelectStart} @arcgisTraceLocationSelectEnd=${this._handleTraceLocationSelectEnd} @arcgisTraceLocationChange=${() => this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this._sketchViewModel} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this._utilityNetworkLayers} .traceLocations=${this._startingPoints} .afterHitTest=${this._handleHitTestComplete.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${d(this._traceLocationStartingRefChange)}></arcgis-utility-network-trace-location>`;
359
+ #ce() {
360
+ return s`<arcgis-utility-network-trace-location .view=${this.view} trace-location-type=starting-point .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this.#p} @arcgisTraceLocationSelectEnd=${this.#b} @arcgisTraceLocationChange=${() => this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this.#t} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this.#a} .traceLocations=${this.#r} .afterHitTest=${this.#f.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${d(this.#T)}></arcgis-utility-network-trace-location>`;
345
361
  }
346
- _renderStoppingPointSelection() {
347
- return r`<arcgis-utility-network-trace-location .view=${this.view} trace-location-type=stopping-point .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this._handleTraceLocationSelectStart} @arcgisTraceLocationSelectEnd=${this._handleTraceLocationSelectEnd} @arcgisTraceLocationChange=${() => this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this._sketchViewModel} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this._utilityNetworkLayers} .traceLocations=${this._stoppingPoints} .afterHitTest=${this._handleHitTestComplete.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${d(this._traceLocationStoppingRefChange)}></arcgis-utility-network-trace-location>`;
362
+ #le() {
363
+ return s`<arcgis-utility-network-trace-location .view=${this.view} trace-location-type=stopping-point .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this.#p} @arcgisTraceLocationSelectEnd=${this.#b} @arcgisTraceLocationChange=${() => this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this.#t} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this.#a} .traceLocations=${this.#o} .afterHitTest=${this.#f.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${d(this.#$)}></arcgis-utility-network-trace-location>`;
348
364
  }
349
- _renderBarrierSelection() {
350
- return r`<arcgis-utility-network-trace-location .view=${this.view} trace-location-type=barrier .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this._handleTraceLocationSelectStart} @arcgisTraceLocationSelectEnd=${this._handleTraceLocationSelectEnd} @arcgisTraceLocationChange=${() => this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this._sketchViewModel} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this._utilityNetworkLayers} .traceLocations=${this._barriers} .afterHitTest=${this._handleHitTestComplete.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${d(this._traceLocationBarrierRefChange)}></arcgis-utility-network-trace-location>`;
365
+ #de() {
366
+ return s`<arcgis-utility-network-trace-location .view=${this.view} trace-location-type=barrier .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this.#p} @arcgisTraceLocationSelectEnd=${this.#b} @arcgisTraceLocationChange=${() => this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this.#t} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this.#a} .traceLocations=${this.#s} .afterHitTest=${this.#f.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${d(this.#N)}></arcgis-utility-network-trace-location>`;
351
367
  }
352
- _renderSubnetworkNameInput() {
353
- return r`<calcite-input clearable type=text .placeholder=${this._messages.instructions.enterSubnetworkName} max-length=64 .status=${this._selectedSubnetworkName ? "valid" : "invalid"} .value=${this._selectedSubnetworkName} @calciteInputInput=${(e) => this._selectedSubnetworkName = e.target.value}></calcite-input><calcite-input-message icon=exclamation-mark-triangle status=idle>${this._messages.labels.tooManySubnetworks}</calcite-input-message>`;
368
+ #he() {
369
+ const { _messages: e } = this;
370
+ return s`<calcite-input clearable type=text .placeholder=${e.instructions.enterSubnetworkName} max-length=64 .status=${this.#e ? "valid" : "invalid"} .value=${this.#e} @calciteInputInput=${(t) => this.#e = t.target.value}></calcite-input><calcite-input-message icon=exclamation-mark-triangle status=idle>${e.labels.tooManySubnetworks}</calcite-input-message>`;
354
371
  }
355
- _renderSubnetworkSelectList() {
356
- return r`<calcite-combobox .label=${this._messages.labels.subnetworkName} selection-mode=single-persist @calciteComboboxChange=${({ currentTarget: e }) => {
372
+ #ue() {
373
+ return s`<calcite-combobox .label=${this._messages.labels.subnetworkName} selection-mode=single-persist @calciteComboboxChange=${({ currentTarget: e }) => {
357
374
  const t = e.selectedItems[0]?.value;
358
- this._selectedSubnetworkName = t;
359
- }}>${this._compatibleSubnetworkNames.map((e) => r`<calcite-combobox-item .value=${e} .heading=${e} .selected=${e === this._selectedSubnetworkName}></calcite-combobox-item>`)}</calcite-combobox>`;
375
+ this.#e = t;
376
+ }}>${this._compatibleSubnetworkNames.map((e) => s`<calcite-combobox-item .value=${e} .heading=${e} .selected=${e === this.#e}></calcite-combobox-item>`)}</calcite-combobox>`;
360
377
  }
361
- _renderSubnetworkSelection() {
362
- const e = this._messages.labels.subnetworkName;
363
- return this.isSubnetworkNameTraceSelected ? this._subnetworkNamesState === "loading" ? r`<calcite-loader class="inline-loader" label=loading scale=s></calcite-loader>` : this._compatibleSubnetworkNames.length ? r`<calcite-block .heading=${e} .label=${e} expanded>${this._compatibleSubnetworkNames.length > A ? this._renderSubnetworkNameInput() : this._renderSubnetworkSelectList()}</calcite-block>` : this._renderError(this._messages.errors.noCompatibleSubnetworks, !1, "exclamation-mark-triangle") : null;
378
+ #me() {
379
+ const { _messages: e } = this, t = e.labels.subnetworkName;
380
+ return this.isSubnetworkNameTraceSelected ? this._subnetworkNamesState === "loading" ? s`<calcite-loader class="inline-loader" label=loading scale=s></calcite-loader>` : this._compatibleSubnetworkNames.length ? s`<calcite-block .heading=${t} .label=${t} expanded>${this._compatibleSubnetworkNames.length > D ? this.#he() : this.#ue()}</calcite-block>` : this.#n(e.errors.noCompatibleSubnetworks, !1, "exclamation-mark-triangle") : null;
364
381
  }
365
- _renderSubnetworkInfo() {
382
+ #ge() {
366
383
  const { selectedNamedTraceConfiguration: e } = this;
367
- return this._traceConfiguration && e?.traceType && this._subnetworkTraceTypes.has(e.traceType) ? r`<calcite-block id=subnetwork-info-block expanded .label=${this._messages.labels.subnetworkInfo}><arcgis-utility-network-subnetwork-info .namedTraceConfig=${e}></arcgis-utility-network-subnetwork-info></calcite-block>` : null;
384
+ return this._traceConfiguration && e?.traceType && this.#y.has(e.traceType) ? s`<calcite-block id=subnetwork-info-block expanded .label=${this._messages.labels.subnetworkInfo}><arcgis-utility-network-subnetwork-info .namedTraceConfiguration=${e}></arcgis-utility-network-subnetwork-info></calcite-block>` : null;
368
385
  }
369
- _renderContent() {
370
- const { noTraceConfiguration: e, noNamedTraceConfigurations: t, utilityNetworkLoadFailed: i } = this._messages.errors, a = this._utilityNetworks && this._utilityNetworks.length > 1 ? this._renderUtilityNetworkSelection() : null;
371
- let s;
372
- this.selectedUtilityNetwork?.loadError ? s = this._renderError(i, !1, "exclamation-mark-triangle") : this._namedTraceConfigurations.length || (s = this._renderError(t, !1, "exclamation-mark-triangle"));
373
- const o = r`${this._renderTraceSelection()}${this._renderSubnetworkInfo()}${this._renderSubnetworkSelection()}`, n = this.traceConfiguration ? r`${this._showStartingPoints ? this._renderStartingPointSelection() : null}${this._showStoppingPoints ? this._renderStoppingPointSelection() : null}${this._renderBarrierSelection()}` : this._renderError(e, !1, "exclamation-mark-triangle");
374
- return r`<calcite-block-group .label=${this._messages.labels.traceInputs}>${a}${s ?? r`${o}${n}`}</calcite-block-group>`;
386
+ #pe() {
387
+ const { _messages: e } = this, { noTraceConfiguration: t, noNamedTraceConfigurations: i, utilityNetworkLoadFailed: a } = e.errors, r = this._utilityNetworks && this._utilityNetworks.length > 1 ? this.#ae() : null;
388
+ let o;
389
+ this.selectedUtilityNetwork?.loadError ? o = this.#n(a, !1, "exclamation-mark-triangle") : this._namedTraceConfigurations.length || (o = this.#n(i, !1, "exclamation-mark-triangle"));
390
+ const n = s`${this.#ie()}${this.#ge()}${this.#me()}`, u = this.traceConfiguration ? s`${this.#L ? this.#ce() : null}${this.#_ ? this.#le() : null}${this.#de()}` : this.#n(t, !1, "exclamation-mark-triangle");
391
+ return s`<calcite-block-group .label=${e.labels.traceInputs}>${r}${o ?? s`${n}${u}`}</calcite-block-group>`;
375
392
  }
376
393
  render() {
377
394
  const { mode: e } = this;
378
- return r`<calcite-panel>${e === "add-spatial-feature" ? this._renderCandidateFeatures() : null}<calcite-flow .hidden=${e === "add-spatial-feature"}>${this._renderDefaultMode()}${this._renderSpatialSelectInstructions()}</calcite-flow>${e !== "default" ? this._renderAddSpatialFooter() : null}</calcite-panel>`;
395
+ return s`<calcite-panel>${e === "add-spatial-feature" ? this.#oe() : null}<calcite-flow .hidden=${e === "add-spatial-feature"}>${this.#re()}${this.#se()}</calcite-flow>${e !== "default" ? this.#ne() : null}</calcite-panel>`;
379
396
  }
380
397
  }
381
- f("arcgis-utility-network-trace-inputs", D);
398
+ y("arcgis-utility-network-trace-inputs", A);
382
399
  export {
383
- D as ArcgisUtilityNetworkTraceInputs
400
+ A as ArcgisUtilityNetworkTraceInputs
384
401
  };