@arcgis/ai-components 5.1.0-next.129 → 5.1.0-next.130
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/{PW4XPFSA.js → 72HM6DTZ.js} +2 -2
- package/dist/cdn/AZTWZFVA.js +16 -0
- package/dist/cdn/{EX6NWXUF.js → FKSLZTUY.js} +2 -2
- package/dist/cdn/{E4TOTVRI.js → RBMBKUY6.js} +2 -2
- package/dist/cdn/{7UAGCI6W.js → RJ6XMESZ.js} +35 -36
- package/dist/cdn/{EC62ZHZL.js → VWMJ7HIK.js} +9 -7
- package/dist/cdn/{MEM7FGVU.js → Y2L6M2RG.js} +10 -10
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/adapter.js +479 -484
- package/dist/chunks/arcgisKnowledgeGraph.js +1 -1
- package/dist/chunks/dataExplorationGraph.js +101 -94
- package/dist/chunks/helpGraph.js +4 -4
- package/dist/chunks/layerStylingGraph.js +10 -10
- package/dist/chunks/navigationGraph.js +27 -27
- package/dist/chunks/summarize_query_response_prompt.js +9 -7
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/package.json +4 -4
- package/dist/cdn/32S235WW.js +0 -16
package/dist/chunks/adapter.js
CHANGED
|
@@ -1,56 +1,56 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
2
|
import me from "@arcgis/core/identity/IdentityManager.js";
|
|
3
|
-
import
|
|
4
|
-
import { Annotation as b, messagesStateReducer as
|
|
5
|
-
import { n as
|
|
3
|
+
import N from "@arcgis/core/portal/Portal.js";
|
|
4
|
+
import { Annotation as b, messagesStateReducer as Te } from "@langchain/langgraph/web";
|
|
5
|
+
import { n as qe, o as x, k as B, s as v, i as Ae } from "./generateLayerDescriptions.js";
|
|
6
6
|
import "@langchain/core/messages";
|
|
7
7
|
import "@langchain/core/callbacks/dispatch/web";
|
|
8
8
|
import "@langchain/openai";
|
|
9
|
-
import * as
|
|
9
|
+
import * as De from "@arcgis/core/core/reactiveUtils.js";
|
|
10
10
|
import "@arcgis/core/layers/FeatureLayer.js";
|
|
11
11
|
import he from "@arcgis/core/request.js";
|
|
12
12
|
import "@langchain/core/prompts";
|
|
13
13
|
import { tool as y } from "@langchain/core/tools";
|
|
14
14
|
import X from "@arcgis/core/config.js";
|
|
15
|
-
import
|
|
16
|
-
import { addressToLocations as
|
|
17
|
-
import
|
|
15
|
+
import Le from "@arcgis/core/Graphic.js";
|
|
16
|
+
import { addressToLocations as Pe } from "@arcgis/core/rest/locator.js";
|
|
17
|
+
import je from "@arcgis/core/symbols/PictureMarkerSymbol.js";
|
|
18
18
|
import i, { z as E } from "zod";
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import { createRenderer as
|
|
22
|
-
import { getSchemesByTag as
|
|
19
|
+
import Ge from "@arcgis/core/geometry/Extent.js";
|
|
20
|
+
import Se from "@arcgis/core/geometry/Point.js";
|
|
21
|
+
import { createRenderer as Oe } from "@arcgis/core/smartMapping/renderers/pieChart.js";
|
|
22
|
+
import { getSchemesByTag as Me, getSchemes as Qe } from "@arcgis/core/smartMapping/symbology/pieChart.js";
|
|
23
23
|
import { getBackgroundColorTheme as ye } from "@arcgis/core/views/support/colorUtils.js";
|
|
24
|
-
import { createAgeRenderer as
|
|
24
|
+
import { createAgeRenderer as _e, createContinuousRenderer as We } from "@arcgis/core/smartMapping/renderers/color.js";
|
|
25
25
|
import { getSchemesByTag as ce } from "@arcgis/core/smartMapping/symbology/color.js";
|
|
26
|
-
import { createContinuousRenderer as
|
|
27
|
-
import { createRenderer as
|
|
28
|
-
import { getSchemesByTag as
|
|
29
|
-
import { createRenderer as
|
|
30
|
-
import { getSchemesByTag as
|
|
31
|
-
import { createRenderer as
|
|
32
|
-
import { getSchemesByTag as
|
|
33
|
-
import { createRenderer as
|
|
34
|
-
import { getSchemesByTag as
|
|
35
|
-
import { createAgeRenderer as
|
|
36
|
-
import { createRenderer as
|
|
37
|
-
import { getSchemesByTag as
|
|
38
|
-
import { ToolNode as
|
|
39
|
-
import
|
|
40
|
-
import
|
|
41
|
-
import * as
|
|
42
|
-
import { formatDateOnly as
|
|
43
|
-
import
|
|
44
|
-
import
|
|
45
|
-
import
|
|
46
|
-
import
|
|
47
|
-
import
|
|
48
|
-
import
|
|
26
|
+
import { createContinuousRenderer as Ve } from "@arcgis/core/smartMapping/renderers/univariateColorSize.js";
|
|
27
|
+
import { createRenderer as Ue } from "@arcgis/core/smartMapping/renderers/dotDensity.js";
|
|
28
|
+
import { getSchemesByTag as Ke } from "@arcgis/core/smartMapping/symbology/dotDensity.js";
|
|
29
|
+
import { createRenderer as Be } from "@arcgis/core/smartMapping/renderers/heatmap.js";
|
|
30
|
+
import { getSchemesByTag as He } from "@arcgis/core/smartMapping/symbology/heatmap.js";
|
|
31
|
+
import { createRenderer as Je } from "@arcgis/core/smartMapping/renderers/predominance.js";
|
|
32
|
+
import { getSchemesByTag as Ze } from "@arcgis/core/smartMapping/symbology/predominance.js";
|
|
33
|
+
import { createRenderer as Ye } from "@arcgis/core/smartMapping/renderers/relationship.js";
|
|
34
|
+
import { getSchemesByTag as Xe } from "@arcgis/core/smartMapping/symbology/relationship.js";
|
|
35
|
+
import { createAgeRenderer as et, createContinuousRenderer as tt } from "@arcgis/core/smartMapping/renderers/size.js";
|
|
36
|
+
import { createRenderer as rt } from "@arcgis/core/smartMapping/renderers/type.js";
|
|
37
|
+
import { getSchemesByTag as ot } from "@arcgis/core/smartMapping/symbology/type.js";
|
|
38
|
+
import { ToolNode as at } from "@langchain/langgraph/prebuilt";
|
|
39
|
+
import nt from "@arcgis/core/layers/support/FeatureEffect.js";
|
|
40
|
+
import ve from "@arcgis/core/layers/support/FeatureFilter.js";
|
|
41
|
+
import * as it from "@arcgis/core/geometry/operators/unionOperator.js";
|
|
42
|
+
import { formatDateOnly as st, convertDateFormatToIntlOptions as Q, formatTimeOnly as ct, formatDate as fe } from "@arcgis/core/intl.js";
|
|
43
|
+
import lt from "@arcgis/core/smartMapping/statistics/summaryStatistics.js";
|
|
44
|
+
import ut from "@arcgis/core/smartMapping/statistics/uniqueValues.js";
|
|
45
|
+
import dt from "@arcgis/core/rest/support/TopFeaturesQuery.js";
|
|
46
|
+
import pt from "@arcgis/core/rest/support/TopFilter.js";
|
|
47
|
+
import mt from "@arcgis/core/WebLinkChart.js";
|
|
48
|
+
import xe from "@arcgis/core/rest/knowledgeGraph/GraphQueryStreaming.js";
|
|
49
49
|
import "@arcgis/core/views/LinkChartView.js";
|
|
50
|
-
import { fetchKnowledgeGraph as ge, executeQueryStreaming as
|
|
51
|
-
import
|
|
52
|
-
const P = (e, t) => t ?? e,
|
|
53
|
-
...
|
|
50
|
+
import { fetchKnowledgeGraph as ge, executeQueryStreaming as ht, executeSearchStreaming as yt } from "@arcgis/core/rest/knowledgeGraphService.js";
|
|
51
|
+
import ft from "@arcgis/core/rest/knowledgeGraph/GraphSearchStreaming.js";
|
|
52
|
+
const P = (e, t) => t ?? e, vn = b.Root({
|
|
53
|
+
...qe(),
|
|
54
54
|
// internal to the navigation agent
|
|
55
55
|
intent: b({
|
|
56
56
|
reducer: P
|
|
@@ -69,21 +69,21 @@ const P = (e, t) => t ?? e, Sn = b.Root({
|
|
|
69
69
|
})
|
|
70
70
|
})
|
|
71
71
|
});
|
|
72
|
-
async function
|
|
73
|
-
const o =
|
|
72
|
+
async function gt(e, t) {
|
|
73
|
+
const o = N.getDefault().helperServices, a = o.geocode.find((m) => m.name === "ArcGIS World Geocoding Service") ?? o.geocode[0];
|
|
74
74
|
if (!a)
|
|
75
75
|
throw new Error("No geocoding service found in helperServices.");
|
|
76
|
-
const n = a.url, c = `${X.assetsPath?.endsWith("/") ? X.assetsPath : `${X.assetsPath}/`}esri/images/search/search-symbol-32.png`, l = (await
|
|
76
|
+
const n = a.url, c = `${X.assetsPath?.endsWith("/") ? X.assetsPath : `${X.assetsPath}/`}esri/images/search/search-symbol-32.png`, l = (await Pe(n, {
|
|
77
77
|
address: { SingleLine: e },
|
|
78
78
|
outFields: ["Match_addr"]
|
|
79
79
|
}))?.[0];
|
|
80
80
|
if (!l?.extent || !l.location)
|
|
81
81
|
throw new Error(`Could not find location for: ${e}`);
|
|
82
|
-
const u = new
|
|
82
|
+
const u = new je({
|
|
83
83
|
url: c,
|
|
84
84
|
width: 24,
|
|
85
85
|
height: 24
|
|
86
|
-
}), d = new
|
|
86
|
+
}), d = new Le({
|
|
87
87
|
geometry: l.location,
|
|
88
88
|
symbol: u
|
|
89
89
|
});
|
|
@@ -98,28 +98,28 @@ async function ft(e, t) {
|
|
|
98
98
|
sharedStatePatch: { lastResolvedLocation: { value: p } }
|
|
99
99
|
};
|
|
100
100
|
}
|
|
101
|
-
const
|
|
101
|
+
const wt = ["mapView"];
|
|
102
102
|
function $(e) {
|
|
103
103
|
const r = e?.configurable?.context;
|
|
104
104
|
if (!r || typeof r != "object")
|
|
105
105
|
throw new Error("NavigationAgent context missing");
|
|
106
|
-
const o =
|
|
106
|
+
const o = wt.filter((a) => !(a in r));
|
|
107
107
|
if (o.length)
|
|
108
108
|
throw new Error(`NavigationAgent context missing: ${o.join(", ")}`);
|
|
109
109
|
return r;
|
|
110
110
|
}
|
|
111
|
-
async function
|
|
111
|
+
async function bt({ address: e }, t) {
|
|
112
112
|
const { mapView: r } = $(t);
|
|
113
|
-
return await
|
|
113
|
+
return await gt(e, r);
|
|
114
114
|
}
|
|
115
|
-
const
|
|
115
|
+
const Tt = i.object({
|
|
116
116
|
address: i.string().describe("The full address or place name to locate.")
|
|
117
|
-
}),
|
|
117
|
+
}), xn = y(bt, {
|
|
118
118
|
name: "goToAddress",
|
|
119
119
|
description: "Geocodes an address using Esri's World Geocoding Service and zooms the map to that location.",
|
|
120
|
-
schema:
|
|
120
|
+
schema: Tt
|
|
121
121
|
});
|
|
122
|
-
async function
|
|
122
|
+
async function St(e, t) {
|
|
123
123
|
const o = t.map.bookmarks;
|
|
124
124
|
if (!o || o.length === 0)
|
|
125
125
|
throw new Error("No bookmarks found in the map.");
|
|
@@ -131,18 +131,18 @@ async function Tt(e, t) {
|
|
|
131
131
|
throw new Error(`Bookmark with name "${e}" does not have a valid viewpoint.`);
|
|
132
132
|
return await t.goTo(n), { text: `Navigated to bookmark: ${e}` };
|
|
133
133
|
}
|
|
134
|
-
async function
|
|
134
|
+
async function vt({ bookmarkName: e }, t) {
|
|
135
135
|
const { mapView: r } = $(t);
|
|
136
|
-
return await Promise.resolve(
|
|
136
|
+
return await Promise.resolve(St(e, r));
|
|
137
137
|
}
|
|
138
|
-
const
|
|
138
|
+
const xt = E.object({
|
|
139
139
|
bookmarkName: E.string().describe("The name of the bookmark to navigate to.")
|
|
140
|
-
}),
|
|
140
|
+
}), Rn = y(vt, {
|
|
141
141
|
name: "goToBookmark",
|
|
142
142
|
description: "Go to the extent of the bookmark with the given name.",
|
|
143
|
-
schema:
|
|
143
|
+
schema: xt
|
|
144
144
|
});
|
|
145
|
-
async function
|
|
145
|
+
async function Rt(e, t, r) {
|
|
146
146
|
const o = r.map?.allLayers.find((c) => c.id === e);
|
|
147
147
|
if (!o)
|
|
148
148
|
return { text: `Error: Layer with id ${e} not found` };
|
|
@@ -171,20 +171,20 @@ async function xt(e, t, r) {
|
|
|
171
171
|
return console.error("Error in goToFeatures:", c), { text: `Error: ${c instanceof Error ? c.message : "Unknown error"}`, where: a };
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
|
-
async function
|
|
174
|
+
async function $t({ layerId: e, where: t }, r) {
|
|
175
175
|
const { mapView: o } = $(r);
|
|
176
|
-
return await
|
|
176
|
+
return await Rt(e, t, o);
|
|
177
177
|
}
|
|
178
|
-
const
|
|
178
|
+
const Ct = E.object({
|
|
179
179
|
layerId: E.string().describe("The layerId of the layer to zoom to."),
|
|
180
180
|
where: E.string().describe("The sql-92 where clause used to query features to zoom to")
|
|
181
|
-
}),
|
|
181
|
+
}), $n = y($t, {
|
|
182
182
|
name: "goToFeatures",
|
|
183
183
|
description: "Go to the features that match the given filter related to the given layerId.",
|
|
184
|
-
schema:
|
|
184
|
+
schema: Ct
|
|
185
185
|
});
|
|
186
|
-
async function
|
|
187
|
-
const r = new
|
|
186
|
+
async function Et(e) {
|
|
187
|
+
const r = new Ge({
|
|
188
188
|
xmin: -180,
|
|
189
189
|
ymin: -90,
|
|
190
190
|
xmax: 180,
|
|
@@ -193,16 +193,16 @@ async function Ct(e) {
|
|
|
193
193
|
}).expand(0.7);
|
|
194
194
|
return await e.goTo(r), { text: "Successfully zoomed to world extent" };
|
|
195
195
|
}
|
|
196
|
-
async function
|
|
196
|
+
async function Ft(e, t) {
|
|
197
197
|
const { mapView: r } = $(t);
|
|
198
|
-
return await
|
|
198
|
+
return await Et(r);
|
|
199
199
|
}
|
|
200
|
-
const Nt = E.object({}),
|
|
200
|
+
const Nt = E.object({}), Cn = y(Ft, {
|
|
201
201
|
name: "goToFullExtent",
|
|
202
202
|
description: "Zooms the map to the full world extent using Esri's Geocoding Service.",
|
|
203
203
|
schema: Nt
|
|
204
204
|
});
|
|
205
|
-
async function
|
|
205
|
+
async function It(e) {
|
|
206
206
|
const r = e.map.initialViewProperties?.viewpoint?.targetGeometry;
|
|
207
207
|
if (r)
|
|
208
208
|
await e.goTo(r);
|
|
@@ -210,16 +210,16 @@ async function Ft(e) {
|
|
|
210
210
|
throw new Error("Initial extent is undefined");
|
|
211
211
|
return { text: "Successfully zoomed to home extent" };
|
|
212
212
|
}
|
|
213
|
-
async function
|
|
213
|
+
async function kt(e, t) {
|
|
214
214
|
const { mapView: r } = $(t);
|
|
215
|
-
return await
|
|
215
|
+
return await It(r);
|
|
216
216
|
}
|
|
217
|
-
const
|
|
217
|
+
const zt = i.object({}), En = y(kt, {
|
|
218
218
|
name: "goToHomeExtent",
|
|
219
219
|
description: "Go to the initial web map view extent",
|
|
220
|
-
schema:
|
|
220
|
+
schema: zt
|
|
221
221
|
});
|
|
222
|
-
async function
|
|
222
|
+
async function qt(e, t) {
|
|
223
223
|
await t.when();
|
|
224
224
|
const r = t.map?.allLayers.find((a) => a.id === e);
|
|
225
225
|
if (!r)
|
|
@@ -227,34 +227,34 @@ async function zt(e, t) {
|
|
|
227
227
|
let o;
|
|
228
228
|
return (r.type === "link-chart" || r.type === "knowledge-graph-sublayer") && t.map?.activeLinkChartLayer ? o = t.map.diagramNodesExtent : o = r.fullExtent, o ? (await t.goTo(o), r.visible = !0, { text: `Successfully zoomed to: ${r.title ?? ""}` }) : { text: "Layer has no defined extent. Cannot zoom to layer." };
|
|
229
229
|
}
|
|
230
|
-
async function
|
|
230
|
+
async function At({ layerId: e }, t) {
|
|
231
231
|
const { mapView: r } = $(t);
|
|
232
|
-
return await
|
|
232
|
+
return await qt(e, r);
|
|
233
233
|
}
|
|
234
|
-
const
|
|
234
|
+
const Dt = E.object({
|
|
235
235
|
layerId: E.string().describe("The id of the layer to navigate to")
|
|
236
|
-
}),
|
|
236
|
+
}), Fn = y(At, {
|
|
237
237
|
name: "goToLayer",
|
|
238
238
|
description: "Zooms the map view to the full extent of the top matching layer.",
|
|
239
|
-
schema:
|
|
239
|
+
schema: Dt
|
|
240
240
|
});
|
|
241
|
-
async function
|
|
241
|
+
async function Lt(e, t) {
|
|
242
242
|
return await t.goTo({ scale: e }), { text: `Successfully zoomed to: ${e}` };
|
|
243
243
|
}
|
|
244
|
-
async function
|
|
244
|
+
async function Pt({ scale: e }, t) {
|
|
245
245
|
const { mapView: r } = $(t);
|
|
246
|
-
return await
|
|
246
|
+
return await Lt(e, r);
|
|
247
247
|
}
|
|
248
|
-
const
|
|
248
|
+
const jt = i.object({
|
|
249
249
|
scale: i.number().describe("The map scale of the view to go to.")
|
|
250
|
-
}), Nn = y(
|
|
250
|
+
}), Nn = y(Pt, {
|
|
251
251
|
name: "goToScale",
|
|
252
252
|
description: "Go to the specified view scale.",
|
|
253
|
-
schema:
|
|
253
|
+
schema: jt
|
|
254
254
|
});
|
|
255
|
-
async function
|
|
255
|
+
async function Gt(e, t, r) {
|
|
256
256
|
const a = {
|
|
257
|
-
target: new
|
|
257
|
+
target: new Se({
|
|
258
258
|
longitude: e.longitude,
|
|
259
259
|
latitude: e.latitude,
|
|
260
260
|
spatialReference: { wkid: 4326 }
|
|
@@ -266,39 +266,39 @@ async function jt(e, t, r) {
|
|
|
266
266
|
r?.scale !== void 0 ? `scale 1:${r.scale}` : ""
|
|
267
267
|
].filter(Boolean).join(", ")}` };
|
|
268
268
|
}
|
|
269
|
-
async function
|
|
269
|
+
async function Ot({
|
|
270
270
|
center: e,
|
|
271
271
|
zoom: t,
|
|
272
272
|
scale: r
|
|
273
273
|
}, o) {
|
|
274
274
|
const { mapView: a } = $(o);
|
|
275
|
-
return await
|
|
275
|
+
return await Gt(e, a, { zoom: t, scale: r });
|
|
276
276
|
}
|
|
277
|
-
const
|
|
277
|
+
const Mt = i.object({
|
|
278
278
|
center: i.object({
|
|
279
279
|
longitude: i.number().describe("The longitude (x-coordinate) of the point to navigate to."),
|
|
280
280
|
latitude: i.number().describe("The latitude (y-coordinate) of the point to navigate to.")
|
|
281
281
|
}),
|
|
282
282
|
zoom: i.number().optional().describe("The zoom level. Higher values = more zoomed in."),
|
|
283
283
|
scale: i.number().optional().describe("The map scale. Alternative to zoom. Smaller numbers = more zoomed in.")
|
|
284
|
-
}),
|
|
284
|
+
}), In = y(Ot, {
|
|
285
285
|
name: "goToViewpoint",
|
|
286
286
|
description: "Go to the specified viewpoint. This can contain a combination of scale, center, zoom, etc.",
|
|
287
|
-
schema:
|
|
287
|
+
schema: Mt
|
|
288
288
|
});
|
|
289
|
-
async function
|
|
289
|
+
async function Qt(e, t) {
|
|
290
290
|
return await t.goTo({ zoom: e }), { text: `Successfully zoomed to: ${e}` };
|
|
291
291
|
}
|
|
292
|
-
async function
|
|
292
|
+
async function _t({ zoom: e }, t) {
|
|
293
293
|
const { mapView: r } = $(t);
|
|
294
|
-
return await
|
|
294
|
+
return await Qt(e, r);
|
|
295
295
|
}
|
|
296
|
-
const
|
|
296
|
+
const Wt = i.object({
|
|
297
297
|
zoom: i.number().min(1).max(20).describe("The zoom level of the view to go to.")
|
|
298
|
-
}),
|
|
298
|
+
}), kn = y(_t, {
|
|
299
299
|
name: "goToZoom",
|
|
300
300
|
description: 'Go to the specified zoom level. If input is generic (e.g. "zoom in", then only zoom to the next appropriate level - increase level for zooming in and decrease for zooming out.).',
|
|
301
|
-
schema:
|
|
301
|
+
schema: Wt
|
|
302
302
|
}), we = /* @__PURE__ */ Object.assign({
|
|
303
303
|
"../agents/arcgisKnowledge/prompts/arcgis_knowledge_current_lc_context.md": () => import("./arcgis_knowledge_current_lc_context.js").then((e) => e.default),
|
|
304
304
|
"../agents/arcgisKnowledge/prompts/arcgis_knowledge_current_map_context.md": () => import("./arcgis_knowledge_current_map_context.js").then((e) => e.default),
|
|
@@ -322,30 +322,30 @@ ${Object.keys(we).join(`
|
|
|
322
322
|
`)}`);
|
|
323
323
|
return await t[1]();
|
|
324
324
|
}
|
|
325
|
-
const
|
|
325
|
+
const Vt = (e, t = 300) => {
|
|
326
326
|
const r = e.replace(/\s+/gu, " ").replace(/[*_`#>\-]/gu, "").trim();
|
|
327
327
|
return r.length > t ? `${r.slice(0, t)}...` : r;
|
|
328
|
-
},
|
|
328
|
+
}, Re = (e, t) => {
|
|
329
329
|
const o = e?.configurable?.services?.[t];
|
|
330
330
|
if (o == null)
|
|
331
331
|
throw new Error(`${t} missing in config.configurable.services`);
|
|
332
332
|
return o;
|
|
333
|
-
},
|
|
333
|
+
}, zn = (e, t) => (r, o) => {
|
|
334
334
|
const a = o?.configurable?.services;
|
|
335
335
|
for (const n of e)
|
|
336
336
|
if (!a?.[n])
|
|
337
337
|
throw new Error(`${t} requires services.${n} to be available.`);
|
|
338
338
|
return r;
|
|
339
339
|
};
|
|
340
|
-
async function
|
|
340
|
+
async function Ut(e) {
|
|
341
341
|
const { fields: t, layer: r, view: o, styleName: a, colorSchemeTags: n } = e;
|
|
342
342
|
let c;
|
|
343
|
-
return n ? c =
|
|
343
|
+
return n ? c = Me({
|
|
344
344
|
basemapTheme: await ye(o),
|
|
345
345
|
geometryType: r.geometryType,
|
|
346
346
|
includedTags: n,
|
|
347
347
|
numColors: Math.min(t.length, 8)
|
|
348
|
-
})[0] : c =
|
|
348
|
+
})[0] : c = Qe({
|
|
349
349
|
basemapTheme: await ye(o),
|
|
350
350
|
geometryType: r.geometryType,
|
|
351
351
|
numColors: Math.min(t.length, 8)
|
|
@@ -362,10 +362,10 @@ async function Vt(e) {
|
|
|
362
362
|
pieChartScheme: c
|
|
363
363
|
};
|
|
364
364
|
}
|
|
365
|
-
async function
|
|
366
|
-
return await
|
|
365
|
+
async function Kt(e) {
|
|
366
|
+
return await Oe(e);
|
|
367
367
|
}
|
|
368
|
-
async function
|
|
368
|
+
async function Bt({
|
|
369
369
|
arcgisMap: e,
|
|
370
370
|
arcgisMapView: t,
|
|
371
371
|
layerId: r,
|
|
@@ -384,30 +384,30 @@ async function Kt({
|
|
|
384
384
|
colorSchemeTags: a
|
|
385
385
|
};
|
|
386
386
|
try {
|
|
387
|
-
const d = await
|
|
387
|
+
const d = await Ut(u), p = await Kt(d);
|
|
388
388
|
return s.renderer = p.renderer, s.visible = !0, `Chart renderer applied to layer: ${s.title ?? s.id} using fields ${o.join(", ")}`;
|
|
389
389
|
} catch (d) {
|
|
390
390
|
return `Error applying chart renderer: ${d instanceof Error ? d.message : String(d)}`;
|
|
391
391
|
}
|
|
392
392
|
}
|
|
393
|
-
const
|
|
393
|
+
const Ht = ["mapView"];
|
|
394
394
|
function R(e) {
|
|
395
395
|
const r = e?.configurable?.context;
|
|
396
396
|
if (!r || typeof r != "object")
|
|
397
397
|
throw new Error("LayerStylingAgent context missing");
|
|
398
|
-
const o =
|
|
398
|
+
const o = Ht.filter((a) => !(a in r));
|
|
399
399
|
if (o.length)
|
|
400
400
|
throw new Error(`LayerStylingAgent context missing: ${o.join(", ")}`);
|
|
401
401
|
return r;
|
|
402
402
|
}
|
|
403
|
-
async function
|
|
403
|
+
async function Jt({
|
|
404
404
|
layerId: e,
|
|
405
405
|
fields: t,
|
|
406
406
|
colorSchemes: r,
|
|
407
407
|
includeSize: o
|
|
408
408
|
}, a) {
|
|
409
409
|
const { mapView: n } = R(a);
|
|
410
|
-
return await x({ type: "show-legend", data: { layerIds: [e] } }, a), await
|
|
410
|
+
return await x({ type: "show-legend", data: { layerIds: [e] } }, a), await Bt({
|
|
411
411
|
arcgisMap: n.map,
|
|
412
412
|
arcgisMapView: n,
|
|
413
413
|
layerId: e,
|
|
@@ -416,12 +416,12 @@ async function Ht({
|
|
|
416
416
|
includeSize: o
|
|
417
417
|
});
|
|
418
418
|
}
|
|
419
|
-
const
|
|
419
|
+
const Zt = i.object({
|
|
420
420
|
layerId: i.string().describe("The id of the layer to apply the chart renderer to"),
|
|
421
421
|
fields: i.array(i.string()).describe("The fields to use for the chart renderer (multiple numeric fields)"),
|
|
422
422
|
colorSchemes: i.array(i.string()).optional().describe("Optional color scheme tags to use"),
|
|
423
423
|
includeSize: i.boolean().optional().describe("Whether to vary the chart size (chart-size)")
|
|
424
|
-
}),
|
|
424
|
+
}), qn = y(Jt, {
|
|
425
425
|
name: "chart",
|
|
426
426
|
description: `Label: Charts
|
|
427
427
|
Description: Show the values of two or more categories as a proportion of the total using a pie chart.
|
|
@@ -434,9 +434,9 @@ const Jt = i.object({
|
|
|
434
434
|
Keywords: pie, chart, all categories, breakdown, proportion, total, amount, how much, sum, graduated size, proportional size
|
|
435
435
|
Example: Show the total number of homes built in each decade using a pie chart for each feature and vary the size of each chart based on the total of all categories.
|
|
436
436
|
Fields: This style requires 2-8 number fields.`,
|
|
437
|
-
schema:
|
|
437
|
+
schema: Zt
|
|
438
438
|
});
|
|
439
|
-
function
|
|
439
|
+
function Yt(e) {
|
|
440
440
|
const { fields: t, layer: r, view: o, theme: a, colorSchemeTags: n } = e, c = t[0];
|
|
441
441
|
let s;
|
|
442
442
|
return n && (s = ce({
|
|
@@ -454,10 +454,10 @@ function Zt(e) {
|
|
|
454
454
|
colorScheme: s
|
|
455
455
|
};
|
|
456
456
|
}
|
|
457
|
-
async function
|
|
458
|
-
return await
|
|
457
|
+
async function Xt(e) {
|
|
458
|
+
return await _e(e);
|
|
459
459
|
}
|
|
460
|
-
async function
|
|
460
|
+
async function er({
|
|
461
461
|
arcgisMap: e,
|
|
462
462
|
arcgisMapView: t,
|
|
463
463
|
layerId: r,
|
|
@@ -477,20 +477,20 @@ async function Xt({
|
|
|
477
477
|
theme: n
|
|
478
478
|
};
|
|
479
479
|
try {
|
|
480
|
-
const u =
|
|
480
|
+
const u = Yt(l), d = await Xt(u);
|
|
481
481
|
return s.renderer = d.renderer, s.visible = !0, `Color-age renderer applied to layer: ${s.title ?? s.id} using fields ${o.join(", ")}`;
|
|
482
482
|
} catch (u) {
|
|
483
483
|
return `Error applying color-age renderer: ${u instanceof Error ? u.message : String(u)}`;
|
|
484
484
|
}
|
|
485
485
|
}
|
|
486
|
-
async function
|
|
486
|
+
async function tr({
|
|
487
487
|
layerId: e,
|
|
488
488
|
fields: t,
|
|
489
489
|
colorSchemes: r,
|
|
490
490
|
theme: o
|
|
491
491
|
}, a) {
|
|
492
492
|
const { mapView: n } = R(a);
|
|
493
|
-
return await x({ type: "show-legend", data: { layerIds: [e] } }, a), await
|
|
493
|
+
return await x({ type: "show-legend", data: { layerIds: [e] } }, a), await er({
|
|
494
494
|
arcgisMap: n.map,
|
|
495
495
|
arcgisMapView: n,
|
|
496
496
|
layerId: e,
|
|
@@ -499,21 +499,21 @@ async function er({
|
|
|
499
499
|
theme: o
|
|
500
500
|
});
|
|
501
501
|
}
|
|
502
|
-
const
|
|
502
|
+
const rr = i.object({
|
|
503
503
|
layerId: i.string().describe("The id of the layer to apply the color-age renderer to"),
|
|
504
504
|
fields: i.array(i.string()).describe("The field(s) to use for the color-age renderer (temporal/date data)"),
|
|
505
505
|
colorSchemes: i.array(i.string()).optional().describe("Optional color scheme tags to use"),
|
|
506
506
|
theme: i.enum(["above-and-below", "above", "below", "centered-on", "extremes", "high-to-low"]).optional().describe("Optional theme for the color ramp")
|
|
507
|
-
}),
|
|
507
|
+
}), An = y(tr, {
|
|
508
508
|
name: "color-age",
|
|
509
509
|
description: `Label: Age (color)
|
|
510
510
|
Description: Use colors along a continuous color ramp to represent the age of features. Age reflects the length of time from a start date to an end date.
|
|
511
511
|
Keywords: since, age, how old, how long
|
|
512
512
|
Example: Show the age of each feature based on its reported date.
|
|
513
513
|
Fields: This style requires at least one field with a date type.`,
|
|
514
|
-
schema:
|
|
514
|
+
schema: rr
|
|
515
515
|
});
|
|
516
|
-
function
|
|
516
|
+
function or(e) {
|
|
517
517
|
const { fields: t, layer: r, view: o, colorSchemeTags: a } = e;
|
|
518
518
|
let { theme: n } = e, c = t[1];
|
|
519
519
|
const s = t[0];
|
|
@@ -533,10 +533,10 @@ function rr(e) {
|
|
|
533
533
|
colorScheme: l
|
|
534
534
|
};
|
|
535
535
|
}
|
|
536
|
-
async function
|
|
537
|
-
return await
|
|
536
|
+
async function ar(e) {
|
|
537
|
+
return await We(e);
|
|
538
538
|
}
|
|
539
|
-
async function
|
|
539
|
+
async function nr({
|
|
540
540
|
arcgisMap: e,
|
|
541
541
|
arcgisMapView: t,
|
|
542
542
|
layerId: r,
|
|
@@ -556,20 +556,20 @@ async function ar({
|
|
|
556
556
|
theme: n
|
|
557
557
|
};
|
|
558
558
|
try {
|
|
559
|
-
const u =
|
|
559
|
+
const u = or(l), d = await ar(u);
|
|
560
560
|
return s.renderer = d.renderer, s.visible = !0, `Color renderer applied to layer: ${s.title ?? s.id} using fields ${o.join(", ")}`;
|
|
561
561
|
} catch (u) {
|
|
562
562
|
return `Error applying color renderer: ${u instanceof Error ? u.message : String(u)}`;
|
|
563
563
|
}
|
|
564
564
|
}
|
|
565
|
-
async function
|
|
565
|
+
async function ir({
|
|
566
566
|
layerId: e,
|
|
567
567
|
fields: t,
|
|
568
568
|
colorSchemes: r,
|
|
569
569
|
theme: o
|
|
570
570
|
}, a) {
|
|
571
571
|
const { mapView: n } = R(a);
|
|
572
|
-
return await x({ type: "show-legend", data: { layerIds: [e] } }, a), await
|
|
572
|
+
return await x({ type: "show-legend", data: { layerIds: [e] } }, a), await nr({
|
|
573
573
|
arcgisMap: n.map,
|
|
574
574
|
arcgisMapView: n,
|
|
575
575
|
layerId: e,
|
|
@@ -578,21 +578,21 @@ async function nr({
|
|
|
578
578
|
theme: o
|
|
579
579
|
});
|
|
580
580
|
}
|
|
581
|
-
const
|
|
581
|
+
const sr = i.object({
|
|
582
582
|
layerId: i.string().describe("The id of the layer to apply the color renderer to"),
|
|
583
583
|
fields: i.array(i.string()).describe("The field(s) to use for the color renderer"),
|
|
584
584
|
colorSchemes: i.array(i.string()).optional().describe("Optional color scheme tags to use"),
|
|
585
585
|
theme: i.enum(["above-and-below", "above", "below", "centered-on", "extremes", "high-to-low"]).optional().describe("Optional theme for the color ramp")
|
|
586
|
-
}),
|
|
586
|
+
}), Dn = y(ir, {
|
|
587
587
|
name: "color",
|
|
588
588
|
description: `Label: Counts and Amounts (color)
|
|
589
589
|
Description: Vary color along a continuous color ramp to represent numeric or ranked data.
|
|
590
590
|
Keywords: graduated color, choropleth, continuous color, hue, color, gradation, saturation, lightness, percent, rate, ratio, index, how much, increase, decrease
|
|
591
591
|
Example: Color each feature based on the population density.
|
|
592
592
|
Fields: This style requires a single field with a number type. A second number field may be specified for normalizing the value of the first field.`,
|
|
593
|
-
schema:
|
|
593
|
+
schema: sr
|
|
594
594
|
});
|
|
595
|
-
function
|
|
595
|
+
function cr(e) {
|
|
596
596
|
const { fields: t, layer: r, view: o, colorSchemeTags: a, theme: n } = e;
|
|
597
597
|
let c, s;
|
|
598
598
|
const l = t[0];
|
|
@@ -611,10 +611,10 @@ function sr(e) {
|
|
|
611
611
|
}
|
|
612
612
|
};
|
|
613
613
|
}
|
|
614
|
-
async function
|
|
615
|
-
return await
|
|
614
|
+
async function lr(e) {
|
|
615
|
+
return await Ve(e);
|
|
616
616
|
}
|
|
617
|
-
async function
|
|
617
|
+
async function ur({
|
|
618
618
|
arcgisMap: e,
|
|
619
619
|
arcgisMapView: t,
|
|
620
620
|
layerId: r,
|
|
@@ -634,20 +634,20 @@ async function lr({
|
|
|
634
634
|
theme: n
|
|
635
635
|
};
|
|
636
636
|
try {
|
|
637
|
-
const u =
|
|
637
|
+
const u = cr(l), d = await lr(u);
|
|
638
638
|
return s.renderer = d.renderer, s.visible = !0, `Color-size-univariate renderer applied to layer: ${s.title ?? s.id} using fields ${o.join(", ")}`;
|
|
639
639
|
} catch (u) {
|
|
640
640
|
return `Error applying color-size-univariate renderer: ${u instanceof Error ? u.message : String(u)}`;
|
|
641
641
|
}
|
|
642
642
|
}
|
|
643
|
-
async function
|
|
643
|
+
async function dr({
|
|
644
644
|
layerId: e,
|
|
645
645
|
fields: t,
|
|
646
646
|
colorSchemes: r,
|
|
647
647
|
theme: o
|
|
648
648
|
}, a) {
|
|
649
649
|
const { mapView: n } = R(a);
|
|
650
|
-
return await x({ type: "show-legend", data: { layerIds: [e] } }, a), await
|
|
650
|
+
return await x({ type: "show-legend", data: { layerIds: [e] } }, a), await ur({
|
|
651
651
|
arcgisMap: n.map,
|
|
652
652
|
arcgisMapView: n,
|
|
653
653
|
layerId: e,
|
|
@@ -656,24 +656,24 @@ async function ur({
|
|
|
656
656
|
theme: o
|
|
657
657
|
});
|
|
658
658
|
}
|
|
659
|
-
const
|
|
659
|
+
const pr = i.object({
|
|
660
660
|
layerId: i.string().describe("The id of the layer to apply the color-size univariate renderer to"),
|
|
661
661
|
fields: i.array(i.string()).describe("The fields to use for the color-size univariate renderer"),
|
|
662
662
|
colorSchemes: i.array(i.string()).optional().describe("Optional color scheme tags to use"),
|
|
663
663
|
theme: i.enum(["above-and-below", "above", "below", "centered-on", "extremes", "high-to-low"]).optional().describe("Optional theme for the color and size ramps")
|
|
664
|
-
}),
|
|
664
|
+
}), Ln = y(dr, {
|
|
665
665
|
name: "color-size-univariate",
|
|
666
666
|
description: `Label: Color and Size (univariate)
|
|
667
667
|
Description: Vary symbol size and color based on the values of two numeric attributes.
|
|
668
668
|
Keywords: continuous color, hue, color, size, gradation, saturation, lightness, percent, rate, ratio, index, how much, increase, decrease, amount
|
|
669
669
|
Example: Color each feature based on the percentage of the population that owns a home and vary the size of each point based on total population.
|
|
670
670
|
Fields: This style requires at least two fields: one determining the color of each feature, the other determining the size of each feature. Each field may be normalized by an additional normalization field.`,
|
|
671
|
-
schema:
|
|
671
|
+
schema: pr
|
|
672
672
|
});
|
|
673
|
-
function
|
|
673
|
+
function mr(e) {
|
|
674
674
|
const { fields: t, layer: r, view: o, colorSchemeTags: a } = e;
|
|
675
675
|
let n;
|
|
676
|
-
return a && (n =
|
|
676
|
+
return a && (n = Ke({
|
|
677
677
|
includedTags: a,
|
|
678
678
|
numColors: Math.min(t.length, 8)
|
|
679
679
|
})[0]), {
|
|
@@ -690,10 +690,10 @@ function pr(e) {
|
|
|
690
690
|
dotDensityScheme: n
|
|
691
691
|
};
|
|
692
692
|
}
|
|
693
|
-
async function
|
|
694
|
-
return await
|
|
693
|
+
async function hr(e) {
|
|
694
|
+
return await Ue(e);
|
|
695
695
|
}
|
|
696
|
-
async function
|
|
696
|
+
async function yr({
|
|
697
697
|
arcgisMap: e,
|
|
698
698
|
arcgisMapView: t,
|
|
699
699
|
layerId: r,
|
|
@@ -711,19 +711,19 @@ async function hr({
|
|
|
711
711
|
colorSchemeTags: a
|
|
712
712
|
};
|
|
713
713
|
try {
|
|
714
|
-
const l =
|
|
714
|
+
const l = mr(s), u = await hr(l);
|
|
715
715
|
return c.renderer = u.renderer, c.visible = !0, `Dot Density renderer applied to layer: ${c.title ?? c.id} using fields ${o.join(", ")}`;
|
|
716
716
|
} catch (l) {
|
|
717
717
|
return `Error applying dot density renderer: ${l instanceof Error ? l.message : String(l)}`;
|
|
718
718
|
}
|
|
719
719
|
}
|
|
720
|
-
async function
|
|
720
|
+
async function fr({
|
|
721
721
|
layerId: e,
|
|
722
722
|
fields: t,
|
|
723
723
|
colorSchemes: r
|
|
724
724
|
}, o) {
|
|
725
725
|
const { mapView: a } = R(o);
|
|
726
|
-
return await x({ type: "show-legend", data: { layerIds: [e] } }, o), await
|
|
726
|
+
return await x({ type: "show-legend", data: { layerIds: [e] } }, o), await yr({
|
|
727
727
|
arcgisMap: a.map,
|
|
728
728
|
arcgisMapView: a,
|
|
729
729
|
layerId: e,
|
|
@@ -731,11 +731,11 @@ async function yr({
|
|
|
731
731
|
colorSchemes: r
|
|
732
732
|
});
|
|
733
733
|
}
|
|
734
|
-
const
|
|
734
|
+
const gr = i.object({
|
|
735
735
|
layerId: i.string().describe("The id of the layer to apply the dot density renderer to"),
|
|
736
736
|
fields: i.array(i.string()).describe("The field(s) to use for the dot density renderer (population or count data)"),
|
|
737
737
|
colorSchemes: i.array(i.string()).optional().describe("Optional color scheme tags to use")
|
|
738
|
-
}),
|
|
738
|
+
}), Pn = y(fr, {
|
|
739
739
|
name: "dot-density",
|
|
740
740
|
description: `Dot Density
|
|
741
741
|
Use dot density to visualize the distribution of one attribute or compare the density of multiple attributes. This is only valid for polygon layers.
|
|
@@ -749,13 +749,13 @@ const fr = i.object({
|
|
|
749
749
|
- Display demographic patterns within census tracts
|
|
750
750
|
**Fields:** Requires 2-8 number fields.
|
|
751
751
|
**Keywords:** density, how much, how many, total, number, amount`,
|
|
752
|
-
schema:
|
|
752
|
+
schema: gr
|
|
753
753
|
});
|
|
754
|
-
function
|
|
754
|
+
function wr(e) {
|
|
755
755
|
const { fields: t, layer: r, view: o, colorSchemeTags: a } = e;
|
|
756
756
|
let n;
|
|
757
757
|
const c = t[0];
|
|
758
|
-
return a && (n =
|
|
758
|
+
return a && (n = He({
|
|
759
759
|
includedTags: a,
|
|
760
760
|
basemap: o.map?.basemap || "topo"
|
|
761
761
|
})[0]), {
|
|
@@ -765,10 +765,10 @@ function gr(e) {
|
|
|
765
765
|
heatmapScheme: n
|
|
766
766
|
};
|
|
767
767
|
}
|
|
768
|
-
async function
|
|
769
|
-
return await
|
|
768
|
+
async function br(e) {
|
|
769
|
+
return await Be(e);
|
|
770
770
|
}
|
|
771
|
-
async function
|
|
771
|
+
async function Tr({
|
|
772
772
|
arcgisMap: e,
|
|
773
773
|
arcgisMapView: t,
|
|
774
774
|
layerId: r,
|
|
@@ -786,19 +786,19 @@ async function br({
|
|
|
786
786
|
colorSchemeTags: a
|
|
787
787
|
};
|
|
788
788
|
try {
|
|
789
|
-
const l =
|
|
789
|
+
const l = wr(s), u = await br(l);
|
|
790
790
|
return c.renderer = u.renderer, c.visible = !0, `Heatmap renderer applied to layer: ${c.title ?? c.id} using fields ${o.join(", ")}`;
|
|
791
791
|
} catch (l) {
|
|
792
792
|
return `Error applying heatmap renderer: ${l instanceof Error ? l.message : String(l)}`;
|
|
793
793
|
}
|
|
794
794
|
}
|
|
795
|
-
async function
|
|
795
|
+
async function Sr({
|
|
796
796
|
layerId: e,
|
|
797
797
|
fields: t,
|
|
798
798
|
colorSchemes: r
|
|
799
799
|
}, o) {
|
|
800
800
|
const { mapView: a } = R(o);
|
|
801
|
-
return await x({ type: "show-legend", data: { layerIds: [e] } }, o), await
|
|
801
|
+
return await x({ type: "show-legend", data: { layerIds: [e] } }, o), await Tr({
|
|
802
802
|
arcgisMap: a.map,
|
|
803
803
|
arcgisMapView: a,
|
|
804
804
|
layerId: e,
|
|
@@ -806,23 +806,23 @@ async function Tr({
|
|
|
806
806
|
colorSchemes: r
|
|
807
807
|
});
|
|
808
808
|
}
|
|
809
|
-
const
|
|
809
|
+
const vr = i.object({
|
|
810
810
|
layerId: i.string().describe("The id of the layer to apply the heatmap renderer to"),
|
|
811
811
|
fields: i.array(i.string()).describe("The field(s) to use for the heatmap renderer (typically point density)"),
|
|
812
812
|
colorSchemes: i.array(i.string()).optional().describe("Optional color scheme tags to use")
|
|
813
|
-
}),
|
|
813
|
+
}), jn = y(Sr, {
|
|
814
814
|
name: "heatmap",
|
|
815
815
|
description: `Label: Heat Map
|
|
816
816
|
Description: Show areas of high density with colors that appear to glow hotter. This is only valid for point layers.
|
|
817
817
|
Keywords: density, heatmap, hot spots, pattern, cluster
|
|
818
818
|
Example: Create a heatmap
|
|
819
819
|
Fields: This typically requires zero or one field of type number.`,
|
|
820
|
-
schema:
|
|
820
|
+
schema: vr
|
|
821
821
|
});
|
|
822
|
-
function
|
|
822
|
+
function xr(e) {
|
|
823
823
|
const { fields: t, layer: r, view: o, styleName: a, colorSchemeTags: n } = e;
|
|
824
824
|
let c;
|
|
825
|
-
return n && (c =
|
|
825
|
+
return n && (c = Ze({
|
|
826
826
|
geometryType: r.geometryType,
|
|
827
827
|
includedTags: n,
|
|
828
828
|
numColors: Math.min(t.length, 10)
|
|
@@ -836,10 +836,10 @@ function vr(e) {
|
|
|
836
836
|
predominanceScheme: c
|
|
837
837
|
};
|
|
838
838
|
}
|
|
839
|
-
async function
|
|
840
|
-
return await
|
|
839
|
+
async function Rr(e) {
|
|
840
|
+
return await Je(e);
|
|
841
841
|
}
|
|
842
|
-
async function
|
|
842
|
+
async function $r({
|
|
843
843
|
arcgisMap: e,
|
|
844
844
|
arcgisMapView: t,
|
|
845
845
|
layerId: r,
|
|
@@ -858,20 +858,20 @@ async function Rr({
|
|
|
858
858
|
colorSchemeTags: a
|
|
859
859
|
};
|
|
860
860
|
try {
|
|
861
|
-
const d =
|
|
861
|
+
const d = xr(u), p = await Rr(d);
|
|
862
862
|
return s.renderer = p.renderer, s.visible = !0, `Predominance renderer applied to layer: ${s.title ?? s.id} using fields ${o.join(", ")}`;
|
|
863
863
|
} catch (d) {
|
|
864
864
|
return `Error applying predominance renderer: ${d instanceof Error ? d.message : String(d)}`;
|
|
865
865
|
}
|
|
866
866
|
}
|
|
867
|
-
async function
|
|
867
|
+
async function Cr({
|
|
868
868
|
layerId: e,
|
|
869
869
|
fields: t,
|
|
870
870
|
colorSchemes: r,
|
|
871
871
|
includeSize: o
|
|
872
872
|
}, a) {
|
|
873
873
|
const { mapView: n } = R(a);
|
|
874
|
-
return await x({ type: "show-legend", data: { layerIds: [e] } }, a), await
|
|
874
|
+
return await x({ type: "show-legend", data: { layerIds: [e] } }, a), await $r({
|
|
875
875
|
arcgisMap: n.map,
|
|
876
876
|
arcgisMapView: n,
|
|
877
877
|
layerId: e,
|
|
@@ -880,12 +880,12 @@ async function $r({
|
|
|
880
880
|
includeSize: o
|
|
881
881
|
});
|
|
882
882
|
}
|
|
883
|
-
const
|
|
883
|
+
const Er = i.object({
|
|
884
884
|
layerId: i.string().describe("The id of the layer to apply the predominance renderer to"),
|
|
885
885
|
fields: i.array(i.string()).describe("The fields to use for the predominance renderer (competing categories)"),
|
|
886
886
|
colorSchemes: i.array(i.string()).optional().describe("Optional color scheme tags to use"),
|
|
887
887
|
includeSize: i.boolean().optional().describe("Whether to include size visualization (predominance-size)")
|
|
888
|
-
}),
|
|
888
|
+
}), Gn = y(Cr, {
|
|
889
889
|
name: "predominance",
|
|
890
890
|
description: `Label: Predominant category
|
|
891
891
|
Description: Compare attributes that share a common subject and unit of measurement to see which has the highest value.
|
|
@@ -898,9 +898,9 @@ const Cr = i.object({
|
|
|
898
898
|
Keywords: predominant, winner, won, competing, most, most common, most frequent, dominant, prevalent, top, amount, total, how much, proportional size, graduated size, sum
|
|
899
899
|
Example: Show the predominant crop in each area and vary the size of each symbol based on the total of all categories.
|
|
900
900
|
Fields: This style relies on 2-10 number fields.`,
|
|
901
|
-
schema:
|
|
901
|
+
schema: Er
|
|
902
902
|
});
|
|
903
|
-
function
|
|
903
|
+
function Fr(e) {
|
|
904
904
|
const { fields: t, layer: r, view: o, colorSchemeTags: a } = e;
|
|
905
905
|
let n;
|
|
906
906
|
const c = {
|
|
@@ -908,7 +908,7 @@ function Er(e) {
|
|
|
908
908
|
}, s = {
|
|
909
909
|
field: t[1]
|
|
910
910
|
};
|
|
911
|
-
return a && (n =
|
|
911
|
+
return a && (n = Xe({
|
|
912
912
|
geometryType: r.geometryType,
|
|
913
913
|
includedTags: a
|
|
914
914
|
})[0]), {
|
|
@@ -922,9 +922,9 @@ function Er(e) {
|
|
|
922
922
|
};
|
|
923
923
|
}
|
|
924
924
|
async function Nr(e) {
|
|
925
|
-
return await
|
|
925
|
+
return await Ye(e);
|
|
926
926
|
}
|
|
927
|
-
async function
|
|
927
|
+
async function Ir({
|
|
928
928
|
arcgisMap: e,
|
|
929
929
|
arcgisMapView: t,
|
|
930
930
|
layerId: r,
|
|
@@ -942,19 +942,19 @@ async function Fr({
|
|
|
942
942
|
colorSchemeTags: a
|
|
943
943
|
};
|
|
944
944
|
try {
|
|
945
|
-
const l =
|
|
945
|
+
const l = Fr(s), u = await Nr(l);
|
|
946
946
|
return c.renderer = u.renderer, c.visible = !0, `Relationship renderer applied to layer: ${c.title ?? c.id} using fields ${o.join(", ")}`;
|
|
947
947
|
} catch (l) {
|
|
948
948
|
return `Error applying relationship renderer: ${l instanceof Error ? l.message : String(l)}`;
|
|
949
949
|
}
|
|
950
950
|
}
|
|
951
|
-
async function
|
|
951
|
+
async function kr({
|
|
952
952
|
layerId: e,
|
|
953
953
|
fields: t,
|
|
954
954
|
colorSchemes: r
|
|
955
955
|
}, o) {
|
|
956
956
|
const { mapView: a } = R(o);
|
|
957
|
-
return await x({ type: "show-legend", data: { layerIds: [e] } }, o), await
|
|
957
|
+
return await x({ type: "show-legend", data: { layerIds: [e] } }, o), await Ir({
|
|
958
958
|
arcgisMap: a.map,
|
|
959
959
|
arcgisMapView: a,
|
|
960
960
|
layerId: e,
|
|
@@ -962,20 +962,20 @@ async function Ir({
|
|
|
962
962
|
colorSchemes: r
|
|
963
963
|
});
|
|
964
964
|
}
|
|
965
|
-
const
|
|
965
|
+
const zr = i.object({
|
|
966
966
|
layerId: i.string().describe("The id of the layer to apply the relationship renderer to"),
|
|
967
967
|
fields: i.array(i.string()).describe("The two fields to use for the relationship renderer (bivariate visualization)"),
|
|
968
968
|
colorSchemes: i.array(i.string()).optional().describe("Optional color scheme tags to use")
|
|
969
|
-
}),
|
|
969
|
+
}), On = y(kr, {
|
|
970
970
|
name: "relationship",
|
|
971
971
|
description: `Label: Relationship
|
|
972
972
|
Description: Overlays two color ramps to represent the relationship between two numeric attributes.
|
|
973
973
|
Keywords: relationship, correlation, compare, related, bivariate choropleth, bivariate color
|
|
974
974
|
Example: Show the relationship between tree height and carbon storage
|
|
975
975
|
Fields: This style requires two number fields.`,
|
|
976
|
-
schema:
|
|
976
|
+
schema: zr
|
|
977
977
|
});
|
|
978
|
-
function
|
|
978
|
+
function qr(e) {
|
|
979
979
|
const { fields: t, layer: r, view: o, theme: a } = e, n = t[0];
|
|
980
980
|
return {
|
|
981
981
|
layer: r,
|
|
@@ -987,10 +987,10 @@ function zr(e) {
|
|
|
987
987
|
outlineOptimizationEnabled: !0
|
|
988
988
|
};
|
|
989
989
|
}
|
|
990
|
-
async function
|
|
991
|
-
return await
|
|
990
|
+
async function Ar(e) {
|
|
991
|
+
return await et(e);
|
|
992
992
|
}
|
|
993
|
-
async function
|
|
993
|
+
async function Dr({
|
|
994
994
|
arcgisMap: e,
|
|
995
995
|
arcgisMapView: t,
|
|
996
996
|
layerId: r,
|
|
@@ -1010,20 +1010,20 @@ async function Ar({
|
|
|
1010
1010
|
theme: n
|
|
1011
1011
|
};
|
|
1012
1012
|
try {
|
|
1013
|
-
const u =
|
|
1013
|
+
const u = qr(l), d = await Ar(u);
|
|
1014
1014
|
return s.renderer = d.renderer, s.visible = !0, `Size-age renderer applied to layer: ${s.title ?? s.id} using fields ${o.join(", ")}`;
|
|
1015
1015
|
} catch (u) {
|
|
1016
1016
|
return `Error applying size-age renderer: ${u instanceof Error ? u.message : String(u)}`;
|
|
1017
1017
|
}
|
|
1018
1018
|
}
|
|
1019
|
-
async function
|
|
1019
|
+
async function Lr({
|
|
1020
1020
|
layerId: e,
|
|
1021
1021
|
fields: t,
|
|
1022
1022
|
colorSchemes: r,
|
|
1023
1023
|
theme: o
|
|
1024
1024
|
}, a) {
|
|
1025
1025
|
const { mapView: n } = R(a);
|
|
1026
|
-
return await x({ type: "show-legend", data: { layerIds: [e] } }, a), await
|
|
1026
|
+
return await x({ type: "show-legend", data: { layerIds: [e] } }, a), await Dr({
|
|
1027
1027
|
arcgisMap: n.map,
|
|
1028
1028
|
arcgisMapView: n,
|
|
1029
1029
|
layerId: e,
|
|
@@ -1032,21 +1032,21 @@ async function Dr({
|
|
|
1032
1032
|
theme: o
|
|
1033
1033
|
});
|
|
1034
1034
|
}
|
|
1035
|
-
const
|
|
1035
|
+
const Pr = i.object({
|
|
1036
1036
|
layerId: i.string().describe("The id of the layer to apply the size-age renderer to"),
|
|
1037
1037
|
fields: i.array(i.string()).describe("The field(s) to use for the size-age renderer (temporal data with size)"),
|
|
1038
1038
|
colorSchemes: i.array(i.string()).optional().describe("Optional color scheme tags to use"),
|
|
1039
1039
|
theme: i.enum(["above-and-below", "above", "below", "centered-on", "extremes", "high-to-low"]).optional().describe("Optional theme for the size ramp")
|
|
1040
|
-
}),
|
|
1040
|
+
}), Mn = y(Lr, {
|
|
1041
1041
|
name: "size-age",
|
|
1042
1042
|
description: `Label: Age (size)
|
|
1043
1043
|
Description: Vary symbol sizes along a continuous ramp to represent the age of features. Age reflects the length of time from a start date to an end date.
|
|
1044
1044
|
Keywords: since, age, how old, how long
|
|
1045
1045
|
Example: Change the size of features so older features are larger than new features.
|
|
1046
1046
|
Fields: This style requires at least one field with a date type.`,
|
|
1047
|
-
schema:
|
|
1047
|
+
schema: Pr
|
|
1048
1048
|
});
|
|
1049
|
-
function
|
|
1049
|
+
function jr(e) {
|
|
1050
1050
|
const { fields: t, layer: r, view: o } = e;
|
|
1051
1051
|
let { theme: a } = e, n = t[1];
|
|
1052
1052
|
const c = t[0];
|
|
@@ -1060,10 +1060,10 @@ function Pr(e) {
|
|
|
1060
1060
|
outlineOptimizationEnabled: !0
|
|
1061
1061
|
};
|
|
1062
1062
|
}
|
|
1063
|
-
async function
|
|
1064
|
-
return await
|
|
1063
|
+
async function Gr(e) {
|
|
1064
|
+
return await tt(e);
|
|
1065
1065
|
}
|
|
1066
|
-
async function
|
|
1066
|
+
async function Or({
|
|
1067
1067
|
arcgisMap: e,
|
|
1068
1068
|
arcgisMapView: t,
|
|
1069
1069
|
layerId: r,
|
|
@@ -1083,20 +1083,20 @@ async function Gr({
|
|
|
1083
1083
|
theme: n
|
|
1084
1084
|
};
|
|
1085
1085
|
try {
|
|
1086
|
-
const u =
|
|
1086
|
+
const u = jr(l), d = await Gr(u);
|
|
1087
1087
|
return s.renderer = d.renderer, s.visible = !0, `Size renderer applied to layer: ${s.title ?? s.id} using fields ${o.join(", ")}`;
|
|
1088
1088
|
} catch (u) {
|
|
1089
1089
|
return `Error applying size renderer: ${u instanceof Error ? u.message : String(u)}`;
|
|
1090
1090
|
}
|
|
1091
1091
|
}
|
|
1092
|
-
async function
|
|
1092
|
+
async function Mr({
|
|
1093
1093
|
layerId: e,
|
|
1094
1094
|
fields: t,
|
|
1095
1095
|
colorSchemes: r,
|
|
1096
1096
|
theme: o
|
|
1097
1097
|
}, a) {
|
|
1098
1098
|
const { mapView: n } = R(a);
|
|
1099
|
-
return await x({ type: "show-legend", data: { layerIds: [e] } }, a), await
|
|
1099
|
+
return await x({ type: "show-legend", data: { layerIds: [e] } }, a), await Or({
|
|
1100
1100
|
arcgisMap: n.map,
|
|
1101
1101
|
arcgisMapView: n,
|
|
1102
1102
|
layerId: e,
|
|
@@ -1105,12 +1105,12 @@ async function Or({
|
|
|
1105
1105
|
theme: o
|
|
1106
1106
|
});
|
|
1107
1107
|
}
|
|
1108
|
-
const
|
|
1108
|
+
const Qr = i.object({
|
|
1109
1109
|
layerId: i.string().describe("The id of the layer to apply the size renderer to"),
|
|
1110
1110
|
fields: i.array(i.string()).describe("The field(s) to use for the size renderer (numeric data)"),
|
|
1111
1111
|
colorSchemes: i.array(i.string()).optional().describe("Optional color scheme tags to use"),
|
|
1112
1112
|
theme: i.enum(["above-and-below", "above", "below", "centered-on", "extremes", "high-to-low"]).optional().describe("Optional theme for the size ramp")
|
|
1113
|
-
}),
|
|
1113
|
+
}), Qn = y(Mr, {
|
|
1114
1114
|
name: "size",
|
|
1115
1115
|
description: `Label: Counts and Amounts (size)
|
|
1116
1116
|
Description: Vary symbol sizes along a continuous ramp to represent numeric or ranked data.
|
|
@@ -1123,12 +1123,12 @@ const Mr = i.object({
|
|
|
1123
1123
|
Keywords: graduated size, proportional size, classed size, how much, total, number, when
|
|
1124
1124
|
Example: Vary the size of each feature based on the date a ticket was completed.
|
|
1125
1125
|
Fields: This style requires a single field with a date type.`,
|
|
1126
|
-
schema:
|
|
1126
|
+
schema: Qr
|
|
1127
1127
|
});
|
|
1128
|
-
function
|
|
1128
|
+
function _r(e) {
|
|
1129
1129
|
const { fields: t, layer: r, view: o, colorSchemeTags: a } = e, n = t[0], c = t[1], s = t[2];
|
|
1130
1130
|
let l;
|
|
1131
|
-
return a && (l =
|
|
1131
|
+
return a && (l = ot({
|
|
1132
1132
|
geometryType: r.geometryType,
|
|
1133
1133
|
includedTags: a
|
|
1134
1134
|
})[0]), {
|
|
@@ -1142,10 +1142,10 @@ function Qr(e) {
|
|
|
1142
1142
|
typeScheme: l
|
|
1143
1143
|
};
|
|
1144
1144
|
}
|
|
1145
|
-
async function
|
|
1146
|
-
return await
|
|
1145
|
+
async function Wr(e) {
|
|
1146
|
+
return await rt(e);
|
|
1147
1147
|
}
|
|
1148
|
-
async function
|
|
1148
|
+
async function Vr({
|
|
1149
1149
|
arcgisMap: e,
|
|
1150
1150
|
arcgisMapView: t,
|
|
1151
1151
|
layerId: r,
|
|
@@ -1165,20 +1165,20 @@ async function Wr({
|
|
|
1165
1165
|
theme: n
|
|
1166
1166
|
};
|
|
1167
1167
|
try {
|
|
1168
|
-
const u =
|
|
1168
|
+
const u = _r(l), d = await Wr(u);
|
|
1169
1169
|
return s.renderer = d.renderer, s.visible = !0, `Type renderer applied to layer: ${s.title ?? s.id} using fields ${o.join(", ")}`;
|
|
1170
1170
|
} catch (u) {
|
|
1171
1171
|
return `Error applying type renderer: ${u instanceof Error ? u.message : String(u)}`;
|
|
1172
1172
|
}
|
|
1173
1173
|
}
|
|
1174
|
-
async function
|
|
1174
|
+
async function Ur({
|
|
1175
1175
|
layerId: e,
|
|
1176
1176
|
fields: t,
|
|
1177
1177
|
colorSchemes: r,
|
|
1178
1178
|
theme: o
|
|
1179
1179
|
}, a) {
|
|
1180
1180
|
const { mapView: n } = R(a);
|
|
1181
|
-
return await x({ type: "show-legend", data: { layerIds: [e] } }, a), await
|
|
1181
|
+
return await x({ type: "show-legend", data: { layerIds: [e] } }, a), await Vr({
|
|
1182
1182
|
arcgisMap: n.map,
|
|
1183
1183
|
arcgisMapView: n,
|
|
1184
1184
|
layerId: e,
|
|
@@ -1187,74 +1187,74 @@ async function Vr({
|
|
|
1187
1187
|
theme: o
|
|
1188
1188
|
});
|
|
1189
1189
|
}
|
|
1190
|
-
const
|
|
1190
|
+
const Kr = i.object({
|
|
1191
1191
|
layerId: i.string().describe("The id of the layer to apply the type renderer to"),
|
|
1192
1192
|
fields: i.array(i.string()).describe("The field(s) to use for the type renderer (categorical data)"),
|
|
1193
1193
|
colorSchemes: i.array(i.string()).optional().describe("Optional color scheme tags to use"),
|
|
1194
1194
|
theme: i.enum(["above-and-below", "above", "below", "centered-on", "extremes", "high-to-low"]).optional().describe("Optional theme for the color scheme")
|
|
1195
|
-
}),
|
|
1195
|
+
}), _n = y(Ur, {
|
|
1196
1196
|
name: "type",
|
|
1197
1197
|
description: `Label: Types (unique symbols)
|
|
1198
1198
|
Description: Represent features as categories with different symbol colors or shapes. Examples include type of tree, road class, or province name.
|
|
1199
1199
|
Keywords: categorical, category, type, unique, discrete, point of interest, region, group
|
|
1200
1200
|
Example: Color each feature based on the region it belongs to
|
|
1201
1201
|
Fields: This style requires a single field which may be a string, number, or date type. It is usually a string.`,
|
|
1202
|
-
schema:
|
|
1203
|
-
}),
|
|
1202
|
+
schema: Kr
|
|
1203
|
+
}), Wn = b.Root({
|
|
1204
1204
|
...B(),
|
|
1205
1205
|
vectorSearchLayerIds: b(),
|
|
1206
1206
|
vectorSearchFieldResults: b(),
|
|
1207
1207
|
layerFieldInfo: b(),
|
|
1208
1208
|
selectedLayerId: b()
|
|
1209
|
-
}),
|
|
1209
|
+
}), Vn = b.Root({
|
|
1210
1210
|
...B(),
|
|
1211
1211
|
vectorSearchLayerIds: b(),
|
|
1212
1212
|
vectorSearchFieldResults: b(),
|
|
1213
1213
|
layerFieldInfo: b(),
|
|
1214
1214
|
queryResponse: b(),
|
|
1215
1215
|
dataExplorationMessages: b({
|
|
1216
|
-
reducer:
|
|
1216
|
+
reducer: Te,
|
|
1217
1217
|
default: () => []
|
|
1218
1218
|
})
|
|
1219
|
-
}),
|
|
1219
|
+
}), Br = ["mapView"];
|
|
1220
1220
|
function I(e) {
|
|
1221
1221
|
const r = e?.configurable?.context;
|
|
1222
1222
|
if (!r || typeof r != "object")
|
|
1223
1223
|
throw new Error("DataExplorationAgent context missing");
|
|
1224
|
-
const o =
|
|
1224
|
+
const o = Br.filter((a) => !(a in r));
|
|
1225
1225
|
if (o.length)
|
|
1226
1226
|
throw new Error(`DataExplorationAgent context missing: ${o.join(", ")}`);
|
|
1227
1227
|
return r;
|
|
1228
1228
|
}
|
|
1229
|
-
const
|
|
1229
|
+
const Hr = (e) => {
|
|
1230
1230
|
const t = e.map?.allLayers.filter((o) => o.type === "feature");
|
|
1231
1231
|
let r = 0;
|
|
1232
1232
|
return t?.forEach((o) => {
|
|
1233
1233
|
const a = o;
|
|
1234
1234
|
a.featureEffect && (a.featureEffect = null, r++);
|
|
1235
1235
|
}), r > 0 ? `Cleared filters from ${r} layer(s). View unchanged.` : "No active filters to clear. View unchanged.";
|
|
1236
|
-
},
|
|
1236
|
+
}, Jr = async (e, t) => {
|
|
1237
1237
|
const { mapView: r } = I(t);
|
|
1238
|
-
return
|
|
1239
|
-
},
|
|
1238
|
+
return Hr(r);
|
|
1239
|
+
}, Zr = y(Jr, {
|
|
1240
1240
|
name: "clearFilters",
|
|
1241
1241
|
description: "Clears all feature effects/filters from the map but does NOT change the current view. Use when user says 'clear filters', 'reset filters', 'remove filters', 'show all features', or wants to remove emphasis without navigating anywhere.",
|
|
1242
1242
|
schema: i.object({})
|
|
1243
|
-
}),
|
|
1243
|
+
}), Yr = async (e) => {
|
|
1244
1244
|
e.map?.allLayers.filter((a) => a.type === "feature")?.forEach((a) => {
|
|
1245
1245
|
const n = a;
|
|
1246
1246
|
n.featureEffect && (n.featureEffect = null);
|
|
1247
1247
|
});
|
|
1248
1248
|
const o = e.map.initialViewProperties?.viewpoint?.targetGeometry;
|
|
1249
1249
|
return o ? (await e.goTo(o), "Cleared all filters and returned to home extent.") : "Cleared all filters. Could not determine home extent.";
|
|
1250
|
-
},
|
|
1250
|
+
}, Xr = async (e, t) => {
|
|
1251
1251
|
const { mapView: r } = I(t);
|
|
1252
|
-
return await
|
|
1253
|
-
},
|
|
1252
|
+
return await Yr(r);
|
|
1253
|
+
}, eo = y(Xr, {
|
|
1254
1254
|
name: "resetMap",
|
|
1255
1255
|
description: "Clears all feature effects/filters from the map AND zooms to the home extent (initial map view). Use when user says 'reset map', 'reset the map', 'start over', or wants to both clear filters and return to the initial view.",
|
|
1256
1256
|
schema: i.object({})
|
|
1257
|
-
});
|
|
1257
|
+
}), be = 5;
|
|
1258
1258
|
function U(e) {
|
|
1259
1259
|
return "point" in e && e.point !== void 0;
|
|
1260
1260
|
}
|
|
@@ -1264,7 +1264,7 @@ function j(e) {
|
|
|
1264
1264
|
const H = async (e, t) => {
|
|
1265
1265
|
if (U(e)) {
|
|
1266
1266
|
const { point: r } = e;
|
|
1267
|
-
return { geometry: new
|
|
1267
|
+
return { geometry: new Se({
|
|
1268
1268
|
x: r.x,
|
|
1269
1269
|
y: r.y,
|
|
1270
1270
|
spatialReference: r.spatialReference ? { wkid: r.spatialReference.wkid } : t.spatialReference
|
|
@@ -1272,40 +1272,37 @@ const H = async (e, t) => {
|
|
|
1272
1272
|
}
|
|
1273
1273
|
if (j(e)) {
|
|
1274
1274
|
const r = t.map?.allLayers.find(
|
|
1275
|
-
(
|
|
1275
|
+
(n) => n.id === e.layerId
|
|
1276
1276
|
);
|
|
1277
1277
|
if (!r)
|
|
1278
1278
|
return { error: `Could not find geometry layer with ID: ${e.layerId}` };
|
|
1279
|
-
const o = r.title ?? r.id;
|
|
1279
|
+
const o = r.title ?? r.id, a = e.where?.trim() || "1=1";
|
|
1280
1280
|
try {
|
|
1281
|
-
const
|
|
1282
|
-
where:
|
|
1281
|
+
const n = await r.queryFeatures({
|
|
1282
|
+
where: a,
|
|
1283
1283
|
returnGeometry: !0,
|
|
1284
|
-
outSpatialReference: t.spatialReference
|
|
1284
|
+
outSpatialReference: t.spatialReference,
|
|
1285
|
+
num: be + 1
|
|
1285
1286
|
});
|
|
1286
|
-
if (!
|
|
1287
|
+
if (!n.features.length)
|
|
1287
1288
|
return {
|
|
1288
|
-
error: `No features found in geometry layer "${o}" with the specified where clause: ${
|
|
1289
|
+
error: `No features found in geometry layer "${o}" with the specified where clause: ${a}`
|
|
1289
1290
|
};
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
}
|
|
1302
|
-
return n.spatialReference || (n.spatialReference = t.spatialReference), { geometry: n };
|
|
1303
|
-
} catch (a) {
|
|
1304
|
-
return { error: `Failed to query geometry: ${String(a)}` };
|
|
1291
|
+
if (n.features.length > be)
|
|
1292
|
+
return {
|
|
1293
|
+
error: `Geometry filter for layer "${o}" matched too many features (${n.features.length}+). Please narrow the geometry layer filter.`
|
|
1294
|
+
};
|
|
1295
|
+
const c = n.features.map((l) => l.geometry).filter((l) => !!l);
|
|
1296
|
+
if (!c.length)
|
|
1297
|
+
return { error: "No valid geometries found for the matched geometry layer features." };
|
|
1298
|
+
const s = c.length === 1 ? c[0] : it.executeMany(c);
|
|
1299
|
+
return s ? (s.spatialReference || (s.spatialReference = t.spatialReference), { geometry: s }) : { error: "Failed to combine geometries from geometry layer." };
|
|
1300
|
+
} catch (n) {
|
|
1301
|
+
return { error: `Failed to query geometry: ${String(n)}` };
|
|
1305
1302
|
}
|
|
1306
1303
|
}
|
|
1307
1304
|
return { error: "Invalid geometry configuration provided" };
|
|
1308
|
-
},
|
|
1305
|
+
}, to = async (e, t, r, o, a, n) => {
|
|
1309
1306
|
const c = e.map?.allLayers.find((l) => l.id === t);
|
|
1310
1307
|
if (!c)
|
|
1311
1308
|
return { success: !1, error: `Layer '${t}' not found.` };
|
|
@@ -1323,7 +1320,7 @@ const H = async (e, t) => {
|
|
|
1323
1320
|
error: l instanceof Error ? l.message : String(l)
|
|
1324
1321
|
};
|
|
1325
1322
|
}
|
|
1326
|
-
},
|
|
1323
|
+
}, ro = async (e, t, r, o, a, n) => {
|
|
1327
1324
|
const c = t.map?.allLayers.find(
|
|
1328
1325
|
(p) => p.id === e.layerId
|
|
1329
1326
|
);
|
|
@@ -1336,8 +1333,8 @@ const H = async (e, t) => {
|
|
|
1336
1333
|
return p.error;
|
|
1337
1334
|
s = p.geometry;
|
|
1338
1335
|
}
|
|
1339
|
-
if (c.featureEffect = null, c.featureEffect = new
|
|
1340
|
-
filter: new
|
|
1336
|
+
if (c.featureEffect = null, c.featureEffect = new nt({
|
|
1337
|
+
filter: new ve({
|
|
1341
1338
|
...e.objectIds?.length ? { objectIds: e.objectIds } : { where: e.where },
|
|
1342
1339
|
geometry: s,
|
|
1343
1340
|
spatialRelationship: "intersects",
|
|
@@ -1348,7 +1345,7 @@ const H = async (e, t) => {
|
|
|
1348
1345
|
excludedEffect: o
|
|
1349
1346
|
}), c.visible = !0, n)
|
|
1350
1347
|
return `Applied feature effects to "${c.title ?? e.layerId}" within current map extent.`;
|
|
1351
|
-
const l = e.objectIds?.length ? `${c.objectIdField} IN (${e.objectIds.join(",")})` : e.where, u = await
|
|
1348
|
+
const l = e.objectIds?.length ? `${c.objectIdField} IN (${e.objectIds.join(",")})` : e.where, u = await to(
|
|
1352
1349
|
t,
|
|
1353
1350
|
e.layerId,
|
|
1354
1351
|
l,
|
|
@@ -1357,7 +1354,7 @@ const H = async (e, t) => {
|
|
|
1357
1354
|
a?.units
|
|
1358
1355
|
), d = c.title ?? e.layerId;
|
|
1359
1356
|
return u.success ? `Applied feature effects to target layer "${c.title ?? e.layerId}"${a && "layerId" in a ? ` using geometry from layer "${a.layerId}"` : ""}.` : `Applied filter to "${d}" but no features matched. ${u.error}`;
|
|
1360
|
-
},
|
|
1357
|
+
}, oo = ["feet", "kilometers", "meters", "miles", "nautical-miles", "us-nautical-miles"], F = i.enum(oo), ao = async ({
|
|
1361
1358
|
targetLayer: e,
|
|
1362
1359
|
geometryFilter: t,
|
|
1363
1360
|
useCurrentExtent: r,
|
|
@@ -1365,13 +1362,13 @@ const H = async (e, t) => {
|
|
|
1365
1362
|
excludedEffect: a = "grayscale(100%) opacity(60%) blur(2px)"
|
|
1366
1363
|
}, n) => {
|
|
1367
1364
|
const { mapView: c } = I(n);
|
|
1368
|
-
return await
|
|
1369
|
-
},
|
|
1365
|
+
return await ro(e, c, o, a, t, r);
|
|
1366
|
+
}, no = i.object({
|
|
1370
1367
|
layerId: i.string().describe("The layerId of the layer containing the geometry by which to filter."),
|
|
1371
1368
|
where: i.string().describe("The SQL-92 where clause representing the features from which to filter."),
|
|
1372
1369
|
distance: i.number().optional().describe("The buffer distance around the geometry."),
|
|
1373
|
-
units:
|
|
1374
|
-
}),
|
|
1370
|
+
units: F.optional().describe("The units for the distance buffer.")
|
|
1371
|
+
}), io = i.object({
|
|
1375
1372
|
point: i.object({
|
|
1376
1373
|
x: i.number().describe("X coordinate (longitude) from navigation result"),
|
|
1377
1374
|
y: i.number().describe("Y coordinate (latitude) from navigation result"),
|
|
@@ -1380,8 +1377,8 @@ const H = async (e, t) => {
|
|
|
1380
1377
|
}).optional().describe("Spatial reference. Defaults to map's spatial reference if not provided.")
|
|
1381
1378
|
}).describe("Point coordinates from a previous navigation/geocoding result"),
|
|
1382
1379
|
distance: i.number().optional().describe("Optional buffer distance around the point."),
|
|
1383
|
-
units:
|
|
1384
|
-
}),
|
|
1380
|
+
units: F.optional().describe("The units for the distance buffer.")
|
|
1381
|
+
}), so = i.object({
|
|
1385
1382
|
targetLayer: i.object({
|
|
1386
1383
|
layerId: i.string().describe("The layerId of the layer on which to set a feature effect."),
|
|
1387
1384
|
where: i.string().describe("The SQL-92 where clause representing the features to emphasize."),
|
|
@@ -1389,7 +1386,7 @@ const H = async (e, t) => {
|
|
|
1389
1386
|
"Array of objectIds from a previous query result. Use this instead of a where clause when the query returned objectIds (e.g. top N results). If provided, takes precedence over where clause."
|
|
1390
1387
|
)
|
|
1391
1388
|
}),
|
|
1392
|
-
geometryFilter: i.union([
|
|
1389
|
+
geometryFilter: i.union([no, io]).optional().describe("Optional geometry-based filtering parameters for spatial queries."),
|
|
1393
1390
|
useCurrentExtent: i.boolean().optional().describe(
|
|
1394
1391
|
"Set to true when the previous query used the current map extent as a spatial filter. This ensures the feature effect applies only to features visible in the current view. Default is false."
|
|
1395
1392
|
),
|
|
@@ -1399,10 +1396,10 @@ const H = async (e, t) => {
|
|
|
1399
1396
|
excludedEffect: i.string().default("grayscale(100%) opacity(60%) blur(2px)").describe(
|
|
1400
1397
|
"The effect applied to features that do not meet the filter requirements. Valid effects include: bloom, blur, brightness, contrast, drop-shadow, grayscale, hue-rotate, invert, opacity, saturate, and sepia. Prefer default unless specified."
|
|
1401
1398
|
)
|
|
1402
|
-
}),
|
|
1399
|
+
}), co = y(ao, {
|
|
1403
1400
|
name: "setFeatureEffect",
|
|
1404
1401
|
description: "Sets a feature effect on a given layer with given filter parameters and feature effects to emphasize certain features that meet a filter requirement. If no feature effect information is provided, then use the default effect provided.",
|
|
1405
|
-
schema:
|
|
1402
|
+
schema: so
|
|
1406
1403
|
}), re = (e) => {
|
|
1407
1404
|
if (e instanceof Date)
|
|
1408
1405
|
return Number.isNaN(e.getTime()) ? null : e;
|
|
@@ -1411,23 +1408,23 @@ const H = async (e, t) => {
|
|
|
1411
1408
|
return Number.isNaN(t.getTime()) ? null : t;
|
|
1412
1409
|
}
|
|
1413
1410
|
return null;
|
|
1414
|
-
},
|
|
1411
|
+
}, lo = (e) => !e || e === "system" ? Intl.DateTimeFormat().resolvedOptions().timeZone : e === "unknown" ? "UTC" : e, uo = (e) => {
|
|
1415
1412
|
if (typeof e == "string" && e)
|
|
1416
1413
|
return e;
|
|
1417
1414
|
const t = re(e);
|
|
1418
1415
|
return t ? t.toISOString().slice(0, 10) : null;
|
|
1419
|
-
},
|
|
1416
|
+
}, Un = () => {
|
|
1420
1417
|
const e = (/* @__PURE__ */ new Date()).getTimezoneOffset(), t = e <= 0 ? "+" : "-", r = Math.floor(Math.abs(e) / 60).toString().padStart(2, "0"), o = (Math.abs(e) % 60).toString().padStart(2, "0"), a = `${t}${r}:${o}`;
|
|
1421
1418
|
return { userTimezone: Intl.DateTimeFormat().resolvedOptions().timeZone, userTimezoneOffset: a };
|
|
1422
|
-
},
|
|
1419
|
+
}, po = (e, t, r) => {
|
|
1423
1420
|
const o = t?.toLowerCase();
|
|
1424
1421
|
if (o === "date-only") {
|
|
1425
|
-
const n =
|
|
1426
|
-
return n ?
|
|
1422
|
+
const n = uo(e);
|
|
1423
|
+
return n ? st(n, Q("short-date")) : e;
|
|
1427
1424
|
}
|
|
1428
1425
|
if (o === "time-only") {
|
|
1429
1426
|
if (typeof e == "string" && e)
|
|
1430
|
-
return
|
|
1427
|
+
return ct(e, Q("long-time"));
|
|
1431
1428
|
const n = re(e);
|
|
1432
1429
|
return n ? fe(n, {
|
|
1433
1430
|
...Q("long-time"),
|
|
@@ -1437,9 +1434,9 @@ const H = async (e, t) => {
|
|
|
1437
1434
|
const a = re(e);
|
|
1438
1435
|
return a ? fe(a, {
|
|
1439
1436
|
...Q("short-date-short-time"),
|
|
1440
|
-
timeZone:
|
|
1437
|
+
timeZone: lo(r)
|
|
1441
1438
|
}) : e;
|
|
1442
|
-
},
|
|
1439
|
+
}, $e = (e, t, r) => {
|
|
1443
1440
|
if (e && typeof e != "function") {
|
|
1444
1441
|
const o = "getField" in r && r.getField?.(e), a = o && "getFieldDomain" in r && r.getFieldDomain ? r.getFieldDomain(o.name) : null;
|
|
1445
1442
|
if (a?.type === "coded-value") {
|
|
@@ -1448,7 +1445,7 @@ const H = async (e, t) => {
|
|
|
1448
1445
|
}
|
|
1449
1446
|
}
|
|
1450
1447
|
return null;
|
|
1451
|
-
},
|
|
1448
|
+
}, mo = (e) => !e || e === "system" ? Intl.DateTimeFormat().resolvedOptions().timeZone : e === "unknown" ? "UTC" : e, ho = (e) => {
|
|
1452
1449
|
if (e instanceof Date)
|
|
1453
1450
|
return Number.isNaN(e.getTime()) ? null : e;
|
|
1454
1451
|
if (typeof e == "number" && Number.isFinite(e)) {
|
|
@@ -1460,7 +1457,7 @@ const H = async (e, t) => {
|
|
|
1460
1457
|
return Number.isNaN(t.getTime()) ? null : t;
|
|
1461
1458
|
}
|
|
1462
1459
|
return null;
|
|
1463
|
-
},
|
|
1460
|
+
}, yo = (e, t) => {
|
|
1464
1461
|
if (typeof e != "number")
|
|
1465
1462
|
return e;
|
|
1466
1463
|
const r = {};
|
|
@@ -1470,26 +1467,26 @@ const H = async (e, t) => {
|
|
|
1470
1467
|
} catch {
|
|
1471
1468
|
return e;
|
|
1472
1469
|
}
|
|
1473
|
-
},
|
|
1474
|
-
const o =
|
|
1470
|
+
}, fo = (e, t, r) => {
|
|
1471
|
+
const o = ho(e);
|
|
1475
1472
|
if (!o)
|
|
1476
1473
|
return e;
|
|
1477
1474
|
const a = {};
|
|
1478
|
-
t.dateStyle ? a.dateStyle = t.dateStyle : (t.year && (a.year = t.year), t.month && (a.month = t.month)), t.timeStyle && (a.timeStyle = t.timeStyle), t.timeStyle && t.hour12 === "always" ? a.hour12 = !0 : t.timeStyle && t.hour12 === "never" && (a.hour12 = !1), a.timeZone =
|
|
1475
|
+
t.dateStyle ? a.dateStyle = t.dateStyle : (t.year && (a.year = t.year), t.month && (a.month = t.month)), t.timeStyle && (a.timeStyle = t.timeStyle), t.timeStyle && t.hour12 === "always" ? a.hour12 = !0 : t.timeStyle && t.hour12 === "never" && (a.hour12 = !1), a.timeZone = mo(r);
|
|
1479
1476
|
try {
|
|
1480
1477
|
return new Intl.DateTimeFormat(void 0, a).format(o);
|
|
1481
1478
|
} catch {
|
|
1482
1479
|
return e;
|
|
1483
1480
|
}
|
|
1484
|
-
},
|
|
1481
|
+
}, Ce = (e, t) => e.getFieldAlias?.(t) ?? e.fieldsIndex?.get(t)?.alias ?? e.fieldsIndex?.get(t)?.name ?? t, Ee = (e, t, r, o, a) => {
|
|
1485
1482
|
if (r == null)
|
|
1486
1483
|
return r;
|
|
1487
1484
|
const c = e.getFieldConfiguration?.(t)?.fieldFormat;
|
|
1488
|
-
return c?.type === "number" ?
|
|
1489
|
-
},
|
|
1490
|
-
const a = e.fieldsIndex?.get(t), n =
|
|
1491
|
-
return
|
|
1492
|
-
},
|
|
1485
|
+
return c?.type === "number" ? yo(r, c) : c?.type === "date-time" ? fo(r, c, a) : po(r, o, a);
|
|
1486
|
+
}, go = (e, t, r, o) => {
|
|
1487
|
+
const a = e.fieldsIndex?.get(t), n = $e(t, r, e) ?? r;
|
|
1488
|
+
return Ee(e, t, n, a?.type, o);
|
|
1489
|
+
}, wo = (e, t) => Ce(e, t), Fe = (e, t, r) => {
|
|
1493
1490
|
const o = e.objectIdField, a = t.features.map(
|
|
1494
1491
|
(c) => c.attributes[o]
|
|
1495
1492
|
), n = t.features.map((c) => {
|
|
@@ -1502,16 +1499,16 @@ const H = async (e, t) => {
|
|
|
1502
1499
|
l[u.name] = d;
|
|
1503
1500
|
return;
|
|
1504
1501
|
}
|
|
1505
|
-
const p =
|
|
1506
|
-
l[m] =
|
|
1502
|
+
const p = $e(u.name, d, e) ?? d, m = Ce(e, u.name);
|
|
1503
|
+
l[m] = Ee(e, u.name, p, u.type, r);
|
|
1507
1504
|
}), l;
|
|
1508
1505
|
});
|
|
1509
1506
|
return { objectIds: a, attributes: n };
|
|
1510
|
-
},
|
|
1507
|
+
}, bo = (e, t, r) => {
|
|
1511
1508
|
const o = e.createQuery();
|
|
1512
1509
|
return o.outFields = [t], o.where = r || "1=1", o.num = 1, o;
|
|
1513
|
-
},
|
|
1514
|
-
const a = o.map?.allLayers.find((m) => m.id === e), n =
|
|
1510
|
+
}, To = async (e, t, r, o) => {
|
|
1511
|
+
const a = o.map?.allLayers.find((m) => m.id === e), n = bo(a, t, r.where), s = (await a.queryFeatures(n)).features[0], l = s ? s.attributes[t] : null, u = go(a, t, l, o.timeZone), d = wo(a, t);
|
|
1515
1512
|
return {
|
|
1516
1513
|
tool: "getAttribute",
|
|
1517
1514
|
layerName: a.title ?? e,
|
|
@@ -1524,26 +1521,26 @@ const H = async (e, t) => {
|
|
|
1524
1521
|
}
|
|
1525
1522
|
};
|
|
1526
1523
|
};
|
|
1527
|
-
async function
|
|
1528
|
-
const { mapView: a } = I(o), n = await
|
|
1524
|
+
async function So({ layerId: e, fieldName: t, query: r }, o) {
|
|
1525
|
+
const { mapView: a } = I(o), n = await To(e, t, r, a);
|
|
1529
1526
|
return JSON.stringify(n, null, 2);
|
|
1530
1527
|
}
|
|
1531
|
-
const
|
|
1528
|
+
const vo = i.object({
|
|
1532
1529
|
layerId: i.string().describe("The layerId of the layer containing the field from which to get a value."),
|
|
1533
1530
|
fieldName: i.string().describe("The name of the field/attribute from which to get a field value."),
|
|
1534
1531
|
query: i.object({
|
|
1535
1532
|
where: i.string().describe("The SQL-92 where clause representing the feature from which to get an attribute value.")
|
|
1536
1533
|
})
|
|
1537
|
-
}),
|
|
1534
|
+
}), xo = y(So, {
|
|
1538
1535
|
name: "getAttribute",
|
|
1539
1536
|
description: "Returns an attribute value for a given feature.",
|
|
1540
|
-
schema:
|
|
1537
|
+
schema: vo
|
|
1541
1538
|
}), le = (e, t, r) => r ? e.hasAllFeaturesInView && e.availableFields === t : e.hasAllFeatures && e.availableFields === t;
|
|
1542
1539
|
function K(e, t) {
|
|
1543
1540
|
let r = e ?? "";
|
|
1544
1541
|
return t != null && t && (r = r ? `(${r}) AND (${t})` : t), r || null;
|
|
1545
1542
|
}
|
|
1546
|
-
const
|
|
1543
|
+
const Ro = async (e) => {
|
|
1547
1544
|
const { targetLayer: t, fieldName: r, statisticType: o, mapView: a, layersAndFieldsRegistry: n, geometryFilter: c } = e, s = a.map?.allLayers.find((S) => S.id === t.layerId);
|
|
1548
1545
|
if (!s)
|
|
1549
1546
|
throw new Error(`Layer '${t.layerId}' not found.`);
|
|
@@ -1573,7 +1570,7 @@ const xo = async (e) => {
|
|
|
1573
1570
|
units: c.units,
|
|
1574
1571
|
applied: !0
|
|
1575
1572
|
});
|
|
1576
|
-
f = new
|
|
1573
|
+
f = new ve({
|
|
1577
1574
|
geometry: S.geometry,
|
|
1578
1575
|
distance: c.distance,
|
|
1579
1576
|
units: c.units,
|
|
@@ -1594,16 +1591,16 @@ const xo = async (e) => {
|
|
|
1594
1591
|
...f && { filter: f },
|
|
1595
1592
|
outStatisticTypes: { include: [o] }
|
|
1596
1593
|
};
|
|
1597
|
-
h = await
|
|
1594
|
+
h = await lt(S);
|
|
1598
1595
|
const M = ["string", "small-integer", "integer"], L = d.domain?.type === "coded-value" ? d.domain : null;
|
|
1599
|
-
(M.includes(d.type) || L) && (w = (await
|
|
1596
|
+
(M.includes(d.type) || L) && (w = (await ut({
|
|
1600
1597
|
layer: s,
|
|
1601
1598
|
useFeaturesInView: g,
|
|
1602
1599
|
view: g ? a : void 0,
|
|
1603
1600
|
field: r,
|
|
1604
1601
|
sqlWhere: K(s.definitionExpression, t.where),
|
|
1605
1602
|
...f && { filter: f }
|
|
1606
|
-
})).uniqueValueInfos.sort((z,
|
|
1603
|
+
})).uniqueValueInfos.sort((z, ze) => ze.count - z.count).slice(0, T)), w && d.domain?.type === "coded-value" && (w = w.map((z) => ({
|
|
1607
1604
|
...z,
|
|
1608
1605
|
value: L ? L.getName(z.value) ?? z.value : z.value
|
|
1609
1606
|
})));
|
|
@@ -1626,13 +1623,13 @@ const xo = async (e) => {
|
|
|
1626
1623
|
}
|
|
1627
1624
|
};
|
|
1628
1625
|
};
|
|
1629
|
-
async function
|
|
1626
|
+
async function $o({
|
|
1630
1627
|
targetLayer: e,
|
|
1631
1628
|
fieldName: t,
|
|
1632
1629
|
statisticType: r,
|
|
1633
1630
|
geometryFilter: o
|
|
1634
1631
|
}, a) {
|
|
1635
|
-
const n =
|
|
1632
|
+
const n = Re(a, "layersAndFieldsRegistry"), { mapView: c } = I(a), s = await Ro({
|
|
1636
1633
|
targetLayer: e,
|
|
1637
1634
|
fieldName: t,
|
|
1638
1635
|
statisticType: r,
|
|
@@ -1642,12 +1639,12 @@ async function Ro({
|
|
|
1642
1639
|
});
|
|
1643
1640
|
return JSON.stringify(s, null, 2);
|
|
1644
1641
|
}
|
|
1645
|
-
const
|
|
1642
|
+
const Co = i.object({
|
|
1646
1643
|
layerId: i.string().describe("The layerId of the layer containing the geometry by which to filter."),
|
|
1647
1644
|
where: i.string().describe("The SQL-92 where clause representing the features from which to filter."),
|
|
1648
1645
|
distance: i.number().optional().describe("The buffer distance around the geometry."),
|
|
1649
|
-
units:
|
|
1650
|
-
}),
|
|
1646
|
+
units: F.optional().describe("The units for the distance buffer.")
|
|
1647
|
+
}), Eo = i.object({
|
|
1651
1648
|
point: i.object({
|
|
1652
1649
|
x: i.number().describe("X coordinate (longitude) from navigation result"),
|
|
1653
1650
|
y: i.number().describe("Y coordinate (latitude) from navigation result"),
|
|
@@ -1656,18 +1653,18 @@ const $o = i.object({
|
|
|
1656
1653
|
}).optional().describe("Spatial reference. Defaults to map's spatial reference if not provided.")
|
|
1657
1654
|
}).describe("Point coordinates from a previous navigation/geocoding result"),
|
|
1658
1655
|
distance: i.number().optional().describe("Optional buffer distance around the point."),
|
|
1659
|
-
units:
|
|
1660
|
-
}),
|
|
1656
|
+
units: F.optional().describe("The units for the distance buffer.")
|
|
1657
|
+
}), Fo = i.object({
|
|
1661
1658
|
targetLayer: i.object({
|
|
1662
1659
|
layerId: i.string().describe("The layerId of the layer containing the field from which to get a value."),
|
|
1663
1660
|
where: i.string().describe("The SQL-92 where clause representing the feature from which to get an attribute value.")
|
|
1664
1661
|
}),
|
|
1665
|
-
geometryFilter: i.union([
|
|
1662
|
+
geometryFilter: i.union([Co, Eo]).optional().describe(
|
|
1666
1663
|
"Geometry filter for spatial queries. Use 'point' option with x/y coordinates from navigation results to find features at that location (point-in-polygon). Use 'layerId/where' option to filter by features from another layer."
|
|
1667
1664
|
),
|
|
1668
1665
|
fieldName: i.string().describe("The name of the field for which to get statistics. STRICTLY DO NOT use OBJECTID. Use any other field"),
|
|
1669
1666
|
statisticType: i.enum(["avg", "max", "median", "min", "stddev", "sum", "variance", "nullcount", "count"]).describe("The statistic type to calculate.")
|
|
1670
|
-
}), No = y(
|
|
1667
|
+
}), No = y($o, {
|
|
1671
1668
|
name: "getStatistics",
|
|
1672
1669
|
description: `Computes a single aggregate statistic (max, min, avg, sum, median, stddev, variance) for a numeric field across matching features. Also returns frequency analysis for categorical fields.
|
|
1673
1670
|
|
|
@@ -1682,8 +1679,8 @@ DO NOT USE FOR:
|
|
|
1682
1679
|
- Simple counts of features matching a condition — use queryFeatures instead
|
|
1683
1680
|
|
|
1684
1681
|
Only call this tool when the answer requires computing an aggregate (avg, max, min, sum, median, stddev) over a field's values, not just counting or listing features.`,
|
|
1685
|
-
schema:
|
|
1686
|
-
}),
|
|
1682
|
+
schema: Fo
|
|
1683
|
+
}), Io = async (e, t, r, o, a) => {
|
|
1687
1684
|
const n = r.map?.allLayers.find((m) => m.id === e.layerId), c = await r.whenLayerView(n), s = n.title ?? e.layerId;
|
|
1688
1685
|
let l;
|
|
1689
1686
|
if (o) {
|
|
@@ -1710,7 +1707,7 @@ Only call this tool when the answer requires computing an aggregate (avg, max, m
|
|
|
1710
1707
|
try {
|
|
1711
1708
|
let m;
|
|
1712
1709
|
if (u) {
|
|
1713
|
-
const h = new
|
|
1710
|
+
const h = new dt({
|
|
1714
1711
|
where: e.where || "1=1",
|
|
1715
1712
|
outFields: p,
|
|
1716
1713
|
orderByFields: e.orderByFields,
|
|
@@ -1718,7 +1715,7 @@ Only call this tool when the answer requires computing an aggregate (avg, max, m
|
|
|
1718
1715
|
spatialRelationship: l ? "intersects" : void 0,
|
|
1719
1716
|
distance: o?.distance,
|
|
1720
1717
|
units: o?.units,
|
|
1721
|
-
topFilter: new
|
|
1718
|
+
topFilter: new pt({
|
|
1722
1719
|
topCount: t.topCount,
|
|
1723
1720
|
groupByFields: t.groupByFields,
|
|
1724
1721
|
orderByFields: t.orderByFields
|
|
@@ -1735,7 +1732,7 @@ Only call this tool when the answer requires computing an aggregate (avg, max, m
|
|
|
1735
1732
|
console.warn("Client-side query failed, falling back to server:", T), m = await n.queryFeatures(h);
|
|
1736
1733
|
}
|
|
1737
1734
|
}
|
|
1738
|
-
const f = m.features.map((h) => h.attributes[d]), { attributes: g } =
|
|
1735
|
+
const f = m.features.map((h) => h.attributes[d]), { attributes: g } = Fe(n, m, r.timeZone);
|
|
1739
1736
|
return {
|
|
1740
1737
|
tool: "getTopFeatures",
|
|
1741
1738
|
layerName: s,
|
|
@@ -1758,20 +1755,20 @@ Only call this tool when the answer requires computing an aggregate (avg, max, m
|
|
|
1758
1755
|
details: { error: m instanceof Error ? m.message : String(m) }
|
|
1759
1756
|
};
|
|
1760
1757
|
}
|
|
1761
|
-
},
|
|
1758
|
+
}, ko = async ({
|
|
1762
1759
|
targetLayer: e,
|
|
1763
1760
|
topFilter: t,
|
|
1764
1761
|
geometryFilter: r,
|
|
1765
1762
|
useCurrentExtent: o
|
|
1766
1763
|
}, a) => {
|
|
1767
|
-
const { mapView: n } = I(a), c = await
|
|
1764
|
+
const { mapView: n } = I(a), c = await Io(e, t, n, r, o);
|
|
1768
1765
|
return JSON.stringify(c, null, 2);
|
|
1769
|
-
},
|
|
1766
|
+
}, zo = i.object({
|
|
1770
1767
|
layerId: i.string().describe("The layerId of the layer containing the geometry by which to filter."),
|
|
1771
1768
|
where: i.string().describe("The SQL-92 where clause representing the features from which to filter."),
|
|
1772
1769
|
distance: i.number().optional().describe("The buffer distance around the geometry."),
|
|
1773
|
-
units:
|
|
1774
|
-
}),
|
|
1770
|
+
units: F.optional().describe("The units for the distance buffer.")
|
|
1771
|
+
}), qo = i.object({
|
|
1775
1772
|
point: i.object({
|
|
1776
1773
|
x: i.number().describe("X coordinate (longitude) from navigation result"),
|
|
1777
1774
|
y: i.number().describe("Y coordinate (latitude) from navigation result"),
|
|
@@ -1780,8 +1777,8 @@ Only call this tool when the answer requires computing an aggregate (avg, max, m
|
|
|
1780
1777
|
}).optional().describe("Spatial reference. Defaults to map's spatial reference if not provided.")
|
|
1781
1778
|
}).describe("Point coordinates from a previous navigation/geocoding result"),
|
|
1782
1779
|
distance: i.number().optional().describe("Optional buffer distance around the point."),
|
|
1783
|
-
units:
|
|
1784
|
-
}),
|
|
1780
|
+
units: F.optional().describe("The units for the distance buffer.")
|
|
1781
|
+
}), Ao = i.object({
|
|
1785
1782
|
targetLayer: i.object({
|
|
1786
1783
|
layerId: i.string().describe("The layerId of the layer containing the field from which to get a value."),
|
|
1787
1784
|
where: i.string().describe("The SQL-92 where clause representing the feature from which to get an attribute value."),
|
|
@@ -1792,7 +1789,7 @@ Only call this tool when the answer requires computing an aggregate (avg, max, m
|
|
|
1792
1789
|
).default("*")
|
|
1793
1790
|
)
|
|
1794
1791
|
}),
|
|
1795
|
-
geometryFilter: i.union([
|
|
1792
|
+
geometryFilter: i.union([zo, qo]).optional().describe(
|
|
1796
1793
|
"Geometry filter for spatial queries. Use 'point' option with x/y coordinates from navigation results to find features at that location (point-in-polygon). Use 'layerId/where' option to filter by features from another layer."
|
|
1797
1794
|
),
|
|
1798
1795
|
topFilter: i.object({
|
|
@@ -1805,11 +1802,11 @@ Only call this tool when the answer requires computing an aggregate (avg, max, m
|
|
|
1805
1802
|
useCurrentExtent: i.boolean().optional().describe(
|
|
1806
1803
|
"Set to true ONLY when user explicitly asks about features 'in my view', 'on my map', 'I am looking at'. Default is false (queries entire layer)."
|
|
1807
1804
|
)
|
|
1808
|
-
}),
|
|
1805
|
+
}), Do = y(ko, {
|
|
1809
1806
|
name: "getTopFeatures",
|
|
1810
1807
|
description: 'Returns top N features ranked by an existing field value. Use for "highest", "lowest", "top N" questions where ranking is based on a field that already exists in the data (e.g., population, value, date, depth). orderByFields must be actual field names with ASC/DESC. Do NOT use aggregate functions like COUNT(), SUM(), AVG() - those require getStatistics.',
|
|
1811
|
-
schema:
|
|
1812
|
-
}), ee = 25,
|
|
1808
|
+
schema: Ao
|
|
1809
|
+
}), ee = 25, Lo = async (e, t, r, o) => {
|
|
1813
1810
|
const a = t.map?.allLayers.find((h) => h.id === e.layerId), n = await t.whenLayerView(a), c = a.title ?? e.layerId;
|
|
1814
1811
|
let s;
|
|
1815
1812
|
if (r) {
|
|
@@ -1850,7 +1847,7 @@ Only call this tool when the answer requires computing an aggregate (avg, max, m
|
|
|
1850
1847
|
} catch (h) {
|
|
1851
1848
|
console.warn("Client-side query failed, falling back to server:", h), p = await a.queryFeatureCount(d), p > 0 && p <= ee && (m = await a.queryFeatures(d));
|
|
1852
1849
|
}
|
|
1853
|
-
const { objectIds: f, attributes: g } = m ?
|
|
1850
|
+
const { objectIds: f, attributes: g } = m ? Fe(a, m, t.timeZone) : { objectIds: void 0, attributes: void 0 };
|
|
1854
1851
|
return {
|
|
1855
1852
|
tool: "queryFeatures",
|
|
1856
1853
|
layerName: c,
|
|
@@ -1868,20 +1865,20 @@ Only call this tool when the answer requires computing an aggregate (avg, max, m
|
|
|
1868
1865
|
}
|
|
1869
1866
|
};
|
|
1870
1867
|
};
|
|
1871
|
-
async function
|
|
1868
|
+
async function Po({
|
|
1872
1869
|
targetLayer: e,
|
|
1873
1870
|
geometryFilter: t,
|
|
1874
1871
|
useCurrentExtent: r
|
|
1875
1872
|
}, o) {
|
|
1876
|
-
const { mapView: a } = I(o), n = await
|
|
1873
|
+
const { mapView: a } = I(o), n = await Lo(e, a, t, r);
|
|
1877
1874
|
return JSON.stringify(n, null, 2);
|
|
1878
1875
|
}
|
|
1879
|
-
const
|
|
1876
|
+
const jo = i.object({
|
|
1880
1877
|
layerId: i.string().describe("The layerId of the layer containing the geometry by which to filter."),
|
|
1881
1878
|
where: i.string().describe("The SQL-92 where clause representing the features from which to filter."),
|
|
1882
1879
|
distance: i.number().optional().describe("The buffer distance around the geometry."),
|
|
1883
|
-
units:
|
|
1884
|
-
}),
|
|
1880
|
+
units: F.optional().describe("The units for the distance buffer.")
|
|
1881
|
+
}), Go = i.object({
|
|
1885
1882
|
point: i.object({
|
|
1886
1883
|
x: i.number().describe("X coordinate (longitude) from navigation result"),
|
|
1887
1884
|
y: i.number().describe("Y coordinate (latitude) from navigation result"),
|
|
@@ -1890,8 +1887,8 @@ const Po = i.object({
|
|
|
1890
1887
|
}).optional().describe("Spatial reference. Defaults to map's spatial reference if not provided.")
|
|
1891
1888
|
}).describe("Point coordinates from a previous navigation/geocoding result"),
|
|
1892
1889
|
distance: i.number().optional().describe("Optional buffer distance around the point."),
|
|
1893
|
-
units:
|
|
1894
|
-
}),
|
|
1890
|
+
units: F.optional().describe("The units for the distance buffer.")
|
|
1891
|
+
}), Oo = i.object({
|
|
1895
1892
|
targetLayer: i.object({
|
|
1896
1893
|
layerId: i.string().describe("The layerId of the layer containing the field from which to get a value."),
|
|
1897
1894
|
where: i.string().describe(
|
|
@@ -1904,13 +1901,13 @@ const Po = i.object({
|
|
|
1904
1901
|
).default("*")
|
|
1905
1902
|
)
|
|
1906
1903
|
}),
|
|
1907
|
-
geometryFilter: i.union([
|
|
1904
|
+
geometryFilter: i.union([jo, Go]).optional().describe(
|
|
1908
1905
|
"Geometry filter for spatial queries. Use 'point' option with x/y coordinates from navigation results to find features at that location (point-in-polygon). Use 'layerId/where' option to filter by features from another layer."
|
|
1909
1906
|
),
|
|
1910
1907
|
useCurrentExtent: i.boolean().optional().describe(
|
|
1911
1908
|
"Set to true ONLY when user explicitly asks about features 'in my view', 'on my map', 'I am looking at', OR when the user refers back to features previously identified using the current extent (e.g. 'these', 'those', 'them', 'the same ones'). Default is false (queries entire layer)."
|
|
1912
1909
|
)
|
|
1913
|
-
}),
|
|
1910
|
+
}), Mo = y(Po, {
|
|
1914
1911
|
name: "queryFeatures",
|
|
1915
1912
|
description: `Queries features from a layer. Returns the total count of matching features, plus individual feature attributes if ≤25 features match.
|
|
1916
1913
|
|
|
@@ -1922,10 +1919,10 @@ USE THIS TOOL FOR:
|
|
|
1922
1919
|
- Any question where the user wants to SEE or COUNT matching features
|
|
1923
1920
|
|
|
1924
1921
|
This is the DEFAULT tool for most queries. When in doubt, use this tool.`,
|
|
1925
|
-
schema:
|
|
1926
|
-
}),
|
|
1927
|
-
async function
|
|
1928
|
-
const { messages: r } = await
|
|
1922
|
+
schema: Oo
|
|
1923
|
+
}), Qo = [xo, No, Do, Mo], Kn = [co, eo, Zr], _o = new at(Qo, { handleToolErrors: !1 });
|
|
1924
|
+
async function Bn(e, t) {
|
|
1925
|
+
const { messages: r } = await _o.invoke({ messages: e.dataExplorationMessages }, t), o = [], a = [];
|
|
1929
1926
|
for (const n of r) {
|
|
1930
1927
|
const c = n.content;
|
|
1931
1928
|
let s;
|
|
@@ -1957,13 +1954,11 @@ async function Kn(e, t) {
|
|
|
1957
1954
|
dataExplorationMessages: [...e.dataExplorationMessages, ...r],
|
|
1958
1955
|
queryResponse: o,
|
|
1959
1956
|
status: "success",
|
|
1960
|
-
|
|
1961
|
-
`),
|
|
1962
|
-
summary: a.length > 0 ? Wt(a.join(`
|
|
1957
|
+
summary: a.length > 0 ? Vt(a.join(`
|
|
1963
1958
|
`)) : "Query executed."
|
|
1964
1959
|
};
|
|
1965
1960
|
}
|
|
1966
|
-
const
|
|
1961
|
+
const Hn = b.Root({
|
|
1967
1962
|
...B(),
|
|
1968
1963
|
// internal to the help agent
|
|
1969
1964
|
helpInternalState: b({
|
|
@@ -1972,7 +1967,7 @@ const Bn = b.Root({
|
|
|
1972
1967
|
toolCallMessage: void 0
|
|
1973
1968
|
})
|
|
1974
1969
|
})
|
|
1975
|
-
}),
|
|
1970
|
+
}), Wo = (e, t) => {
|
|
1976
1971
|
const r = Array.from(e.values()).find(
|
|
1977
1972
|
({ layerItem: n }) => n.title?.toLowerCase().includes(t.toLowerCase())
|
|
1978
1973
|
);
|
|
@@ -1985,22 +1980,22 @@ const Bn = b.Root({
|
|
|
1985
1980
|
return `**${r.layerItem.title}** has ${o.length} field(s):
|
|
1986
1981
|
|
|
1987
1982
|
${a}`;
|
|
1988
|
-
},
|
|
1989
|
-
const r =
|
|
1990
|
-
return
|
|
1991
|
-
},
|
|
1983
|
+
}, Vo = async ({ layerTitle: e }, t) => {
|
|
1984
|
+
const r = Re(t, "layersAndFieldsRegistry");
|
|
1985
|
+
return Wo(r, e);
|
|
1986
|
+
}, Jn = y(Vo, {
|
|
1992
1987
|
name: "listLayerFields",
|
|
1993
1988
|
description: "Lists all fields for a given layer by title. Use ONLY when the user explicitly asks to see fields, columns, or attributes of a specific named layer. Do NOT call this tool for general help questions, capability overviews, or layer listing.",
|
|
1994
1989
|
schema: i.object({
|
|
1995
1990
|
layerTitle: i.string().describe("The title or partial title of the layer to list fields for.")
|
|
1996
1991
|
})
|
|
1997
|
-
}),
|
|
1992
|
+
}), Zn = b.Root({
|
|
1998
1993
|
...B(),
|
|
1999
1994
|
intent: b({
|
|
2000
1995
|
reducer: (e, t) => t
|
|
2001
1996
|
}),
|
|
2002
1997
|
arcgisKnowledgeMessages: b({
|
|
2003
|
-
reducer:
|
|
1998
|
+
reducer: Te,
|
|
2004
1999
|
default: () => []
|
|
2005
2000
|
}),
|
|
2006
2001
|
arcgisKnowledgeToolResult: b({
|
|
@@ -2032,7 +2027,7 @@ function Z(e) {
|
|
|
2032
2027
|
view: o
|
|
2033
2028
|
};
|
|
2034
2029
|
}
|
|
2035
|
-
function
|
|
2030
|
+
function Yn(e) {
|
|
2036
2031
|
const r = e?.configurable?.context;
|
|
2037
2032
|
if (Ne(e) === "knowledgeGraph")
|
|
2038
2033
|
return "knowledgeGraph";
|
|
@@ -2077,7 +2072,7 @@ function Ne(e) {
|
|
|
2077
2072
|
return "view";
|
|
2078
2073
|
throw new Error("ArcgisKnowledgeAgent context must have either a view or knowledgeGraph property.");
|
|
2079
2074
|
}
|
|
2080
|
-
class
|
|
2075
|
+
class Uo {
|
|
2081
2076
|
constructor(t) {
|
|
2082
2077
|
this.dataModel = t, this.kind = "GraphQueryGenerationRequest", this.explainQuery = !0, this.schemaInformation = de.fromDataModel(t);
|
|
2083
2078
|
}
|
|
@@ -2096,10 +2091,10 @@ class de {
|
|
|
2096
2091
|
for (const o of t.entityTypes)
|
|
2097
2092
|
r.entityTypes.push(G.fromEntityType(o));
|
|
2098
2093
|
for (const o of t.relationshipTypes)
|
|
2099
|
-
r.relationshipTypes.push(
|
|
2094
|
+
r.relationshipTypes.push(Ko.fromRelationshipType(o));
|
|
2100
2095
|
return r.identifierInfo = {
|
|
2101
2096
|
mappingInfo: {
|
|
2102
|
-
identifierMapsTo:
|
|
2097
|
+
identifierMapsTo: Bo(
|
|
2103
2098
|
t.identifierInfo.identifierMappingInfo.identifierInfoType
|
|
2104
2099
|
),
|
|
2105
2100
|
identifierPropertyName: t.identifierInfo.identifierMappingInfo.uniformPropertyIdentifier.identifierPropertyName
|
|
@@ -2119,13 +2114,13 @@ class G {
|
|
|
2119
2114
|
}
|
|
2120
2115
|
static fromEntityType(t) {
|
|
2121
2116
|
const r = new G();
|
|
2122
|
-
r.name = t.name, r.alias = t.alias ? t.alias : void 0, r.role =
|
|
2117
|
+
r.name = t.name, r.alias = t.alias ? t.alias : void 0, r.role = Ho(t.role);
|
|
2123
2118
|
for (const o of t.properties) {
|
|
2124
2119
|
const a = {
|
|
2125
2120
|
name: o.name,
|
|
2126
2121
|
alias: o.alias ? o.alias : void 0,
|
|
2127
2122
|
fieldType: o.fieldType,
|
|
2128
|
-
role:
|
|
2123
|
+
role: Jo(o.role),
|
|
2129
2124
|
geometryDef: o.fieldType === "esriFieldTypeGeometry" ? {
|
|
2130
2125
|
geometryType: o.geometryType ?? "esriGeometryAny",
|
|
2131
2126
|
hasM: o.hasM ? o.hasM : void 0,
|
|
@@ -2137,7 +2132,7 @@ class G {
|
|
|
2137
2132
|
return r;
|
|
2138
2133
|
}
|
|
2139
2134
|
}
|
|
2140
|
-
class
|
|
2135
|
+
class Ko extends G {
|
|
2141
2136
|
constructor() {
|
|
2142
2137
|
super(...arguments), this.observedEndPoints = [];
|
|
2143
2138
|
}
|
|
@@ -2152,7 +2147,7 @@ class Uo extends G {
|
|
|
2152
2147
|
return r;
|
|
2153
2148
|
}
|
|
2154
2149
|
}
|
|
2155
|
-
const
|
|
2150
|
+
const Bo = (e) => {
|
|
2156
2151
|
switch (e) {
|
|
2157
2152
|
case "esriIdentifierInfoTypeUNSPECIFIED":
|
|
2158
2153
|
return "UNSPECIFIED";
|
|
@@ -2163,7 +2158,7 @@ const Ko = (e) => {
|
|
|
2163
2158
|
default:
|
|
2164
2159
|
return e;
|
|
2165
2160
|
}
|
|
2166
|
-
},
|
|
2161
|
+
}, Ho = (e) => {
|
|
2167
2162
|
switch (e) {
|
|
2168
2163
|
case "Regular":
|
|
2169
2164
|
return "esriGraphNamedObjectRegular";
|
|
@@ -2175,7 +2170,7 @@ const Ko = (e) => {
|
|
|
2175
2170
|
return e;
|
|
2176
2171
|
}
|
|
2177
2172
|
};
|
|
2178
|
-
function
|
|
2173
|
+
function Jo(e) {
|
|
2179
2174
|
switch (e) {
|
|
2180
2175
|
case "esriGraphPropertyRegular":
|
|
2181
2176
|
return "Regular";
|
|
@@ -2216,7 +2211,7 @@ function Ho(e) {
|
|
|
2216
2211
|
function Y(e) {
|
|
2217
2212
|
return e?.configurable?.abortSignal;
|
|
2218
2213
|
}
|
|
2219
|
-
function
|
|
2214
|
+
function Zo(e, t) {
|
|
2220
2215
|
return t ? `${e}
|
|
2221
2216
|
|
|
2222
2217
|
Your previous attempt to generate a cypher query failed. See the details below and generate a new cypher query that avoids this error.
|
|
@@ -2226,7 +2221,7 @@ Execution Error: ${t.executionError}
|
|
|
2226
2221
|
Failed Query:
|
|
2227
2222
|
${t.failedGraphQuery}` : e;
|
|
2228
2223
|
}
|
|
2229
|
-
async function
|
|
2224
|
+
async function Yo(e, t, r, o) {
|
|
2230
2225
|
const { graphQuery: a, explanation: n } = await pe(e, t, r, o);
|
|
2231
2226
|
return `Generated Graph Query:
|
|
2232
2227
|
${a}
|
|
@@ -2235,8 +2230,8 @@ Explanation: ${n}`;
|
|
|
2235
2230
|
}
|
|
2236
2231
|
async function pe(e, t, r, o, a) {
|
|
2237
2232
|
const n = {
|
|
2238
|
-
message:
|
|
2239
|
-
context: new
|
|
2233
|
+
message: Zo(e, a),
|
|
2234
|
+
context: new Uo(t)
|
|
2240
2235
|
};
|
|
2241
2236
|
_.conversationId && (n.conversationId = _.conversationId);
|
|
2242
2237
|
const c = Y(o);
|
|
@@ -2246,7 +2241,7 @@ async function pe(e, t, r, o, a) {
|
|
|
2246
2241
|
body: JSON.stringify(n),
|
|
2247
2242
|
headers: {
|
|
2248
2243
|
"Content-Type": "application/json",
|
|
2249
|
-
token: me.findCredential(
|
|
2244
|
+
token: me.findCredential(N.getDefault().url)?.token ?? ""
|
|
2250
2245
|
},
|
|
2251
2246
|
signal: c
|
|
2252
2247
|
});
|
|
@@ -2272,7 +2267,7 @@ async function pe(e, t, r, o, a) {
|
|
|
2272
2267
|
}),
|
|
2273
2268
|
headers: {
|
|
2274
2269
|
"Content-Type": "application/json",
|
|
2275
|
-
token: me.findCredential(
|
|
2270
|
+
token: me.findCredential(N.getDefault().url)?.token ?? ""
|
|
2276
2271
|
},
|
|
2277
2272
|
signal: c
|
|
2278
2273
|
});
|
|
@@ -2291,7 +2286,7 @@ async function pe(e, t, r, o, a) {
|
|
|
2291
2286
|
return { graphQuery: p, explanation: m };
|
|
2292
2287
|
}
|
|
2293
2288
|
const q = 3;
|
|
2294
|
-
function
|
|
2289
|
+
function Ie(e, t = 100) {
|
|
2295
2290
|
const r = {};
|
|
2296
2291
|
for (const o of Object.entries(e.properties ?? {})) {
|
|
2297
2292
|
const [a, n] = o;
|
|
@@ -2302,7 +2297,7 @@ function Fe(e, t = 100) {
|
|
|
2302
2297
|
function D(e) {
|
|
2303
2298
|
return typeof e != "object" || e === null ? String(e) : "details" in e && typeof e.details == "object" && e.details !== null && "errorMessage" in e.details && typeof e.details.errorMessage == "string" ? e.details.errorMessage : "message" in e && typeof e.message == "string" ? e.message : String(e);
|
|
2304
2299
|
}
|
|
2305
|
-
const
|
|
2300
|
+
const Xo = async ({
|
|
2306
2301
|
kg: e,
|
|
2307
2302
|
queryParams: t,
|
|
2308
2303
|
targetStructure: r,
|
|
@@ -2317,7 +2312,7 @@ const Yo = async ({
|
|
|
2317
2312
|
};
|
|
2318
2313
|
d && (d.aborted ? u.abort(d.reason) : d.addEventListener("abort", p, { once: !0 }));
|
|
2319
2314
|
try {
|
|
2320
|
-
const m = await
|
|
2315
|
+
const m = await ht(e, t, a);
|
|
2321
2316
|
s = m.resultHeader;
|
|
2322
2317
|
const f = m.resultRowsStream.getReader();
|
|
2323
2318
|
let g = 0;
|
|
@@ -2341,7 +2336,7 @@ const Yo = async ({
|
|
|
2341
2336
|
}
|
|
2342
2337
|
return { type: "success", rowLimitReached: !1, resultHeader: s, processedResult: l };
|
|
2343
2338
|
};
|
|
2344
|
-
async function
|
|
2339
|
+
async function ke({
|
|
2345
2340
|
prompt: e,
|
|
2346
2341
|
kg: t,
|
|
2347
2342
|
graphQueryServiceUrl: r,
|
|
@@ -2370,9 +2365,9 @@ async function Ie({
|
|
|
2370
2365
|
},
|
|
2371
2366
|
l
|
|
2372
2367
|
);
|
|
2373
|
-
const m = await
|
|
2368
|
+
const m = await Xo({
|
|
2374
2369
|
kg: t,
|
|
2375
|
-
queryParams: new
|
|
2370
|
+
queryParams: new xe({
|
|
2376
2371
|
openCypherQuery: p.graphQuery
|
|
2377
2372
|
}),
|
|
2378
2373
|
targetStructure: o,
|
|
@@ -2423,7 +2418,7 @@ async function Ie({
|
|
|
2423
2418
|
`Failed to execute generated cypher due to an unexpected error after ${q} attempts.`
|
|
2424
2419
|
);
|
|
2425
2420
|
}
|
|
2426
|
-
const
|
|
2421
|
+
const ea = async ({
|
|
2427
2422
|
kg: e,
|
|
2428
2423
|
searchQuery: t,
|
|
2429
2424
|
typeCategoryFilter: r,
|
|
@@ -2440,9 +2435,9 @@ const Xo = async ({
|
|
|
2440
2435
|
const d = l - c.length;
|
|
2441
2436
|
if (d <= 0)
|
|
2442
2437
|
break;
|
|
2443
|
-
const f = (await
|
|
2438
|
+
const f = (await yt(
|
|
2444
2439
|
e,
|
|
2445
|
-
new
|
|
2440
|
+
new ft({
|
|
2446
2441
|
searchQuery: t,
|
|
2447
2442
|
typeCategoryFilter: u,
|
|
2448
2443
|
namedTypesFilter: o ?? void 0,
|
|
@@ -2475,7 +2470,7 @@ const Xo = async ({
|
|
|
2475
2470
|
results: c
|
|
2476
2471
|
};
|
|
2477
2472
|
};
|
|
2478
|
-
function
|
|
2473
|
+
function ta(e, t) {
|
|
2479
2474
|
A(e, (r) => {
|
|
2480
2475
|
t.set(`${r.typeName}__${r.id}`, {
|
|
2481
2476
|
id: r.id,
|
|
@@ -2485,29 +2480,29 @@ function ea(e, t) {
|
|
|
2485
2480
|
}
|
|
2486
2481
|
function A(e, t) {
|
|
2487
2482
|
if (!(!e || typeof e != "object")) {
|
|
2488
|
-
if (
|
|
2483
|
+
if (oa(e))
|
|
2489
2484
|
for (const r of e.path)
|
|
2490
2485
|
A(r, t);
|
|
2491
|
-
else if (
|
|
2486
|
+
else if (ra(e))
|
|
2492
2487
|
t(e);
|
|
2493
2488
|
else if (Array.isArray(e))
|
|
2494
2489
|
for (const r of e)
|
|
2495
2490
|
A(r, t);
|
|
2496
|
-
else if (
|
|
2491
|
+
else if (aa(e))
|
|
2497
2492
|
for (const r of Object.values(e.properties ?? {}))
|
|
2498
2493
|
A(r, t);
|
|
2499
2494
|
}
|
|
2500
2495
|
}
|
|
2501
|
-
function
|
|
2496
|
+
function ra(e) {
|
|
2502
2497
|
return !e || typeof e != "object" || Array.isArray(e) ? !1 : "id" in e && "typeName" in e;
|
|
2503
2498
|
}
|
|
2504
|
-
function
|
|
2499
|
+
function oa(e) {
|
|
2505
2500
|
return !e || typeof e != "object" || Array.isArray(e) ? !1 : e && "path" in e && Array.isArray(e.path);
|
|
2506
2501
|
}
|
|
2507
|
-
function
|
|
2502
|
+
function aa(e) {
|
|
2508
2503
|
return !e || typeof e != "object" || Array.isArray(e) || "id" in e ? !1 : "properties" in e && typeof e.properties == "object";
|
|
2509
2504
|
}
|
|
2510
|
-
function
|
|
2505
|
+
function na(e, t) {
|
|
2511
2506
|
const r = [];
|
|
2512
2507
|
for (const o of [...t.dataModel.entityTypes, ...t.dataModel.relationshipTypes]) {
|
|
2513
2508
|
const a = e.getMemberIdsByType(o.name);
|
|
@@ -2516,7 +2511,7 @@ function aa(e, t) {
|
|
|
2516
2511
|
}
|
|
2517
2512
|
return r;
|
|
2518
2513
|
}
|
|
2519
|
-
function
|
|
2514
|
+
function ia(e) {
|
|
2520
2515
|
const t = [], r = [], a = e?.allLayers.find((n) => n.type === "knowledge-graph")?.inclusionModeDefinition;
|
|
2521
2516
|
if (a?.generateAllSublayers)
|
|
2522
2517
|
return { allNamedTypesFullyDynamic: !0, idTypePairs: t, dynamicTypes: r };
|
|
@@ -2528,15 +2523,15 @@ function na(e) {
|
|
|
2528
2523
|
t.push({ id: s, typeName: n });
|
|
2529
2524
|
return { allNamedTypesFullyDynamic: !1, idTypePairs: t, dynamicTypes: r };
|
|
2530
2525
|
}
|
|
2531
|
-
async function
|
|
2532
|
-
const { view: n } = o, c = await
|
|
2526
|
+
async function sa(e, t, r, o, a) {
|
|
2527
|
+
const { view: n } = o, c = await ke({
|
|
2533
2528
|
prompt: e,
|
|
2534
2529
|
kg: t,
|
|
2535
2530
|
graphQueryServiceUrl: r,
|
|
2536
2531
|
targetStructure: /* @__PURE__ */ new Map(),
|
|
2537
2532
|
targetStructureReducer: (p, m) => {
|
|
2538
2533
|
for (const f of m)
|
|
2539
|
-
|
|
2534
|
+
ta(f, p);
|
|
2540
2535
|
return p;
|
|
2541
2536
|
},
|
|
2542
2537
|
requestOptions: {
|
|
@@ -2565,13 +2560,13 @@ ${s}
|
|
|
2565
2560
|
|
|
2566
2561
|
Explanation: ${l}`);
|
|
2567
2562
|
}
|
|
2568
|
-
const W = "addRecords",
|
|
2563
|
+
const W = "addRecords", ca = i.object({
|
|
2569
2564
|
prompt: i.string().describe("The user's inquiry into the knowledge graph that needs to be run.")
|
|
2570
|
-
}),
|
|
2571
|
-
const { knowledgeGraph: r } = await O(t), o = Z(t), { view: a } = o, c =
|
|
2565
|
+
}), la = async ({ prompt: e }, t) => {
|
|
2566
|
+
const { knowledgeGraph: r } = await O(t), o = Z(t), { view: a } = o, c = N.getDefault().helperServices;
|
|
2572
2567
|
let s = e;
|
|
2573
2568
|
if (k(a)) {
|
|
2574
|
-
const l = a.map, { allNamedTypesFullyDynamic: u, idTypePairs: d, dynamicTypes: p } =
|
|
2569
|
+
const l = a.map, { allNamedTypesFullyDynamic: u, idTypePairs: d, dynamicTypes: p } = ia(l), m = await te("arcgis_knowledge_current_map_context");
|
|
2575
2570
|
if (s = `${e}
|
|
2576
2571
|
|
|
2577
2572
|
${m}${JSON.stringify(d)} and all entities or relationships with the the following typeNames in the array: ${JSON.stringify(p)}`, u)
|
|
@@ -2581,13 +2576,13 @@ ${m}${JSON.stringify(d)} and all entities or relationships with the the followin
|
|
|
2581
2576
|
summary: "No records have been added to the map because all data in the knowledge graph is contained in the map."
|
|
2582
2577
|
};
|
|
2583
2578
|
} else {
|
|
2584
|
-
const l = a.map, u = await te("arcgis_knowledge_current_lc_context"), d =
|
|
2579
|
+
const l = a.map, u = await te("arcgis_knowledge_current_lc_context"), d = na(l, r);
|
|
2585
2580
|
s = `${e}
|
|
2586
2581
|
|
|
2587
2582
|
${u}${JSON.stringify(d)}`;
|
|
2588
2583
|
}
|
|
2589
2584
|
try {
|
|
2590
|
-
const l = await
|
|
2585
|
+
const l = await sa(
|
|
2591
2586
|
s,
|
|
2592
2587
|
r,
|
|
2593
2588
|
`${c.aiAssistantServices.url}${c.aiAssistantServices.graphQueryAssistant}`,
|
|
@@ -2608,15 +2603,15 @@ ${u}${JSON.stringify(d)}`;
|
|
|
2608
2603
|
error: l
|
|
2609
2604
|
};
|
|
2610
2605
|
}
|
|
2611
|
-
},
|
|
2606
|
+
}, Xn = y(la, {
|
|
2612
2607
|
name: W,
|
|
2613
2608
|
description: "Adds records (entities or relationships) to the current link chart visualization from an inquiry into the knowledge graph data. The inquiry will retrieve data from the graph database that will serve as the basis for the records to be added to the link chart. The user should have explicitly requested to add records to the current link chart from their prompt.",
|
|
2614
|
-
schema:
|
|
2609
|
+
schema: ca
|
|
2615
2610
|
});
|
|
2616
|
-
async function
|
|
2611
|
+
async function ua(e, t) {
|
|
2617
2612
|
return await t.map?.applyLayout(e), await J(t), `Successfully applied layout: ${e}.`;
|
|
2618
2613
|
}
|
|
2619
|
-
const oe = "applyLayout",
|
|
2614
|
+
const oe = "applyLayout", da = i.object({
|
|
2620
2615
|
layout: i.enum([
|
|
2621
2616
|
"organic-standard",
|
|
2622
2617
|
"organic-community",
|
|
@@ -2630,7 +2625,7 @@ const oe = "applyLayout", ua = i.object({
|
|
|
2630
2625
|
]).describe(
|
|
2631
2626
|
"The layout mode to apply to the link chart. The value must be one of the following: organic-standard, organic-community, basic-grid, hierarchical-bottom-to-top, radial-root-centric, tree-left-to-right, geographic-organic-standard, chronological-mono-timeline, chronological-multi-timeline"
|
|
2632
2627
|
)
|
|
2633
|
-
}),
|
|
2628
|
+
}), pa = async ({ layout: e }, t) => {
|
|
2634
2629
|
const { view: r } = Z(t);
|
|
2635
2630
|
if (k(r))
|
|
2636
2631
|
return {
|
|
@@ -2640,24 +2635,24 @@ const oe = "applyLayout", ua = i.object({
|
|
|
2640
2635
|
error: new Error()
|
|
2641
2636
|
};
|
|
2642
2637
|
{
|
|
2643
|
-
const o = await
|
|
2638
|
+
const o = await ua(e, r);
|
|
2644
2639
|
return {
|
|
2645
2640
|
toolName: oe,
|
|
2646
2641
|
status: "success",
|
|
2647
2642
|
summary: o
|
|
2648
2643
|
};
|
|
2649
2644
|
}
|
|
2650
|
-
},
|
|
2645
|
+
}, ei = y(pa, {
|
|
2651
2646
|
name: oe,
|
|
2652
2647
|
description: "Apply a diagram layout to the link chart",
|
|
2653
|
-
schema:
|
|
2648
|
+
schema: da
|
|
2654
2649
|
});
|
|
2655
|
-
async function
|
|
2650
|
+
async function ma(e, t) {
|
|
2656
2651
|
return t.map?.changeNonspatialDataDisplay(e), await J(t), `Successfully applied nonspatial visibility setting: ${e}.`;
|
|
2657
2652
|
}
|
|
2658
|
-
const ae = "changeNonspatialVisibility",
|
|
2653
|
+
const ae = "changeNonspatialVisibility", ha = i.object({
|
|
2659
2654
|
setting: i.enum(["hidden", "visible"]).describe("The setting of nonspatial visibility")
|
|
2660
|
-
}),
|
|
2655
|
+
}), ya = async ({ setting: e }, t) => {
|
|
2661
2656
|
const { view: r } = Z(t);
|
|
2662
2657
|
if (k(r))
|
|
2663
2658
|
return {
|
|
@@ -2667,19 +2662,19 @@ const ae = "changeNonspatialVisibility", ma = i.object({
|
|
|
2667
2662
|
error: new Error()
|
|
2668
2663
|
};
|
|
2669
2664
|
{
|
|
2670
|
-
const o = await
|
|
2665
|
+
const o = await ma(e, r);
|
|
2671
2666
|
return {
|
|
2672
2667
|
toolName: ae,
|
|
2673
2668
|
status: "success",
|
|
2674
2669
|
summary: o
|
|
2675
2670
|
};
|
|
2676
2671
|
}
|
|
2677
|
-
},
|
|
2672
|
+
}, ti = y(ya, {
|
|
2678
2673
|
name: ae,
|
|
2679
2674
|
description: "Change whether or not nonspatial data is visible in the link chart. The value must be either 'hidden' or 'visible'.",
|
|
2680
|
-
schema:
|
|
2675
|
+
schema: ha
|
|
2681
2676
|
});
|
|
2682
|
-
async function
|
|
2677
|
+
async function fa(e, t, r, o, a) {
|
|
2683
2678
|
let n, c = "";
|
|
2684
2679
|
for (let s = 1; s <= q; s++) {
|
|
2685
2680
|
const { graphQuery: l, explanation: u } = await pe(
|
|
@@ -2691,15 +2686,15 @@ async function ya(e, t, r, o, a) {
|
|
|
2691
2686
|
);
|
|
2692
2687
|
try {
|
|
2693
2688
|
await v({ text: `Attempting to create link chart from derived query: ${l}` }, a);
|
|
2694
|
-
const d = await
|
|
2689
|
+
const d = await mt.fromCypherQuery(
|
|
2695
2690
|
t,
|
|
2696
|
-
new
|
|
2691
|
+
new xe({
|
|
2697
2692
|
openCypherQuery: l
|
|
2698
2693
|
})
|
|
2699
2694
|
);
|
|
2700
2695
|
await v({ text: "Link chart created successfully, loading..." }, a), await d.load();
|
|
2701
2696
|
const p = o.map;
|
|
2702
|
-
return o.map = d, await o.when(), await
|
|
2697
|
+
return o.map = d, await o.when(), await De.whenOnce(() => !o.updating), d.entityCount === 0 && d.relationshipCount === 0 ? (o.map === d && (o.map = p), d.destroy(), {
|
|
2703
2698
|
type: "error",
|
|
2704
2699
|
message: `Query returned no results. Cypher Query used to create the link chart:
|
|
2705
2700
|
${l}
|
|
@@ -2733,11 +2728,11 @@ Explanation: ${u}`
|
|
|
2733
2728
|
message: `Failed to create link chart after ${q} attempts. Last error: ${c}`
|
|
2734
2729
|
};
|
|
2735
2730
|
}
|
|
2736
|
-
const V = "createLinkChart",
|
|
2731
|
+
const V = "createLinkChart", ga = i.object({
|
|
2737
2732
|
prompt: i.string().describe(
|
|
2738
2733
|
"The user's inquiry into the knowledge graph that needs to be transformed into a link chart visualization."
|
|
2739
2734
|
)
|
|
2740
|
-
}),
|
|
2735
|
+
}), wa = async ({ prompt: e }, t) => {
|
|
2741
2736
|
const { knowledgeGraph: r } = await O(t), { view: o } = Z(t);
|
|
2742
2737
|
if (k(o))
|
|
2743
2738
|
return {
|
|
@@ -2747,7 +2742,7 @@ const V = "createLinkChart", fa = i.object({
|
|
|
2747
2742
|
error: new Error()
|
|
2748
2743
|
};
|
|
2749
2744
|
{
|
|
2750
|
-
const n =
|
|
2745
|
+
const n = N.getDefault().helperServices, c = await fa(
|
|
2751
2746
|
e,
|
|
2752
2747
|
r,
|
|
2753
2748
|
`${n.aiAssistantServices.url}${n.aiAssistantServices.graphQueryAssistant}`,
|
|
@@ -2765,11 +2760,11 @@ const V = "createLinkChart", fa = i.object({
|
|
|
2765
2760
|
summary: c.message
|
|
2766
2761
|
};
|
|
2767
2762
|
}
|
|
2768
|
-
},
|
|
2763
|
+
}, ri = y(wa, {
|
|
2769
2764
|
name: V,
|
|
2770
2765
|
description: "Creates a new link chart visualization from an inquiry into the knowledge graph data. The inquiry will retrieve data from the graph database that will serve as the basis for the new link chart. The user should have explicitly requested the creation of a new link chart from their prompt.",
|
|
2771
|
-
schema:
|
|
2772
|
-
}), ne = "queryGraphData",
|
|
2766
|
+
schema: ga
|
|
2767
|
+
}), ne = "queryGraphData", ba = i.object({
|
|
2773
2768
|
prompt: i.string().describe(
|
|
2774
2769
|
`The user's inquiry into the knowledge graph, from which a cypher query will be generated and executed to answer the inquiry. IMPORTANT:
|
|
2775
2770
|
|
|
@@ -2777,8 +2772,8 @@ REQUEST LIMIT: If the user does not specifically request for no limits or an exp
|
|
|
2777
2772
|
|
|
2778
2773
|
DESCRIPTIVE COLUMN NAMES: If the user's prompt does not explicitly request for specific column names in the result, ensure that the generated query has descriptive column names (using AS statements) to make the results easier to understand when displayed in a table format.`
|
|
2779
2774
|
)
|
|
2780
|
-
}),
|
|
2781
|
-
const { knowledgeGraph: r } = await O(t), a =
|
|
2775
|
+
}), Ta = async ({ prompt: e }, t) => {
|
|
2776
|
+
const { knowledgeGraph: r } = await O(t), a = N.getDefault().helperServices, n = await ke({
|
|
2782
2777
|
prompt: e,
|
|
2783
2778
|
kg: r,
|
|
2784
2779
|
graphQueryServiceUrl: `${a.aiAssistantServices.url}${a.aiAssistantServices.graphQueryAssistant}`,
|
|
@@ -2804,7 +2799,7 @@ DESCRIPTIVE COLUMN NAMES: If the user's prompt does not explicitly request for s
|
|
|
2804
2799
|
for (const f of m)
|
|
2805
2800
|
A(
|
|
2806
2801
|
f,
|
|
2807
|
-
(g) =>
|
|
2802
|
+
(g) => Ie(g)
|
|
2808
2803
|
);
|
|
2809
2804
|
const d = 50, p = s.slice(0, d).map((m) => JSON.stringify(m));
|
|
2810
2805
|
return {
|
|
@@ -2834,16 +2829,16 @@ ${p.length > d ? `Showing top ${d} results:
|
|
|
2834
2829
|
queryResults: s
|
|
2835
2830
|
}
|
|
2836
2831
|
};
|
|
2837
|
-
},
|
|
2832
|
+
}, oi = y(Ta, {
|
|
2838
2833
|
name: ne,
|
|
2839
2834
|
description: "Allows users to explore the data in their knowledge graph via cypher query. Generates and executes a cypher query based on the user's inquiry into the knowledge graph, and displays the results in the chat pane without modifying the user's link chart if any. Use this tool when the user is asking an exploratory question about their data as a whole that can be answered via cypher query, for example 'What are the top 5 suppliers by total parts cost?' or 'How many employees do we have in each department?'.",
|
|
2840
|
-
schema:
|
|
2841
|
-
}), ie = "generateCypher",
|
|
2835
|
+
schema: ba
|
|
2836
|
+
}), ie = "generateCypher", Sa = i.object({
|
|
2842
2837
|
prompt: i.string().describe("The user's inquiry into the knowledge graph that needs to be translated into a cypher query.")
|
|
2843
|
-
}),
|
|
2844
|
-
const { knowledgeGraph: r } = await O(t), a =
|
|
2838
|
+
}), va = async ({ prompt: e }, t) => {
|
|
2839
|
+
const { knowledgeGraph: r } = await O(t), a = N.getDefault().helperServices;
|
|
2845
2840
|
try {
|
|
2846
|
-
const n = await
|
|
2841
|
+
const n = await Yo(
|
|
2847
2842
|
e,
|
|
2848
2843
|
r.dataModel,
|
|
2849
2844
|
`${a.aiAssistantServices.url}${a.aiAssistantServices.graphQueryAssistant}`,
|
|
@@ -2863,11 +2858,11 @@ ${p.length > d ? `Showing top ${d} results:
|
|
|
2863
2858
|
error: n
|
|
2864
2859
|
};
|
|
2865
2860
|
}
|
|
2866
|
-
},
|
|
2861
|
+
}, ai = y(va, {
|
|
2867
2862
|
name: ie,
|
|
2868
2863
|
description: "Generates an Open Cypher query based on the user's prompt which represents an inquiry into the data of the knowledge service and its graph database, attempting to filter based on certain conditions and traverse specified relationships. The generated query should be syntactically correct and optimized for performance.",
|
|
2869
|
-
schema:
|
|
2870
|
-
}),
|
|
2864
|
+
schema: Sa
|
|
2865
|
+
}), xa = (e) => {
|
|
2871
2866
|
const t = e.dataModel, r = /* @__PURE__ */ new Map();
|
|
2872
2867
|
for (const s of t.searchIndexes)
|
|
2873
2868
|
if (s.supportedCategory !== "esriTypeMetaEntityProvenance")
|
|
@@ -2884,10 +2879,10 @@ ${a.map(({ name: s }) => `${s}: [${Array.from(r.get(s) ?? []).join(", ")}]`).joi
|
|
|
2884
2879
|
|
|
2885
2880
|
${c}`;
|
|
2886
2881
|
};
|
|
2887
|
-
async function
|
|
2882
|
+
async function Ra(e, t) {
|
|
2888
2883
|
const r = await te("arcgis_knowledge_lucene_generation_prompt"), o = {
|
|
2889
2884
|
inquiry: e,
|
|
2890
|
-
dataModelForSearch:
|
|
2885
|
+
dataModelForSearch: xa(t)
|
|
2891
2886
|
}, a = i.enum(["entity", "relationship", "both"]).describe("The graph element category to search against - entity, relationship, or both"), n = i.number().int().positive().nullable().describe(
|
|
2892
2887
|
"The maximum number of search results to return. Default to 10 if not specified by the user, or set to null if the user specifically requests no limits or all results."
|
|
2893
2888
|
), c = i.array(
|
|
@@ -2902,22 +2897,22 @@ async function xa(e, t) {
|
|
|
2902
2897
|
typeCategoryFilter: a,
|
|
2903
2898
|
resultLimit: n
|
|
2904
2899
|
});
|
|
2905
|
-
return await
|
|
2900
|
+
return await Ae({
|
|
2906
2901
|
promptText: r,
|
|
2907
2902
|
inputVariables: o,
|
|
2908
2903
|
schema: s
|
|
2909
2904
|
});
|
|
2910
2905
|
}
|
|
2911
|
-
const se = "searchGraphData",
|
|
2906
|
+
const se = "searchGraphData", $a = i.object({
|
|
2912
2907
|
prompt: i.string().describe(
|
|
2913
2908
|
"The user's inquiry into the knowledge graph, from which a lucene search query will be generated and executed against the graph to return relevant results."
|
|
2914
2909
|
)
|
|
2915
|
-
}),
|
|
2910
|
+
}), Ca = async ({ prompt: e }, t) => {
|
|
2916
2911
|
const { knowledgeGraph: r } = await O(t);
|
|
2917
2912
|
await v({ text: "Generating search query for the user inquiry" }, t);
|
|
2918
|
-
const o = await
|
|
2913
|
+
const o = await Ra(e, r);
|
|
2919
2914
|
await v({ text: "Executing graph search with generated search query" }, t);
|
|
2920
|
-
const a = await
|
|
2915
|
+
const a = await ea({
|
|
2921
2916
|
kg: r,
|
|
2922
2917
|
searchQuery: o.query,
|
|
2923
2918
|
typeCategoryFilter: o.typeCategoryFilter,
|
|
@@ -2938,7 +2933,7 @@ const se = "searchGraphData", Ra = i.object({
|
|
|
2938
2933
|
for (const s of a.results)
|
|
2939
2934
|
A(
|
|
2940
2935
|
s,
|
|
2941
|
-
(l) =>
|
|
2936
|
+
(l) => Ie(l)
|
|
2942
2937
|
);
|
|
2943
2938
|
const n = 10, c = a.results.slice(0, n);
|
|
2944
2939
|
return {
|
|
@@ -2963,56 +2958,56 @@ const se = "searchGraphData", Ra = i.object({
|
|
|
2963
2958
|
}
|
|
2964
2959
|
}
|
|
2965
2960
|
};
|
|
2966
|
-
},
|
|
2961
|
+
}, ni = y(Ca, {
|
|
2967
2962
|
name: se,
|
|
2968
2963
|
description: "Allows users to search the knowledge graph for text matching their inquiry, using lucene search syntax, against indexed string properties defined on their entities and relationships. Use this tool when the user asks a question about their knowledge graph data as a whole, that could be answered via lucene text search of properties stored on graph elements, e.g requiring fuzzy matching. Otherwise if the inquiry is looking for connected records (e.g. paths), data aggregations, etc explore the data via the queryGraphData tool.",
|
|
2969
|
-
schema:
|
|
2964
|
+
schema: $a
|
|
2970
2965
|
});
|
|
2971
2966
|
export {
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2967
|
+
An as A,
|
|
2968
|
+
Dn as B,
|
|
2969
|
+
Ln as C,
|
|
2970
|
+
Pn as D,
|
|
2971
|
+
jn as E,
|
|
2972
|
+
Gn as F,
|
|
2978
2973
|
de as G,
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2974
|
+
Hn as H,
|
|
2975
|
+
On as I,
|
|
2976
|
+
Mn as J,
|
|
2977
|
+
Qn as K,
|
|
2978
|
+
_n as L,
|
|
2979
|
+
Wn as M,
|
|
2980
|
+
vn as N,
|
|
2981
|
+
Un as O,
|
|
2982
|
+
Kn as P,
|
|
2983
|
+
Qo as Q,
|
|
2989
2984
|
I as R,
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2985
|
+
Vn as S,
|
|
2986
|
+
Bn as T,
|
|
2987
|
+
ei as a,
|
|
2988
|
+
ai as b,
|
|
2989
|
+
ti as c,
|
|
2990
|
+
ri as d,
|
|
2991
|
+
Xn as e,
|
|
2992
|
+
Re as f,
|
|
2998
2993
|
te as g,
|
|
2999
|
-
|
|
2994
|
+
Yn as h,
|
|
3000
2995
|
O as i,
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
2996
|
+
Zn as j,
|
|
2997
|
+
xn as k,
|
|
2998
|
+
Jn as l,
|
|
2999
|
+
Rn as m,
|
|
3000
|
+
$n as n,
|
|
3001
|
+
Cn as o,
|
|
3002
|
+
En as p,
|
|
3003
|
+
oi as q,
|
|
3004
|
+
zn as r,
|
|
3005
|
+
ni as s,
|
|
3006
|
+
Vt as t,
|
|
3007
|
+
Fn as u,
|
|
3013
3008
|
Nn as v,
|
|
3014
|
-
|
|
3015
|
-
|
|
3009
|
+
In as w,
|
|
3010
|
+
kn as x,
|
|
3016
3011
|
$ as y,
|
|
3017
|
-
|
|
3012
|
+
qn as z
|
|
3018
3013
|
};
|