@esri/solutions-components 0.6.3 → 0.6.4
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/buffer-tools_4.cjs.entry.js +1 -1
- package/dist/cjs/calcite-combobox_6.cjs.entry.js +74 -52
- package/dist/cjs/calcite-input-text_4.cjs.entry.js +9 -9
- package/dist/cjs/card-manager_3.cjs.entry.js +36 -29
- package/dist/cjs/crowdsource-manager.cjs.entry.js +2 -2
- package/dist/cjs/{downloadUtils-6d4e269f.js → downloadUtils-4aadf4b0.js} +4 -3
- package/dist/cjs/edit-card_2.cjs.entry.js +11 -6
- package/dist/cjs/{index.es-fc923796.js → index.es-17db3b89.js} +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{mapViewUtils-efc49df7.js → mapViewUtils-77a1ff88.js} +48 -6
- package/dist/cjs/public-notification.cjs.entry.js +3 -3
- package/dist/cjs/{publicNotificationStore-cd1a32c3.js → publicNotificationStore-ec1bdd2d.js} +5 -1
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/components/card-manager/card-manager.js +8 -8
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.css +2 -2
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +1 -1
- package/dist/collection/components/edit-card/edit-card.css +1 -1
- package/dist/collection/components/edit-card/edit-card.js +7 -1
- package/dist/collection/components/info-card/info-card.js +4 -5
- package/dist/collection/components/layer-table/layer-table.js +34 -27
- package/dist/collection/components/map-layer-picker/map-layer-picker.js +110 -54
- package/dist/collection/components/map-select-tools/map-select-tools.js +5 -5
- package/dist/collection/components/refine-selection/refine-selection.js +3 -3
- package/dist/collection/demos/crowdsource-manager.html +31 -16
- package/dist/collection/utils/downloadUtils.js +2 -1
- package/dist/collection/utils/downloadUtils.ts +1 -1
- package/dist/collection/utils/interfaces.ts +6 -5
- package/dist/collection/utils/mapViewUtils.js +44 -5
- package/dist/collection/utils/mapViewUtils.ts +52 -7
- package/dist/collection/utils/publicNotificationStore.js +5 -1
- package/dist/collection/utils/publicNotificationStore.ts +5 -1
- package/dist/components/card-manager2.js +5 -5
- package/dist/components/crowdsource-manager.js +2 -2
- package/dist/components/downloadUtils.js +2 -1
- package/dist/components/edit-card2.js +7 -1
- package/dist/components/info-card2.js +4 -5
- package/dist/components/layer-table2.js +33 -26
- package/dist/components/map-layer-picker2.js +78 -54
- package/dist/components/map-select-tools2.js +5 -5
- package/dist/components/mapViewUtils.js +45 -6
- package/dist/components/publicNotificationStore.js +5 -1
- package/dist/components/refine-selection2.js +3 -3
- package/dist/esm/buffer-tools_4.entry.js +1 -1
- package/dist/esm/calcite-combobox_6.entry.js +74 -52
- package/dist/esm/calcite-input-text_4.entry.js +9 -9
- package/dist/esm/card-manager_3.entry.js +36 -29
- package/dist/esm/crowdsource-manager.entry.js +2 -2
- package/dist/esm/{downloadUtils-1092cb0f.js → downloadUtils-3b5f85d9.js} +4 -3
- package/dist/esm/edit-card_2.entry.js +11 -6
- package/dist/esm/{index.es-08a48fdd.js → index.es-bb9196f6.js} +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{mapViewUtils-a787c6a8.js → mapViewUtils-55ea1e10.js} +45 -6
- package/dist/esm/public-notification.entry.js +3 -3
- package/dist/esm/{publicNotificationStore-c36d95bf.js → publicNotificationStore-6ef555f3.js} +5 -1
- package/dist/esm/solutions-components.js +1 -1
- package/dist/solutions-components/demos/crowdsource-manager.html +31 -16
- package/dist/solutions-components/{p-841a5f97.entry.js → p-03179924.entry.js} +1 -1
- package/dist/solutions-components/{p-a29ba58a.js → p-477ae127.js} +2 -2
- package/dist/solutions-components/p-4af3f843.js +36 -0
- package/dist/solutions-components/{p-5b260e5f.js → p-6015e2ee.js} +1 -1
- package/dist/solutions-components/{p-ad60a547.js → p-9807924d.js} +3 -3
- package/dist/solutions-components/{p-781480c2.entry.js → p-a56f965e.entry.js} +1 -1
- package/dist/solutions-components/{p-5a6ca63b.entry.js → p-cdc0bb97.entry.js} +6 -6
- package/dist/solutions-components/{p-6305f474.entry.js → p-d3fd28e9.entry.js} +1 -1
- package/dist/solutions-components/p-d83da8a0.entry.js +11 -0
- package/dist/solutions-components/p-d875f38c.entry.js +6 -0
- package/dist/solutions-components/p-ef235c88.entry.js +6 -0
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/downloadUtils.ts +1 -1
- package/dist/solutions-components/utils/interfaces.ts +6 -5
- package/dist/solutions-components/utils/mapViewUtils.ts +52 -7
- package/dist/solutions-components/utils/publicNotificationStore.ts +5 -1
- package/dist/types/components/card-manager/card-manager.d.ts +2 -2
- package/dist/types/components/edit-card/edit-card.d.ts +6 -2
- package/dist/types/components/layer-table/layer-table.d.ts +4 -4
- package/dist/types/components/map-layer-picker/map-layer-picker.d.ts +34 -19
- package/dist/types/components.d.ts +22 -6
- package/dist/types/utils/interfaces.d.ts +4 -3
- package/dist/types/utils/mapViewUtils.d.ts +22 -5
- package/dist/types/utils/publicNotificationStore.d.ts +2 -0
- package/package.json +1 -1
- package/dist/solutions-components/p-0641aa9b.js +0 -36
- package/dist/solutions-components/p-74a2d025.entry.js +0 -6
- package/dist/solutions-components/p-a62c1b3c.entry.js +0 -6
- package/dist/solutions-components/p-ccf5c0ff.entry.js +0 -11
@@ -26,6 +26,11 @@ export declare class MapLayerPicker {
|
|
26
26
|
* If empty all layers will be available
|
27
27
|
*/
|
28
28
|
enabledLayerIds: string[];
|
29
|
+
/**
|
30
|
+
* string[]: Optional list of enabled table ids
|
31
|
+
* If empty all tables will be available
|
32
|
+
*/
|
33
|
+
enabledTableIds: string[];
|
29
34
|
/**
|
30
35
|
* esri/views/View: https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html
|
31
36
|
*/
|
@@ -37,23 +42,27 @@ export declare class MapLayerPicker {
|
|
37
42
|
/**
|
38
43
|
* string[]: list of layer ids that have been selected by the end user
|
39
44
|
*/
|
40
|
-
|
45
|
+
selectedIds: string[];
|
41
46
|
/**
|
42
47
|
* "s" | "m" | "l": scale to render the component
|
43
48
|
*/
|
44
49
|
scale: "s" | "m" | "l";
|
50
|
+
/**
|
51
|
+
* boolean: when true standalone tables will also be available
|
52
|
+
*/
|
53
|
+
showTables: boolean;
|
45
54
|
/**
|
46
55
|
* "select" | "combobox" | "dropdown": type of component to leverage
|
47
56
|
*/
|
48
57
|
type: "select" | "combobox" | "dropdown";
|
49
58
|
/**
|
50
|
-
* string[]: list of layer ids from the map
|
59
|
+
* string[]: list of layer and table (if showTables is true) ids from the map
|
51
60
|
*/
|
52
|
-
|
61
|
+
ids: string[];
|
53
62
|
/**
|
54
63
|
* string: lcurrent layer name to display when using "dropdown" type
|
55
64
|
*/
|
56
|
-
|
65
|
+
selectedName: string;
|
57
66
|
/**
|
58
67
|
* HTMLCalciteSelectElement: The html element for selecting layers
|
59
68
|
*/
|
@@ -103,27 +112,21 @@ export declare class MapLayerPicker {
|
|
103
112
|
*/
|
104
113
|
_getDropdown(): VNode;
|
105
114
|
/**
|
106
|
-
*
|
115
|
+
* Get the appropriate type of dom nodes for each valid layer or table
|
107
116
|
*
|
108
|
-
* @returns Array of
|
109
|
-
*/
|
110
|
-
_getDropdownItems(): VNode[];
|
111
|
-
/**
|
112
|
-
* Store the layer name based on the user selection
|
117
|
+
* @returns Array of dom nodes with the names of the layers and optionally of the tables
|
113
118
|
*/
|
114
|
-
|
119
|
+
_getMapLayerOptions(): VNode[];
|
115
120
|
/**
|
116
|
-
*
|
121
|
+
* Get the appropriate type of dom node for the current layer or table id
|
117
122
|
*
|
118
|
-
* @returns
|
123
|
+
* @returns A dom node with the name of the layer or table
|
119
124
|
*/
|
120
|
-
|
125
|
+
_getItem(id: string, itemType: "layer" | "table"): VNode;
|
121
126
|
/**
|
122
|
-
*
|
123
|
-
*
|
124
|
-
* @returns Array of ComboBox items for the ids of the layers
|
127
|
+
* Store the layer name based on the user selection
|
125
128
|
*/
|
126
|
-
|
129
|
+
_setSelectedLayer(id: string, type: "layer" | "table"): void;
|
127
130
|
/**
|
128
131
|
* Fetch the ids of the layers from the map
|
129
132
|
*
|
@@ -135,7 +138,19 @@ export declare class MapLayerPicker {
|
|
135
138
|
*
|
136
139
|
* @returns Promise when the operation has completed
|
137
140
|
*/
|
138
|
-
protected
|
141
|
+
protected _initStateHash(): Promise<void>;
|
142
|
+
/**
|
143
|
+
* Evaluate if the id exists in the current hash and verify if it should be excluded
|
144
|
+
*
|
145
|
+
* @returns boolean when true the layer will be used in the current layer picker type
|
146
|
+
*/
|
147
|
+
protected _validLayer(id: string): boolean;
|
148
|
+
/**
|
149
|
+
* Evaluate if the id exists in the current hash and verify if it should be excluded
|
150
|
+
*
|
151
|
+
* @returns boolean when true the table will be used in the current layer picker type
|
152
|
+
*/
|
153
|
+
protected _validTable(id: string): boolean;
|
139
154
|
/**
|
140
155
|
* Fetch the ids of the layers from the map
|
141
156
|
*
|
@@ -45,9 +45,9 @@ export namespace Components {
|
|
45
45
|
}
|
46
46
|
interface CardManager {
|
47
47
|
/**
|
48
|
-
* esri/views/layers/
|
48
|
+
* esri/views/layers/FeatureLayer: https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html
|
49
49
|
*/
|
50
|
-
"
|
50
|
+
"layer": __esri.FeatureLayer;
|
51
51
|
/**
|
52
52
|
* esri/views/MapView: https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html
|
53
53
|
*/
|
@@ -222,6 +222,10 @@ export namespace Components {
|
|
222
222
|
* string[]: Optional list of enabled layer ids If empty all layers will be available
|
223
223
|
*/
|
224
224
|
"enabledLayerIds": string[];
|
225
|
+
/**
|
226
|
+
* string[]: Optional list of enabled table ids If empty all tables will be available
|
227
|
+
*/
|
228
|
+
"enabledTableIds": string[];
|
225
229
|
/**
|
226
230
|
* esri/views/View: https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html
|
227
231
|
*/
|
@@ -237,7 +241,11 @@ export namespace Components {
|
|
237
241
|
/**
|
238
242
|
* string[]: list of layer ids that have been selected by the end user
|
239
243
|
*/
|
240
|
-
"
|
244
|
+
"selectedIds": string[];
|
245
|
+
/**
|
246
|
+
* boolean: when true standalone tables will also be available
|
247
|
+
*/
|
248
|
+
"showTables": boolean;
|
241
249
|
/**
|
242
250
|
* "select" | "combobox" | "dropdown": type of component to leverage
|
243
251
|
*/
|
@@ -969,9 +977,9 @@ declare namespace LocalJSX {
|
|
969
977
|
}
|
970
978
|
interface CardManager {
|
971
979
|
/**
|
972
|
-
* esri/views/layers/
|
980
|
+
* esri/views/layers/FeatureLayer: https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html
|
973
981
|
*/
|
974
|
-
"
|
982
|
+
"layer"?: __esri.FeatureLayer;
|
975
983
|
/**
|
976
984
|
* esri/views/MapView: https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html
|
977
985
|
*/
|
@@ -1138,6 +1146,10 @@ declare namespace LocalJSX {
|
|
1138
1146
|
* string[]: Optional list of enabled layer ids If empty all layers will be available
|
1139
1147
|
*/
|
1140
1148
|
"enabledLayerIds"?: string[];
|
1149
|
+
/**
|
1150
|
+
* string[]: Optional list of enabled table ids If empty all tables will be available
|
1151
|
+
*/
|
1152
|
+
"enabledTableIds"?: string[];
|
1141
1153
|
/**
|
1142
1154
|
* esri/views/View: https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html
|
1143
1155
|
*/
|
@@ -1157,7 +1169,11 @@ declare namespace LocalJSX {
|
|
1157
1169
|
/**
|
1158
1170
|
* string[]: list of layer ids that have been selected by the end user
|
1159
1171
|
*/
|
1160
|
-
"
|
1172
|
+
"selectedIds"?: string[];
|
1173
|
+
/**
|
1174
|
+
* boolean: when true standalone tables will also be available
|
1175
|
+
*/
|
1176
|
+
"showTables"?: boolean;
|
1161
1177
|
/**
|
1162
1178
|
* "select" | "combobox" | "dropdown": type of component to leverage
|
1163
1179
|
*/
|
@@ -139,9 +139,9 @@ export interface IValueChange {
|
|
139
139
|
newValue: number | string;
|
140
140
|
}
|
141
141
|
/**
|
142
|
-
* Layer id and title key value pair
|
142
|
+
* Layer or table id and title key value pair
|
143
143
|
*/
|
144
|
-
export interface
|
144
|
+
export interface IMapItemHash {
|
145
145
|
[key: string]: string;
|
146
146
|
}
|
147
147
|
/**
|
@@ -392,6 +392,7 @@ export interface IExportInfos {
|
|
392
392
|
}
|
393
393
|
export interface IExportInfo {
|
394
394
|
ids: number[];
|
395
|
-
|
395
|
+
layer?: __esri.FeatureLayer;
|
396
|
+
layerView?: __esri.FeatureLayerView;
|
396
397
|
selectionSetNames: string[];
|
397
398
|
}
|
@@ -14,7 +14,7 @@
|
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
16
|
/// <reference types="arcgis-js-api" />
|
17
|
-
import {
|
17
|
+
import { IMapItemHash, ISelectionSet } from "./interfaces";
|
18
18
|
/**
|
19
19
|
* Gets the layer names from the current map
|
20
20
|
*
|
@@ -23,7 +23,16 @@ import { ILayerHash, ISelectionSet } from "./interfaces";
|
|
23
23
|
* @returns Promise resolving with an array of layer names
|
24
24
|
*
|
25
25
|
*/
|
26
|
-
export declare function getMapLayerHash(mapView: __esri.MapView): Promise<
|
26
|
+
export declare function getMapLayerHash(mapView: __esri.MapView): Promise<IMapItemHash>;
|
27
|
+
/**
|
28
|
+
* Gets the table names from the current map
|
29
|
+
*
|
30
|
+
* @param mapView the map view to fetch the table names from
|
31
|
+
*
|
32
|
+
* @returns Promise resolving with an array of table names
|
33
|
+
*
|
34
|
+
*/
|
35
|
+
export declare function getMapTableHash(mapView: __esri.MapView): Promise<IMapItemHash>;
|
27
36
|
/**
|
28
37
|
* Gets the layer names from the current map
|
29
38
|
*
|
@@ -33,6 +42,15 @@ export declare function getMapLayerHash(mapView: __esri.MapView): Promise<ILayer
|
|
33
42
|
*
|
34
43
|
*/
|
35
44
|
export declare function getMapLayerIds(mapView: __esri.MapView): Promise<string[]>;
|
45
|
+
/**
|
46
|
+
* Gets the table names from the current map
|
47
|
+
*
|
48
|
+
* @param mapView the map view to fetch the table names from
|
49
|
+
*
|
50
|
+
* @returns Promise resolving with an array of table names
|
51
|
+
*
|
52
|
+
*/
|
53
|
+
export declare function getMapTableIds(mapView: __esri.MapView): Promise<string[]>;
|
36
54
|
/**
|
37
55
|
* Get a layer view by id
|
38
56
|
*
|
@@ -42,7 +60,7 @@ export declare function getMapLayerIds(mapView: __esri.MapView): Promise<string[
|
|
42
60
|
* @returns Promise resolving with the fetched layer view
|
43
61
|
*
|
44
62
|
*/
|
45
|
-
export declare function
|
63
|
+
export declare function getFeatureLayerView(mapView: __esri.MapView, id: string): Promise<__esri.FeatureLayerView>;
|
46
64
|
/**
|
47
65
|
* Get a layer by id
|
48
66
|
*
|
@@ -52,7 +70,7 @@ export declare function getMapLayerView(mapView: __esri.MapView, id: string): Pr
|
|
52
70
|
* @returns Promise resolving with the fetched layer
|
53
71
|
*
|
54
72
|
*/
|
55
|
-
export declare function
|
73
|
+
export declare function getLayer(mapView: __esri.MapView, id: string): Promise<__esri.FeatureLayer>;
|
56
74
|
/**
|
57
75
|
* Highlight features by OID
|
58
76
|
*
|
@@ -62,7 +80,6 @@ export declare function getMapLayer(mapView: __esri.MapView, id: string): Promis
|
|
62
80
|
* @param updateExtent optional (default false) boolean to indicate if we should zoom to the extent
|
63
81
|
*
|
64
82
|
* @returns Promise resolving with the highlight handle
|
65
|
-
*
|
66
83
|
*/
|
67
84
|
export declare function highlightFeatures(ids: number[], layerView: __esri.FeatureLayerView, mapView: __esri.MapView, updateExtent?: boolean): Promise<__esri.Handle>;
|
68
85
|
/**
|
package/package.json
CHANGED
@@ -1,36 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* Copyright 2022 Esri
|
3
|
-
* Licensed under the Apache License, Version 2.0
|
4
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
5
|
-
*/
|
6
|
-
import{c as n}from"./p-9ab03591.js";
|
7
|
-
/** @license
|
8
|
-
* Copyright 2022 Esri
|
9
|
-
*
|
10
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
-
* you may not use this file except in compliance with the License.
|
12
|
-
* You may obtain a copy of the License at
|
13
|
-
*
|
14
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
15
|
-
*
|
16
|
-
* Unless required by applicable law or agreed to in writing, software
|
17
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
-
* See the License for the specific language governing permissions and
|
20
|
-
* limitations under the License.
|
21
|
-
*/async function t(n){const t=n.createQuery();return t.where="1=1",await n.queryObjectIds(t)}async function a(n,t){let a=[];const c=n?n.map((n=>async function(n,t){const a=t.createQuery();return a.spatialRelationship="intersects",a.geometry=n,t.queryObjectIds(a)}
|
22
|
-
/** @license
|
23
|
-
* Copyright 2022 Esri
|
24
|
-
*
|
25
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
26
|
-
* you may not use this file except in compliance with the License.
|
27
|
-
* You may obtain a copy of the License at
|
28
|
-
*
|
29
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
30
|
-
*
|
31
|
-
* Unless required by applicable law or agreed to in writing, software
|
32
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
33
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
34
|
-
* See the License for the specific language governing permissions and
|
35
|
-
* limitations under the License.
|
36
|
-
*/(n,t))):[Promise.resolve()];return(await Promise.all(c)).forEach((n=>{a=[...a,...n||[]]})),a}async function c(n,t,a,s,o){const e=t.capabilities.query.maxRecordCount,i=t.createQuery();i.start=0,i.num=e,i.returnGeometry=s,i.objectIds=n.slice(0,e),o&&(i.outSpatialReference=o);const r=await t.queryFeatures(i);a=a.concat(r.features);const u=n.slice(e,n.length);return u.length>0?c(u,t,a,s,o):Promise.resolve(a)}async function s(n,t,a,c){const o=t.capabilities.query.maxRecordCount,e=t.createQuery();e.start=n,e.num=o,e.geometry=a;const i=await t.queryFeatures(e);return c[t.id]=c[t.id].concat(i.features),i.exceededTransferLimit?s(n+=o,t,a,c):Promise.resolve(c)}function o(n,t){return[...e(n,"polygon",t),...e(n,"polyline",t),...e(n,"point",t)]}function e(n,t,a){const c=(null==n?void 0:n.filter((n=>n.type===t)))||[];return c.length<=1?c:[a.union(c)]}async function i(n){let t={};return await n.when((()=>{t=n.map.allLayers.toArray().reduce(((n,t)=>("feature"===t.type&&(n[t.id]=t.title),n)),{})})),t}async function r(n){let t=[];return await n.when((()=>{t=n.map.allLayers.toArray().reduce(((n,t)=>("feature"===t.type&&n.push(t.id),n)),[])})),t}async function u(n,t){const a=await async function(n,t){let a=[];return await n.when((()=>{a=n.map.allLayers.toArray().filter((n=>n.id===t))})),a.length>0?a[0]:void 0}(n,t);return a?await n.whenLayerView(a):void 0}async function f(n,t,a,c=!1){return c&&await l(n,t,a,!1),t.highlight(n)}async function y(n){const t=w(n);return Object.keys(t).reduce(((n,a)=>{const c=t[a];return n.push(c.layerView.highlight(c.ids)),n}),[])}function w(t){return t.reduce(((t,a)=>{const c=a.layerView,s=null==c?void 0:c.layer.id;return s&&Object.keys(t).indexOf(s)>-1?t[s].ids=[...new Set([...a.selectedIds,...t[s].ids])]:s&&(t[s]={layerView:c,ids:a.selectedIds}),a.workflowType===n.REFINE&&Object.keys(a.refineInfos).forEach((n=>{const c=a.refineInfos[n];Object.keys(t).indexOf(n)>-1&&(t[n].ids=[...new Set([...c.addIds,...t[n].ids])],t[n].ids=t[n].ids.filter((n=>c.removeIds.indexOf(n)<0)))})),t}),{})}async function l(n,t,a,c=!0,s){const o=await async function(n,t){const a=t.createQuery();return a.objectIds=n,t.queryExtent(a)}(n,t.layer);await a.goTo(o.extent),c&&await async function(n,t,a){const c={objectIds:n};t.featureEffect=Object.assign(Object.assign({},a),{filter:c}),setTimeout((()=>{t.featureEffect=void 0}),1300)}(n,t,s)}export{a,o as b,u as c,s as d,w as e,y as f,l as g,f as h,r as i,t as j,i as k,c as q}
|
@@ -1,6 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* Copyright 2022 Esri
|
3
|
-
* Licensed under the Apache License, Version 2.0
|
4
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
5
|
-
*/
|
6
|
-
import{r as t,c as i,h as s,H as e,g as a}from"./p-f8be5d5f.js";import{l as o}from"./p-d7ddd3a2.js";import{g as n}from"./p-fc2277fe.js";import"./p-e1a4994d.js";const l=class{constructor(s){t(this,s),this.closeEdit=i(this,"closeEdit",7),this._shouldClose=!1,this.graphics=void 0,this.mapView=void 0,this.open=!1,this.graphicIndex=0,this._translations=void 0}graphicIndexWatchHandler(){this._initEditorWidget()}graphicsWatchHandler(){this._initEditorWidget()}mapViewWatchHandler(){this._initEditorWidget()}async componentWillLoad(){await this._initModules(),await this._getTranslations()}async componentWillRender(){var t,i;const s=document.getElementsByTagName("layer-table");if(1===s.length){const t=s[0];this.graphics=await t.getSelectedGraphics()}(null===(t=this.graphics)||void 0===t?void 0:t.length)>0&&(null===(i=this.graphics[0])||void 0===i?void 0:i.layer)&&(this._layer=this.graphics[0].layer)}render(){var t;const i=!((null===(t=this.graphics)||void 0===t?void 0:t.length)>0&&this.graphics[0]&&this.graphics[0].layer.editingEnabled);return s(e,null,s("div",{class:"position-relative"},i?s("calcite-notice",{kind:"warning",open:!0,slot:"content-top",width:"full"},s("div",{slot:"message"},this._translations.enableEditing)):void 0,s("div",{slot:"content"},s("div",{id:"feature-form",ref:t=>this._editContainer=t}))))}async _initModules(){const[t,i]=await o(["esri/widgets/Editor","esri/core/reactiveUtils"]);this.Editor=t,this.reactiveUtils=i}_initEditorWidget(){if(this.mapView&&this.graphics&&this.graphics.length>0&&this.graphics[0]){this._editor&&this._editor.destroy();const t=document.createElement("div");this._editor=new this.Editor({allowedWorkflows:"update",view:this.mapView,visibleElements:{snappingControls:!1,sketchTooltipControls:!1},container:t}),this._editHandle&&this._attachmentHandle&&(this._editHandle.remove(),this._attachmentHandle.remove()),this._attachmentHandle=this.reactiveUtils.when((()=>"adding-attachment"===this._editor.viewModel.state||"editing-attachment"===this._editor.viewModel.state),(()=>{this._shouldClose=!1})),this._editHandle=this.reactiveUtils.when((()=>"ready"===this._editor.viewModel.state),(()=>{this._shouldClose&&(this.closeEdit.emit(),this._shouldClose=!1),this.graphicIndex>-1&&this.graphics.length>0&&this.open&&!this._shouldClose&&(this._editor.startUpdateWorkflowAtFeatureEdit(this.graphics[this.graphicIndex]),this._shouldClose=!0)})),this._editContainer.appendChild(t)}}async _getTranslations(){const t=await n(this.el);this._translations=t[0]}get el(){return a(this)}static get watchers(){return{graphicIndex:["graphicIndexWatchHandler"],graphics:["graphicsWatchHandler"],mapView:["mapViewWatchHandler"]}}};l.style=":host{display:block}.padding-bottom-1{padding-bottom:1rem}.font-bold{font-weight:var(--calcite-font-weight-bold)}.font-500{font-weight:var(--calcite-font-weight-medium)}.font-italic{font-style:italic}#feature-form{--calcite-ui-background:none;padding-top:0px}.padding-sides-bottom-1{padding:0 1rem 1rem 1rem}.position-relative{position:relative}.esri-editor__prompt--danger{position:relative !important;width:100% !important;background-color:var(--calcite-ui-foreground-1) !important}";const h=class{constructor(i){t(this,i),this.graphics=void 0,this.isLoading=!1,this.mapView=void 0,this._alertOpen=!1,this._editRecordOpen=!1,this._translations=void 0}async graphicsWatchHandler(){var t;this.graphics.length>0&&(this._editEnabled=(null===(t=this.graphics[0])||void 0===t?void 0:t.layer).editingEnabled,this._features.open({features:this.graphics}))}async mapViewWatchHandler(){await this.mapView.when((async()=>{await this._initFeaturesWidget()}))}async getSelectedFeature(){return this._features.selectedFeature}async closeEdit(){this._editRecordOpen=!1}async componentWillLoad(){await this._initModules(),await this._getTranslations()}render(){var t;const i=this.isLoading||this._editRecordOpen?"display-none":"position-absolute",a=!this.isLoading&&this._editRecordOpen?"position-absolute":"display-none",o=!this.isLoading&&this._editRecordOpen?"display-none":"";return s(e,null,s("calcite-shell",null,s("calcite-loader",{class:this.isLoading?"":"display-none",label:this._translations.fetchingData}),s("div",{class:"esri-widget "+i,id:"features-node"}),s("div",{class:"padding-1-2 display-flex "+o,slot:"footer"},s("calcite-button",{appearance:"outline",iconStart:"pencil",id:"solutions-edit",onClick:()=>this._openEditRecord(),width:"full"},this._translations.edit),s("calcite-tooltip",{label:"",placement:"bottom","reference-element":"solutions-edit"},s("span",null,this._translations.edit))),s("edit-card",{class:a,graphicIndex:null===(t=this._features)||void 0===t?void 0:t.selectedFeatureIndex,graphics:this.graphics,mapView:this.mapView,open:this._editRecordOpen}),s("calcite-alert",{icon:"layer-broken",kind:"warning",label:"",onCalciteAlertClose:()=>this._alertClosed(),open:this._alertOpen,placement:"top"},s("div",{slot:"title"},this._translations.editDisabled),s("div",{slot:"message"},this._translations.enableEditing))))}async _initModules(){const[t]=await o(["esri/widgets/Features"]);this.Features=t}async _initFeaturesWidget(){this._features?this._features.view=this.mapView:this._features=new this.Features({container:"features-node",visibleElements:{actionBar:!1,closeButton:!1,heading:!1},view:this.mapView})}_alertClosed(){this._alertOpen=!1}_editRecordClosed(){this._editRecordOpen=!1}_openEditRecord(){this._editEnabled?this._editRecordOpen=!0:this._alertOpen=!0}async _getTranslations(){const t=await n(this.el);this._translations=t[0]}get el(){return a(this)}static get watchers(){return{graphics:["graphicsWatchHandler"],mapView:["mapViewWatchHandler"]}}};h.style=":host{display:block;--calcite-label-margin-bottom:0}table{border-collapse:collapse;width:100%}th,td{text-align:left;padding:8px}tr:nth-child(odd){background:var(--calcite-ui-foreground-2)}.bottom-border{padding-bottom:0.5rem;border-bottom:1px solid var(--calcite-ui-border-1)}.padding-1-2{padding:0.5rem}.padding-top-1-2{padding-top:0.5rem}.font-color-3{color:var(--calcite-ui-text-3)}.display-none{display:none}.display-flex{display:flex}.position-absolute{position:absolute;top:0;right:0;bottom:0;left:0;overflow:auto}";export{l as edit_card,h as info_card}
|
@@ -1,6 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* Copyright 2022 Esri
|
3
|
-
* Licensed under the Apache License, Version 2.0
|
4
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
5
|
-
*/
|
6
|
-
import{r as t,h as i,H as e,g as s,c as a}from"./p-f8be5d5f.js";import{g as l}from"./p-fc2277fe.js";import{q as o,c as n,i as h,j as r}from"./p-0641aa9b.js";import{l as c}from"./p-d7ddd3a2.js";import{d}from"./p-ad60a547.js";import"./p-e1a4994d.js";import"./p-9ab03591.js";const p=class{constructor(i){t(this,i),this.layerView=void 0,this.mapView=void 0,this._cardLoading=!1,this._graphics=void 0,this._translations=void 0}async featureSelectionChange(t){const i=t.detail;this._cardLoading=!0;const e=i.length>0?await o(i,this.layerView.layer,[],!1,this.mapView.spatialReference):[];this._graphics=e,this._cardLoading=!1}async layerSelectionChange(t){const i=t.detail[0];this.layerView=await n(this.mapView,i)}async componentWillLoad(){await this._getTranslations()}render(){var t,s;const a=(null===(t=this._graphics)||void 0===t?void 0:t.length)>0?"":"display-none",l=(null===(s=this._graphics)||void 0===s?void 0:s.length)>0?"display-none":"";return i(e,null,i("div",{class:"border-rounded overflow-auto"},i("calcite-shell",{class:"position-relative padding-1 "+a},i("div",null,i("info-card",{graphics:this._graphics,isLoading:this._cardLoading,mapView:this.mapView}))),i("div",{class:"padding-1 "+l},i("calcite-notice",{icon:"table",open:!0},i("div",{slot:"message"},this._translations.selectFeaturesToStart)))))}async _getTranslations(){const t=await l(this.el);this._translations=t[0]}get el(){return s(this)}};p.style=":host{display:block !important}.display-flex{display:flex}.display-none{display:none}.w-100{width:100%}.padding-bottom-1{padding-bottom:1rem}.padding-1{padding:1rem}.position-relative{position:relative}.focus-margin{margin:1px 1px 0px 1px}.overflow-auto{overflow:auto}.border-rounded{border:1px solid var(--calcite-ui-border-2);border-radius:5px}card-manager{display:block}";const b=class{constructor(i){t(this,i),this.featureSelectionChange=a(this,"featureSelectionChange",7),this._allIds=[],this.onTableNodeCreate=t=>{this._tableNode=t,this._getTable(t)},this.mapView=void 0,this._alertOpen=!1,this._fetchingData=!1,this._layerView=void 0,this._selectedIndexes=[],this._showOnlySelected=!1,this._translations=void 0}async mapViewWatchHandler(){this._fetchingData=!0;const t=await h(this.mapView);this._layerView=await n(this.mapView,t[0]),this._resetTable(),this.reactiveUtils.on((()=>this.mapView),"click",(t=>{this._mapClicked(t)})),this._fetchingData=!1}async _layerViewWatchHandler(){this._fetchingData=!0,this._resetTable(),this._fetchingData=!1}async getSelectedGraphics(){return this._selectedIndexes.length>0?await this._getGraphics(this._selectedIndexes):[]}async componentWillLoad(){await this._getTranslations(),await this._initModules()}render(){if(!this._layerView)return null;const t=this._fetchingData?"display-none":"",s=this._fetchingData?"":"display-none",a=this._alertShowAction?"":"display-none";return i(e,null,i("calcite-shell",null,this._getTableControlRow("header"),i("div",{class:"height-full width-full"},i("calcite-panel",{class:"height-full width-full"},i("calcite-loader",{class:s,label:this._translations.fetchingData,scale:"l"}),i("div",{class:t,ref:this.onTableNodeCreate}))),i("calcite-alert",{icon:this._alertIcon,kind:this._alertKind,label:"",onCalciteAlertClose:()=>this._alertClosed(),open:this._alertOpen,placement:"top"},i("div",{slot:"title"},this._alertTitle),i("div",{slot:"message"},this._alertMessage),i("calcite-link",{class:a,onClick:this._alertActionFunction,slot:"link"},this._alertActionText))))}async _initModules(){const[t,i]=await c(["esri/widgets/FeatureTable","esri/core/reactiveUtils"]);this.FeatureTable=t,this.reactiveUtils=i}_getTableControlRow(t){const e=this._selectedIndexes.length>0;return i("div",{class:"display-flex table-border height-51",slot:t},i("calcite-action-bar",{expandDisabled:!0,expanded:!0,layout:"horizontal"},i("div",{class:"border-end"},i("map-layer-picker",{appearance:"transparent",mapView:this.mapView,onLayerSelectionChange:t=>this._layerSelectionChanged(t),placeholderIcon:"layers",scale:"l",type:"dropdown"})),i("calcite-action",{appearance:"solid",disabled:!e,icon:"magnifying-glass",id:"magnifying-glass",label:this._translations.zoom,onClick:()=>this._zoom(),text:this._translations.zoom,textEnabled:!0}),i("calcite-tooltip",{label:"",placement:"bottom","reference-element":"magnifying-glass"},i("span",null,this._translations.zoom)),i("calcite-action",{appearance:"solid",icon:"filter",id:"filter",onClick:()=>this._filter(),text:this._translations.filters,"text-enabled":"true",textEnabled:!0}),i("calcite-tooltip",{label:"",placement:"bottom","reference-element":"filter"},i("span",null,this._translations.filters)),i("calcite-action",{appearance:"solid",disabled:!e,id:"trash",onClick:()=>this._delete(),text:""},i("calcite-button",{appearance:"transparent",iconStart:"trash",kind:"danger"},this._translations.delete)),i("calcite-tooltip",{label:"",placement:"bottom","reference-element":"trash"},i("span",null,this._translations.delete))),i("calcite-dropdown",null,i("calcite-action",{appearance:"solid",label:"",slot:"trigger",text:""},i("calcite-button",{appearance:"transparent",iconEnd:"chevron-down",kind:"neutral"},this._translations.more)),i("calcite-dropdown-group",{"selection-mode":"none"},i("calcite-dropdown-item",{iconStart:"list-check-all",onClick:()=>this._selectAll()},this._translations.selectAll),i("calcite-dropdown-item",{iconStart:"selected-items-filter",onClick:()=>this._showSelected()},this._showOnlySelected?this._translations.showAll:this._translations.showSelected),i("calcite-dropdown-item",{iconStart:"erase",onClick:()=>this._clearSelection()},this._translations.clearSelection),i("calcite-dropdown-item",{iconStart:"refresh",onClick:()=>this._switchSelected()},this._translations.switchSelected),i("calcite-dropdown-item",{iconStart:"refresh",onClick:()=>this._refresh()},this._translations.refresh),i("calcite-dropdown-item",{iconStart:"export",onClick:()=>{this._exportToCSV()}},this._translations.exportCSV))))}_getTable(t){var i;(null===(i=this._layerView)||void 0===i?void 0:i.layer)&&(this._table=new this.FeatureTable({layer:this._layerView.layer,view:this.mapView,highlightOnRowSelectEnabled:!0,multiSortEnabled:!1,visibleElements:{header:!1,menu:!1},container:t}),this._table.highlightIds.on("change",(()=>{this._selectedIndexes=this._table.highlightIds.toArray(),this.featureSelectionChange.emit(this._selectedIndexes)})))}_resetTable(){var t;(null===(t=this._layerView)||void 0===t?void 0:t.layer)&&this._table&&(this._table.layer=this._layerView.layer,this._editEnabled=this._layerView.layer.editingEnabled,this._table.view=this.mapView,this._table.editingEnabled=this._editEnabled,this._table.clearSelectionFilter(),this._showOnlySelected=!1)}async _mapClicked(t){const i={include:this._layerView.layer},e=await this.mapView.hitTest(t.screenPoint,i);e.results.length>0&&(e.results.forEach((t=>{const i=t.graphic.getObjectId(),e=this._table.highlightIds.indexOf(i);e>-1?this._table.highlightIds.removeAt(e):this._table.highlightIds.add(i)})),this._showOnlySelected&&this._table.filterBySelection())}_alertClosed(){this._alertOpen=!1}_selectAll(){const t=this._allIds;this._table.highlightIds.addMany(t),this._selectedIndexes=t}_showSelected(){this._showOnlySelected=!this._showOnlySelected,this._showOnlySelected?this._table.filterBySelection():this._table.clearSelectionFilter()}_clearSelection(){this._selectedIndexes=[],this._table.highlightIds.removeAll()}_filter(){alert("do whatever this button is supposed to do")}_switchSelected(){const t=[...this._selectedIndexes];this._selectedIndexes=this._allIds.reduce(((i,e,s)=>(t.indexOf(s)<0&&i.push(s),i)),[]),this._table.highlightIds.removeAll(),this._table.highlightIds.addMany(this._selectedIndexes)}async _exportToCSV(){const t={},i=this._table.highlightIds.toArray();t[this._layerView.layer.id]={selectionSetNames:[],ids:i,layerView:this._layerView},d(t,!1,!0)}_refresh(){this._table.refresh()}_zoom(){this._table.zoomToSelection()}_delete(){this._editEnabled?(this._alertIcon="trash",this._alertTitle=this._translations.deleteRows,this._alertActionText=this._translations.delete,this._alertShowAction=!0,this._alertMessage=this._translations.confirm,this._alertKind="danger",this._alertActionFunction=()=>{this._layerView.layer.applyEdits({deleteFeatures:this._table.highlightIds.toArray()}),this._alertOpen=!1}):(this._alertIcon="layer-broken",this._alertTitle=this._translations.deleteDisabled,this._alertShowAction=!1,this._alertMessage=this._translations.enableEditing,this._alertKind="warning"),this._alertOpen=!0}async _getGraphics(t){return t.length>0?o(t,this._table.layer,[],!1,this.mapView.spatialReference):[]}async _layerSelectionChanged(t){var i;const e=t.detail[0];e===(null===(i=this._layerView)||void 0===i?void 0:i.layer.id)&&0!==this._allIds.length||(this._fetchingData=!0,this._table.highlightIds.removeAll(),this._layerView=await n(this.mapView,e),this._allIds=await r(this._layerView.layer),this._selectedIndexes=[],this._table.layer=this._layerView.layer,this._table.render(),this._fetchingData=!1)}async _getTranslations(){const t=await l(this.el);this._translations=t[0]}get el(){return s(this)}static get watchers(){return{mapView:["mapViewWatchHandler"],_layerView:["_layerViewWatchHandler"]}}};b.style=":host{display:block}.height-full{height:100%}.width-full{width:100%}.display-flex{display:flex}.table-border{border:1px solid var(--calcite-ui-border-2)}.border-end{-webkit-border-end:1px solid var(--calcite-ui-border-2);border-inline-end:1px solid var(--calcite-ui-border-2)}.padding-5{padding:5px}.height-51{height:51px}";const m=class{constructor(i){t(this,i),this.mapChanged=a(this,"mapChanged",7),this._loadedId="",this.mapInfos=[],this.mapView=void 0,this._mapListExpanded=!1,this._translations=void 0,this._webMapInfo=void 0}_webMapInfoWatchHandler(t,i){t&&JSON.stringify(t)!==JSON.stringify(i)&&this._loadMap(t)}mapInfosWatchHandler(t,i){t&&JSON.stringify(t)!==JSON.stringify(i)&&this._loadMap(t[0])}async componentWillLoad(){await this._getTranslations(),await this._initModules()}componentDidRender(){this._loadMap(this._webMapInfo)}render(){return i(e,null,this._getToolbar(),this._getMapNameList(this._mapListExpanded),i("div",{class:"map-height",ref:t=>this._mapDiv=t}),i("map-tools",{class:"map-tools"}))}async _initModules(){const[t,i]=await c(["esri/WebMap","esri/views/MapView"]);this.WebMap=t,this.MapView=i}_getToolbar(){return i("div",{class:"display-flex"},i("calcite-action-bar",{class:"border-bottom-1 action-bar-size","expand-disabled":!0,layout:"horizontal",slot:"header"},this._getMapPicker()))}_loadMap(t){const i=null==t?void 0:t.id;if((""===i||!i)&&this.mapInfos.length>0&&(this._webMapInfo=this.mapInfos[0]),this._loadedId!==i){const t=new this.WebMap({portalItem:{id:i}});this.mapView=new this.MapView({container:this._mapDiv,map:t,resizeAlign:"top-left"}),this._loadedId=i,this.mapChanged.emit(this.mapView)}}_getMapPicker(){var t;return i("calcite-button",{alignment:"icon-end-space-between",appearance:"solid",class:"width-full height-full",iconEnd:this._mapListExpanded?"chevron-up":"chevron-down",kind:"neutral",onClick:()=>this._chooseMap(),width:"full"},null===(t=this._webMapInfo)||void 0===t?void 0:t.name)}_getMapNameList(t){return i("div",{class:t?"map-list":"display-none"},i("calcite-list",{id:"mapList"},this.mapInfos.map((t=>i("calcite-list-item",{label:t.name,onClick:()=>this._webMapSelected(t),selected:t.id===this._loadedId,value:t.id})))))}_webMapSelected(t){this._mapListExpanded=!1,this._webMapInfo=t}_chooseMap(){this._mapListExpanded=!this._mapListExpanded}async _getTranslations(){const t=await l(this.el);this._translations=t[0]}get el(){return s(this)}static get watchers(){return{_webMapInfo:["_webMapInfoWatchHandler"],mapInfos:["mapInfosWatchHandler"]}}};m.style=":host{display:block;--calcite-label-margin-bottom:0;--calcite-block-padding:0}.action-bar-size{height:51px;width:100%}.action-center{-webkit-box-align:center;-webkit-align-items:center;-ms-grid-row-align:center;align-items:center;align-content:center;justify-content:center}.border-bottom-1{border-width:0px;border-bottom-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3)}.width-1-7{width:14.28%}.width-1-6{width:16.66%}.width-full{width:100%}.height-full{height:100%}.display-flex{display:flex}.display-grid{display:inline-grid}.block-button{border-bottom:0}.block-button:hover{background-color:var(--calcite-ui-foreground-2)}.block-button:active{background-color:var(--calcite-ui-foreground-3)}.map-list{position:absolute;display:flex;flex-direction:column;overflow:hidden;animation:calcite-scrim-fade-in var(--calcite-internal-animation-timing-medium) ease-in-out;background-color:var(--calcite-scrim-background);z-index:1;width:100%;height:-moz-fit-content;height:fit-content}.map-height{height:calc(100% - 58px)}.display-none{display:none}.esri-zoom{display:none !important}.map-tools{position:absolute;top:40px;right:0px;padding:1rem}";export{p as card_manager,b as layer_table,m as map_card}
|
@@ -1,11 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* Copyright 2022 Esri
|
3
|
-
* Licensed under the Apache License, Version 2.0
|
4
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
5
|
-
*/
|
6
|
-
import{r as i,c as t,h as e,H as s,g as a}from"./p-f8be5d5f.js";import{a as n,v as l,b as o}from"./p-1aca2237.js";import{s as r,c as h,d as c,H as d}from"./p-c844e615.js";import{c as p,d as u,u as m}from"./p-41f5a5fc.js";import{c as b,d as g,g as v}from"./p-8bf81a2e.js";import{s as f,a as y,c as w}from"./p-5173b841.js";import{c as x,d as k}from"./p-0ff7b311.js";import{c as _}from"./p-99b55177.js";import{C as S}from"./p-c2d148da.js";import{u as L,c as D,d as I,s as z}from"./p-db08ef87.js";import{l as P}from"./p-d7ddd3a2.js";import{g as C,h as A,a as j,b as M,c as G,d as N,e as O,f as H}from"./p-0641aa9b.js";import{c as E,e as W,f as F}from"./p-9ab03591.js";import{s as V}from"./p-a29ba58a.js";import{a as R,g as T}from"./p-fc2277fe.js";import{d as Y,a as q}from"./p-ad60a547.js";import"./p-a738e38f.js";import"./p-d60a77a4.js";import"./p-40bdd836.js";import"./p-4ff653eb.js";import"./p-e1a4994d.js";
|
7
|
-
/*!
|
8
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
9
|
-
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
10
|
-
* v1.4.3
|
11
|
-
*/const B=class{constructor(e){i(this,e),this.calciteInternalInputTextFocus=t(this,"calciteInternalInputTextFocus",7),this.calciteInternalInputTextBlur=t(this,"calciteInternalInputTextBlur",7),this.calciteInputTextInput=t(this,"calciteInputTextInput",7),this.calciteInputTextChange=t(this,"calciteInputTextChange",7),this.previousValueOrigin="initial",this.mutationObserver=_("mutation",(()=>this.setDisabledAction())),this.userChangedValue=!1,this.keyDownHandler=i=>{this.readOnly||this.disabled||(this.isClearable&&"Escape"===i.key&&(this.clearInputTextValue(i),i.preventDefault()),"Enter"!==i.key||i.defaultPrevented||r(this)&&i.preventDefault())},this.clearInputTextValue=i=>{this.setValue({committing:!0,nativeEvent:i,origin:"user",value:""})},this.emitChangeIfUserModified=()=>{"user"===this.previousValueOrigin&&this.value!==this.previousEmittedValue&&(this.calciteInputTextChange.emit(),this.setPreviousEmittedValue(this.value))},this.inputTextBlurHandler=()=>{this.calciteInternalInputTextBlur.emit({element:this.childEl,value:this.value}),this.emitChangeIfUserModified()},this.clickHandler=i=>{if(this.disabled)return;const t=n(this.el,"action");i.target!==t&&this.setFocus()},this.inputTextFocusHandler=()=>{this.calciteInternalInputTextFocus.emit({element:this.childEl,value:this.value})},this.inputTextInputHandler=i=>{this.disabled||this.readOnly||this.setValue({nativeEvent:i,origin:"user",value:i.target.value})},this.inputTextKeyDownHandler=i=>{this.disabled||this.readOnly||"Enter"===i.key&&this.emitChangeIfUserModified()},this.hiddenInputChangeHandler=i=>{i.target.name===this.name&&this.setValue({value:i.target.value,origin:"direct"}),i.stopPropagation()},this.setChildElRef=i=>{this.childEl=i},this.setInputValue=i=>{this.childEl&&(this.childEl.value=i)},this.setPreviousEmittedValue=i=>{this.previousEmittedValue=i},this.setPreviousValue=i=>{this.previousValue=i},this.setValue=({committing:i=!1,nativeEvent:t,origin:e,previousValue:s,value:a})=>{this.setPreviousValue(null!=s?s:this.value),this.previousValueOrigin=e,this.userChangedValue="user"===e&&a!==this.value,this.value=a,"direct"===e&&(this.setInputValue(a),this.setPreviousEmittedValue(a)),t&&(this.calciteInputTextInput.emit().defaultPrevented?this.value=this.previousValue:i&&this.emitChangeIfUserModified())},this.alignment="start",this.autofocus=!1,this.clearable=!1,this.disabled=!1,this.form=void 0,this.hidden=!1,this.icon=void 0,this.iconFlipRtl=!1,this.label=void 0,this.loading=!1,this.maxLength=void 0,this.minLength=void 0,this.name=void 0,this.placeholder=void 0,this.prefixText=void 0,this.readOnly=!1,this.required=!1,this.scale="m",this.status="idle",this.autocomplete=void 0,this.inputMode="text",this.enterKeyHint=void 0,this.pattern=void 0,this.suffixText=void 0,this.editingEnabled=!1,this.value="",this.messages=void 0,this.messageOverrides=void 0,this.effectiveLocale=void 0,this.defaultMessages=void 0,this.slottedActionElDisabledInternally=!1}disabledWatcher(){this.setDisabledAction()}onMessagesChange(){}valueWatcher(i,t){this.userChangedValue||this.setValue({origin:"direct",previousValue:t,value:i||""}),this.userChangedValue=!1}updateRequestedIcon(){this.requestedIcon=l({},this.icon,"text")}get isClearable(){return this.clearable&&this.value.length>0}effectiveLocaleChange(){L(this,this.effectiveLocale)}connectedCallback(){var i;p(this),x(this),D(this),this.inlineEditableEl=this.el.closest("calcite-inline-editable"),this.inlineEditableEl&&(this.editingEnabled=this.inlineEditableEl.editingEnabled||!1),this.setPreviousEmittedValue(this.value),this.setPreviousValue(this.value),b(this),h(this),null===(i=this.mutationObserver)||void 0===i||i.observe(this.el,{childList:!0}),this.setDisabledAction(),this.el.addEventListener("calciteInternalHiddenInputChange",this.hiddenInputChangeHandler)}disconnectedCallback(){var i;u(this),g(this),c(this),k(this),I(this),null===(i=this.mutationObserver)||void 0===i||i.disconnect(),this.el.removeEventListener("calciteInternalHiddenInputChange",this.hiddenInputChangeHandler)}async componentWillLoad(){f(this),this.requestedIcon=l({},this.icon,"text"),await z(this)}componentDidLoad(){y(this)}componentDidRender(){m(this)}async setFocus(){var i;await w(this),null===(i=this.childEl)||void 0===i||i.focus()}async selectText(){var i;null===(i=this.childEl)||void 0===i||i.select()}onLabelClick(){this.setFocus()}onFormReset(){this.setValue({origin:"reset",value:this.defaultValue})}syncHiddenFormInput(i){null!=this.minLength&&(i.minLength=this.minLength),null!=this.maxLength&&(i.maxLength=this.maxLength)}setDisabledAction(){const i=n(this.el,"action");i&&(this.disabled?(null==i.getAttribute("disabled")&&(this.slottedActionElDisabledInternally=!0),i.setAttribute("disabled","")):this.slottedActionElDisabledInternally&&(i.removeAttribute("disabled"),this.slottedActionElDisabledInternally=!1))}render(){const i=o(this.el),t=e("div",{class:"loader"},e("calcite-progress",{label:this.messages.loading,type:"indeterminate"})),a=e("button",{"aria-label":this.messages.clear,class:"clear-button",disabled:this.disabled||this.readOnly,onClick:this.clearInputTextValue,tabIndex:-1,type:"button"},e("calcite-icon",{icon:"x",scale:"l"===this.scale?"m":"s"})),n=e("calcite-icon",{class:"icon",flipRtl:this.iconFlipRtl,icon:this.requestedIcon,scale:"l"===this.scale?"m":"s"}),l=e("div",{class:"prefix"},this.prefixText),r=e("div",{class:"suffix"},this.suffixText),h=e("input",{"aria-label":v(this),autocomplete:this.autocomplete,autofocus:!!this.autofocus||null,class:{"editing-enabled":this.editingEnabled,"inline-child":!!this.inlineEditableEl},defaultValue:this.defaultValue,disabled:!!this.disabled||null,enterKeyHint:this.enterKeyHint,inputMode:this.inputMode,maxLength:this.maxLength,minLength:this.minLength,name:this.name,onBlur:this.inputTextBlurHandler,onFocus:this.inputTextFocusHandler,onInput:this.inputTextInputHandler,onKeyDown:this.inputTextKeyDownHandler,pattern:this.pattern,placeholder:this.placeholder||"",readOnly:this.readOnly,required:!!this.required||null,tabIndex:this.disabled||this.inlineEditableEl&&!this.editingEnabled?-1:null,type:"text",value:this.value,ref:this.setChildElRef});return e(s,{onClick:this.clickHandler,onKeyDown:this.keyDownHandler},e("div",{class:{wrapper:!0,[S.rtl]:"rtl"===i}},this.prefixText?l:null,e("div",{class:"element-wrapper"},h,this.isClearable?a:null,this.requestedIcon?n:null,this.loading?t:null),e("div",{class:"action-wrapper"},e("slot",{name:"action"})),this.suffixText?r:null,e(d,{component:this})))}static get assetsDirs(){return["assets"]}get el(){return a(this)}static get watchers(){return{disabled:["disabledWatcher"],messageOverrides:["onMessagesChange"],value:["valueWatcher"],icon:["updateRequestedIcon"],effectiveLocale:["effectiveLocaleChange"]}}};B.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-right{0%{opacity:0;transform:translate3D(-5px, 0, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-left{0%{opacity:0;transform:translate3D(5px, 0, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-right{animation-name:in-right}.calcite-animate__in-left{animation-name:in-left}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:var(--calcite-app-z-index-dropdown)}:host([hidden]){display:none}:host([disabled]){cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:block}:host([scale=s]) input,:host([scale=s]) .prefix,:host([scale=s]) .suffix{block-size:1.5rem;padding-inline:0.5rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=s]) .action-wrapper calcite-button,:host([scale=s]) .action-wrapper calcite-button button{block-size:1.5rem}:host([scale=s]) .clear-button{min-block-size:1.5rem;min-inline-size:1.5rem}:host([scale=m]) input,:host([scale=m]) .prefix,:host([scale=m]) .suffix{block-size:2rem;padding-inline:0.75rem;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=m]) .action-wrapper calcite-button,:host([scale=m]) .action-wrapper calcite-button button{block-size:2rem}:host([scale=m]) .clear-button{min-block-size:2rem;min-inline-size:2rem}:host([scale=l]) input,:host([scale=l]) .prefix,:host([scale=l]) .suffix{block-size:2.75rem;padding-inline:1rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l]) .action-wrapper calcite-button,:host([scale=l]) .action-wrapper calcite-button button{block-size:2.75rem}:host([scale=l]) .clear-button{min-block-size:2.75rem;min-inline-size:2.75rem}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}input{transition:var(--calcite-animation-timing), block-size 0, outline-offset 0s;-webkit-appearance:none;position:relative;margin:0px;box-sizing:border-box;display:flex;max-block-size:100%;inline-size:100%;max-inline-size:100%;flex:1 1 0%;border-radius:0px;background-color:var(--calcite-ui-foreground-1);font-family:inherit;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-1)}:host input{border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-input);color:var(--calcite-ui-text-1)}:host input::placeholder,:host input:-ms-input-placeholder,:host input::-ms-input-placeholder{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-3)}:host input:focus{border-color:var(--calcite-ui-brand);color:var(--calcite-ui-text-1)}:host input[readonly]{background-color:var(--calcite-ui-background);font-weight:var(--calcite-font-weight-medium)}:host input[readonly]:focus{color:var(--calcite-ui-text-1)}:host calcite-icon{color:var(--calcite-ui-text-3)}input{outline-color:transparent}input:focus{outline:2px solid var(--calcite-ui-focus-color, var(--calcite-ui-brand));outline-offset:calc(\n -2px *\n calc(\n 1 -\n 2 * clamp(\n 0,\n var(--calcite-ui-focus-offset-invert),\n 1\n )\n )\n )}:host([status=invalid]) input{border-color:var(--calcite-ui-danger)}:host([status=invalid]) input:focus{outline:2px solid var(--calcite-ui-danger);outline-offset:calc(\n -2px *\n calc(\n 1 -\n 2 * clamp(\n 0,\n var(--calcite-ui-focus-offset-invert),\n 1\n )\n )\n )}:host([scale=s]) .icon{inset-inline-start:0.5rem}:host([scale=m]) .icon{inset-inline-start:0.75rem}:host([scale=l]) .icon{inset-inline-start:1rem}:host([icon][scale=s]) input{-webkit-padding-start:2rem;padding-inline-start:2rem}:host([icon][scale=m]) input{-webkit-padding-start:2.5rem;padding-inline-start:2.5rem}:host([icon][scale=l]) input{-webkit-padding-start:3.5rem;padding-inline-start:3.5rem}.element-wrapper{position:relative;order:3;display:inline-flex;flex:1 1 0%;align-items:center}.icon{pointer-events:none;position:absolute;z-index:var(--calcite-app-z-index);display:block;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}input[type=text]::-ms-clear,input[type=text]::-ms-reveal{display:none;block-size:0px;inline-size:0px}.clear-button{pointer-events:initial;order:4;margin:0px;box-sizing:border-box;display:flex;min-block-size:100%;cursor:pointer;align-items:center;justify-content:center;align-self:stretch;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-input);background-color:var(--calcite-ui-foreground-1);outline-color:transparent;border-inline-start-width:0px}.clear-button:hover{background-color:var(--calcite-ui-foreground-2);transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}.clear-button:hover calcite-icon{color:var(--calcite-ui-text-1);transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}.clear-button:active{background-color:var(--calcite-ui-foreground-3)}.clear-button:active calcite-icon{color:var(--calcite-ui-text-1)}.clear-button:focus{outline:2px solid var(--calcite-ui-focus-color, var(--calcite-ui-brand));outline-offset:calc(\n -2px *\n calc(\n 1 -\n 2 * clamp(\n 0,\n var(--calcite-ui-focus-offset-invert),\n 1\n )\n )\n )}.clear-button:disabled{opacity:var(--calcite-ui-opacity-disabled)}.loader{inset-block-start:1px;inset-inline:1px;pointer-events:none;position:absolute;display:block}.action-wrapper{order:7;display:flex}.prefix,.suffix{box-sizing:border-box;display:flex;block-size:auto;min-block-size:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;align-content:center;align-items:center;overflow-wrap:break-word;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-input);background-color:var(--calcite-ui-background);font-weight:var(--calcite-font-weight-medium);line-height:1;color:var(--calcite-ui-text-2)}.prefix{order:2;border-inline-end-width:0px}.suffix{order:5;border-inline-start-width:0px}:host([alignment=start]) input{text-align:start}:host([alignment=end]) input{text-align:end}.wrapper{position:relative;display:flex;flex-direction:row;align-items:center}:host(.no-bottom-border) input{border-block-end-width:0px}:host(.border-top-color-one) input{border-block-start-color:var(--calcite-ui-border-1)}.inline-child{background-color:transparent;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}.inline-child .editing-enabled{background-color:inherit}.inline-child:not(.editing-enabled){display:flex;cursor:pointer;border-color:transparent;-webkit-padding-start:0;padding-inline-start:0}::slotted(input[slot=hidden-form-input]){margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;inset:0 !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}";const $=class{constructor(e){i(this,e),this.selectionSetChange=t(this,"selectionSetChange",7),this._selectedIds=[],this._selectionLabel="",this._graphics=[],this._featuresCollection={},this.bufferColor=[227,139,79,.8],this.bufferOutlineColor=[255,255,255],this.customLabelEnabled=void 0,this.enabledLayerIds=[],this.defaultBufferDistance=void 0,this.defaultBufferUnit=void 0,this.geometries=[],this.isUpdate=!1,this.layerViews=[],this.mapView=void 0,this.noResultText=void 0,this.searchConfiguration=void 0,this.selectionSet=void 0,this.selectionLayerIds=[],this.selectLayerView=void 0,this.sketchLineSymbol=void 0,this.sketchPointSymbol=void 0,this.sketchPolygonSymbol=void 0,this._numSelected=0,this._searchDistanceEnabled=!1,this._searchTerm=void 0,this._selectionLoading=!1,this._translations=void 0,this._useLayerFeaturesEnabled=!1}async watchGeometriesHandler(i,t){if(i!==t){const t=0===i.length;if(await this._clearResults(t,t),i.length>0)return this._highlightWithOIDsOrGeoms()}}async watchSearchConfigurationHandler(i,t){JSON.stringify(i)!==JSON.stringify(t)&&this._initSearchWidget()}async clearSelection(){return this._clearResults(!0,!0)}async getSelection(){return/\S+/gm.test(this._selectionLabel)||this._updateLabel(),{id:this.isUpdate?this.selectionSet.id:Date.now(),searchResult:this._searchResult,buffer:this._bufferGeometry,distance:this._bufferTools.distance,download:!0,unit:this._bufferTools.unit,label:this._selectionLabel,selectedIds:this._selectedIds,layerView:this.selectLayerView,geometries:this.geometries,graphics:this._graphics,selectLayers:this.layerViews,skipGeomOIDs:this._skipGeomOIDs,searchDistanceEnabled:this._searchDistanceEnabled,workflowType:this._workflowType,useLayerFeaturesEnabled:this._useLayerFeaturesEnabled,sketchGraphic:this._sketchGraphic}}searchConfigurationChangeChanged(i){this.searchConfiguration=i.detail}distanceChanged(i){this._distanceChanged(i.detail)}unitChanged(i){i.detail.newValue!==i.detail.oldValue&&(this._unit=i.detail.newValue,this._updateLabel())}async componentWillLoad(){await this._getTranslations(),await this._initModules()}async componentDidLoad(){return this._init()}render(){return e(s,null,this._getMapLayerPicker(),e("div",{class:"border-bottom"}),e("div",{class:"padding-top-sides-1"},e("div",{class:"search-widget",ref:i=>{this._searchElement=i}}),e("div",{class:"padding-top-1"},e("map-draw-tools",{active:!0,editGraphicsEnabled:!this._useLayerFeaturesEnabled,graphics:this._graphics,mapView:this.mapView,onSketchGraphicsChange:i=>this._sketchGraphicsChanged(i),pointSymbol:this.sketchPointSymbol,polygonSymbol:this.sketchPolygonSymbol,polylineSymbol:this.sketchLineSymbol,ref:i=>{this._drawTools=i}})),this._getBufferOptions(),this._getUseLayerFeaturesOptions(),this._getNumSelected()),e("div",{class:"border-bottom"}),this._getNameInput())}_getBufferOptions(){var i,t;const s=this._searchDistanceEnabled?"search-distance":"div-not-visible",a="number"==typeof(null===(i=this.selectionSet)||void 0===i?void 0:i.distance)?this.selectionSet.distance:this.defaultBufferDistance;return e("div",null,e("div",{class:"padding-top-1 display-flex"},e("calcite-label",{class:"label-margin-0 w-100",layout:"inline-space-between"},e("div",{class:"tooltip-container"},this._translations.searchDistance,e("calcite-icon",{class:"padding-start-1-2 icon",icon:"question",id:"search-distance-icon",scale:"s"}))),e("calcite-popover",{closable:!0,label:"",referenceElement:"search-distance-icon"},e("span",{class:"tooltip-message"},this._translations.useSearchDistanceTootip)),e("calcite-switch",{checked:this._searchDistanceEnabled,onCalciteSwitchChange:()=>this._searchDistanceEnabled=!this._searchDistanceEnabled})),e("div",{class:s},e("buffer-tools",{disabled:!this._searchDistanceEnabled,distance:a,geometries:this.geometries,onBufferComplete:i=>this._bufferComplete(i),ref:i=>this._bufferTools=i,unit:(null===(t=this.selectionSet)||void 0===t?void 0:t.unit)||this.defaultBufferUnit})))}_getUseLayerFeaturesOptions(){const i=this._useLayerFeaturesEnabled?"div-visible":"div-not-visible";return e("div",null,e("div",{class:"padding-top-1 display-flex"},e("calcite-label",{class:"label-margin-0 w-100",layout:"inline-space-between"},e("div",{class:"tooltip-container"},this._translations.useLayerFeatures,e("calcite-icon",{class:"padding-start-1-2 icon",icon:"question",id:"use-layer-features-icon",scale:"s"}))),e("calcite-popover",{closable:!0,label:"",referenceElement:"use-layer-features-icon"},e("span",{class:"tooltip-message"},this._translations.useLayerFeaturesTooltip)),e("calcite-switch",{checked:this._useLayerFeaturesEnabled,onCalciteSwitchChange:()=>{this._useLayerFeaturesEnabledChanged()}})),e("div",{class:i+" padding-top-1"},e("map-layer-picker",{enabledLayerIds:this.selectionLayerIds,mapView:this.mapView,onLayerSelectionChange:i=>{this._layerSelectionChange(i)},selectedLayerIds:this.layerViews.map((i=>i.layer.id))})))}_getNumSelected(){const i=R(this.el),t=i&&"en"===i?`${this._translations.selectionLoading}...`:this._translations.selectionLoading;return e("div",{class:"padding-top-1 padding-bottom-1",style:{"align-items":"end",display:"flex"}},this._selectionLoading?e("div",null,e("calcite-loader",{class:"info-blue",inline:!0,label:t,scale:"m",type:"indeterminate"})):e("calcite-icon",{class:"info-blue padding-end-1-2",icon:"feature-layer",scale:"s"}),e("calcite-input-message",{class:"info-blue",scale:"m"},this._selectionLoading?t:this.noResultText&&0===this._numSelected?this.noResultText:this._translations.selectedFeatures.replace("{{n}}",this._numSelected.toString())))}_getNameInput(){return e("div",{class:"padding-sides-1 padding-top-1 "+(this.customLabelEnabled?"":"display-none")},e("calcite-label",{class:"font-bold"},this._translations.listName,e("calcite-input",{onInput:()=>{this._selectionLabel=this._labelName.value},placeholder:this._translations.listNamePlaceholder,ref:i=>{this._labelName=i},value:this._selectionLabel||""})))}_getMapLayerPicker(){return e("div",{class:"display-flex padding-sides-1 padding-bottom-1"},e("calcite-label",{class:"font-bold width-full label-margin-0"},this._translations.inputLayer,e("map-layer-picker",{enabledLayerIds:this.enabledLayerIds,mapView:this.mapView,onLayerSelectionChange:i=>this._inputLayerSelectionChange(i),selectedLayerIds:this.selectLayerView?[this.selectLayerView.layer.id]:this.selectionSet?[this.selectionSet.layerView.layer.id]:[]})))}async _initModules(){const[i,t,e,s,a]=await P(["esri/layers/GraphicsLayer","esri/Graphic","esri/widgets/Search","esri/geometry/geometryEngine","esri/layers/FeatureLayer"]);this.GraphicsLayer=i,this.Graphic=t,this.Search=e,this._geometryEngine=s,this.FeatureLayer=a}async _init(){this._initGraphicsLayer(),await this._initSelectionSet(),this._initSearchWidget()}async _initSelectionSet(){var i,t,e,s;this.selectionSet&&(this._searchTerm=null===(i=this.selectionSet.searchResult)||void 0===i?void 0:i.name,this._searchResult=this.selectionSet.searchResult,this._selectLayers=this.selectionSet.selectLayers,this._selectedIds=this.selectionSet.selectedIds,this._skipGeomOIDs=this.selectionSet.skipGeomOIDs,this._searchDistanceEnabled=this.selectionSet.searchDistanceEnabled,this._useLayerFeaturesEnabled=this.selectionSet.useLayerFeaturesEnabled,this._distance=this.selectionSet.searchDistanceEnabled?this.selectionSet.distance:0,this._unit=this.selectionSet.unit,this._workflowType=this.selectionSet.workflowType,this.selectLayerView=this.selectionSet.layerView,this._sketchGraphic=this.selectionSet.sketchGraphic,this.geometries=[...(null===(t=this.selectionSet)||void 0===t?void 0:t.geometries)||[]],this._graphics=this.geometries.map((i=>new this.Graphic({geometry:i,symbol:"point"===i.type?this.sketchPointSymbol:"polyline"===i.type?this.sketchLineSymbol:this.sketchPolygonSymbol}))),this._selectionLabel=null===(e=this.selectionSet)||void 0===e?void 0:e.label,this._useLayerFeaturesEnabled||null===(s=this._drawTools)||void 0===s||s.updateGraphics(),await C(this.selectionSet.selectedIds,this.selectionSet.layerView,this.mapView,!1))}_initSearchWidget(){if(this.mapView&&this._searchElement){const i=this._getSearchConfig(this.searchConfiguration,this.mapView),t=Object.assign({view:this.mapView,container:this._searchElement,searchTerm:this._searchTerm},i);this._searchWidget=new this.Search(t),this._searchWidget.popupEnabled=!1,this._searchWidget.resultGraphicEnabled=!1,this._searchWidget.on("search-clear",(()=>{const i=this._searchClearLabel();this._clearResults(!1,i)})),this._searchWidget.on("select-result",(i=>{var t,e;if(i.result){this._searchResult=i.result;const s=(null===(e=null===(t=i.source)||void 0===t?void 0:t.layer)||void 0===e?void 0:e.id)&&i.source.layer.id===this.selectLayerView.layer.id,a=s?[i.result.feature.getObjectId()]:void 0;this._workflowType=E.SEARCH,this._updateLabel();const n=[i.result.feature];this._updateSelection(n,s,a),this._drawTools.graphics=n,this._searchWidget.resultGraphic.visible=!1}else{const i=this._searchClearLabel();this._clearResults(!1,i)}}))}}_searchClearLabel(){var i;return(null===(i=this._searchResult)||void 0===i?void 0:i.name)&&this._labelName.value.indexOf(this._searchResult.name)>-1}_getSearchConfig(i,t){const e=null==i?void 0:i.sources;return(null==e?void 0:e.length)>0?(i.includeDefaultSources=!1,e.forEach((i=>{var e,s;if(i.hasOwnProperty("layer")){const a=i,n=null===(e=a.layer)||void 0===e?void 0:e.id,l=n?t.map.findLayerById(n):null,o=null===(s=null==a?void 0:a.layer)||void 0===s?void 0:s.url;l?a.layer=l:o&&(a.layer=new this.FeatureLayer(o))}})),null==e||e.forEach((i=>{if(i.hasOwnProperty("locator")){const t=i;"ArcGIS World Geocoding Service"===(null==t?void 0:t.name)&&(t.outFields=t.outFields||["Addr_type","Match_addr","StAddr","City"],t.singleLineFieldName="SingleLine"),t.url=t.url,delete t.url}}))):i=Object.assign(Object.assign({},i),{includeDefaultSources:!0}),i}_initGraphicsLayer(){const i=this._translations.bufferLayer,t=this.mapView.map.layers.findIndex((t=>t.title===i));if(t>-1)this._bufferGraphicsLayer=this.mapView.map.layers.getItemAt(t);else{this._bufferGraphicsLayer=new this.GraphicsLayer({title:i,listMode:"hide"}),V.managedLayers.push(i);const t=this.mapView.map.layers.findIndex((i=>i.title===this._translations.sketchLayer));t>-1?this.mapView.map.layers.add(this._bufferGraphicsLayer,t):this.mapView.map.layers.add(this._bufferGraphicsLayer)}}async _sketchGraphicsChanged(i,t=!1){const e=i.detail.graphics;if(e.length>0&&e[0])if(t||(this._sketchGraphic=e[0]),this._workflowType=this._useLayerFeaturesEnabled?E.SELECT:E.SKETCH,this._workflowType===E.SKETCH&&this._drawTools.updateGraphics(),this._updateLabel(),this._clearSearchWidget(),this._useLayerFeaturesEnabled&&!t){const i=Array.isArray(e)?e.map((i=>i.geometry)):this.geometries;await this._selectLayerFeatures(i[0])}else{const t=e.reduce(((i,t)=>{var e;return(null===(e=null==t?void 0:t.layer)||void 0===e?void 0:e.objectIdField)?i.push(t.attributes[t.layer.objectIdField]):t.getObjectId&&i.push(t.getObjectId()),i}),[]),s=i.detail.useOIDs&&t.length>0;this._updateSelection(e,s,t),s&&await this._highlightFeatures(t)}else await this._clearResults(!0,!0)}async _highlightWithOIDsOrGeoms(){var i;return(null===(i=this._skipGeomOIDs)||void 0===i?void 0:i.length)>0?(this._selectedIds=this._skipGeomOIDs,this._highlightFeatures(this._selectedIds)):this._geomQuery(this.geometries)}async _highlightFeatures(i){V.removeHandles(),i.length>0&&V.highlightHandles.push(await A(i,this.selectLayerView,this.mapView)),this._numSelected=i.length,this.selectionSetChange.emit(i.length)}async _selectFeatures(i){this._selectionLoading=!0,this._selectedIds=await j(i,this.selectLayerView.layer),this._selectionLoading=!1,this._drawTools.graphics=this._graphics,await this._highlightFeatures(this._selectedIds)}async _bufferComplete(i){this._bufferGeometry=Array.isArray(i.detail)?i.detail[0]:i.detail;let t=this._bufferTools.distance,e=0;if(this._bufferGeometry){const i=new this.Graphic({geometry:this._bufferGeometry,symbol:{type:"simple-fill",color:this.bufferColor,outline:{color:this.bufferOutlineColor,width:1}}});this._bufferGraphicsLayer.removeAll(),this._bufferGraphicsLayer.add(i),await this._selectFeatures([this._bufferGeometry]),await this.mapView.goTo(i.geometry.extent),e=t,t=0}else this._bufferGraphicsLayer&&this._bufferGraphicsLayer.removeAll(),await this._highlightWithOIDsOrGeoms();this._distanceChanged({oldValue:t,newValue:e})}_geomQuery(i){const t=M(i,this._geometryEngine);return this._selectFeatures(t)}async _clearResults(i=!0,t=!1){var e;this._selectedIds=[],this._distance=void 0,this._unit=void 0,t&&(this._selectionLabel="",this._labelName.value=""),this._bufferGraphicsLayer&&this._bufferGraphicsLayer.removeAll(),i&&this._searchWidget&&this._clearSearchWidget(),V.removeHandles(),(null===(e=this._drawTools)||void 0===e?void 0:e.clear)&&(this._graphics=[],await this._drawTools.clear()),this.selectionSetChange.emit(this._selectedIds.length)}_clearSearchWidget(){this._searchWidget.clear(),this._searchResult=void 0}_updateSelection(i,t,e){this._selectedIds=t&&e?e:this._selectedIds,this._skipGeomOIDs=t?e:void 0,this.geometries=Array.isArray(i)?i.map((i=>i.geometry)):this.geometries,this._graphics=i}_updateLabel(){var i,t;const e=this._selectionLabel.indexOf(this._translations.sketch)>-1,s=this._selectionLabel.indexOf(this._translations.select)>-1,a=this._selectionLabel.indexOf(null===(i=this._searchResult)||void 0===i?void 0:i.name)>-1,n=this._workflowType===E.SEARCH?null===(t=this._searchResult)||void 0===t?void 0:t.name:this._workflowType===E.SELECT?this._translations.select:this._translations.sketch,l=this._unit?this._unit:this._bufferTools.unit,o=isNaN(this._distance)?this._bufferTools.distance:this._distance;this._selectionLabel=e||s||a||!this._selectionLabel?`${n} ${o} ${l}`:this._selectionLabel,this._labelName.value=this._selectionLabel}async _layerSelectionChange(i){if(Array.isArray(i.detail)&&i.detail.length>0){const t=i.detail.map((i=>G(this.mapView,i)));return Promise.all(t).then((i=>{this.layerViews=i,this._featuresCollection={},this._sketchGraphic&&this._sketchGraphicsChanged({detail:{graphics:[this._sketchGraphic],useOIDs:!1}})}))}}async _inputLayerSelectionChange(i){var t;const e=(null===(t=null==i?void 0:i.detail)||void 0===t?void 0:t.length)>0?i.detail[0]:"";this.selectLayerView&&e===this.selectLayerView.layer.id||(this.selectLayerView=await G(this.mapView,e),this._updateLabel(),this._bufferGeometry?await this._selectFeatures([this._bufferGeometry]):await this._highlightWithOIDsOrGeoms())}_distanceChanged(i){i.newValue!==i.oldValue&&(this._distance=i.newValue,this._updateLabel())}async _selectLayerFeatures(i){this._selectionLoading=!0;const t=this.layerViews.map((t=>(this._featuresCollection[t.layer.id]=[],N(0,t.layer,i,this._featuresCollection))));return Promise.all(t).then((async i=>{this._selectionLoading=!1;let t=[];i.forEach((i=>{Object.keys(i).forEach((e=>{t=t.concat(i[e])}))}));let e=!1;t.forEach((i=>{var t;const s=i.geometry;i.symbol="point"===s.type?this.sketchPointSymbol:"polyline"===s.type?this.sketchLineSymbol:"polygon"===s.type?this.sketchPolygonSymbol:void 0,e=(null===(t=null==i?void 0:i.layer)||void 0===t?void 0:t.hasOwnProperty("objectIdField"))||i.hasOwnProperty("getObjectId")}));const s=this.layerViews[0].layer.title===this.selectLayerView.layer.title&&e;await this._sketchGraphicsChanged({detail:{graphics:t,useOIDs:s}},!0)}))}_useLayerFeaturesEnabledChanged(){this._useLayerFeaturesEnabled=!this._useLayerFeaturesEnabled,this._sketchGraphic&&this._sketchGraphicsChanged({detail:{graphics:[this._sketchGraphic],useOIDs:!1}})}async _getTranslations(){const i=await T(this.el);this._translations=i[0]}get el(){return a(this)}static get watchers(){return{geometries:["watchGeometriesHandler"],searchConfiguration:["watchSearchConfigurationHandler"]}}};$.style=':host{display:block}.div-visible{display:inherit}.div-visible-search{display:flex;height:44px;align-items:center;padding-bottom:0}.div-not-visible{display:none}.padding-bottom-1{padding-bottom:1rem}.padding-top-1{padding-top:1rem}.search-widget{width:100% !important;border:1px solid var(--calcite-ui-border-input)}.w-100{width:100%}.w-50{width:50%}.search-distance-container{padding-top:"1rem" !important}.end-border{-webkit-border-end:1px solid var(--calcite-ui-border-2);border-inline-end:1px solid var(--calcite-ui-border-2)}.search-distance{display:flex;padding-top:1rem}.font-bold{font:bold}.border-bottom{border-bottom:1px solid var(--calcite-ui-border-2)}.tooltip-container{display:flex}.padding-start-1-2{-webkit-padding-start:0.5rem;padding-inline-start:0.5rem}.icon{--calcite-ui-icon-color:var(--calcite-ui-brand)}.tooltip-message{padding:5px 8px;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-2)}';const K=Object.freeze({__proto__:null,default:[{descriptionPDF:{labelWidthDisplay:"2-5/8",labelHeightDisplay:"1",labelsPerPageDisplay:"30",averyPartNumber:"*60"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.1875,rightMargin:.1875,topMargin:.5,bottomMargin:.5},numLabelsAcross:3,numLabelsDown:10,labelWidth:2.625,labelHeight:1,horizGapIn:.125,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:4}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"1",labelsPerPageDisplay:"20",averyPartNumber:"*61"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.47637821,bottomMargin:.5},numLabelsAcross:2,numLabelsDown:10,labelWidth:4,labelHeight:1.0025,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:4}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"1-1/3",labelsPerPageDisplay:"14",averyPartNumber:"*62"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.81889808,bottomMargin:.83464612},numLabelsAcross:2,numLabelsDown:7,labelWidth:4,labelHeight:1.3352,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:6}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"2",labelsPerPageDisplay:"10",averyPartNumber:"*63"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.5,bottomMargin:.5},numLabelsAcross:2,numLabelsDown:5,labelWidth:4,labelHeight:2,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:12,maxNumLabelLines:10}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"3-1/3",labelsPerPageDisplay:"6",averyPartNumber:"*64"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.4724412,bottomMargin:.50000027},numLabelsAcross:2,numLabelsDown:3,labelWidth:4,labelHeight:3.342,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:14,maxNumLabelLines:12}},{descriptionPDF:{labelWidthDisplay:"1-3/4",labelHeightDisplay:"1/2",labelsPerPageDisplay:"80",averyPartNumber:"*67"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.307086375,rightMargin:.307086375,topMargin:.4724412,bottomMargin:.49606326},numLabelsAcross:4,numLabelsDown:20,labelWidth:1.75,labelHeight:.50155,horizGapIn:.29527575,vertGapIn:0,labelPadding:.1,fontSizePx:8,maxNumLabelLines:3}},{descriptionPDF:{labelWidthDisplay:"1-3/4",labelHeightDisplay:"2/3",labelsPerPageDisplay:"60",averyPartNumber:"*95"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.28936983,rightMargin:.28936983,topMargin:.53937037,bottomMargin:.5511814},numLabelsAcross:4,numLabelsDown:15,labelWidth:1.75,labelHeight:.6605,horizGapIn:.30708678,vertGapIn:0,labelPadding:.1,fontSizePx:8,maxNumLabelLines:4}}]}),J=class{constructor(t){i(this,t),this.defaultNumLabelsPerPage=void 0,this.disabled=!1,this._translations=void 0}async downloadCSV(i,t,e=!0){return Y(i,!0,t,e)}async downloadPDF(i,t=!1,e="",s=""){var a;return q(i,null===(a=this._labelInfoElement.selectedOption)||void 0===a?void 0:a.value,t,e,s)}async componentWillLoad(){await this._getTranslations(),await this._initModules()}render(){return e(s,null,e("calcite-select",{disabled:this.disabled,label:"",ref:i=>{this._labelInfoElement=i}}))}componentDidRender(){this._renderOptions()}async _initModules(){const[i]=await P(["esri/intl"]);this._intl=i}_getLabelSizeText(i){const t="‎"+i.descriptionPDF.labelWidthDisplay+" x "+i.descriptionPDF.labelHeightDisplay+"‏";return this._translations.pdfLabel.replace("{{n}}",i.descriptionPDF.labelsPerPageDisplay).replace("{{labelSize}}",t)}async _getTranslations(){const i=await T(this.el);this._translations=i[0]}_renderOptions(){(K.default||K).sort(((i,t)=>{const e=parseInt(i.descriptionPDF.labelsPerPageDisplay,10),s=parseInt(t.descriptionPDF.labelsPerPageDisplay,10);return e<s?-1:e>s?1:0})).forEach(((i,t)=>{const e=document.createElement("calcite-option");e.value=i,e.innerHTML=this._getLabelSizeText(i),this._labelInfoElement.appendChild(e),(this.defaultNumLabelsPerPage?parseInt(i.descriptionPDF.labelsPerPageDisplay,10)===this.defaultNumLabelsPerPage:0===t)&&(e.selected=!0,this._labelInfoElement.selectedOption=e)}))}get el(){return a(this)}};J.style=":host{display:block}";const U=class{constructor(e){i(this,e),this.selectionLoadingChange=t(this,"selectionLoadingChange",7),this.selectionSetsChanged=t(this,"selectionSetsChanged",7),this._addEnabled=!0,this._refineSets=[],this._enabledLayerIds=[],this._featuresCollection={},this.addresseeLayer=void 0,this.enabledLayerIds=[],this.mapView=void 0,this.selectionSets=[],this.sketchLineSymbol=void 0,this.sketchPointSymbol=void 0,this.sketchPolygonSymbol=void 0,this._translations=void 0,this._selectionMode=W.ADD,this._refineLayer=void 0}async componentWillLoad(){await this._getTranslations(),this._enabledLayerIds=this._getEnabledLayerIds(),await this._setRefineSet(this._enabledLayerIds[0])}render(){var i,t;return e(s,null,e("div",{class:(this._enabledLayerIds.length>1?"display-block":"display-none")+" padding-top-sides-1"},e("div",{class:"display-flex"},e("calcite-label",{class:"font-bold width-full label-margin-0"},e("div",{class:"display-flex"},this._translations.inputLayer,e("calcite-icon",{class:"padding-start-1-2 icon",icon:"question",id:"refine-input-layer",scale:"s"})),e("map-layer-picker",{enabledLayerIds:this._enabledLayerIds,mapView:this.mapView,onLayerSelectionChange:i=>{this._layerSelectionChange(i)},ref:i=>{this._layerPicker=i},selectedLayerIds:[this._refineLayer.layer.id]})),e("calcite-popover",{closable:!0,label:"",referenceElement:"refine-input-layer"},e("span",{class:"tooltip-message"},this._translations.inputLayerTip)))),e("div",{class:"padding-1"},e("div",{class:"padding-bottom-1"},e("calcite-segmented-control",{class:"w-100"},e("calcite-segmented-control-item",{checked:this._addEnabled,class:"w-50 word-wrap-anywhere",onClick:()=>this._setSelectionMode(W.ADD),value:W.ADD},e("span",{class:"font-weight-500"},this._translations.add)),e("calcite-segmented-control-item",{checked:!this._addEnabled,class:"w-50 word-wrap-anywhere",onClick:()=>this._setSelectionMode(W.REMOVE),value:W.REMOVE},e("span",{class:"font-weight-500"},this._translations.remove)))),e("div",null,e("map-draw-tools",{active:!0,drawMode:F.REFINE,mapView:this.mapView,onDrawRedo:()=>this._redo(),onDrawUndo:()=>this._undo(),onSketchGraphicsChange:i=>this._sketchGraphicsChanged(i),pointSymbol:this.sketchPointSymbol,polygonSymbol:this.sketchPolygonSymbol,polylineSymbol:this.sketchLineSymbol,redoEnabled:(null===(i=this._refineSelectionSet)||void 0===i?void 0:i.redoStack.length)>0,ref:i=>{this._drawTools=i},undoEnabled:(null===(t=this._refineSelectionSet)||void 0===t?void 0:t.undoStack.length)>0})),e("br",null),e("calcite-list",{class:"list-border"},this._getRefineSelectionSetList())))}_layerSelectionChange(i){this._setRefineSet(i.detail[0])}_setSelectionMode(i){this._selectionMode=i}_sketchGraphicsChanged(i){var t;const e=null===(t=i.detail)||void 0===t?void 0:t.graphics[0].geometry;this._selectFeatures(e)}_getEnabledLayerIds(){return this.selectionSets.reduce(((i,t)=>{var e;const s=null===(e=null==t?void 0:t.layerView)||void 0===e?void 0:e.layer.id;return s&&i.indexOf(s)<0?i.push(s):t.workflowType===E.REFINE&&Object.keys(t.refineInfos).forEach((t=>{i.indexOf(t)<0&&i.push(t)})),i}),[])}async _setRefineSet(i){this.selectionSets.some((t=>{if(t.workflowType===E.REFINE)return this._refineSelectionSet=t,Object.keys(t.refineInfos).indexOf(i)>-1}))||await this._initRefineSet(i,this._refineSelectionSet),this._refineLayer=this._refineSelectionSet.refineInfos[i].layerView}async _initRefineSet(i,t){const e={};e[i]={addIds:[],removeIds:[],layerView:await G(this.mapView,i)},t?t.refineInfos=Object.assign(Object.assign({},t.refineInfos),e):(this._refineSelectionSet={id:Date.now(),searchResult:void 0,buffer:void 0,distance:0,download:!0,unit:"feet",label:"Refine",selectedIds:[],layerView:void 0,geometries:[],graphics:[],selectLayers:[],workflowType:E.REFINE,searchDistanceEnabled:!1,useLayerFeaturesEnabled:!1,refineInfos:e,redoStack:[],undoStack:[],sketchGraphic:void 0},this.selectionSets.push(this._refineSelectionSet))}_undo(){const i=this._refineSelectionSet.undoStack.pop();this._updateIds(i.ids,i.mode===W.ADD?W.REMOVE:W.ADD,this._refineSelectionSet.redoStack,i.layerView)}_redo(){const i=this._refineSelectionSet.redoStack.pop();this._updateIds(i.ids,i.mode===W.ADD?W.REMOVE:W.ADD,this._refineSelectionSet.undoStack,i.layerView)}_getRefineSelectionSetList(){const i=this._getTotal(this.selectionSets);let t;this.selectionSets.some((i=>{if(i.workflowType===E.REFINE)return t=i,!0}));let s=0,a=0;return Object.keys(t.refineInfos).forEach((i=>{s+=t.refineInfos[i].addIds.length,a+=t.refineInfos[i].removeIds.length})),[e("calcite-list-item",{label:this._translations.featuresAdded.replace("{{n}}",s.toString()),"non-interactive":!0}),e("calcite-list-item",{label:this._translations.featuresRemoved.replace("{{n}}",a.toString()),"non-interactive":!0}),e("calcite-list-item",{label:this._translations.totalSelected.replace("{{n}}",i.toString()),"non-interactive":!0})]}_getTotal(i){const t=O(i);return Object.keys(t).reduce(((i,e)=>i+t[e].ids.length),0)}async _getTranslations(){const i=await T(this.el);this._translations=i[0]}async _selectFeatures(i){var t,e;this.selectionLoadingChange.emit(!0),this._featuresCollection[null===(t=this._refineLayer)||void 0===t?void 0:t.layer.id]=[];const s=await N(0,null===(e=this._refineLayer)||void 0===e?void 0:e.layer,i,this._featuresCollection);this.selectionLoadingChange.emit(!1);let a=[];Object.keys(s).forEach((i=>{var t;i===(null===(t=this._refineLayer)||void 0===t?void 0:t.layer.id)&&(a=a.concat(s[i]))}));const n=Array.isArray(a)?a.map((i=>{var t;return i.attributes[null===(t=null==i?void 0:i.layer)||void 0===t?void 0:t.objectIdField]})):[];await this._updateIds(n,this._selectionMode,this._refineSelectionSet.undoStack,this._refineLayer),this._drawTools.clear()}async _highlightFeatures(){this._clearHighlight(),V.highlightHandles=await H(this.selectionSets)}_clearHighlight(){V.removeHandles()}async _updateIds(i,t,e,s){let a=!1;const n=this._refineSelectionSet.refineInfos,l=s.layer.id,o={};o[l]={addIds:[],removeIds:[],layerView:s};const r=Object.keys(n).indexOf(l)>-1?n[l]:o[l];if(t===W.ADD)r.addIds=[...new Set([...i,...r.addIds])],r.addIds.length>0&&e.push({ids:i,mode:t,layerView:s}),r.removeIds.length>0&&(r.removeIds=r.removeIds.filter((t=>i.indexOf(t)<0)));else{const n=this.selectionSets.reduce(((t,e)=>(i.forEach((i=>{e.workflowType!==E.REFINE?e.selectedIds.indexOf(i)>-1&&t.push(i):Object.keys(e.refineInfos).some((a=>{const n=e.refineInfos[a];if(n.layerView.layer.id===s.layer.id&&n.addIds.indexOf(i)>-1)return t.push(i),!0}))})),t)),[]);r.removeIds=[...new Set([...n,...r.removeIds])],r.addIds=r.addIds.filter((i=>n.indexOf(i)<0)),r.removeIds.length>0&&e.push({ids:n,mode:t,layerView:s}),this.selectionSets=this.selectionSets.reduce(((i,t)=>(t.workflowType!==E.REFINE&&t.layerView.layer.id===s.layer.id?(t.selectedIds=t.selectedIds.filter((i=>r.removeIds.indexOf(i)<0)),t.selectedIds.length>0?i.push(t):a=!0):i.push(t),i)),[])}this._refineSelectionSet.refineInfos[l]=r,this.selectionSets=[...this.selectionSets],a&&this.selectionSetsChanged.emit(this.selectionSets),await this._highlightFeatures()}get el(){return a(this)}};U.style=':host{display:block}.div-visible{display:inherit}.div-not-visible{display:none !important}.padding-top-1-2{padding-top:.5rem}.main-label{display:flex;float:left}html[dir="rtl"] .main-label{display:flex;float:right}.border{outline:1px solid var(--calcite-ui-border-input)}.margin-top-1{margin-top:1rem}.esri-sketch{display:flex;flex-flow:column wrap}.esri-widget{box-sizing:border-box;color:#323232;font-size:14px;font-family:"Avenir Next","Helvetica Neue",Helvetica,Arial,sans-serif;line-height:1.3em;background-color:var(--calcite-ui-foreground-1)}.esri-sketch__panel{align-items:center;display:flex;flex-flow:row nowrap;padding:0}*/ .esri-sketch__tool-section{border-right:1px solid rgba(110,110,110,.3)}.esri-sketch__section{align-items:center;display:flex;flex-flow:row nowrap;padding:0 7px;margin:6px 0;border-right:1px solid rgba(110,110,110,.3)}.display-flex{display:flex}.font-bold{font-weight:bold}.width-full{width:100%}.label-margin-0{--calcite-label-margin-bottom:0}.padding-start-1-2{-webkit-padding-start:0.5rem;padding-inline-start:0.5rem}.font-weight-500{font-weight:500}.word-wrap-anywhere{word-wrap:anywhere}';export{B as calcite_input_text,$ as map_select_tools,J as pdf_download,U as refine_selection}
|