@arcgis/core 4.30.0-next.20240320 → 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/505f35a02ac6a67a255b.js +1 -0
- package/assets/esri/core/workers/chunks/{51fc02ce8cab70b363b1.js → 5162ba2975b4b025590e.js} +1 -1
- package/assets/esri/core/workers/chunks/{4e76bc3274df21ec22e0.js → 51700be6f50efba0bc82.js} +1 -1
- package/assets/esri/core/workers/chunks/{65ed5dfd19d99588d66e.js → 689a122c77b39e5c73eb.js} +1 -1
- package/assets/esri/core/workers/chunks/{bf65e5c155ad15f58907.js → 7530fef3ee217643898e.js} +1 -1
- package/assets/esri/core/workers/chunks/{a0fa32df6a262ffb3179.js → 75bd66a0a1b42e057c1a.js} +1 -1
- package/assets/esri/core/workers/chunks/{a53b90ced443603a78c5.js → 7819a446d3c9749ff74f.js} +1 -1
- package/assets/esri/core/workers/chunks/{424b5d20d7f64e28c0a7.js → 7ca976273f1f64f75aa7.js} +1 -1
- package/assets/esri/core/workers/chunks/{36d697a3788b86f24588.js → 9403e2ee9c97488ce4f0.js} +1 -1
- package/assets/esri/core/workers/chunks/{e6a5ccd93f2dab2bb1e0.js → a0de5ad1d08f511cf3d8.js} +1 -1
- package/assets/esri/core/workers/chunks/{3c19806b03f14d288fae.js → b3cd5f8691ba0b5b5729.js} +1 -1
- package/assets/esri/core/workers/chunks/b3d905c6b100831ad3c4.js +1 -0
- package/assets/esri/core/workers/chunks/{785454b084d8ec4e7dc0.js → df38774f63984be0a478.js} +1 -1
- package/assets/esri/core/workers/chunks/{1cc0714457e299b54496.js → e22a13ff683d207e0434.js} +1 -1
- package/assets/esri/core/workers/chunks/{7f8725f146c29290e240.js → e93cc8cdeaaf81210dc2.js} +1 -1
- package/assets/esri/core/workers/chunks/{ac8606f2e4719c96a732.js → ee1345b212cde1ff4755.js} +1 -1
- package/assets/esri/core/workers/chunks/eecb0064c5343e88bfde.js +1 -0
- package/interfaces.d.ts +33 -106
- 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/FrameTask.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/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/ZoomBox.js +1 -1
- package/views/2d/viewpointUtils.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/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/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/assets/esri/core/workers/chunks/2427699e34e1895ed024.js +0 -1
- package/assets/esri/core/workers/chunks/7bba67d345da6eced804.js +0 -1
- package/assets/esri/core/workers/chunks/d344e99dd999aaaabbe3.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3359],{46130:(e,a,t)=>{t.d(a,{v:()=>n});var r=t(76553);function n(e){e?.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:a,newOrigin:t})=>{(0,r.H)(e)&&t&&e.originOf(a)!==t&&e.updateOrigin(a,t)}))}},76553:(e,a,t)=>{function r(e){return e&&"getAtOrigin"in e&&"originOf"in e}t.d(a,{H:()=>r})},33359:(e,a,t)=>{t.d(a,{save:()=>I,saveAs:()=>O});var r=t(4576),n=(t(49186),t(71530)),i=t(60694),s=t(23154),o=t(83531),l=t(4513),u=t(10407);const c="Feature Service",d="feature-layer-utils",y=`${d}-save`,f=`${d}-save-as`;function p(e){return{isValid:(0,o.W_)(e)&&("feature"!==e.type||!e.dynamicDataSource),errorMessage:"Feature layer should be a layer or table in a map or feature service"}}function m(e){const a=[],t=[];for(const{layer:r,layerJSON:n}of e)r.isTable?t.push(n):a.push(n);return{layers:a,tables:t}}function w(e){return m([e])}async function h(e,a){return/\/\d+\/?$/.test(e.url)?w(a[0]):async function(e,a){if(e.reverse(),!a)return m(e);const t=await async function(e,a){let t=await e.fetchData("json");if(function(e){return!!(e&&Array.isArray(e.layers)&&Array.isArray(e.tables))}(t))return t;t||={},function(e){e.layers||=[],e.tables||=[]}(t);const{layer:{url:r,customParameters:n,apiKey:i}}=a[0];return await async function(e,a,t){const{url:r,customParameters:n,apiKey:i}=a,{serviceJSON:o,layersJSON:u}=await(0,s.Q)(r,{customParameters:n,apiKey:i}),c=P(e.layers,o.layers,t),d=P(e.tables,o.tables,t);e.layers=c.itemResources,e.tables=d.itemResources;const y=[...c.added,...d.added],f=u?[...u.layers,...u.tables]:[];await async function(e,a,t,r){const n=await async function(e){const a=[];e.forEach((({type:e})=>{const t=(0,s.K)(e),r=l.S[t];a.push(r())}));const t=await Promise.all(a),r=new Map;return e.forEach((({type:e},a)=>{r.set(e,t[a])})),r}(a),i=a.map((({id:e,type:a})=>new(n.get(a))({url:t,layerId:e,sourceJSON:r.find((({id:a})=>a===e))})));await Promise.allSettled(i.map((e=>e.load()))),i.forEach((a=>{const{layerId:t,loaded:r,defaultPopupTemplate:n}=a;if(!r||null==n)return;const i={id:t,popupInfo:n.toJSON()};"ArcGISFeatureLayer"!==a.operationalLayerType&&(i.layerType=a.operationalLayerType),v(a,i,e)}))}(e,y,r,f)}(t,{url:r??"",customParameters:n,apiKey:i},a.map((e=>e.layer.layerId))),t}(a,e);for(const a of e)v(a.layer,a.layerJSON,t);return function(e,a){const t=[],r=[];for(const{layer:e}of a){const{isTable:a,layerId:n}=e;a?r.push(n):t.push(n)}b(e.layers,t),b(e.tables,r)}(t,e),t}(a,e)}function b(e,a){if(e.length<2)return;const t=[];for(const{id:a}of e)t.push(a);(0,r.aI)(t.sort(L),a.slice().sort(L))&&e.sort(((e,t)=>{const r=a.indexOf(e.id),n=a.indexOf(t.id);return r<n?-1:r>n?1:0}))}function L(e,a){return e<a?-1:e>a?1:0}function P(e,a,t){const n=(0,r.iv)(e,a,((e,a)=>e.id===a.id));e=e.filter((e=>!n.removed.some((a=>a.id===e.id))));const i=n.added;return i.forEach((({id:a})=>{e.push({id:a})})),{itemResources:e,added:i.filter((({id:e})=>!t.includes(e)))}}function v(e,a,t){e.isTable?S(t.tables,a):S(t.layers,a)}function S(e,a){const t=e.findIndex((({id:e})=>e===a.id));-1===t?e.push(a):e[t]=a}async function g(e,a){const{url:t,layerId:r,title:n,fullExtent:s,isTable:o}=e,l=(0,i.qg)(t);a.url="FeatureServer"===l?.serverType?t:`${t}/${r}`,a.title||=n,a.extent=null,o||null==s||(a.extent=await(0,u.sQ)(s)),(0,u.OM)(a,u.mm.METADATA),(0,u.OM)(a,u.mm.MULTI_LAYER),(0,u.LG)(a,u.mm.SINGLE_LAYER),o&&(0,u.LG)(a,u.mm.TABLE)}async function I(e,a){return(0,n.UN)({layer:e,itemType:c,validateLayer:p,createItemData:(e,a)=>h(a,[e]),errorNamePrefix:y},a)}async function O(e,a,t){return(0,n.Uh)({layer:e,itemType:c,validateLayer:p,createItemData:(e,a)=>Promise.resolve(w(e)),errorNamePrefix:f,newItem:a,setItemProperties:g},t)}},71530:(e,a,t)=>{t.d(a,{UN:()=>L,Uh:()=>P});var r=t(49186),n=t(46130),i=t(20655),s=t(80812),o=t(88788),l=t(10407),u=t(49864),c=t(26121);async function d(e){const{layer:a,errorNamePrefix:t,validateLayer:n}=e;await a.load(),function(e,a,t){const n=t(e);if(!n.isValid)throw new r.A(`${a}:invalid-parameters`,n.errorMessage,{layer:e})}(a,t,n)}function y(e,a){return`Layer (title: ${e.title}, id: ${e.id}) of type '${e.declaredClass}' ${a}`}function f(e){const{item:a,errorNamePrefix:t,layer:n,validateItem:i}=e;if((0,u.X)(a),function(e){const{item:a,itemType:t,additionalItemType:n,errorNamePrefix:i,layer:s}=e,o=[t];if(n&&o.push(n),!o.includes(a.type)){const e=o.map((e=>`'${e}'`)).join(", ");throw new r.A(`${i}:portal-item-wrong-type`,`Portal item type should be one of: "${e}"`,{item:a,layer:s})}}(e),i){const e=i(a);if(!e.isValid)throw new r.A(`${t}:invalid-parameters`,e.errorMessage,{layer:n})}}function p(e){const{layer:a,errorNamePrefix:t}=e,{portalItem:n}=a;if(!n)throw new r.A(`${t}:portal-item-not-set`,y(a,"requires the portalItem property to be set"));if(!n.loaded)throw new r.A(`${t}:portal-item-not-loaded`,y(a,"cannot be saved to a portal item that does not exist or is inaccessible"));f({...e,item:n})}function m(e){const{newItem:a,itemType:t}=e;let r=s.default.from(a);return r.id&&(r=r.clone(),r.id=null),r.type??=t,r.portal??=i.A.getDefault(),f({...e,item:r}),r}function w(e){return(0,o.m)(e,"portal-item")}async function h(e,a,t){"beforeSave"in e&&"function"==typeof e.beforeSave&&await e.beforeSave();const r=e.write({},a);return await Promise.all(a.resources?.pendingOperations??[]),(0,c.c)(a,{errorName:"layer-write:unsupported"},t),r}function b(e){(0,l.LG)(e,l.mm.JSAPI),e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter(((e,a,t)=>t.indexOf(e)===a)))}async function L(e,a){const{layer:t,createItemData:r,createJSONContext:i,setItemProperties:s,saveResources:o,supplementalUnsupportedErrors:l}=e;await d(e),p(e);const u=t.portalItem,c=i?i(u):w(u),y=await h(t,c,{...a,supplementalUnsupportedErrors:l}),f=await r({layer:t,layerJSON:y},u);return await(s?.(t,u)),b(u),await u.update({data:f}),(0,n.v)(c),await(o?.(u,c)),u}async function P(e,a){const{layer:t,createItemData:r,createJSONContext:i,setItemProperties:s,saveResources:o,supplementalUnsupportedErrors:l}=e;await d(e);const u=m(e),c=i?i(u):w(u),y=await h(t,c,{...a,supplementalUnsupportedErrors:l}),f=await r({layer:t,layerJSON:y},u);return await s(t,u),b(u),await async function(e,a,t){const r=e.portal;await r.signIn(),await(r.user?.addItem({item:e,data:a,folder:t?.folder}))}(u,f,a),t.portalItem=u,(0,n.v)(c),await(o?.(u,c)),u}},23154:(e,a,t)=>{t.d(a,{K:()=>y,Q:()=>i});var r=t(24183);const n=new Set(["Catalog Layer","Feature Layer","Oriented Imagery Layer"]);async function i(e,a){const{loadContext:t,...n}=a||{},i=t?await t.fetchServiceMetadata(e,n):await(0,r.V)(e,n);d(i),l(i);const s={serviceJSON:i};if((i.currentVersion??0)<10.5)return s;const o=`${e}/layers`,u=t?await t.fetchServiceMetadata(o,n):await(0,r.V)(o,n);return d(u),l(u),s.layersJSON={layers:u.layers,tables:u.tables},s}function s(e){const{type:a}=e;return!!a&&n.has(a)}function o(e){return"Table"===e.type}function l(e){e.layers=e.layers?.filter(s),e.tables=e.tables?.filter(o)}function u(e){e.type||="Feature Layer"}function c(e){e.type||="Table"}function d(e){e.layers?.forEach(u),e.tables?.forEach(c)}function y(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(545),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}},88788:(e,a,t)=>{t.d(a,{m:()=>s,v:()=>i});var r=t(84952),n=t(20655);function i(e,a){return{...o(e,a),readResourcePaths:[]}}function s(e,a,t){const n=(0,r.An)(e.itemUrl);return{...o(e,a),messages:[],writtenProperties:[],blockedRelativeUrls:[],verifyItemRelativeUrls:n?{rootPath:n.path,writtenUrls:[]}:null,resources:t?{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}:null}}function o(e,a){return{origin:a,url:(0,r.An)(e.itemUrl),portal:e.portal||n.A.getDefault(),portalItem:e}}},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}},49864:(e,a,t)=>{t.d(a,{X:()=>s});var r=t(92602),n=t(49186),i=t(926);function s(e){if(r.A.apiKey&&(0,i.Q)(e.portal.url))throw new n.A("save-api-key-utils:api-key-not-supported",`Saving is not supported on ${e.portal.url} when using an api key`)}},26121:(e,a,t)=>{t.d(a,{c:()=>s,d:()=>n});var r=t(49186);async function n(e){const a=[];for(const t of e.allLayers)if("beforeSave"in t&&"function"==typeof t.beforeSave){const e=t.beforeSave();e&&a.push(e)}await Promise.allSettled(a)}const i=new Set(["layer:unsupported","property:unsupported","symbol:unsupported","symbol-layer:unsupported","url:unsupported"]);function s(e,a,t){let n=(e.messages??[]).filter((({type:e})=>"error"===e)).map((({name:e,message:a,details:t})=>new r.A(e,a,t)));if(e.blockedRelativeUrls&&(n=n.concat(e.blockedRelativeUrls.map((e=>new r.A("url:unsupported",`Relative url '${e}' is not supported`))))),t){const{ignoreUnsupported:e,supplementalUnsupportedErrors:a=[],requiredPropertyChecksDisabled:r}=t;e&&(n=n.filter((({name:e})=>!(i.has(e)||a.includes(e))))),r&&(n=n.filter((e=>"web-document-write:property-required"!==e.name)))}if(n.length>0)throw new r.A(a.errorName,"Failed to save due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:n})}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3359],{46130:(e,a,t)=>{t.d(a,{v:()=>n});var r=t(76553);function n(e){e?.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:a,newOrigin:t})=>{(0,r.H)(e)&&t&&e.originOf(a)!==t&&e.updateOrigin(a,t)}))}},76553:(e,a,t)=>{function r(e){return e&&"getAtOrigin"in e&&"originOf"in e}t.d(a,{H:()=>r})},33359:(e,a,t)=>{t.d(a,{save:()=>I,saveAs:()=>O});var r=t(4576),n=(t(49186),t(71530)),i=t(60694),s=t(23154),o=t(83531),l=t(4513),u=t(10407);const c="Feature Service",d="feature-layer-utils",y=`${d}-save`,f=`${d}-save-as`;function p(e){return{isValid:(0,o.W_)(e)&&("feature"!==e.type||!e.dynamicDataSource),errorMessage:"Feature layer should be a layer or table in a map or feature service"}}function m(e){const a=[],t=[];for(const{layer:r,layerJSON:n}of e)r.isTable?t.push(n):a.push(n);return{layers:a,tables:t}}function w(e){return m([e])}async function h(e,a){return/\/\d+\/?$/.test(e.url)?w(a[0]):async function(e,a){if(e.reverse(),!a)return m(e);const t=await async function(e,a){let t=await e.fetchData("json");if(function(e){return!!(e&&Array.isArray(e.layers)&&Array.isArray(e.tables))}(t))return t;t||={},function(e){e.layers||=[],e.tables||=[]}(t);const{layer:{url:r,customParameters:n,apiKey:i}}=a[0];return await async function(e,a,t){const{url:r,customParameters:n,apiKey:i}=a,{serviceJSON:o,layersJSON:u}=await(0,s.Q)(r,{customParameters:n,apiKey:i}),c=P(e.layers,o.layers,t),d=P(e.tables,o.tables,t);e.layers=c.itemResources,e.tables=d.itemResources;const y=[...c.added,...d.added],f=u?[...u.layers,...u.tables]:[];await async function(e,a,t,r){const n=await async function(e){const a=[];e.forEach((({type:e})=>{const t=(0,s.K)(e),r=l.S[t];a.push(r())}));const t=await Promise.all(a),r=new Map;return e.forEach((({type:e},a)=>{r.set(e,t[a])})),r}(a),i=a.map((({id:e,type:a})=>new(n.get(a))({url:t,layerId:e,sourceJSON:r.find((({id:a})=>a===e))})));await Promise.allSettled(i.map((e=>e.load()))),i.forEach((a=>{const{layerId:t,loaded:r,defaultPopupTemplate:n}=a;if(!r||null==n)return;const i={id:t,popupInfo:n.toJSON()};"ArcGISFeatureLayer"!==a.operationalLayerType&&(i.layerType=a.operationalLayerType),v(a,i,e)}))}(e,y,r,f)}(t,{url:r??"",customParameters:n,apiKey:i},a.map((e=>e.layer.layerId))),t}(a,e);for(const a of e)v(a.layer,a.layerJSON,t);return function(e,a){const t=[],r=[];for(const{layer:e}of a){const{isTable:a,layerId:n}=e;a?r.push(n):t.push(n)}b(e.layers,t),b(e.tables,r)}(t,e),t}(a,e)}function b(e,a){if(e.length<2)return;const t=[];for(const{id:a}of e)t.push(a);(0,r.aI)(t.sort(L),a.slice().sort(L))&&e.sort(((e,t)=>{const r=a.indexOf(e.id),n=a.indexOf(t.id);return r<n?-1:r>n?1:0}))}function L(e,a){return e<a?-1:e>a?1:0}function P(e,a,t){const n=(0,r.iv)(e,a,((e,a)=>e.id===a.id));e=e.filter((e=>!n.removed.some((a=>a.id===e.id))));const i=n.added;return i.forEach((({id:a})=>{e.push({id:a})})),{itemResources:e,added:i.filter((({id:e})=>!t.includes(e)))}}function v(e,a,t){e.isTable?S(t.tables,a):S(t.layers,a)}function S(e,a){const t=e.findIndex((({id:e})=>e===a.id));-1===t?e.push(a):e[t]=a}async function g(e,a){const{url:t,layerId:r,title:n,fullExtent:s,isTable:o}=e,l=(0,i.qg)(t);a.url="FeatureServer"===l?.serverType?t:`${t}/${r}`,a.title||=n,a.extent=null,o||null==s||(a.extent=await(0,u.sQ)(s)),(0,u.OM)(a,u.mm.METADATA),(0,u.OM)(a,u.mm.MULTI_LAYER),(0,u.LG)(a,u.mm.SINGLE_LAYER),o&&(0,u.LG)(a,u.mm.TABLE)}async function I(e,a){return(0,n.UN)({layer:e,itemType:c,validateLayer:p,createItemData:(e,a)=>h(a,[e]),errorNamePrefix:y},a)}async function O(e,a,t){return(0,n.Uh)({layer:e,itemType:c,validateLayer:p,createItemData:(e,a)=>Promise.resolve(w(e)),errorNamePrefix:f,newItem:a,setItemProperties:g},t)}},71530:(e,a,t)=>{t.d(a,{UN:()=>L,Uh:()=>P});var r=t(49186),n=t(46130),i=t(20655),s=t(80812),o=t(88788),l=t(10407),u=t(49864),c=t(26121);async function d(e){const{layer:a,errorNamePrefix:t,validateLayer:n}=e;await a.load(),function(e,a,t){const n=t(e);if(!n.isValid)throw new r.A(`${a}:invalid-parameters`,n.errorMessage,{layer:e})}(a,t,n)}function y(e,a){return`Layer (title: ${e.title}, id: ${e.id}) of type '${e.declaredClass}' ${a}`}function f(e){const{item:a,errorNamePrefix:t,layer:n,validateItem:i}=e;if((0,u.X)(a),function(e){const{item:a,itemType:t,additionalItemType:n,errorNamePrefix:i,layer:s}=e,o=[t];if(n&&o.push(n),!o.includes(a.type)){const e=o.map((e=>`'${e}'`)).join(", ");throw new r.A(`${i}:portal-item-wrong-type`,`Portal item type should be one of: "${e}"`,{item:a,layer:s})}}(e),i){const e=i(a);if(!e.isValid)throw new r.A(`${t}:invalid-parameters`,e.errorMessage,{layer:n})}}function p(e){const{layer:a,errorNamePrefix:t}=e,{portalItem:n}=a;if(!n)throw new r.A(`${t}:portal-item-not-set`,y(a,"requires the portalItem property to be set"));if(!n.loaded)throw new r.A(`${t}:portal-item-not-loaded`,y(a,"cannot be saved to a portal item that does not exist or is inaccessible"));f({...e,item:n})}function m(e){const{newItem:a,itemType:t}=e;let r=s.default.from(a);return r.id&&(r=r.clone(),r.id=null),r.type??=t,r.portal??=i.A.getDefault(),f({...e,item:r}),r}function w(e){return(0,o.m)(e,"portal-item")}async function h(e,a,t){"beforeSave"in e&&"function"==typeof e.beforeSave&&await e.beforeSave();const r=e.write({},a);return await Promise.all(a.resources?.pendingOperations??[]),(0,c.c)(a,{errorName:"layer-write:unsupported"},t),r}function b(e){(0,l.LG)(e,l.mm.JSAPI),e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter(((e,a,t)=>t.indexOf(e)===a)))}async function L(e,a){const{layer:t,createItemData:r,createJSONContext:i,setItemProperties:s,saveResources:o,supplementalUnsupportedErrors:l}=e;await d(e),p(e);const u=t.portalItem,c=i?i(u):w(u),y=await h(t,c,{...a,supplementalUnsupportedErrors:l}),f=await r({layer:t,layerJSON:y},u);return await(s?.(t,u)),b(u),await u.update({data:f}),(0,n.v)(c),await(o?.(u,c)),u}async function P(e,a){const{layer:t,createItemData:r,createJSONContext:i,setItemProperties:s,saveResources:o,supplementalUnsupportedErrors:l}=e;await d(e);const u=m(e),c=i?i(u):w(u),y=await h(t,c,{...a,supplementalUnsupportedErrors:l}),f=await r({layer:t,layerJSON:y},u);return await s(t,u),b(u),await async function(e,a,t){const r=e.portal;await r.signIn(),await(r.user?.addItem({item:e,data:a,folder:t?.folder}))}(u,f,a),t.portalItem=u,(0,n.v)(c),await(o?.(u,c)),u}},23154:(e,a,t)=>{t.d(a,{K:()=>y,Q:()=>i});var r=t(24183);const n=new Set(["Catalog Layer","Feature Layer","Oriented Imagery Layer"]);async function i(e,a){const{loadContext:t,...n}=a||{},i=t?await t.fetchServiceMetadata(e,n):await(0,r.V)(e,n);d(i),l(i);const s={serviceJSON:i};if((i.currentVersion??0)<10.5)return s;const o=`${e}/layers`,u=t?await t.fetchServiceMetadata(o,n):await(0,r.V)(o,n);return d(u),l(u),s.layersJSON={layers:u.layers,tables:u.tables},s}function s(e){const{type:a}=e;return!!a&&n.has(a)}function o(e){return"Table"===e.type}function l(e){e.layers=e.layers?.filter(s),e.tables=e.tables?.filter(o)}function u(e){e.type||="Feature Layer"}function c(e){e.type||="Table"}function d(e){e.layers?.forEach(u),e.tables?.forEach(c)}function y(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}},88788:(e,a,t)=>{t.d(a,{m:()=>s,v:()=>i});var r=t(84952),n=t(20655);function i(e,a){return{...o(e,a),readResourcePaths:[]}}function s(e,a,t){const n=(0,r.An)(e.itemUrl);return{...o(e,a),messages:[],writtenProperties:[],blockedRelativeUrls:[],verifyItemRelativeUrls:n?{rootPath:n.path,writtenUrls:[]}:null,resources:t?{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}:null}}function o(e,a){return{origin:a,url:(0,r.An)(e.itemUrl),portal:e.portal||n.A.getDefault(),portalItem:e}}},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}},49864:(e,a,t)=>{t.d(a,{X:()=>s});var r=t(92602),n=t(49186),i=t(926);function s(e){if(r.A.apiKey&&(0,i.Q)(e.portal.url))throw new n.A("save-api-key-utils:api-key-not-supported",`Saving is not supported on ${e.portal.url} when using an api key`)}},26121:(e,a,t)=>{t.d(a,{c:()=>s,d:()=>n});var r=t(49186);async function n(e){const a=[];for(const t of e.allLayers)if("beforeSave"in t&&"function"==typeof t.beforeSave){const e=t.beforeSave();e&&a.push(e)}await Promise.allSettled(a)}const i=new Set(["layer:unsupported","property:unsupported","symbol:unsupported","symbol-layer:unsupported","url:unsupported"]);function s(e,a,t){let n=(e.messages??[]).filter((({type:e})=>"error"===e)).map((({name:e,message:a,details:t})=>new r.A(e,a,t)));if(e.blockedRelativeUrls&&(n=n.concat(e.blockedRelativeUrls.map((e=>new r.A("url:unsupported",`Relative url '${e}' is not supported`))))),t){const{ignoreUnsupported:e,supplementalUnsupportedErrors:a=[],requiredPropertyChecksDisabled:r}=t;e&&(n=n.filter((({name:e})=>!(i.has(e)||a.includes(e))))),r&&(n=n.filter((e=>"web-document-write:property-required"!==e.name)))}if(n.length>0)throw new r.A(a.errorName,"Failed to save due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:n})}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2288],{92288:(e,t,r)=>{r.r(t),r.d(t,{registerFunctions:()=>F});var n=r(92602),o=(r(59456),r(47609)),i=r(66395),a=r(85935),s=r(78878),l=r(80672),p=r(91075),u=r(57251),c=r(28735),f=r(20655),d=r(80812),h=r(78888),y=r(56507),m=r(65864),g=r(2272),w=r(92300),v=r(90237),S=r(25482),A=r(10107),R=(r(44208),r(53966),r(87811),r(40608)),_=r(21325);let G=class extends S.oY{constructor(e){super(e),this.geometries=[],this.outSpatialReference=null,this.transformation=null,this.transformForward=null}toJSON(){const e=this.geometries.map((e=>e.toJSON())),t=this.geometries[0],r={};return r.outSR=(0,_.YX)(this.outSpatialReference),r.inSR=(0,_.YX)(t.spatialReference),r.geometries=JSON.stringify({geometryType:(0,m.$B)(t),geometries:e}),this.transformation&&(r.transformation=this.transformation.wkid||JSON.stringify(this.transformation)),null!=this.transformForward&&(r.transformForward=this.transformForward),r}};(0,v._)([(0,A.MZ)()],G.prototype,"geometries",void 0),(0,v._)([(0,A.MZ)({json:{read:{source:"outSR"}}})],G.prototype,"outSpatialReference",void 0),(0,v._)([(0,A.MZ)()],G.prototype,"transformation",void 0),(0,v._)([(0,A.MZ)()],G.prototype,"transformForward",void 0),G=(0,v._)([(0,R.$)("esri.rest.support.ProjectParameters")],G);const j=G,b=(0,y.dp)(j);var x=r(25927),k=r(42538),M=r(40662),N=r(42095),$=r(23150),Z=r(16930);let T=null;async function D(e){const t=n.A.geometryServiceUrl??"";if(!t){(0,u.isLoaded)()||await(0,u.load)();for(const t of e)t.container[t.indexer]=(0,u.project)(t.container[t.indexer],Z.A.WGS84);return}const r=e.map((e=>e.container[e.indexer])),o=new j({geometries:r,outSpatialReference:Z.A.WGS84}),i=await async function(e,t,r){t=b(t);const n=(0,g.Dl)(e),o={...n.query,f:"json",...t.toJSON()},i=t.outSpatialReference,a=(0,m.$B)(t.geometries[0]),s=(0,g.jV)(o,void 0);return(0,h.A)(n.path+"/project",s).then((({data:{geometries:e}})=>(0,w.V)(e,a,i)))}(t,o);for(let t=0;t<i.length;t++){const r=e[t];r.container[r.indexer]=i[t]}}async function P(e,t){const n=new d.default({portal:e,id:t});return await n.load(),null===T&&(T=await r.e(3709).then(r.bind(r,43709))),await T.fetchKnowledgeGraph(n.url)}function J(e,t,r,n,o){if(null===e)return null;if((0,s.c)(e)||(0,s.b)(e))return e;if((0,s.k)(e))return e.toJSDate();if((0,s.k)(e))return e.toJSDate();if((0,s.m)(e))return e.toStorageFormat();if((0,s.n)(e))return e.toStorageString();if((0,s.v)(e)){const i={};for(const a of e.keys())i[a]=J(e.field(a),t,r,n,o),i[a]instanceof p.A&&o.push({container:i,indexer:a});return i}if((0,s.o)(e)){const i=e.map((e=>J(e,t,r,n,o)));for(let e=0;e<i.length;e++)i[e]instanceof p.A&&o.push({container:i,indexer:e});return i}if((0,s.p)(e)){if(e.spatialReference.isWGS84)return e;if(e.spatialReference.isWebMercator&&t)return(0,c.ci)(e);if(!t||!r)return e;throw new a.D$(n,a.TX.WrongSpatialReference,null)}}function O(e,t){if(!e)return null;const r={};for(const n in e)r[n]=I(e[n],t);return r}function I(e,t){return null===e?null:(0,s.o)(e)?e.map((e=>I(e,t))):e instanceof x.A?{graphTypeName:e.typeName,id:e.id,graphType:"entity",properties:O(e.properties,t)}:e instanceof M.A?{graphType:"object",properties:O(e.properties,t)}:e instanceof $.A?{graphTypeName:e.typeName,id:e.id,graphType:"relationship",originId:e.originId??null,destinationId:e.destinationId??null,properties:O(e.properties,t)}:e instanceof N.A?{graphType:"path",path:e.path?e.path.map((e=>I(e,t))):null}:(0,s.p)(e)?function(e,t){if(!e)return e;if(e.spatialReference.isWGS84&&t.spatialReference.isWebMercator)return(0,c.Gh)(e);if(e.spatialReference.equals(t.spatialReference))return e;throw new a.D$(t,a.TX.WrongSpatialReference,null)}(e,t):(0,s.c)(e)||(0,s.b)(e)||(0,s.a6)(e)?e:null}function F(e){"async"===e.mode&&(e.functions.knowledgegraphbyportalitem=function(t,r){return e.standardFunctionAsync(t,r,((e,n,i)=>{if((0,s.H)(i,2,2,t,r),null===i[0])throw new a.D$(t,a.TX.PortalRequired,r);if(i[0]instanceof o.A){const e=(0,s.j)(i[1]);let r;return r=t.services?.portal?t.services.portal:f.A.getDefault(),P((0,l.R)(i[0],r),e)}if(!1===(0,s.c)(i[0]))throw new a.D$(t,a.TX.InvalidParameter,r);const p=(0,s.j)(i[0]);return P(t.services?.portal??f.A.getDefault(),p)}))},e.signatures.push({name:"knowledgegraphbyportalitem",min:2,max:2}),e.functions.querygraph=function(t,n){return e.standardFunctionAsync(t,n,(async(e,o,l)=>{(0,s.H)(l,2,4,t,n);const p=l[0];if(!(0,s.w)(p))throw new a.D$(t,a.TX.InvalidParameter,n);const u=l[1];if(!(0,s.c)(u))throw new a.D$(t,a.TX.InvalidParameter,n);null===T&&(T=await r.e(3709).then(r.bind(r,43709)));let c=null;const f=(0,s.K)(l[2],null);if(!(f instanceof i.A||null===f))throw new a.D$(t,a.TX.InvalidParameter,n);if(f){let e=[];c=J(f,!0,!1,t,e),e=e.filter((e=>!e.container[e.indexer].spatialReference.isWGS84)),e.length>0&&await D(e)}const d=new k.A({openCypherQuery:u,bindParameters:c});(p?.serviceDefinition?.currentVersion??11.3)>11.2&&(d.outputSpatialReference=t.spatialReference);const h=(await T.executeQueryStreaming(p,d)).resultRowsStream.getReader(),y=[];try{for(;;){const{done:e,value:r}=await h.read();if(e)break;if((0,s.o)(r))for(const e of r)y.push(I(e,t));else{const e=[];for(const n of r)e.push(I(r[n],t));y.push(e)}}}catch(e){throw e}return i.A.convertJsonToArcade(y,(0,s.N)(t),!1,!0)}))},e.signatures.push({name:"querygraph",min:2,max:4}))}},80672:(e,t,r)=>{r.d(t,{R:()=>o});var n=r(20655);function o(e,t){return null===e?t:new n.A({url:e.field("url")})}},92300:(e,t,r)=>{r.d(t,{V:()=>i,X:()=>o});var n=r(65864);function o(e){return{geometryType:(0,n.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function i(e,t,r){const o=(0,n.xD)(t);return e.map((e=>{const t=o.fromJSON(e);return t.spatialReference=r,t}))}},25927:(e,t,r)=>{r.d(t,{A:()=>p});var n=r(90237),o=(r(59456),r(10107)),i=(r(44208),r(53966),r(87811),r(40608)),a=r(54238),s=r(86738);let l=class extends a.A{constructor(e){super(e),this.layoutGeometry=null}};(0,n._)([(0,o.MZ)({type:s.A,json:{write:!0}})],l.prototype,"layoutGeometry",void 0),l=(0,n._)([(0,i.$)("esri.rest.knowledgeGraph.Entity")],l);const p=l},54238:(e,t,r)=>{r.d(t,{A:()=>l});var n=r(90237),o=r(10107),i=(r(44208),r(53966),r(87811),r(40608)),a=r(77901);let s=class extends a.A{constructor(e){super(e),this.typeName=null,this.id=null}};(0,n._)([(0,o.MZ)({type:String,json:{write:!0}})],s.prototype,"typeName",void 0),(0,n._)([(0,o.MZ)({type:String,json:{write:!0}})],s.prototype,"id",void 0),s=(0,n._)([(0,i.$)("esri.rest.knowledgeGraph.GraphNamedObject")],s);const l=s},77901:(e,t,r)=>{r.d(t,{A:()=>l});var n=r(90237),o=r(25482),i=r(10107),a=(r(44208),r(53966),r(87811),r(40608));let s=class extends o.oY{constructor(e){super(e),this.properties=null}};(0,n._)([(0,i.MZ)({json:{write:!0}})],s.prototype,"properties",void 0),s=(0,n._)([(0,a.$)("esri.rest.knowledgeGraph.GraphObject")],s);const l=s},42538:(e,t,r)=>{r.d(t,{A:()=>u});var n=r(90237),o=r(10107),i=(r(44208),r(53966),r(87811),r(40608)),a=r(69622);let s=class extends a.A{constructor(e){super(e),this.openCypherQuery=""}};(0,n._)([(0,o.MZ)()],s.prototype,"openCypherQuery",void 0),s=(0,n._)([(0,i.$)("esri.rest.knowledgeGraph.GraphQuery")],s);const l=s;let p=class extends l{constructor(e){super(e),this.bindParameters=null,this.bindGeometryQuantizationParameters=null,this.outputQuantizationParameters=null,this.outputSpatialReference=null}};(0,n._)([(0,o.MZ)()],p.prototype,"bindParameters",void 0),(0,n._)([(0,o.MZ)()],p.prototype,"bindGeometryQuantizationParameters",void 0),(0,n._)([(0,o.MZ)()],p.prototype,"outputQuantizationParameters",void 0),(0,n._)([(0,o.MZ)()],p.prototype,"outputSpatialReference",void 0),p=(0,n._)([(0,i.$)("esri.rest.knowledgeGraph.GraphQueryStreaming")],p);const u=p},40662:(e,t,r)=>{r.d(t,{A:()=>s});var n=r(90237),o=(r(53966),r(44208),r(87811),r(49186),r(40608)),i=r(77901);let a=class extends i.A{constructor(e){super(e)}};a=(0,n._)([(0,o.$)("esri.rest.knowledgeGraph.ObjectValue")],a);const s=a},42095:(e,t,r)=>{r.d(t,{A:()=>p});var n=r(90237),o=r(25482),i=r(10107),a=(r(44208),r(53966),r(87811),r(40608)),s=r(77901);let l=class extends o.oY{constructor(e){super(e),this.path=null}};(0,n._)([(0,i.MZ)({type:[s.A],json:{write:!0}})],l.prototype,"path",void 0),l=(0,n._)([(0,a.$)("esri.rest.knowledgeGraph.Path")],l);const p=l},23150:(e,t,r)=>{r.d(t,{A:()=>p});var n=r(90237),o=(r(59456),r(10107)),i=(r(44208),r(53966),r(87811),r(40608)),a=r(54238),s=r(82799);let l=class extends a.A{constructor(e){super(e),this.originId=null,this.destinationId=null,this.layoutGeometry=null}};(0,n._)([(0,o.MZ)({type:String,json:{write:!0}})],l.prototype,"originId",void 0),(0,n._)([(0,o.MZ)({type:String,json:{write:!0}})],l.prototype,"destinationId",void 0),(0,n._)([(0,o.MZ)({type:s.A,json:{write:!0}})],l.prototype,"layoutGeometry",void 0),l=(0,n._)([(0,i.$)("esri.rest.knowledgeGraph.Relationship")],l);const p=l},2272:(e,t,r)=>{r.d(t,{Dl:()=>a,jV:()=>i,lF:()=>s}),r(92602),r(70333);var n=r(4718),o=r(84952);function i(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function a(e){return"string"==typeof e?(0,o.An)(e):(0,n.o8)(e)}function s(e,t,r){const n={};for(const o in e){if("declaredClass"===o)continue;const i=e[o];if(null!=i&&"function"!=typeof i)if(Array.isArray(i))n[o]=i.map((e=>s(
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2288],{92288:(e,t,r)=>{r.r(t),r.d(t,{registerFunctions:()=>F});var n=r(92602),o=(r(59456),r(47609)),i=r(66395),a=r(85935),s=r(78878),l=r(80672),p=r(91075),u=r(57251),c=r(28735),f=r(20655),d=r(80812),h=r(78888),y=r(56507),m=r(65864),g=r(2272),w=r(92300),v=r(90237),S=r(25482),A=r(10107),R=(r(44208),r(53966),r(87811),r(40608)),_=r(21325);let G=class extends S.oY{constructor(e){super(e),this.geometries=[],this.outSpatialReference=null,this.transformation=null,this.transformForward=null}toJSON(){const e=this.geometries.map((e=>e.toJSON())),t=this.geometries[0],r={};return r.outSR=(0,_.YX)(this.outSpatialReference),r.inSR=(0,_.YX)(t.spatialReference),r.geometries=JSON.stringify({geometryType:(0,m.$B)(t),geometries:e}),this.transformation&&(r.transformation=this.transformation.wkid||JSON.stringify(this.transformation)),null!=this.transformForward&&(r.transformForward=this.transformForward),r}};(0,v._)([(0,A.MZ)()],G.prototype,"geometries",void 0),(0,v._)([(0,A.MZ)({json:{read:{source:"outSR"}}})],G.prototype,"outSpatialReference",void 0),(0,v._)([(0,A.MZ)()],G.prototype,"transformation",void 0),(0,v._)([(0,A.MZ)()],G.prototype,"transformForward",void 0),G=(0,v._)([(0,R.$)("esri.rest.support.ProjectParameters")],G);const j=G,b=(0,y.dp)(j);var x=r(25927),k=r(42538),M=r(40662),N=r(42095),$=r(23150),Z=r(16930);let T=null;async function D(e){const t=n.A.geometryServiceUrl??"";if(!t){(0,u.isLoaded)()||await(0,u.load)();for(const t of e)t.container[t.indexer]=(0,u.project)(t.container[t.indexer],Z.A.WGS84);return}const r=e.map((e=>e.container[e.indexer])),o=new j({geometries:r,outSpatialReference:Z.A.WGS84}),i=await async function(e,t,r){t=b(t);const n=(0,g.Dl)(e),o={...n.query,f:"json",...t.toJSON()},i=t.outSpatialReference,a=(0,m.$B)(t.geometries[0]),s=(0,g.jV)(o,void 0);return(0,h.A)(n.path+"/project",s).then((({data:{geometries:e}})=>(0,w.V)(e,a,i)))}(t,o);for(let t=0;t<i.length;t++){const r=e[t];r.container[r.indexer]=i[t]}}async function P(e,t){const n=new d.default({portal:e,id:t});return await n.load(),null===T&&(T=await r.e(3709).then(r.bind(r,43709))),await T.fetchKnowledgeGraph(n.url)}function J(e,t,r,n,o){if(null===e)return null;if((0,s.c)(e)||(0,s.b)(e))return e;if((0,s.k)(e))return e.toJSDate();if((0,s.k)(e))return e.toJSDate();if((0,s.m)(e))return e.toStorageFormat();if((0,s.n)(e))return e.toStorageString();if((0,s.v)(e)){const i={};for(const a of e.keys())i[a]=J(e.field(a),t,r,n,o),i[a]instanceof p.A&&o.push({container:i,indexer:a});return i}if((0,s.o)(e)){const i=e.map((e=>J(e,t,r,n,o)));for(let e=0;e<i.length;e++)i[e]instanceof p.A&&o.push({container:i,indexer:e});return i}if((0,s.p)(e)){if(e.spatialReference.isWGS84)return e;if(e.spatialReference.isWebMercator&&t)return(0,c.ci)(e);if(!t||!r)return e;throw new a.D$(n,a.TX.WrongSpatialReference,null)}}function O(e,t){if(!e)return null;const r={};for(const n in e)r[n]=I(e[n],t);return r}function I(e,t){return null===e?null:(0,s.o)(e)?e.map((e=>I(e,t))):e instanceof x.A?{graphTypeName:e.typeName,id:e.id,graphType:"entity",properties:O(e.properties,t)}:e instanceof M.A?{graphType:"object",properties:O(e.properties,t)}:e instanceof $.A?{graphTypeName:e.typeName,id:e.id,graphType:"relationship",originId:e.originId??null,destinationId:e.destinationId??null,properties:O(e.properties,t)}:e instanceof N.A?{graphType:"path",path:e.path?e.path.map((e=>I(e,t))):null}:(0,s.p)(e)?function(e,t){if(!e)return e;if(e.spatialReference.isWGS84&&t.spatialReference.isWebMercator)return(0,c.Gh)(e);if(e.spatialReference.equals(t.spatialReference))return e;throw new a.D$(t,a.TX.WrongSpatialReference,null)}(e,t):(0,s.c)(e)||(0,s.b)(e)||(0,s.a6)(e)?e:null}function F(e){"async"===e.mode&&(e.functions.knowledgegraphbyportalitem=function(t,r){return e.standardFunctionAsync(t,r,((e,n,i)=>{if((0,s.H)(i,2,2,t,r),null===i[0])throw new a.D$(t,a.TX.PortalRequired,r);if(i[0]instanceof o.A){const e=(0,s.j)(i[1]);let r;return r=t.services?.portal?t.services.portal:f.A.getDefault(),P((0,l.R)(i[0],r),e)}if(!1===(0,s.c)(i[0]))throw new a.D$(t,a.TX.InvalidParameter,r);const p=(0,s.j)(i[0]);return P(t.services?.portal??f.A.getDefault(),p)}))},e.signatures.push({name:"knowledgegraphbyportalitem",min:2,max:2}),e.functions.querygraph=function(t,n){return e.standardFunctionAsync(t,n,(async(e,o,l)=>{(0,s.H)(l,2,4,t,n);const p=l[0];if(!(0,s.w)(p))throw new a.D$(t,a.TX.InvalidParameter,n);const u=l[1];if(!(0,s.c)(u))throw new a.D$(t,a.TX.InvalidParameter,n);null===T&&(T=await r.e(3709).then(r.bind(r,43709)));let c=null;const f=(0,s.K)(l[2],null);if(!(f instanceof i.A||null===f))throw new a.D$(t,a.TX.InvalidParameter,n);if(f){let e=[];c=J(f,!0,!1,t,e),e=e.filter((e=>!e.container[e.indexer].spatialReference.isWGS84)),e.length>0&&await D(e)}const d=new k.A({openCypherQuery:u,bindParameters:c});(p?.serviceDefinition?.currentVersion??11.3)>11.2&&(d.outputSpatialReference=t.spatialReference);const h=(await T.executeQueryStreaming(p,d)).resultRowsStream.getReader(),y=[];try{for(;;){const{done:e,value:r}=await h.read();if(e)break;if((0,s.o)(r))for(const e of r)y.push(I(e,t));else{const e=[];for(const n of r)e.push(I(r[n],t));y.push(e)}}}catch(e){throw e}return i.A.convertJsonToArcade(y,(0,s.N)(t),!1,!0)}))},e.signatures.push({name:"querygraph",min:2,max:4}))}},80672:(e,t,r)=>{r.d(t,{R:()=>o});var n=r(20655);function o(e,t){return null===e?t:new n.A({url:e.field("url")})}},92300:(e,t,r)=>{r.d(t,{V:()=>i,X:()=>o});var n=r(65864);function o(e){return{geometryType:(0,n.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function i(e,t,r){const o=(0,n.xD)(t);return e.map((e=>{const t=o.fromJSON(e);return t.spatialReference=r,t}))}},25927:(e,t,r)=>{r.d(t,{A:()=>p});var n=r(90237),o=(r(59456),r(10107)),i=(r(44208),r(53966),r(87811),r(40608)),a=r(54238),s=r(86738);let l=class extends a.A{constructor(e){super(e),this.layoutGeometry=null}};(0,n._)([(0,o.MZ)({type:s.A,json:{write:!0}})],l.prototype,"layoutGeometry",void 0),l=(0,n._)([(0,i.$)("esri.rest.knowledgeGraph.Entity")],l);const p=l},54238:(e,t,r)=>{r.d(t,{A:()=>l});var n=r(90237),o=r(10107),i=(r(44208),r(53966),r(87811),r(40608)),a=r(77901);let s=class extends a.A{constructor(e){super(e),this.typeName=null,this.id=null}};(0,n._)([(0,o.MZ)({type:String,json:{write:!0}})],s.prototype,"typeName",void 0),(0,n._)([(0,o.MZ)({type:String,json:{write:!0}})],s.prototype,"id",void 0),s=(0,n._)([(0,i.$)("esri.rest.knowledgeGraph.GraphNamedObject")],s);const l=s},77901:(e,t,r)=>{r.d(t,{A:()=>l});var n=r(90237),o=r(25482),i=r(10107),a=(r(44208),r(53966),r(87811),r(40608));let s=class extends o.oY{constructor(e){super(e),this.properties=null}};(0,n._)([(0,i.MZ)({json:{write:!0}})],s.prototype,"properties",void 0),s=(0,n._)([(0,a.$)("esri.rest.knowledgeGraph.GraphObject")],s);const l=s},42538:(e,t,r)=>{r.d(t,{A:()=>u});var n=r(90237),o=r(10107),i=(r(44208),r(53966),r(87811),r(40608)),a=r(69622);let s=class extends a.A{constructor(e){super(e),this.openCypherQuery=""}};(0,n._)([(0,o.MZ)()],s.prototype,"openCypherQuery",void 0),s=(0,n._)([(0,i.$)("esri.rest.knowledgeGraph.GraphQuery")],s);const l=s;let p=class extends l{constructor(e){super(e),this.bindParameters=null,this.bindGeometryQuantizationParameters=null,this.outputQuantizationParameters=null,this.outputSpatialReference=null}};(0,n._)([(0,o.MZ)()],p.prototype,"bindParameters",void 0),(0,n._)([(0,o.MZ)()],p.prototype,"bindGeometryQuantizationParameters",void 0),(0,n._)([(0,o.MZ)()],p.prototype,"outputQuantizationParameters",void 0),(0,n._)([(0,o.MZ)()],p.prototype,"outputSpatialReference",void 0),p=(0,n._)([(0,i.$)("esri.rest.knowledgeGraph.GraphQueryStreaming")],p);const u=p},40662:(e,t,r)=>{r.d(t,{A:()=>s});var n=r(90237),o=(r(53966),r(44208),r(87811),r(49186),r(40608)),i=r(77901);let a=class extends i.A{constructor(e){super(e)}};a=(0,n._)([(0,o.$)("esri.rest.knowledgeGraph.ObjectValue")],a);const s=a},42095:(e,t,r)=>{r.d(t,{A:()=>p});var n=r(90237),o=r(25482),i=r(10107),a=(r(44208),r(53966),r(87811),r(40608)),s=r(77901);let l=class extends o.oY{constructor(e){super(e),this.path=null}};(0,n._)([(0,i.MZ)({type:[s.A],json:{write:!0}})],l.prototype,"path",void 0),l=(0,n._)([(0,a.$)("esri.rest.knowledgeGraph.Path")],l);const p=l},23150:(e,t,r)=>{r.d(t,{A:()=>p});var n=r(90237),o=(r(59456),r(10107)),i=(r(44208),r(53966),r(87811),r(40608)),a=r(54238),s=r(82799);let l=class extends a.A{constructor(e){super(e),this.originId=null,this.destinationId=null,this.layoutGeometry=null}};(0,n._)([(0,o.MZ)({type:String,json:{write:!0}})],l.prototype,"originId",void 0),(0,n._)([(0,o.MZ)({type:String,json:{write:!0}})],l.prototype,"destinationId",void 0),(0,n._)([(0,o.MZ)({type:s.A,json:{write:!0}})],l.prototype,"layoutGeometry",void 0),l=(0,n._)([(0,i.$)("esri.rest.knowledgeGraph.Relationship")],l);const p=l},2272:(e,t,r)=>{r.d(t,{Dl:()=>a,jV:()=>i,lF:()=>s}),r(92602),r(70333);var n=r(4718),o=r(84952);function i(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function a(e){return"string"==typeof e?(0,o.An)(e):(0,n.o8)(e)}function s(e,t,r){const n={};for(const o in e){if("declaredClass"===o)continue;const i=e[o];if(null!=i&&"function"!=typeof i)if(Array.isArray(i))n[o]=i.map((e=>s(e)));else if("object"==typeof i)if(i.toJSON){const e=i.toJSON(r?.[o]);n[o]=t?e:JSON.stringify(e)}else n[o]=t?i:JSON.stringify(i);else n[o]=i}return n}r(926)}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8383,1053],{60945:(e,t,s)=>{s.d(t,{A:()=>f});var i,n=s(90237),r=s(25482),o=s(88930),a=s(10107),l=(s(44208),s(53966),s(87811),s(36005)),u=s(40608),h=s(43937),d=s(56400);let c=i=class extends r.oY{static get allTime(){return p}static get empty(){return _}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,s=this.end?.getTime()??this.end,i=e.start?.getTime()??e.start,n=e.end?.getTime()??e.end;return t===i&&s===n}expandTo(e,t=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();let s=this.start;s&&(s=(0,o.lL)(s,e,t));let n=this.end;if(n){const s=(0,o.lL)(n,e,t);n=n.getTime()===s.getTime()?s:(0,o.S1)(s,1,e,t)}return new i({start:s,end:n})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,s=this.end?.getTime()??1/0,n=e.start?.getTime()??-1/0,r=e.end?.getTime()??1/0;let o,a;return n>=t&&n<=s?o=n:t>=n&&t<=r&&(o=t),s>=n&&s<=r?a=s:r>=t&&r<=s&&(a=r),null==o||null==a||isNaN(o)||isNaN(a)?i.empty:new i({start:o===-1/0?null:new Date(o),end:a===1/0?null:new Date(a)})}offset(e,t,s=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();const n=new i,{start:r,end:a}=this;return null!=r&&(n.start=(0,o.S1)(r,e,t,s)),null!=a&&(n.end=(0,o.S1)(a,e,t,s)),n}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return p.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,s=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:s})}};(0,n._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0),(0,n._)([(0,l.w)("end")],c.prototype,"readEnd",null),(0,n._)([(0,h.K)("end")],c.prototype,"writeEnd",null),(0,n._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null),(0,n._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null),(0,n._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0),(0,n._)([(0,l.w)("start")],c.prototype,"readStart",null),(0,n._)([(0,h.K)("start")],c.prototype,"writeStart",null),c=i=(0,n._)([(0,u.$)("esri.TimeExtent")],c);const p=new c,_=new c({start:void 0,end:void 0}),f=c},11053:(e,t,s)=>{s.d(t,{c:()=>i,g:()=>n});var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},71903:(e,t,s)=>{var i;s.d(t,{u:()=>i}),function(e){e[e.KILOBYTES=1024]="KILOBYTES",e[e.MEGABYTES=1048576]="MEGABYTES",e[e.GIGABYTES=1073741824]="GIGABYTES"}(i||(i={}))},69540:(e,t,s)=>{s.d(t,{O:()=>h,P:()=>d});var i=s(90237),n=s(69622),r=(s(44208),s(4718)),o=(s(53966),s(97768)),a=s(35666),l=s(88620),u=s(40608);const h=e=>{let t=class extends e{clone(){const e=(0,l.oY)(this);(0,o.Lw)(e,"unable to clone instance of non-accessor class");const t=e.metadata,s=e.store,i={},n=new Map;for(const e in t){const o=t[e],l=s?.originOf(e),u=o.clonable;if(o.readOnly||!1===u||l!==a.Gr.USER&&l!==a.Gr.DEFAULTS&&l!==a.Gr.WEB_MAP&&l!==a.Gr.WEB_SCENE)continue;const h=this[e];let d=null;d="function"==typeof u?u(h):"reference"===u?h:(0,r.TU)(h),null!=h&&null==d||(l===a.Gr.DEFAULTS?n.set(e,d):i[e]=d)}const u=new(0,Object.getPrototypeOf(this).constructor)(i);if(n.size){const e=(0,l.oY)(u)?.store;if(e)for(const[t,s]of n)e.set(t,s,a.Gr.DEFAULTS)}return u}};return t=(0,i._)([(0,u.$)("esri.core.Clonable")],t),t};let d=class extends(h(n.A)){};d=(0,i._)([(0,u.$)("esri.core.Clonable")],d)},55359:(e,t,s)=>{s.d(t,{q:()=>n});var i=s(57219);class n{constructor(e,t){this._storage=new i.F,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this),t&&this._storage.registerRemoveFunc("",t)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,s=1){this._storage.put(this,e,t,s,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},57219:(e,t,s)=>{s.d(t,{F:()=>a,Mn:()=>o});var i,n,r=s(3694);(n=i||(i={}))[n.ALL=0]="ALL",n[n.SOME=1]="SOME";class o{constructor(e,t,s){this.name=e,this._storage=t,this.id=l+++":",this.size=0,this.maxSize=-1,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),s&&(this._storage.registerRemoveFunc(this.id,s),this._removeFunc=!0)}destroy(){this._storage.clear(this),this._removeFunc&&this._storage.deregisterRemoveFunc(this.id),this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get storageSize(){return this._storage.size}getSize(e){return this._storage.getSize(this,e)}resetHitRate(){this._hit=this._miss=0}put(e,t,s,i=0){this._storage.put(this,e,t,s,i)}pop(e){const t=this._storage.pop(this,e);return void 0===t?++this._miss:++this._hit,t}get(e){const t=this._storage.get(this,e);return void 0===t?++this._miss:++this._hit,t}peek(e){return this._storage.peek(this,e)}updateSize(e,t,s){this._storage.updateSize(this,e,t,s)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class a{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new r.A,this._users=new r.A}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const s=this._db.get(e.id+t);return s?.size??0}put(e,t,s,n,r){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==s&&this._notifyRemove(t,o.entry,o.size,i.ALL)),n>this._maxSize)return void this._notifyRemove(t,s,n,i.ALL);if(void 0===s)return void console.warn("Refusing to cache undefined entry ");if(!n||n<0)return console.warn(`Refusing to cache entry with size ${n} for key ${t}`),void this._notifyRemove(t,s,0,i.ALL);const a=1+Math.max(r,-4)- -3;this._db.set(t,new u(s,n,a)),this._size+=n,e.size+=n,this._checkSize()}updateSize(e,t,s,n){t=e.id+t;const r=this._db.get(t);if(r&&r.entry===s){for(this._size-=r.size,e.size-=r.size;n>this._maxSize;){const e=this._notifyRemove(t,s,n,i.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);n=e}r.size=n,this._size+=n,e.size+=n,this._checkSize()}}pop(e,t){t=e.id+t;const s=this._db.get(t);if(s)return this._size-=s.size,e.size-=s.size,this._db.delete(t),++this._hit,s.entry;++this._miss}get(e,t){t=e.id+t;const s=this._db.get(t);if(void 0!==s)return this._db.delete(t),s.lives=s.lifetime,this._db.set(t,s),++this._hit,s.entry;++this._miss}peek(e,t){const s=this._db.get(e.id+t);return s?++this._hit:++this._miss,s?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},s=new Array;this._db.forEach(((e,i)=>{const n=e.lifetime;s[n]=(s[n]||0)+e.size,this._users.forAll((s=>{const{id:n,name:r}=s;if(i.startsWith(n)){const s=t[r]||0;t[r]=s+e.size}}))}));const i={};this._users.forAll((e=>{const s=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const n=t[s]||0;t[s]=n,i[s]=Math.round(100*e.hitRate)+"%"}else i[s]="0%"}));const n=Object.keys(t);n.sort(((e,s)=>t[s]-t[e])),n.forEach((s=>e[s]=Math.round(t[s]/2**20)+"MB / "+i[s]));for(let t=s.length-1;t>=0;--t){const i=s[t];i&&(e["Priority "+(t+-3-1)]=Math.round(i/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,s)=>{s.startsWith(t)&&(this._size-=e.size,this._db.delete(s),this._notifyRemove(s,e.entry,e.size,i.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,e.size,i.ALL))),this._users.forAll((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,s,i){let n;return this._removeFuncs.some((r=>{if(e.startsWith(r[0])){const e=r[1](t,i,s);return"number"==typeof e&&(n=e),!0}return!1})),n}_checkSize(){this._users.forAll((e=>this._checkSizeLimits(e))),this._checkSizeLimits()}_checkSizeLimits(e){const t=e??this;if(t.maxSize<0||t.size<=t.maxSize)return;const s=e?.id;let i=!0;for(;i;){i=!1;for(const[n,r]of this._db)if(0===r.lifetime&&(!s||n.startsWith(s))){if(this._purgeItem(n,r,e),t.size<=.9*t.maxSize)return;i||=this._db.has(n)}}for(const[i,n]of this._db)if((!s||i.startsWith(s))&&(this._purgeItem(i,n,e),t.size<=.9*t.maxSize))return}_purgeItem(e,t,s=this._users.find((t=>e.startsWith(t.id)))){if(this._db.delete(e),t.lives<=1){this._size-=t.size,s&&(s.size-=t.size);const n=this._notifyRemove(e,t.entry,t.size,i.SOME);null!=n&&n>0&&(this._size+=n,s&&(s.size+=n),t.lives=t.lifetime,t.size=n,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}let l=0;class u{constructor(e,t,s){this.entry=e,this.size=t,this.lifetime=s,this.lives=s}}},75503:(e,t,s)=>{s.d(t,{w:()=>o});var i=s(4576),n=s(3694),r=s(11006);class o{constructor(e=9,t){this._compareMinX=d,this._compareMinY=c,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),w.prune(),x.prune(),E.prune(),S.prune()}all(e){a(this._data,e)}search(e,t){let s=this._data;const i=this._toBBox;if(y(e,s))for(w.clear();s;){for(let n=0,r=s.children.length;n<r;n++){const r=s.children[n],o=s.leaf?i(r):r;y(e,o)&&(s.leaf?t(r):m(e,o)?a(r,t):w.push(r))}s=w.pop()}}collides(e){let t=this._data;const s=this._toBBox;if(!y(e,t))return!1;for(w.clear();t;){for(let i=0,n=t.children.length;i<n;i++){const n=t.children[i],r=t.leaf?s(n):n;if(y(e,r)){if(t.leaf||m(e,r))return!0;w.push(n)}}t=w.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,s=e.length;t<s;t++)this.insert(e[t]);return this}let t=this._build(e.slice(0,e.length),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new I([]),this}remove(e){if(!e)return this;let t,s=this._data,n=null,r=0,o=!1;const a=this._toBBox(e);for(E.clear(),S.clear();s||E.length>0;){if(s||(s=E.pop(),n=E.data[E.length-1],r=S.pop()??0,o=!0),s.leaf&&(t=(0,i.qh)(s.children,e,s.children.length,s.indexHint),-1!==t))return s.children.splice(t,1),E.push(s),this._condense(E),this;o||s.leaf||!m(s,a)?n?(r++,s=n.children[r],o=!1):s=null:(E.push(s),S.push(r),r=0,n=s,s=s.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,s,i){const n=s-t+1;let r=this._maxEntries;if(n<=r){const i=new I(e.slice(t,s+1));return l(i,this._toBBox),i}i||(i=Math.ceil(Math.log(n)/Math.log(r)),r=Math.ceil(n/r**(i-1)));const o=new F([]);o.height=i;const a=Math.ceil(n/r),u=a*Math.ceil(Math.sqrt(r));v(e,t,s,u,this._compareMinX);for(let n=t;n<=s;n+=u){const t=Math.min(n+u-1,s);v(e,n,t,a,this._compareMinY);for(let s=n;s<=t;s+=a){const n=Math.min(s+a-1,t);o.children.push(this._build(e,s,n,i-1))}}return l(o,this._toBBox),o}_insert(e,t,s){const i=this._toBBox,n=s?e:i(e);E.clear();const r=function(e,t,s,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==s;){let s,i=1/0,n=1/0;for(let r=0,o=t.children.length;r<o;r++){const o=t.children[r],a=p(o),l=f(e,o)-a;l<n?(n=l,i=a<i?a:i,s=o):l===n&&a<i&&(i=a,s=o)}t=s||t.children[0]}return t}(n,this._data,t,E);for(r.children.push(e),h(r,n);t>=0&&E.data[t].children.length>this._maxEntries;)this._split(E,t),t--;!function(e,t,s){for(let i=s;i>=0;i--)h(t.data[i],e)}(n,E,t)}_split(e,t){const s=e.data[t],i=s.children.length,n=this._minEntries;this._chooseSplitAxis(s,n,i);const r=this._chooseSplitIndex(s,n,i);if(!r)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const o=s.children.splice(r,s.children.length-r),a=s.leaf?new I(o):new F(o);a.height=s.height,l(s,this._toBBox),l(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(s,a)}_splitRoot(e,t){this._data=new F([e,t]),this._data.height=e.height+1,l(this._data,this._toBBox)}_chooseSplitIndex(e,t,s){let i,n,r;i=n=1/0;for(let o=t;o<=s-t;o++){const t=u(e,0,o,this._toBBox),a=u(e,o,s,this._toBBox),l=g(t,a),h=p(t)+p(a);l<i?(i=l,r=o,n=h<n?h:n):l===i&&h<n&&(n=h,r=o)}return r}_chooseSplitAxis(e,t,s){const i=e.leaf?this._compareMinX:d,n=e.leaf?this._compareMinY:c;this._allDistMargin(e,t,s,i)<this._allDistMargin(e,t,s,n)&&e.children.sort(i)}_allDistMargin(e,t,s,i){e.children.sort(i);const n=this._toBBox,r=u(e,0,t,n),o=u(e,s-t,s,n);let a=_(r)+_(o);for(let i=t;i<s-t;i++){const t=e.children[i];h(r,e.leaf?n(t):t),a+=_(r)}for(let i=s-t-1;i>=t;i--){const t=e.children[i];h(o,e.leaf?n(t):t),a+=_(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const s=e.data[t];if(0===s.children.length)if(t>0){const n=e.data[t-1],r=n.children;r.splice((0,i.qh)(r,s,r.length,n.indexHint),1)}else this.clear();else l(s,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function a(e,t){let s=e;for(x.clear();s;){if(!0===s.leaf)for(const e of s.children)t(e);else x.pushArray(s.children);s=x.pop()??null}}function l(e,t){u(e,0,e.children.length,t,e)}function u(e,t,s,i,n){n||(n=new I([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let r,o=t;o<s;o++)r=e.children[o],h(n,e.leaf?i(r):r);return n}function h(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function d(e,t){return e.minX-t.minX}function c(e,t){return e.minY-t.minY}function p(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function _(e){return e.maxX-e.minX+(e.maxY-e.minY)}function f(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function g(e,t){const s=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),r=Math.min(e.maxY,t.maxY);return Math.max(0,n-s)*Math.max(0,r-i)}function m(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function y(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function v(e,t,s,i,n){const o=[t,s];for(;o.length;){const t=o.pop(),s=o.pop();if(t-s<=i)continue;const a=s+Math.ceil((t-s)/i/2)*i;(0,r.q)(e,a,s,t,n),o.push(s,a,a,t)}}const w=new n.A,x=new n.A,E=new n.A,S=new n.A({deallocator:void 0});class b{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class T extends b{constructor(){super(...arguments),this.height=1,this.indexHint=new i.vW}}class I extends T{constructor(e){super(),this.children=e,this.leaf=!0}}class F extends T{constructor(e){super(),this.children=e,this.leaf=!1}}},36708:(e,t,s)=>{s.d(t,{C_:()=>c,OH:()=>f,Vh:()=>g,on:()=>d,pc:()=>m,wB:()=>l,z7:()=>u}),s(60999),s(5503);var i=s(37955),n=s(36563),r=s(97768),o=s(74887),a=s(14012);function l(e,t,s={}){return h(e,t,s,p)}function u(e,t,s={}){return h(e,t,s,_)}function h(e,t,s={},i){let n=null;const o=s.once?(e,s)=>{i(e)&&((0,r.xt)(n),t(e,s))}:(e,s)=>{i(e)&&t(e,s)};if(n=(0,a.Cn)(e,o,s.sync,s.equals),s.initial){const t=e();o(t,t)}return n}function d(e,t,s,o={}){let a=null,u=null,h=null;function d(){a&&u&&(u.remove(),o.onListenerRemove?.(a),a=null,u=null)}function c(e){o.once&&o.once&&(0,r.xt)(h),s(e)}const p=l(e,((e,s)=>{d(),(0,i.wb)(e)&&(a=e,u=(0,i.on)(e,t,c),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return h=(0,n.hA)((()=>{p.remove(),d()})),h}function c(e,t){return function(e,t,s){if((0,o.G4)(s))return Promise.reject((0,o.NK)());const i=e();if(t?.(i))return Promise.resolve(i);let a=null;function l(){a=(0,r.xt)(a)}return new Promise(((i,r)=>{a=(0,n.vE)([(0,o.u7)(s,(()=>{l(),r((0,o.NK)())})),h(e,(e=>{l(),i(e)}),{sync:!1,once:!0},t??p)])}))}(e,_,t)}function p(e){return!0}function _(e){return!!e}s(80559);const f={sync:!0},g={initial:!0},m={sync:!0,initial:!0}},79897:(e,t,s)=>{s.d(t,{U:()=>h});var i=s(90237),n=s(69622),r=s(36563),o=s(36708),a=s(11932),l=s(10107),u=s(40608);let h=class extends n.A{constructor(){super(...arguments),this.updating=!1,this._handleId=0,this._scheduleHandleId=0,this._pendingPromises=new Set}destroy(){this.removeAll()}add(e,t,s={}){return this._installWatch(e,t,s,o.wB)}addWhen(e,t,s={}){return this._installWatch(e,t,s,o.z7)}addOnCollectionChange(e,t,{initial:s=!1,final:i=!1}={}){const n=++this._handleId;return this.addHandles([(0,o.on)(e,"after-changes",this._createSyncUpdatingCallback(),o.OH),(0,o.on)(e,"change",t,{onListenerAdd:s?e=>t({added:e.toArray(),removed:[]}):void 0,onListenerRemove:i?e=>t({added:[],removed:e.toArray()}):void 0})],n),(0,r.hA)((()=>this.removeHandles(n)))}addPromise(e){if(null==e)return e;const t=++this._handleId;this.addHandles((0,r.hA)((()=>{this._pendingPromises.delete(e)&&(0!==this._pendingPromises.size||this.hasHandles(d)||this._set("updating",!1))})),t),this._pendingPromises.add(e),this._set("updating",!0);const s=()=>this.removeHandles(t);return e.then(s,s),e}removeAll(){this._pendingPromises.clear(),this.removeAllHandles(),this._set("updating",!1)}_installWatch(e,t,s={},i){const n=++this._handleId;s.sync||this._installSyncUpdatingWatch(e,n);const o=i(e,t,s);return this.addHandles(o,n),(0,r.hA)((()=>this.removeHandles(n)))}_installSyncUpdatingWatch(e,t){const s=this._createSyncUpdatingCallback(),i=(0,o.wB)(e,s,{sync:!0,equals:()=>!1});return this.addHandles(i,t),i}_createSyncUpdatingCallback(){return()=>{this.removeHandles(d),++this._scheduleHandleId;const e=this._scheduleHandleId;this._get("updating")||this._set("updating",!0),this.addHandles((0,a._)((()=>{e===this._scheduleHandleId&&(this._set("updating",this._pendingPromises.size>0),this.removeHandles(d))})),d)}}};(0,i._)([(0,l.MZ)({readOnly:!0})],h.prototype,"updating",void 0),h=(0,i._)([(0,u.$)("esri.core.support.UpdatingHandles")],h);const d=-42},6518:(e,t,s)=>{s.d(t,{F:()=>a});var i=s(44208),n=s(75503),r=s(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.w(9,(0,i.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((s,i)=>{e[t++]=i})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,r.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,s){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,s)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},83221:(e,t,s)=>{s.d(t,{A:()=>_});var i=s(4576),n=s(49186),r=s(65529),o=s(53966),a=s(70328),l=s(19419),u=s(90708),h=s(6518),d=s(51441),c=s(63517);const p=(0,a.vt)();class _{constructor(e){this.geometryInfo=e,this._boundsStore=new h.F,this._featuresById=new Map,this._markedIds=new Set,this.events=new r.A,this.featureAdapter=c.T}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach((t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,s,i,n]=this.fullBounds;return{xmin:t,ymin:s,xmax:i,ymax:n,spatialReference:(0,d.ag)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map((e=>this._upsert(e)));return this._emitChanged(),t.filter(i.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const s of e){const e=this._boundsStore.get(s.objectId);e&&t((0,a.Jt)(p,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let e=!1;this._featuresById.forEach(((t,s)=>{this._markedIds.has(s)||(e=!0,this._remove(t))})),this._markedIds.clear(),e&&this._emitChanged()}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const s=this._featuresById.get(t);let i;if(this._markedIds.add(t),s?(e.displayId=s.displayId,i=this._boundsStore.get(t),this._boundsStore.delete(t)):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);i=(0,u.jQ)(null!=i?i:(0,l.vt)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=i&&this._boundsStore.set(t,i),this._featuresById.set(t,e)}_upsert(e){const t=e?.objectId;if(null==t)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const s=this._featuresById.get(t);if(!s)return this._add(e),e;this._markedIds.add(t);const{geometry:i,attributes:r}=e;for(const e in r)s.attributes[e]=r[e];return i&&(s.geometry=i,this._boundsStore.set(t,(0,u.jQ)((0,l.vt)(),i,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),s}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._markedIds.delete(t),this._boundsStore.delete(t),this._featuresById.delete(t),e}}},20437:(e,t,s)=>{s.d(t,{A:()=>g});var i,n=s(90237),r=s(66552),o=s(25482),a=s(10107),l=s(56507),u=(s(87811),s(44208),s(93223)),h=s(36005),d=s(40608),c=s(72088),p=s(98453);const _=new r.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let f=i=class extends o.oY{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let s=null;try{s=t?JSON.parse(t):null}catch(e){}return s?.value??null}readValueType(e,{description:t}){let s=null;try{s=t?JSON.parse(t):null}catch(e){}return s?_.fromJSON(s.fieldValueType):null}clone(){return new i({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],f.prototype,"alias",void 0),(0,n._)([(0,a.MZ)({type:[String,Number],json:{write:{allowNull:!0}}})],f.prototype,"defaultValue",void 0),(0,n._)([(0,a.MZ)()],f.prototype,"description",void 0),(0,n._)([(0,h.w)("description")],f.prototype,"readDescription",null),(0,n._)([(0,a.MZ)({types:c.gK,json:{read:{reader:c.rS},write:!0}})],f.prototype,"domain",void 0),(0,n._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"editable",void 0),(0,n._)([(0,a.MZ)({type:l.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],f.prototype,"length",void 0),(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],f.prototype,"name",void 0),(0,n._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"nullable",void 0),(0,n._)([(0,u.e)(p.m)],f.prototype,"type",void 0),(0,n._)([(0,a.MZ)()],f.prototype,"valueType",void 0),(0,n._)([(0,h.w)("valueType",["description"])],f.prototype,"readValueType",null),(0,n._)([(0,a.MZ)({type:Boolean,json:{read:!1}})],f.prototype,"visible",void 0),f=i=(0,n._)([(0,d.$)("esri.layers.support.Field")],f);const g=f},91806:(e,t,s)=>{s.d(t,{A:()=>h});var i,n=s(90237),r=s(25482),o=s(10107),a=s(56507),l=(s(87811),s(44208),s(40608));let u=i=class extends r.oY{constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new i({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,n._)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"cols",void 0),(0,n._)([(0,o.MZ)({type:a.jz,json:{write:!0}})],u.prototype,"level",void 0),(0,n._)([(0,o.MZ)({type:String,json:{write:!0}})],u.prototype,"levelValue",void 0),(0,n._)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"origin",void 0),(0,n._)([(0,o.MZ)({type:Number,json:{write:!0}})],u.prototype,"resolution",void 0),(0,n._)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"rows",void 0),(0,n._)([(0,o.MZ)({type:Number,json:{write:!0}})],u.prototype,"scale",void 0),u=i=(0,n._)([(0,l.$)("esri.layers.support.LOD")],u);const h=u},87045:(e,t,s)=>{s.d(t,{A:()=>b});var i,n=s(90237),r=s(66552),o=s(25482),a=s(83047),l=s(10107),u=s(56507),h=(s(87811),s(44208),s(36005)),d=s(40608),c=s(43937),p=s(86738),_=s(16930),f=s(19419),g=s(21325),m=s(28735),y=s(91806),v=s(72802);const w=new r.J({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});let x=i=class extends o.oY{static create(e={}){const{resolutionFactor:t=1,scales:s,size:n=256,spatialReference:r=_.A.WebMercator,numLODs:o=24}=e;if(!(0,g.fn)(r)){const e=[];if(s)for(let t=0;t<s.length;t++){const i=s[t];e.push(new y.A({level:t,scale:i,resolution:i}))}else{let t=5e-4;for(let s=o-1;s>=0;s--)e.unshift(new y.A({level:s,scale:t,resolution:t})),t*=2}return new i({dpi:96,lods:e,origin:new p.A(0,0,r),size:[n,n],spatialReference:r})}const l=(0,g.Vp)(r),u=e.origin?new p.A({x:e.origin.x,y:e.origin.y,spatialReference:r}):new p.A(l?{x:l.origin[0],y:l.origin[1],spatialReference:r}:{x:0,y:0,spatialReference:r}),h=1/(39.37*(0,a.GA)(r)*96),d=[];if(s)for(let e=0;e<s.length;e++){const t=s[e],i=t*h;d.push(new y.A({level:e,scale:t,resolution:i}))}else{let e=(0,g.EA)(r)?512/n*591657527.5917094:256/n*591657527.591555;const s=Math.ceil(o/t);d.push(new y.A({level:0,scale:e,resolution:e*h}));for(let i=1;i<s;i++){const s=e/2**t,n=s*h;d.push(new y.A({level:i,scale:s,resolution:n})),e=s}}return new i({dpi:96,lods:d,origin:u,size:[n,n],spatialReference:r})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.size=null,this.spatialReference=null}get isWrappable(){const{spatialReference:e,origin:t}=this;if(e&&t){const s=(0,g.Vp)(e);return e.isWrappable&&!!s&&Math.abs(s.origin[0]-t.x)<=s.dx}return!1}readOrigin(e,t){return p.A.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,s=0;const i=[],n=this._levelToLOD={};e&&(t=-1/0,s=1/0,e.forEach((e=>{i.push(e.scale),t=e.scale>t?e.scale:t,s=e.scale<s?e.scale:s,n[e.level]=e}))),this._set("scales",i),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){const t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];const s=Math.floor(e),i=s+1;return t[s]/(t[s]/t[i])**(e-s)}scaleToZoom(e){const t=this.scales,s=t.length-1;let i=0;for(;i<s;i++){const s=t[i],n=t[i+1];if(s<=e)return i;if(n===e)return i+1;if(s>e&&n<e)return i+Math.log(s/e)/Math.log(s/n)}return i}snapScale(e,t=.95){const s=this.scaleToZoom(e);return s%Math.floor(s)>=t?this.zoomToScale(Math.ceil(s)):this.zoomToScale(Math.floor(s))}tileAt(e,t,s,i){const n=this.lodAt(e);if(!n)return null;let r,o;if("number"==typeof t)r=t,o=s;else if((0,g.aI)(t.spatialReference,this.spatialReference))r=t.x,o=t.y,i=s;else{const e=(0,m.Cv)(t,this.spatialReference);if(null==e)return null;r=e.x,o=e.y,i=s}const a=n.resolution*this.size[0],l=n.resolution*this.size[1];return i||(i=new v.U(null,0,0,0,(0,f.vt)())),i.level=e,i.row=Math.floor((this.origin.y-o)/l+.001),i.col=Math.floor((r-this.origin.x)/a+.001),this.updateTileInfo(i),i}updateTileInfo(e,t=i.ExtrapolateOptions.NONE){let s=this.lodAt(e.level);if(!s&&t===i.ExtrapolateOptions.POWER_OF_TWO){const t=this.lods[this.lods.length-1];t.level<e.level&&(s=t)}if(!s)return;const n=e.level-s.level,r=s.resolution*this.size[0]/2**n,o=s.resolution*this.size[1]/2**n;e.id=`${e.level}/${e.row}/${e.col}`,e.extent||(e.extent=(0,f.vt)()),e.extent[0]=this.origin.x+e.col*r,e.extent[1]=this.origin.y-(e.row+1)*o,e.extent[2]=e.extent[0]+r,e.extent[3]=e.extent[1]+o}upsampleTile(e){const t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){const s=this.lodAt(t.level);if(null==s)return null;const{resolution:i}=s,n=i*this.size[0],r=i*this.size[1];return e[0]=this.origin.x+t.col*n,e[1]=this.origin.y-(t.row+1)*r,e[2]=e[0]+n,e[3]=e[1]+r,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return i.fromJSON(this.write({}))}getCompatibleForVTL(e){if(this.size[0]!==this.size[1]||256===this.size[0]&&512===e)return null;const t=(512===this.size[0]&&256===e?-1:0)+(this.spatialReference.isGeographic?1:0);if(this.size[0]===e&&0===t)return this;const s=[],n=this.lods.length-t;for(let e=0;e<n;e++){const i=e+t,{scale:n,resolution:r}=i>=0?this.lods[i]:{scale:2*this.lods[0].scale,resolution:2*this.lods[0].resolution};s.push(new y.A({level:e,scale:n,resolution:r}))}return new i({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:s})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let s=0;s<e.length;s++){const i=e[s];this._upsampleLevels[i.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/i.resolution:0},t=i}}};var E,S;(0,n._)([(0,l.MZ)({type:Number,json:{write:!0}})],x.prototype,"compressionQuality",void 0),(0,n._)([(0,l.MZ)({type:Number,json:{write:!0}})],x.prototype,"dpi",void 0),(0,n._)([(0,l.MZ)({type:String,json:{read:w.read,write:w.write,origins:{"web-scene":{read:!1,write:!1}}}})],x.prototype,"format",void 0),(0,n._)([(0,l.MZ)({readOnly:!0})],x.prototype,"isWrappable",null),(0,n._)([(0,l.MZ)({type:p.A,json:{write:!0}})],x.prototype,"origin",void 0),(0,n._)([(0,h.w)("origin")],x.prototype,"readOrigin",null),(0,n._)([(0,l.MZ)({type:[y.A],value:null,json:{write:!0}})],x.prototype,"lods",null),(0,n._)([(0,l.MZ)({readOnly:!0})],x.prototype,"scales",void 0),(0,n._)([(0,l.MZ)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],x.prototype,"size",void 0),(0,n._)([(0,h.w)("size",["rows","cols"])],x.prototype,"readSize",null),(0,n._)([(0,c.K)("size",{cols:{type:u.jz},rows:{type:u.jz}})],x.prototype,"writeSize",null),(0,n._)([(0,l.MZ)({type:_.A,json:{write:!0}})],x.prototype,"spatialReference",void 0),x=i=(0,n._)([(0,d.$)("esri.layers.support.TileInfo")],x),E=x||(x={}),(S=E.ExtrapolateOptions||(E.ExtrapolateOptions={}))[S.NONE=0]="NONE",S[S.POWER_OF_TWO=1]="POWER_OF_TWO";const b=x},72802:(e,t,s)=>{s.d(t,{U:()=>i});class i{constructor(e,t,s,i,n=void 0){this.id=e,this.level=t,this.row=s,this.col=i,this.extent=n}}},60694:(e,t,s)=>{s.d(t,{Fi:()=>h,HZ:()=>m,Jf:()=>g,LS:()=>y,Wo:()=>f,bd:()=>v,cr:()=>p,iz:()=>c,qg:()=>d,yG:()=>_});var i=s(84952),n=s(97159);const r={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer","3dtilesserver":"3DTilesServer"},o=Object.values(r),a=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),l=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^\\/\\n]+)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),u=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function h(e){return!!a.test(e)}function d(e){if(null==e)return null;const t=(0,i.An)(e),s=t?.path.match(a)||t?.path.match(l);if(!s)return null;const[,n,o,u,h]=s,d=o.indexOf("/");return{title:p(-1!==d?o.slice(d+1):o),serverType:r[u.toLowerCase()],sublayer:null!=h&&""!==h?parseInt(h,10):null,url:{path:n}}}function c(e){const t=(0,i.An)(e).path.match(u);return t?{serviceUrl:t[1],sublayerId:Number(t[2])}:null}function p(e){return(e=e.replaceAll(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function _(e,t){const s=[];if(e){const t=d(e);null!=t&&t.title&&s.push(t.title)}if(t){const e=p(t);s.push(e)}if(2===s.length){if(s[0].toLowerCase().includes(s[1].toLowerCase()))return s[0];if(s[1].toLowerCase().includes(s[0].toLowerCase()))return s[1]}return s.join(" - ")}function f(e){if(!e)return!1;const t=(e=e.toLowerCase()).includes(".arcgis.com/"),s=e.includes("//services")||e.includes("//tiles")||e.includes("//features");return t&&s}function g(e,t){return e?(0,i.UC)((0,i.zi)(e,t)):e}function m(e){let{url:t}=e;if(!t)return{url:t};t=(0,i.zi)(t,e.logger);const s=(0,i.An)(t),n=d(s.path);let r;if(null!=n)null!=n.sublayer&&null==e.layer.layerId&&(r=n.sublayer),t=n.url.path;else if(e.nonStandardUrlAllowed){const e=c(s.path);null!=e&&(t=e.serviceUrl,r=e.sublayerId)}return{url:(0,i.UC)(t),layerId:r}}function y(e,t,s,r,o){(0,n.w)(t,r,"url",o),r.url&&null!=e.layerId&&(r.url=(0,i.fj)(r.url,s,e.layerId.toString()))}function v(e){if(!e)return!1;const t=e.toLowerCase(),s=t.includes("/services/"),i=t.includes("/mapserver/wmsserver"),n=t.includes("/imageserver/wmsserver"),r=t.includes("/wmsserver");return s&&(i||n||r)}},72088:(e,t,s)=>{s.d(t,{rS:()=>b,gK:()=>S}),s(44208);var i,n=s(90237),r=s(4718),o=s(10107),a=(s(53966),s(93223)),l=s(40608),u=s(25482);s(87811);let h=i=class extends u.oY{constructor(e){super(e),this.name=null,this.code=null}clone(){return new i({name:this.name,code:this.code})}};(0,n._)([(0,o.MZ)({type:String,json:{write:!0}})],h.prototype,"name",void 0),(0,n._)([(0,o.MZ)({type:[String,Number],json:{write:!0}})],h.prototype,"code",void 0),h=i=(0,n._)([(0,l.$)("esri.layers.support.CodedValue")],h);const d=new(s(66552).J)({inherited:"inherited",codedValue:"coded-value",range:"range"});let c=class extends u.oY{constructor(e){super(e),this.name=null,this.type=null}};(0,n._)([(0,o.MZ)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,n._)([(0,a.e)(d)],c.prototype,"type",void 0),c=(0,n._)([(0,l.$)("esri.layers.support.Domain")],c);const p=c;var _;let f=_=class extends p{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const s=String(e);this.codedValues.some((e=>(String(e.code)===s&&(t=e.name),!!t)))}return t}clone(){return new _({codedValues:(0,r.o8)(this.codedValues),name:this.name})}};(0,n._)([(0,o.MZ)({type:[h],json:{write:!0}})],f.prototype,"codedValues",void 0),(0,n._)([(0,a.e)({codedValue:"coded-value"})],f.prototype,"type",void 0),f=_=(0,n._)([(0,l.$)("esri.layers.support.CodedValueDomain")],f);const g=f;var m;s(49186);let y=m=class extends p{constructor(e){super(e),this.type="inherited"}clone(){return new m}};(0,n._)([(0,a.e)({inherited:"inherited"})],y.prototype,"type",void 0),y=m=(0,n._)([(0,l.$)("esri.layers.support.InheritedDomain")],y);const v=y;var w;let x=w=class extends p{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new w({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,n._)([(0,o.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,s){t[s]=[this.minValue||0,e]}}}})],x.prototype,"maxValue",void 0),(0,n._)([(0,o.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,s){t[s]=[e,this.maxValue||0]}}}})],x.prototype,"minValue",void 0),(0,n._)([(0,a.e)({range:"range"})],x.prototype,"type",void 0),x=w=(0,n._)([(0,l.$)("esri.layers.support.RangeDomain")],x);const E=x,S={key:"type",base:p,typeMap:{range:x,"coded-value":g,inherited:v}};function b(e){if(!e?.type)return null;switch(e.type){case"range":return E.fromJSON(e);case"codedValue":return g.fromJSON(e);case"inherited":return v.fromJSON(e)}return null}},31756:(e,t,s)=>{s.d(t,{j:()=>r});var i=s(83047),n=s(79258);const r={unknown:1,inches:(0,i.oU)(1,"meters","inches"),feet:(0,i.oU)(1,"meters","feet"),"us-feet":(0,i.oU)(1,"meters","us-feet"),yards:(0,i.oU)(1,"meters","yards"),miles:(0,i.oU)(1,"meters","miles"),"nautical-miles":(0,i.oU)(1,"meters","nautical-miles"),millimeters:(0,i.oU)(1,"meters","millimeters"),centimeters:(0,i.oU)(1,"meters","centimeters"),decimeters:(0,i.oU)(1,"meters","decimeters"),meters:(0,i.oU)(1,"meters","meters"),kilometers:(0,i.oU)(1,"meters","kilometers"),"decimal-degrees":1/(0,i.vl)(1,"meters",n.$O.radius)}},58501:(e,t,s)=>{s.d(t,{q:()=>n});var i=s(62815);function n(e,t,s){if(!s?.features||!s.hasZ)return;const n=(0,i.N)(s.geometryType,t,e.outSpatialReference);if(null!=n)for(const e of s.features)n(e.geometry)}},88625:(e,t,s)=>{s.d(t,{A:()=>w});var i,n=s(90237),r=s(66552),o=s(25482),a=s(97768),l=s(10107),u=(s(44208),s(53966),s(87811),s(36005)),h=s(40608),d=s(43937),c=s(30524);let p=i=class extends o.oY{constructor(e){super(e)}async collectRequiredFields(e,t){return(0,c.Dx)(e,t,this.expression)}clone(){return new i({expression:this.expression,title:this.title})}equals(e){return this.expression===e.expression&&this.title===e.title}};(0,n._)([(0,l.MZ)({type:String,json:{write:!0}})],p.prototype,"expression",void 0),(0,n._)([(0,l.MZ)({type:String,json:{write:!0}})],p.prototype,"title",void 0),p=i=(0,n._)([(0,h.$)("esri.symbols.support.FeatureExpressionInfo")],p);const _=p;var f,g=s(16271);const m=(0,r.O)()({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),y=new r.J({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"});let v=f=class extends o.oY{constructor(e){super(e),this.offset=null}readFeatureExpressionInfo(e,t){return null!=e?e:t.featureExpression&&0===t.featureExpression.value?{expression:"0"}:void 0}writeFeatureExpressionInfo(e,t,s,i){t[s]=e.write({},i),"0"===e.expression&&(t.featureExpression={value:0})}get mode(){const{offset:e,featureExpressionInfo:t}=this;return this._isOverridden("mode")?this._get("mode"):null!=e||t?"relative-to-ground":"on-the-ground"}set mode(e){this._override("mode",e)}set unit(e){this._set("unit",e)}write(e,t){return this.offset||this.mode||this.featureExpressionInfo||this.unit?super.write(e,t):null}clone(){return new f({mode:this.mode,offset:this.offset,featureExpressionInfo:this.featureExpressionInfo?this.featureExpressionInfo.clone():void 0,unit:this.unit})}equals(e){return this.mode===e.mode&&this.offset===e.offset&&this.unit===e.unit&&(0,a.CM)(this.featureExpressionInfo,e.featureExpressionInfo)}};(0,n._)([(0,l.MZ)({type:_,json:{write:!0}})],v.prototype,"featureExpressionInfo",void 0),(0,n._)([(0,u.w)("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],v.prototype,"readFeatureExpressionInfo",null),(0,n._)([(0,d.K)("featureExpressionInfo",{featureExpressionInfo:{type:_},"featureExpression.value":{type:[0]}})],v.prototype,"writeFeatureExpressionInfo",null),(0,n._)([(0,l.MZ)({type:m.apiValues,nonNullable:!0,json:{type:m.jsonValues,read:m.read,write:{writer:m.write,isRequired:!0}}})],v.prototype,"mode",null),(0,n._)([(0,l.MZ)({type:Number,json:{write:!0}})],v.prototype,"offset",void 0),(0,n._)([(0,l.MZ)({type:g.KQ,json:{type:String,read:y.read,write:y.write}})],v.prototype,"unit",null),v=f=(0,n._)([(0,h.$)("esri.symbols.support.ElevationInfo")],v);const w=v},16271:(e,t,s)=>{s.d(t,{Ao:()=>n,KQ:()=>r});var i=s(31756);function n(e){return 1/(i.j[e]||1)}const r=function(){const e=Object.keys(i.j);return e.sort(),e}()},11780:(e,t,s)=>{s.r(t),s.d(t,{default:()=>xe});var i=s(90237),n=(s(59456),s(65529)),r=s(74887),o=s(36708),a=s(10107),l=(s(44208),s(53966)),u=(s(87811),s(40608)),h=s(79897),d=s(16930),c=s(83221),p=s(36791),_=s(87045),f=s(61956),g=s(88625),m=s(55359),y=s(91869),v=s(83047),w=s(16271);function x(e=!1,t){if(e){const{elevationInfo:e,alignPointsInFeatures:s}=t;return new S(e,s)}return new E}class E{async alignCandidates(e,t,s){return e}notifyElevationSourceChange(){}}class S{constructor(e,t){this._elevationInfo=e,this._alignPointsInFeatures=t,this._alignmentsCache=new m.q(1024),this._cacheVersion=0}async alignCandidates(e,t,s){const i=this._elevationInfo;return null==i||"absolute-height"!==i.mode||i.featureExpressionInfo?this._alignComputedElevationCandidates(e,t,s):(function(e,t,s){const{offset:i,unit:n}=s;if(null==i)return;const r=(0,v.G9)(t),o=i*((0,w.Ao)(n??"meters")/r);for(const t of e)switch(t.type){case"edge":t.start.z+=o,t.end.z+=o;continue;case"vertex":t.target.z+=o;continue}}(e,t,i),e)}notifyElevationSourceChange(){this._alignmentsCache.clear(),this._cacheVersion++}async _alignComputedElevationCandidates(e,t,s){const i=new Map;for(const t of e)(0,y.tE)(i,t.objectId,I).push(t);const[n,o,a]=this._prepareQuery(i,t),l=await this._alignPointsInFeatures(n,s);if((0,r.Te)(s),a!==this._cacheVersion)return this._alignComputedElevationCandidates(e,t,s);this._applyCacheAndResponse(n,l,o);const{drapedObjectIds:u,failedObjectIds:h}=l,d=[];for(const t of e){const{objectId:e}=t;u.has(e)&&"edge"===t.type&&(t.draped=!0),h.has(e)||d.push(t)}return d}_prepareQuery(e,t){const s=[],i=[];for(const[t,n]of e){const e=[];for(const s of n)this._addToQueriesOrCachedResult(t,s.target,e,i),"edge"===s.type&&(this._addToQueriesOrCachedResult(t,s.start,e,i),this._addToQueriesOrCachedResult(t,s.end,e,i));0!==e.length&&s.push({objectId:t,points:e})}return[{spatialReference:t.toJSON(),pointsInFeatures:s},i,this._cacheVersion]}_addToQueriesOrCachedResult(e,t,s,i){const n=T(e,t),r=this._alignmentsCache.get(n);null==r?s.push(t):i.push(new b(t,r))}_applyCacheAndResponse(e,{elevations:t,drapedObjectIds:s,failedObjectIds:i},n){for(const e of n)e.apply();let r=0;const o=this._alignmentsCache;for(const{objectId:n,points:a}of e.pointsInFeatures){if(i.has(n)){r+=a.length;continue}const e=!s.has(n);for(const s of a){const i=T(n,s),a=t[r++];s.z=a,e&&o.put(i,a,1)}}}}class b{constructor(e,t){this.point=e,this.z=t}apply(){this.point.z=this.z}}function T(e,{x:t,y:s,z:i,spatialReference:n}){return`${e}-${t}-${s}-${i??0}}-wkid:${n?.wkid}`}function I(){return[]}class F{filter(e,t){return t}notifyElevationSourceChange(){}}class C{filter(e,t){const{point:s,distance:i}=e,{z:n}=s;if(null==n)return t;if(0===t.length)return t;const r=function(e){return"number"==typeof e?{x:e,y:e,z:e}:e}(i),o=this._updateCandidatesTo3D(t,s,r).filter(M);return o.sort(R),o}_updateCandidatesTo3D(e,t,s){for(const i of e)switch(i.type){case"edge":z(i,t,s);continue;case"vertex":O(i,t,s);continue}return e}}function M(e){return e.distance<=1}function A(e=!1){return e?new C:new F}function z(e,t,{x:s,y:i,z:n}){const{start:r,end:o,target:a}=e;e.draped||function(e,t,s,i){const n=i.x-s.x,r=i.y-s.y,o=i.z-s.z,a=n*n+r*r+o*o,l=(t.x-s.x)*n+(t.y-s.y)*r+o*(t.z-s.z),u=Math.min(1,Math.max(0,l/a)),h=s.x+n*u,d=s.y+r*u,c=s.z+o*u;e.x=h,e.y=d,e.z=c}(a,t,r,o);const l=(t.x-a.x)/s,u=(t.y-a.y)/i,h=(t.z-a.z)/n;e.distance=Math.sqrt(l*l+u*u+h*h)}function O(e,t,{x:s,y:i,z:n}){const{target:r}=e,o=(t.x-r.x)/s,a=(t.y-r.y)/i,l=(t.z-r.z)/n,u=Math.sqrt(o*o+a*a+l*l);e.distance=u}function R(e,t){return e.distance-t.distance}var B=s(4718),j=s(799);function H(e=!1,t){return e?new P(t):new N}class N{async fetch(){return[]}notifySymbologyChange(){}}class P{constructor(e){this._getSymbologyCandidates=e,this._candidatesCache=new m.q(1024),this._cacheVersion=0}async fetch(e,t){if(0===e.length)return[];const s=[],i=[],n=this._candidatesCache;for(const t of e){const e=Z(t),r=n.get(e);if(r)for(const e of r)i.push((0,B.o8)(e));else s.push(t),n.put(e,[],1)}if(0===s.length)return i;const o=this._cacheVersion,{candidates:a,sourceCandidateIndices:l}=await this._getSymbologyCandidates(s,t);if((0,r.Te)(t),o!==this._cacheVersion)return this.fetch(e,t);const u=[],{length:h}=a;for(let e=0;e<h;++e){const t=a[e],i=Z(s[l[e]]),r=n.get(i);r.push(t),n.put(i,r,r.length),u.push((0,B.o8)(t))}return i.concat(u)}notifySymbologyChange(){this._candidatesCache.clear(),this._cacheVersion++}}function Z(e){switch(e.type){case"vertex":{const{objectId:t,target:s}=e,i=`${t}-vertex-${s.x}-${s.y}-${s.z??0}`;return(0,j.Wm)(i).toString()}case"edge":{const{objectId:t,start:s,end:i}=e,n=`${t}-edge-${s.x}-${s.y}-${s.z??0}-to-${i.x}-${i.y}-${i.z??0}`;return(0,j.Wm)(n).toString()}default:return""}}var D=s(69622),U=s(4576);let L=class extends D.A{constructor(){super(...arguments),this.updating=!1,this._pending=[]}push(e,t){this._pending.push({promise:e,callback:t}),1===this._pending.length&&this._process()}_process(){if(!this._pending.length)return void(this.updating=!1);this.updating=!0;const e=this._pending[0];e.promise.then((t=>e.callback(t))).catch((()=>{})).then((()=>{this._pending.shift(),this._process()}))}};(0,i._)([(0,a.MZ)()],L.prototype,"updating",void 0),L=(0,i._)([(0,u.$)("esri.core.AsyncSequence")],L);var Y,V=s(60999),k=s(36563),q=s(3483),$=s(5443),X=s(19419),W=s(90708),G=s(60694),J=s(69418),Q=s(80893);class K{constructor(e,t){this.data=e,this.resolution=t,this.state={type:Y.CREATED},this.alive=!0}process(e){switch(this.state.type){case Y.CREATED:return this.state=this._gotoFetchCount(this.state,e),this.state.task.promise.then(e.resume,e.resume);case Y.FETCH_COUNT:break;case Y.FETCHED_COUNT:return this.state=this._gotoFetchFeatures(this.state,e),this.state.task.promise.then(e.resume,e.resume);case Y.FETCH_FEATURES:break;case Y.FETCHED_FEATURES:this.state=this._goToDone(this.state,e);case Y.DONE:}return null}get debugInfo(){return{data:this.data,featureCount:this._featureCount,state:this._stateToString}}get _featureCount(){switch(this.state.type){case Y.CREATED:case Y.FETCH_COUNT:return 0;case Y.FETCHED_COUNT:return this.state.featureCount;case Y.FETCH_FEATURES:return this.state.previous.featureCount;case Y.FETCHED_FEATURES:return this.state.features.length;case Y.DONE:return this.state.previous.features.length}}get _stateToString(){switch(this.state.type){case Y.CREATED:return"created";case Y.FETCH_COUNT:return"fetch-count";case Y.FETCHED_COUNT:return"fetched-count";case Y.FETCH_FEATURES:return"fetch-features";case Y.FETCHED_FEATURES:return"fetched-features";case Y.DONE:return"done"}}_gotoFetchCount(e,t){return{type:Y.FETCH_COUNT,previous:e,task:(0,V.UT)((async e=>{const s=await(0,V.DZ)(t.fetchCount(this,e));this.state.type===Y.FETCH_COUNT&&(this.state=function(e,t){return{type:Y.FETCHED_COUNT,featureCount:t,previous:e}}(this.state,s.ok?s.value:1/0))}))}}_gotoFetchFeatures(e,t){return{type:Y.FETCH_FEATURES,previous:e,task:(0,V.UT)((async s=>{const i=await(0,V.DZ)(t.fetchFeatures(this,e.featureCount,s));this.state.type===Y.FETCH_FEATURES&&(this.state=function(e,t){return{type:Y.FETCHED_FEATURES,previous:e,features:t}}(this.state,i.ok?i.value:[]))}))}}_goToDone(e,t){return t.finish(this,e.features),{type:Y.DONE,previous:e}}reset(){const e=this.state;switch(this.state={type:Y.CREATED},e.type){case Y.CREATED:case Y.FETCHED_COUNT:case Y.FETCHED_FEATURES:case Y.DONE:break;case Y.FETCH_COUNT:case Y.FETCH_FEATURES:e.task.abort()}}intersects(e){return null==e||!this.data.extent||((0,X.VY)(e,ee),(0,X.HY)(this.data.extent,ee))}}!function(e){e[e.CREATED=0]="CREATED",e[e.FETCH_COUNT=1]="FETCH_COUNT",e[e.FETCHED_COUNT=2]="FETCHED_COUNT",e[e.FETCH_FEATURES=3]="FETCH_FEATURES",e[e.FETCHED_FEATURES=4]="FETCHED_FEATURES",e[e.DONE=5]="DONE"}(Y||(Y={}));const ee=(0,X.vt)();let te=class extends D.A{get _minimumVerticesPerFeature(){switch(this.store?.featureStore.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":return 1;case"esriGeometryPolygon":return 4;case"esriGeometryPolyline":return 2}}get _mandatoryOutFields(){const e=new Set;return this.objectIdField&&e.add(this.objectIdField),this.globalIdField&&e.add(this.globalIdField),e}set outFields(e){const t=this._get("outFields"),s=(0,q.KC)(e,this._mandatoryOutFields);(0,q.aI)(s,t)||(this._set("outFields",s),(0,q.Yy)(s,t)||this.refresh())}get outFields(){return this._get("outFields")??this._mandatoryOutFields}set filter(e){const t=this._get("filter"),s=this._filterProperties(e);JSON.stringify(t)!==JSON.stringify(s)&&this._set("filter",s)}set customParameters(e){const t=this._get("customParameters");JSON.stringify(t)!==JSON.stringify(e)&&this._set("customParameters",e)}get _configuration(){return{filter:this.filter,customParameters:this.customParameters,tileInfo:this.tileInfo,tileSize:this.tileSize}}set tileInfo(e){const t=this._get("tileInfo");t!==e&&(null!=e&&null!=t&&JSON.stringify(e)===JSON.stringify(t)||(this._set("tileInfo",e),this.store.tileInfo=e))}set tileSize(e){this._get("tileSize")!==e&&this._set("tileSize",e)}get updating(){return this.updatingExcludingEdits||this._pendingEdits.updating}get updatingExcludingEdits(){return this._updatingHandles.updating}get hasZ(){return this.store.featureStore.hasZ}constructor(e){super(e),this.suspended=!0,this.tilesOfInterest=[],this.availability=0,this._pendingTiles=new Map,this._updatingHandles=new h.U,this._pendingEdits=new L,this._pendingEditsAbortController=new AbortController}initialize(){this._initializeFetchExtent(),this._updatingHandles.add((()=>this._configuration),(()=>this.refresh())),this._updatingHandles.add((()=>this.tilesOfInterest),((e,t)=>{(0,U.aI)(e,t,(({id:e},{id:t})=>e===t))||this._process()}),o.OH),this.addHandles((0,o.z7)((()=>!this.suspended),(()=>this._process())))}destroy(){this._pendingTiles.forEach((e=>this._deletePendingTile(e))),this._pendingTiles.clear(),this.store.destroy(),this.tilesOfInterest.length=0,this._pendingEditsAbortController.abort(),this._pendingEditsAbortController=null,this._updatingHandles.destroy()}refresh(){this.store.refresh(),this._pendingTiles.forEach((e=>this._deletePendingTile(e))),this._process()}applyEdits(e){this._pendingEdits.push(e,(async e=>{if(0===e.addedFeatures.length&&0===e.updatedFeatures.length&&0===e.deletedFeatures.length)return;for(const[,e]of this._pendingTiles)e.reset();const t={...e,deletedFeatures:e.deletedFeatures.map((({objectId:e,globalId:t})=>e&&-1!==e?e:this._lookupObjectIdByGlobalId(t)))};await this._updatingHandles.addPromise(this.store.processEdits(t,((e,t)=>this._queryFeaturesById(e,t)),this._pendingEditsAbortController.signal)),this._processPendingTiles()}))}_initializeFetchExtent(){if(!this.capabilities.query.supportsExtent||!(0,G.Wo)(this.url))return;const e=(0,V.UT)((async e=>{try{const t=await(0,Q.Jf)(this.url,new f.A({where:"1=1",outSpatialReference:this.spatialReference,cacheHint:this.capabilities.query.supportsCacheHint??void 0}),{query:this._configuration.customParameters,signal:e});this.store.extent=$.A.fromJSON(t.data?.extent)}catch(e){(0,r.QP)(e),l.A.getLogger(this).warn("Failed to fetch data extent",e)}}));this._updatingHandles.addPromise(e.promise.then((()=>this._process()))),this.addHandles((0,k.hA)((()=>e.abort())))}get debugInfo(){return{numberOfFeatures:this.store.featureStore.numFeatures,tilesOfInterest:this.tilesOfInterest,pendingTiles:Array.from(this._pendingTiles.values()).map((e=>e.debugInfo)),storedTiles:this.store.debugInfo}}_process(){this._markTilesNotAlive(),this._createPendingTiles(),this._deletePendingTiles(),this._processPendingTiles()}_markTilesNotAlive(){for(const[,e]of this._pendingTiles)e.alive=!1}_createPendingTiles(){if(this.suspended)return;const e=this._collectMissingTilesInfo();if(this._setAvailability(null==e?1:e.coveredArea/e.fullArea),null!=e)for(const{data:t,resolution:s}of e.missingTiles){const e=this._pendingTiles.get(t.id);e?(e.resolution=s,e.alive=!0):this._createPendingTile(t,s)}}_collectMissingTilesInfo(){let e=null;for(let t=this.tilesOfInterest.length-1;t>=0;t--){const s=this.tilesOfInterest[t],i=this.store.process(s,((e,t)=>this._verifyTileComplexity(e,t)),this.outFields);null==e?e=i:e.prepend(i)}return e}_deletePendingTiles(){for(const[,e]of this._pendingTiles)e.alive||this._deletePendingTile(e)}_processPendingTiles(){const e={fetchCount:(e,t)=>this._fetchCount(e,t),fetchFeatures:(e,t,s)=>this._fetchFeatures(e,t,s),finish:(e,t)=>this._finishPendingTile(e,t),resume:()=>this._processPendingTiles()};if(this._ensureFetchAllCounts(e))for(const[,t]of this._pendingTiles)this._verifyTileComplexity(this.store.getFeatureCount(t.data),t.resolution)&&this._updatingHandles.addPromise(t.process(e))}_verifyTileComplexity(e,t){return this._verifyVertexComplexity(e)&&this._verifyFeatureDensity(e,t)}_verifyVertexComplexity(e){return e*this._minimumVerticesPerFeature<ne}_verifyFeatureDensity(e,t){if(null==this.tileInfo)return!1;const s=this.tileSize*t;return e*(re/(s*s))<oe}_ensureFetchAllCounts(e){let t=!0;for(const[,s]of this._pendingTiles)s.state.type<Y.FETCHED_COUNT&&this._updatingHandles.addPromise(s.process(e)),s.state.type<=Y.FETCH_COUNT&&(t=!1);return t}_finishPendingTile(e,t){this.store.add(e.data,t),this._deletePendingTile(e),this._updateAvailability()}_updateAvailability(){const e=this._collectMissingTilesInfo();this._setAvailability(null==e?1:e.coveredArea/e.fullArea)}_setAvailability(e){this._set("availability",e)}_createPendingTile(e,t){const s=new K(e,t);return this._pendingTiles.set(e.id,s),s}_deletePendingTile(e){e.reset(),this._pendingTiles.delete(e.data.id)}async _fetchCount(e,t){return this.store.fetchCount(e.data,this.url,this._createCountQuery(e),{query:this.customParameters,timeout:ie,signal:t})}async _fetchFeatures(e,t,s){let i=0;const n=[];let r=0,o=t;for(;;){const a=this._createFeaturesQuery(e),l=this._setPagingParameters(a,i,o),{features:u,exceededTransferLimit:h}=await this._queryFeatures(a,s);l&&(i+=a.num),r+=u.length;for(const e of u)n.push(e);if(o=t-r,!l||!h||o<=0)return n}}_filterProperties(e){return null==e?{where:"1=1",gdbVersion:void 0,timeExtent:void 0}:{where:e.where||"1=1",timeExtent:e.timeExtent,gdbVersion:e.gdbVersion}}_lookupObjectIdByGlobalId(e){const t=this.globalIdField,s=this.objectIdField;if(null==t)throw new Error("Expected globalIdField to be defined");let i=null;if(this.store.featureStore.forEach((n=>{e===n.attributes[t]&&(i=n.objectId??n.attributes[s])})),null==i)throw new Error(`Expected to find a feature with globalId ${e}`);return i}_queryFeaturesById(e,t){const s=this._createFeaturesQuery();return s.objectIds=e,this._queryFeatures(s,t)}_queryFeatures(e,t){return this.capabilities.query.supportsFormatPBF?this._queryFeaturesPBF(e,t):this._queryFeaturesJSON(e,t)}async _queryFeaturesPBF(e,t){const{sourceSpatialReference:s}=this,{data:i}=await(0,Q.IJ)(this.url,e,new J.S({sourceSpatialReference:s}),{query:this._configuration.customParameters,timeout:ie,signal:t});return(0,W.eY)(i)}async _queryFeaturesJSON(e,t){const{sourceSpatialReference:s}=this,{data:i}=await(0,Q.eW)(this.url,e,s,{query:this._configuration.customParameters,timeout:ie,signal:t});return(0,W.q3)(i,this.objectIdField)}_createCountQuery(e){const t=this._createBaseQuery(e);return this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0),t}_createFeaturesQuery(e=null){const t=this._createBaseQuery(e),s=null!=e?.data?this.store.getAttributesForTile(e?.data?.id):null,i=(0,q.KC)((0,q.iv)(this.outFields,s??new Set),this._mandatoryOutFields);return t.outFields=Array.from(i),t.returnGeometry=!0,null!=e&&(this.capabilities.query.supportsResultType?t.resultType="tile":this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0)),t}_createBaseQuery(e){const t=new f.A({returnZ:this.hasZ,returnM:!1,geometry:null!=this.tileInfo&&null!=e?(0,X.w1)(e.data.extent,this.tileInfo.spatialReference):void 0}),s=this._configuration.filter;return null!=s&&(t.where=s.where,t.gdbVersion=s.gdbVersion,t.timeExtent=s.timeExtent),t.outSpatialReference=this.spatialReference,t}_setPagingParameters(e,t,s){if(!this.capabilities.query.supportsPagination)return!1;const{supportsMaxRecordCountFactor:i,supportsCacheHint:n,tileMaxRecordCount:r,maxRecordCount:o,supportsResultType:a}=this.capabilities.query,l=i?f.A.MAX_MAX_RECORD_COUNT_FACTOR:1,u=l*((a||n)&&r?r:o||se);return e.start=t,i?(e.maxRecordCountFactor=Math.min(l,Math.ceil(s/u)),e.num=Math.min(s,e.maxRecordCountFactor*u)):e.num=Math.min(s,u),!0}};(0,i._)([(0,a.MZ)({constructOnly:!0})],te.prototype,"url",void 0),(0,i._)([(0,a.MZ)({constructOnly:!0})],te.prototype,"objectIdField",void 0),(0,i._)([(0,a.MZ)({constructOnly:!0})],te.prototype,"globalIdField",void 0),(0,i._)([(0,a.MZ)({constructOnly:!0})],te.prototype,"capabilities",void 0),(0,i._)([(0,a.MZ)({constructOnly:!0})],te.prototype,"sourceSpatialReference",void 0),(0,i._)([(0,a.MZ)({constructOnly:!0})],te.prototype,"spatialReference",void 0),(0,i._)([(0,a.MZ)({constructOnly:!0})],te.prototype,"store",void 0),(0,i._)([(0,a.MZ)({readOnly:!0})],te.prototype,"_minimumVerticesPerFeature",null),(0,i._)([(0,a.MZ)()],te.prototype,"_mandatoryOutFields",null),(0,i._)([(0,a.MZ)()],te.prototype,"outFields",null),(0,i._)([(0,a.MZ)()],te.prototype,"suspended",void 0),(0,i._)([(0,a.MZ)()],te.prototype,"filter",null),(0,i._)([(0,a.MZ)()],te.prototype,"customParameters",null),(0,i._)([(0,a.MZ)({readOnly:!0})],te.prototype,"_configuration",null),(0,i._)([(0,a.MZ)()],te.prototype,"tileInfo",null),(0,i._)([(0,a.MZ)()],te.prototype,"tileSize",null),(0,i._)([(0,a.MZ)()],te.prototype,"tilesOfInterest",void 0),(0,i._)([(0,a.MZ)({readOnly:!0})],te.prototype,"updating",null),(0,i._)([(0,a.MZ)({readOnly:!0})],te.prototype,"updatingExcludingEdits",null),(0,i._)([(0,a.MZ)({readOnly:!0})],te.prototype,"availability",void 0),(0,i._)([(0,a.MZ)()],te.prototype,"hasZ",null),te=(0,i._)([(0,u.$)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiledFetcher")],te);const se=2e3,ie=6e5,ne=1e6,re=25,oe=1;var ae=s(86805),le=s(71903),ue=s(6518),he=s(72802);class de{constructor(){this._store=new Map,this._byteSize=0}set(e,t){this.delete(e),this._store.set(e,t),this._byteSize+=t.byteSize}delete(e){const t=this._store.get(e);return!!this._store.delete(e)&&(null!=t&&(this._byteSize-=t.byteSize),!0)}get(e){return this._used(e),this._store.get(e)}has(e){return this._used(e),this._store.has(e)}clear(){this._store.clear()}applyByteSizeLimit(e,t){for(const[s,i]of this._store){if(this._byteSize<=e)break;this.delete(s),t(i)}}values(){return this._store.values()}[Symbol.iterator](){return this._store[Symbol.iterator]()}_used(e){const t=this._store.get(e);t&&(this._store.delete(e),this._store.set(e,t))}}let ce=class extends D.A{constructor(e){super(e),this.tileInfo=null,this.extent=null,this.maximumByteSize=10*le.u.MEGABYTES,this._tileBounds=new ue.F,this._tiles=new de,this._refCounts=new Map,this._tileFeatureCounts=new Map,this._tmpBoundingRect=(0,X.vt)()}add(e,t){for(const e of t)this._referenceFeature(e.objectId);const s=this.featureStore.upsertMany(t),i=s.map((e=>new Set(Object.keys(e.attributes)))).reduce(((e,t)=>(0,q.E$)(e,t)),new Set(Object.keys(s[0]?.attributes??[])));this._addTileStorage(e,new Set(s.map((e=>e.objectId))),function(e){return e.reduce(((e,t)=>e+function(e){return 32+function(e){if(null==e)return 0;const t=(0,ae.zd)(e.lengths,4);return 32+(0,ae.zd)(e.coords,8)+t}(e.geometry)+(0,ae.eY)(e.attributes)}(t)),0)}(s),i),this._tiles.applyByteSizeLimit(this.maximumByteSize,(e=>this._removeTileStorage(e)))}getAttributesForTile(e){return e?this._tiles.get(e)?.attributeKeys:null}destroy(){this.clear(),this._tileFeatureCounts.clear()}clear(){this.featureStore.clear(),this._tileBounds.clear(),this._tiles.clear(),this._refCounts.clear()}refresh(){this.clear(),this._tileFeatureCounts.clear()}processEdits(e,t,s){return this._processEditsDelete(e.deletedFeatures.concat(e.updatedFeatures)),this._processEditsRefetch(e.addedFeatures.concat(e.updatedFeatures),t,s)}_addTileStorage(e,t,s,i){const n=e.id;this._tiles.set(n,new pe(e,t,s,i)),this._tileBounds.set(n,e.extent),this._tileFeatureCounts.set(n,t.size)}_remove({id:e}){const t=this._tiles.get(e);t&&this._removeTileStorage(t)}_removeTileStorage(e){const t=[];for(const s of e.objectIds)this._unreferenceFeature(s)===ye.REMOVED&&t.push(s);this.featureStore.removeManyById(t);const s=e.data.id;this._tiles.delete(s),this._tileBounds.delete(s)}_processEditsDelete(e){this.featureStore.removeManyById(e);for(const[,t]of this._tiles){for(const s of e)t.objectIds.delete(s);this._tileFeatureCounts.set(t.data.id,t.objectIds.size)}for(const t of e)this._refCounts.delete(t)}async _processEditsRefetch(e,t,s){const i=(await t(e,s)).features,{hasZ:n,hasM:r}=this.featureStore;for(const e of i){const t=(0,W.jQ)(this._tmpBoundingRect,e.geometry,n,r);null!=t&&this._tileBounds.forEachInBounds(t,(t=>{const s=this._tiles.get(t);this.featureStore.add(e);const i=e.objectId;s.objectIds.has(i)||(s.objectIds.add(i),this._referenceFeature(i),this._tileFeatureCounts.set(s.data.id,s.objectIds.size))}))}}process(e,t=(()=>!0),s){if(null==this.tileInfo||!e.extent||null!=this.extent&&!(0,X.HY)((0,X.VY)(this.extent,this._tmpBoundingRect),e.extent))return new fe(e);const i=this.getAttributesForTile(e.id);if((0,q.Yy)(s,i))return new fe(e);const n=this._createTileTree(e,this.tileInfo);return this._simplify(n,t,null,0,1),this._collectMissingTiles(e,n,this.tileInfo,s)}get debugInfo(){return Array.from(this._tiles.values()).map((({data:e})=>({data:e,featureCount:this._tileFeatureCounts.get(e.id)||0})))}getFeatureCount(e){return this._tileFeatureCounts.get(e.id)??0}async fetchCount(e,t,s,i){const n=this._tileFeatureCounts.get(e.id);if(null!=n)return n;const r=await(0,Q.gW)(t,s,i);return this._tileFeatureCounts.set(e.id,r.data.count),r.data.count}_createTileTree(e,t){const s=new _e(e.level,e.row,e.col);return t.updateTileInfo(s,_.A.ExtrapolateOptions.POWER_OF_TWO),this._tileBounds.forEachInBounds(e.extent,(i=>{const n=this._tiles.get(i)?.data;n&&function(e,t){if(!e||!t)return!1;if(e.level===t.level)return e.row===t.row&&e.col===t.col;const s=e.level<t.level,i=s?e:t,n=s?t:e,r=1<<n.level-i.level;return Math.floor(n.row/r)===i.row&&Math.floor(n.col/r)===i.col}(e,n)&&this._populateChildren(s,n,t,this._tileFeatureCounts.get(n.id)||0)})),s}_populateChildren(e,t,s,i){const n=t.level-e.level-1;if(n<0)return void(e.isLeaf=!0);const r=t.row>>n,o=t.col>>n,a=e.row<<1,l=o-(e.col<<1)+(r-a<<1),u=e.children[l];if(null!=u)this._populateChildren(u,t,s,i);else{const n=new _e(e.level+1,r,o);s.updateTileInfo(n,_.A.ExtrapolateOptions.POWER_OF_TWO),e.children[l]=n,this._populateChildren(n,t,s,i)}}_simplify(e,t,s,i,n){const r=n*n;if(e.isLeaf)return t(this.getFeatureCount(e),n)?0:(this._remove(e),null!=s&&(s.children[i]=null),r);const o=n/2,a=o*o;let l=0;for(let s=0;s<e.children.length;s++){const i=e.children[s];l+=null!=i?this._simplify(i,t,e,s,o):a}return 0===l?this._mergeChildren(e):1-l/r<me&&(this._purge(e),null!=s&&(s.children[i]=null),l=r),l}_mergeChildren(e){const t=new Set;let s,i=0;this._forEachLeaf(e,(e=>{const n=this._tiles.get(e.id);if(n){s=s?(0,q.E$)(s,n.attributeKeys):new Set(n.attributeKeys),i+=n.byteSize;for(const e of n.objectIds)t.has(e)||(t.add(e),this._referenceFeature(e));this._remove(e)}})),this._addTileStorage(e,t,i,s??new Set),e.isLeaf=!0,e.children[0]=e.children[1]=e.children[2]=e.children[3]=null,this._tileFeatureCounts.set(e.id,t.size)}_forEachLeaf(e,t){for(const s of e.children)null!=s&&(s.isLeaf?t(s):this._forEachLeaf(s,t))}_purge(e){if(null!=e)if(e.isLeaf)this._remove(e);else for(let t=0;t<e.children.length;t++){const s=e.children[t];this._purge(s),e.children[t]=null}}_collectMissingTiles(e,t,s,i){const n=new ge(s,e,this.extent);return this._collectMissingTilesRecurse(t,n,1,i),n.info}_collectMissingTilesRecurse(e,t,s,i){const n=this.getAttributesForTile(e.id),r=n&&!(0,q.Yy)(i,n);if(r&&t.addMissing(e.level,e.row,e.col,s),e.isLeaf)return;if(!e.hasChildren)return void(r||t.addMissing(e.level,e.row,e.col,s));const o=s/2;for(let s=0;s<e.children.length;s++){const n=e.children[s];null==n?t.addMissing(e.level+1,(e.row<<1)+((2&s)>>1),(e.col<<1)+(1&s),o):this._collectMissingTilesRecurse(n,t,o,i)}}_referenceFeature(e){const t=(this._refCounts.get(e)||0)+1;return this._refCounts.set(e,t),1===t?ye.ADDED:ye.UNCHANGED}_unreferenceFeature(e){const t=(this._refCounts.get(e)||0)-1;return 0===t?(this._refCounts.delete(e),ye.REMOVED):(t>0&&this._refCounts.set(e,t),ye.UNCHANGED)}get test(){return{tiles:Array.from(this._tiles.values()).map((e=>`${e.data.id}:[${Array.from(e.objectIds)}]`)),featureReferences:Array.from(this._refCounts.keys()).map((e=>`${e}:${this._refCounts.get(e)}`))}}};(0,i._)([(0,a.MZ)({constructOnly:!0})],ce.prototype,"featureStore",void 0),(0,i._)([(0,a.MZ)()],ce.prototype,"tileInfo",void 0),(0,i._)([(0,a.MZ)()],ce.prototype,"extent",void 0),(0,i._)([(0,a.MZ)()],ce.prototype,"maximumByteSize",void 0),ce=(0,i._)([(0,u.$)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTileStore")],ce);class pe{constructor(e,t,s,i){this.data=e,this.objectIds=t,this.byteSize=s,this.attributeKeys=i}}class _e{constructor(e,t,s){this.level=e,this.row=t,this.col=s,this.isLeaf=!1,this.extent=null,this.children=[null,null,null,null]}get hasChildren(){return!this.isLeaf&&(null!=this.children[0]||null!=this.children[1]||null!=this.children[2]||null!=this.children[3])}}class fe{constructor(e,t=[]){this.missingTiles=t,this.fullArea=0,this.coveredArea=0,this.fullArea=(0,X.Wc)(e.extent),this.coveredArea=this.fullArea}prepend(e){this.missingTiles=e.missingTiles.concat(this.missingTiles),this.coveredArea+=e.coveredArea,this.fullArea+=e.fullArea}}class ge{constructor(e,t,s){this._tileInfo=e,this._extent=null,this.info=new fe(t),null!=s&&(this._extent=(0,X.VY)(s))}addMissing(e,t,s,i){const n=new he.U(null,e,t,s);this._tileInfo.updateTileInfo(n,_.A.ExtrapolateOptions.POWER_OF_TWO),null==n.extent||null!=this._extent&&!(0,X.HY)(this._extent,n.extent)||(this.info.missingTiles.push({data:n,resolution:i}),this.info.coveredArea-=(0,X.Wc)(n.extent))}}const me=.18751;var ye;!function(e){e[e.ADDED=0]="ADDED",e[e.REMOVED=1]="REMOVED",e[e.UNCHANGED=2]="UNCHANGED"}(ye||(ye={}));var ve=s(65864);let we=class extends n.A.EventedAccessor{constructor(){super(...arguments),this._isInitializing=!0,this.remoteClient=null,this._whenSetup=(0,r.Tw)(),this._elevationAligner=x(),this._elevationFilter=A(),this._symbologyCandidatesFetcher=H(),this._updatingHandles=new h.U,this._editsUpdatingHandles=new h.U,this._pendingApplyEdits=new Map,this._alignPointsInFeatures=async(e,t)=>{const s={query:e},i=await this.remoteClient.invoke("alignElevation",s,{signal:t});return(0,r.Te)(t),i},this._getSymbologyCandidates=async(e,t)=>{const s={candidates:e,spatialReference:this._spatialReference.toJSON()},i=await this.remoteClient.invoke("getSymbologyCandidates",s,{signal:t});return(0,r.Te)(t),i}}get updating(){return this.updatingExcludingEdits||this._editsUpdatingHandles.updating||this._featureFetcher.updating}get updatingExcludingEdits(){return this._featureFetcher.updatingExcludingEdits||this._isInitializing||this._updatingHandles.updating}destroy(){this._featureFetcher?.destroy(),this._queryEngine?.destroy(),this._featureStore?.clear()}async setup(e){if(this.destroyed)return{result:{}};const{geometryType:t,objectIdField:s,timeInfo:i,fieldsIndex:n}=e.serviceInfo,{hasZ:r}=e,a=d.A.fromJSON(e.spatialReference);this._spatialReference=a,this._featureStore=new c.A({...e.serviceInfo,hasZ:r,hasM:!1}),this._queryEngine=new p.d({spatialReference:e.spatialReference,featureStore:this._featureStore,geometryType:t,fieldsIndex:n,hasZ:r,hasM:!1,objectIdField:s,timeInfo:i}),this._featureFetcher=new te({store:new ce({featureStore:this._featureStore}),url:e.serviceInfo.url,objectIdField:e.serviceInfo.objectIdField,globalIdField:e.serviceInfo.globalIdField,capabilities:e.serviceInfo.capabilities,spatialReference:a,sourceSpatialReference:d.A.fromJSON(e.serviceInfo.spatialReference),customParameters:e.configuration.customParameters});const l="3d"===e.configuration.viewType;return this._elevationAligner=x(l,{elevationInfo:null!=e.elevationInfo?g.A.fromJSON(e.elevationInfo):null,alignPointsInFeatures:this._alignPointsInFeatures}),this._elevationFilter=A(l),this.addHandles([(0,o.wB)((()=>this._featureFetcher.availability),(e=>this.emit("notify-availability",{availability:e})),o.OH),(0,o.wB)((()=>this.updating),(()=>this._notifyUpdating()))]),this._whenSetup.resolve(),this._isInitializing=!1,this.configure(e.configuration)}async configure(e){return await this._updatingHandles.addPromise(this._whenSetup.promise),this._updateFeatureFetcherConfiguration(e),Ee}async setSuspended(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.Te)(t),this._featureFetcher.suspended=e,Ee}async updateOutFields(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.Te)(t),this._featureFetcher.outFields=new Set(e??[]),Ee}async fetchCandidates(e,t){await this._whenSetup.promise,(0,r.Te)(t);const s=function(e){if(!e.filter)return{...e,query:{where:"1=1"}};const{distance:t,units:s,spatialRel:i,where:n,timeExtent:r,objectIds:o}=e.filter,a={geometry:e.filter.geometry?(0,ve.rS)(e.filter.geometry):void 0,distance:t,units:s,spatialRel:i,timeExtent:r,objectIds:o,where:n??"1=1"};return{...e,query:a}}(e),i=t?.signal,n=await this._queryEngine.executeQueryForSnapping(s,i);(0,r.Te)(i);const o=await this._elevationAligner.alignCandidates(n.candidates,d.A.fromJSON(e.point.spatialReference)??d.A.WGS84,i);(0,r.Te)(i);const a=await this._symbologyCandidatesFetcher.fetch(o,i);(0,r.Te)(i);const l=0===a.length?o:o.concat(a);return{result:{candidates:this._elevationFilter.filter(s,l)}}}async updateTiles(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.Te)(t),this._featureFetcher.tileSize=e.tileSize,this._featureFetcher.tilesOfInterest=e.tiles,this._featureFetcher.tileInfo=null!=e.tileInfo?_.A.fromJSON(e.tileInfo):null,Ee}async refresh(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.Te)(t),this._featureFetcher.refresh(),Ee}async whenNotUpdating(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.Te)(t),await(0,o.C_)((()=>!this.updatingExcludingEdits),t),(0,r.Te)(t),Ee}async getDebugInfo(e,t){return(0,r.Te)(t),{result:this._featureFetcher.debugInfo}}async beginApplyEdits(e,t){this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.Te)(t);const s=(0,r.Tw)();return this._pendingApplyEdits.set(e.id,s),this._featureFetcher.applyEdits(s.promise),this._editsUpdatingHandles.addPromise(s.promise),Ee}async endApplyEdits(e,t){const s=this._pendingApplyEdits.get(e.id);return s&&s.resolve(e.edits),(0,r.Te)(t),Ee}async notifyElevationSourceChange(e,t){return this._elevationAligner.notifyElevationSourceChange(),Ee}async notifySymbologyChange(e,t){return this._symbologyCandidatesFetcher.notifySymbologyChange(),Ee}async setSymbologySnappingSupported(e){return this._symbologyCandidatesFetcher=H(e,this._getSymbologyCandidates),Ee}_updateFeatureFetcherConfiguration(e){this._featureFetcher.filter=null!=e.filter?f.A.fromJSON(e.filter):null,this._featureFetcher.customParameters=e.customParameters}_notifyUpdating(){this.emit("notify-updating",{updating:this.updating})}};(0,i._)([(0,a.MZ)({readOnly:!0})],we.prototype,"updating",null),(0,i._)([(0,a.MZ)({readOnly:!0})],we.prototype,"updatingExcludingEdits",null),(0,i._)([(0,a.MZ)()],we.prototype,"_isInitializing",void 0),we=(0,i._)([(0,u.$)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceSnappingSourceWorker")],we);const xe=we,Ee={result:{}}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8383,1053],{60945:(e,t,s)=>{s.d(t,{A:()=>f});var i,n=s(90237),r=s(25482),o=s(88930),a=s(10107),l=(s(44208),s(53966),s(87811),s(36005)),u=s(40608),h=s(43937),d=s(56400);let c=i=class extends r.oY{static get allTime(){return p}static get empty(){return _}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,s=this.end?.getTime()??this.end,i=e.start?.getTime()??e.start,n=e.end?.getTime()??e.end;return t===i&&s===n}expandTo(e,t=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();let s=this.start;s&&(s=(0,o.lL)(s,e,t));let n=this.end;if(n){const s=(0,o.lL)(n,e,t);n=n.getTime()===s.getTime()?s:(0,o.S1)(s,1,e,t)}return new i({start:s,end:n})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,s=this.end?.getTime()??1/0,n=e.start?.getTime()??-1/0,r=e.end?.getTime()??1/0;let o,a;return n>=t&&n<=s?o=n:t>=n&&t<=r&&(o=t),s>=n&&s<=r?a=s:r>=t&&r<=s&&(a=r),null==o||null==a||isNaN(o)||isNaN(a)?i.empty:new i({start:o===-1/0?null:new Date(o),end:a===1/0?null:new Date(a)})}offset(e,t,s=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();const n=new i,{start:r,end:a}=this;return null!=r&&(n.start=(0,o.S1)(r,e,t,s)),null!=a&&(n.end=(0,o.S1)(a,e,t,s)),n}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return p.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,s=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:s})}};(0,n._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0),(0,n._)([(0,l.w)("end")],c.prototype,"readEnd",null),(0,n._)([(0,h.K)("end")],c.prototype,"writeEnd",null),(0,n._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null),(0,n._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null),(0,n._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0),(0,n._)([(0,l.w)("start")],c.prototype,"readStart",null),(0,n._)([(0,h.K)("start")],c.prototype,"writeStart",null),c=i=(0,n._)([(0,u.$)("esri.TimeExtent")],c);const p=new c,_=new c({start:void 0,end:void 0}),f=c},11053:(e,t,s)=>{s.d(t,{c:()=>i,g:()=>n});var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},71903:(e,t,s)=>{var i;s.d(t,{u:()=>i}),function(e){e[e.KILOBYTES=1024]="KILOBYTES",e[e.MEGABYTES=1048576]="MEGABYTES",e[e.GIGABYTES=1073741824]="GIGABYTES"}(i||(i={}))},69540:(e,t,s)=>{s.d(t,{O:()=>h,P:()=>d});var i=s(90237),n=s(69622),r=(s(44208),s(4718)),o=(s(53966),s(97768)),a=s(35666),l=s(88620),u=s(40608);const h=e=>{let t=class extends e{clone(){const e=(0,l.oY)(this);(0,o.Lw)(e,"unable to clone instance of non-accessor class");const t=e.metadata,s=e.store,i={},n=new Map;for(const e in t){const o=t[e],l=s?.originOf(e),u=o.clonable;if(o.readOnly||!1===u||l!==a.Gr.USER&&l!==a.Gr.DEFAULTS&&l!==a.Gr.WEB_MAP&&l!==a.Gr.WEB_SCENE)continue;const h=this[e];let d=null;d="function"==typeof u?u(h):"reference"===u?h:(0,r.TU)(h),null!=h&&null==d||(l===a.Gr.DEFAULTS?n.set(e,d):i[e]=d)}const u=new(0,Object.getPrototypeOf(this).constructor)(i);if(n.size){const e=(0,l.oY)(u)?.store;if(e)for(const[t,s]of n)e.set(t,s,a.Gr.DEFAULTS)}return u}};return t=(0,i._)([(0,u.$)("esri.core.Clonable")],t),t};let d=class extends(h(n.A)){};d=(0,i._)([(0,u.$)("esri.core.Clonable")],d)},55359:(e,t,s)=>{s.d(t,{q:()=>n});var i=s(57219);class n{constructor(e,t){this._storage=new i.F,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this),t&&this._storage.registerRemoveFunc("",t)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,s=1){this._storage.put(this,e,t,s,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},57219:(e,t,s)=>{s.d(t,{F:()=>a,Mn:()=>o});var i,n,r=s(3694);(n=i||(i={}))[n.ALL=0]="ALL",n[n.SOME=1]="SOME";class o{constructor(e,t,s){this.name=e,this._storage=t,this.id=l+++":",this.size=0,this.maxSize=-1,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),s&&(this._storage.registerRemoveFunc(this.id,s),this._removeFunc=!0)}destroy(){this._storage.clear(this),this._removeFunc&&this._storage.deregisterRemoveFunc(this.id),this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get storageSize(){return this._storage.size}getSize(e){return this._storage.getSize(this,e)}resetHitRate(){this._hit=this._miss=0}put(e,t,s,i=0){this._storage.put(this,e,t,s,i)}pop(e){const t=this._storage.pop(this,e);return void 0===t?++this._miss:++this._hit,t}get(e){const t=this._storage.get(this,e);return void 0===t?++this._miss:++this._hit,t}peek(e){return this._storage.peek(this,e)}updateSize(e,t,s){this._storage.updateSize(this,e,t,s)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class a{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new r.A,this._users=new r.A}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const s=this._db.get(e.id+t);return s?.size??0}put(e,t,s,n,r){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==s&&this._notifyRemove(t,o.entry,o.size,i.ALL)),n>this._maxSize)return void this._notifyRemove(t,s,n,i.ALL);if(void 0===s)return void console.warn("Refusing to cache undefined entry ");if(!n||n<0)return console.warn(`Refusing to cache entry with size ${n} for key ${t}`),void this._notifyRemove(t,s,0,i.ALL);const a=1+Math.max(r,-4)- -3;this._db.set(t,new u(s,n,a)),this._size+=n,e.size+=n,this._checkSize()}updateSize(e,t,s,n){t=e.id+t;const r=this._db.get(t);if(r&&r.entry===s){for(this._size-=r.size,e.size-=r.size;n>this._maxSize;){const e=this._notifyRemove(t,s,n,i.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);n=e}r.size=n,this._size+=n,e.size+=n,this._checkSize()}}pop(e,t){t=e.id+t;const s=this._db.get(t);if(s)return this._size-=s.size,e.size-=s.size,this._db.delete(t),++this._hit,s.entry;++this._miss}get(e,t){t=e.id+t;const s=this._db.get(t);if(void 0!==s)return this._db.delete(t),s.lives=s.lifetime,this._db.set(t,s),++this._hit,s.entry;++this._miss}peek(e,t){const s=this._db.get(e.id+t);return s?++this._hit:++this._miss,s?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},s=new Array;this._db.forEach(((e,i)=>{const n=e.lifetime;s[n]=(s[n]||0)+e.size,this._users.forAll((s=>{const{id:n,name:r}=s;if(i.startsWith(n)){const s=t[r]||0;t[r]=s+e.size}}))}));const i={};this._users.forAll((e=>{const s=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const n=t[s]||0;t[s]=n,i[s]=Math.round(100*e.hitRate)+"%"}else i[s]="0%"}));const n=Object.keys(t);n.sort(((e,s)=>t[s]-t[e])),n.forEach((s=>e[s]=Math.round(t[s]/2**20)+"MB / "+i[s]));for(let t=s.length-1;t>=0;--t){const i=s[t];i&&(e["Priority "+(t+-3-1)]=Math.round(i/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,s)=>{s.startsWith(t)&&(this._size-=e.size,this._db.delete(s),this._notifyRemove(s,e.entry,e.size,i.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,e.size,i.ALL))),this._users.forAll((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,s,i){let n;return this._removeFuncs.some((r=>{if(e.startsWith(r[0])){const e=r[1](t,i,s);return"number"==typeof e&&(n=e),!0}return!1})),n}_checkSize(){this._users.forAll((e=>this._checkSizeLimits(e))),this._checkSizeLimits()}_checkSizeLimits(e){const t=e??this;if(t.maxSize<0||t.size<=t.maxSize)return;const s=e?.id;let i=!0;for(;i;){i=!1;for(const[n,r]of this._db)if(0===r.lifetime&&(!s||n.startsWith(s))){if(this._purgeItem(n,r,e),t.size<=.9*t.maxSize)return;i||=this._db.has(n)}}for(const[i,n]of this._db)if((!s||i.startsWith(s))&&(this._purgeItem(i,n,e),t.size<=.9*t.maxSize))return}_purgeItem(e,t,s=this._users.find((t=>e.startsWith(t.id)))){if(this._db.delete(e),t.lives<=1){this._size-=t.size,s&&(s.size-=t.size);const n=this._notifyRemove(e,t.entry,t.size,i.SOME);null!=n&&n>0&&(this._size+=n,s&&(s.size+=n),t.lives=t.lifetime,t.size=n,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}let l=0;class u{constructor(e,t,s){this.entry=e,this.size=t,this.lifetime=s,this.lives=s}}},75503:(e,t,s)=>{s.d(t,{w:()=>o});var i=s(4576),n=s(3694),r=s(11006);class o{constructor(e=9,t){this._compareMinX=d,this._compareMinY=c,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),w.prune(),x.prune(),E.prune(),S.prune()}all(e){a(this._data,e)}search(e,t){let s=this._data;const i=this._toBBox;if(y(e,s))for(w.clear();s;){for(let n=0,r=s.children.length;n<r;n++){const r=s.children[n],o=s.leaf?i(r):r;y(e,o)&&(s.leaf?t(r):m(e,o)?a(r,t):w.push(r))}s=w.pop()}}collides(e){let t=this._data;const s=this._toBBox;if(!y(e,t))return!1;for(w.clear();t;){for(let i=0,n=t.children.length;i<n;i++){const n=t.children[i],r=t.leaf?s(n):n;if(y(e,r)){if(t.leaf||m(e,r))return!0;w.push(n)}}t=w.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,s=e.length;t<s;t++)this.insert(e[t]);return this}let t=this._build(e.slice(0,e.length),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new I([]),this}remove(e){if(!e)return this;let t,s=this._data,n=null,r=0,o=!1;const a=this._toBBox(e);for(E.clear(),S.clear();s||E.length>0;){if(s||(s=E.pop(),n=E.data[E.length-1],r=S.pop()??0,o=!0),s.leaf&&(t=(0,i.qh)(s.children,e,s.children.length,s.indexHint),-1!==t))return s.children.splice(t,1),E.push(s),this._condense(E),this;o||s.leaf||!m(s,a)?n?(r++,s=n.children[r],o=!1):s=null:(E.push(s),S.push(r),r=0,n=s,s=s.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,s,i){const n=s-t+1;let r=this._maxEntries;if(n<=r){const i=new I(e.slice(t,s+1));return l(i,this._toBBox),i}i||(i=Math.ceil(Math.log(n)/Math.log(r)),r=Math.ceil(n/r**(i-1)));const o=new F([]);o.height=i;const a=Math.ceil(n/r),u=a*Math.ceil(Math.sqrt(r));v(e,t,s,u,this._compareMinX);for(let n=t;n<=s;n+=u){const t=Math.min(n+u-1,s);v(e,n,t,a,this._compareMinY);for(let s=n;s<=t;s+=a){const n=Math.min(s+a-1,t);o.children.push(this._build(e,s,n,i-1))}}return l(o,this._toBBox),o}_insert(e,t,s){const i=this._toBBox,n=s?e:i(e);E.clear();const r=function(e,t,s,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==s;){let s,i=1/0,n=1/0;for(let r=0,o=t.children.length;r<o;r++){const o=t.children[r],a=p(o),l=f(e,o)-a;l<n?(n=l,i=a<i?a:i,s=o):l===n&&a<i&&(i=a,s=o)}t=s||t.children[0]}return t}(n,this._data,t,E);for(r.children.push(e),h(r,n);t>=0&&E.data[t].children.length>this._maxEntries;)this._split(E,t),t--;!function(e,t,s){for(let i=s;i>=0;i--)h(t.data[i],e)}(n,E,t)}_split(e,t){const s=e.data[t],i=s.children.length,n=this._minEntries;this._chooseSplitAxis(s,n,i);const r=this._chooseSplitIndex(s,n,i);if(!r)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const o=s.children.splice(r,s.children.length-r),a=s.leaf?new I(o):new F(o);a.height=s.height,l(s,this._toBBox),l(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(s,a)}_splitRoot(e,t){this._data=new F([e,t]),this._data.height=e.height+1,l(this._data,this._toBBox)}_chooseSplitIndex(e,t,s){let i,n,r;i=n=1/0;for(let o=t;o<=s-t;o++){const t=u(e,0,o,this._toBBox),a=u(e,o,s,this._toBBox),l=g(t,a),h=p(t)+p(a);l<i?(i=l,r=o,n=h<n?h:n):l===i&&h<n&&(n=h,r=o)}return r}_chooseSplitAxis(e,t,s){const i=e.leaf?this._compareMinX:d,n=e.leaf?this._compareMinY:c;this._allDistMargin(e,t,s,i)<this._allDistMargin(e,t,s,n)&&e.children.sort(i)}_allDistMargin(e,t,s,i){e.children.sort(i);const n=this._toBBox,r=u(e,0,t,n),o=u(e,s-t,s,n);let a=_(r)+_(o);for(let i=t;i<s-t;i++){const t=e.children[i];h(r,e.leaf?n(t):t),a+=_(r)}for(let i=s-t-1;i>=t;i--){const t=e.children[i];h(o,e.leaf?n(t):t),a+=_(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const s=e.data[t];if(0===s.children.length)if(t>0){const n=e.data[t-1],r=n.children;r.splice((0,i.qh)(r,s,r.length,n.indexHint),1)}else this.clear();else l(s,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function a(e,t){let s=e;for(x.clear();s;){if(!0===s.leaf)for(const e of s.children)t(e);else x.pushArray(s.children);s=x.pop()??null}}function l(e,t){u(e,0,e.children.length,t,e)}function u(e,t,s,i,n){n||(n=new I([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let r,o=t;o<s;o++)r=e.children[o],h(n,e.leaf?i(r):r);return n}function h(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function d(e,t){return e.minX-t.minX}function c(e,t){return e.minY-t.minY}function p(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function _(e){return e.maxX-e.minX+(e.maxY-e.minY)}function f(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function g(e,t){const s=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),r=Math.min(e.maxY,t.maxY);return Math.max(0,n-s)*Math.max(0,r-i)}function m(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function y(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function v(e,t,s,i,n){const o=[t,s];for(;o.length;){const t=o.pop(),s=o.pop();if(t-s<=i)continue;const a=s+Math.ceil((t-s)/i/2)*i;(0,r.q)(e,a,s,t,n),o.push(s,a,a,t)}}const w=new n.A,x=new n.A,E=new n.A,S=new n.A({deallocator:void 0});class b{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class T extends b{constructor(){super(...arguments),this.height=1,this.indexHint=new i.vW}}class I extends T{constructor(e){super(),this.children=e,this.leaf=!0}}class F extends T{constructor(e){super(),this.children=e,this.leaf=!1}}},36708:(e,t,s)=>{s.d(t,{C_:()=>c,OH:()=>f,Vh:()=>g,on:()=>d,pc:()=>m,wB:()=>l,z7:()=>u}),s(60999),s(5503);var i=s(37955),n=s(36563),r=s(97768),o=s(74887),a=s(14012);function l(e,t,s={}){return h(e,t,s,p)}function u(e,t,s={}){return h(e,t,s,_)}function h(e,t,s={},i){let n=null;const o=s.once?(e,s)=>{i(e)&&((0,r.xt)(n),t(e,s))}:(e,s)=>{i(e)&&t(e,s)};if(n=(0,a.Cn)(e,o,s.sync,s.equals),s.initial){const t=e();o(t,t)}return n}function d(e,t,s,o={}){let a=null,u=null,h=null;function d(){a&&u&&(u.remove(),o.onListenerRemove?.(a),a=null,u=null)}function c(e){o.once&&o.once&&(0,r.xt)(h),s(e)}const p=l(e,((e,s)=>{d(),(0,i.wb)(e)&&(a=e,u=(0,i.on)(e,t,c),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return h=(0,n.hA)((()=>{p.remove(),d()})),h}function c(e,t){return function(e,t,s){if((0,o.G4)(s))return Promise.reject((0,o.NK)());const i=e();if(t?.(i))return Promise.resolve(i);let a=null;function l(){a=(0,r.xt)(a)}return new Promise(((i,r)=>{a=(0,n.vE)([(0,o.u7)(s,(()=>{l(),r((0,o.NK)())})),h(e,(e=>{l(),i(e)}),{sync:!1,once:!0},t??p)])}))}(e,_,t)}function p(e){return!0}function _(e){return!!e}s(80559);const f={sync:!0},g={initial:!0},m={sync:!0,initial:!0}},79897:(e,t,s)=>{s.d(t,{U:()=>h});var i=s(90237),n=s(69622),r=s(36563),o=s(36708),a=s(11932),l=s(10107),u=s(40608);let h=class extends n.A{constructor(){super(...arguments),this.updating=!1,this._handleId=0,this._scheduleHandleId=0,this._pendingPromises=new Set}destroy(){this.removeAll()}add(e,t,s={}){return this._installWatch(e,t,s,o.wB)}addWhen(e,t,s={}){return this._installWatch(e,t,s,o.z7)}addOnCollectionChange(e,t,{initial:s=!1,final:i=!1}={}){const n=++this._handleId;return this.addHandles([(0,o.on)(e,"after-changes",this._createSyncUpdatingCallback(),o.OH),(0,o.on)(e,"change",t,{onListenerAdd:s?e=>t({added:e.toArray(),removed:[]}):void 0,onListenerRemove:i?e=>t({added:[],removed:e.toArray()}):void 0})],n),(0,r.hA)((()=>this.removeHandles(n)))}addPromise(e){if(null==e)return e;const t=++this._handleId;this.addHandles((0,r.hA)((()=>{this._pendingPromises.delete(e)&&(0!==this._pendingPromises.size||this.hasHandles(d)||this._set("updating",!1))})),t),this._pendingPromises.add(e),this._set("updating",!0);const s=()=>this.removeHandles(t);return e.then(s,s),e}removeAll(){this._pendingPromises.clear(),this.removeAllHandles(),this._set("updating",!1)}_installWatch(e,t,s={},i){const n=++this._handleId;s.sync||this._installSyncUpdatingWatch(e,n);const o=i(e,t,s);return this.addHandles(o,n),(0,r.hA)((()=>this.removeHandles(n)))}_installSyncUpdatingWatch(e,t){const s=this._createSyncUpdatingCallback(),i=(0,o.wB)(e,s,{sync:!0,equals:()=>!1});return this.addHandles(i,t),i}_createSyncUpdatingCallback(){return()=>{this.removeHandles(d),++this._scheduleHandleId;const e=this._scheduleHandleId;this._get("updating")||this._set("updating",!0),this.addHandles((0,a._)((()=>{e===this._scheduleHandleId&&(this._set("updating",this._pendingPromises.size>0),this.removeHandles(d))})),d)}}};(0,i._)([(0,l.MZ)({readOnly:!0})],h.prototype,"updating",void 0),h=(0,i._)([(0,u.$)("esri.core.support.UpdatingHandles")],h);const d=-42},6518:(e,t,s)=>{s.d(t,{F:()=>a});var i=s(44208),n=s(75503),r=s(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.w(9,(0,i.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((s,i)=>{e[t++]=i})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,r.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,s){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,s)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},83221:(e,t,s)=>{s.d(t,{A:()=>_});var i=s(4576),n=s(49186),r=s(65529),o=s(53966),a=s(70328),l=s(19419),u=s(90708),h=s(6518),d=s(51441),c=s(37730);const p=(0,a.vt)();class _{constructor(e){this.geometryInfo=e,this._boundsStore=new h.F,this._featuresById=new Map,this._markedIds=new Set,this.events=new r.A,this.featureAdapter=c.T}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach((t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,s,i,n]=this.fullBounds;return{xmin:t,ymin:s,xmax:i,ymax:n,spatialReference:(0,d.ag)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map((e=>this._upsert(e)));return this._emitChanged(),t.filter(i.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const s of e){const e=this._boundsStore.get(s.objectId);e&&t((0,a.Jt)(p,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let e=!1;this._featuresById.forEach(((t,s)=>{this._markedIds.has(s)||(e=!0,this._remove(t))})),this._markedIds.clear(),e&&this._emitChanged()}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const s=this._featuresById.get(t);let i;if(this._markedIds.add(t),s?(e.displayId=s.displayId,i=this._boundsStore.get(t),this._boundsStore.delete(t)):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);i=(0,u.jQ)(null!=i?i:(0,l.vt)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=i&&this._boundsStore.set(t,i),this._featuresById.set(t,e)}_upsert(e){const t=e?.objectId;if(null==t)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const s=this._featuresById.get(t);if(!s)return this._add(e),e;this._markedIds.add(t);const{geometry:i,attributes:r}=e;for(const e in r)s.attributes[e]=r[e];return i&&(s.geometry=i,this._boundsStore.set(t,(0,u.jQ)((0,l.vt)(),i,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),s}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._markedIds.delete(t),this._boundsStore.delete(t),this._featuresById.delete(t),e}}},20437:(e,t,s)=>{s.d(t,{A:()=>g});var i,n=s(90237),r=s(66552),o=s(25482),a=s(10107),l=s(56507),u=(s(87811),s(44208),s(93223)),h=s(36005),d=s(40608),c=s(72088),p=s(98453);const _=new r.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let f=i=class extends o.oY{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let s=null;try{s=t?JSON.parse(t):null}catch(e){}return s?.value??null}readValueType(e,{description:t}){let s=null;try{s=t?JSON.parse(t):null}catch(e){}return s?_.fromJSON(s.fieldValueType):null}clone(){return new i({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],f.prototype,"alias",void 0),(0,n._)([(0,a.MZ)({type:[String,Number],json:{write:{allowNull:!0}}})],f.prototype,"defaultValue",void 0),(0,n._)([(0,a.MZ)()],f.prototype,"description",void 0),(0,n._)([(0,h.w)("description")],f.prototype,"readDescription",null),(0,n._)([(0,a.MZ)({types:c.gK,json:{read:{reader:c.rS},write:!0}})],f.prototype,"domain",void 0),(0,n._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"editable",void 0),(0,n._)([(0,a.MZ)({type:l.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],f.prototype,"length",void 0),(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],f.prototype,"name",void 0),(0,n._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"nullable",void 0),(0,n._)([(0,u.e)(p.m)],f.prototype,"type",void 0),(0,n._)([(0,a.MZ)()],f.prototype,"valueType",void 0),(0,n._)([(0,h.w)("valueType",["description"])],f.prototype,"readValueType",null),(0,n._)([(0,a.MZ)({type:Boolean,json:{read:!1}})],f.prototype,"visible",void 0),f=i=(0,n._)([(0,d.$)("esri.layers.support.Field")],f);const g=f},91806:(e,t,s)=>{s.d(t,{A:()=>h});var i,n=s(90237),r=s(25482),o=s(10107),a=s(56507),l=(s(87811),s(44208),s(40608));let u=i=class extends r.oY{constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new i({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,n._)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"cols",void 0),(0,n._)([(0,o.MZ)({type:a.jz,json:{write:!0}})],u.prototype,"level",void 0),(0,n._)([(0,o.MZ)({type:String,json:{write:!0}})],u.prototype,"levelValue",void 0),(0,n._)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"origin",void 0),(0,n._)([(0,o.MZ)({type:Number,json:{write:!0}})],u.prototype,"resolution",void 0),(0,n._)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"rows",void 0),(0,n._)([(0,o.MZ)({type:Number,json:{write:!0}})],u.prototype,"scale",void 0),u=i=(0,n._)([(0,l.$)("esri.layers.support.LOD")],u);const h=u},87045:(e,t,s)=>{s.d(t,{A:()=>b});var i,n=s(90237),r=s(66552),o=s(25482),a=s(83047),l=s(10107),u=s(56507),h=(s(87811),s(44208),s(36005)),d=s(40608),c=s(43937),p=s(86738),_=s(16930),f=s(19419),g=s(21325),m=s(28735),y=s(91806),v=s(72802);const w=new r.J({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});let x=i=class extends o.oY{static create(e={}){const{resolutionFactor:t=1,scales:s,size:n=256,spatialReference:r=_.A.WebMercator,numLODs:o=24}=e;if(!(0,g.fn)(r)){const e=[];if(s)for(let t=0;t<s.length;t++){const i=s[t];e.push(new y.A({level:t,scale:i,resolution:i}))}else{let t=5e-4;for(let s=o-1;s>=0;s--)e.unshift(new y.A({level:s,scale:t,resolution:t})),t*=2}return new i({dpi:96,lods:e,origin:new p.A(0,0,r),size:[n,n],spatialReference:r})}const l=(0,g.Vp)(r),u=e.origin?new p.A({x:e.origin.x,y:e.origin.y,spatialReference:r}):new p.A(l?{x:l.origin[0],y:l.origin[1],spatialReference:r}:{x:0,y:0,spatialReference:r}),h=1/(39.37*(0,a.GA)(r)*96),d=[];if(s)for(let e=0;e<s.length;e++){const t=s[e],i=t*h;d.push(new y.A({level:e,scale:t,resolution:i}))}else{let e=(0,g.EA)(r)?512/n*591657527.5917094:256/n*591657527.591555;const s=Math.ceil(o/t);d.push(new y.A({level:0,scale:e,resolution:e*h}));for(let i=1;i<s;i++){const s=e/2**t,n=s*h;d.push(new y.A({level:i,scale:s,resolution:n})),e=s}}return new i({dpi:96,lods:d,origin:u,size:[n,n],spatialReference:r})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.size=null,this.spatialReference=null}get isWrappable(){const{spatialReference:e,origin:t}=this;if(e&&t){const s=(0,g.Vp)(e);return e.isWrappable&&!!s&&Math.abs(s.origin[0]-t.x)<=s.dx}return!1}readOrigin(e,t){return p.A.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,s=0;const i=[],n=this._levelToLOD={};e&&(t=-1/0,s=1/0,e.forEach((e=>{i.push(e.scale),t=e.scale>t?e.scale:t,s=e.scale<s?e.scale:s,n[e.level]=e}))),this._set("scales",i),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){const t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];const s=Math.floor(e),i=s+1;return t[s]/(t[s]/t[i])**(e-s)}scaleToZoom(e){const t=this.scales,s=t.length-1;let i=0;for(;i<s;i++){const s=t[i],n=t[i+1];if(s<=e)return i;if(n===e)return i+1;if(s>e&&n<e)return i+Math.log(s/e)/Math.log(s/n)}return i}snapScale(e,t=.95){const s=this.scaleToZoom(e);return s%Math.floor(s)>=t?this.zoomToScale(Math.ceil(s)):this.zoomToScale(Math.floor(s))}tileAt(e,t,s,i){const n=this.lodAt(e);if(!n)return null;let r,o;if("number"==typeof t)r=t,o=s;else if((0,g.aI)(t.spatialReference,this.spatialReference))r=t.x,o=t.y,i=s;else{const e=(0,m.Cv)(t,this.spatialReference);if(null==e)return null;r=e.x,o=e.y,i=s}const a=n.resolution*this.size[0],l=n.resolution*this.size[1];return i||(i=new v.U(null,0,0,0,(0,f.vt)())),i.level=e,i.row=Math.floor((this.origin.y-o)/l+.001),i.col=Math.floor((r-this.origin.x)/a+.001),this.updateTileInfo(i),i}updateTileInfo(e,t=i.ExtrapolateOptions.NONE){let s=this.lodAt(e.level);if(!s&&t===i.ExtrapolateOptions.POWER_OF_TWO){const t=this.lods[this.lods.length-1];t.level<e.level&&(s=t)}if(!s)return;const n=e.level-s.level,r=s.resolution*this.size[0]/2**n,o=s.resolution*this.size[1]/2**n;e.id=`${e.level}/${e.row}/${e.col}`,e.extent||(e.extent=(0,f.vt)()),e.extent[0]=this.origin.x+e.col*r,e.extent[1]=this.origin.y-(e.row+1)*o,e.extent[2]=e.extent[0]+r,e.extent[3]=e.extent[1]+o}upsampleTile(e){const t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){const s=this.lodAt(t.level);if(null==s)return null;const{resolution:i}=s,n=i*this.size[0],r=i*this.size[1];return e[0]=this.origin.x+t.col*n,e[1]=this.origin.y-(t.row+1)*r,e[2]=e[0]+n,e[3]=e[1]+r,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return i.fromJSON(this.write({}))}getCompatibleForVTL(e){if(this.size[0]!==this.size[1]||256===this.size[0]&&512===e)return null;const t=(512===this.size[0]&&256===e?-1:0)+(this.spatialReference.isGeographic?1:0);if(this.size[0]===e&&0===t)return this;const s=[],n=this.lods.length-t;for(let e=0;e<n;e++){const i=e+t,{scale:n,resolution:r}=i>=0?this.lods[i]:{scale:2*this.lods[0].scale,resolution:2*this.lods[0].resolution};s.push(new y.A({level:e,scale:n,resolution:r}))}return new i({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:s})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let s=0;s<e.length;s++){const i=e[s];this._upsampleLevels[i.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/i.resolution:0},t=i}}};var E,S;(0,n._)([(0,l.MZ)({type:Number,json:{write:!0}})],x.prototype,"compressionQuality",void 0),(0,n._)([(0,l.MZ)({type:Number,json:{write:!0}})],x.prototype,"dpi",void 0),(0,n._)([(0,l.MZ)({type:String,json:{read:w.read,write:w.write,origins:{"web-scene":{read:!1,write:!1}}}})],x.prototype,"format",void 0),(0,n._)([(0,l.MZ)({readOnly:!0})],x.prototype,"isWrappable",null),(0,n._)([(0,l.MZ)({type:p.A,json:{write:!0}})],x.prototype,"origin",void 0),(0,n._)([(0,h.w)("origin")],x.prototype,"readOrigin",null),(0,n._)([(0,l.MZ)({type:[y.A],value:null,json:{write:!0}})],x.prototype,"lods",null),(0,n._)([(0,l.MZ)({readOnly:!0})],x.prototype,"scales",void 0),(0,n._)([(0,l.MZ)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],x.prototype,"size",void 0),(0,n._)([(0,h.w)("size",["rows","cols"])],x.prototype,"readSize",null),(0,n._)([(0,c.K)("size",{cols:{type:u.jz},rows:{type:u.jz}})],x.prototype,"writeSize",null),(0,n._)([(0,l.MZ)({type:_.A,json:{write:!0}})],x.prototype,"spatialReference",void 0),x=i=(0,n._)([(0,d.$)("esri.layers.support.TileInfo")],x),E=x||(x={}),(S=E.ExtrapolateOptions||(E.ExtrapolateOptions={}))[S.NONE=0]="NONE",S[S.POWER_OF_TWO=1]="POWER_OF_TWO";const b=x},72802:(e,t,s)=>{s.d(t,{U:()=>i});class i{constructor(e,t,s,i,n=void 0){this.id=e,this.level=t,this.row=s,this.col=i,this.extent=n}}},60694:(e,t,s)=>{s.d(t,{Fi:()=>h,HZ:()=>m,Jf:()=>g,LS:()=>y,Wo:()=>f,bd:()=>v,cr:()=>p,iz:()=>c,qg:()=>d,yG:()=>_});var i=s(84952),n=s(97159);const r={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer","3dtilesserver":"3DTilesServer"},o=Object.values(r),a=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),l=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^\\/\\n]+)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),u=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function h(e){return!!a.test(e)}function d(e){if(null==e)return null;const t=(0,i.An)(e),s=t?.path.match(a)||t?.path.match(l);if(!s)return null;const[,n,o,u,h]=s,d=o.indexOf("/");return{title:p(-1!==d?o.slice(d+1):o),serverType:r[u.toLowerCase()],sublayer:null!=h&&""!==h?parseInt(h,10):null,url:{path:n}}}function c(e){const t=(0,i.An)(e).path.match(u);return t?{serviceUrl:t[1],sublayerId:Number(t[2])}:null}function p(e){return(e=e.replaceAll(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function _(e,t){const s=[];if(e){const t=d(e);null!=t&&t.title&&s.push(t.title)}if(t){const e=p(t);s.push(e)}if(2===s.length){if(s[0].toLowerCase().includes(s[1].toLowerCase()))return s[0];if(s[1].toLowerCase().includes(s[0].toLowerCase()))return s[1]}return s.join(" - ")}function f(e){if(!e)return!1;const t=(e=e.toLowerCase()).includes(".arcgis.com/"),s=e.includes("//services")||e.includes("//tiles")||e.includes("//features");return t&&s}function g(e,t){return e?(0,i.UC)((0,i.zi)(e,t)):e}function m(e){let{url:t}=e;if(!t)return{url:t};t=(0,i.zi)(t,e.logger);const s=(0,i.An)(t),n=d(s.path);let r;if(null!=n)null!=n.sublayer&&null==e.layer.layerId&&(r=n.sublayer),t=n.url.path;else if(e.nonStandardUrlAllowed){const e=c(s.path);null!=e&&(t=e.serviceUrl,r=e.sublayerId)}return{url:(0,i.UC)(t),layerId:r}}function y(e,t,s,r,o){(0,n.w)(t,r,"url",o),r.url&&null!=e.layerId&&(r.url=(0,i.fj)(r.url,s,e.layerId.toString()))}function v(e){if(!e)return!1;const t=e.toLowerCase(),s=t.includes("/services/"),i=t.includes("/mapserver/wmsserver"),n=t.includes("/imageserver/wmsserver"),r=t.includes("/wmsserver");return s&&(i||n||r)}},72088:(e,t,s)=>{s.d(t,{rS:()=>b,gK:()=>S}),s(44208);var i,n=s(90237),r=s(4718),o=s(10107),a=(s(53966),s(93223)),l=s(40608),u=s(25482);s(87811);let h=i=class extends u.oY{constructor(e){super(e),this.name=null,this.code=null}clone(){return new i({name:this.name,code:this.code})}};(0,n._)([(0,o.MZ)({type:String,json:{write:!0}})],h.prototype,"name",void 0),(0,n._)([(0,o.MZ)({type:[String,Number],json:{write:!0}})],h.prototype,"code",void 0),h=i=(0,n._)([(0,l.$)("esri.layers.support.CodedValue")],h);const d=new(s(66552).J)({inherited:"inherited",codedValue:"coded-value",range:"range"});let c=class extends u.oY{constructor(e){super(e),this.name=null,this.type=null}};(0,n._)([(0,o.MZ)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,n._)([(0,a.e)(d)],c.prototype,"type",void 0),c=(0,n._)([(0,l.$)("esri.layers.support.Domain")],c);const p=c;var _;let f=_=class extends p{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const s=String(e);this.codedValues.some((e=>(String(e.code)===s&&(t=e.name),!!t)))}return t}clone(){return new _({codedValues:(0,r.o8)(this.codedValues),name:this.name})}};(0,n._)([(0,o.MZ)({type:[h],json:{write:!0}})],f.prototype,"codedValues",void 0),(0,n._)([(0,a.e)({codedValue:"coded-value"})],f.prototype,"type",void 0),f=_=(0,n._)([(0,l.$)("esri.layers.support.CodedValueDomain")],f);const g=f;var m;s(49186);let y=m=class extends p{constructor(e){super(e),this.type="inherited"}clone(){return new m}};(0,n._)([(0,a.e)({inherited:"inherited"})],y.prototype,"type",void 0),y=m=(0,n._)([(0,l.$)("esri.layers.support.InheritedDomain")],y);const v=y;var w;let x=w=class extends p{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new w({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,n._)([(0,o.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,s){t[s]=[this.minValue||0,e]}}}})],x.prototype,"maxValue",void 0),(0,n._)([(0,o.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,s){t[s]=[e,this.maxValue||0]}}}})],x.prototype,"minValue",void 0),(0,n._)([(0,a.e)({range:"range"})],x.prototype,"type",void 0),x=w=(0,n._)([(0,l.$)("esri.layers.support.RangeDomain")],x);const E=x,S={key:"type",base:p,typeMap:{range:x,"coded-value":g,inherited:v}};function b(e){if(!e?.type)return null;switch(e.type){case"range":return E.fromJSON(e);case"codedValue":return g.fromJSON(e);case"inherited":return v.fromJSON(e)}return null}},31756:(e,t,s)=>{s.d(t,{j:()=>r});var i=s(83047),n=s(79258);const r={unknown:1,inches:(0,i.oU)(1,"meters","inches"),feet:(0,i.oU)(1,"meters","feet"),"us-feet":(0,i.oU)(1,"meters","us-feet"),yards:(0,i.oU)(1,"meters","yards"),miles:(0,i.oU)(1,"meters","miles"),"nautical-miles":(0,i.oU)(1,"meters","nautical-miles"),millimeters:(0,i.oU)(1,"meters","millimeters"),centimeters:(0,i.oU)(1,"meters","centimeters"),decimeters:(0,i.oU)(1,"meters","decimeters"),meters:(0,i.oU)(1,"meters","meters"),kilometers:(0,i.oU)(1,"meters","kilometers"),"decimal-degrees":1/(0,i.vl)(1,"meters",n.$O.radius)}},58501:(e,t,s)=>{s.d(t,{q:()=>n});var i=s(62815);function n(e,t,s){if(!s?.features||!s.hasZ)return;const n=(0,i.N)(s.geometryType,t,e.outSpatialReference);if(null!=n)for(const e of s.features)n(e.geometry)}},88625:(e,t,s)=>{s.d(t,{A:()=>w});var i,n=s(90237),r=s(66552),o=s(25482),a=s(97768),l=s(10107),u=(s(44208),s(53966),s(87811),s(36005)),h=s(40608),d=s(43937),c=s(30524);let p=i=class extends o.oY{constructor(e){super(e)}async collectRequiredFields(e,t){return(0,c.Dx)(e,t,this.expression)}clone(){return new i({expression:this.expression,title:this.title})}equals(e){return this.expression===e.expression&&this.title===e.title}};(0,n._)([(0,l.MZ)({type:String,json:{write:!0}})],p.prototype,"expression",void 0),(0,n._)([(0,l.MZ)({type:String,json:{write:!0}})],p.prototype,"title",void 0),p=i=(0,n._)([(0,h.$)("esri.symbols.support.FeatureExpressionInfo")],p);const _=p;var f,g=s(16271);const m=(0,r.O)()({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),y=new r.J({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"});let v=f=class extends o.oY{constructor(e){super(e),this.offset=null}readFeatureExpressionInfo(e,t){return null!=e?e:t.featureExpression&&0===t.featureExpression.value?{expression:"0"}:void 0}writeFeatureExpressionInfo(e,t,s,i){t[s]=e.write({},i),"0"===e.expression&&(t.featureExpression={value:0})}get mode(){const{offset:e,featureExpressionInfo:t}=this;return this._isOverridden("mode")?this._get("mode"):null!=e||t?"relative-to-ground":"on-the-ground"}set mode(e){this._override("mode",e)}set unit(e){this._set("unit",e)}write(e,t){return this.offset||this.mode||this.featureExpressionInfo||this.unit?super.write(e,t):null}clone(){return new f({mode:this.mode,offset:this.offset,featureExpressionInfo:this.featureExpressionInfo?this.featureExpressionInfo.clone():void 0,unit:this.unit})}equals(e){return this.mode===e.mode&&this.offset===e.offset&&this.unit===e.unit&&(0,a.CM)(this.featureExpressionInfo,e.featureExpressionInfo)}};(0,n._)([(0,l.MZ)({type:_,json:{write:!0}})],v.prototype,"featureExpressionInfo",void 0),(0,n._)([(0,u.w)("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],v.prototype,"readFeatureExpressionInfo",null),(0,n._)([(0,d.K)("featureExpressionInfo",{featureExpressionInfo:{type:_},"featureExpression.value":{type:[0]}})],v.prototype,"writeFeatureExpressionInfo",null),(0,n._)([(0,l.MZ)({type:m.apiValues,nonNullable:!0,json:{type:m.jsonValues,read:m.read,write:{writer:m.write,isRequired:!0}}})],v.prototype,"mode",null),(0,n._)([(0,l.MZ)({type:Number,json:{write:!0}})],v.prototype,"offset",void 0),(0,n._)([(0,l.MZ)({type:g.KQ,json:{type:String,read:y.read,write:y.write}})],v.prototype,"unit",null),v=f=(0,n._)([(0,h.$)("esri.symbols.support.ElevationInfo")],v);const w=v},16271:(e,t,s)=>{s.d(t,{Ao:()=>n,KQ:()=>r});var i=s(31756);function n(e){return 1/(i.j[e]||1)}const r=function(){const e=Object.keys(i.j);return e.sort(),e}()},11780:(e,t,s)=>{s.r(t),s.d(t,{default:()=>xe});var i=s(90237),n=(s(59456),s(65529)),r=s(74887),o=s(36708),a=s(10107),l=(s(44208),s(53966)),u=(s(87811),s(40608)),h=s(79897),d=s(16930),c=s(83221),p=s(36791),_=s(87045),f=s(61956),g=s(88625),m=s(55359),y=s(91869),v=s(83047),w=s(16271);function x(e=!1,t){if(e){const{elevationInfo:e,alignPointsInFeatures:s}=t;return new S(e,s)}return new E}class E{async alignCandidates(e,t,s){return e}notifyElevationSourceChange(){}}class S{constructor(e,t){this._elevationInfo=e,this._alignPointsInFeatures=t,this._alignmentsCache=new m.q(1024),this._cacheVersion=0}async alignCandidates(e,t,s){const i=this._elevationInfo;return null==i||"absolute-height"!==i.mode||i.featureExpressionInfo?this._alignComputedElevationCandidates(e,t,s):(function(e,t,s){const{offset:i,unit:n}=s;if(null==i)return;const r=(0,v.G9)(t),o=i*((0,w.Ao)(n??"meters")/r);for(const t of e)switch(t.type){case"edge":t.start.z+=o,t.end.z+=o;continue;case"vertex":t.target.z+=o;continue}}(e,t,i),e)}notifyElevationSourceChange(){this._alignmentsCache.clear(),this._cacheVersion++}async _alignComputedElevationCandidates(e,t,s){const i=new Map;for(const t of e)(0,y.tE)(i,t.objectId,I).push(t);const[n,o,a]=this._prepareQuery(i,t),l=await this._alignPointsInFeatures(n,s);if((0,r.Te)(s),a!==this._cacheVersion)return this._alignComputedElevationCandidates(e,t,s);this._applyCacheAndResponse(n,l,o);const{drapedObjectIds:u,failedObjectIds:h}=l,d=[];for(const t of e){const{objectId:e}=t;u.has(e)&&"edge"===t.type&&(t.draped=!0),h.has(e)||d.push(t)}return d}_prepareQuery(e,t){const s=[],i=[];for(const[t,n]of e){const e=[];for(const s of n)this._addToQueriesOrCachedResult(t,s.target,e,i),"edge"===s.type&&(this._addToQueriesOrCachedResult(t,s.start,e,i),this._addToQueriesOrCachedResult(t,s.end,e,i));0!==e.length&&s.push({objectId:t,points:e})}return[{spatialReference:t.toJSON(),pointsInFeatures:s},i,this._cacheVersion]}_addToQueriesOrCachedResult(e,t,s,i){const n=T(e,t),r=this._alignmentsCache.get(n);null==r?s.push(t):i.push(new b(t,r))}_applyCacheAndResponse(e,{elevations:t,drapedObjectIds:s,failedObjectIds:i},n){for(const e of n)e.apply();let r=0;const o=this._alignmentsCache;for(const{objectId:n,points:a}of e.pointsInFeatures){if(i.has(n)){r+=a.length;continue}const e=!s.has(n);for(const s of a){const i=T(n,s),a=t[r++];s.z=a,e&&o.put(i,a,1)}}}}class b{constructor(e,t){this.point=e,this.z=t}apply(){this.point.z=this.z}}function T(e,{x:t,y:s,z:i,spatialReference:n}){return`${e}-${t}-${s}-${i??0}}-wkid:${n?.wkid}`}function I(){return[]}class F{filter(e,t){return t}notifyElevationSourceChange(){}}class C{filter(e,t){const{point:s,distance:i}=e,{z:n}=s;if(null==n)return t;if(0===t.length)return t;const r=function(e){return"number"==typeof e?{x:e,y:e,z:e}:e}(i),o=this._updateCandidatesTo3D(t,s,r).filter(M);return o.sort(R),o}_updateCandidatesTo3D(e,t,s){for(const i of e)switch(i.type){case"edge":z(i,t,s);continue;case"vertex":O(i,t,s);continue}return e}}function M(e){return e.distance<=1}function A(e=!1){return e?new C:new F}function z(e,t,{x:s,y:i,z:n}){const{start:r,end:o,target:a}=e;e.draped||function(e,t,s,i){const n=i.x-s.x,r=i.y-s.y,o=i.z-s.z,a=n*n+r*r+o*o,l=(t.x-s.x)*n+(t.y-s.y)*r+o*(t.z-s.z),u=Math.min(1,Math.max(0,l/a)),h=s.x+n*u,d=s.y+r*u,c=s.z+o*u;e.x=h,e.y=d,e.z=c}(a,t,r,o);const l=(t.x-a.x)/s,u=(t.y-a.y)/i,h=(t.z-a.z)/n;e.distance=Math.sqrt(l*l+u*u+h*h)}function O(e,t,{x:s,y:i,z:n}){const{target:r}=e,o=(t.x-r.x)/s,a=(t.y-r.y)/i,l=(t.z-r.z)/n,u=Math.sqrt(o*o+a*a+l*l);e.distance=u}function R(e,t){return e.distance-t.distance}var B=s(4718),j=s(799);function H(e=!1,t){return e?new P(t):new N}class N{async fetch(){return[]}notifySymbologyChange(){}}class P{constructor(e){this._getSymbologyCandidates=e,this._candidatesCache=new m.q(1024),this._cacheVersion=0}async fetch(e,t){if(0===e.length)return[];const s=[],i=[],n=this._candidatesCache;for(const t of e){const e=Z(t),r=n.get(e);if(r)for(const e of r)i.push((0,B.o8)(e));else s.push(t),n.put(e,[],1)}if(0===s.length)return i;const o=this._cacheVersion,{candidates:a,sourceCandidateIndices:l}=await this._getSymbologyCandidates(s,t);if((0,r.Te)(t),o!==this._cacheVersion)return this.fetch(e,t);const u=[],{length:h}=a;for(let e=0;e<h;++e){const t=a[e],i=Z(s[l[e]]),r=n.get(i);r.push(t),n.put(i,r,r.length),u.push((0,B.o8)(t))}return i.concat(u)}notifySymbologyChange(){this._candidatesCache.clear(),this._cacheVersion++}}function Z(e){switch(e.type){case"vertex":{const{objectId:t,target:s}=e,i=`${t}-vertex-${s.x}-${s.y}-${s.z??0}`;return(0,j.Wm)(i).toString()}case"edge":{const{objectId:t,start:s,end:i}=e,n=`${t}-edge-${s.x}-${s.y}-${s.z??0}-to-${i.x}-${i.y}-${i.z??0}`;return(0,j.Wm)(n).toString()}default:return""}}var D=s(69622),U=s(4576);let L=class extends D.A{constructor(){super(...arguments),this.updating=!1,this._pending=[]}push(e,t){this._pending.push({promise:e,callback:t}),1===this._pending.length&&this._process()}_process(){if(!this._pending.length)return void(this.updating=!1);this.updating=!0;const e=this._pending[0];e.promise.then((t=>e.callback(t))).catch((()=>{})).then((()=>{this._pending.shift(),this._process()}))}};(0,i._)([(0,a.MZ)()],L.prototype,"updating",void 0),L=(0,i._)([(0,u.$)("esri.core.AsyncSequence")],L);var Y,V=s(60999),k=s(36563),q=s(3483),$=s(5443),X=s(19419),W=s(90708),G=s(60694),J=s(69418),Q=s(80893);class K{constructor(e,t){this.data=e,this.resolution=t,this.state={type:Y.CREATED},this.alive=!0}process(e){switch(this.state.type){case Y.CREATED:return this.state=this._gotoFetchCount(this.state,e),this.state.task.promise.then(e.resume,e.resume);case Y.FETCH_COUNT:break;case Y.FETCHED_COUNT:return this.state=this._gotoFetchFeatures(this.state,e),this.state.task.promise.then(e.resume,e.resume);case Y.FETCH_FEATURES:break;case Y.FETCHED_FEATURES:this.state=this._goToDone(this.state,e);case Y.DONE:}return null}get debugInfo(){return{data:this.data,featureCount:this._featureCount,state:this._stateToString}}get _featureCount(){switch(this.state.type){case Y.CREATED:case Y.FETCH_COUNT:return 0;case Y.FETCHED_COUNT:return this.state.featureCount;case Y.FETCH_FEATURES:return this.state.previous.featureCount;case Y.FETCHED_FEATURES:return this.state.features.length;case Y.DONE:return this.state.previous.features.length}}get _stateToString(){switch(this.state.type){case Y.CREATED:return"created";case Y.FETCH_COUNT:return"fetch-count";case Y.FETCHED_COUNT:return"fetched-count";case Y.FETCH_FEATURES:return"fetch-features";case Y.FETCHED_FEATURES:return"fetched-features";case Y.DONE:return"done"}}_gotoFetchCount(e,t){return{type:Y.FETCH_COUNT,previous:e,task:(0,V.UT)((async e=>{const s=await(0,V.DZ)(t.fetchCount(this,e));this.state.type===Y.FETCH_COUNT&&(this.state=function(e,t){return{type:Y.FETCHED_COUNT,featureCount:t,previous:e}}(this.state,s.ok?s.value:1/0))}))}}_gotoFetchFeatures(e,t){return{type:Y.FETCH_FEATURES,previous:e,task:(0,V.UT)((async s=>{const i=await(0,V.DZ)(t.fetchFeatures(this,e.featureCount,s));this.state.type===Y.FETCH_FEATURES&&(this.state=function(e,t){return{type:Y.FETCHED_FEATURES,previous:e,features:t}}(this.state,i.ok?i.value:[]))}))}}_goToDone(e,t){return t.finish(this,e.features),{type:Y.DONE,previous:e}}reset(){const e=this.state;switch(this.state={type:Y.CREATED},e.type){case Y.CREATED:case Y.FETCHED_COUNT:case Y.FETCHED_FEATURES:case Y.DONE:break;case Y.FETCH_COUNT:case Y.FETCH_FEATURES:e.task.abort()}}intersects(e){return null==e||!this.data.extent||((0,X.VY)(e,ee),(0,X.HY)(this.data.extent,ee))}}!function(e){e[e.CREATED=0]="CREATED",e[e.FETCH_COUNT=1]="FETCH_COUNT",e[e.FETCHED_COUNT=2]="FETCHED_COUNT",e[e.FETCH_FEATURES=3]="FETCH_FEATURES",e[e.FETCHED_FEATURES=4]="FETCHED_FEATURES",e[e.DONE=5]="DONE"}(Y||(Y={}));const ee=(0,X.vt)();let te=class extends D.A{get _minimumVerticesPerFeature(){switch(this.store?.featureStore.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":return 1;case"esriGeometryPolygon":return 4;case"esriGeometryPolyline":return 2}}get _mandatoryOutFields(){const e=new Set;return this.objectIdField&&e.add(this.objectIdField),this.globalIdField&&e.add(this.globalIdField),e}set outFields(e){const t=this._get("outFields"),s=(0,q.KC)(e,this._mandatoryOutFields);(0,q.aI)(s,t)||(this._set("outFields",s),(0,q.Yy)(s,t)||this.refresh())}get outFields(){return this._get("outFields")??this._mandatoryOutFields}set filter(e){const t=this._get("filter"),s=this._filterProperties(e);JSON.stringify(t)!==JSON.stringify(s)&&this._set("filter",s)}set customParameters(e){const t=this._get("customParameters");JSON.stringify(t)!==JSON.stringify(e)&&this._set("customParameters",e)}get _configuration(){return{filter:this.filter,customParameters:this.customParameters,tileInfo:this.tileInfo,tileSize:this.tileSize}}set tileInfo(e){const t=this._get("tileInfo");t!==e&&(null!=e&&null!=t&&JSON.stringify(e)===JSON.stringify(t)||(this._set("tileInfo",e),this.store.tileInfo=e))}set tileSize(e){this._get("tileSize")!==e&&this._set("tileSize",e)}get updating(){return this.updatingExcludingEdits||this._pendingEdits.updating}get updatingExcludingEdits(){return this._updatingHandles.updating}get hasZ(){return this.store.featureStore.hasZ}constructor(e){super(e),this.suspended=!0,this.tilesOfInterest=[],this.availability=0,this._pendingTiles=new Map,this._updatingHandles=new h.U,this._pendingEdits=new L,this._pendingEditsAbortController=new AbortController}initialize(){this._initializeFetchExtent(),this._updatingHandles.add((()=>this._configuration),(()=>this.refresh())),this._updatingHandles.add((()=>this.tilesOfInterest),((e,t)=>{(0,U.aI)(e,t,(({id:e},{id:t})=>e===t))||this._process()}),o.OH),this.addHandles((0,o.z7)((()=>!this.suspended),(()=>this._process())))}destroy(){this._pendingTiles.forEach((e=>this._deletePendingTile(e))),this._pendingTiles.clear(),this.store.destroy(),this.tilesOfInterest.length=0,this._pendingEditsAbortController.abort(),this._pendingEditsAbortController=null,this._updatingHandles.destroy()}refresh(){this.store.refresh(),this._pendingTiles.forEach((e=>this._deletePendingTile(e))),this._process()}applyEdits(e){this._pendingEdits.push(e,(async e=>{if(0===e.addedFeatures.length&&0===e.updatedFeatures.length&&0===e.deletedFeatures.length)return;for(const[,e]of this._pendingTiles)e.reset();const t={...e,deletedFeatures:e.deletedFeatures.map((({objectId:e,globalId:t})=>e&&-1!==e?e:this._lookupObjectIdByGlobalId(t)))};await this._updatingHandles.addPromise(this.store.processEdits(t,((e,t)=>this._queryFeaturesById(e,t)),this._pendingEditsAbortController.signal)),this._processPendingTiles()}))}_initializeFetchExtent(){if(!this.capabilities.query.supportsExtent||!(0,G.Wo)(this.url))return;const e=(0,V.UT)((async e=>{try{const t=await(0,Q.Jf)(this.url,new f.A({where:"1=1",outSpatialReference:this.spatialReference,cacheHint:this.capabilities.query.supportsCacheHint??void 0}),{query:this._configuration.customParameters,signal:e});this.store.extent=$.A.fromJSON(t.data?.extent)}catch(e){(0,r.QP)(e),l.A.getLogger(this).warn("Failed to fetch data extent",e)}}));this._updatingHandles.addPromise(e.promise.then((()=>this._process()))),this.addHandles((0,k.hA)((()=>e.abort())))}get debugInfo(){return{numberOfFeatures:this.store.featureStore.numFeatures,tilesOfInterest:this.tilesOfInterest,pendingTiles:Array.from(this._pendingTiles.values()).map((e=>e.debugInfo)),storedTiles:this.store.debugInfo}}_process(){this._markTilesNotAlive(),this._createPendingTiles(),this._deletePendingTiles(),this._processPendingTiles()}_markTilesNotAlive(){for(const[,e]of this._pendingTiles)e.alive=!1}_createPendingTiles(){if(this.suspended)return;const e=this._collectMissingTilesInfo();if(this._setAvailability(null==e?1:e.coveredArea/e.fullArea),null!=e)for(const{data:t,resolution:s}of e.missingTiles){const e=this._pendingTiles.get(t.id);e?(e.resolution=s,e.alive=!0):this._createPendingTile(t,s)}}_collectMissingTilesInfo(){let e=null;for(let t=this.tilesOfInterest.length-1;t>=0;t--){const s=this.tilesOfInterest[t],i=this.store.process(s,((e,t)=>this._verifyTileComplexity(e,t)),this.outFields);null==e?e=i:e.prepend(i)}return e}_deletePendingTiles(){for(const[,e]of this._pendingTiles)e.alive||this._deletePendingTile(e)}_processPendingTiles(){const e={fetchCount:(e,t)=>this._fetchCount(e,t),fetchFeatures:(e,t,s)=>this._fetchFeatures(e,t,s),finish:(e,t)=>this._finishPendingTile(e,t),resume:()=>this._processPendingTiles()};if(this._ensureFetchAllCounts(e))for(const[,t]of this._pendingTiles)this._verifyTileComplexity(this.store.getFeatureCount(t.data),t.resolution)&&this._updatingHandles.addPromise(t.process(e))}_verifyTileComplexity(e,t){return this._verifyVertexComplexity(e)&&this._verifyFeatureDensity(e,t)}_verifyVertexComplexity(e){return e*this._minimumVerticesPerFeature<ne}_verifyFeatureDensity(e,t){if(null==this.tileInfo)return!1;const s=this.tileSize*t;return e*(re/(s*s))<oe}_ensureFetchAllCounts(e){let t=!0;for(const[,s]of this._pendingTiles)s.state.type<Y.FETCHED_COUNT&&this._updatingHandles.addPromise(s.process(e)),s.state.type<=Y.FETCH_COUNT&&(t=!1);return t}_finishPendingTile(e,t){this.store.add(e.data,t),this._deletePendingTile(e),this._updateAvailability()}_updateAvailability(){const e=this._collectMissingTilesInfo();this._setAvailability(null==e?1:e.coveredArea/e.fullArea)}_setAvailability(e){this._set("availability",e)}_createPendingTile(e,t){const s=new K(e,t);return this._pendingTiles.set(e.id,s),s}_deletePendingTile(e){e.reset(),this._pendingTiles.delete(e.data.id)}async _fetchCount(e,t){return this.store.fetchCount(e.data,this.url,this._createCountQuery(e),{query:this.customParameters,timeout:ie,signal:t})}async _fetchFeatures(e,t,s){let i=0;const n=[];let r=0,o=t;for(;;){const a=this._createFeaturesQuery(e),l=this._setPagingParameters(a,i,o),{features:u,exceededTransferLimit:h}=await this._queryFeatures(a,s);l&&(i+=a.num),r+=u.length;for(const e of u)n.push(e);if(o=t-r,!l||!h||o<=0)return n}}_filterProperties(e){return null==e?{where:"1=1",gdbVersion:void 0,timeExtent:void 0}:{where:e.where||"1=1",timeExtent:e.timeExtent,gdbVersion:e.gdbVersion}}_lookupObjectIdByGlobalId(e){const t=this.globalIdField,s=this.objectIdField;if(null==t)throw new Error("Expected globalIdField to be defined");let i=null;if(this.store.featureStore.forEach((n=>{e===n.attributes[t]&&(i=n.objectId??n.attributes[s])})),null==i)throw new Error(`Expected to find a feature with globalId ${e}`);return i}_queryFeaturesById(e,t){const s=this._createFeaturesQuery();return s.objectIds=e,this._queryFeatures(s,t)}_queryFeatures(e,t){return this.capabilities.query.supportsFormatPBF?this._queryFeaturesPBF(e,t):this._queryFeaturesJSON(e,t)}async _queryFeaturesPBF(e,t){const{sourceSpatialReference:s}=this,{data:i}=await(0,Q.IJ)(this.url,e,new J.S({sourceSpatialReference:s}),{query:this._configuration.customParameters,timeout:ie,signal:t});return(0,W.eY)(i)}async _queryFeaturesJSON(e,t){const{sourceSpatialReference:s}=this,{data:i}=await(0,Q.eW)(this.url,e,s,{query:this._configuration.customParameters,timeout:ie,signal:t});return(0,W.q3)(i,this.objectIdField)}_createCountQuery(e){const t=this._createBaseQuery(e);return this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0),t}_createFeaturesQuery(e=null){const t=this._createBaseQuery(e),s=null!=e?.data?this.store.getAttributesForTile(e?.data?.id):null,i=(0,q.KC)((0,q.iv)(this.outFields,s??new Set),this._mandatoryOutFields);return t.outFields=Array.from(i),t.returnGeometry=!0,null!=e&&(this.capabilities.query.supportsResultType?t.resultType="tile":this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0)),t}_createBaseQuery(e){const t=new f.A({returnZ:this.hasZ,returnM:!1,geometry:null!=this.tileInfo&&null!=e?(0,X.w1)(e.data.extent,this.tileInfo.spatialReference):void 0}),s=this._configuration.filter;return null!=s&&(t.where=s.where,t.gdbVersion=s.gdbVersion,t.timeExtent=s.timeExtent),t.outSpatialReference=this.spatialReference,t}_setPagingParameters(e,t,s){if(!this.capabilities.query.supportsPagination)return!1;const{supportsMaxRecordCountFactor:i,supportsCacheHint:n,tileMaxRecordCount:r,maxRecordCount:o,supportsResultType:a}=this.capabilities.query,l=i?f.A.MAX_MAX_RECORD_COUNT_FACTOR:1,u=l*((a||n)&&r?r:o||se);return e.start=t,i?(e.maxRecordCountFactor=Math.min(l,Math.ceil(s/u)),e.num=Math.min(s,e.maxRecordCountFactor*u)):e.num=Math.min(s,u),!0}};(0,i._)([(0,a.MZ)({constructOnly:!0})],te.prototype,"url",void 0),(0,i._)([(0,a.MZ)({constructOnly:!0})],te.prototype,"objectIdField",void 0),(0,i._)([(0,a.MZ)({constructOnly:!0})],te.prototype,"globalIdField",void 0),(0,i._)([(0,a.MZ)({constructOnly:!0})],te.prototype,"capabilities",void 0),(0,i._)([(0,a.MZ)({constructOnly:!0})],te.prototype,"sourceSpatialReference",void 0),(0,i._)([(0,a.MZ)({constructOnly:!0})],te.prototype,"spatialReference",void 0),(0,i._)([(0,a.MZ)({constructOnly:!0})],te.prototype,"store",void 0),(0,i._)([(0,a.MZ)({readOnly:!0})],te.prototype,"_minimumVerticesPerFeature",null),(0,i._)([(0,a.MZ)()],te.prototype,"_mandatoryOutFields",null),(0,i._)([(0,a.MZ)()],te.prototype,"outFields",null),(0,i._)([(0,a.MZ)()],te.prototype,"suspended",void 0),(0,i._)([(0,a.MZ)()],te.prototype,"filter",null),(0,i._)([(0,a.MZ)()],te.prototype,"customParameters",null),(0,i._)([(0,a.MZ)({readOnly:!0})],te.prototype,"_configuration",null),(0,i._)([(0,a.MZ)()],te.prototype,"tileInfo",null),(0,i._)([(0,a.MZ)()],te.prototype,"tileSize",null),(0,i._)([(0,a.MZ)()],te.prototype,"tilesOfInterest",void 0),(0,i._)([(0,a.MZ)({readOnly:!0})],te.prototype,"updating",null),(0,i._)([(0,a.MZ)({readOnly:!0})],te.prototype,"updatingExcludingEdits",null),(0,i._)([(0,a.MZ)({readOnly:!0})],te.prototype,"availability",void 0),(0,i._)([(0,a.MZ)()],te.prototype,"hasZ",null),te=(0,i._)([(0,u.$)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiledFetcher")],te);const se=2e3,ie=6e5,ne=1e6,re=25,oe=1;var ae=s(86805),le=s(71903),ue=s(6518),he=s(72802);class de{constructor(){this._store=new Map,this._byteSize=0}set(e,t){this.delete(e),this._store.set(e,t),this._byteSize+=t.byteSize}delete(e){const t=this._store.get(e);return!!this._store.delete(e)&&(null!=t&&(this._byteSize-=t.byteSize),!0)}get(e){return this._used(e),this._store.get(e)}has(e){return this._used(e),this._store.has(e)}clear(){this._store.clear()}applyByteSizeLimit(e,t){for(const[s,i]of this._store){if(this._byteSize<=e)break;this.delete(s),t(i)}}values(){return this._store.values()}[Symbol.iterator](){return this._store[Symbol.iterator]()}_used(e){const t=this._store.get(e);t&&(this._store.delete(e),this._store.set(e,t))}}let ce=class extends D.A{constructor(e){super(e),this.tileInfo=null,this.extent=null,this.maximumByteSize=10*le.u.MEGABYTES,this._tileBounds=new ue.F,this._tiles=new de,this._refCounts=new Map,this._tileFeatureCounts=new Map,this._tmpBoundingRect=(0,X.vt)()}add(e,t){for(const e of t)this._referenceFeature(e.objectId);const s=this.featureStore.upsertMany(t),i=s.map((e=>new Set(Object.keys(e.attributes)))).reduce(((e,t)=>(0,q.E$)(e,t)),new Set(Object.keys(s[0]?.attributes??[])));this._addTileStorage(e,new Set(s.map((e=>e.objectId))),function(e){return e.reduce(((e,t)=>e+function(e){return 32+function(e){if(null==e)return 0;const t=(0,ae.zd)(e.lengths,4);return 32+(0,ae.zd)(e.coords,8)+t}(e.geometry)+(0,ae.eY)(e.attributes)}(t)),0)}(s),i),this._tiles.applyByteSizeLimit(this.maximumByteSize,(e=>this._removeTileStorage(e)))}getAttributesForTile(e){return e?this._tiles.get(e)?.attributeKeys:null}destroy(){this.clear(),this._tileFeatureCounts.clear()}clear(){this.featureStore.clear(),this._tileBounds.clear(),this._tiles.clear(),this._refCounts.clear()}refresh(){this.clear(),this._tileFeatureCounts.clear()}processEdits(e,t,s){return this._processEditsDelete(e.deletedFeatures.concat(e.updatedFeatures)),this._processEditsRefetch(e.addedFeatures.concat(e.updatedFeatures),t,s)}_addTileStorage(e,t,s,i){const n=e.id;this._tiles.set(n,new pe(e,t,s,i)),this._tileBounds.set(n,e.extent),this._tileFeatureCounts.set(n,t.size)}_remove({id:e}){const t=this._tiles.get(e);t&&this._removeTileStorage(t)}_removeTileStorage(e){const t=[];for(const s of e.objectIds)this._unreferenceFeature(s)===ye.REMOVED&&t.push(s);this.featureStore.removeManyById(t);const s=e.data.id;this._tiles.delete(s),this._tileBounds.delete(s)}_processEditsDelete(e){this.featureStore.removeManyById(e);for(const[,t]of this._tiles){for(const s of e)t.objectIds.delete(s);this._tileFeatureCounts.set(t.data.id,t.objectIds.size)}for(const t of e)this._refCounts.delete(t)}async _processEditsRefetch(e,t,s){const i=(await t(e,s)).features,{hasZ:n,hasM:r}=this.featureStore;for(const e of i){const t=(0,W.jQ)(this._tmpBoundingRect,e.geometry,n,r);null!=t&&this._tileBounds.forEachInBounds(t,(t=>{const s=this._tiles.get(t);this.featureStore.add(e);const i=e.objectId;s.objectIds.has(i)||(s.objectIds.add(i),this._referenceFeature(i),this._tileFeatureCounts.set(s.data.id,s.objectIds.size))}))}}process(e,t=(()=>!0),s){if(null==this.tileInfo||!e.extent||null!=this.extent&&!(0,X.HY)((0,X.VY)(this.extent,this._tmpBoundingRect),e.extent))return new fe(e);const i=this.getAttributesForTile(e.id);if((0,q.Yy)(s,i))return new fe(e);const n=this._createTileTree(e,this.tileInfo);return this._simplify(n,t,null,0,1),this._collectMissingTiles(e,n,this.tileInfo,s)}get debugInfo(){return Array.from(this._tiles.values()).map((({data:e})=>({data:e,featureCount:this._tileFeatureCounts.get(e.id)||0})))}getFeatureCount(e){return this._tileFeatureCounts.get(e.id)??0}async fetchCount(e,t,s,i){const n=this._tileFeatureCounts.get(e.id);if(null!=n)return n;const r=await(0,Q.gW)(t,s,i);return this._tileFeatureCounts.set(e.id,r.data.count),r.data.count}_createTileTree(e,t){const s=new _e(e.level,e.row,e.col);return t.updateTileInfo(s,_.A.ExtrapolateOptions.POWER_OF_TWO),this._tileBounds.forEachInBounds(e.extent,(i=>{const n=this._tiles.get(i)?.data;n&&function(e,t){if(!e||!t)return!1;if(e.level===t.level)return e.row===t.row&&e.col===t.col;const s=e.level<t.level,i=s?e:t,n=s?t:e,r=1<<n.level-i.level;return Math.floor(n.row/r)===i.row&&Math.floor(n.col/r)===i.col}(e,n)&&this._populateChildren(s,n,t,this._tileFeatureCounts.get(n.id)||0)})),s}_populateChildren(e,t,s,i){const n=t.level-e.level-1;if(n<0)return void(e.isLeaf=!0);const r=t.row>>n,o=t.col>>n,a=e.row<<1,l=o-(e.col<<1)+(r-a<<1),u=e.children[l];if(null!=u)this._populateChildren(u,t,s,i);else{const n=new _e(e.level+1,r,o);s.updateTileInfo(n,_.A.ExtrapolateOptions.POWER_OF_TWO),e.children[l]=n,this._populateChildren(n,t,s,i)}}_simplify(e,t,s,i,n){const r=n*n;if(e.isLeaf)return t(this.getFeatureCount(e),n)?0:(this._remove(e),null!=s&&(s.children[i]=null),r);const o=n/2,a=o*o;let l=0;for(let s=0;s<e.children.length;s++){const i=e.children[s];l+=null!=i?this._simplify(i,t,e,s,o):a}return 0===l?this._mergeChildren(e):1-l/r<me&&(this._purge(e),null!=s&&(s.children[i]=null),l=r),l}_mergeChildren(e){const t=new Set;let s,i=0;this._forEachLeaf(e,(e=>{const n=this._tiles.get(e.id);if(n){s=s?(0,q.E$)(s,n.attributeKeys):new Set(n.attributeKeys),i+=n.byteSize;for(const e of n.objectIds)t.has(e)||(t.add(e),this._referenceFeature(e));this._remove(e)}})),this._addTileStorage(e,t,i,s??new Set),e.isLeaf=!0,e.children[0]=e.children[1]=e.children[2]=e.children[3]=null,this._tileFeatureCounts.set(e.id,t.size)}_forEachLeaf(e,t){for(const s of e.children)null!=s&&(s.isLeaf?t(s):this._forEachLeaf(s,t))}_purge(e){if(null!=e)if(e.isLeaf)this._remove(e);else for(let t=0;t<e.children.length;t++){const s=e.children[t];this._purge(s),e.children[t]=null}}_collectMissingTiles(e,t,s,i){const n=new ge(s,e,this.extent);return this._collectMissingTilesRecurse(t,n,1,i),n.info}_collectMissingTilesRecurse(e,t,s,i){const n=this.getAttributesForTile(e.id),r=n&&!(0,q.Yy)(i,n);if(r&&t.addMissing(e.level,e.row,e.col,s),e.isLeaf)return;if(!e.hasChildren)return void(r||t.addMissing(e.level,e.row,e.col,s));const o=s/2;for(let s=0;s<e.children.length;s++){const n=e.children[s];null==n?t.addMissing(e.level+1,(e.row<<1)+((2&s)>>1),(e.col<<1)+(1&s),o):this._collectMissingTilesRecurse(n,t,o,i)}}_referenceFeature(e){const t=(this._refCounts.get(e)||0)+1;return this._refCounts.set(e,t),1===t?ye.ADDED:ye.UNCHANGED}_unreferenceFeature(e){const t=(this._refCounts.get(e)||0)-1;return 0===t?(this._refCounts.delete(e),ye.REMOVED):(t>0&&this._refCounts.set(e,t),ye.UNCHANGED)}get test(){return{tiles:Array.from(this._tiles.values()).map((e=>`${e.data.id}:[${Array.from(e.objectIds)}]`)),featureReferences:Array.from(this._refCounts.keys()).map((e=>`${e}:${this._refCounts.get(e)}`))}}};(0,i._)([(0,a.MZ)({constructOnly:!0})],ce.prototype,"featureStore",void 0),(0,i._)([(0,a.MZ)()],ce.prototype,"tileInfo",void 0),(0,i._)([(0,a.MZ)()],ce.prototype,"extent",void 0),(0,i._)([(0,a.MZ)()],ce.prototype,"maximumByteSize",void 0),ce=(0,i._)([(0,u.$)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTileStore")],ce);class pe{constructor(e,t,s,i){this.data=e,this.objectIds=t,this.byteSize=s,this.attributeKeys=i}}class _e{constructor(e,t,s){this.level=e,this.row=t,this.col=s,this.isLeaf=!1,this.extent=null,this.children=[null,null,null,null]}get hasChildren(){return!this.isLeaf&&(null!=this.children[0]||null!=this.children[1]||null!=this.children[2]||null!=this.children[3])}}class fe{constructor(e,t=[]){this.missingTiles=t,this.fullArea=0,this.coveredArea=0,this.fullArea=(0,X.Wc)(e.extent),this.coveredArea=this.fullArea}prepend(e){this.missingTiles=e.missingTiles.concat(this.missingTiles),this.coveredArea+=e.coveredArea,this.fullArea+=e.fullArea}}class ge{constructor(e,t,s){this._tileInfo=e,this._extent=null,this.info=new fe(t),null!=s&&(this._extent=(0,X.VY)(s))}addMissing(e,t,s,i){const n=new he.U(null,e,t,s);this._tileInfo.updateTileInfo(n,_.A.ExtrapolateOptions.POWER_OF_TWO),null==n.extent||null!=this._extent&&!(0,X.HY)(this._extent,n.extent)||(this.info.missingTiles.push({data:n,resolution:i}),this.info.coveredArea-=(0,X.Wc)(n.extent))}}const me=.18751;var ye;!function(e){e[e.ADDED=0]="ADDED",e[e.REMOVED=1]="REMOVED",e[e.UNCHANGED=2]="UNCHANGED"}(ye||(ye={}));var ve=s(65864);let we=class extends n.A.EventedAccessor{constructor(){super(...arguments),this._isInitializing=!0,this.remoteClient=null,this._whenSetup=(0,r.Tw)(),this._elevationAligner=x(),this._elevationFilter=A(),this._symbologyCandidatesFetcher=H(),this._updatingHandles=new h.U,this._editsUpdatingHandles=new h.U,this._pendingApplyEdits=new Map,this._alignPointsInFeatures=async(e,t)=>{const s={query:e},i=await this.remoteClient.invoke("alignElevation",s,{signal:t});return(0,r.Te)(t),i},this._getSymbologyCandidates=async(e,t)=>{const s={candidates:e,spatialReference:this._spatialReference.toJSON()},i=await this.remoteClient.invoke("getSymbologyCandidates",s,{signal:t});return(0,r.Te)(t),i}}get updating(){return this.updatingExcludingEdits||this._editsUpdatingHandles.updating||this._featureFetcher.updating}get updatingExcludingEdits(){return this._featureFetcher.updatingExcludingEdits||this._isInitializing||this._updatingHandles.updating}destroy(){this._featureFetcher?.destroy(),this._queryEngine?.destroy(),this._featureStore?.clear()}async setup(e){if(this.destroyed)return{result:{}};const{geometryType:t,objectIdField:s,timeInfo:i,fieldsIndex:n}=e.serviceInfo,{hasZ:r}=e,a=d.A.fromJSON(e.spatialReference);this._spatialReference=a,this._featureStore=new c.A({...e.serviceInfo,hasZ:r,hasM:!1}),this._queryEngine=new p.d({spatialReference:e.spatialReference,featureStore:this._featureStore,geometryType:t,fieldsIndex:n,hasZ:r,hasM:!1,objectIdField:s,timeInfo:i}),this._featureFetcher=new te({store:new ce({featureStore:this._featureStore}),url:e.serviceInfo.url,objectIdField:e.serviceInfo.objectIdField,globalIdField:e.serviceInfo.globalIdField,capabilities:e.serviceInfo.capabilities,spatialReference:a,sourceSpatialReference:d.A.fromJSON(e.serviceInfo.spatialReference),customParameters:e.configuration.customParameters});const l="3d"===e.configuration.viewType;return this._elevationAligner=x(l,{elevationInfo:null!=e.elevationInfo?g.A.fromJSON(e.elevationInfo):null,alignPointsInFeatures:this._alignPointsInFeatures}),this._elevationFilter=A(l),this.addHandles([(0,o.wB)((()=>this._featureFetcher.availability),(e=>this.emit("notify-availability",{availability:e})),o.OH),(0,o.wB)((()=>this.updating),(()=>this._notifyUpdating()))]),this._whenSetup.resolve(),this._isInitializing=!1,this.configure(e.configuration)}async configure(e){return await this._updatingHandles.addPromise(this._whenSetup.promise),this._updateFeatureFetcherConfiguration(e),Ee}async setSuspended(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.Te)(t),this._featureFetcher.suspended=e,Ee}async updateOutFields(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.Te)(t),this._featureFetcher.outFields=new Set(e??[]),Ee}async fetchCandidates(e,t){await this._whenSetup.promise,(0,r.Te)(t);const s=function(e){if(!e.filter)return{...e,query:{where:"1=1"}};const{distance:t,units:s,spatialRel:i,where:n,timeExtent:r,objectIds:o}=e.filter,a={geometry:e.filter.geometry?(0,ve.rS)(e.filter.geometry):void 0,distance:t,units:s,spatialRel:i,timeExtent:r,objectIds:o,where:n??"1=1"};return{...e,query:a}}(e),i=t?.signal,n=await this._queryEngine.executeQueryForSnapping(s,i);(0,r.Te)(i);const o=await this._elevationAligner.alignCandidates(n.candidates,d.A.fromJSON(e.point.spatialReference)??d.A.WGS84,i);(0,r.Te)(i);const a=await this._symbologyCandidatesFetcher.fetch(o,i);(0,r.Te)(i);const l=0===a.length?o:o.concat(a);return{result:{candidates:this._elevationFilter.filter(s,l)}}}async updateTiles(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.Te)(t),this._featureFetcher.tileSize=e.tileSize,this._featureFetcher.tilesOfInterest=e.tiles,this._featureFetcher.tileInfo=null!=e.tileInfo?_.A.fromJSON(e.tileInfo):null,Ee}async refresh(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.Te)(t),this._featureFetcher.refresh(),Ee}async whenNotUpdating(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.Te)(t),await(0,o.C_)((()=>!this.updatingExcludingEdits),t),(0,r.Te)(t),Ee}async getDebugInfo(e,t){return(0,r.Te)(t),{result:this._featureFetcher.debugInfo}}async beginApplyEdits(e,t){this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.Te)(t);const s=(0,r.Tw)();return this._pendingApplyEdits.set(e.id,s),this._featureFetcher.applyEdits(s.promise),this._editsUpdatingHandles.addPromise(s.promise),Ee}async endApplyEdits(e,t){const s=this._pendingApplyEdits.get(e.id);return s&&s.resolve(e.edits),(0,r.Te)(t),Ee}async notifyElevationSourceChange(e,t){return this._elevationAligner.notifyElevationSourceChange(),Ee}async notifySymbologyChange(e,t){return this._symbologyCandidatesFetcher.notifySymbologyChange(),Ee}async setSymbologySnappingSupported(e){return this._symbologyCandidatesFetcher=H(e,this._getSymbologyCandidates),Ee}_updateFeatureFetcherConfiguration(e){this._featureFetcher.filter=null!=e.filter?f.A.fromJSON(e.filter):null,this._featureFetcher.customParameters=e.customParameters}_notifyUpdating(){this.emit("notify-updating",{updating:this.updating})}};(0,i._)([(0,a.MZ)({readOnly:!0})],we.prototype,"updating",null),(0,i._)([(0,a.MZ)({readOnly:!0})],we.prototype,"updatingExcludingEdits",null),(0,i._)([(0,a.MZ)()],we.prototype,"_isInitializing",void 0),we=(0,i._)([(0,u.$)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceSnappingSourceWorker")],we);const xe=we,Ee={result:{}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2186],{2272:(t,e,s)=>{s.d(e,{Dl:()=>o,jV:()=>r,lF:()=>u}),s(92602),s(70333);var n=s(4718),i=s(84952);function r(t,e){return e?{...e,query:{...t??{},...e.query}}:{query:t}}function o(t){return"string"==typeof t?(0,i.An)(t):(0,n.o8)(t)}function u(t,e,s){const n={};for(const i in t){if("declaredClass"===i)continue;const r=t[i];if(null!=r&&"function"!=typeof r)if(Array.isArray(r))n[i]=r.map((t=>u(t)));else if("object"==typeof r)if(r.toJSON){const t=r.toJSON(s?.[i]);n[i]=e?t:JSON.stringify(t)}else n[i]=e?r:JSON.stringify(r);else n[i]=r}return n}s(926)},32186:(t,e,s)=>{s.r(e),s.d(e,{deleteForwardEdits:()=>o});var n=s(78888),i=s(49186),r=s(2272);async function o(t,e,s,o){if(!e)throw new i.A("post:missing-guid","guid for version is missing");const u=(0,r.Dl)(t),c=s.toJSON(),f=(0,r.jV)(u.query,{query:(0,r.lF)({...c,f:"json"}),...o,method:"post"});e.startsWith("{")&&(e=e.slice(1,-1));const a=`${u.path}/versions/${e}/deleteForwardEdits`,{data:l}=await(0,n.A)(a,f);return l.success}}}]);
|