@arcgis/core 4.30.0-next.20240319 → 4.30.0-next.20240321
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/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{ef19c4fabc3682fc7aa7.js → 0b1ccc2cfb7a6361eae6.js} +1 -1
- package/assets/esri/core/workers/chunks/{2d0a01d0957b3e4512f6.js → 2cc832f9f5b10817f300.js} +1 -1
- package/assets/esri/core/workers/chunks/{95d7b168991ddb3a96ca.js → 2fe91a15fcdae540babe.js} +1 -1
- package/assets/esri/core/workers/chunks/4be6d5660ec1c8ac7606.js +1 -0
- package/assets/esri/core/workers/chunks/4f854e0e3a65b768f6be.js +1 -0
- package/assets/esri/core/workers/chunks/505f35a02ac6a67a255b.js +1 -0
- package/assets/esri/core/workers/chunks/{51fc02ce8cab70b363b1.js → 5162ba2975b4b025590e.js} +1 -1
- package/assets/esri/core/workers/chunks/51700be6f50efba0bc82.js +1 -0
- package/assets/esri/core/workers/chunks/{766ca6ab0d11ab637278.js → 52274afa07468bc555aa.js} +1 -1
- package/assets/esri/core/workers/chunks/5628fa534b2560933230.js +1 -0
- package/assets/esri/core/workers/chunks/689a122c77b39e5c73eb.js +1 -0
- package/assets/esri/core/workers/chunks/7530fef3ee217643898e.js +1 -0
- package/assets/esri/core/workers/chunks/75bd66a0a1b42e057c1a.js +1 -0
- package/assets/esri/core/workers/chunks/7819a446d3c9749ff74f.js +1 -0
- package/assets/esri/core/workers/chunks/7ca976273f1f64f75aa7.js +1 -0
- package/assets/esri/core/workers/chunks/{36d697a3788b86f24588.js → 9403e2ee9c97488ce4f0.js} +1 -1
- package/assets/esri/core/workers/chunks/a0de5ad1d08f511cf3d8.js +1 -0
- package/assets/esri/core/workers/chunks/b3cd5f8691ba0b5b5729.js +1 -0
- package/assets/esri/core/workers/chunks/b3d905c6b100831ad3c4.js +1 -0
- package/assets/esri/core/workers/chunks/{50a7742a7e7f7eda5bee.js → df38774f63984be0a478.js} +1 -1
- package/assets/esri/core/workers/chunks/e22a13ff683d207e0434.js +1 -0
- package/assets/esri/core/workers/chunks/e93cc8cdeaaf81210dc2.js +1 -0
- package/assets/esri/core/workers/chunks/{ac8606f2e4719c96a732.js → ee1345b212cde1ff4755.js} +1 -1
- package/assets/esri/core/workers/chunks/eecb0064c5343e88bfde.js +1 -0
- package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
- package/geometry/support/normalizeUtils.js +1 -1
- package/interfaces.d.ts +33 -106
- package/layers/SceneLayer.js +1 -1
- package/layers/graphics/sources/support/QueryTask.js +1 -1
- package/package.json +1 -1
- package/rest/geoprocessor/utils.js +1 -1
- package/rest/utils.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/AnimationManager.js +1 -1
- package/views/2d/FrameTask.js +1 -1
- package/views/2d/engine/webgl/ClippingInfo.js +1 -1
- package/views/2d/engine/webgl/Mesh2D.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/TechniqueDebugLayerView.js +1 -1
- package/views/2d/input/MapViewInputManager.js +1 -1
- package/views/2d/input/handlers/KeyPan.js +1 -1
- package/views/2d/input/handlers/KeyRotate.js +1 -1
- package/views/2d/layers/BaseDynamicLayerView2D.js +1 -1
- package/views/2d/layers/BaseLayerView2D.js +1 -1
- package/views/2d/layers/BaseLayerViewGL2D.js +1 -1
- package/views/2d/layers/CatalogDynamicGroupLayerView2D.js +1 -1
- package/views/2d/layers/CatalogLayerView2D.js +1 -1
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/2d/layers/GeoRSSLayerView2D.js +1 -1
- package/views/2d/layers/GraphicsLayerView2D.js +1 -1
- package/views/2d/layers/GroupLayerView2D.js +1 -1
- package/views/2d/layers/ImageryLayerView2D.js +1 -1
- package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
- package/views/2d/layers/KMLLayerView2D.js +1 -1
- package/views/2d/layers/KnowledgeGraphLayerView2D.js +1 -1
- package/views/2d/layers/MapImageLayerView2D.js +1 -1
- package/views/2d/layers/MapNotesLayerView2D.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/RouteLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/VectorTileLayerView2D.js +1 -1
- package/views/2d/layers/VideoLayerView2D.js +1 -1
- package/views/2d/layers/WMSLayerView2D.js +1 -1
- package/views/2d/layers/WMTSLayerView2D.js +1 -1
- package/views/2d/layers/features/sources/FeatureSourceQueryInfo.js +1 -1
- package/views/2d/layers/features/sources/strategies/AFetchLoadStrategy.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
- package/views/2d/navigation/MapViewNavigation.js +1 -1
- package/views/2d/navigation/ZoomBox.js +1 -1
- package/views/2d/navigation/actions/Pan.js +1 -1
- package/views/2d/navigation/actions/Pinch.js +1 -1
- package/views/2d/support/clippingUtils.js +5 -0
- package/views/2d/support/hitTestUtils.js +1 -1
- package/views/2d/viewpointUtils.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DElevationAlignment.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DScaleVisibility.js +1 -1
- package/views/3d/layers/graphics/GraphicsDeconflictor.js +1 -1
- package/views/3d/layers/graphics/GraphicsProcessor.js +1 -1
- package/views/3d/layers/graphics/Labeler.js +1 -1
- package/views/3d/layers/graphics/labelPlacement.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentIntersectionData.js +1 -1
- package/views/3d/webgl-engine/collections/Component/IntersectionGeometry.js +1 -1
- package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
- package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
- package/views/draw/DrawOperation.js +1 -1
- package/views/input/InputManager.js +1 -1
- package/views/input/keys.js +1 -1
- package/views/interactive/snapping/SnappingManager.js +1 -1
- package/widgets/BasemapLayerList.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/Grid/Grid.js +1 -1
- package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/LayerList.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/Popup.js +1 -1
- package/widgets/TableList.js +1 -1
- package/assets/esri/core/workers/chunks/13b6de78894ba1a70ace.js +0 -1
- package/assets/esri/core/workers/chunks/17a33c1eca0f2908b1a1.js +0 -1
- package/assets/esri/core/workers/chunks/187e056c251e69c9b5d2.js +0 -1
- package/assets/esri/core/workers/chunks/2427699e34e1895ed024.js +0 -1
- package/assets/esri/core/workers/chunks/4e9740f3955a8c45fb2d.js +0 -1
- package/assets/esri/core/workers/chunks/5c9e6d1a88fac48baf3a.js +0 -1
- package/assets/esri/core/workers/chunks/5f5f6bba98e5671e63a7.js +0 -1
- package/assets/esri/core/workers/chunks/7bba67d345da6eced804.js +0 -1
- package/assets/esri/core/workers/chunks/92fc6c48ff9f50a7351a.js +0 -1
- package/assets/esri/core/workers/chunks/955d7a0c8b2cdabfa8a3.js +0 -1
- package/assets/esri/core/workers/chunks/99283ac67e6b73695df7.js +0 -1
- package/assets/esri/core/workers/chunks/b9e8c2e2c5b4c9564319.js +0 -1
- package/assets/esri/core/workers/chunks/d344e99dd999aaaabbe3.js +0 -1
- package/assets/esri/core/workers/chunks/e78e92e024275eccea4e.js +0 -1
- package/assets/esri/core/workers/chunks/f7cfdba77cb614fd3725.js +0 -1
- package/assets/esri/core/workers/chunks/fc2a12f9e4068ab89628.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5613],{22429:(e,a,t)=>{t.d(a,{v:()=>n});var r=t(24183);class n{constructor(){this._serviceMetadatas=new Map,this._itemDatas=new Map}async fetchServiceMetadata(e,a){const t=this._serviceMetadatas.get(e);if(t)return t;const n=await(0,r.V)(e,a);return this._serviceMetadatas.set(e,n),n}async fetchItemData(e){const{id:a}=e;if(!a)return null;const{_itemDatas:t}=this;if(t.has(a))return t.get(a);const r=await e.fetchData();return t.set(a,r),r}async fetchCustomParameters(e,a){const t=await this.fetchItemData(e);return t&&"object"==typeof t&&(a?a(t):t.customParameters)||null}}},92009:(e,a,t)=>{t.d(a,{L:()=>o});var r=t(70333),n=t(78888),s=t(49186),i=t(74887),l=t(60694),c=t(20655),u=t(80812);async function o(e,a){const t=(0,l.qg)(e);if(!t)throw new s.A("invalid-url","Invalid scene service url");const o={...a,sceneServerUrl:t.url.path,layerId:t.sublayer??void 0};if(o.sceneLayerItem??=await async function(e){const a=(await y(e)).serviceItemId;if(!a)return null;const t=new u.default({id:a,apiKey:e.apiKey}),s=await async function(e){const a=r.id?.findServerInfo(e.sceneServerUrl);if(a?.owningSystemUrl)return a.owningSystemUrl;const t=e.sceneServerUrl.replace(/(.*\/rest)\/.*/i,"$1")+"/info";try{const a=(await(0,n.A)(t,{query:{f:"json"},responseType:"json",signal:e.signal})).data.owningSystemUrl;if(a)return a}catch(e){(0,i.QP)(e)}return null}(e);null!=s&&(t.portal=new c.A({url:s}));try{return t.load({signal:e.signal})}catch(e){return(0,i.QP)(e),null}}(o),null==o.sceneLayerItem)return d(o.sceneServerUrl.replace("/SceneServer","/FeatureServer"),o);const f=await async function({sceneLayerItem:e,signal:a}){if(!e)return null;try{const t=(await e.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},{signal:a})).find((e=>"Feature Service"===e.type))||null;if(!t)return null;const r=new u.default({portal:t.portal,id:t.id});return await r.load(),r}catch(e){return(0,i.QP)(e),null}}(o);if(!f?.url)throw new s.A("related-service-not-found","Could not find feature service through portal item relationship");o.featureServiceItem=f;const m=await d(f.url,o);return m.portalItem=f,m}async function y(e){if(e.rootDocument)return e.rootDocument;const a={query:{f:"json",...e.customParameters,token:e.apiKey},responseType:"json",signal:e.signal};try{const t=await(0,n.A)(e.sceneServerUrl,a);e.rootDocument=t.data}catch{e.rootDocument={}}return e.rootDocument}async function d(e,a){const t=(0,l.qg)(e);if(!t)throw new s.A("invalid-feature-service-url","Invalid feature service url");const r=t.url.path,i=a.layerId;if(null==i)return{serverUrl:r};const c=y(a),u=a.featureServiceItem?await a.featureServiceItem.fetchData("json"):null,o=(u?.layers?.[0]||u?.tables?.[0])?.customParameters,d=e=>{const t={query:{f:"json",...o},responseType:"json",authMode:e,signal:a.signal};return(0,n.A)(r,t)},f=d("anonymous").catch((()=>d("no-prompt"))),[m,w]=await Promise.all([f,c]),h=w?.layers,p=m.data&&m.data.layers;if(!Array.isArray(p))throw new Error("expected layers array");if(Array.isArray(h)){for(let e=0;e<Math.min(h.length,p.length);e++)if(h[e].id===i)return{serverUrl:r,layerId:p[e].id}}else if(null!=i&&i<p.length)return{serverUrl:r,layerId:p[i].id};throw new Error("could not find matching associated sublayer")}},23154:(e,a,t)=>{t.d(a,{K:()=>d,Q:()=>s});var r=t(24183);const n=new Set(["Catalog Layer","Feature Layer","Oriented Imagery Layer"]);async function s(e,a){const{loadContext:t,...n}=a||{},s=t?await t.fetchServiceMetadata(e,n):await(0,r.V)(e,n);y(s),c(s);const i={serviceJSON:s};if((s.currentVersion??0)<10.5)return i;const l=`${e}/layers`,u=t?await t.fetchServiceMetadata(l,n):await(0,r.V)(l,n);return y(u),c(u),i.layersJSON={layers:u.layers,tables:u.tables},i}function i(e){const{type:a}=e;return!!a&&n.has(a)}function l(e){return"Table"===e.type}function c(e){e.layers=e.layers?.filter(i),e.tables=e.tables?.filter(l)}function u(e){e.type||="Feature Layer"}function o(e){e.type||="Table"}function y(e){e.layers?.forEach(u),e.tables?.forEach(o)}function d(e){switch(e){case"Feature Layer":case"Table":return"FeatureLayer";case"Oriented Imagery Layer":return"OrientedImageryLayer";case"Catalog Layer":return"CatalogLayer"}return"FeatureLayer"}},4513:(e,a,t)=>{t.d(a,{S:()=>r});const r={BingMapsLayer:async()=>(await Promise.all([t.e(4045),t.e(3049),t.e(5513)]).then(t.bind(t,17029))).default,BuildingSceneLayer:async()=>(await Promise.all([t.e(4045),t.e(3049),t.e(3874),t.e(1147),t.e(1874),t.e(1132),t.e(7255),t.e(1956),t.e(5494),t.e(4665),t.e(9040),t.e(2933),t.e(4562),t.e(3600),t.e(4873),t.e(9345),t.e(347),t.e(2469),t.e(7784),t.e(2439)]).then(t.bind(t,88303))).default,CatalogLayer:async()=>(await Promise.all([t.e(4045),t.e(3049),t.e(3874),t.e(1147),t.e(1874),t.e(1132),t.e(7255),t.e(1956),t.e(5494),t.e(4665),t.e(2933),t.e(893),t.e(3622),t.e(2593),t.e(7778)]).then(t.bind(t,79003))).default,CSVLayer:async()=>(await Promise.all([t.e(4045),t.e(3049),t.e(3874),t.e(1147),t.e(1874),t.e(1132),t.e(7255),t.e(1956),t.e(5494),t.e(4665),t.e(9040),t.e(2933),t.e(4562),t.e(3600),t.e(5856)]).then(t.bind(t,72256))).default,DimensionLayer:async()=>(await Promise.all([t.e(4045),t.e(3477)]).then(t.bind(t,71493))).default,ElevationLayer:async()=>(await Promise.all([t.e(4045),t.e(4349),t.e(8612)]).then(t.bind(t,5111))).default,FeatureLayer:async()=>(await Promise.all([t.e(4045),t.e(3049),t.e(3874),t.e(1147),t.e(1874),t.e(1132),t.e(7255),t.e(1956),t.e(5494),t.e(4665),t.e(9040),t.e(2933),t.e(4562),t.e(3600),t.e(5899)]).then(t.bind(t,13600))).default,GeoJSONLayer:async()=>(await Promise.all([t.e(4045),t.e(3049),t.e(3874),t.e(1147),t.e(1874),t.e(1132),t.e(7255),t.e(1956),t.e(5494),t.e(4665),t.e(9040),t.e(8774)]).then(t.bind(t,17625))).default,GeoRSSLayer:async()=>(await Promise.all([t.e(4045),t.e(3049),t.e(1147),t.e(1874),t.e(6184)]).then(t.bind(t,63201))).default,GroupLayer:async()=>(await Promise.all([t.e(4045),t.e(1109)]).then(t.bind(t,85989))).default,ImageryLayer:async()=>(await Promise.all([t.e(4045),t.e(3049),t.e(3874),t.e(1147),t.e(1874),t.e(1132),t.e(7255),t.e(1956),t.e(893),t.e(984),t.e(833),t.e(3522)]).then(t.bind(t,5159))).default,ImageryTileLayer:async()=>(await Promise.all([t.e(4045),t.e(3049),t.e(3874),t.e(1147),t.e(1874),t.e(1132),t.e(7255),t.e(984),t.e(7139),t.e(833),t.e(4244)]).then(t.bind(t,257))).default,IntegratedMesh3DTilesLayer:async()=>(await Promise.all([t.e(4045),t.e(2472)]).then(t.bind(t,61528))).default,IntegratedMeshLayer:async()=>(await Promise.all([t.e(4045),t.e(9345),t.e(7619)]).then(t.bind(t,84453))).default,KMLLayer:async()=>(await Promise.all([t.e(4045),t.e(3049),t.e(3874),t.e(1147),t.e(1874),t.e(1132),t.e(7255),t.e(5494),t.e(4850)]).then(t.bind(t,79465))).default,LineOfSightLayer:async()=>(await Promise.all([t.e(4045),t.e(1204)]).then(t.bind(t,42452))).default,LinkChartLayer:async()=>(await Promise.all([t.e(3049),t.e(3874),t.e(1147),t.e(1874),t.e(1132),t.e(7255),t.e(1956),t.e(5494),t.e(9040),t.e(835),t.e(3886),t.e(3709),t.e(7202)]).then(t.bind(t,22780))).default,MapImageLayer:async()=>(await Promise.all([t.e(4045),t.e(3049),t.e(3874),t.e(1147),t.e(1874),t.e(1132),t.e(7255),t.e(1956),t.e(5494),t.e(4665),t.e(893),t.e(3622),t.e(4613),t.e(7656)]).then(t.bind(t,7656))).default,MapNotesLayer:async()=>(await Promise.all([t.e(4045),t.e(3049),t.e(3874),t.e(1147),t.e(1874),t.e(1132),t.e(7255),t.e(1956),t.e(5494),t.e(4665),t.e(9040),t.e(2933),t.e(4562),t.e(3600),t.e(8961)]).then(t.bind(t,35079))).default,MediaLayer:async()=>(await Promise.all([t.e(4045),t.e(8491)]).then(t.bind(t,87899))).default,OGCFeatureLayer:async()=>(await Promise.all([t.e(4045),t.e(3049),t.e(3874),t.e(1147),t.e(1874),t.e(1132),t.e(7255),t.e(1956),t.e(5494),t.e(4665),t.e(9040),t.e(8972),t.e(4591)]).then(t.bind(t,87152))).default,OpenStreetMapLayer:async()=>(await Promise.all([t.e(4045),t.e(3049),t.e(3526),t.e(349)]).then(t.bind(t,40349))).default,OrientedImageryLayer:async()=>(await Promise.all([t.e(4045),t.e(3049),t.e(3874),t.e(1147),t.e(1874),t.e(1132),t.e(7255),t.e(1956),t.e(5494),t.e(4665),t.e(9040),t.e(2933),t.e(4562),t.e(3600),t.e(5028)]).then(t.bind(t,16230))).default,PointCloudLayer:async()=>(await Promise.all([t.e(4045),t.e(3874),t.e(9345),t.e(3755)]).then(t.bind(t,76742))).default,RouteLayer:async()=>(await Promise.all([t.e(4045),t.e(3874),t.e(1147),t.e(1874),t.e(1132),t.e(7255),t.e(5494),t.e(3920)]).then(t.bind(t,97550))).default,SceneLayer:async()=>(await Promise.all([t.e(4045),t.e(3874),t.e(1147),t.e(1874),t.e(1132),t.e(7255),t.e(1956),t.e(5494),t.e(4665),t.e(3030),t.e(4873),t.e(9345),t.e(347),t.e(2469),t.e(7761),t.e(7738),t.e(7784),t.e(2209)]).then(t.bind(t,94568))).default,StreamLayer:async()=>(await Promise.all([t.e(4045),t.e(3049),t.e(3874),t.e(1147),t.e(1874),t.e(1132),t.e(7255),t.e(1956),t.e(5494),t.e(4665),t.e(9040),t.e(8228)]).then(t.bind(t,60683))).default,SubtypeGroupLayer:async()=>(await Promise.all([t.e(4045),t.e(3049),t.e(3874),t.e(1147),t.e(1874),t.e(1132),t.e(7255),t.e(1956),t.e(5494),t.e(4665),t.e(2933),t.e(4562),t.e(6888),t.e(4012)]).then(t.bind(t,70048))).default,TileLayer:async()=>(await Promise.all([t.e(4045),t.e(3049),t.e(3874),t.e(1147),t.e(1874),t.e(1132),t.e(7255),t.e(1956),t.e(5494),t.e(4665),t.e(893),t.e(3622),t.e(4349),t.e(4613),t.e(1756)]).then(t.bind(t,71756))).default,UnknownLayer:async()=>(await t.e(146).then(t.bind(t,146))).default,UnsupportedLayer:async()=>(await t.e(5165).then(t.bind(t,45165))).default,VectorTileLayer:async()=>(await Promise.all([t.e(4045),t.e(4349),t.e(9976),t.e(8705),t.e(1405)]).then(t.bind(t,64152))).default,VoxelLayer:async()=>(await Promise.all([t.e(4045),t.e(3874),t.e(9345),t.e(5720)]).then(t.bind(t,9006))).default,WFSLayer:async()=>(await Promise.all([t.e(4045),t.e(3049),t.e(3874),t.e(1147),t.e(1874),t.e(1132),t.e(7255),t.e(1956),t.e(5494),t.e(4665),t.e(9040),t.e(4322),t.e(951)]).then(t.bind(t,16350))).default,WMSLayer:async()=>(await Promise.all([t.e(4045),t.e(3049),t.e(3874),t.e(1147),t.e(1874),t.e(5181)]).then(t.bind(t,51904))).default,WMTSLayer:async()=>(await Promise.all([t.e(4045),t.e(3049),t.e(3526),t.e(309)]).then(t.bind(t,20309))).default,WebTileLayer:async()=>(await Promise.all([t.e(4045),t.e(3049),t.e(3526)]).then(t.bind(t,47314))).default}},66964:(e,a,t)=>{t.d(a,{Ju:()=>u,K8:()=>d,XH:()=>o,_r:()=>s,bO:()=>i,iK:()=>y,nu:()=>f,pJ:()=>l,rc:()=>c});var r=t(92009),n=t(23154);function s(e){const a={id:e.id,name:e.name},t=(0,n.K)(e.type);return"FeatureLayer"!==t&&(a.layerType=t),a}async function i(e,a,t){if(null==e?.layers||null==e?.tables){const r=await t.fetchServiceMetadata(a,{customParameters:l(e)?.customParameters});(e=e||{}).layers=e.layers||r?.layers?.map(s),e.tables=e.tables||r?.tables?.map(s)}return e}function l(e){if(!e)return null;const{layers:a,tables:t}=e;return a?.length?a[0]:t?.length?t[0]:null}function c(e,a){return null==a?null:[...e.layers||[],...e.tables||[]].find((e=>e.id===a))}function u(e,a){return[...e.layers||[],...e.tables||[]].filter((({layerType:e})=>"FeatureLayer"===a?!e:e===a))}function o(e){return(e?.layers?.length??0)+(e?.tables?.length??0)}function y(e){switch(e){case"catalog":return"CatalogLayer";case"feature":return"FeatureLayer";case"oriented-imagery":return"OrientedImageryLayer";case"subtype-group":return"SubtypeGroupLayer"}return null}function d(e){switch(e){case"CatalogLayer":return"CatalogLayer";case"OrientedImageryLayer":return"OrientedImageryLayer";case"SubtypeGroupLayer":return"SubtypeGroupLayer"}return"FeatureLayer"}async function f(e,a,t){if(!e?.url)return a??{};if(a??={},!a.layers){const r=await t.fetchServiceMetadata(e.url);a.layers=r.layers?.map(s)}const{serverUrl:n,portalItem:i}=await(0,r.L)(e.url,{sceneLayerItem:e,customParameters:l(a)?.customParameters}).catch((()=>({serverUrl:null,portalItem:null})));if(null==n)return a.tables=[],a;if(!a.tables&&i){const e=await i.fetchData();if(e?.tables)a.tables=e.tables.map(s);else{const r=await t.fetchServiceMetadata(n,{customParameters:l(e)?.customParameters});a.tables=r?.tables?.map(s)}}if(a.tables)for(const e of a.tables)e.url=`${n}/${e.id}`;return a}},45613:(e,a,t)=>{t.d(a,{fromItem:()=>d,n:()=>f});var r=t(49186),n=t(92009),s=t(23154),i=t(22429),l=t(83531),c=t(4513),u=t(80812),o=t(66964),y=t(10407);async function d(e){let{portalItem:a}=e;!a||a instanceof u.default||(a=new u.default(a));const t=await async function(e){await e.load();const a=new i.v;return async function(e){const a=e.className,t=c.S[a];return{constructor:await t(),properties:e.properties}}(await f(e,a))}(a);return new(0,t.constructor)({portalItem:a,...t.properties})}async function f(e,a){switch(e.type){case"3DTiles Service":return{className:"IntegratedMesh3DTilesLayer"};case"CSV":return{className:"CSVLayer"};case"Feature Collection":return async function(e){await e.load();const a=(0,y.Y)(e,"Map Notes"),t=(0,y.Y)(e,"Markup");if(a||t)return{className:"MapNotesLayer"};if((0,y.Y)(e,"Route Layer"))return{className:"RouteLayer"};const r=await e.fetchData();return 1===(0,o.XH)(r)?{className:"FeatureLayer"}:{className:"GroupLayer"}}(e);case"Feature Service":return async function(e,a){const t=await m(e,a);if("object"==typeof t){const{sourceJSON:e,className:a}=t,r={sourceJSON:e};return null!=t.id&&(r.layerId=t.id),{className:a||"FeatureLayer",properties:r}}return{className:"GroupLayer"}}(e,a);case"Feed":case"Stream Service":return{className:"StreamLayer"};case"GeoJson":return{className:"GeoJSONLayer"};case"Group Layer":return{className:"GroupLayer"};case"Image Service":return async function(e,a){await e.load();const t=e.typeKeywords?.map((e=>e.toLowerCase()))??[];if(t.includes("elevation 3d layer"))return{className:"ElevationLayer"};if(t.includes("tiled imagery"))return{className:"ImageryTileLayer"};const r=await a.fetchItemData(e),n=r?.layerType;if("ArcGISTiledImageServiceLayer"===n)return{className:"ImageryTileLayer"};if("ArcGISImageServiceLayer"===n)return{className:"ImageryLayer"};const s=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)}),i=s.cacheType?.toLowerCase(),l=s.capabilities?.toLowerCase().includes("tilesonly");return"map"===i||l?{className:"ImageryTileLayer"}:{className:"ImageryLayer"}}(e,a);case"KML":return{className:"KMLLayer"};case"Map Service":return async function(e,a){return await async function(e,a){const{tileInfo:t}=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)});return t}(e,a)?{className:"TileLayer"}:{className:"MapImageLayer"}}(e,a);case"Media Layer":return{className:"MediaLayer"};case"Scene Service":return async function(e,a){const t=await m(e,a,(async()=>{try{if(!e.url)return[];const{serverUrl:t}=await(0,n.L)(e.url,{sceneLayerItem:e}),r=await a.fetchServiceMetadata(t);return r?.tables??[]}catch{return[]}}));if("object"==typeof t){const r={};let n;if(null!=t.id?(r.layerId=t.id,n=`${e.url}/layers/${t.id}`):n=e.url,e.typeKeywords?.length)for(const a of Object.keys(l.XX))if(e.typeKeywords.includes(a))return{className:l.XX[a]};const s=await a.fetchServiceMetadata(n,{customParameters:await a.fetchCustomParameters(e,(e=>(0,o.pJ)(e)?.customParameters))});return{className:l.XX[s?.layerType]||"SceneLayer",properties:r}}if(!1===t){const t=await a.fetchServiceMetadata(e.url);if("Voxel"===t?.layerType)return{className:"VoxelLayer"}}return{className:"GroupLayer"}}(e,a);case"Vector Tile Service":return{className:"VectorTileLayer"};case"WFS":return{className:"WFSLayer"};case"WMS":return{className:"WMSLayer"};case"WMTS":return{className:"WMTSLayer"};default:throw new r.A("portal:unknown-item-type","Unknown item type '${type}'",{type:e.type})}}async function m(e,a,t){const{url:r,type:n}=e,i="Feature Service"===n;if(!r)return{};if(/\/\d+$/.test(r)){if(i){const t=await a.fetchServiceMetadata(r,{customParameters:await a.fetchCustomParameters(e,(e=>(0,o.pJ)(e)?.customParameters))});return{id:t.id,className:(0,s.K)(t.type),sourceJSON:t}}return{}}await e.load();let l=await a.fetchItemData(e);if(i){const e=await(0,o.bO)(l,r,a),t=w(e);if("object"==typeof t){const a=(0,o.rc)(e,t.id);t.className=(0,o.K8)(a?.layerType)}return t}if("Scene Service"===n&&(l=await(0,o.nu)(e,l,a)),(0,o.XH)(l)>0)return w(l);const c=await a.fetchServiceMetadata(r);return t&&(c.tables=await t()),w(c)}function w(e){return 1===(0,o.XH)(e)&&{id:(0,o.pJ)(e)?.id}}},24183:(e,a,t)=>{t.d(a,{V:()=>n});var r=t(78888);async function n(e,a){const{data:t}=await(0,r.A)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}});return t}}}]);
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../Color.js";import t from"../../../request.js";import{getOrCreateMapValue as r}from"../../../core/MapUtils.js";import{hasScaling as o,rad2deg as n}from"../../../core/mathUtils.js";import{normalFromMat4 as s}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as
|
|
5
|
+
import e from"../../../Color.js";import t from"../../../request.js";import{getOrCreateMapValue as r}from"../../../core/MapUtils.js";import{hasScaling as o,rad2deg as n}from"../../../core/mathUtils.js";import{normalFromMat4 as s}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as a}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{fromValues as i}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as l}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import u from"../MeshComponent.js";import c from"../MeshMaterialMetallicRoughness.js";import f from"../MeshTexture.js";import m from"../MeshTextureTransform.js";import{MeshVertexAttributes as p}from"../MeshVertexAttributes.js";import{BufferViewVec4f as g,BufferViewVec4u8 as x,BufferViewVec4u16 as d,BufferViewVec3u8 as T,BufferViewVec3f as h,BufferViewVec3u16 as v,BufferViewVec3f64 as w,BufferViewVec2f as b}from"../buffer/BufferView.js";import{d as j,c as y,e as M,f as C}from"../../../chunks/vec3.js";import{a as A,n as R,b as E}from"../../../chunks/vec4.js";import{createBuffer as B}from"../buffer/utils.js";import{georeferenceByTransform as F}from"./georeference.js";import{DefaultLoadingContext as $}from"../../../views/3d/glTF/DefaultLoadingContext.js";import{loadGLTF as S}from"../../../views/3d/glTF/loader.js";import{convertPrimitiveToTriangles as O}from"../../../views/3d/glTF/internal/indexUtils.js";import{isEncodedMeshTexture as k}from"../../../views/3d/glTF/internal/resourceUtils.js";import{colorGamma as U}from"../../../views/3d/webgl-engine/materials/DefaultMaterial_COLOR_GAMMA.js";import{TextureWrapMode as D}from"../../../views/webgl/enums.js";import{f as L,a as V}from"../../../chunks/vec33.js";import{f as _,a as I}from"../../../chunks/vec43.js";import{a as P,f as q}from"../../../chunks/vec2.js";async function N(e,t,r){const o=new $(z(r)),n=(await S(o,t,r,!0)).model,s=n.lods.shift(),a=new Map,i=new Map;n.textures.forEach(((e,t)=>a.set(t,H(e)))),n.materials.forEach(((e,t)=>i.set(t,J(e,a))));const l=Q(s);for(const p of l.parts)W(l,p,i);const{position:u,normal:c,tangent:f,color:m,texCoord0:g}=l.vertexAttributes,x={position:u.typedBuffer,normal:null!=c?c.typedBuffer:null,tangent:null!=f?f.typedBuffer:null,uv:null!=g?g.typedBuffer:null,color:null!=m?m.typedBuffer:null},d=F(x,e,r);return{transform:d.transform,vertexSpace:d.vertexSpace,components:l.components,spatialReference:e.spatialReference,vertexAttributes:new p({position:d.vertexAttributes.position,normal:d.vertexAttributes.normal,tangent:d.vertexAttributes.tangent,color:x.color,uv:x.uv})}}function z(e){const r=e?.resolveFile;return r?{busy:!1,request:async(e,o,n)=>{const s=r?.(e)??e,a="image"===o?"image":"binary"===o?"array-buffer":"json";return(await t(s,{responseType:a,signal:n?.signal,timeout:0})).data}}:null}function G(e,t){if(null==e)return"-";const o=e.typedBuffer;return`${r(t,o.buffer,(()=>t.size))}/${o.byteOffset}/${o.byteLength}`}function K(e){return null!=e?e.toString():"-"}function Q(e){let t=0;const has={color:!1,tangent:!1,normal:!1,texCoord0:!1},o=new Map,n=new Map,s=[];for(const a of e.parts){const{attributes:{position:e,normal:i,color:l,tangent:u,texCoord0:c}}=a,f=`\n ${G(e,o)}/\n ${G(i,o)}/\n ${G(l,o)}/\n ${G(u,o)}/\n ${G(c,o)}/\n ${K(a.transform)}\n `;let m=!1;const p=r(n,f,(()=>(m=!0,{start:t,length:e.count})));m&&(t+=e.count),i&&(has.normal=!0),l&&(has.color=!0),u&&(has.tangent=!0),c&&(has.texCoord0=!0),s.push({gltf:a,writeVertices:m,region:p})}return{vertexAttributes:{position:B(w,t),normal:has.normal?B(h,t):null,tangent:has.tangent?B(g,t):null,color:has.color?B(x,t):null,texCoord0:has.texCoord0?B(b,t):null},parts:s,components:[]}}function H(e){return new f({data:(k(e.data),e.data),wrap:Z(e.parameters.wrap)})}function J(t,r){const o=new e(re(t.color,t.opacity)),s=t.emissiveFactor?new e(oe(t.emissiveFactor)):null,a=e=>e?new m({scale:e.scale?[e.scale[0],e.scale[1]]:[1,1],rotation:n(e.rotation??0),offset:e.offset?[e.offset[0],e.offset[1]]:[0,0]}):null;return new c({color:o,colorTexture:r.get(t.textureColor),normalTexture:r.get(t.textureNormal),emissiveColor:s,emissiveTexture:r.get(t.textureEmissive),occlusionTexture:r.get(t.textureOcclusion),alphaMode:Y(t.alphaMode),alphaCutoff:t.alphaCutoff,doubleSided:t.doubleSided,metallic:t.metallicFactor,roughness:t.roughnessFactor,metallicRoughnessTexture:r.get(t.textureMetallicRoughness),colorTextureTransform:a(t.colorTextureTransform),normalTextureTransform:a(t.normalTextureTransform),occlusionTextureTransform:a(t.occlusionTextureTransform),emissiveTextureTransform:a(t.emissiveTextureTransform),metallicRoughnessTextureTransform:a(t.metallicRoughnessTextureTransform)})}function W(e,t,r){t.writeVertices&&X(e,t);const{indices:o,attributes:n,primitiveType:s,material:a}=t.gltf;let i=O(o||n.position.count,s);const l=t.region.start;if(l){const e=new Uint32Array(i);for(let t=0;t<i.length;t++)e[t]+=l;i=e}e.components.push(new u({name:t.gltf.name,faces:i,material:r.get(a),shading:n.normal?"source":"flat",trustSourceNormals:!0}))}function X(e,t){const{position:r,normal:n,tangent:i,color:l,texCoord0:u}=e.vertexAttributes,c=t.region.start,{attributes:f,transform:m}=t.gltf,p=f.position.count;if(j(r.slice(c,p),f.position,m),null!=f.normal&&null!=n){const e=s(a(),m),t=n.slice(c,p);y(t,f.normal,e),o(e)&&M(t,t)}else null!=n&&L(n,0,0,1,{dstIndex:c,count:p});if(null!=f.tangent&&null!=i){const e=s(a(),m),t=i.slice(c,p);A(t,f.tangent,e),o(e)&&R(t,t)}else null!=i&&_(i,0,0,1,1,{dstIndex:c,count:p});if(null!=f.texCoord0&&null!=u?P(u.slice(c,p),f.texCoord0):null!=u&&q(u,0,0,{dstIndex:c,count:p}),null!=f.color&&null!=l){const e=f.color,t=l.slice(c,p);if(4===e.elementCount)e instanceof g?E(t,e,255):e instanceof x?I(t,e):e instanceof d&&E(t,e,1/256);else{_(t,255,255,255,255);const r=T.fromTypedArray(t.typedBuffer,t.typedBufferStride);e instanceof h?C(r,e,255):e instanceof T?V(r,e):e instanceof v&&C(r,e,1/256)}}else null!=l&&_(l.slice(c,p),255,255,255,255)}function Y(e){switch(e){case"OPAQUE":return"opaque";case"MASK":return"mask";case"BLEND":return"blend"}}function Z(e){return{horizontal:ee(e.s),vertical:ee(e.t)}}function ee(e){switch(e){case D.CLAMP_TO_EDGE:return"clamp";case D.MIRRORED_REPEAT:return"mirror";case D.REPEAT:return"repeat"}}function te(e){return e**(1/U)*255}function re(e,t){return l(te(e[0]),te(e[1]),te(e[2]),t)}function oe(e){return i(te(e[0]),te(e[1]),te(e[2]))}export{N as loadGLTFMesh};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import t from"../../config.js";import e from"../../core/Error.js";import n from"../../core/Logger.js";import
|
|
5
|
+
import t from"../../config.js";import e from"../../core/Error.js";import n from"../../core/Logger.js";import o from"../Polygon.js";import s from"../Polyline.js";import{getGeometryParts as r,cutParams as i,offsetMagnitude as l,updatePolyGeometry as c}from"./normalizeUtilsCommon.js";import{getInfo as f}from"./spatialReferenceUtils.js";import{geographicToWebMercator as u,webMercatorToGeographic as p}from"./webMercatorUtils.js";import{cut as a}from"../../rest/geometryService/cut.js";import{simplify as h}from"../../rest/geometryService/simplify.js";const m=()=>n.getLogger("esri.geometry.support.normalizeUtils");function g(t){return"polygon"===t.type}function y(t){return"polygon"===t[0].type}function x(t){return"polyline"===t[0].type}function d(t){const e=[];let n=0,o=0;for(let s=0;s<t.length;s++){const r=t[s];let i=null;for(let t=0;t<r.length;t++)i=r[t],e.push(i),0===t?(n=i[0],o=n):(n=Math.min(n,i[0]),o=Math.max(o,i[0]));i&&e.push([(n+o)/2,0])}return e}function M(t,n){if(!(t instanceof s||t instanceof o)){const t="straightLineDensify: the input geometry is neither polyline nor polygon";throw m().error(t),new e(t)}const i=r(t),l=[];for(const e of i){const t=[];l.push(t),t.push([e[0][0],e[0][1]]);for(let o=0;o<e.length-1;o++){const s=e[o][0],r=e[o][1],i=e[o+1][0],l=e[o+1][1],c=Math.sqrt((i-s)*(i-s)+(l-r)*(l-r)),f=(l-r)/c,u=(i-s)/c,p=c/n;if(p>1){for(let l=1;l<=p-1;l++){const e=l*n,o=u*e+s,i=f*e+r;t.push([o,i])}const e=(c+Math.floor(p-1)*n)/2,o=u*e+s,i=f*e+r;t.push([o,i])}t.push([i,l])}}return g(t)?new o({rings:l,spatialReference:t.spatialReference}):new s({paths:l,spatialReference:t.spatialReference})}function w(t,e,n){if(e){const e=M(t,1e6);t=p(e,!0)}return n&&(t=c(t,n)),t}function b(t,e,n){if(Array.isArray(t)){const o=t[0];if(o>e){const n=l(o,e);t[0]=o+n*(-2*e)}else if(o<n){const e=l(o,n);t[0]=o+e*(-2*n)}}else{const o=t.x;if(o>e){const n=l(o,e);t=t.clone().offset(n*(-2*e),0)}else if(o<n){const e=l(o,n);t=t.clone().offset(e*(-2*n),0)}}return t}function j(t,e){let n=-1;for(let o=0;o<e.cutIndexes.length;o++){const s=e.cutIndexes[o],i=e.geometries[o],c=r(i);for(let t=0;t<c.length;t++){const e=c[t];e.some((n=>{if(n[0]<180)return!0;{let n=0;for(let t=0;t<e.length;t++){const o=e[t][0];n=o>n?o:n}n=Number(n.toFixed(9));const o=-360*l(n,180);for(let s=0;s<e.length;s++){const e=i.getPoint(t,s);i.setPoint(t,s,e.clone().offset(o,0))}return!0}}))}if(s===n){if(y(t))for(const e of r(i))t[s]=t[s].addRing(e);else if(x(t))for(const e of r(i))t[s]=t[s].addPath(e)}else n=s,t[s]=i}return t}async function R(e,n,r){if(!Array.isArray(e))return R([e],n);n&&"string"!=typeof n&&m().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const p="string"==typeof n?n:n?.url??t.geometryServiceUrl;let g,y,x,d,M,v,P,L,U=0;const z=[],A=[];for(const t of e)if(null!=t)if(g||(g=t.spatialReference,y=f(g),x=g.isWebMercator,v=x?102100:4326,d=i[v].maxX,M=i[v].minX,P=i[v].plus180Line,L=i[v].minus180Line),y)if("mesh"===t.type)A.push(t);else if("point"===t.type)A.push(b(t.clone(),d,M));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((t=>b(t,d,M))),A.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,y);A.push(e.rings?new o(e):e)}else if(t.extent){const e=t.extent,n=l(e.xmin,M)*(2*d);let o=0===n?t.clone():c(t.clone(),n);e.offset(n,0);let{xmin:s,xmax:r}=e;s=Number(s.toFixed(9)),r=Number(r.toFixed(9)),e.intersects(P)&&r!==d?(U=r>U?r:U,o=w(o,x),z.push(o),A.push("cut")):e.intersects(L)&&s!==M?(U=r*(2*d)>U?r*(2*d):U,o=w(o,x,360),z.push(o),A.push("cut")):A.push(o)}else A.push(t.clone());else A.push(t);else A.push(t);let F=l(U,d),N=-90;const S=F,k=new s;for(;F>0;){const t=360*F-180;k.addPath([[t,N],[t,-1*N]]),N*=-1,F--}if(z.length>0&&S>0){const t=j(z,await a(p,z,k,r)),n=[],o=[];for(let r=0;r<A.length;r++){const s=A[r];if("cut"!==s)o.push(s);else{const s=t.shift(),i=e[r];null!=i&&"polygon"===i.type&&i.rings&&i.rings.length>1&&s.rings.length>=i.rings.length?(n.push(s),o.push("simplify")):o.push(x?u(s):s)}}if(!n.length)return o;const s=await h(p,n,r),i=[];for(let e=0;e<o.length;e++){const t=o[e];"simplify"!==t?i.push(t):i.push(x?u(s.shift()):s.shift())}return i}const C=[];for(let t=0;t<A.length;t++){const e=A[t];if("cut"!==e)C.push(e);else{const t=z.shift();C.push(!0===x?u(t):t)}}return C}function v(t){if(!t)return null;const e=t.extent;if(!e)return null;const n=t.spatialReference&&f(t.spatialReference);if(!n)return e;const[o,s]=n.valid,r=2*s,{width:i}=e;let l,{xmin:c,xmax:u}=e;if([c,u]=[u,c],"extent"===t.type||0===i||i<=s||i>r||c<o||u>s)return e;switch(t.type){case"polygon":if(!(t.rings.length>1))return e;l=d(t.rings);break;case"polyline":if(!(t.paths.length>1))return e;l=d(t.paths);break;case"multipoint":l=t.points}const p=e.clone();for(let f=0;f<l.length;f++){let t=l[f][0];t<0?(t+=s,u=Math.max(t,u)):(t-=s,c=Math.min(t,c))}return p.xmin=c,p.xmax=u,p.width<i?(p.xmin-=s,p.xmax-=s,p):e}function P(t,e,n){const o=f(n);if(null==o)return t;const[s,r]=o.valid,i=2*r;let l=0,c=0;e>r?l=Math.ceil(Math.abs(e-r)/i):e<s&&(l=-Math.ceil(Math.abs(e-s)/i)),t>r?c=Math.ceil(Math.abs(t-r)/i):t<s&&(c=-Math.ceil(Math.abs(t-s)/i));let u=t+(l-c)*i;const p=u-e;return p>r?u-=i:p<s&&(u+=i),u}function L(t,e){const n=f(e);if(n){const[e,o]=n.valid,s=o-e;if(t<e)for(;t<e;)t+=s;if(t>o)for(;t>o;)t-=s}return t}export{P as getClosestDenormalizedXToReference,v as getDenormalizedExtent,R as normalizeCentralMeridian,L as normalizeMapX,M as straightLineDensify};
|
package/interfaces.d.ts
CHANGED
|
@@ -206,7 +206,6 @@ declare namespace __esri {
|
|
|
206
206
|
export type FeatureLayerRefreshEventHandler = (event: FeatureLayerRefreshEvent) => void;
|
|
207
207
|
export type FeaturesTriggerActionEventHandler = (event: FeaturesTriggerActionEvent) => void;
|
|
208
208
|
export type FeaturesViewModelTriggerActionEventHandler = (event: FeaturesViewModelTriggerActionEvent) => void;
|
|
209
|
-
export type FeatureTableSelectionChangeEventHandler = (event: FeatureTableSelectionChangeEvent) => void;
|
|
210
209
|
export type FeatureTemplatesSelectEventHandler = (event: FeatureTemplatesSelectEvent) => void;
|
|
211
210
|
export type FeatureTemplatesViewModelSelectEventHandler = (event: FeatureTemplatesViewModelSelectEvent) => void;
|
|
212
211
|
export type GeoJSONLayerEditsEventHandler = (event: GeoJSONLayerEditsEvent) => void;
|
|
@@ -15645,19 +15644,19 @@ declare namespace __esri {
|
|
|
15645
15644
|
*
|
|
15646
15645
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-KnowledgeGraphLayer.html#addRecords)
|
|
15647
15646
|
*/
|
|
15648
|
-
|
|
15647
|
+
addRecords(records: IdTypePair[]): Promise<void>;
|
|
15649
15648
|
/**
|
|
15650
15649
|
* Assumes that data for all of the members defined in the inclusionModeDefinition is already loaded into local storage.
|
|
15651
15650
|
*
|
|
15652
15651
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-KnowledgeGraphLayer.html#loadLayerAssumingLocalCache)
|
|
15653
15652
|
*/
|
|
15654
|
-
|
|
15653
|
+
loadLayerAssumingLocalCache(): void;
|
|
15655
15654
|
/**
|
|
15656
15655
|
* Removes entities or relationships from the knowledge graph layer.
|
|
15657
15656
|
*
|
|
15658
15657
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-KnowledgeGraphLayer.html#removeRecords)
|
|
15659
15658
|
*/
|
|
15660
|
-
|
|
15659
|
+
removeRecords(records: IdTypePair[]): Promise<IdTypePair[]>;
|
|
15661
15660
|
}
|
|
15662
15661
|
|
|
15663
15662
|
interface KnowledgeGraphLayerProperties extends LayerProperties {
|
|
@@ -100260,21 +100259,18 @@ declare namespace __esri {
|
|
|
100260
100259
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#highlightIds)
|
|
100261
100260
|
*/
|
|
100262
100261
|
highlightIds: Collection<number>;
|
|
100263
|
-
/**
|
|
100264
|
-
* Indicates whether to highlight the associated feature when a row is selected.
|
|
100265
|
-
*
|
|
100266
|
-
* @default true
|
|
100267
|
-
* @deprecated since version 4.25. Use {@link module:esri/widgets/FeatureTable#highlightEnabled highlightEnabled} instead.
|
|
100268
|
-
*
|
|
100269
|
-
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#highlightOnRowSelectEnabled)
|
|
100270
|
-
*/
|
|
100271
|
-
highlightOnRowSelectEnabled: boolean;
|
|
100272
100262
|
/**
|
|
100273
100263
|
* The associated [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html), [SceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html), [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html), [CSVLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html), [ImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html), or [WFSLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-WFSLayer.html) containing the fields and attributes to display within the widget.
|
|
100274
100264
|
*
|
|
100275
100265
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#layer)
|
|
100276
100266
|
*/
|
|
100277
100267
|
layer: FeatureLayer | SceneLayer | GeoJSONLayer | CSVLayer | WFSLayer | ImageryLayer;
|
|
100268
|
+
/**
|
|
100269
|
+
* The [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) displaying data for the table's associated [layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#layer).
|
|
100270
|
+
*
|
|
100271
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#layerView)
|
|
100272
|
+
*/
|
|
100273
|
+
readonly layerView: LayerView;
|
|
100278
100274
|
/**
|
|
100279
100275
|
* Reference to the FeatureTable's menu.
|
|
100280
100276
|
*
|
|
@@ -100325,6 +100321,12 @@ declare namespace __esri {
|
|
|
100325
100321
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#tableTemplate)
|
|
100326
100322
|
*/
|
|
100327
100323
|
tableTemplate: TableTemplate;
|
|
100324
|
+
/**
|
|
100325
|
+
* The [TimeExtent](https://developers.arcgis.com/javascript/latest/api-reference/esri-TimeExtent.html) in which to filter and display data within the FeatureTable widget.
|
|
100326
|
+
*
|
|
100327
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#timeExtent)
|
|
100328
|
+
*/
|
|
100329
|
+
timeExtent: TimeExtent;
|
|
100328
100330
|
/**
|
|
100329
100331
|
* Dates and times displayed in the widget will be in terms of this time zone.
|
|
100330
100332
|
*
|
|
@@ -100355,14 +100357,6 @@ declare namespace __esri {
|
|
|
100355
100357
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html)
|
|
100356
100358
|
*/
|
|
100357
100359
|
constructor(properties?: FeatureTableProperties);
|
|
100358
|
-
/**
|
|
100359
|
-
* Clears the current selection within the table.
|
|
100360
|
-
*
|
|
100361
|
-
* @deprecated since version 4.25. Use {@link module:esri/core/Collection#removeAll highlightIds.removeAll()} instead.
|
|
100362
|
-
*
|
|
100363
|
-
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#clearSelection)
|
|
100364
|
-
*/
|
|
100365
|
-
clearSelection(): void;
|
|
100366
100360
|
/**
|
|
100367
100361
|
* Clears the current selection filter within the table.
|
|
100368
100362
|
*
|
|
@@ -100375,14 +100369,6 @@ declare namespace __esri {
|
|
|
100375
100369
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#deleteSelection)
|
|
100376
100370
|
*/
|
|
100377
100371
|
deleteSelection(showWarningPrompt?: boolean): Promise<void>;
|
|
100378
|
-
/**
|
|
100379
|
-
* Unselects the specified rows within the table.
|
|
100380
|
-
*
|
|
100381
|
-
* @deprecated since 4.25. Use {@link module:esri/widgets/FeatureTable#highlightIds highlightIds.remove()} instead.
|
|
100382
|
-
*
|
|
100383
|
-
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#deselectRows)
|
|
100384
|
-
*/
|
|
100385
|
-
deselectRows(params: number | Graphic | (number | Graphic)[]): void;
|
|
100386
100372
|
/**
|
|
100387
100373
|
* Filters the table by the current selection.
|
|
100388
100374
|
*
|
|
@@ -100413,14 +100399,6 @@ declare namespace __esri {
|
|
|
100413
100399
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#scrollToIndex)
|
|
100414
100400
|
*/
|
|
100415
100401
|
scrollToIndex(index: number): void;
|
|
100416
|
-
/**
|
|
100417
|
-
* Selects the specified rows within the table.
|
|
100418
|
-
*
|
|
100419
|
-
* @deprecated since 4.25. Use {@link module:esri/widgets/FeatureTable#highlightIds highlightIds.add()} instead.
|
|
100420
|
-
*
|
|
100421
|
-
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#selectRows)
|
|
100422
|
-
*/
|
|
100423
|
-
selectRows(params: number | Graphic | (number | Graphic)[]): void;
|
|
100424
100402
|
/**
|
|
100425
100403
|
* Shows all of the columns in the table.
|
|
100426
100404
|
*
|
|
@@ -100445,7 +100423,6 @@ declare namespace __esri {
|
|
|
100445
100423
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#zoomToSelection)
|
|
100446
100424
|
*/
|
|
100447
100425
|
zoomToSelection(): void;
|
|
100448
|
-
on(name: "selection-change", eventHandler: FeatureTableSelectionChangeEventHandler): IHandle;
|
|
100449
100426
|
}
|
|
100450
100427
|
|
|
100451
100428
|
interface FeatureTableProperties extends WidgetProperties {
|
|
@@ -100509,15 +100486,6 @@ declare namespace __esri {
|
|
|
100509
100486
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#highlightIds)
|
|
100510
100487
|
*/
|
|
100511
100488
|
highlightIds?: CollectionProperties<number>;
|
|
100512
|
-
/**
|
|
100513
|
-
* Indicates whether to highlight the associated feature when a row is selected.
|
|
100514
|
-
*
|
|
100515
|
-
* @default true
|
|
100516
|
-
* @deprecated since version 4.25. Use {@link module:esri/widgets/FeatureTable#highlightEnabled highlightEnabled} instead.
|
|
100517
|
-
*
|
|
100518
|
-
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#highlightOnRowSelectEnabled)
|
|
100519
|
-
*/
|
|
100520
|
-
highlightOnRowSelectEnabled?: boolean;
|
|
100521
100489
|
/**
|
|
100522
100490
|
* The associated [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html), [SceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html), [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html), [CSVLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html), [ImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html), or [WFSLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-WFSLayer.html) containing the fields and attributes to display within the widget.
|
|
100523
100491
|
*
|
|
@@ -100565,6 +100533,12 @@ declare namespace __esri {
|
|
|
100565
100533
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#tableTemplate)
|
|
100566
100534
|
*/
|
|
100567
100535
|
tableTemplate?: TableTemplateProperties;
|
|
100536
|
+
/**
|
|
100537
|
+
* The [TimeExtent](https://developers.arcgis.com/javascript/latest/api-reference/esri-TimeExtent.html) in which to filter and display data within the FeatureTable widget.
|
|
100538
|
+
*
|
|
100539
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#timeExtent)
|
|
100540
|
+
*/
|
|
100541
|
+
timeExtent?: TimeExtentProperties;
|
|
100568
100542
|
/**
|
|
100569
100543
|
* Dates and times displayed in the widget will be in terms of this time zone.
|
|
100570
100544
|
*
|
|
@@ -100658,15 +100632,6 @@ declare namespace __esri {
|
|
|
100658
100632
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-FeatureTableViewModel.html#highlightIds)
|
|
100659
100633
|
*/
|
|
100660
100634
|
highlightIds: Collection<number>;
|
|
100661
|
-
/**
|
|
100662
|
-
* Indicates whether to highlight the associated feature when a row is selected.
|
|
100663
|
-
*
|
|
100664
|
-
* @default true
|
|
100665
|
-
* @deprecated since version 4.25. Use {@link module:esri/widgets/FeatureTable/FeatureTableViewModel#highlightEnabled highlightEnabled} instead.
|
|
100666
|
-
*
|
|
100667
|
-
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-FeatureTableViewModel.html#highlightOnRowSelectEnabled)
|
|
100668
|
-
*/
|
|
100669
|
-
highlightOnRowSelectEnabled: boolean;
|
|
100670
100635
|
/**
|
|
100671
100636
|
* The associated [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html), [SceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html), [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html), [CSVLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html), [ImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html), or [WFSLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-WFSLayer.html) containing the fields and attributes to display within the widget.
|
|
100672
100637
|
*
|
|
@@ -100709,6 +100674,12 @@ declare namespace __esri {
|
|
|
100709
100674
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-FeatureTableViewModel.html#tableTemplate)
|
|
100710
100675
|
*/
|
|
100711
100676
|
tableTemplate: TableTemplate;
|
|
100677
|
+
/**
|
|
100678
|
+
* The [TimeExtent](https://developers.arcgis.com/javascript/latest/api-reference/esri-TimeExtent.html) in which to filter and display data within the [FeatureTable](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html) widget.
|
|
100679
|
+
*
|
|
100680
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-FeatureTableViewModel.html#timeExtent)
|
|
100681
|
+
*/
|
|
100682
|
+
timeExtent: TimeExtent;
|
|
100712
100683
|
/**
|
|
100713
100684
|
* Dates and times displayed in the widget will be in terms of this time zone.
|
|
100714
100685
|
*
|
|
@@ -100727,14 +100698,6 @@ declare namespace __esri {
|
|
|
100727
100698
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-FeatureTableViewModel.html)
|
|
100728
100699
|
*/
|
|
100729
100700
|
constructor(properties?: FeatureTableViewModelProperties);
|
|
100730
|
-
/**
|
|
100731
|
-
* Clears the current selection within the table.
|
|
100732
|
-
*
|
|
100733
|
-
* @deprecated since version 4.25. Use {@link module:esri/core/Collection#removeAll highlightIds.removeAll()} instead.
|
|
100734
|
-
*
|
|
100735
|
-
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-FeatureTableViewModel.html#clearSelection)
|
|
100736
|
-
*/
|
|
100737
|
-
clearSelection(): void;
|
|
100738
100701
|
/**
|
|
100739
100702
|
* Clears the current [filterBySelection](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-FeatureTableViewModel.html#filterBySelection) so that the table displays all of the table rows.
|
|
100740
100703
|
*
|
|
@@ -100747,12 +100710,6 @@ declare namespace __esri {
|
|
|
100747
100710
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-FeatureTableViewModel.html#deleteSelection)
|
|
100748
100711
|
*/
|
|
100749
100712
|
deleteSelection(showWarningPrompt?: boolean): Promise<void>;
|
|
100750
|
-
/**
|
|
100751
|
-
* Unselects the specified rows within the table.
|
|
100752
|
-
*
|
|
100753
|
-
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-FeatureTableViewModel.html#deselectRows)
|
|
100754
|
-
*/
|
|
100755
|
-
deselectRows(params: number | Graphic | (number | Graphic)[]): void;
|
|
100756
100713
|
/**
|
|
100757
100714
|
* Filters the table using the current row selection and displays only those selected table rows.
|
|
100758
100715
|
*
|
|
@@ -100789,14 +100746,6 @@ declare namespace __esri {
|
|
|
100789
100746
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-FeatureTableViewModel.html#scrollToIndex)
|
|
100790
100747
|
*/
|
|
100791
100748
|
scrollToIndex(index: number): void;
|
|
100792
|
-
/**
|
|
100793
|
-
* Selects the specified rows within the table.
|
|
100794
|
-
*
|
|
100795
|
-
* @deprecated since 4.25. Use {@link module:esri/widgets/FeatureTable#highlightIds highlightIds.add()} instead.
|
|
100796
|
-
*
|
|
100797
|
-
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-FeatureTableViewModel.html#selectRows)
|
|
100798
|
-
*/
|
|
100799
|
-
selectRows(params: number | Graphic | (number | Graphic)[]): void;
|
|
100800
100749
|
/**
|
|
100801
100750
|
* Zooms the view to the extent of the current row selection.
|
|
100802
100751
|
*
|
|
@@ -100858,15 +100807,6 @@ declare namespace __esri {
|
|
|
100858
100807
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-FeatureTableViewModel.html#highlightIds)
|
|
100859
100808
|
*/
|
|
100860
100809
|
highlightIds?: CollectionProperties<number>;
|
|
100861
|
-
/**
|
|
100862
|
-
* Indicates whether to highlight the associated feature when a row is selected.
|
|
100863
|
-
*
|
|
100864
|
-
* @default true
|
|
100865
|
-
* @deprecated since version 4.25. Use {@link module:esri/widgets/FeatureTable/FeatureTableViewModel#highlightEnabled highlightEnabled} instead.
|
|
100866
|
-
*
|
|
100867
|
-
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-FeatureTableViewModel.html#highlightOnRowSelectEnabled)
|
|
100868
|
-
*/
|
|
100869
|
-
highlightOnRowSelectEnabled?: boolean;
|
|
100870
100810
|
/**
|
|
100871
100811
|
* The associated [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html), [SceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html), [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html), [CSVLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html), [ImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html), or [WFSLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-WFSLayer.html) containing the fields and attributes to display within the widget.
|
|
100872
100812
|
*
|
|
@@ -100900,6 +100840,12 @@ declare namespace __esri {
|
|
|
100900
100840
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-FeatureTableViewModel.html#tableTemplate)
|
|
100901
100841
|
*/
|
|
100902
100842
|
tableTemplate?: TableTemplateProperties;
|
|
100843
|
+
/**
|
|
100844
|
+
* The [TimeExtent](https://developers.arcgis.com/javascript/latest/api-reference/esri-TimeExtent.html) in which to filter and display data within the [FeatureTable](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html) widget.
|
|
100845
|
+
*
|
|
100846
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-FeatureTableViewModel.html#timeExtent)
|
|
100847
|
+
*/
|
|
100848
|
+
timeExtent?: TimeExtentProperties;
|
|
100903
100849
|
/**
|
|
100904
100850
|
* Dates and times displayed in the widget will be in terms of this time zone.
|
|
100905
100851
|
*
|
|
@@ -101816,11 +101762,6 @@ declare namespace __esri {
|
|
|
101816
101762
|
selected?: boolean;
|
|
101817
101763
|
}
|
|
101818
101764
|
|
|
101819
|
-
export interface FeatureTableSelectionChangeEvent {
|
|
101820
|
-
added: FeatureTableSelectionChangeEventAdded[];
|
|
101821
|
-
removed: FeatureTableSelectionChangeEventRemoved[];
|
|
101822
|
-
}
|
|
101823
|
-
|
|
101824
101765
|
/**
|
|
101825
101766
|
* The visible elements that are displayed within the widget.
|
|
101826
101767
|
*
|
|
@@ -101859,20 +101800,6 @@ declare namespace __esri {
|
|
|
101859
101800
|
menuItems?: VisibleElementsMenuItems;
|
|
101860
101801
|
}
|
|
101861
101802
|
|
|
101862
|
-
export interface FeatureTableSelectionChangeEventAdded {
|
|
101863
|
-
feature: Graphic;
|
|
101864
|
-
attachments: AttachmentInfo[];
|
|
101865
|
-
objectId: number;
|
|
101866
|
-
relatedRecords: Graphic[];
|
|
101867
|
-
}
|
|
101868
|
-
|
|
101869
|
-
export interface FeatureTableSelectionChangeEventRemoved {
|
|
101870
|
-
feature: Graphic;
|
|
101871
|
-
attachments: AttachmentInfo[];
|
|
101872
|
-
objectId: number;
|
|
101873
|
-
relatedRecords: Graphic[];
|
|
101874
|
-
}
|
|
101875
|
-
|
|
101876
101803
|
export interface VisibleElementsMenuItems {
|
|
101877
101804
|
/**
|
|
101878
101805
|
* Indicates whether to display the `Clear selection` menu item.
|
package/layers/SceneLayer.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import t from"../Graphic.js";import r from"../PopupTemplate.js";import"../renderers/ClassBreaksRenderer.js";import"../renderers/DictionaryRenderer.js";import"../renderers/DotDensityRenderer.js";import"../renderers/HeatmapRenderer.js";import"../renderers/PieChartRenderer.js";import"../renderers/Renderer.js";import"../renderers/SimpleRenderer.js";import"../renderers/UniqueValueRenderer.js";import"../renderers/support/jsonUtils.js";import{webSceneRendererTypes as i}from"../renderers/support/types.js";import s from"../request.js";import{ClonableMixin as o}from"../core/Clonable.js";import a from"../core/Collection.js";import n from"../core/Error.js";import l from"../core/Logger.js";import{MultiOriginJSONMixin as p}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as d,isAbortError as y}from"../core/promiseUtils.js";import{whenOnce as u}from"../core/reactiveUtils.js";import{join as c}from"../core/urlUtils.js";import{property as h}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{getProperties as f}from"../core/accessorSupport/utils.js";import{reader as m}from"../core/accessorSupport/decorators/reader.js";import{subclass as g}from"../core/accessorSupport/decorators/subclass.js";import{OriginId as v}from"../core/accessorSupport/PropertyOrigin.js";import b from"../geometry/Mesh.js";import w from"../geometry/Point.js";import I from"./Layer.js";import{NoModelError as L,MultipleModelsError as j}from"./graphics/sources/support/uploadAssetErrors.js";import{APIKeyMixin as F}from"./mixins/APIKeyMixin.js";import{ArcGISService as S}from"./mixins/ArcGISService.js";import{CustomParametersMixin as _}from"./mixins/CustomParametersMixin.js";import{EditBusLayer as E}from"./mixins/EditBusLayer.js";import{OperationalLayer as P}from"./mixins/OperationalLayer.js";import{PortalLayer as A}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as O}from"./mixins/ScaleRangeLayer.js";import{SceneService as x,SaveOperationType as D}from"./mixins/SceneService.js";import{TemporalSceneLayer as T}from"./mixins/TemporalSceneLayer.js";import{isHostedAgolService as U}from"./support/arcgisLayerUrl.js";import{findAssociatedFeatureService as R}from"./support/associatedFeatureServiceUtils.js";import{zeroCapabilities as q}from"./support/capabilities.js";import{elevationInfo as C,labelsVisible as G,legendEnabled as Q,popupEnabled as N,screenSizePerspectiveEnabled as k}from"./support/commonProperties.js";import{computeEffectiveEditingEnabled as V,getGlobalIdToObjectIdMap as M}from"./support/featureLayerUtils.js";import{FeatureReduction as K}from"./support/FeatureReduction.js";import $ from"./support/FeatureReductionSelection.js";import{defineFieldProperties as H}from"./support/fieldProperties.js";import z from"./support/FieldsIndex.js";import{fixRendererFields as W,unpackFieldNames as B}from"./support/fieldUtils.js";import{I3SNodePageDefinition as Z,I3SMaterialDefinition as J,I3STextureSetDefinition as X,I3SGeometryDefinition as Y}from"./support/I3SLayerDefinitions.js";import{isFileEditFormat as ee,isFileSupported as te}from"./support/infoFor3D.js";import re from"./support/LabelClass.js";import{reader as ie}from"./support/labelingInfo.js";import se from"./support/LayerFloorInfo.js";import{layerLookupMap as oe}from"./support/lazyLayerLoader.js";import{RangeInfo as ae}from"./support/RangeInfo.js";import ne from"./support/SceneFilter.js";import{loadStyleRenderer as le}from"../renderers/support/styleUtils.js";import pe from"../rest/support/Query.js";import{logInvalidElevationInfoWarning as de,elevationModeUnsupportedMessage as ye,featureExpressionUnsupportedMessage as ue}from"../support/elevationInfoUtils.js";import{sceneLayerEditingEnabled as ce}from"../support/featureFlags.js";import{createPopupTemplate as he}from"../support/popupUtils.js";import{extractZipFiles as fe}from"../support/zipUtils.js";import{queryAttributesFromCachedAttributesId as me}from"../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as ge,getFetchPopupTemplate as ve}from"../views/layers/support/popupUtils.js";import{transparencyToOpacity as be}from"../webdoc/support/opacityUtils.js";const we=new Set(["3DObject","Point"]),Ie=H();let Le=class extends(T(E(x(S(P(A(O(p(_(F(o(I)))))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType="ArcGISSceneServiceLayer",this.type="scene",this.fields=null,this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new a,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0,this.serviceItemId=void 0}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._set("renderer",null)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getFeatureType(t?.feature)?.domains?.[e];return r&&"inherited"!==r.type?r:this.getField(e)?.domain??null}getFeatureType(e){return e&&this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return this.associatedLayer?.types??[]}get typeIdField(){return this.associatedLayer?.typeIdField??null}get templates(){return this.associatedLayer?.templates??null}get formTemplate(){return this.associatedLayer?.formTemplate??null}get fieldsIndex(){return new z(this.fields)}readNodePages(e,t,r){return"Point"===t.layerType&&(e=t.pointNodePages),null==e||"object"!=typeof e?null:Z.fromJSON(e,r)}set elevationInfo(e){this._set("elevationInfo",e),this.loaded&&this._validateElevationInfo()}get effectiveCapabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.effectiveCapabilities)}get effectiveEditingEnabled(){return null!=this.associatedLayer&&V(this.associatedLayer)}get geometryType(){return Fe[this.profile]||"mesh"}set renderer(e){W(e,this.fieldsIndex),this._set("renderer",e)}readCachedDrawingInfo(e){return null!=e&&"object"==typeof e||(e={}),null==e.color&&(e.color=!1),e}get capabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.capabilities)}_capabilitiesFromAssociatedFeatureLayer(e){e=null!=e?e:q;const{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsRollbackOnFailure:s,supportsUploadWithItemId:o,supportsGeometryUpdate:a,supportsReturnServiceEditsInSourceSpatialReference:n},data:{supportsZ:l,supportsM:p,isVersioned:d,supportsAttachment:y},operations:{supportsEditing:u,supportsAdd:c,supportsUpdate:h,supportsDelete:f,supportsQuery:m,supportsQueryAttachments:g,supportsAsyncConvert3D:v}}=e,b=e.operations.supportsChangeTracking,w=!!this.associatedLayer?.infoFor3D&&ce();return{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsReturnServiceEditsInSourceSpatialReference:n,supportsRollbackOnFailure:s,supportsGeometryUpdate:w&&a,supportsUploadWithItemId:o},data:{supportsAttachment:y,supportsZ:l,supportsM:p,isVersioned:d},operations:{supportsQuery:m,supportsQueryAttachments:g,supportsEditing:u&&b,supportsAdd:w&&c&&b,supportsDelete:w&&f&&b,supportsUpdate:h&&b,supportsAsyncConvert3D:v}}}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.associatedLayer?.editingEnabled??!1}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}get relationships(){return this.associatedLayer?.relationships}get defaultPopupTemplate(){return this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some((t=>("esriFieldTypeOID"===t.type&&(e=t.name),!!e))),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some((t=>("esriFieldTypeGlobalID"===t.type&&(e=t.name),!!e))),e||void 0}get displayField(){return this.associatedLayer?.displayField??null}readProfile(e,t){const r=t.store.profile;return null!=r&&je[r]?je[r]:(l.getLogger(this).error("Unknown or missing profile",{profile:r,layer:this}),"mesh-pyramids")}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){const t=null!=e?e.signal:null;await this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(d),await this._fetchService(t),await Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),this._loadFilterGeometries()]),this._validateElevationInfo(),this._applyAssociatedLayerOverrides(),this._populateFieldUsageInfo(),await le(this,{origin:"service"},t),W(this.renderer,this.fieldsIndex),await this.finishLoadEditablePortalLayer(e)}async beforeSave(){null!=this.filter&&(this.filter=this.filter.clone(),await this.load())}async _loadFilterGeometries(){if(this.filter)try{await this.filter.loadGeometries(this.spatialReference)}catch(e){l.getLogger(this).error("#_loadFilterGeometries()",this,"Failed to load filter geometries. Geometry filter will not be applied for this layer.",{error:e}),this.filter=null}}createQuery(){const e=new pe;return"mesh"!==this.geometryType&&(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e.outFields=["*"],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryExtent(e||this.createQuery(),t)))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatureCount(e||this.createQuery(),t)))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatures(e||this.createQuery(),t))).then((e=>{if(e?.features)for(const t of e.features)t.layer=this,t.sourceLayer=this;return e}))}async queryRelatedFeatures(e,t){if(await this.load(),!this.associatedLayer)throw new n("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.associatedLayer)throw new n("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeaturesCount(e,t)}async queryCachedAttributes(e,t){const r=B(this.fieldsIndex,await ge(this,ve(this)));return me(this.parsedUrl.path,this.attributeStorageInfo??[],e,t,r,this.apiKey,this.customParameters)}async queryCachedFeature(e,r){const i=await this.queryCachedAttributes(e,[r]);if(!i||0===i.length)throw new n("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const s=new t;return s.attributes=i[0],s.layer=this,s.sourceLayer=this,s}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryObjectIds(e||this.createQuery(),t)))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryAttachments(e,t)))}getFieldUsageInfo(e){const t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(l.getLogger(this).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return he(this,e)}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return e?.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),!this.associatedLayer)throw new n("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new n("scenelayer:query-not-available","SceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return null!=this.statisticsInfo&&this.statisticsInfo.some((t=>t.name===e))}async queryCachedStatistics(e,t){if(await this.load(t),!this.statisticsInfo)throw new n("scenelayer:no-cached-statistics","Cached statistics are not available for this layer");const r=this.fieldsIndex.get(e);if(!r)throw new n("scenelayer:field-unexisting",`Field '${e}' does not exist on the layer`);for(const i of this.statisticsInfo)if(i.name===r.name){const e=c(this.parsedUrl.path,i.href);return s(e,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:t?t.signal:null}).then((e=>e.data))}throw new n("scenelayer:no-cached-statistics","Cached statistics for this attribute are not available")}async saveAs(e,t){return this._debouncedSaveOperations(D.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(D.SAVE,e)}async applyEdits(e,t){const{applyEdits:r}=await import("./graphics/editingSupport.js");let i=t;await this.load();const s=this.associatedLayer;if(!s)throw new n(`${this.type}-layer:not-editable`,"Service is not editable");await s.load();const{globalIdField:o}=s,a=!!s.infoFor3D,l=i?.globalIdUsed??!0;if(a&&null==o)throw new n(`${this.type}-layer:not-editable`,"Valid globalIdField expected on editable SceneLayer");if(a&&!l)throw new n(`${this.type}-layer:globalid-required`,"globalIdUsed must not be false for SceneLayer editing as globalIds are required.");return U(s.url)&&a&&null!=e.deleteFeatures&&null!=o&&(i={...i,globalIdToObjectId:await M(s,e.deleteFeatures,o)}),r(this,s.source,e,i)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new n(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}on(e,t){return super.on(e,t)}async convertMesh(e,t){const r=e=>{throw l.getLogger(this).error(".convertMesh()",e.message),e};await this.load(),this.infoFor3D||r(new n("invalid:layer","SceneLayer has no capability for mesh conversion"));const i=await this.extractAndFilterFiles(e),s=i.reduce(((e,t)=>ee(this.infoFor3D,t)?e+1:e),0);0===s&&r(new L),s>1&&r(new j);const o=this.spatialReference,a=t?.location??new w({x:0,y:0,z:0,spatialReference:o}),p=a.spatialReference.isGeographic?"local":"georeferenced",d=b.createWithExternalSource(a,i,{vertexSpace:p}),[y]=await this.uploadAssets([d],t);return y}async extractAndFilterFiles(e){await this.load();const t=this.infoFor3D;if(!t)return e;return(await fe(e)).filter((e=>te(t,e)))}validateLayer(e){if(e.layerType&&!we.has(e.layerType))throw new n("scenelayer:layer-type-not-supported","SceneLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new n("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});if(this.version.major>2)throw new n("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});function t(e,t){let r=!1,i=!1;if(null==e)r=!0,i=!0;else{const s=t&&t.isGeographic;switch(e){case"east-north-up":case"earth-centered":r=!0,i=s;break;case"vertex-reference-frame":r=!0,i=!s;break;default:r=!1}}if(!r)throw new n("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!i)throw new n("scenelayer:incompatible-normal-reference-frame","Normal reference frame is incompatible with layer spatial reference.")}t(this.normalReferenceFrame,this.spatialReference)}_getTypeKeywords(){const e=[];if("points"===this.profile)e.push("Point");else{if("mesh-pyramids"!==this.profile)throw new n("scenelayer:unknown-profile","SceneLayer:save() encountered an unknown SceneLayer profile: "+this.profile);e.push("3DObject")}return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(const e of this.fields){const t=!(!this.attributeStorageInfo||!this.attributeStorageInfo.some((t=>t.name===e.name))),r=!!this.associatedLayer?.fields?.some((t=>t&&e.name===t.name)),i={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||r,supportsLayerQuery:r};this._fieldUsageInfo[e.name]=i}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPopupOverrides(),this._applyAssociatedLayerExtentOverride(),this._applyAssociatedLayerPrivileges()}_applyAssociatedLayerFieldsOverrides(){if(!this.associatedLayer?.fields)return;let e=null;for(const t of this.associatedLayer.fields){const r=this.getField(t.name);r?(!r.domain&&t.domain&&(r.domain=t.domain.clone()),r.editable=t.editable,r.nullable=t.nullable,r.length=t.length):(e||(e=this.fields?this.fields.slice():[]),e.push(t.clone()))}e&&this._set("fields",e)}_applyAssociatedLayerPopupOverrides(){if(!this.associatedLayer)return;const e=["popupTemplate","popupEnabled"],t=f(this);for(let r=0;r<e.length;r++){const i=e[r],s=this.originIdOf(i),o=this.associatedLayer.originIdOf(i);s<o&&(o===v.SERVICE||o===v.PORTAL_ITEM)&&t.setAtOrigin(i,this.associatedLayer[i],o)}}_applyAssociatedLayerExtentOverride(){const e=this.associatedLayer?.editingInfo?.lastEditDate,t=this.associatedLayer?.serverGens,r=this.associatedLayer?.getAtOrigin("fullExtent","service");if(!ce()||null==this.associatedLayer?.infoFor3D||!r||!U(this.associatedLayer?.url)||!e||this.serviceUpdateTimeStamp?.lastUpdate===e.getTime()||!this.serviceUpdateTimeStamp&&t?.minServerGen===t?.serverGen)return;f(this).setAtOrigin("fullExtent",r.clone(),v.SERVICE)}_applyAssociatedLayerPrivileges(){const e=this.associatedLayer;e&&(this._set("userHasEditingPrivileges",e.userHasEditingPrivileges),this._set("userHasFullEditingPrivileges",e.userHasFullEditingPrivileges),this._set("userHasUpdateItemPrivileges",e.userHasUpdateItemPrivileges))}async _setAssociatedFeatureLayer(e){if(["mesh-pyramids","points"].includes(this.profile))try{const{serverUrl:t,layerId:r,portalItem:i}=await R(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e}),s=await oe.FeatureLayer();this.associatedLayer=new s({url:t,customParameters:this.customParameters,layerId:r,portalItem:i}),await this.associatedLayer.load()}catch(t){y(t)||this._logWarningOnPopupEnabled()}}async _logWarningOnPopupEnabled(){await u((()=>this.popupEnabled&&null!=this.popupTemplate));const e=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?l.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${e}`):l.getLogger(this).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${e}`)}_validateElevationInfo(){const e=this.elevationInfo;"mesh-pyramids"===this.profile&&de(l.getLogger(this),ye("Mesh scene layers","relative-to-scene",e)),de(l.getLogger(this),ue("Scene layers",e))}};e([h({types:{key:"type",base:K,typeMap:{selection:$}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:!0},"portal-item":{name:"layerDefinition.featureReduction",write:!0}}}})],Le.prototype,"featureReduction",void 0),e([h({type:[ae],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}}})],Le.prototype,"rangeInfos",void 0),e([h({json:{read:!1}})],Le.prototype,"associatedLayer",void 0),e([h({type:["show","hide"]})],Le.prototype,"listMode",void 0),e([h({type:["ArcGISSceneServiceLayer"]})],Le.prototype,"operationalLayerType",void 0),e([h({json:{read:!1},readOnly:!0})],Le.prototype,"type",void 0),e([h({...Ie.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Le.prototype,"fields",void 0),e([h()],Le.prototype,"types",null),e([h()],Le.prototype,"typeIdField",null),e([h()],Le.prototype,"templates",null),e([h()],Le.prototype,"formTemplate",null),e([h({readOnly:!0,clonable:!1})],Le.prototype,"fieldsIndex",null),e([h({type:se,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],Le.prototype,"floorInfo",void 0),e([h(Ie.outFields)],Le.prototype,"outFields",void 0),e([h({type:Z,readOnly:!0,json:{read:!1}})],Le.prototype,"nodePages",void 0),e([m("service","nodePages",["nodePages","pointNodePages"])],Le.prototype,"readNodePages",null),e([h({type:[J],readOnly:!0})],Le.prototype,"materialDefinitions",void 0),e([h({type:[X],readOnly:!0})],Le.prototype,"textureSetDefinitions",void 0),e([h({type:[Y],readOnly:!0})],Le.prototype,"geometryDefinitions",void 0),e([h({readOnly:!0})],Le.prototype,"serviceUpdateTimeStamp",void 0),e([h({readOnly:!0})],Le.prototype,"attributeStorageInfo",void 0),e([h({readOnly:!0})],Le.prototype,"statisticsInfo",void 0),e([h({type:a.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],Le.prototype,"excludeObjectIds",void 0),e([h({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],Le.prototype,"definitionExpression",void 0),e([h({type:ne,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],Le.prototype,"filter",void 0),e([h({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Le.prototype,"path",void 0),e([h(C)],Le.prototype,"elevationInfo",null),e([h({readOnly:!0,json:{read:!1}})],Le.prototype,"effectiveCapabilities",null),e([h({readOnly:!0})],Le.prototype,"effectiveEditingEnabled",null),e([h({type:String})],Le.prototype,"geometryType",null),e([h(G)],Le.prototype,"labelsVisible",void 0),e([h({type:[re],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:ie},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:ie},write:!0}})],Le.prototype,"labelingInfo",void 0),e([h(Q)],Le.prototype,"legendEnabled",void 0),e([h({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:["opacity","layerDefinition.drawingInfo.transparency"],reader(e,t){if("number"==typeof e&&e>=0&&e<=1)return e;const r=t.layerDefinition?.drawingInfo?.transparency;return void 0!==r?be(r):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],Le.prototype,"opacity",void 0),e([h({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Le.prototype,"priority",void 0),e([h({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Le.prototype,"semantic",void 0),e([h({types:i,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],Le.prototype,"renderer",null),e([h({json:{read:!1}})],Le.prototype,"cachedDrawingInfo",void 0),e([m("service","cachedDrawingInfo")],Le.prototype,"readCachedDrawingInfo",null),e([h({readOnly:!0,json:{read:!1}})],Le.prototype,"capabilities",null),e([h({type:Boolean,json:{read:!1}})],Le.prototype,"editingEnabled",null),e([h({readOnly:!0,json:{write:!1,read:!1}})],Le.prototype,"infoFor3D",null),e([h({readOnly:!0,json:{write:!1,read:!1}})],Le.prototype,"relationships",null),e([h(N)],Le.prototype,"popupEnabled",void 0),e([h({type:r,json:{name:"popupInfo",write:!0}})],Le.prototype,"popupTemplate",void 0),e([h({readOnly:!0,json:{read:!1}})],Le.prototype,"defaultPopupTemplate",null),e([h({type:String,json:{read:!1}})],Le.prototype,"objectIdField",void 0),e([m("service","objectIdField",["objectIdField","fields"])],Le.prototype,"readObjectIdField",null),e([h({type:String,json:{read:!1}})],Le.prototype,"globalIdField",void 0),e([m("service","globalIdField",["globalIdField","fields"])],Le.prototype,"readGlobalIdField",null),e([h({readOnly:!0,type:String,json:{read:!1}})],Le.prototype,"displayField",null),e([h({type:String,json:{read:!1}})],Le.prototype,"profile",void 0),e([m("service","profile",["store.profile"])],Le.prototype,"readProfile",null),e([h({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],Le.prototype,"normalReferenceFrame",void 0),e([h(k)],Le.prototype,"screenSizePerspectiveEnabled",void 0),e([h({json:{read:!1,origins:{service:{read:!0}}}})],Le.prototype,"serviceItemId",void 0),Le=e([g("esri.layers.SceneLayer")],Le);const je={"mesh-pyramids":"mesh-pyramids",meshpyramids:"mesh-pyramids","features-meshes":"mesh-pyramids",points:"points","features-points":"points",lines:"lines","features-lines":"lines",polygons:"polygons","features-polygons":"polygons"},Fe={"mesh-pyramids":"mesh",points:"point",lines:"polyline",polygons:"polygon"},Se=Le;export{Se as default};
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import t from"../Graphic.js";import r from"../PopupTemplate.js";import"../renderers/ClassBreaksRenderer.js";import"../renderers/DictionaryRenderer.js";import"../renderers/DotDensityRenderer.js";import"../renderers/HeatmapRenderer.js";import"../renderers/PieChartRenderer.js";import"../renderers/Renderer.js";import"../renderers/SimpleRenderer.js";import"../renderers/UniqueValueRenderer.js";import"../renderers/support/jsonUtils.js";import{webSceneRendererTypes as i}from"../renderers/support/types.js";import s from"../request.js";import{ClonableMixin as o}from"../core/Clonable.js";import a from"../core/Collection.js";import n from"../core/Error.js";import l from"../core/Logger.js";import{MultiOriginJSONMixin as p}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as d,isAbortError as y}from"../core/promiseUtils.js";import{whenOnce as u}from"../core/reactiveUtils.js";import{join as c}from"../core/urlUtils.js";import{property as h}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{getProperties as f}from"../core/accessorSupport/utils.js";import{reader as m}from"../core/accessorSupport/decorators/reader.js";import{subclass as g}from"../core/accessorSupport/decorators/subclass.js";import{OriginId as v}from"../core/accessorSupport/PropertyOrigin.js";import b from"../geometry/Mesh.js";import w from"../geometry/Point.js";import I from"./Layer.js";import{NoModelError as L,MultipleModelsError as j}from"./graphics/sources/support/uploadAssetErrors.js";import{APIKeyMixin as F}from"./mixins/APIKeyMixin.js";import{ArcGISService as S}from"./mixins/ArcGISService.js";import{CustomParametersMixin as _}from"./mixins/CustomParametersMixin.js";import{EditBusLayer as E}from"./mixins/EditBusLayer.js";import{OperationalLayer as P}from"./mixins/OperationalLayer.js";import{PortalLayer as A}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as O}from"./mixins/ScaleRangeLayer.js";import{SceneService as x,SaveOperationType as D}from"./mixins/SceneService.js";import{TemporalSceneLayer as T}from"./mixins/TemporalSceneLayer.js";import{isHostedAgolService as U}from"./support/arcgisLayerUrl.js";import{findAssociatedFeatureService as R}from"./support/associatedFeatureServiceUtils.js";import{zeroCapabilities as q}from"./support/capabilities.js";import{elevationInfo as C,labelsVisible as G,legendEnabled as Q,popupEnabled as N,screenSizePerspectiveEnabled as k}from"./support/commonProperties.js";import{computeEffectiveEditingEnabled as V,getGlobalIdToObjectIdMap as M}from"./support/featureLayerUtils.js";import{FeatureReduction as K}from"./support/FeatureReduction.js";import $ from"./support/FeatureReductionSelection.js";import{defineFieldProperties as H}from"./support/fieldProperties.js";import z from"./support/FieldsIndex.js";import{fixRendererFields as W,unpackFieldNames as B}from"./support/fieldUtils.js";import{I3SNodePageDefinition as Z,I3SMaterialDefinition as J,I3STextureSetDefinition as X,I3SGeometryDefinition as Y}from"./support/I3SLayerDefinitions.js";import{isFileEditFormat as ee,isFileSupported as te}from"./support/infoFor3D.js";import re from"./support/LabelClass.js";import{reader as ie}from"./support/labelingInfo.js";import se from"./support/LayerFloorInfo.js";import{layerLookupMap as oe}from"./support/lazyLayerLoader.js";import{RangeInfo as ae}from"./support/RangeInfo.js";import ne from"./support/SceneFilter.js";import{loadStyleRenderer as le}from"../renderers/support/styleUtils.js";import pe from"../rest/support/Query.js";import{logInvalidElevationInfoWarning as de,elevationModeUnsupportedMessage as ye,featureExpressionUnsupportedMessage as ue}from"../support/elevationInfoUtils.js";import{sceneLayerEditingEnabled as ce}from"../support/featureFlags.js";import{createPopupTemplate as he}from"../support/popupUtils.js";import{extractZipFiles as fe}from"../support/zipUtils.js";import{queryAttributesFromCachedAttributesId as me}from"../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as ge,getFetchPopupTemplate as ve}from"../views/layers/support/popupUtils.js";import{transparencyToOpacity as be}from"../webdoc/support/opacityUtils.js";const we=new Set(["3DObject","Point"]),Ie=H();let Le=class extends(T(E(x(S(P(A(O(p(_(F(o(I)))))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType="ArcGISSceneServiceLayer",this.type="scene",this.fields=null,this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new a,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0,this.serviceItemId=void 0}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._set("renderer",null)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getFeatureType(t?.feature)?.domains?.[e];return r&&"inherited"!==r.type?r:this.getField(e)?.domain??null}getFeatureType(e){return e&&this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return this.associatedLayer?.types??[]}get typeIdField(){return this.associatedLayer?.typeIdField??null}get templates(){return this.associatedLayer?.templates??null}get formTemplate(){return this.associatedLayer?.formTemplate??null}get fieldsIndex(){return new z(this.fields)}readNodePages(e,t,r){return"Point"===t.layerType&&(e=t.pointNodePages),null==e||"object"!=typeof e?null:Z.fromJSON(e,r)}set elevationInfo(e){this._set("elevationInfo",e),this.loaded&&this._validateElevationInfo()}get effectiveCapabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.effectiveCapabilities)}get effectiveEditingEnabled(){return null!=this.associatedLayer&&V(this.associatedLayer)}get geometryType(){return Fe[this.profile]||"mesh"}set renderer(e){W(e,this.fieldsIndex),this._set("renderer",e)}readCachedDrawingInfo(e){return null!=e&&"object"==typeof e||(e={}),null==e.color&&(e.color=!1),e}get capabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.capabilities)}_capabilitiesFromAssociatedFeatureLayer(e){e=null!=e?e:q;const{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsRollbackOnFailure:s,supportsUploadWithItemId:o,supportsGeometryUpdate:a,supportsReturnServiceEditsInSourceSpatialReference:n},data:{supportsZ:l,supportsM:p,isVersioned:d,supportsAttachment:y},operations:{supportsEditing:u,supportsAdd:c,supportsUpdate:h,supportsDelete:f,supportsQuery:m,supportsQueryAttachments:g,supportsAsyncConvert3D:v}}=e,b=e.operations.supportsChangeTracking,w=!!this.associatedLayer?.infoFor3D&&ce();return{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsReturnServiceEditsInSourceSpatialReference:n,supportsRollbackOnFailure:s,supportsGeometryUpdate:w&&a,supportsUploadWithItemId:o},data:{supportsAttachment:y,supportsZ:l,supportsM:p,isVersioned:d},operations:{supportsQuery:m,supportsQueryAttachments:g,supportsEditing:u&&b,supportsAdd:w&&c&&b,supportsDelete:w&&f&&b,supportsUpdate:h&&b,supportsAsyncConvert3D:v}}}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.associatedLayer?.editingEnabled??!1}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}get relationships(){return this.associatedLayer?.relationships}get defaultPopupTemplate(){return this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some((t=>("esriFieldTypeOID"===t.type&&(e=t.name),!!e))),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some((t=>("esriFieldTypeGlobalID"===t.type&&(e=t.name),!!e))),e||void 0}get displayField(){return this.associatedLayer?.displayField??null}readProfile(e,t){const r=t.store.profile;return null!=r&&je[r]?je[r]:(l.getLogger(this).error("Unknown or missing profile",{profile:r,layer:this}),"mesh-pyramids")}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){const t=null!=e?e.signal:null;await this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(d),await this._fetchService(t),await Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),this._loadFilterGeometries()]),this._validateElevationInfo(),this._applyAssociatedLayerOverrides(),this._populateFieldUsageInfo(),await le(this,{origin:"service"},t),W(this.renderer,this.fieldsIndex),await this.finishLoadEditablePortalLayer(e)}async beforeSave(){null!=this.filter&&(this.filter=this.filter.clone(),await this.load())}async _loadFilterGeometries(){if(this.filter)try{await this.filter.loadGeometries(this.spatialReference)}catch(e){l.getLogger(this).error("#_loadFilterGeometries()",this,"Failed to load filter geometries. Geometry filter will not be applied for this layer.",{error:e}),this.filter=null}}createQuery(){const e=new pe;return"mesh"===this.geometryType?this.associatedLayer?.infoFor3D&&(e.returnGeometry=!0):(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e.outFields=["*"],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryExtent(e||this.createQuery(),t)))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatureCount(e||this.createQuery(),t)))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatures(e||this.createQuery(),t))).then((e=>{if(e?.features)for(const t of e.features)t.layer=this,t.sourceLayer=this;return e}))}async queryRelatedFeatures(e,t){if(await this.load(),!this.associatedLayer)throw new n("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.associatedLayer)throw new n("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeaturesCount(e,t)}async queryCachedAttributes(e,t){const r=B(this.fieldsIndex,await ge(this,ve(this)));return me(this.parsedUrl.path,this.attributeStorageInfo??[],e,t,r,this.apiKey,this.customParameters)}async queryCachedFeature(e,r){const i=await this.queryCachedAttributes(e,[r]);if(!i||0===i.length)throw new n("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const s=new t;return s.attributes=i[0],s.layer=this,s.sourceLayer=this,s}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryObjectIds(e||this.createQuery(),t)))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryAttachments(e,t)))}getFieldUsageInfo(e){const t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(l.getLogger(this).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return he(this,e)}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return e?.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),!this.associatedLayer)throw new n("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new n("scenelayer:query-not-available","SceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return null!=this.statisticsInfo&&this.statisticsInfo.some((t=>t.name===e))}async queryCachedStatistics(e,t){if(await this.load(t),!this.statisticsInfo)throw new n("scenelayer:no-cached-statistics","Cached statistics are not available for this layer");const r=this.fieldsIndex.get(e);if(!r)throw new n("scenelayer:field-unexisting",`Field '${e}' does not exist on the layer`);for(const i of this.statisticsInfo)if(i.name===r.name){const e=c(this.parsedUrl.path,i.href);return s(e,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:t?t.signal:null}).then((e=>e.data))}throw new n("scenelayer:no-cached-statistics","Cached statistics for this attribute are not available")}async saveAs(e,t){return this._debouncedSaveOperations(D.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(D.SAVE,e)}async applyEdits(e,t){const{applyEdits:r}=await import("./graphics/editingSupport.js");let i=t;await this.load();const s=this.associatedLayer;if(!s)throw new n(`${this.type}-layer:not-editable`,"Service is not editable");await s.load();const{globalIdField:o}=s,a=!!s.infoFor3D,l=i?.globalIdUsed??!0;if(a&&null==o)throw new n(`${this.type}-layer:not-editable`,"Valid globalIdField expected on editable SceneLayer");if(a&&!l)throw new n(`${this.type}-layer:globalid-required`,"globalIdUsed must not be false for SceneLayer editing as globalIds are required.");return U(s.url)&&a&&null!=e.deleteFeatures&&null!=o&&(i={...i,globalIdToObjectId:await M(s,e.deleteFeatures,o)}),r(this,s.source,e,i)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new n(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}on(e,t){return super.on(e,t)}async convertMesh(e,t){const r=e=>{throw l.getLogger(this).error(".convertMesh()",e.message),e};await this.load(),this.infoFor3D||r(new n("invalid:layer","SceneLayer has no capability for mesh conversion"));const i=await this.extractAndFilterFiles(e),s=i.reduce(((e,t)=>ee(this.infoFor3D,t)?e+1:e),0);0===s&&r(new L),s>1&&r(new j);const o=this.spatialReference,a=t?.location??new w({x:0,y:0,z:0,spatialReference:o}),p=a.spatialReference.isGeographic?"local":"georeferenced",d=b.createWithExternalSource(a,i,{vertexSpace:p}),[y]=await this.uploadAssets([d],t);return y}async extractAndFilterFiles(e){await this.load();const t=this.infoFor3D;if(!t)return e;return(await fe(e)).filter((e=>te(t,e)))}validateLayer(e){if(e.layerType&&!we.has(e.layerType))throw new n("scenelayer:layer-type-not-supported","SceneLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new n("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});if(this.version.major>2)throw new n("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});function t(e,t){let r=!1,i=!1;if(null==e)r=!0,i=!0;else{const s=t&&t.isGeographic;switch(e){case"east-north-up":case"earth-centered":r=!0,i=s;break;case"vertex-reference-frame":r=!0,i=!s;break;default:r=!1}}if(!r)throw new n("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!i)throw new n("scenelayer:incompatible-normal-reference-frame","Normal reference frame is incompatible with layer spatial reference.")}t(this.normalReferenceFrame,this.spatialReference)}_getTypeKeywords(){const e=[];if("points"===this.profile)e.push("Point");else{if("mesh-pyramids"!==this.profile)throw new n("scenelayer:unknown-profile","SceneLayer:save() encountered an unknown SceneLayer profile: "+this.profile);e.push("3DObject")}return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(const e of this.fields){const t=!(!this.attributeStorageInfo||!this.attributeStorageInfo.some((t=>t.name===e.name))),r=!!this.associatedLayer?.fields?.some((t=>t&&e.name===t.name)),i={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||r,supportsLayerQuery:r};this._fieldUsageInfo[e.name]=i}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPopupOverrides(),this._applyAssociatedLayerExtentOverride(),this._applyAssociatedLayerPrivileges()}_applyAssociatedLayerFieldsOverrides(){if(!this.associatedLayer?.fields)return;let e=null;for(const t of this.associatedLayer.fields){const r=this.getField(t.name);r?(!r.domain&&t.domain&&(r.domain=t.domain.clone()),r.editable=t.editable,r.nullable=t.nullable,r.length=t.length):(e||(e=this.fields?this.fields.slice():[]),e.push(t.clone()))}e&&this._set("fields",e)}_applyAssociatedLayerPopupOverrides(){if(!this.associatedLayer)return;const e=["popupTemplate","popupEnabled"],t=f(this);for(let r=0;r<e.length;r++){const i=e[r],s=this.originIdOf(i),o=this.associatedLayer.originIdOf(i);s<o&&(o===v.SERVICE||o===v.PORTAL_ITEM)&&t.setAtOrigin(i,this.associatedLayer[i],o)}}_applyAssociatedLayerExtentOverride(){const e=this.associatedLayer?.editingInfo?.lastEditDate,t=this.associatedLayer?.serverGens,r=this.associatedLayer?.getAtOrigin("fullExtent","service");if(!ce()||null==this.associatedLayer?.infoFor3D||!r||!U(this.associatedLayer?.url)||!e||this.serviceUpdateTimeStamp?.lastUpdate===e.getTime()||!this.serviceUpdateTimeStamp&&t?.minServerGen===t?.serverGen)return;f(this).setAtOrigin("fullExtent",r.clone(),v.SERVICE)}_applyAssociatedLayerPrivileges(){const e=this.associatedLayer;e&&(this._set("userHasEditingPrivileges",e.userHasEditingPrivileges),this._set("userHasFullEditingPrivileges",e.userHasFullEditingPrivileges),this._set("userHasUpdateItemPrivileges",e.userHasUpdateItemPrivileges))}async _setAssociatedFeatureLayer(e){if(["mesh-pyramids","points"].includes(this.profile))try{const{serverUrl:t,layerId:r,portalItem:i}=await R(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e}),s=await oe.FeatureLayer();this.associatedLayer=new s({url:t,customParameters:this.customParameters,layerId:r,portalItem:i}),await this.associatedLayer.load()}catch(t){y(t)||this._logWarningOnPopupEnabled()}}async _logWarningOnPopupEnabled(){await u((()=>this.popupEnabled&&null!=this.popupTemplate));const e=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?l.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${e}`):l.getLogger(this).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${e}`)}_validateElevationInfo(){const e=this.elevationInfo;"mesh-pyramids"===this.profile&&de(l.getLogger(this),ye("Mesh scene layers","relative-to-scene",e)),de(l.getLogger(this),ue("Scene layers",e))}};e([h({types:{key:"type",base:K,typeMap:{selection:$}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:!0},"portal-item":{name:"layerDefinition.featureReduction",write:!0}}}})],Le.prototype,"featureReduction",void 0),e([h({type:[ae],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}}})],Le.prototype,"rangeInfos",void 0),e([h({json:{read:!1}})],Le.prototype,"associatedLayer",void 0),e([h({type:["show","hide"]})],Le.prototype,"listMode",void 0),e([h({type:["ArcGISSceneServiceLayer"]})],Le.prototype,"operationalLayerType",void 0),e([h({json:{read:!1},readOnly:!0})],Le.prototype,"type",void 0),e([h({...Ie.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Le.prototype,"fields",void 0),e([h()],Le.prototype,"types",null),e([h()],Le.prototype,"typeIdField",null),e([h()],Le.prototype,"templates",null),e([h()],Le.prototype,"formTemplate",null),e([h({readOnly:!0,clonable:!1})],Le.prototype,"fieldsIndex",null),e([h({type:se,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],Le.prototype,"floorInfo",void 0),e([h(Ie.outFields)],Le.prototype,"outFields",void 0),e([h({type:Z,readOnly:!0,json:{read:!1}})],Le.prototype,"nodePages",void 0),e([m("service","nodePages",["nodePages","pointNodePages"])],Le.prototype,"readNodePages",null),e([h({type:[J],readOnly:!0})],Le.prototype,"materialDefinitions",void 0),e([h({type:[X],readOnly:!0})],Le.prototype,"textureSetDefinitions",void 0),e([h({type:[Y],readOnly:!0})],Le.prototype,"geometryDefinitions",void 0),e([h({readOnly:!0})],Le.prototype,"serviceUpdateTimeStamp",void 0),e([h({readOnly:!0})],Le.prototype,"attributeStorageInfo",void 0),e([h({readOnly:!0})],Le.prototype,"statisticsInfo",void 0),e([h({type:a.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],Le.prototype,"excludeObjectIds",void 0),e([h({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],Le.prototype,"definitionExpression",void 0),e([h({type:ne,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],Le.prototype,"filter",void 0),e([h({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Le.prototype,"path",void 0),e([h(C)],Le.prototype,"elevationInfo",null),e([h({readOnly:!0,json:{read:!1}})],Le.prototype,"effectiveCapabilities",null),e([h({readOnly:!0})],Le.prototype,"effectiveEditingEnabled",null),e([h({type:String})],Le.prototype,"geometryType",null),e([h(G)],Le.prototype,"labelsVisible",void 0),e([h({type:[re],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:ie},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:ie},write:!0}})],Le.prototype,"labelingInfo",void 0),e([h(Q)],Le.prototype,"legendEnabled",void 0),e([h({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:["opacity","layerDefinition.drawingInfo.transparency"],reader(e,t){if("number"==typeof e&&e>=0&&e<=1)return e;const r=t.layerDefinition?.drawingInfo?.transparency;return void 0!==r?be(r):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],Le.prototype,"opacity",void 0),e([h({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Le.prototype,"priority",void 0),e([h({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Le.prototype,"semantic",void 0),e([h({types:i,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],Le.prototype,"renderer",null),e([h({json:{read:!1}})],Le.prototype,"cachedDrawingInfo",void 0),e([m("service","cachedDrawingInfo")],Le.prototype,"readCachedDrawingInfo",null),e([h({readOnly:!0,json:{read:!1}})],Le.prototype,"capabilities",null),e([h({type:Boolean,json:{read:!1}})],Le.prototype,"editingEnabled",null),e([h({readOnly:!0,json:{write:!1,read:!1}})],Le.prototype,"infoFor3D",null),e([h({readOnly:!0,json:{write:!1,read:!1}})],Le.prototype,"relationships",null),e([h(N)],Le.prototype,"popupEnabled",void 0),e([h({type:r,json:{name:"popupInfo",write:!0}})],Le.prototype,"popupTemplate",void 0),e([h({readOnly:!0,json:{read:!1}})],Le.prototype,"defaultPopupTemplate",null),e([h({type:String,json:{read:!1}})],Le.prototype,"objectIdField",void 0),e([m("service","objectIdField",["objectIdField","fields"])],Le.prototype,"readObjectIdField",null),e([h({type:String,json:{read:!1}})],Le.prototype,"globalIdField",void 0),e([m("service","globalIdField",["globalIdField","fields"])],Le.prototype,"readGlobalIdField",null),e([h({readOnly:!0,type:String,json:{read:!1}})],Le.prototype,"displayField",null),e([h({type:String,json:{read:!1}})],Le.prototype,"profile",void 0),e([m("service","profile",["store.profile"])],Le.prototype,"readProfile",null),e([h({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],Le.prototype,"normalReferenceFrame",void 0),e([h(k)],Le.prototype,"screenSizePerspectiveEnabled",void 0),e([h({json:{read:!1,origins:{service:{read:!0}}}})],Le.prototype,"serviceItemId",void 0),Le=e([g("esri.layers.SceneLayer")],Le);const je={"mesh-pyramids":"mesh-pyramids",meshpyramids:"mesh-pyramids","features-meshes":"mesh-pyramids",points:"points","features-points":"points",lines:"lines","features-lines":"lines",polygons:"polygons","features-polygons":"polygons"},Fe={"mesh-pyramids":"mesh",points:"point",lines:"polyline",polygons:"polygon"},Se=Le;export{Se as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import r from"../../../../core/Error.js";import has from"../../../../core/has.js";import{whenOrAbort as o}from"../../../../core/promiseUtils.js";import{urlToObject as s}from"../../../../core/urlUtils.js";import{property as i}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as u}from"../../../../core/accessorSupport/decorators/subclass.js";import{getMimeTypeFormatId as
|
|
5
|
+
import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import r from"../../../../core/Error.js";import has from"../../../../core/has.js";import{whenOrAbort as o}from"../../../../core/promiseUtils.js";import{urlToObject as s}from"../../../../core/urlUtils.js";import{property as i}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as u}from"../../../../core/accessorSupport/decorators/subclass.js";import{equals as a}from"../../../../geometry/support/spatialReferenceUtils.js";import{getMimeTypeFormatId as n,getFilenameFormatId as c}from"../../../support/infoFor3D.js";import{DataLayerSource as p}from"../../../support/source/DataLayerSource.js";import{parseUrl as l}from"../../../../rest/utils.js";import{executeForCount as m}from"../../../../rest/query/executeForCount.js";import{executeForExtent as f}from"../../../../rest/query/executeForExtent.js";import{executeForIds as y}from"../../../../rest/query/executeForIds.js";import{executeRawQueryJSON as d}from"../../../../rest/query/executeQueryJSON.js";import{executeRawQueryPBF as h}from"../../../../rest/query/executeQueryPBF.js";import S from"../../../../rest/support/FeatureSet.js";import F from"../../../../rest/support/Query.js";let j=class extends t{constructor(e){super(e),this.dynamicDataSource=null,this.fieldsIndex=null,this.gdbVersion=null,this.infoFor3D=null,this.pbfSupported=!1,this.queryAttachmentsSupported=!1,this.sourceSpatialReference=null,this.url=null}get parsedUrl(){return s(this.url)}async execute(e,t){const r=await this.executeJSON(e,t);return this.featureSetFromJSON(e,r,t)}async executeJSON(e,t){const r=this._normalizeQuery(e),o=null!=e.outStatistics?.[0],s=has("featurelayer-pbf-statistics"),i=!o||s;let u;if(this.pbfSupported&&i)try{u=await h(this.url,r,t)}catch(a){if("query:parsing-pbf"!==a.name)throw a;this.pbfSupported=!1}return this.pbfSupported&&i||(u=await d(this.url,r,t)),this._normalizeFields(u.fields),u}async featureSetFromJSON(e,t,r){if(!this._queryIs3DObjectFormat(e)||null==this.infoFor3D||!t.features)return S.fromJSON(t);const{meshFeatureSetFromJSON:s}=await o(import("../../../../rest/support/meshFeatureSet.js"),r);return s(e,this.infoFor3D,t)}executeForCount(e,t){return m(this.url,this._normalizeQuery(e),t)}executeForExtent(e,t){return f(this.url,this._normalizeQuery(e),t)}executeForIds(e,t){return y(this.url,this._normalizeQuery(e),t)}async executeRelationshipQuery(e,t){const[{default:r},{executeRelationshipQuery:s}]=await o(Promise.all([import("../../../../rest/support/RelationshipQuery.js"),import("../../../../rest/query/executeRelationshipQuery.js")]),t);return e=r.from(e),(this.gdbVersion||this.dynamicDataSource)&&((e=e.clone()).gdbVersion=e.gdbVersion||this.gdbVersion,e.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource),s(this.url,e,t)}async executeRelationshipQueryForCount(e,t){const[{default:r},{executeRelationshipQueryForCount:s}]=await o(Promise.all([import("../../../../rest/support/RelationshipQuery.js"),import("../../../../rest/query/executeRelationshipQuery.js")]),t);return e=r.from(e),(this.gdbVersion||this.dynamicDataSource)&&((e=e.clone()).gdbVersion=e.gdbVersion||this.gdbVersion,e.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource),s(this.url,e,t)}async executeAttachmentQuery(e,t){const{executeAttachmentQuery:r,fetchAttachments:s,processAttachmentQueryResult:i}=await o(import("../../../../rest/query/operations/queryAttachments.js"),t),u=l(this.url);return i(u,await(this.queryAttachmentsSupported?r(u,e,t):s(u,e,t)))}async executeTopFeaturesQuery(e,t){const{executeTopFeaturesQuery:r}=await o(import("../../../../rest/query/executeTopFeaturesQuery.js"),t);return r(this.parsedUrl,e,this.sourceSpatialReference,t)}async executeForTopIds(e,t){const{executeForTopIds:r}=await o(import("../../../../rest/query/executeForTopIds.js"),t);return r(this.parsedUrl,e,t)}async executeForTopExtents(e,t){const{executeForTopExtents:r}=await o(import("../../../../rest/query/executeForTopExtents.js"),t);return r(this.parsedUrl,e,t)}async executeForTopCount(e,t){const{executeForTopCount:r}=await o(import("../../../../rest/query/executeForTopCount.js"),t);return r(this.parsedUrl,e,t)}_normalizeQuery(e){let t=F.from(e);t.sourceSpatialReference=t.sourceSpatialReference||this.sourceSpatialReference,(this.gdbVersion||this.dynamicDataSource)&&(t=t===e?t.clone():t,t.gdbVersion=e.gdbVersion||this.gdbVersion,t.dynamicDataSource=e.dynamicDataSource?p.from(e.dynamicDataSource):this.dynamicDataSource);const{infoFor3D:o}=this;if(null!=o&&this._queryIs3DObjectFormat(e)){t=t===e?t.clone():t,t.formatOf3DObjects=null;const{supportedFormats:s,queryFormats:i}=o,u=n("model/gltf-binary",s)??c("glb",s),p=n("model/gltf+json",s)??c("gltf",s);for(const e of i){if(e===u){t.formatOf3DObjects=e;break}e!==p||t.formatOf3DObjects||(t.formatOf3DObjects=e)}if(!t.formatOf3DObjects)throw new r("query:unsupported-3d-query-formats","Could not find any supported 3D object query format. Only supported formats are 3D_glb and 3D_gltf");if(t.outSpatialReference&&!a(t.outSpatialReference,this.sourceSpatialReference))throw new r("query:unsupported-out-spatial-reference","3D object feature services do not support projection of geometries");if(null==t.outFields||!t.outFields.includes("*")){t=t===e?t.clone():t,null==t.outFields&&(t.outFields=[]);const{originX:r,originY:s,originZ:i,translationX:u,translationY:a,translationZ:n,scaleX:c,scaleY:p,scaleZ:l,rotationX:m,rotationY:f,rotationZ:y,rotationDeg:d}=o.transformFieldRoles;t.outFields.push(r,s,i,u,a,n,c,p,l,m,f,y,d)}}return t}_normalizeFields(e){if(null!=this.fieldsIndex&&null!=e)for(const t of e){const e=this.fieldsIndex.get(t.name);e&&Object.assign(t,e.toJSON())}}_queryIs3DObjectFormat(e){return null!=this.infoFor3D&&!0===e.returnGeometry&&"xyFootprint"!==e.multipatchOption&&!e.outStatistics}};e([i({type:p})],j.prototype,"dynamicDataSource",void 0),e([i()],j.prototype,"fieldsIndex",void 0),e([i()],j.prototype,"gdbVersion",void 0),e([i()],j.prototype,"infoFor3D",void 0),e([i({readOnly:!0})],j.prototype,"parsedUrl",null),e([i()],j.prototype,"pbfSupported",void 0),e([i()],j.prototype,"queryAttachmentsSupported",void 0),e([i()],j.prototype,"sourceSpatialReference",void 0),e([i({type:String})],j.prototype,"url",void 0),j=e([u("esri.layers.graphics.sources.support.QueryTask")],j);const x=j;export{x as default};
|
package/package.json
CHANGED