@arcgis/portal-components 5.1.0-next.137 → 5.1.0-next.138
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/{4RIC4QIG.js → AUPPNYF4.js} +6 -4
- package/dist/cdn/{3V7XYFTD.js → ITFWXO7A.js} +8 -2
- package/dist/cdn/QOCYNLQ7.js +71 -0
- package/dist/cdn/{OHG4W2VL.js → RNRPTWHT.js} +2 -2
- package/dist/cdn/WTBERF4M.js +2 -0
- package/dist/cdn/index.js +1 -1
- package/dist/components/arcgis-portal-replacement-item-redirect/customElement.js +1 -1
- 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/K54YDUEU.js +0 -2
- package/dist/cdn/ZJYTQIYE.js +0 -54
|
@@ -100,7 +100,7 @@ Title: {title}
|
|
|
100
100
|
Description: {description}`,Jd=`Name: {name}
|
|
101
101
|
Alias: {alias}
|
|
102
102
|
Description: {description}`,Zd=A.object({schemaVersion:A.literal(Wd),modified:A.number().int().nonnegative(),embeddings:A.object({modelProvider:A.literal(Vd),model:A.literal(Gd),dimensions:A.literal(Jn),templates:A.object({layer:A.string().default(Hd),field:A.string().default(Jd)})}),layers:A.array(A.object({id:A.string().min(1),name:A.string().min(1),title:A.string().catch(""),description:A.string().catch(""),vector:A.array(A.number()).length(Jn,{message:`Layer vector must be exactly ${Jn} dimensions`}),fields:A.array(A.object({name:A.string().min(1),alias:A.string().catch(""),description:A.string().catch(""),vector:A.array(A.number()).length(Jn,{message:`Field vector must be exactly ${Jn} dimensions`})}))})).default([])});var cg=(t,e)=>{let r=jl.fromTemplate(t);return mo.fromMessages([r,...e])};var Vo=async t=>{let{promptText:e,modelTier:r="default",temperature:n=0,messages:o,inputVariables:s,schema:a,config:i}=t,u=cg(e,o??[]),l=(await Di({modelTier:r,temperature:n,config:i})).withStructuredOutput(a);return await u.pipe(l).invoke(s??{},i)};var dg=d.object({name:d.string(),description:d.string(),valueType:d.string(),alias:d.string()}),gU=d.object({fields:d.array(dg)});var yU=d.object({title:d.string(),description:d.string(),name:d.string().nullable()});var Yd=t=>Array.isArray(t)&&t.every(lo),mg=t=>typeof t=="object"&&t!=null&&"messages"in t&&Yd(t.messages),fg=t=>typeof t=="object"&&t!=null&&"lg_tool_call"in t,ht=class extends zl{tools;handleToolErrors=!0;trace=!1;constructor(t,e){let{name:r,tags:n,handleToolErrors:o}=e??{};super({name:r,tags:n,func:(s,a)=>this.run(s,a)}),this.tools=t,this.handleToolErrors=o??this.handleToolErrors}async runTool(t,e){let r=this.tools.find(n=>n.name===t.name);try{if(r===void 0)throw new Error(`Tool "${t.name}" not found.`);let n=await r.invoke({...t,type:"tool_call"},e);return lo(n)&&n.getType()==="tool"||ue(n)?n:new U({status:"success",name:r.name,content:typeof n=="string"?n:JSON.stringify(n),tool_call_id:t.id})}catch(n){if(!this.handleToolErrors||io(n))throw n;return new U({status:"error",content:`Error: ${n.message}
|
|
103
|
-
Please fix your mistakes.`,name:t.name,tool_call_id:t.id??""})}}async run(t,e){let r;if(fg(t))r=[await this.runTool(t.lg_tool_call,e)];else{let s;if(Yd(t))s=t;else if(mg(t))s=t.messages;else throw new Error("ToolNode only accepts BaseMessage[] or { messages: BaseMessage[] } as input.");let a=new Set(s.filter(u=>u.getType()==="tool").map(u=>u.tool_call_id)),i;for(let u=s.length-1;u>=0;u-=1){let l=s[u];if(gt(l)){i=l;break}}if(i==null||!gt(i))throw new Error("ToolNode only accepts AIMessages as input.");r=await Promise.all(i.tool_calls?.filter(u=>u.id==null||!a.has(u.id)).map(u=>this.runTool(u,e))??[])}if(!r.some(ue))return Array.isArray(t)?r:{messages:r};let n=[],o=null;for(let s of r)ue(s)?s.graph===re.PARENT&&Array.isArray(s.goto)&&s.goto.every(a=>fl(a))?o?o.goto.push(...s.goto):o=new re({graph:re.PARENT,goto:s.goto}):n.push(s):n.push(Array.isArray(t)?[s]:{messages:[s]});return o&&n.push(o),n}};var _B=$.Root({llmInputMessages:$({reducer:(t,e)=>ho([],e),default:()=>[]})});var Go=(t,e)=>e??t,Jg=$.Root({...la(),intent:$({reducer:Go}),vectorSearchLayerResults:$({reducer:Go,default:()=>[]}),vectorSearchFieldResults:$({reducer:Go}),navigationInternalState:$({reducer:Go,default:()=>({toolCallMessage:void 0})})});async function Zg(t,e){let r=Cr.getDefault().helperServices,n=r.geocode.find(c=>c.name==="ArcGIS World Geocoding Service")??r.geocode[0];if(!n)throw new Error("No geocoding service found in helperServices.");let o=n.url,s=`${Fi.assetsPath?.endsWith("/")?Fi.assetsPath:`${Fi.assetsPath}/`}esri/images/search/search-symbol-32.png`,a=(await yg(o,{address:{SingleLine:t},outFields:["Match_addr"]}))?.[0];if(!a?.extent||!a.location)throw new Error(`Could not find location for: ${t}`);let i=new _g({url:s,width:24,height:24}),u=new gg({geometry:a.location,symbol:i});e.graphics.removeAll(),e.graphics.add(u),await e.goTo(a.extent);let l={address:a.address??"",location:a.location?a.location.toJSON():null,extent:a.extent?a.extent.toJSON():null};return{text:`Successfully zoomed to ${t}.`,sharedStatePatch:{lastResolvedLocation:{value:l}}}}var Qg=["mapView"];function Ye(t){let e=t?.configurable?.context;if(!e||typeof e!="object")throw new Error("NavigationAgent context missing");let r=Qg.filter(n=>!(n in e));if(r.length)throw new Error(`NavigationAgent context missing: ${r.join(", ")}`);return e}async function Yg({address:t},e){let{mapView:r}=Ye(e);return await Zg(t,r)}var Xg=d.object({address:d.string().describe("The full address or place name to locate.")}),ey=D(Yg,{name:"goToAddress",description:"Geocodes an address using Esri's World Geocoding Service and zooms the map to that location.",schema:Xg});async function ty(t,e){let r=e.map.bookmarks;if(!r||r.length===0)throw new Error("No bookmarks found in the map.");let n=r.find(s=>s.name===t);if(!n)throw new Error(`Bookmark with name "${t}" not found.`);let o=n.viewpoint;if(!o)throw new Error(`Bookmark with name "${t}" does not have a valid viewpoint.`);return await e.goTo(o),{text:`Navigated to bookmark: ${t}`}}async function ry({bookmarkName:t},e){let{mapView:r}=Ye(e);return await Promise.resolve(ty(t,r))}var ny=A.object({bookmarkName:A.string().describe("The name of the bookmark to navigate to.")}),oy=D(ry,{name:"goToBookmark",description:"Go to the extent of the bookmark with the given name.",schema:ny});async function sy(t,e,r){let n=r.map?.allLayers.find(a=>a.id===t);if(!n)return{text:`Error: Layer with id ${t} not found`};let o=e?.trim()?e:"1=1",s=n.createQuery();s.where=o;try{let{extent:a,count:i}=await n.queryExtent(s);if(i===0)return{text:`No features found in ${n.title} matching: ${o}`,where:o};if(a)await r.goTo(a);else return{text:`Error: Unable to determine extent for ${n.title}`,where:o};let u={layerId:t,layerTitle:n.title??t,where:o,count:i};return{text:`Successfully zoomed to ${i} feature(s) in ${n.title} matching: ${o}`,where:o,sharedStatePatch:{lastNavigatedFeatures:{value:u}}}}catch(a){return console.error("Error in goToFeatures:",a),{text:`Error: ${a instanceof Error?a.message:"Unknown error"}`,where:o}}}async function ay({layerId:t,where:e},r){let{mapView:n}=Ye(r);return await sy(t,e,n)}var iy=A.object({layerId:A.string().describe("The layerId of the layer to zoom to."),where:A.string().describe("The sql-92 where clause used to query features to zoom to")}),ly=D(ay,{name:"goToFeatures",description:"Go to the features that match the given filter related to the given layerId.",schema:iy});async function uy(t){let e=new wg({xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:{wkid:4326}}).expand(.7);return await t.goTo(e),{text:"Successfully zoomed to world extent"}}async function cy(t,e){let{mapView:r}=Ye(e);return await uy(r)}var dy=A.object({}),py=D(cy,{name:"goToFullExtent",description:"Zooms the map to the full world extent using Esri's Geocoding Service.",schema:dy});async function my(t){let e=t.map.initialViewProperties?.viewpoint?.targetGeometry;if(e)await t.goTo(e);else throw new Error("Initial extent is undefined");return{text:"Successfully zoomed to home extent"}}async function fy(t,e){let{mapView:r}=Ye(e);return await my(r)}var hy=d.object({}),gy=D(fy,{name:"goToHomeExtent",description:"Go to the initial web map view extent",schema:hy});async function yy(t,e){await e.when();let r=e.map?.allLayers.find(o=>o.id===t);if(!r)return console.warn(`[goToLayer] No matching FeatureLayer found for: ${t}`),{text:`Could not find layer for: ${t}`};let n;return(r.type==="link-chart"||r.type==="knowledge-graph-sublayer")&&e.map?.activeLinkChartLayer?n=e.map.diagramNodesExtent:n=r.fullExtent,n?(await e.goTo(n),r.visible=!0,{text:`Successfully zoomed to: ${r.title??""}`}):{text:"Layer has no defined extent. Cannot zoom to layer."}}async function _y({layerId:t},e){let{mapView:r}=Ye(e);return await yy(t,r)}var wy=A.object({layerId:A.string().describe("The id of the layer to navigate to")}),by=D(_y,{name:"goToLayer",description:"Zooms the map view to the full extent of the top matching layer.",schema:wy});async function xy(t,e){return await e.goTo({scale:t}),{text:`Successfully zoomed to: ${t}`}}async function Ay({scale:t},e){let{mapView:r}=Ye(e);return await xy(t,r)}var Iy=d.object({scale:d.number().describe("The map scale of the view to go to.")}),vy=D(Ay,{name:"goToScale",description:"Go to the specified view scale.",schema:Iy});async function Ty(t,e,r){let n={target:new ip({longitude:t.longitude,latitude:t.latitude,spatialReference:{wkid:4326}})};return r?.zoom!==void 0&&(n.zoom=r.zoom),r?.scale!==void 0&&(n.scale=r.scale),await e.goTo(n),{text:`Successfully navigated to: ${[`(${t.latitude}\xB0, ${t.longitude}\xB0)`,r?.zoom!==void 0?`zoom ${r.zoom}`:"",r?.scale!==void 0?`scale 1:${r.scale}`:""].filter(Boolean).join(", ")}`}}async function Sy({center:t,zoom:e,scale:r},n){let{mapView:o}=Ye(n);return await Ty(t,o,{zoom:e,scale:r})}var ky=d.object({center:d.object({longitude:d.number().describe("The longitude (x-coordinate) of the point to navigate to."),latitude:d.number().describe("The latitude (y-coordinate) of the point to navigate to.")}),zoom:d.number().optional().describe("The zoom level. Higher values = more zoomed in."),scale:d.number().optional().describe("The map scale. Alternative to zoom. Smaller numbers = more zoomed in.")}),Cy=D(Sy,{name:"goToViewpoint",description:"Go to the specified viewpoint. This can contain a combination of scale, center, zoom, etc.",schema:ky});async function Ey(t,e){return await e.goTo({zoom:t}),{text:`Successfully zoomed to: ${t}`}}async function Oy({zoom:t},e){let{mapView:r}=Ye(e);return await Ey(t,r)}var My=d.object({zoom:d.number().min(1).max(20).describe("The zoom level of the view to go to.")}),Py=D(Oy,{name:"goToZoom",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.).',schema:My}),op=Object.assign({"../agents/arcgisKnowledge/prompts/arcgis_knowledge_current_lc_context.md":()=>import("./GOMFFUFI.js").then(t=>t.default),"../agents/arcgisKnowledge/prompts/arcgis_knowledge_current_map_context.md":()=>import("./HWLUVMK4.js").then(t=>t.default),"../agents/arcgisKnowledge/prompts/arcgis_knowledge_lucene_generation_prompt.md":()=>import("./65JPRIL4.js").then(t=>t.default),"../agents/arcgisKnowledge/prompts/arcgis_knowledge_summarize_result_prompt.md":()=>import("./7WH33C6J.js").then(t=>t.default),"../agents/arcgisKnowledge/prompts/arcgis_knowledge_tool_prompt.md":()=>import("./3AFLX4RZ.js").then(t=>t.default),"../agents/dataExploration/prompts/data_explore_filter_prompt.md":()=>import("./IBYY5ORN.js").then(t=>t.default),"../agents/dataExploration/prompts/data_explore_query_prompt.md":()=>import("./WHLL7DNC.js").then(t=>t.default),"../agents/dataExploration/prompts/summarize_query_response_prompt.md":()=>import("./R53CO5LK.js").then(t=>t.default),"../agents/help/prompts/help_prompt.md":()=>import("./
|
|
103
|
+
Please fix your mistakes.`,name:t.name,tool_call_id:t.id??""})}}async run(t,e){let r;if(fg(t))r=[await this.runTool(t.lg_tool_call,e)];else{let s;if(Yd(t))s=t;else if(mg(t))s=t.messages;else throw new Error("ToolNode only accepts BaseMessage[] or { messages: BaseMessage[] } as input.");let a=new Set(s.filter(u=>u.getType()==="tool").map(u=>u.tool_call_id)),i;for(let u=s.length-1;u>=0;u-=1){let l=s[u];if(gt(l)){i=l;break}}if(i==null||!gt(i))throw new Error("ToolNode only accepts AIMessages as input.");r=await Promise.all(i.tool_calls?.filter(u=>u.id==null||!a.has(u.id)).map(u=>this.runTool(u,e))??[])}if(!r.some(ue))return Array.isArray(t)?r:{messages:r};let n=[],o=null;for(let s of r)ue(s)?s.graph===re.PARENT&&Array.isArray(s.goto)&&s.goto.every(a=>fl(a))?o?o.goto.push(...s.goto):o=new re({graph:re.PARENT,goto:s.goto}):n.push(s):n.push(Array.isArray(t)?[s]:{messages:[s]});return o&&n.push(o),n}};var _B=$.Root({llmInputMessages:$({reducer:(t,e)=>ho([],e),default:()=>[]})});var Go=(t,e)=>e??t,Jg=$.Root({...la(),intent:$({reducer:Go}),vectorSearchLayerResults:$({reducer:Go,default:()=>[]}),vectorSearchFieldResults:$({reducer:Go}),navigationInternalState:$({reducer:Go,default:()=>({toolCallMessage:void 0})})});async function Zg(t,e){let r=Cr.getDefault().helperServices,n=r.geocode.find(c=>c.name==="ArcGIS World Geocoding Service")??r.geocode[0];if(!n)throw new Error("No geocoding service found in helperServices.");let o=n.url,s=`${Fi.assetsPath?.endsWith("/")?Fi.assetsPath:`${Fi.assetsPath}/`}esri/images/search/search-symbol-32.png`,a=(await yg(o,{address:{SingleLine:t},outFields:["Match_addr"]}))?.[0];if(!a?.extent||!a.location)throw new Error(`Could not find location for: ${t}`);let i=new _g({url:s,width:24,height:24}),u=new gg({geometry:a.location,symbol:i});e.graphics.removeAll(),e.graphics.add(u),await e.goTo(a.extent);let l={address:a.address??"",location:a.location?a.location.toJSON():null,extent:a.extent?a.extent.toJSON():null};return{text:`Successfully zoomed to ${t}.`,sharedStatePatch:{lastResolvedLocation:{value:l}}}}var Qg=["mapView"];function Ye(t){let e=t?.configurable?.context;if(!e||typeof e!="object")throw new Error("NavigationAgent context missing");let r=Qg.filter(n=>!(n in e));if(r.length)throw new Error(`NavigationAgent context missing: ${r.join(", ")}`);return e}async function Yg({address:t},e){let{mapView:r}=Ye(e);return await Zg(t,r)}var Xg=d.object({address:d.string().describe("The full address or place name to locate.")}),ey=D(Yg,{name:"goToAddress",description:"Geocodes an address using Esri's World Geocoding Service and zooms the map to that location.",schema:Xg});async function ty(t,e){let r=e.map.bookmarks;if(!r||r.length===0)throw new Error("No bookmarks found in the map.");let n=r.find(s=>s.name===t);if(!n)throw new Error(`Bookmark with name "${t}" not found.`);let o=n.viewpoint;if(!o)throw new Error(`Bookmark with name "${t}" does not have a valid viewpoint.`);return await e.goTo(o),{text:`Navigated to bookmark: ${t}`}}async function ry({bookmarkName:t},e){let{mapView:r}=Ye(e);return await Promise.resolve(ty(t,r))}var ny=A.object({bookmarkName:A.string().describe("The name of the bookmark to navigate to.")}),oy=D(ry,{name:"goToBookmark",description:"Go to the extent of the bookmark with the given name.",schema:ny});async function sy(t,e,r){let n=r.map?.allLayers.find(a=>a.id===t);if(!n)return{text:`Error: Layer with id ${t} not found`};let o=e?.trim()?e:"1=1",s=n.createQuery();s.where=o;try{let{extent:a,count:i}=await n.queryExtent(s);if(i===0)return{text:`No features found in ${n.title} matching: ${o}`,where:o};if(a)await r.goTo(a);else return{text:`Error: Unable to determine extent for ${n.title}`,where:o};let u={layerId:t,layerTitle:n.title??t,where:o,count:i};return{text:`Successfully zoomed to ${i} feature(s) in ${n.title} matching: ${o}`,where:o,sharedStatePatch:{lastNavigatedFeatures:{value:u}}}}catch(a){return console.error("Error in goToFeatures:",a),{text:`Error: ${a instanceof Error?a.message:"Unknown error"}`,where:o}}}async function ay({layerId:t,where:e},r){let{mapView:n}=Ye(r);return await sy(t,e,n)}var iy=A.object({layerId:A.string().describe("The layerId of the layer to zoom to."),where:A.string().describe("The sql-92 where clause used to query features to zoom to")}),ly=D(ay,{name:"goToFeatures",description:"Go to the features that match the given filter related to the given layerId.",schema:iy});async function uy(t){let e=new wg({xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:{wkid:4326}}).expand(.7);return await t.goTo(e),{text:"Successfully zoomed to world extent"}}async function cy(t,e){let{mapView:r}=Ye(e);return await uy(r)}var dy=A.object({}),py=D(cy,{name:"goToFullExtent",description:"Zooms the map to the full world extent using Esri's Geocoding Service.",schema:dy});async function my(t){let e=t.map.initialViewProperties?.viewpoint?.targetGeometry;if(e)await t.goTo(e);else throw new Error("Initial extent is undefined");return{text:"Successfully zoomed to home extent"}}async function fy(t,e){let{mapView:r}=Ye(e);return await my(r)}var hy=d.object({}),gy=D(fy,{name:"goToHomeExtent",description:"Go to the initial web map view extent",schema:hy});async function yy(t,e){await e.when();let r=e.map?.allLayers.find(o=>o.id===t);if(!r)return console.warn(`[goToLayer] No matching FeatureLayer found for: ${t}`),{text:`Could not find layer for: ${t}`};let n;return(r.type==="link-chart"||r.type==="knowledge-graph-sublayer")&&e.map?.activeLinkChartLayer?n=e.map.diagramNodesExtent:n=r.fullExtent,n?(await e.goTo(n),r.visible=!0,{text:`Successfully zoomed to: ${r.title??""}`}):{text:"Layer has no defined extent. Cannot zoom to layer."}}async function _y({layerId:t},e){let{mapView:r}=Ye(e);return await yy(t,r)}var wy=A.object({layerId:A.string().describe("The id of the layer to navigate to")}),by=D(_y,{name:"goToLayer",description:"Zooms the map view to the full extent of the top matching layer.",schema:wy});async function xy(t,e){return await e.goTo({scale:t}),{text:`Successfully zoomed to: ${t}`}}async function Ay({scale:t},e){let{mapView:r}=Ye(e);return await xy(t,r)}var Iy=d.object({scale:d.number().describe("The map scale of the view to go to.")}),vy=D(Ay,{name:"goToScale",description:"Go to the specified view scale.",schema:Iy});async function Ty(t,e,r){let n={target:new ip({longitude:t.longitude,latitude:t.latitude,spatialReference:{wkid:4326}})};return r?.zoom!==void 0&&(n.zoom=r.zoom),r?.scale!==void 0&&(n.scale=r.scale),await e.goTo(n),{text:`Successfully navigated to: ${[`(${t.latitude}\xB0, ${t.longitude}\xB0)`,r?.zoom!==void 0?`zoom ${r.zoom}`:"",r?.scale!==void 0?`scale 1:${r.scale}`:""].filter(Boolean).join(", ")}`}}async function Sy({center:t,zoom:e,scale:r},n){let{mapView:o}=Ye(n);return await Ty(t,o,{zoom:e,scale:r})}var ky=d.object({center:d.object({longitude:d.number().describe("The longitude (x-coordinate) of the point to navigate to."),latitude:d.number().describe("The latitude (y-coordinate) of the point to navigate to.")}),zoom:d.number().optional().describe("The zoom level. Higher values = more zoomed in."),scale:d.number().optional().describe("The map scale. Alternative to zoom. Smaller numbers = more zoomed in.")}),Cy=D(Sy,{name:"goToViewpoint",description:"Go to the specified viewpoint. This can contain a combination of scale, center, zoom, etc.",schema:ky});async function Ey(t,e){return await e.goTo({zoom:t}),{text:`Successfully zoomed to: ${t}`}}async function Oy({zoom:t},e){let{mapView:r}=Ye(e);return await Ey(t,r)}var My=d.object({zoom:d.number().min(1).max(20).describe("The zoom level of the view to go to.")}),Py=D(Oy,{name:"goToZoom",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.).',schema:My}),op=Object.assign({"../agents/arcgisKnowledge/prompts/arcgis_knowledge_current_lc_context.md":()=>import("./GOMFFUFI.js").then(t=>t.default),"../agents/arcgisKnowledge/prompts/arcgis_knowledge_current_map_context.md":()=>import("./HWLUVMK4.js").then(t=>t.default),"../agents/arcgisKnowledge/prompts/arcgis_knowledge_lucene_generation_prompt.md":()=>import("./65JPRIL4.js").then(t=>t.default),"../agents/arcgisKnowledge/prompts/arcgis_knowledge_summarize_result_prompt.md":()=>import("./7WH33C6J.js").then(t=>t.default),"../agents/arcgisKnowledge/prompts/arcgis_knowledge_tool_prompt.md":()=>import("./3AFLX4RZ.js").then(t=>t.default),"../agents/dataExploration/prompts/data_explore_filter_prompt.md":()=>import("./IBYY5ORN.js").then(t=>t.default),"../agents/dataExploration/prompts/data_explore_query_prompt.md":()=>import("./WHLL7DNC.js").then(t=>t.default),"../agents/dataExploration/prompts/summarize_query_response_prompt.md":()=>import("./R53CO5LK.js").then(t=>t.default),"../agents/help/prompts/help_prompt.md":()=>import("./QOCYNLQ7.js").then(t=>t.default),"../agents/layerStyling/prompts/layer_styling_prompt.md":()=>import("./SX4KDMYV.js").then(t=>t.default),"../agents/navigation/prompts/navigation_intent_prompt.md":()=>import("./ITFWXO7A.js").then(t=>t.default),"../agents/navigation/prompts/navigation_tool_prompt.md":()=>import("./TKQAFRBM.js").then(t=>t.default)});async function Wt(t){let e=Object.entries(op).find(([r])=>r.endsWith(`/${t}.md`));if(!e)throw new Error(`Prompt not found: ${t}
|
|
104
104
|
Available prompts:
|
|
105
105
|
${Object.keys(op).join(`
|
|
106
106
|
`)}`);return await e[1]()}var Xn=(t,e)=>{let r=t?.configurable?.services?.[e];if(r==null)throw new Error(`${e} missing in config.configurable.services`);return r};async function Ry(t){let{fields:e,layer:r,view:n,styleName:o,colorSchemeTags:s}=t,a;return s?a=xg({basemapTheme:await tp(n),geometryType:r.geometryType,includedTags:s,numColors:Math.min(e.length,8)})[0]:a=Ag({basemapTheme:await tp(n),geometryType:r.geometryType,numColors:Math.min(e.length,8)}).primaryScheme,{layer:r,view:n,attributes:e.map(i=>({field:i,label:r.fields.find(u=>u.name===i)?.alias??""})).slice(0,8),outlineOptimizationEnabled:!0,sizeOptimizationEnabled:!0,includeSizeVariable:o.includes("Size"),pieChartScheme:a}}async function $y(t){return await bg(t)}async function Ny({arcgisMap:t,arcgisMapView:e,layerId:r,fields:n,colorSchemes:o,includeSize:s}){let a=e,i=t?.allLayers.find(l=>l.id===r);if(!i)return`Could not find layer for id: ${r}`;let u={styleName:s?"chart-size":"chart",fields:n,layer:i,view:a,colorSchemeTags:o};try{let l=await Ry(u),c=await $y(l);return i.renderer=c.renderer,i.visible=!0,`Chart renderer applied to layer: ${i.title??i.id} using fields ${n.join(", ")}`}catch(l){return`Error applying chart renderer: ${l instanceof Error?l.message:String(l)}`}}var Ly=["mapView"];function je(t){let e=t?.configurable?.context;if(!e||typeof e!="object")throw new Error("LayerStylingAgent context missing");let r=Ly.filter(n=>!(n in e));if(r.length)throw new Error(`LayerStylingAgent context missing: ${r.join(", ")}`);return e}async function jy({layerId:t,fields:e,colorSchemes:r,includeSize:n},o){let{mapView:s}=je(o);return await _e({type:"show-legend",data:{layerIds:[t]}},o),await Ny({arcgisMap:s.map,arcgisMapView:s,layerId:t,fields:e,colorSchemes:r,includeSize:n})}var zy=d.object({layerId:d.string().describe("The id of the layer to apply the chart renderer to"),fields:d.array(d.string()).describe("The fields to use for the chart renderer (multiple numeric fields)"),colorSchemes:d.array(d.string()).optional().describe("Optional color scheme tags to use"),includeSize:d.boolean().optional().describe("Whether to vary the chart size (chart-size)")}),Dy=D(jy,{name:"chart",description:`Label: Charts
|
|
@@ -288,7 +288,9 @@ ${a}`};async function Sb(t,e){let r=await Wt("arcgis_knowledge_lucene_generation
|
|
|
288
288
|
This also includes questions that ask which feature meets a given condition or where a particular feature in the data is located (e.g., “Where is the spring with the highest elevation?”). However, this agent does not handle addresses.
|
|
289
289
|
_Example: “How many features are there?”_
|
|
290
290
|
_Example: “What’s the average population?”_
|
|
291
|
-
_Example: “Which values are in the status field?”_
|
|
291
|
+
_Example: “Which values are in the status field?”_
|
|
292
|
+
|
|
293
|
+
This agent does NOT handle help/metadata requests such as listing available layers, listing field names/columns/attributes for a layer, or capability guidance.`;var c2=String.raw`- **help** — Enables users to ask questions about the map, layers, fields, and it's capabilities.
|
|
292
294
|
|
|
293
295
|
_Example: “Tell me about this map”_
|
|
294
296
|
_Example: “List all layers in this map”_
|
|
@@ -297,9 +299,9 @@ ${a}`};async function Sb(t,e){let r=await Wt("arcgis_knowledge_lucene_generation
|
|
|
297
299
|
_Example: “What can you do?”_
|
|
298
300
|
_Example: “What can I ask”_
|
|
299
301
|
|
|
300
|
-
|
|
302
|
+
If the user asks unrelated queries like "What are the vowels in English alphabet" or "How to cook", call this agent so it can politely refuse and redirect to map-related questions.
|
|
301
303
|
|
|
302
|
-
IF the user asks map related queries, but those that are not performed by any of the agents, call this agent so we can respond
|
|
304
|
+
IF the user asks map related queries, but those that are not performed by any of the agents, call this agent so we can respond that the requested action is not supported.
|
|
303
305
|
_Example: "Create a chart"_
|
|
304
306
|
_Example: "Create a table"_`;var C2=String.raw`The purpose of this agent is to work with Knowledge Graph data, a graph database technology that represents and stores data as interconnected entities (nodes) and relationships (edges).
|
|
305
307
|
This agent has two categories of skills: those that work with an active link chart visualization of a subset of the data in the knowledge graph, and those that work with the knowledge graph data more generally against the entire dataset in the service and database.
|
|
@@ -36,8 +36,14 @@ This is the order of preference in case of overlap:
|
|
|
36
36
|
|
|
37
37
|
For example, "Where is Yosemite National Park". This is an address, but:
|
|
38
38
|
A map that contains a bookmark with Yosemite National Park should prefer the bookmark.
|
|
39
|
-
|
|
40
|
-
If these do not exist, geocode and go to that address.
|
|
39
|
+
If bookmark does not exist, a map that has the National Parks layer, for example, should prefer the feature.
|
|
40
|
+
If both of these do not exist, geocode and go to that address.
|
|
41
|
+
|
|
42
|
+
Additional mapping guidance:
|
|
43
|
+
|
|
44
|
+
- "zoom/go to [layer]" with no filter \u2192 prefer \`goToLayer\`.
|
|
45
|
+
- "zoom/go to [features] where/with ..." (has a condition/filter) \u2192 prefer \`goToFeatures\`.
|
|
46
|
+
- Explicit numeric zoom/scale/viewpoint requests \u2192 prefer the matching zoom/scale/viewpoint tool.
|
|
41
47
|
|
|
42
48
|
Return the name of the tool as a string.
|
|
43
49
|
`;export{e as default};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import"./CFDTXKJ6.js";var e=`## Who you are
|
|
3
|
+
|
|
4
|
+
You are a map assistant embedded inside a GIS application. You have no knowledge of history, science, people, events, cooking, or anything outside of this map and its data. You only know what is described in the Map Context below.
|
|
5
|
+
|
|
6
|
+
If asked anything outside of that context, you simply don't have that information \u2014 respond naturally and redirect to something you _can_ help with, using specific layer and field names from the map context.
|
|
7
|
+
|
|
8
|
+
Example of how to handle unknown topics:
|
|
9
|
+
"I don't have information on that \u2014 I only know about this map. You could ask me to list all layers in the map, or capabilities of this assistant."
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Your capabilities
|
|
14
|
+
|
|
15
|
+
You can help users with:
|
|
16
|
+
|
|
17
|
+
- Listing the layers in this map
|
|
18
|
+
- Listing the fields in a specific layer (use the tool)
|
|
19
|
+
- Suggesting specific queries using actual layer and field names
|
|
20
|
+
- Summarizing what this map contains and what users can do with it
|
|
21
|
+
- Letting users know when a map-related action isn't supported (e.g. charts, tables), and that it may be added in the future
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Input
|
|
26
|
+
|
|
27
|
+
Assigned task:
|
|
28
|
+
{assignedTask}
|
|
29
|
+
|
|
30
|
+
Latest user request:
|
|
31
|
+
{userRequest}
|
|
32
|
+
|
|
33
|
+
Prior steps:
|
|
34
|
+
{priorSteps}
|
|
35
|
+
|
|
36
|
+
Use the assigned task as the primary instruction. The question will **not** be restated again here.
|
|
37
|
+
Use the latest user request as supporting context.
|
|
38
|
+
Use prior steps only to explain a previous result, failure, or likely next action.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Map Context
|
|
43
|
+
|
|
44
|
+
{layerSummary}
|
|
45
|
+
|
|
46
|
+
## Available agents (capabilities)
|
|
47
|
+
|
|
48
|
+
{agents}
|
|
49
|
+
|
|
50
|
+
### Response Guidelines
|
|
51
|
+
|
|
52
|
+
When suggesting what users can ask, be SPECIFIC using actual layer names:
|
|
53
|
+
|
|
54
|
+
- "Show me water sources with elevation above 500"
|
|
55
|
+
- "Filter Protected Areas in Panama by protection level"
|
|
56
|
+
- "Zoom to Watershed Boundaries"
|
|
57
|
+
|
|
58
|
+
For "what can I ask" responses, provide 3-5 specific example queries using fields from the context.
|
|
59
|
+
|
|
60
|
+
For off-topic questions:
|
|
61
|
+
"I can only help with this map. Try asking me to filter [LayerName] by [FieldName], or zoom to a location."
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Format
|
|
66
|
+
|
|
67
|
+
- Keep responses concise
|
|
68
|
+
- Use bullet points for lists
|
|
69
|
+
- Use new lines (\\n) and appropriate formatting in your response
|
|
70
|
+
- Use actual layer and field names from the map context in any suggestions
|
|
71
|
+
`;export{e as default};
|
|
@@ -99,7 +99,7 @@ Do not reinterpret the request into a different form.
|
|
|
99
99
|
|
|
100
100
|
## Follow-up Reference Resolution
|
|
101
101
|
|
|
102
|
-
If the latest user request refers to prior results or prior context using a referential phrase such as "these", "those", "them", "that set",
|
|
102
|
+
If the latest user request refers to prior results or prior context using a referential phrase such as "these", "those", "them", "that set", "the previous results", "this", "it", "that one", "this parcel", "this location", or "that feature", then the request depends on earlier context.
|
|
103
103
|
|
|
104
104
|
This also applies to equivalent referential wording in other languages.
|
|
105
105
|
|
|
@@ -107,7 +107,7 @@ Resolve the reference using the most recent relevant chat history or successful
|
|
|
107
107
|
|
|
108
108
|
In this case, the \`assignedTask\` should be standalone and should preserve the referenced prior constraints while adding only the new constraint or question from the latest user request.
|
|
109
109
|
|
|
110
|
-
Do not leave ambiguous references like "these", "those", or "
|
|
110
|
+
Do not leave ambiguous references like "these", "those", "them", "this", or "it" in \`assignedTask\` when they can be resolved from context.
|
|
111
111
|
|
|
112
112
|
---
|
|
113
113
|
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import c from"./563BUCQX.js";import{a as $}from"./NX4L2LC2.js";import a from"./ZCL2V7W3.js";import{a as w,d as R}from"./BCUEYBNI.js";import{a as k}from"./FRVNZLZT.js";import{a as I}from"./4FBCSNC2.js";import"./7Q3D3AXJ.js";import{I as h,J as f,K as g,N as v,Q as b,R as y,h as u,j as l,v as d}from"./5VIEX6GS.js";import"./CFDTXKJ6.js";export default $arcgis.t(([C,j,{b:M},{p:S}])=>{var x=u`.thumbnail{object-fit:cover;max-height:8rem}.replacement-container{margin:.5rem}.replacement-message{margin-bottom:.5rem}.replacement-card__title{margin-bottom:.25rem}`,D=["360 VR Experience","Big Data Analytic","Dashboard","Data Pipeline","Deep Learning Studio Project","Discussion","Document Link","Excalibur Imagery Project","Feature Collection","Feature Service","Feed","Form","GeoBIM Application","GeoBIM Project","Hub Event","Hub Initiative","Hub Initiative Template","Hub Page","Hub Project","Image Service","Knowledge Graph","Knowledge Studio Project","Map Service","Map Showcase","Mission Report","Mission Template","Notebook","OGCFeatureServer","Ortho Mapping Project","Parquet Layer","Real Time Analytic","Route Layer","Scene Service","Solution","StoryMap","StoryMap Theme","Tile Layer","Urban Model","Urban Project","Vector Tile Service","Video Service","Web Experience","Web Experience Template","Web Map","Web Mapping Application","Web Scene","WFS","Workflow"],L=["3DInsetMap","3DScene","3DViz","AttachmentViewer","CapacityAnalysis","Cascade","Compare","Compare/Configure","Compare/Multiviewer","Compare/Search","Compare/SideBySideViewer_Configure","Compare/storytelling_compare","Compare/storytelling_sidepanel","Compare/storytelling_tabbed","Compare3d","CompareAnalysis","CompareMaps","CrowdsourceManager","CrowdsourcePolling","CrowdsourceReporter","Directions","Edit","Editor","Elevations","ElevationsProfile","Embed","Filter","FilterGallery","GeoForm","GeoList","GeoTour","HeaderFooter","Identify","ImageInterpretation","ImageMask","ImageVisit","ImageryViewer","ImpactSummary","InformationLookup","InteractiveFilter","InteractiveLegend","LayerShowcase","Legend","LiveMaps","LocalPerspective","MapAndAppGallery","MapCarousel","MapJournal","MapSeries","Shortlist","MapTools","MapTour","Media","MinimalGallery","Minimalist","MobileViewer","Nearby","OnePane","Panels","PanelsLegend","Profile","PublicGallery","PublicInformation","ServiceLookup","SimpleMapViewer","SimpleViewer","SocialMedia","Solutions/s2.html?app=apps2/FindEditFilter","Solutions/s2.html?app=apps2/Finder","Solutions/s2.html","StoryMapBasic","StorytellingSwipe","StorytellingTextLegend","Styler","SummaryViewer","Time","TimeAware","TwoPane","View","Viewer","ZoneLookup"],U=i=>{if(!i)return!1;let e=L.some(t=>{let a=t.includes(".html"),r=`/apps/${t}${a?"":"/"}`;return decodeURIComponent(i.url)?.includes(r)});return i.type==="Web Mapping Application"&&!!i.url&&e};function F(i){let e=["Cascade","MapTour","MapJournal","MapSeries","Shortlist","StoryMapCrowdsource","SwipeSpyglass","Story Map"];return i.type==="Web Mapping Application"&&(E(e,i)||V(i))}function V(i){return["Cascade","MapTour","MapJournal","MapSeries","Shortlist","StoryMapCrowdsource","StorytellingSwipe"].some(e=>{let t=`/apps/${e}/index.html`;return decodeURIComponent(i.url)?.includes(t)})}function E(i,e){return i?.some(t=>e?.typeKeywords?.includes(t))}function H(i){return!!i&&D.some(e=>i.type===e)}function A(i){let e=G(i);return y(`assets/portal-item-thumbnail/${e}`)}function G(i){let e=i.type?.toLowerCase(),t=i.typeKeywords||[];switch(e){case"web mapping application":return"webapp.avif";case"mobile application":return"mobileapp.avif";case"notebook code snippets":case"notebook code snippet library":return"notebookcodesnippets.avif";case"notebook":return"notebook.avif";case"style":return t.includes("Dictionary")?"dictionarystyle.avif":"style.avif";case"feature service":return t.includes("Location Tracking View")?"locationtrackingservice.avif":t.includes("IndoorPositioningDataService")?"indoor-positioning-data-service.avif":"default.avif";case"pro presentation":return"pro-presentation.avif";case"reality mapping project":return"realitymappingproject.avif";case"raster function template":return"rasterfunctiontemplate.avif";case"workforce project":return"workforceproject.avif";case"hub initiative":return"hubinitiative.avif";case"hub page":return"hubpage.avif";case"hub site application":case"site application":return"hubsite.avif";case"hub event":return"hubevent.avif";case"hub project":return"hubproject.avif";case"dashboard":return t.includes("ArcGIS Dashboards")?"dashboards.avif":"opsdashboard.avif";case"geoprocessing service":return t.includes("Notebook Web Tool")?"notebookwebtool.avif":"webtool.avif";case"web scene":case"scene service":return"scene.avif";case"ortho mapping project":return"orthomappingproject.avif";case"ortho mapping template":return"orthomappingtemplate.avif";case"insights theme":return"insightstheme.avif";case"insights workbook package":return"insightsworkbookpackage.avif";case"solution":return"solution.avif";case"mobile scene package":return"mobilescenepackage.avif";case"deep learning package":return"deeplearningpackage.avif";case"big data analytic":return"bigdataanalytic.avif";case"real time analytic":return"realtimeanalytic.avif";case"feed":return"feed.avif";case"excalibur imagery project":return"excaliburimageryproject.avif";case"storymap":return t?.includes("storymapcollection")?"storymapcollection.avif":"storymap.avif";case"survey123 add in":return"survey123addin.avif";case"mission":return"mission.avif";case"mission template":return"missiontemplate.avif";case"quickcapture project":return"quickcaptureproject.avif";case"pro report":return"proreport.avif";case"pro package":return"propackage.avif";case"pro report template":return"proreporttemplate.avif";case"urban model":return"urbanmodel.avif";case"urban project":return"urbanproject.avif";case"web experience":return"webexperience.avif";case"web experience template":return"webexperiencetemplate.avif";case"experience builder widget":return"experiencebuilderwidget.avif";case"experience builder widget package":return"experiencebuilderwidgetpackage.avif";case"workflow":return"workflow.avif";case"insights script":return"insightsscript.avif";case"kernel gateway connection":return"kernelgatewayconnection.avif";case"hub initiative template":return"hubinitiativetemplate.avif";case"image service":return t?.includes("Tile Imagery")?"tiledimagerylayer.avif":"imagerylayer.avif";case"mission report":return"missionreport.avif";case"administrative report":return"administrativereport.avif";case"storymap theme":return"storymaptheme.avif";case"knowledge graph":return"knowledgegraph.avif";case"knowledge graph layer":return"knowledgegraphlayer.avif";case"knowledge studio project":return"knowledgestudio.avif";case"earth configuration":return"earthconfiguration.avif";case"link chart":return"linkchart.avif";case"investigation":return"investigation.avif";case"apache parquet":return"apacheparquet.avif";case"curated collection":return"curatedcollection.avif";case"video service":return"mediaservice.avif";case"geodata service":return"geodataservice.avif";case"suitability model":return"suitabilitymodel.avif";case"esri classifier definition":return"classifierdefinition.avif";case"esri spectral library":return"spectrallibrary.avif";case"deep learning studio project":return"deeplearningstudioproject.avif";case"esri classification schema":return"classificationschema.avif";case"insights data engineering workbook":return"dataengineeringworkbook.avif";case"insights data engineering model":return"dataengineeringmodel.avif";case"discussion":return"discussion.avif";case"api key":return"apikey.avif";case"data pipeline":return"datapipeline.avif";case"analysis model":return"analysismodel.avif";case"service connection":return"serviceconnection.avif";case"xr experience":return"xrexperience.avif";case"3dtiles service":return t?.includes("GaussianSplat")?"gaussiansplatlayer.avif":"default.avif";default:return"default.avif"}}function _(i,e,t){let{restUrl:a}=i,r=B(i),o=r?`token=${r}`:"",s=`${a}/content/items/${e.id}`;if(e.thumbnail){let c=e.thumbnailUrl;if(c){let n=new URL(c);return n.searchParams.append("w","400"),n.href}return`${s}/info/${e.thumbnail}?w=400${r?"&":""}${o}`}else if(e.type==="Image")return`${s}/data?${o}`;return A(e)}function B(i){return i?.credential?.token||i?.token||i?.user?.credential?.token||i?.portalUser?.token||""}function O({portal:i,usePortalHostname:e}){let{customBaseUrl:t,portalHostname:a,urlKey:r}=i,{protocol:o}=window.location,s=!e&&r?`${r}.${t}`:a;return`${o}//${s}`}async function W(i){if(!i?.user)return[];let e=`${w(i)}portals/self/signinSettings`;return(await j(e,{query:{f:"json"}}))?.data.blockedApps||[]}var T=5e3,p=class extends g{constructor(){super(...arguments),this.replacementId=null,this.itemOwnerName="",this.replacementItemInRecycleBin=!1,this.hasInaccessibleReplacementItem=!1,this.replacementItemSupportsOpenActions=!1,this.thumbnailUrl=null,this.timer=void 0,this.messages=I({blocking:!0}),this.primaryActionRef=h(),this.getItemDetailsUrl=({portal:e,itemId:t,redirect:a})=>{let r=O({portal:e,usePortalHostname:!this.user});return r?`${`${r}/home`}/item.html?id=${t}${a?"&performRedirectAction=true":""}`:""},this.performRedirectAction=()=>{window.open(this.getItemDetailsUrl({portal:this.portal,itemId:this.replacementId,redirect:!0}),"_self")},this.viewItemDetailsPage=()=>{window.open(this.getItemDetailsUrl({portal:this.portal,itemId:this.replacementId??this.itemId}),this.supportsReplacement?"_self":"_blank")},this.canRedirect=!1,this.item=null,this.replacementItem=null,this.redirectAction=null,this.supportsReplacement=!1,this.redirectCancelled=!1,this.open=!1,this.redirectTimeRemaining=T/1e3,this.arcgisPortalReplacementItemFetch=d()}static{this.properties={item:16,replacementItem:16,redirectAction:16,supportsReplacement:16,redirectCancelled:16,open:16,redirectTimeRemaining:16,itemId:1,portal:0,user:0}}static{this.styles=x}async setFocus(){this.primaryActionRef.value?.setFocus()}willUpdate(e){(e.has("itemId")||e.has("portal")||e.has("user"))&&(this.user??=this.portal?.user??null,this.initItem())}setupTimer({onComplete:e}){typeof this.timer=="number"&&clearInterval(this.timer),this.redirectTimeRemaining=T/1e3,this.timer=setInterval(()=>{if(this.redirectTimeRemaining<=0){clearInterval(this.timer),this.timer=void 0,e();return}this.redirectTimeRemaining-=1},1e3)}cancelTimer({onCancel:e}={}){e?.(),clearInterval(this.timer)}handleClose(){this.cancelTimer(),this.itemId="",this.item=null,this.open=!1}cancelRedirect(){this.cancelTimer(),this.redirectCancelled=!0}isItemRetired(e){return U(e)||F(e)}async initItem(){if(!this.itemId)return;let{itemId:e,portal:t,performRedirectAction:a}=this,r=new C({id:e,portal:t});this.item=await r?.load();let o=await S(e,t,{relationshipType:"ReplacementItem2Item",direction:"reverse"},!0),s=o.data?.relatedItems?.[0];this.replacementItemInRecycleBin=s?.inRecycleBin;let c=s?.id,n=!this.replacementItemInRecycleBin&&c?new C({id:c,portal:t}):null;await n?.load(),this.replacementItem=n,this.hasInaccessibleReplacementItem=this.replacementItemInRecycleBin||!n&&o.data?.aggregations?.total?.count>0&&o.data?.relatedItems?.length===0,this.arcgisPortalReplacementItemFetch.emit({replacementItem:this.hasInaccessibleReplacementItem?{}:n||null}),this.replacementItem=n;let m=this.replacementItem?.owner??(r?.owner||null);this.itemOwnerName=m?$(await M(m,t),this.messages?._t9nLocale||"en"):"",this.replacementItemSupportsOpenActions=H(n),this.thumbnailUrl=_(t,n??this.item),this.supportsReplacement=!!n&&this.isItemRetired(r);let P=R(this.replacementItem,await W(this.portal),this.portal?.isPortal??!1);this.canRedirect=this.supportsReplacement&&this.replacementItemSupportsOpenActions&&!P,this.replacementId=n?.id||null,this.canRedirect&&this.setupTimer({onComplete:()=>a()}),this.open=!0}getReplacementHeading(){let{messages:e,hasInaccessibleReplacementItem:t,canRedirect:a}=this;return t?e.replacementUnavailable:a?e.redirectToReplacement:this.isItemRetired(this.item)&&!this.replacementItem?e.replacementUnavailable:e.replacementAvailable}getReplacementMessage(){let{messages:e,hasInaccessibleReplacementItem:t,supportsReplacement:a}=this;return t?e.retiredReplacementUnavailable:a?e.deprecatedHasReplacement:this.isItemRetired(this.item)&&!this.replacementItem?e.retired:e.deprecatedHasReplacement}getRedirectActionMessage(){let{messages:e,canRedirect:t,redirectTimeRemaining:a,redirectCancelled:r}=this;return r?e.redirectToReplacement:t?e.redirect.replace("${seconds}",`${a}`):e.moreDetails}renderCard(e){let{canRedirect:t,messages:a}=this;return l`<calcite-card thumbnail-position=inline-start><img slot=thumbnail class="thumbnail" src=${(this.thumbnailUrl||void 0)??v} @error=${async()=>this.thumbnailUrl=A(e)}><span slot=heading class="replacement-card__title">${e.title}</span><span slot=description>${a.ownedBy?.replace("${owner}",this.itemOwnerName)}</span>${t&&l`<calcite-link slot=footer-start icon-end=launch .href=${this.getItemDetailsUrl({portal:this.portal,itemId:this.replacementId})} target=_blank>${a.moreDetails}</calcite-link>`||""}</calcite-card>`}render(){let{open:e,messages:t,item:a,replacementItem:r,supportsReplacement:o,canRedirect:s,redirectCancelled:c}=this;if(!(!a||!this.isItemRetired(a)))return l`<calcite-dialog modal .open=${e} width=s kind=info outside-close-disabled escape-disabled close-disabled .heading=${this.getReplacementHeading()} @calciteDialogClose=${()=>this.handleClose()}><div class="replacement-container"><div class="replacement-message">${k(this.getReplacementMessage()?.replace("${itemTitle}",this.item?.title||""))}</div>${this.renderCard(o?r:a)}</div>${s&&!c&&l`<calcite-button slot=footer-end appearance=outline-fill kind=neutral @click=${()=>{this.cancelRedirect()}}>${t.cancelRedirection}</calcite-button>`||""}<calcite-button slot=footer-end @click=${()=>{this.cancelTimer(),s?this.performRedirectAction():this.viewItemDetailsPage()}} .iconEnd=${s?void 0:"launch"} ${f(this.primaryActionRef)}>${this.getRedirectActionMessage()}</calcite-button></calcite-dialog>`}};b("arcgis-portal-replacement-item-redirect",p);return p},"portal/PortalItem","request",a,c)
|
package/dist/cdn/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{P as t,z as e}from"./5VIEX6GS.js";import"./CFDTXKJ6.js";var a=e(t,{"arcgis-portal-ai-assistant":[()=>import("./
|
|
2
|
+
import{P as t,z as e}from"./5VIEX6GS.js";import"./CFDTXKJ6.js";var a=e(t,{"arcgis-portal-ai-assistant":[()=>import("./AUPPNYF4.js"),"autoDestroyDisabled,config:,defaultClosed,portal:,t9n:,user:"],"arcgis-portal-ai-assistant-interrupt":[()=>import("./NAHJANQG.js"),"_messages:,message,options:,type"],"arcgis-portal-classification-banner":[()=>import("./C6HTHJ5W.js"),"autoDestroyDisabled,messages:,missingExistingClassification,portalItem:,validationErrors,variant;destroy"],"arcgis-portal-classification-config":[()=>import("./LKLAXEHM.js"),"autoDestroyDisabled,messages:,portalItem:,status,valid,values;destroy,resetForm,validateForm"],"arcgis-portal-classification-favorite":[()=>import("./KEVMR5QG.js"),"attributeExpressionResults:,classificationValue:,favoriteClassifications:,messages:,portalItem:,resetFavoriteClassification:,selectedFavoriteClassificationName,updateClassificationData:"],"arcgis-portal-classification-form-element":[()=>import("./67WUTPBQ.js"),"attribute:,attributeKey,isRequiredErrors:,messages:,renderingInfo:,value:"],"arcgis-portal-extent-picker":[()=>import("./2ABZFT7G.js"),"active,contentOnly,extentService,extentValue:,isArea,itemId,messages:,portal:;;getExtent"],"arcgis-portal-extent-picker-coord-field":[()=>import("./UYD5L3IR.js"),"errorMessage,inputId,label,max,min,relatedErrorMessage,validateRelated:,value;;checkRelatedField,isValid,setFocus"],"arcgis-portal-field-delete":[()=>import("./ZL7EYBKM.js"),"config:,fieldNames:,layer:,mapView:,messages:,options:"],"arcgis-portal-item-type":[()=>import("./Z2DICVLO.js"),"ellipsis,hideIcon,hideText,item:,messages:,portal:,scale,serviceInfo:,showHosted,user:"],"arcgis-portal-mentionable-text-area":[()=>import("./SRYDUSYI.js"),"disabled,maxLength,placeholder,popoverListLabel,popoverPlacement,portal:,readOnly,rows,scale,starters:,user:,value;closePopover,focusTextArea,selectItem"],"arcgis-portal-replacement-item-redirect":[()=>import("./WTBERF4M.js"),"itemId,messages:,portal:,user:;setFocus"],"arcgis-portal-user-avatar":[()=>import("./VZPD2CO7.js"),"checkOnline,description,heading,hideAvatar,messages:,portal:,scale,showName,underline,user:,username,wrap"],"arcgis-portal-voice-input":[()=>import("./CLWV5VFU.js"),"language;clearText,startListening,stopListening"]});a({resourcesUrl:import.meta.url});var s=new CSSStyleSheet;s.replaceSync("@layer{:not([hydrated]):is(arcgis-portal-ai-assistant,arcgis-portal-ai-assistant-interrupt,arcgis-portal-classification-banner,arcgis-portal-classification-config,arcgis-portal-classification-favorite,arcgis-portal-classification-form-element,arcgis-portal-extent-picker,arcgis-portal-field-delete,arcgis-portal-item-type,arcgis-portal-mentionable-text-area,arcgis-portal-replacement-item-redirect,arcgis-portal-user-avatar,arcgis-portal-voice-input){visibility:hidden}}");document.adoptedStyleSheets=[...document.adoptedStyleSheets,s];window.$arcgis||Object.defineProperty(window,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),((a,r)=>{a.t=(c,...x)=>Promise.all(x.map(x=>x.then?x:(!a?.forceESM&&a?.import||(x=>import(x+".js").then(m=>m.default??m)))("@arcgis/core/"+x))).then(c);r.p=a.t(([m])=>{r.t=m.trackAccess;r.o=m.createObservable;r.c=m.createTrackingTarget;r.r=m.runTracked},"applications/Components/reactiveUtils")})($arcgis,t)
|
|
@@ -11,7 +11,7 @@ import { g as T, b as $ } from "../../chunks/portal.js";
|
|
|
11
11
|
import C from "@arcgis/core/request.js";
|
|
12
12
|
import { f as P } from "../../chunks/user2.js";
|
|
13
13
|
import { g as A } from "../../chunks/user.js";
|
|
14
|
-
const U = M`.thumbnail-
|
|
14
|
+
const U = M`.thumbnail{object-fit:cover;max-height:8rem}.replacement-container{margin:.5rem}.replacement-message{margin-bottom:.5rem}.replacement-card__title{margin-bottom:.25rem}`, j = [
|
|
15
15
|
"360 VR Experience",
|
|
16
16
|
"Big Data Analytic",
|
|
17
17
|
"Dashboard",
|