@arcgis/core 4.30.0-next.20240413 → 4.30.0-next.20240416

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.
Files changed (95) hide show
  1. package/analysis/ViewshedShape.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/13be2bb9df1da255b8b1.js +1 -0
  4. package/assets/esri/core/workers/chunks/22c0adc7f8b3c8bc6d35.js +1 -0
  5. package/assets/esri/core/workers/chunks/2953c39aca5b516bc5f6.js +1 -0
  6. package/assets/esri/core/workers/chunks/2cf7354212aa1f3d5943.js +1 -0
  7. package/assets/esri/core/workers/chunks/47d5df8993de8c750391.js +1 -0
  8. package/assets/esri/core/workers/chunks/4aa78eb71520c0f9100e.js +1 -0
  9. package/assets/esri/core/workers/chunks/51c3f31a99c42a9b2f44.js +1 -0
  10. package/assets/esri/core/workers/chunks/5755dd8040aaf9a5ab47.js +1 -0
  11. package/assets/esri/core/workers/chunks/{fd5655136f7441731ae8.js → 61e4a0d5066a26cccb06.js} +1 -1
  12. package/assets/esri/core/workers/chunks/80efe9792d2ba77bd664.js +1 -0
  13. package/assets/esri/core/workers/chunks/81b085cb2221c74ed79a.js +1 -0
  14. package/assets/esri/core/workers/chunks/{c32a63b72950495d66e8.js → 81d521bf688e8c2bf85e.js} +1 -1
  15. package/assets/esri/core/workers/chunks/85741d70108fc20b8be9.js +1 -0
  16. package/assets/esri/core/workers/chunks/875241c2c449d33ce22c.js +1 -0
  17. package/assets/esri/core/workers/chunks/8efe15f1806fca7c5f71.js +1 -0
  18. package/assets/esri/core/workers/chunks/{4f854e0e3a65b768f6be.js → 94d457c64672a5a0745f.js} +1 -1
  19. package/assets/esri/core/workers/chunks/96d0b2df01995d6a2ed7.js +1 -0
  20. package/assets/esri/core/workers/chunks/{9c0e1e7c4296a5d032a0.js → 9bca278407528b0a82d5.js} +1 -1
  21. package/assets/esri/core/workers/chunks/9bdd6ea47ed79b223805.js +1 -0
  22. package/assets/esri/core/workers/chunks/{15c20dc5a41b63547214.js → a4919febf9c292813f67.js} +1 -1
  23. package/assets/esri/core/workers/chunks/a5cf29f344e6898e6e42.js +1 -0
  24. package/assets/esri/core/workers/chunks/{d1afd6eebab25df19cfa.js → b1a24e9e29bb82bae138.js} +1 -1
  25. package/assets/esri/core/workers/chunks/b969db5bada427ff250e.js +1 -0
  26. package/assets/esri/core/workers/chunks/baef47302b7f1a4efa19.js +1 -0
  27. package/assets/esri/core/workers/chunks/bd4f8bb7aa6b1dc72545.js +1 -0
  28. package/assets/esri/core/workers/chunks/{796206ad634adea02eec.js → c6c5e833a044f1969b00.js} +1 -1
  29. package/assets/esri/core/workers/chunks/c7df774880d362f7b6b1.js +1 -0
  30. package/assets/esri/core/workers/chunks/c9e98bd7cd5ec5a84625.js +1 -0
  31. package/assets/esri/core/workers/chunks/cc43a08272db89b3e585.js +1 -0
  32. package/assets/esri/core/workers/chunks/d2acf1dc4edec8c6f0f2.js +1 -0
  33. package/assets/esri/core/workers/chunks/d626260dcce5d6a7e0e9.js +1 -0
  34. package/assets/esri/core/workers/chunks/e42fe688b21933320017.js +1 -0
  35. package/assets/esri/core/workers/chunks/e88df6df4ddc2f653dfe.js +1 -0
  36. package/assets/esri/core/workers/chunks/{fdc22a127011833699d2.js → f5c5305de5d805202b41.js} +1 -1
  37. package/assets/esri/core/workers/chunks/f92d76b694ff0cdb212c.js +1 -0
  38. package/assets/esri/core/workers/chunks/fcddae07a8348d17b57a.js +1 -0
  39. package/assets/esri/core/workers/chunks/ff845570ff398cb8a187.js +1 -0
  40. package/assets/esri/themes/base/widgets/_Tooltip.scss +22 -12
  41. package/assets/esri/themes/dark/main.css +1 -1
  42. package/assets/esri/themes/light/main.css +1 -1
  43. package/assets/esri/themes/light/view.css +1 -1
  44. package/interfaces.d.ts +57 -9
  45. package/layers/CatalogLayer.js +1 -1
  46. package/layers/FeatureLayer.js +1 -1
  47. package/layers/catalog/CatalogFootprintLayer.js +1 -1
  48. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  49. package/layers/support/Sublayer.js +1 -1
  50. package/layers/support/featureLayerUtils.js +1 -1
  51. package/layers/support/layerUtils.js +1 -1
  52. package/package.json +1 -1
  53. package/rest/featureService/FeatureService.js +1 -1
  54. package/support/revision.js +1 -1
  55. package/symbols/cim/utils.js +1 -1
  56. package/views/3d/analysis/Viewshed/ViewshedComputedData.js +1 -1
  57. package/views/3d/environment/EnvironmentRenderer.js +1 -1
  58. package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
  59. package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
  60. package/views/interactive/tooltip/components/TooltipEditableField.js +1 -1
  61. package/widgets/FeatureTable/Grid/Column.js +1 -1
  62. package/widgets/FeatureTable.js +1 -1
  63. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
  64. package/widgets/UtilityNetworkTrace/support/GeometryHandler.js +1 -1
  65. package/widgets/UtilityNetworkTrace/support/GraphicHandler.js +1 -1
  66. package/widgets/UtilityNetworkTrace.js +1 -1
  67. package/assets/esri/core/workers/chunks/01d778f05b27195289f6.js +0 -1
  68. package/assets/esri/core/workers/chunks/20e81d5bfd6b7c720789.js +0 -1
  69. package/assets/esri/core/workers/chunks/2659f6ea7010b632df53.js +0 -1
  70. package/assets/esri/core/workers/chunks/361819e305105502926e.js +0 -1
  71. package/assets/esri/core/workers/chunks/3d614c39d2a13fb305fe.js +0 -1
  72. package/assets/esri/core/workers/chunks/3d905e1c69bc302448c5.js +0 -1
  73. package/assets/esri/core/workers/chunks/45b2f6334c001651b8ff.js +0 -1
  74. package/assets/esri/core/workers/chunks/5283aabc9f9ff9a3866a.js +0 -1
  75. package/assets/esri/core/workers/chunks/5f40ed1ff37670b47bb6.js +0 -1
  76. package/assets/esri/core/workers/chunks/636627deab56dd8a9da1.js +0 -1
  77. package/assets/esri/core/workers/chunks/672fffea5257e96120e0.js +0 -1
  78. package/assets/esri/core/workers/chunks/7c8252831ff88e64e3c7.js +0 -1
  79. package/assets/esri/core/workers/chunks/888fe0bf8c86564a1da6.js +0 -1
  80. package/assets/esri/core/workers/chunks/8c0d5c4f669af3663052.js +0 -1
  81. package/assets/esri/core/workers/chunks/92dfa2973977075a2701.js +0 -1
  82. package/assets/esri/core/workers/chunks/9ea8016ee6fa5977980c.js +0 -1
  83. package/assets/esri/core/workers/chunks/ac9d1e33a0da083c3e54.js +0 -1
  84. package/assets/esri/core/workers/chunks/ae43948a50f6bfeee2e3.js +0 -1
  85. package/assets/esri/core/workers/chunks/aee1580da7009a3cadda.js +0 -1
  86. package/assets/esri/core/workers/chunks/c065148c33f58871b542.js +0 -1
  87. package/assets/esri/core/workers/chunks/c1595b336f53c0e362f1.js +0 -1
  88. package/assets/esri/core/workers/chunks/c26720584a6f5b05474e.js +0 -1
  89. package/assets/esri/core/workers/chunks/d0cf48abf951ae58ab15.js +0 -1
  90. package/assets/esri/core/workers/chunks/d56297ebd21ff95ced40.js +0 -1
  91. package/assets/esri/core/workers/chunks/e2cdf963cf09f70d9bfd.js +0 -1
  92. package/assets/esri/core/workers/chunks/e79a75f40b8231179402.js +0 -1
  93. package/assets/esri/core/workers/chunks/ee18e753d4db6f4266ae.js +0 -1
  94. package/assets/esri/core/workers/chunks/ef5db5c3be1dba954d74.js +0 -1
  95. package/assets/esri/core/workers/chunks/fd137b51bc3517b5bdb6.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5613],{22429:(e,a,t)=>{t.d(a,{v:()=>n});var r=t(24183);class n{constructor(){this._serviceMetadatas=new Map,this._itemDatas=new Map}async fetchServiceMetadata(e,a){const t=this._serviceMetadatas.get(e);if(t)return t;const n=await(0,r.V)(e,a);return this._serviceMetadatas.set(e,n),n}async fetchItemData(e){const{id:a}=e;if(!a)return null;const{_itemDatas:t}=this;if(t.has(a))return t.get(a);const r=await e.fetchData();return t.set(a,r),r}async fetchCustomParameters(e,a){const t=await this.fetchItemData(e);return t&&"object"==typeof t&&(a?a(t):t.customParameters)||null}}},92009:(e,a,t)=>{t.d(a,{L:()=>o});var r=t(70333),n=t(78888),s=t(49186),i=t(74887),l=t(60694),c=t(20655),u=t(80812);async function o(e,a){const t=(0,l.qg)(e);if(!t)throw new s.A("invalid-url","Invalid scene service url");const o={...a,sceneServerUrl:t.url.path,layerId:t.sublayer??void 0};if(o.sceneLayerItem??=await async function(e){const a=(await y(e)).serviceItemId;if(!a)return null;const t=new u.default({id:a,apiKey:e.apiKey}),s=await async function(e){const a=r.id?.findServerInfo(e.sceneServerUrl);if(a?.owningSystemUrl)return a.owningSystemUrl;const t=e.sceneServerUrl.replace(/(.*\/rest)\/.*/i,"$1")+"/info";try{const a=(await(0,n.A)(t,{query:{f:"json"},responseType:"json",signal:e.signal})).data.owningSystemUrl;if(a)return a}catch(e){(0,i.QP)(e)}return null}(e);null!=s&&(t.portal=new c.A({url:s}));try{return t.load({signal:e.signal})}catch(e){return(0,i.QP)(e),null}}(o),null==o.sceneLayerItem)return d(o.sceneServerUrl.replace("/SceneServer","/FeatureServer"),o);const f=await async function({sceneLayerItem:e,signal:a}){if(!e)return null;try{const t=(await e.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},{signal:a})).find((e=>"Feature Service"===e.type))||null;if(!t)return null;const r=new u.default({portal:t.portal,id:t.id});return await r.load(),r}catch(e){return(0,i.QP)(e),null}}(o);if(!f?.url)throw new s.A("related-service-not-found","Could not find feature service through portal item relationship");o.featureServiceItem=f;const m=await d(f.url,o);return m.portalItem=f,m}async function y(e){if(e.rootDocument)return e.rootDocument;const a={query:{f:"json",...e.customParameters,token:e.apiKey},responseType:"json",signal:e.signal};try{const t=await(0,n.A)(e.sceneServerUrl,a);e.rootDocument=t.data}catch{e.rootDocument={}}return e.rootDocument}async function d(e,a){const t=(0,l.qg)(e);if(!t)throw new s.A("invalid-feature-service-url","Invalid feature service url");const r=t.url.path,i=a.layerId;if(null==i)return{serverUrl:r};const c=y(a),u=a.featureServiceItem?await a.featureServiceItem.fetchData("json"):null,o=(u?.layers?.[0]||u?.tables?.[0])?.customParameters,d=e=>{const t={query:{f:"json",...o},responseType:"json",authMode:e,signal:a.signal};return(0,n.A)(r,t)},f=d("anonymous").catch((()=>d("no-prompt"))),[m,w]=await Promise.all([f,c]),h=w?.layers,p=m.data&&m.data.layers;if(!Array.isArray(p))throw new Error("expected layers array");if(Array.isArray(h)){for(let e=0;e<Math.min(h.length,p.length);e++)if(h[e].id===i)return{serverUrl:r,layerId:p[e].id}}else if(null!=i&&i<p.length)return{serverUrl:r,layerId:p[i].id};throw new Error("could not find matching associated sublayer")}},23154:(e,a,t)=>{t.d(a,{K:()=>d,Q:()=>s});var r=t(24183);const n=new Set(["Catalog Layer","Feature Layer","Oriented Imagery Layer"]);async function s(e,a){const{loadContext:t,...n}=a||{},s=t?await t.fetchServiceMetadata(e,n):await(0,r.V)(e,n);y(s),c(s);const i={serviceJSON:s};if((s.currentVersion??0)<10.5)return i;const l=`${e}/layers`,u=t?await t.fetchServiceMetadata(l,n):await(0,r.V)(l,n);return y(u),c(u),i.layersJSON={layers:u.layers,tables:u.tables},i}function i(e){const{type:a}=e;return!!a&&n.has(a)}function l(e){return"Table"===e.type}function c(e){e.layers=e.layers?.filter(i),e.tables=e.tables?.filter(l)}function u(e){e.type||="Feature Layer"}function o(e){e.type||="Table"}function y(e){e.layers?.forEach(u),e.tables?.forEach(o)}function d(e){switch(e){case"Feature Layer":case"Table":return"FeatureLayer";case"Oriented Imagery Layer":return"OrientedImageryLayer";case"Catalog Layer":return"CatalogLayer"}return"FeatureLayer"}},4513:(e,a,t)=>{t.d(a,{S:()=>r});const r={BingMapsLayer:async()=>(await Promise.all([t.e(3161),t.e(9257)]).then(t.bind(t,17029))).default,BuildingSceneLayer:async()=>(await Promise.all([t.e(3161),t.e(3359),t.e(1147),t.e(6306),t.e(1132),t.e(7255),t.e(1956),t.e(5494),t.e(6240),t.e(9040),t.e(2777),t.e(5516),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,CSVLayer:async()=>(await Promise.all([t.e(3161),t.e(3359),t.e(1147),t.e(6306),t.e(1132),t.e(7255),t.e(1956),t.e(5494),t.e(6240),t.e(9040),t.e(2777),t.e(5516),t.e(3600),t.e(5856)]).then(t.bind(t,72256))).default,CatalogLayer:async()=>(await Promise.all([t.e(3161),t.e(3359),t.e(1147),t.e(6306),t.e(1132),t.e(7255),t.e(1956),t.e(5494),t.e(6240),t.e(2777),t.e(5516),t.e(893),t.e(3622),t.e(2593),t.e(3116)]).then(t.bind(t,88982))).default,DimensionLayer:async()=>(await t.e(1493).then(t.bind(t,71493))).default,ElevationLayer:async()=>(await Promise.all([t.e(4349),t.e(5204)]).then(t.bind(t,5111))).default,FeatureLayer:async()=>(await Promise.all([t.e(3161),t.e(3359),t.e(1147),t.e(6306),t.e(1132),t.e(7255),t.e(1956),t.e(5494),t.e(6240),t.e(9040),t.e(2777),t.e(5516),t.e(3600),t.e(5899)]).then(t.bind(t,13600))).default,GeoJSONLayer:async()=>(await Promise.all([t.e(3161),t.e(3359),t.e(1147),t.e(6306),t.e(1132),t.e(7255),t.e(1956),t.e(5494),t.e(6240),t.e(9040),t.e(2777),t.e(8774)]).then(t.bind(t,17625))).default,GeoRSSLayer:async()=>(await Promise.all([t.e(3161),t.e(1147),t.e(6306),t.e(6184)]).then(t.bind(t,63201))).default,GroupLayer:async()=>(await Promise.all([t.e(3161),t.e(7481)]).then(t.bind(t,85989))).default,ImageryLayer:async()=>(await Promise.all([t.e(3161),t.e(3359),t.e(1147),t.e(6306),t.e(1132),t.e(7255),t.e(1956),t.e(893),t.e(2876),t.e(4192),t.e(3522)]).then(t.bind(t,5159))).default,ImageryTileLayer:async()=>(await Promise.all([t.e(3161),t.e(3359),t.e(1147),t.e(6306),t.e(1132),t.e(7255),t.e(2876),t.e(9362),t.e(4192),t.e(9124)]).then(t.bind(t,257))).default,IntegratedMesh3DTilesLayer:async()=>(await t.e(1528).then(t.bind(t,61528))).default,IntegratedMeshLayer:async()=>(await Promise.all([t.e(9345),t.e(958),t.e(8003)]).then(t.bind(t,84453))).default,KMLLayer:async()=>(await Promise.all([t.e(3161),t.e(3359),t.e(1147),t.e(6306),t.e(1132),t.e(7255),t.e(5494),t.e(4850)]).then(t.bind(t,79465))).default,KnowledgeGraphLayer:async()=>(await Promise.all([t.e(3161),t.e(3359),t.e(1147),t.e(6306),t.e(1132),t.e(7255),t.e(1956),t.e(5494),t.e(6240),t.e(9040),t.e(835),t.e(3097),t.e(3709),t.e(2764),t.e(8692)]).then(t.bind(t,28692))).default,LineOfSightLayer:async()=>(await Promise.all([t.e(958),t.e(7272)]).then(t.bind(t,42452))).default,LinkChartLayer:async()=>(await Promise.all([t.e(3161),t.e(3359),t.e(1147),t.e(6306),t.e(1132),t.e(7255),t.e(1956),t.e(5494),t.e(6240),t.e(9040),t.e(835),t.e(3097),t.e(3709),t.e(2764),t.e(7740)]).then(t.bind(t,67740))).default,MapImageLayer:async()=>(await Promise.all([t.e(3161),t.e(3359),t.e(1147),t.e(6306),t.e(1132),t.e(7255),t.e(1956),t.e(5494),t.e(6240),t.e(2777),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(3161),t.e(3359),t.e(1147),t.e(6306),t.e(1132),t.e(7255),t.e(1956),t.e(5494),t.e(6240),t.e(9040),t.e(2777),t.e(5516),t.e(3600),t.e(8961)]).then(t.bind(t,35079))).default,MediaLayer:async()=>(await Promise.all([t.e(3161),t.e(7899)]).then(t.bind(t,87899))).default,OGCFeatureLayer:async()=>(await Promise.all([t.e(3161),t.e(3359),t.e(1147),t.e(6306),t.e(1132),t.e(7255),t.e(1956),t.e(5494),t.e(6240),t.e(9040),t.e(2777),t.e(8972),t.e(4591)]).then(t.bind(t,87152))).default,OpenStreetMapLayer:async()=>(await Promise.all([t.e(3161),t.e(7430),t.e(349)]).then(t.bind(t,40349))).default,OrientedImageryLayer:async()=>(await Promise.all([t.e(3161),t.e(3359),t.e(1147),t.e(6306),t.e(1132),t.e(7255),t.e(1956),t.e(5494),t.e(6240),t.e(9040),t.e(2777),t.e(5516),t.e(3600),t.e(5028)]).then(t.bind(t,16230))).default,PointCloudLayer:async()=>(await Promise.all([t.e(3359),t.e(9345),t.e(171)]).then(t.bind(t,76742))).default,RouteLayer:async()=>(await Promise.all([t.e(3161),t.e(3359),t.e(1147),t.e(6306),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(3359),t.e(1147),t.e(6306),t.e(1132),t.e(7255),t.e(1956),t.e(5494),t.e(6240),t.e(3030),t.e(4873),t.e(9345),t.e(347),t.e(958),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(3161),t.e(3359),t.e(1147),t.e(6306),t.e(1132),t.e(7255),t.e(1956),t.e(5494),t.e(6240),t.e(9040),t.e(8228)]).then(t.bind(t,60683))).default,SubtypeGroupLayer:async()=>(await Promise.all([t.e(3161),t.e(3359),t.e(1147),t.e(6306),t.e(1132),t.e(7255),t.e(1956),t.e(5494),t.e(6240),t.e(2777),t.e(5516),t.e(6888),t.e(6483)]).then(t.bind(t,70048))).default,TileLayer:async()=>(await Promise.all([t.e(3161),t.e(3359),t.e(1147),t.e(6306),t.e(1132),t.e(7255),t.e(1956),t.e(5494),t.e(6240),t.e(2777),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(3161),t.e(4349),t.e(9976),t.e(8705),t.e(9885)]).then(t.bind(t,64152))).default,VideoLayer:async()=>(await Promise.all([t.e(3161),t.e(6875)]).then(t.bind(t,86875))).default,VoxelLayer:async()=>(await Promise.all([t.e(3359),t.e(9345),t.e(958),t.e(2152)]).then(t.bind(t,9006))).default,WFSLayer:async()=>(await Promise.all([t.e(3161),t.e(3359),t.e(1147),t.e(6306),t.e(1132),t.e(7255),t.e(1956),t.e(5494),t.e(6240),t.e(9040),t.e(4322),t.e(951)]).then(t.bind(t,16350))).default,WMSLayer:async()=>(await Promise.all([t.e(3161),t.e(3359),t.e(1147),t.e(6306),t.e(5181)]).then(t.bind(t,51904))).default,WMTSLayer:async()=>(await Promise.all([t.e(3161),t.e(7430),t.e(309)]).then(t.bind(t,20309))).default,WebTileLayer:async()=>(await Promise.all([t.e(3161),t.e(7430)]).then(t.bind(t,47314))).default}},66964:(e,a,t)=>{t.d(a,{Ju:()=>u,K8:()=>d,XH:()=>o,_r:()=>s,bO:()=>i,iK:()=>y,nu:()=>f,pJ:()=>l,rc:()=>c});var r=t(92009),n=t(23154);function s(e){const a={id:e.id,name:e.name},t=(0,n.K)(e.type);return"FeatureLayer"!==t&&(a.layerType=t),a}async function i(e,a,t){if(null==e?.layers||null==e?.tables){const r=await t.fetchServiceMetadata(a,{customParameters:l(e)?.customParameters});(e=e||{}).layers=e.layers||r?.layers?.map(s),e.tables=e.tables||r?.tables?.map(s)}return e}function l(e){if(!e)return null;const{layers:a,tables:t}=e;return a?.length?a[0]:t?.length?t[0]:null}function c(e,a){return null==a?null:[...e.layers||[],...e.tables||[]].find((e=>e.id===a))}function u(e,a){return[...e.layers||[],...e.tables||[]].filter((({layerType:e})=>"FeatureLayer"===a?!e:e===a))}function o(e){return(e?.layers?.length??0)+(e?.tables?.length??0)}function y(e){switch(e){case"catalog":return"CatalogLayer";case"feature":return"FeatureLayer";case"oriented-imagery":return"OrientedImageryLayer";case"subtype-group":return"SubtypeGroupLayer"}return null}function d(e){switch(e){case"CatalogLayer":return"CatalogLayer";case"OrientedImageryLayer":return"OrientedImageryLayer";case"SubtypeGroupLayer":return"SubtypeGroupLayer"}return"FeatureLayer"}async function f(e,a,t){if(!e?.url)return a??{};if(a??={},!a.layers){const r=await t.fetchServiceMetadata(e.url);a.layers=r.layers?.map(s)}const{serverUrl:n,portalItem:i}=await(0,r.L)(e.url,{sceneLayerItem:e,customParameters:l(a)?.customParameters}).catch((()=>({serverUrl:null,portalItem:null})));if(null==n)return a.tables=[],a;if(!a.tables&&i){const e=await i.fetchData();if(e?.tables)a.tables=e.tables.map(s);else{const r=await t.fetchServiceMetadata(n,{customParameters:l(e)?.customParameters});a.tables=r?.tables?.map(s)}}if(a.tables)for(const e of a.tables)e.url=`${n}/${e.id}`;return a}},45613:(e,a,t)=>{t.d(a,{fromItem:()=>d,n:()=>f});var r=t(49186),n=t(92009),s=t(23154),i=t(22429),l=t(83531),c=t(4513),u=t(80812),o=t(66964),y=t(10407);async function d(e){let{portalItem:a}=e;!a||a instanceof u.default||(a=new u.default(a));const t=await async function(e){await e.load();const a=new i.v;return async function(e){const a=e.className,t=c.S[a];return{constructor:await t(),properties:e.properties}}(await f(e,a))}(a);return new(0,t.constructor)({portalItem:a,...t.properties})}async function f(e,a){switch(e.type){case"3DTiles Service":return{className:"IntegratedMesh3DTilesLayer"};case"CSV":return{className:"CSVLayer"};case"Feature Collection":return async function(e){await e.load();const a=(0,y.Y)(e,"Map Notes"),t=(0,y.Y)(e,"Markup");if(a||t)return{className:"MapNotesLayer"};if((0,y.Y)(e,"Route Layer"))return{className:"RouteLayer"};const r=await e.fetchData();return 1===(0,o.XH)(r)?{className:"FeatureLayer"}:{className:"GroupLayer"}}(e);case"Feature Service":return async function(e,a){const t=await m(e,a);if("object"==typeof t){const{sourceJSON:e,className:a}=t,r={sourceJSON:e};return null!=t.id&&(r.layerId=t.id),{className:a||"FeatureLayer",properties:r}}return{className:"GroupLayer"}}(e,a);case"Feed":case"Stream Service":return{className:"StreamLayer"};case"GeoJson":return{className:"GeoJSONLayer"};case"Group Layer":return{className:"GroupLayer"};case"Image Service":return async function(e,a){await e.load();const t=e.typeKeywords?.map((e=>e.toLowerCase()))??[];if(t.includes("elevation 3d layer"))return{className:"ElevationLayer"};if(t.includes("tiled imagery"))return{className:"ImageryTileLayer"};const r=await a.fetchItemData(e),n=r?.layerType;if("ArcGISTiledImageServiceLayer"===n)return{className:"ImageryTileLayer"};if("ArcGISImageServiceLayer"===n)return{className:"ImageryLayer"};const s=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)}),i=s.cacheType?.toLowerCase(),l=s.capabilities?.toLowerCase().includes("tilesonly");return"map"===i||l?{className:"ImageryTileLayer"}:{className:"ImageryLayer"}}(e,a);case"KML":return{className:"KMLLayer"};case"Map Service":return async function(e,a){return await async function(e,a){const{tileInfo:t}=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)});return t}(e,a)?{className:"TileLayer"}:{className:"MapImageLayer"}}(e,a);case"Media Layer":return{className:"MediaLayer"};case"Scene Service":return async function(e,a){const t=await m(e,a,(async()=>{try{if(!e.url)return[];const{serverUrl:t}=await(0,n.L)(e.url,{sceneLayerItem:e}),r=await a.fetchServiceMetadata(t);return r?.tables??[]}catch{return[]}}));if("object"==typeof t){const r={};let n;if(null!=t.id?(r.layerId=t.id,n=`${e.url}/layers/${t.id}`):n=e.url,e.typeKeywords?.length)for(const a of Object.keys(l.XX))if(e.typeKeywords.includes(a))return{className:l.XX[a]};const s=await a.fetchServiceMetadata(n,{customParameters:await a.fetchCustomParameters(e,(e=>(0,o.pJ)(e)?.customParameters))});return{className:l.XX[s?.layerType]||"SceneLayer",properties:r}}if(!1===t){const t=await a.fetchServiceMetadata(e.url);if("Voxel"===t?.layerType)return{className:"VoxelLayer"}}return{className:"GroupLayer"}}(e,a);case"Vector Tile Service":return{className:"VectorTileLayer"};case"WFS":return{className:"WFSLayer"};case"WMS":return{className:"WMSLayer"};case"WMTS":return{className:"WMTSLayer"};default:throw new r.A("portal:unknown-item-type","Unknown item type '${type}'",{type:e.type})}}async function m(e,a,t){const{url:r,type:n}=e,i="Feature Service"===n;if(!r)return{};if(/\/\d+$/.test(r)){if(i){const t=await a.fetchServiceMetadata(r,{customParameters:await a.fetchCustomParameters(e,(e=>(0,o.pJ)(e)?.customParameters))});return{id:t.id,className:(0,s.K)(t.type),sourceJSON:t}}return{}}await e.load();let l=await a.fetchItemData(e);if(i){const e=await(0,o.bO)(l,r,a),t=w(e);if("object"==typeof t){const a=(0,o.rc)(e,t.id);t.className=(0,o.K8)(a?.layerType)}return t}if("Scene Service"===n&&(l=await(0,o.nu)(e,l,a)),(0,o.XH)(l)>0)return w(l);const c=await a.fetchServiceMetadata(r);return t&&(c.tables=await t()),w(c)}function w(e){return 1===(0,o.XH)(e)&&{id:(0,o.pJ)(e)?.id}}},24183:(e,a,t)=>{t.d(a,{V:()=>n});var r=t(78888);async function n(e,a){const{data:t}=await(0,r.A)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}});return t}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2439],{38961:(e,t,r)=>{r.d(t,{A:()=>p});var s=r(90237),o=r(5503),i=(r(60999),r(49186),r(53966),r(14012),r(80559)),n=r(10107),a=r(40608);let l=class extends o.A{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,i.fm)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t,this.length)}_createNewInstance(e){return new o.A(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const s of t)if(s){if(r(s)){const t=this.indexOf(s,e);t>=0?t!==e&&this.reorder(s,e):this.add(s,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(s);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,s._)([(0,n.MZ)()],l.prototype,"getCollections",void 0),(0,s._)([(0,n.MZ)()],l.prototype,"getChildrenFunction",void 0),(0,s._)([(0,n.MZ)()],l.prototype,"itemFilterFunction",void 0),l=(0,s._)([(0,a.$)("esri.core.CollectionFlattener")],l);const p=l},88303:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Ye});var s=r(90237),o=r(5503),i=r(38961),n=r(49186),a=r(4718),l=r(81583),p=r(53966),u=r(92071),y=r(74887),d=r(84952),c=r(10107),h=(r(44208),r(36005)),f=r(40608),m=r(16930),g=r(4146),v=r(52106),b=r(13874),_=(r(86162),r(94409),r(65345),r(42980),r(39290),r(92438),r(96576),r(93618),r(65494),r(15036)),S=r(78888),w=r(66552),M=r(92474),A=r(61893),Z=(r(87811),r(93223)),x=r(5443),F=r(13600),O=r(4902),T=r(56507),R=r(10873);let j=class extends((0,O.sA)(u.L)){constructor(e){super(e),this.title="",this.id=-1,this.modelName=null,this.isEmpty=null,this.legendEnabled=!0,this.visible=!0,this.opacity=1}readTitle(e,t){return"string"==typeof t.alias?t.alias:"string"==typeof t.name?t.name:""}readIdOnlyOnce(e){return-1!==this.id?this.id:"number"==typeof e?e:-1}};(0,s._)([(0,c.MZ)({type:String,json:{origins:{"web-scene":{write:!0},"portal-item":{write:!0}}}})],j.prototype,"title",void 0),(0,s._)([(0,h.w)("service","title",["alias","name"])],j.prototype,"readTitle",null),(0,s._)([(0,c.MZ)()],j.prototype,"layer",void 0),(0,s._)([(0,c.MZ)({type:T.jz,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0}}})],j.prototype,"id",void 0),(0,s._)([(0,h.w)("service","id")],j.prototype,"readIdOnlyOnce",null),(0,s._)([(0,c.MZ)((0,R.Qo)(String))],j.prototype,"modelName",void 0),(0,s._)([(0,c.MZ)((0,R.Qo)(Boolean))],j.prototype,"isEmpty",void 0),(0,s._)([(0,c.MZ)({type:Boolean,nonNullable:!0})],j.prototype,"legendEnabled",void 0),(0,s._)([(0,c.MZ)({type:Boolean,json:{name:"visibility",write:!0}})],j.prototype,"visible",void 0),(0,s._)([(0,c.MZ)({type:Number,json:{write:!0}})],j.prototype,"opacity",void 0),j=(0,s._)([(0,f.$)("esri.layers.buildingSublayers.BuildingSublayer")],j);const C=j;var I=r(4417),L=r(4071),P=r(17036),Q=r(95466),B=r(30524),E=r(83898),q=r(50805),N=r(61956),D=r(30291),k=r(88625),z=r(28030),G=r(45671);const U=(0,P.p)();let $=class extends((0,I.M)(M.A.LoadableMixin((0,A.g)(C)))){constructor(e){super(e),this.type="building-component",this.nodePages=null,this.materialDefinitions=[],this.textureSetDefinitions=[],this.geometryDefinitions=[],this.indexInfo=null,this.serviceUpdateTimeStamp=null,this.store=null,this.attributeStorageInfo=[],this.fields=[],this.associatedLayer=null,this.outFields=null,this.listMode="show",this.renderer=null,this.definitionExpression=null,this.popupEnabled=!0,this.popupTemplate=null,this.layerType="3d-object"}get parsedUrl(){return this.layer?{path:`${this.layer.parsedUrl?.path}/sublayers/${this.id}`,query:this.layer.parsedUrl?.query}:{path:""}}get fieldsIndex(){return new Q.A(this.fields)}readAssociatedLayer(e,t){const r=this.layer.associatedFeatureServiceItem,s=t.associatedLayerID;return null!=r&&"number"==typeof s?new F.default({portalItem:r,customParameters:this.customParameters,layerId:s}):null}get objectIdField(){if(null!=this.fields)for(const e of this.fields)if("oid"===e.type)return e.name;return null}get displayField(){return null!=this.associatedLayer?this.associatedLayer.displayField:void 0}get apiKey(){return this.layer.apiKey}get customParameters(){return this.layer.customParameters}get fullExtent(){return this.layer.fullExtent}get spatialReference(){return this.layer.spatialReference}get version(){return this.layer.version}get elevationInfo(){return this.layer.elevationInfo}get minScale(){return this.layer.minScale}get maxScale(){return this.layer.maxScale}get effectiveScaleRange(){return this.layer.effectiveScaleRange}get defaultPopupTemplate(){return this.createPopupTemplate()}load(e){const t=null!=e?e.signal:null,r=this._fetchService(t).then((()=>{this.indexInfo=(0,E.F)(this.parsedUrl.path,this.rootNode,this.nodePages,this.customParameters,this.apiKey,p.A.getLogger(this),t)}));return this.addResolvingPromise(r),Promise.resolve(this)}createPopupTemplate(e){return(0,D.tn)(this,e)}async _fetchService(e){const t=(await(0,S.A)(this.parsedUrl.path,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,{origin:"service",url:this.parsedUrl})}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getFeatureType(t?.feature)?.domains?.[e];return r&&"inherited"!==r.type?r:this.getField(e)?.domain??null}getFeatureType(e){return e&&null!=this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return null!=this.associatedLayer?this.associatedLayer.types??[]:[]}get typeIdField(){return null!=this.associatedLayer?this.associatedLayer.typeIdField:null}get geometryType(){return"3d-object"===this.layerType?"mesh":"point"}get profile(){return"3d-object"===this.layerType?"mesh-pyramids":"points"}get capabilities(){const e=null!=this.associatedLayer&&this.associatedLayer.capabilities?this.associatedLayer.capabilities:L.P,{query:t,data:{supportsZ:r,supportsM:s,isVersioned:o}}=e;return{query:t,data:{supportsZ:r,supportsM:s,isVersioned:o}}}createQuery(){const e=new N.A;return"mesh"!==this.geometryType&&(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryExtent(e||this.createQuery(),t)))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatureCount(e||this.createQuery(),t)))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatures(e||this.createQuery(),t))).then((e=>{if(e?.features)for(const t of e.features)t.layer=this.layer,t.sourceLayer=this;return e}))}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryObjectIds(e||this.createQuery(),t)))}async queryCachedAttributes(e,t){const r=(0,B.hL)(this.fieldsIndex,await(0,G.TO)(this,(0,G.D8)(this)));return(0,z.s1)(this.parsedUrl.path,this.attributeStorageInfo,e,t,r,this.apiKey,this.customParameters)}async queryCachedFeature(e,t){const r=await this.queryCachedAttributes(e,[t]);if(!r||0===r.length)throw new n.A("scenelayer:feature-not-in-cached-data","Feature not found in cached data");return new v.A({attributes:r[0],layer:this,sourceLayer:this})}getFieldUsageInfo(e){return this.fieldsIndex.has(e)?{supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1}:{supportsLabelingInfo:!1,supportsRenderer:!0,supportsPopupTemplate:!0,supportsLayerQuery:null!=this.associatedLayer}}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return null!=e&&e.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),null==this.associatedLayer)throw new n.A("buildingscenelayer:query-not-available","BuildingSceneLayer component layer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new n.A("buildingscenelayer:query-not-available","BuildingSceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}};(0,s._)([(0,c.MZ)({readOnly:!0})],$.prototype,"parsedUrl",null),(0,s._)([(0,c.MZ)({type:q.W4,readOnly:!0})],$.prototype,"nodePages",void 0),(0,s._)([(0,c.MZ)({type:[q.uV],readOnly:!0})],$.prototype,"materialDefinitions",void 0),(0,s._)([(0,c.MZ)({type:[q.Ot],readOnly:!0})],$.prototype,"textureSetDefinitions",void 0),(0,s._)([(0,c.MZ)({type:[q.L0],readOnly:!0})],$.prototype,"geometryDefinitions",void 0),(0,s._)([(0,c.MZ)({readOnly:!0})],$.prototype,"serviceUpdateTimeStamp",void 0),(0,s._)([(0,c.MZ)({readOnly:!0})],$.prototype,"store",void 0),(0,s._)([(0,c.MZ)({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],$.prototype,"rootNode",void 0),(0,s._)([(0,c.MZ)({readOnly:!0})],$.prototype,"attributeStorageInfo",void 0),(0,s._)([(0,c.MZ)(U.fields)],$.prototype,"fields",void 0),(0,s._)([(0,c.MZ)({readOnly:!0})],$.prototype,"fieldsIndex",null),(0,s._)([(0,c.MZ)({readOnly:!0,type:F.default})],$.prototype,"associatedLayer",void 0),(0,s._)([(0,h.w)("service","associatedLayer",["associatedLayerID"])],$.prototype,"readAssociatedLayer",null),(0,s._)([(0,c.MZ)(U.outFields)],$.prototype,"outFields",void 0),(0,s._)([(0,c.MZ)({type:String,readOnly:!0})],$.prototype,"objectIdField",null),(0,s._)([(0,c.MZ)({readOnly:!0,type:String,json:{read:!1}})],$.prototype,"displayField",null),(0,s._)([(0,c.MZ)({readOnly:!0,type:String})],$.prototype,"apiKey",null),(0,s._)([(0,c.MZ)({readOnly:!0,type:String})],$.prototype,"customParameters",null),(0,s._)([(0,c.MZ)({readOnly:!0,type:x.A})],$.prototype,"fullExtent",null),(0,s._)([(0,c.MZ)({readOnly:!0,type:m.A})],$.prototype,"spatialReference",null),(0,s._)([(0,c.MZ)({readOnly:!0})],$.prototype,"version",null),(0,s._)([(0,c.MZ)({readOnly:!0,type:k.A})],$.prototype,"elevationInfo",null),(0,s._)([(0,c.MZ)({readOnly:!0,type:Number})],$.prototype,"minScale",null),(0,s._)([(0,c.MZ)({readOnly:!0,type:Number})],$.prototype,"maxScale",null),(0,s._)([(0,c.MZ)({readOnly:!0,type:Number})],$.prototype,"effectiveScaleRange",null),(0,s._)([(0,c.MZ)({type:["hide","show"],json:{write:!0}})],$.prototype,"listMode",void 0),(0,s._)([(0,c.MZ)({types:_.X,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],$.prototype,"renderer",void 0),(0,s._)([(0,c.MZ)({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],$.prototype,"definitionExpression",void 0),(0,s._)([(0,c.MZ)(R.M6)],$.prototype,"popupEnabled",void 0),(0,s._)([(0,c.MZ)({type:b.A,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],$.prototype,"popupTemplate",void 0),(0,s._)([(0,c.MZ)({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],$.prototype,"normalReferenceFrame",void 0),(0,s._)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],$.prototype,"defaultPopupTemplate",null),(0,s._)([(0,c.MZ)()],$.prototype,"types",null),(0,s._)([(0,c.MZ)()],$.prototype,"typeIdField",null),(0,s._)([(0,c.MZ)({json:{write:!1}}),(0,Z.e)(new w.J({"3DObject":"3d-object",Point:"point"}))],$.prototype,"layerType",void 0),(0,s._)([(0,c.MZ)()],$.prototype,"geometryType",null),(0,s._)([(0,c.MZ)()],$.prototype,"profile",null),(0,s._)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],$.prototype,"capabilities",null),$=(0,s._)([(0,f.$)("esri.layers.buildingSublayers.BuildingComponentSublayer")],$);const H=$;var K,V=r(67076);const J={type:o.A,readOnly:!0,json:{origins:{service:{read:{source:"sublayers",reader:W}}},read:!1}};function W(e,t,r){if(e&&Array.isArray(e))return new o.A(e.map((e=>{const t=function(e){return"group"===e.layerType?Y:H}(e);if(t){const s=new t;return s.read(e,r),s}return r?.messages&&e&&r.messages.push(new V.A("building-scene-layer:unsupported-sublayer-type","Building scene sublayer of type '"+(e.type||"unknown")+"' are not supported",{definition:e,context:r})),null})))}let Y=K=class extends C{constructor(e){super(e),this.type="building-group",this.listMode="show",this.sublayers=null}loadAll(){return(0,l.L)(this,(e=>K.forEachSublayer(this.sublayers,(t=>{"building-group"!==t.type&&e(t)}))))}};var X;(0,s._)([(0,c.MZ)({type:["hide","show","hide-children"],json:{write:!0}})],Y.prototype,"listMode",void 0),(0,s._)([(0,c.MZ)(J)],Y.prototype,"sublayers",void 0),Y=K=(0,s._)([(0,f.$)("esri.layers.buildingSublayers.BuildingGroupSublayer")],Y),(X=Y||(Y={})).sublayersProperty=J,X.readSublayers=W,X.forEachSublayer=function e(t,r){t.forEach((t=>{r(t),"building-group"===t.type&&e(t.sublayers,r)}))};const ee=Y;var te=r(52136),re=r(18768),se=r(69208),oe=r(16131),ie=r(8303),ne=r(25036),ae=r(58947),le=r(92009),pe=r(25482),ue=r(13069);let ye=class extends pe.oY{constructor(){super(...arguments),this.type=null}};(0,s._)([(0,c.MZ)({type:String,readOnly:!0,json:{write:!0}})],ye.prototype,"type",void 0),ye=(0,s._)([(0,f.$)("esri.layers.support.BuildingFilterAuthoringInfo")],ye);const de=ye;var ce;let he=ce=class extends pe.oY{constructor(){super(...arguments),this.filterType=null,this.filterValues=null}clone(){return new ce({filterType:this.filterType,filterValues:(0,a.o8)(this.filterValues)})}};(0,s._)([(0,c.MZ)({type:String,json:{write:!0}})],he.prototype,"filterType",void 0),(0,s._)([(0,c.MZ)({type:[String],json:{write:!0}})],he.prototype,"filterValues",void 0),he=ce=(0,s._)([(0,f.$)("esri.layers.support.BuildingFilterAuthoringInfoType")],he);const fe=he;var me;const ge=o.A.ofType(fe);let ve=me=class extends pe.oY{clone(){return new me({filterTypes:(0,a.o8)(this.filterTypes)})}};(0,s._)([(0,c.MZ)({type:ge,json:{write:!0}})],ve.prototype,"filterTypes",void 0),ve=me=(0,s._)([(0,f.$)("esri.layers.support.BuildingFilterAuthoringInfoBlock")],ve);const be=ve;var _e;const Se=o.A.ofType(be);let we=_e=class extends de{constructor(){super(...arguments),this.type="checkbox"}clone(){return new _e({filterBlocks:(0,a.o8)(this.filterBlocks)})}};(0,s._)([(0,c.MZ)({type:["checkbox"]})],we.prototype,"type",void 0),(0,s._)([(0,c.MZ)({type:Se,json:{write:!0}})],we.prototype,"filterBlocks",void 0),we=_e=(0,s._)([(0,f.$)("esri.layers.support.BuildingFilterAuthoringInfoCheckbox")],we);const Me=we;let Ae=class extends pe.oY{};(0,s._)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],Ae.prototype,"type",void 0),Ae=(0,s._)([(0,f.$)("esri.layers.support.BuildingFilterMode")],Ae);const Ze=Ae;var xe;let Fe=xe=class extends Ze{constructor(){super(...arguments),this.type="solid"}clone(){return new xe}};(0,s._)([(0,c.MZ)({type:["solid"],readOnly:!0,json:{write:!0}})],Fe.prototype,"type",void 0),Fe=xe=(0,s._)([(0,f.$)("esri.layers.support.BuildingFilterModeSolid")],Fe);const Oe=Fe;var Te,Re=r(74907);let je=Te=class extends Ze{constructor(){super(...arguments),this.type="wire-frame",this.edges=null}clone(){return new Te({edges:(0,a.o8)(this.edges)})}};(0,s._)([(0,Z.e)({wireFrame:"wire-frame"})],je.prototype,"type",void 0),(0,s._)([(0,c.MZ)(Re.J)],je.prototype,"edges",void 0),je=Te=(0,s._)([(0,f.$)("esri.layers.support.BuildingFilterModeWireFrame")],je);const Ce=je;var Ie;let Le=Ie=class extends Ze{constructor(){super(...arguments),this.type="x-ray"}clone(){return new Ie}};(0,s._)([(0,c.MZ)({type:["x-ray"],readOnly:!0,json:{write:!0}})],Le.prototype,"type",void 0),Le=Ie=(0,s._)([(0,f.$)("esri.layers.support.BuildingFilterModeXRay")],Le);const Pe=Le;var Qe;const Be={nonNullable:!0,types:{key:"type",base:Ze,typeMap:{solid:Oe,"wire-frame":Ce,"x-ray":Pe}},json:{read:e=>{switch(e?.type){case"solid":return Oe.fromJSON(e);case"wireFrame":return Ce.fromJSON(e);case"x-ray":return Pe.fromJSON(e);default:return}},write:{enabled:!0,isRequired:!0}}};let Ee=Qe=class extends pe.oY{constructor(){super(...arguments),this.filterExpression=null,this.filterMode=new Oe,this.title=""}clone(){return new Qe({filterExpression:this.filterExpression,filterMode:(0,a.o8)(this.filterMode),title:this.title})}};(0,s._)([(0,c.MZ)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],Ee.prototype,"filterExpression",void 0),(0,s._)([(0,c.MZ)(Be)],Ee.prototype,"filterMode",void 0),(0,s._)([(0,c.MZ)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],Ee.prototype,"title",void 0),Ee=Qe=(0,s._)([(0,f.$)("esri.layers.support.BuildingFilterBlock")],Ee);const qe=Ee;var Ne;const De=o.A.ofType(qe);let ke=Ne=class extends pe.oY{constructor(){super(...arguments),this.description=null,this.filterBlocks=null,this.id=(0,ue.lk)(),this.name=null}clone(){return new Ne({description:this.description,filterBlocks:(0,a.o8)(this.filterBlocks),id:this.id,name:this.name,filterAuthoringInfo:(0,a.o8)(this.filterAuthoringInfo)})}};(0,s._)([(0,c.MZ)({type:String,json:{write:!0}})],ke.prototype,"description",void 0),(0,s._)([(0,c.MZ)({type:De,json:{write:{enabled:!0,isRequired:!0}}})],ke.prototype,"filterBlocks",void 0),(0,s._)([(0,c.MZ)({types:{key:"type",base:de,typeMap:{checkbox:Me}},json:{read:e=>"checkbox"===e?.type?Me.fromJSON(e):null,write:!0}})],ke.prototype,"filterAuthoringInfo",void 0),(0,s._)([(0,c.MZ)({type:String,constructOnly:!0,json:{write:{enabled:!0,isRequired:!0}}})],ke.prototype,"id",void 0),(0,s._)([(0,c.MZ)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],ke.prototype,"name",void 0),ke=Ne=(0,s._)([(0,f.$)("esri.layers.support.BuildingFilter")],ke);const ze=ke;let Ge=class extends pe.oY{constructor(){super(...arguments),this.fieldName=null,this.modelName=null,this.label=null,this.min=null,this.max=null,this.mostFrequentValues=null,this.subLayerIds=null}};(0,s._)([(0,c.MZ)({type:String})],Ge.prototype,"fieldName",void 0),(0,s._)([(0,c.MZ)({type:String})],Ge.prototype,"modelName",void 0),(0,s._)([(0,c.MZ)({type:String})],Ge.prototype,"label",void 0),(0,s._)([(0,c.MZ)({type:Number})],Ge.prototype,"min",void 0),(0,s._)([(0,c.MZ)({type:Number})],Ge.prototype,"max",void 0),(0,s._)([(0,c.MZ)({json:{read:e=>Array.isArray(e)&&(e.every((e=>"string"==typeof e))||e.every((e=>"number"==typeof e)))?e.slice():null}})],Ge.prototype,"mostFrequentValues",void 0),(0,s._)([(0,c.MZ)({type:[Number]})],Ge.prototype,"subLayerIds",void 0),Ge=(0,s._)([(0,f.$)("esri.layers.support.BuildingSummaryStatistics.BuildingFieldStatistics")],Ge);let Ue=class extends(M.A.LoadableMixin((0,A.g)(pe.oY))){constructor(){super(...arguments),this.url=null}get fields(){return this.loaded||"loading"===this.loadStatus?this._get("fields"):(p.A.getLogger(this).error("building summary statistics are not loaded"),null)}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._fetchService(t)),Promise.resolve(this)}async _fetchService(e){const t=(await(0,S.A)(this.url,{query:{f:"json"},responseType:"json",signal:e})).data;this.read(t,{origin:"service"})}};(0,s._)([(0,c.MZ)({constructOnly:!0,type:String})],Ue.prototype,"url",void 0),(0,s._)([(0,c.MZ)({readOnly:!0,type:[Ge],json:{read:{source:"summary"}}})],Ue.prototype,"fields",null),Ue=(0,s._)([(0,f.$)("esri.layers.support.BuildingSummaryStatistics")],Ue);const $e=Ue;var He=r(24212);const Ke=o.A.ofType(ze),Ve=(0,a.o8)(ee.sublayersProperty),Je=Ve.json?.origins;Je&&(Je["web-scene"]={type:[H],write:{enabled:!0,overridePolicy:()=>({enabled:!1})}},Je["portal-item"]={type:[H],write:{enabled:!0,overridePolicy:()=>({enabled:!1})}});let We=class extends((0,ae.w6)((0,re.b)((0,oe.q)((0,ie.A)((0,ne.j)((0,u.P)((0,se.d)((0,te.p)(g.A))))))))){constructor(e){super(e),this.operationalLayerType="BuildingSceneLayer",this.allSublayers=new i.A({getCollections:()=>[this.sublayers],getChildrenFunction:e=>"building-group"===e.type?e.sublayers:null}),this.sublayers=null,this._sublayerOverrides=null,this.filters=new Ke,this.activeFilterId=null,this.summaryStatistics=null,this.outFields=null,this.legendEnabled=!0,this.type="building-scene"}normalizeCtorArgs(e){return"string"==typeof e?{url:e}:e??{}}destroy(){this.allSublayers.destroy()}readSublayers(e,t,r){const s=ee.readSublayers(e,t,r);return ee.forEachSublayer(s,(e=>e.layer=this)),this._sublayerOverrides&&(this.applySublayerOverrides(s,this._sublayerOverrides),this._sublayerOverrides=null),s}applySublayerOverrides(e,{overrides:t,context:r}){ee.forEachSublayer(e,(e=>e.read(t.get(e.id),r)))}readSublayerOverrides(e,t){const r=new Map;for(const s of e)null!=s&&"object"==typeof s&&"number"==typeof s.id?r.set(s.id,s):t.messages?.push(new n.A("building-scene-layer:invalid-sublayer-override","Invalid value for sublayer override. Not an object or no id specified.",{value:s}));return{overrides:r,context:t}}writeSublayerOverrides(e,t,r){const s=[];ee.forEachSublayer(this.sublayers,(e=>{const t=e.write({},r);Object.keys(t).length>1&&s.push(t)})),s.length>0&&(t.sublayers=s)}writeUnappliedOverrides(e,t){t.sublayers=[],e.overrides.forEach((e=>{t.sublayers.push((0,a.o8)(e))}))}write(e,t){return e=super.write(e,t),!t||"web-scene"!==t.origin&&"portal-item"!==t.origin||(this.sublayers?this.writeSublayerOverrides(this.sublayers,e,t):this._sublayerOverrides&&this.writeUnappliedOverrides(this._sublayerOverrides,e)),e}read(e,t){if(super.read(e,t),t&&("web-scene"===t.origin||"portal-item"===t.origin)&&null!=e&&Array.isArray(e.sublayers)){const r=this.readSublayerOverrides(e.sublayers,t);this.sublayers?this.applySublayerOverrides(this.sublayers,r):this._sublayerOverrides=r}}readSummaryStatistics(e,t){if("string"==typeof t.statisticsHRef){const e=(0,d.fj)(this.parsedUrl?.path,t.statisticsHRef);return new $e({url:e})}return null}set elevationInfo(e){this._set("elevationInfo",e),this._validateElevationInfo()}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(y.QP).then((()=>this._fetchService(t))).then((()=>this._fetchAssociatedFeatureService(t)));return this.addResolvingPromise(r),Promise.resolve(this)}loadAll(){return(0,l.g)(this,(e=>{ee.forEachSublayer(this.sublayers,(t=>{"building-group"!==t.type&&e(t)})),this.summaryStatistics&&e(this.summaryStatistics)}))}async saveAs(e,t){return this._debouncedSaveOperations(ae.Xh.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"building-scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"building-scene"};return this._debouncedSaveOperations(ae.Xh.SAVE,e)}validateLayer(e){if(!e.layerType||"Building"!==e.layerType)throw new n.A("buildingscenelayer:layer-type-not-supported","BuildingSceneLayer does not support this layer type",{layerType:e.layerType})}_getTypeKeywords(){return["Building"]}async _fetchAssociatedFeatureService(e){try{const{portalItem:t}=await(0,le.L)(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e});this.associatedFeatureServiceItem=t}catch(e){p.A.getLogger(this).warn("Associated feature service item could not be loaded",e)}}_validateElevationInfo(){const e=this.elevationInfo,t="Building scene layers";(0,He.XF)(p.A.getLogger(this),(0,He.B)(t,"absolute-height",e)),(0,He.XF)(p.A.getLogger(this),(0,He.tW)(t,e))}};(0,s._)([(0,c.MZ)({type:["BuildingSceneLayer"]})],We.prototype,"operationalLayerType",void 0),(0,s._)([(0,c.MZ)({readOnly:!0})],We.prototype,"allSublayers",void 0),(0,s._)([(0,c.MZ)(Ve)],We.prototype,"sublayers",void 0),(0,s._)([(0,h.w)("service","sublayers")],We.prototype,"readSublayers",null),(0,s._)([(0,c.MZ)({type:Ke,nonNullable:!0,json:{write:!0}})],We.prototype,"filters",void 0),(0,s._)([(0,c.MZ)({type:String,json:{write:!0}})],We.prototype,"activeFilterId",void 0),(0,s._)([(0,c.MZ)({readOnly:!0,type:$e})],We.prototype,"summaryStatistics",void 0),(0,s._)([(0,h.w)("summaryStatistics",["statisticsHRef"])],We.prototype,"readSummaryStatistics",null),(0,s._)([(0,c.MZ)({type:[String],json:{read:!1}})],We.prototype,"outFields",void 0),(0,s._)([(0,c.MZ)(R.Fm)],We.prototype,"fullExtent",void 0),(0,s._)([(0,c.MZ)(R.fV)],We.prototype,"legendEnabled",void 0),(0,s._)([(0,c.MZ)({type:["show","hide","hide-children"]})],We.prototype,"listMode",void 0),(0,s._)([(0,c.MZ)((0,R.Qo)(m.A))],We.prototype,"spatialReference",void 0),(0,s._)([(0,c.MZ)(R.Yj)],We.prototype,"elevationInfo",null),(0,s._)([(0,c.MZ)({json:{read:!1},readOnly:!0})],We.prototype,"type",void 0),(0,s._)([(0,c.MZ)()],We.prototype,"associatedFeatureServiceItem",void 0),We=(0,s._)([(0,f.$)("esri.layers.BuildingSceneLayer")],We);const Ye=We},33143:(e,t,r)=>{r.d(t,{A:()=>c});var s=r(90237),o=r(69540),i=r(25482),n=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),l=r(40608),p=r(43937),u=r(72088),y=r(29005);let d=class extends((0,o.O)(i.oY)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,u.rS)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,s._)([(0,n.MZ)({json:{write:!0}})],d.prototype,"id",void 0),(0,s._)([(0,n.MZ)({json:{write:!0}})],d.prototype,"name",void 0),(0,s._)([(0,n.MZ)({json:{write:!0}})],d.prototype,"domains",void 0),(0,s._)([(0,a.w)("domains")],d.prototype,"readDomains",null),(0,s._)([(0,p.K)("domains")],d.prototype,"writeDomains",null),(0,s._)([(0,n.MZ)({type:[y.A],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,s._)([(0,l.$)("esri.layers.support.FeatureType")],d);const c=d},22453:(e,t,r)=>{r.d(t,{S:()=>y,d:()=>S});var s=r(44208),o=r(60694);function i(e,t,r){return!!a(e,t,r)}function n(e,t,r){return a(e,t,r)}function a(e,t,r){return e&&e.hasOwnProperty(t)?e[t]:r}const l={name:"supportsName",size:"supportsSize",contentType:"supportsContentType",keywords:"supportsKeywords",exifInfo:"supportsExifInfo"};function p(e){const t=e?.supportedSpatialAggregationStatistics?.map((e=>e.toLowerCase()));return{envelope:!!t?.includes("envelopeaggregate"),centroid:!!t?.includes("centroidaggregate"),convexHull:!!t?.includes("convexhullaggregate")}}function u(e,t){const r=e?.supportedOperationsWithCacheHint?.map((e=>e.toLowerCase()));return!!r?.includes(t.toLowerCase())}function y(e,t){return{analytics:d(e),attachment:c(e),data:h(e),metadata:f(e),operations:m(e.capabilities,e,t),query:g(e,t),queryRelated:v(e),queryTopFeatures:b(e),editing:_(e)}}function d(e){return{supportsCacheHint:u(e.advancedQueryCapabilities,"queryAnalytics")}}function c(e){const t=e.attachmentProperties,r={supportsName:!1,supportsSize:!1,supportsContentType:!1,supportsKeywords:!1,supportsExifInfo:!1,supportsCacheHint:u(e.advancedQueryCapabilities,"queryAttachments"),supportsResize:i(e,"supportsAttachmentsResizing",!1)};return t&&Array.isArray(t)&&t.forEach((e=>{const t=l[e.name];t&&(r[t]=!!e.isEnabled)})),r}function h(e){return{isVersioned:i(e,"isDataVersioned",!1),supportsAttachment:i(e,"hasAttachments",!1),supportsM:i(e,"hasM",!1),supportsZ:i(e,"hasZ",!1)}}function f(e){return{supportsAdvancedFieldProperties:i(e,"supportsFieldDescriptionProperty",!1)}}function m(e,t,r){const s=e?e.toLowerCase().split(",").map((e=>e.trim())):[],n=r?(0,o.qg)(r):null,a=s.includes(null!=n&&"MapServer"===n.serverType?"data":"query"),l=s.includes("editing")&&!t.datesInUnknownTimezone;let p=l&&s.includes("create"),u=l&&s.includes("delete"),y=l&&s.includes("update");const d=s.includes("changetracking"),c=t.advancedQueryCapabilities;return l&&!(p||u||y)&&(p=u=y=!0),{supportsCalculate:i(t,"supportsCalculate",!1),supportsTruncate:i(t,"supportsTruncate",!1),supportsValidateSql:i(t,"supportsValidateSql",!1),supportsAdd:p,supportsDelete:u,supportsEditing:l,supportsChangeTracking:d,supportsQuery:a,supportsQueryAnalytics:i(c,"supportsQueryAnalytic",!1),supportsQueryAttachments:i(c,"supportsQueryAttachments",!1),supportsQueryTopFeatures:i(c,"supportsTopFeaturesQuery",!1),supportsResizeAttachments:i(t,"supportsAttachmentsResizing",!1),supportsSync:s.includes("sync"),supportsUpdate:y,supportsExceedsLimitStatistics:i(t,"supportsExceedsLimitStatistics",!1),supportsAsyncConvert3D:i(t,"supportsAsyncConvert3D",!1)}}function g(e,t){const r=e.advancedQueryCapabilities,a=e.ownershipBasedAccessControlForFeatures,l=e.archivingInfo,y=e.currentVersion,d=t?.includes("MapServer"),c=!d||y>=(0,s.A)("mapserver-pbf-version-support"),h=(0,o.Wo)(t),f=new Set((e.supportedQueryFormats??"").split(",").map((e=>e.toLowerCase().trim())));return{supportsStatistics:i(r,"supportsStatistics",e.supportsStatistics),supportsPercentileStatistics:i(r,"supportsPercentileStatistics",!1),supportsSpatialAggregationStatistics:i(r,"supportsSpatialAggregationStatistics",!1),supportedSpatialAggregationStatistics:p(r),supportsCentroid:i(r,"supportsReturningGeometryCentroid",!1),supportsDistance:i(r,"supportsQueryWithDistance",!1),supportsDistinct:i(r,"supportsDistinct",e.supportsAdvancedQueries),supportsExtent:i(r,"supportsReturningQueryExtent",!1),supportsGeometryProperties:i(r,"supportsReturningGeometryProperties",!1),supportsHavingClause:i(r,"supportsHavingClause",!1),supportsOrderBy:i(r,"supportsOrderBy",e.supportsAdvancedQueries),supportsPagination:i(r,"supportsPagination",!1),supportsQuantization:i(e,"supportsCoordinatesQuantization",!1),supportsQuantizationEditMode:i(e,"supportsQuantizationEditMode",!1),supportsQueryGeometry:i(e,"supportsReturningQueryGeometry",!1),supportsResultType:i(r,"supportsQueryWithResultType",!1),supportsMaxRecordCountFactor:i(r,"supportsMaxRecordCountFactor",!1),supportsSqlExpression:i(r,"supportsSqlExpression",!1),supportsStandardizedQueriesOnly:i(e,"useStandardizedQueries",!1),supportsTopFeaturesQuery:i(r,"supportsTopFeaturesQuery",!1),supportsQueryByAnonymous:i(a,"allowAnonymousToQuery",!0),supportsQueryByOthers:i(a,"allowOthersToQuery",!0),supportsHistoricMoment:i(l,"supportsQueryWithHistoricMoment",!1),supportsFormatPBF:c&&f.has("pbf"),supportsDisjointSpatialRelationship:i(r,"supportsDisjointSpatialRel",!1),supportsCacheHint:i(r,"supportsQueryWithCacheHint",!1)||u(r,"query"),supportsDefaultSpatialReference:i(r,"supportsDefaultSR",!1),supportsCompactGeometry:h,supportsFullTextSearch:i(r,"supportsFullTextSearch",!1),maxRecordCountFactor:n(e,"maxRecordCountFactor",void 0),maxRecordCount:n(e,"maxRecordCount",void 0),standardMaxRecordCount:n(e,"standardMaxRecordCount",void 0),tileMaxRecordCount:n(e,"tileMaxRecordCount",void 0)}}function v(e){const t=e.advancedQueryCapabilities,r=i(t,"supportsAdvancedQueryRelated",!1);return{supportsPagination:i(t,"supportsQueryRelatedPagination",!1),supportsCount:r,supportsOrderBy:r,supportsCacheHint:u(t,"queryRelated")}}function b(e){return{supportsCacheHint:u(e.advancedQueryCapabilities,"queryTopFilter")}}function _(e){const t=e.ownershipBasedAccessControlForFeatures,r=e?e.advancedEditingCapabilities:void 0;return{supportsGeometryUpdate:i(e,"allowGeometryUpdates",!0),supportsGlobalId:i(e,"supportsApplyEditsWithGlobalIds",!1),supportsReturnServiceEditsInSourceSpatialReference:i(e,"supportsReturnServiceEditsInSourceSR",!1),supportsRollbackOnFailure:i(e,"supportsRollbackOnFailureParameter",!1),supportsUpdateWithoutM:i(e,"allowUpdateWithoutMValues",!1),supportsUploadWithItemId:i(e,"supportsAttachmentsByUploadId",!1),supportsDeleteByAnonymous:i(t,"allowAnonymousToDelete",!0),supportsDeleteByOthers:i(t,"allowOthersToDelete",!0),supportsUpdateByAnonymous:i(t,"allowAnonymousToUpdate",!0),supportsUpdateByOthers:i(t,"allowOthersToUpdate",!0),supportsAsyncApplyEdits:i(r,"supportsAsyncApplyEdits",!1),zDefault:n(e,"zDefault",void 0)}}function S(e){return{operations:{supportsAppend:i(e,"supportsAppend",!1),supportsExportClip:i(e,"supportsExportClip",!1),supportsExportFrameset:i(e,"supportsExportFrameset",!1),supportsMensuration:i(e,"supportsMensuration",!1),supportsUpdate:i(e,"supportsUpdate",!1)},query:{supportsCoverageQuery:e?.playbackInfo?.klv["0601"]??!1}}}},58501:(e,t,r)=>{r.d(t,{q:()=>o});var s=r(62815);function o(e,t,r){if(!r?.features||!r.hasZ)return;const o=(0,s.N)(r.geometryType,t,e.outSpatialReference);if(null!=o)for(const e of r.features)o(e.geometry)}},22671:(e,t,r)=>{r.d(t,{A:()=>b});var s,o=r(90237),i=r(59456),n=r(52106),a=r(66552),l=r(25482),p=r(4718),u=r(10107),y=(r(44208),r(53966),r(36005)),d=r(40608),c=r(43937),h=r(16930),f=r(65864),m=r(20437);const g=new a.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=s=class extends l.oY{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=h.A.fromJSON(t.spatialReference),s=[];for(let t=0;t<e.length;t++){const o=e[t],i=n.A.fromJSON(o),a=o.geometry?.spatialReference;null==i.geometry||a||(i.geometry.spatialReference=r);const l=o.aggregateGeometries,p=i.aggregateGeometries;if(l&&null!=p)for(const e in p){const t=p[e],s=l[e],o=s?.spatialReference;null==t||o||(t.spatialReference=r)}s.push(i)}return s}writeGeometryType(e,t,r,s){if(e)return void g.write(e,t,r,s);const{features:o}=this;if(o)for(const e of o)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,s)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,s=(0,f.rS)(e);return s&&!r&&t.spatialReference&&(s.spatialReference=h.A.fromJSON(t.spatialReference)),s}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new s(this.cloneProperties())}cloneProperties(){return(0,p.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const s=t.features[r];if(s.geometry){const t=e?.[r];s.geometry=t?.toJSON()||s.geometry}}return t}quantize(e){const{scale:[t,r],translate:[s,o]}=e,i=this.features,n=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-s)/t)),(e=>Math.round((o-e)/r)));for(let e=0,t=i.length;e<t;e++)n?.(i[e].geometry)||(i.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[s,o],scale:[i,n]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const p=this._getHydrationFunction(e,(e=>e*i+s),(e=>o-e*n),a,l);for(const{geometry:e}of t)null!=e&&p&&p(e);return this.transform=null,this}_quantizePoints(e,t,r){let s,o;const i=[];for(let n=0,a=e.length;n<a;n++){const a=e[n];if(n>0){const e=t(a[0]),n=r(a[1]);e===s&&n===o||(i.push([e-s,n-o]),s=e,o=n)}else s=t(a[0]),o=r(a[1]),i.push([s,o])}return i.length>0?i:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const s=(0,f.Bi)(e)?e.rings:e.paths,o=[];for(let e=0,i=s.length;e<i;e++){const i=s[e],n=this._quantizePoints(i,t,r);n&&o.push(n)}return o.length>0?((0,f.Bi)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{const s=this._quantizePoints(e.points,t,r);return s&&s.length>0?(e.points=s,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,s,o){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),s&&(e.z=s(e.z))}:"polyline"===e||"polygon"===e?e=>{const i=(0,f.Bi)(e)?e.rings:e.paths;let n,a;for(let e=0,s=i.length;e<s;e++){const s=i[e];for(let e=0,o=s.length;e<o;e++){const o=s[e];e>0?(n+=o[0],a+=o[1]):(n=o[0],a=o[1]),o[0]=t(n),o[1]=r(a)}}if(s&&o)for(let e=0,t=i.length;e<t;e++){const t=i[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2]),r[3]=o(r[3])}}else if(s)for(let e=0,t=i.length;e<t;e++){const t=i[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2])}}else if(o)for(let e=0,t=i.length;e<t;e++){const t=i[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=o(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),s&&null!=e.zmax&&null!=e.zmin&&(e.zmax=s(e.zmax),e.zmin=s(e.zmin)),o&&null!=e.mmax&&null!=e.mmin&&(e.mmax=o(e.mmax),e.mmin=o(e.mmin))}:"multipoint"===e?e=>{const i=e.points;let n,a;for(let e=0,s=i.length;e<s;e++){const s=i[e];e>0?(n+=s[0],a+=s[1]):(n=s[0],a=s[1]),s[0]=t(n),s[1]=r(a)}if(s&&o)for(let e=0,t=i.length;e<t;e++){const t=i[e];t[2]=s(t[2]),t[3]=o(t[3])}else if(s)for(let e=0,t=i.length;e<t;e++){const t=i[e];t[2]=s(t[2])}else if(o)for(let e=0,t=i.length;e<t;e++){const t=i[e];t[2]=o(t[2])}}:null}};(0,o._)([(0,u.MZ)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,o._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,o._)([(0,u.MZ)({type:[n.A],json:{write:!0}})],v.prototype,"features",void 0),(0,o._)([(0,y.w)("features")],v.prototype,"readFeatures",null),(0,o._)([(0,u.MZ)({type:[m.A],json:{write:!0}})],v.prototype,"fields",void 0),(0,o._)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],v.prototype,"geometryType",void 0),(0,o._)([(0,c.K)("geometryType")],v.prototype,"writeGeometryType",null),(0,o._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,o._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,o._)([(0,u.MZ)({types:i.yR,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,o._)([(0,y.w)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,o._)([(0,u.MZ)({type:h.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,o._)([(0,c.K)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,o._)([(0,u.MZ)({json:{write:!0}})],v.prototype,"transform",void 0),v=s=(0,o._)([(0,d.$)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0;const b=v}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3761],{43334:(e,t,s)=>{s.d(t,{N3:()=>o,Om:()=>r});class r{constructor(e=null,t={},s,r){this.geometry=e,this.attributes=t,this.centroid=s,this.objectId=r,this.displayId=0,this.geohashX=0,this.geohashY=0}weakClone(){const e=new r(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e.geohashX=this.geohashX,e.geohashY=this.geohashY,e}clone(){const e=this.geometry?.clone(),t=new r(e,{...this.attributes},this.centroid?.clone(),this.objectId);return t.displayId=this.displayId,t.geohashX=this.geohashX,t.geohashY=this.geohashY,t}}function o(e){return!!e.geometry?.coords?.length}},58512:(e,t,s)=>{s.d(t,{A:()=>r});class r{constructor(){this.objectIdFieldName=null,this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){const e=new r;return e.objectIdFieldName=this.objectIdFieldName,e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}},92722:(e,t,s)=>{s.d(t,{A:()=>r});class r{constructor(e=[],t=[],s=!1){this.lengths=e??[],this.coords=t??[],this.hasIndeterminateRingOrder=s}static fromRect(e){const[t,s,o,n]=e,i=o-t,a=n-s;return new r([5],[t,s,i,0,0,a,-i,0,0,-a])}get isPoint(){return 0===this.lengths.length}get maxLength(){return Math.max(...this.lengths)}get size(){return this.lengths.reduce(((e,t)=>e+t))}forEachVertex(e){let t=0;this.lengths.length||e(this.coords[0],this.coords[1]);for(let s=0;s<this.lengths.length;s++){const r=this.lengths[s];for(let s=0;s<r;s++)e(this.coords[2*(s+t)],this.coords[2*(s+t)+1]);t+=r}}deltaDecode(){const e=this.clone(),{coords:t,lengths:s}=e;let r=0;for(const e of s){for(let s=1;s<e;s++)t[2*(r+s)]+=t[2*(r+s)-2],t[2*(r+s)+1]+=t[2*(r+s)-1];r+=e}return e}clone(e){if(0===this.lengths.length)return new r([],[this.coords[0],this.coords[1]]);const t=2*(0===this.lengths.length?1:this.lengths.reduce(((e,t)=>e+t))),s=this.coords.slice(0,t);return e?(e.set(s),new r(this.lengths,e,this.hasIndeterminateRingOrder)):new r(Array.from(this.lengths),Array.from(s),this.hasIndeterminateRingOrder)}}},30624:(e,t,s)=>{s.r(t),s.d(t,{createConnection:()=>N});var r=s(90237),o=(s(59456),s(78888)),n=s(49186),i=s(53966),a=s(74887),c=s(84952),h=(s(44208),s(87811),s(40608)),l=s(10107),u=s(62815),d=s(65529);let g=class extends d.A.EventedAccessor{destroy(){this.emit("destroy")}get connectionError(){return this.errorString?new n.A("stream-connection",this.errorString):null}onFeature(e){this.emit("data-received",e)}onMessage(e){this.emit("message-received",e)}};(0,r._)([(0,l.MZ)({readOnly:!0})],g.prototype,"connectionError",null),g=(0,r._)([(0,h.$)("esri.layers.support.StreamConnection")],g);const f=g;var y,m;(m=y||(y={}))[m.CONNECTING=0]="CONNECTING",m[m.OPEN=1]="OPEN",m[m.CLOSING=2]="CLOSING",m[m.CLOSED=3]="CLOSED";let p=class extends f{constructor(e){super({}),this._outstandingMessages=[],this.errorString=null;const{geometryType:t,spatialReference:s,sourceSpatialReference:r}=e;this._config=e,this._featureZScaler=(0,u.N)(t,r,s),this._open()}normalizeCtorArgs(){return{}}async _open(){await this._tryCreateWebSocket(),this.destroyed||await this._handshake()}destroy(){super.destroy(),null!=this._websocket&&(this._websocket.onopen=null,this._websocket.onclose=null,this._websocket.onerror=null,this._websocket.onmessage=null,this._websocket.close()),this._websocket=null}get connectionStatus(){if(null==this._websocket)return"disconnected";switch(this._websocket.readyState){case y.CONNECTING:case y.OPEN:return"connected";case y.CLOSING:case y.CLOSED:return"disconnected"}}sendMessageToSocket(e){null!=this._websocket?this._websocket.send(JSON.stringify(e)):this._outstandingMessages.push(e)}sendMessageToClient(e){this._onMessage(e)}updateCustomParameters(e){this._config.customParameters=e,null!=this._websocket&&this._websocket.close()}async _tryCreateWebSocket(e=this._config.source.path,t=1e3,s=0){try{if(this.destroyed)return;const t=(0,c.a6)(e,this._config.customParameters??{});this._websocket=await this._createWebSocket(t),this.notifyChange("connectionStatus")}catch(r){const o=t/1e3;return this._config.maxReconnectionAttempts&&s>=this._config.maxReconnectionAttempts?(i.A.getLogger(this).error(new n.A("websocket-connection","Exceeded maxReconnectionAttempts attempts. No further attempts will be made")),void this.destroy()):(i.A.getLogger(this).error(new n.A("websocket-connection",`Failed to connect. Attempting to reconnect in ${o}s`,r)),await(0,a.Pl)(t),this._tryCreateWebSocket(e,Math.min(1.5*t,1e3*this._config.maxReconnectionInterval),s+1))}}_setWebSocketJSONParseHandler(e){e.onmessage=e=>{try{const t=JSON.parse(e.data);this._onMessage(t)}catch(e){return void i.A.getLogger(this).error(new n.A("websocket-connection","Failed to parse message, invalid JSON",{error:e}))}}}_createWebSocket(e){return new Promise(((t,s)=>{const r=new WebSocket(e);r.onopen=()=>{if(r.onopen=null,this.destroyed)return r.onclose=null,void r.close();r.onclose=e=>this._onClose(e),r.onerror=e=>this._onError(e),this._setWebSocketJSONParseHandler(r),t(r)},r.onclose=e=>{r.onopen=r.onclose=null,s(e)}}))}async _handshake(e=1e4){const t=this._websocket;if(null==t)return;const s=(0,a.Tw)(),r=t.onmessage,{filter:o,outFields:c,spatialReference:h}=this._config;return s.timeout(e),t.onmessage=e=>{let a=null;try{a=JSON.parse(e.data)}catch(e){}a&&"object"==typeof a||(i.A.getLogger(this).error(new n.A("websocket-connection","Protocol violation. Handshake failed - malformed message",e.data)),s.reject(),this.destroy()),a.spatialReference?.wkid!==h?.wkid&&(i.A.getLogger(this).error(new n.A("websocket-connection",`Protocol violation. Handshake failed - expected wkid of ${h.wkid}`,e.data)),s.reject(),this.destroy()),"json"!==a.format&&(i.A.getLogger(this).error(new n.A("websocket-connection","Protocol violation. Handshake failed - format is not set",e.data)),s.reject(),this.destroy()),o&&a.filter!==o&&i.A.getLogger(this).error(new n.A("websocket-connection","Tried to set filter, but server doesn't support it")),c&&a.outFields!==c&&i.A.getLogger(this).error(new n.A("websocket-connection","Tried to set outFields, but server doesn't support it")),t.onmessage=r;for(const e of this._outstandingMessages)t.send(JSON.stringify(e));this._outstandingMessages=[],s.resolve()},t.send(JSON.stringify({filter:o,outFields:c,format:"json",spatialReference:{wkid:h.wkid}})),s.promise}_onMessage(e){if(this.onMessage(e),"type"in e)switch(e.type){case"features":case"featureResult":for(const t of e.features)null!=this._featureZScaler&&this._featureZScaler(t.geometry),this.onFeature(t)}}_onError(e){const t="Encountered an error over WebSocket connection";this._set("errorString",t),i.A.getLogger(this).error("websocket-connection",t)}_onClose(e){this._websocket=null,this.notifyChange("connectionStatus"),1e3!==e.code&&i.A.getLogger(this).error("websocket-connection",`WebSocket closed unexpectedly with error code ${e.code}`),this.destroyed||this._open()}};(0,r._)([(0,l.MZ)()],p.prototype,"connectionStatus",null),(0,r._)([(0,l.MZ)()],p.prototype,"errorString",void 0),p=(0,r._)([(0,h.$)("esri.layers.graphics.sources.connections.WebSocketConnection")],p);var _=s(80893),w=s(61956),b=s(65864),S=s(16930);const k={maxQueryDepth:5,maxRecordCountFactor:3};let v=class extends p{constructor(e){super({...k,...e}),this._buddyServicesQuery=null,this._relatedFeatures=null}async _open(){const e=await this._fetchServiceDefinition(this._config.source);e.timeInfo.trackIdField||i.A.getLogger(this).warn("GeoEvent service was configured without a TrackIdField. This may result in certain functionality being disabled. The purgeOptions.maxObservations property will have no effect.");const t=this._fetchWebSocketUrl(e.streamUrls,this._config.spatialReference);this._buddyServicesQuery||(this._buddyServicesQuery=this._queryBuddyServices()),await this._buddyServicesQuery,await this._tryCreateWebSocket(t);const{filter:s,outFields:r}=this._config;this.destroyed||this._setFilter(s,r)}_onMessage(e){if("attributes"in e){let t;try{t=this._enrich(e),null!=this._featureZScaler&&this._featureZScaler(t.geometry)}catch(e){return void i.A.getLogger(this).error(new n.A("geoevent-connection","Failed to parse message",e))}this.onFeature(t)}else this.onMessage(e)}async _fetchServiceDefinition(e){const t={f:"json",...this._config.customParameters},s=(0,o.A)(e.path,{query:t,responseType:"json"}),r=(await s).data;return this._serviceDefinition=r,r}_fetchWebSocketUrl(e,t){const s=e[0],{urls:r,token:o}=s,n=this._inferWebSocketBaseUrl(r);return(0,c.a6)(`${n}/subscribe`,{outSR:""+t.wkid,token:o})}_inferWebSocketBaseUrl(e){if(1===e.length)return e[0];for(const t of e)if(t.includes("wss"))return t;return i.A.getLogger(this).error(new n.A("geoevent-connection","Unable to infer WebSocket url",e)),null}async _setFilter(e,t){const s=this._websocket;if(null==s||null==e&&null==t)return;const r=JSON.stringify({filter:this._serializeFilter(e,t)});let o=!1;const c=(0,a.Tw)();return s.onmessage=e=>{const t=JSON.parse(e.data);t.filter&&(t.error&&(i.A.getLogger(this).error(new n.A("geoevent-connection","Failed to set service filter",t.error)),this._set("errorString",`Could not set service filter - ${t.error}`),c.reject(t.error)),this._setWebSocketJSONParseHandler(s),o=!0,c.resolve())},s.send(r),setTimeout((()=>{o||(this.destroyed||this._websocket!==s||i.A.getLogger(this).error(new n.A("geoevent-connection","Server timed out when setting filter")),c.reject())}),1e4),c.promise}_serializeFilter(e,t){const s={};if(null==e&&null==t)return s;if(e?.geometry)try{const t=(0,b.rS)(e.geometry);if("extent"!==t.type)throw new n.A(`Expected extent but found type ${t.type}`);s.geometry=JSON.stringify(t.shiftCentralMeridian())}catch(e){i.A.getLogger(this).error(new n.A("geoevent-connection","Encountered an error when setting connection geometryDefinition",e))}return e?.where&&"1 = 1"!==e.where&&"1=1"!==e.where&&(s.where=e.where),null!=t&&(s.outFields=t.join(",")),s}_enrich(e){if(!this._relatedFeatures)return e;const t=this._serviceDefinition.relatedFeatures.joinField,s=e.attributes[t],r=this._relatedFeatures.get(s);if(!r)return i.A.getLogger(this).warn("geoevent-connection","Feature join failed. Is the join field configured correctly?",e),e;const{attributes:o,geometry:a}=r;for(const t in o)e.attributes[t]=o[t];return a&&(e.geometry=a),e.geometry||e.centroid||i.A.getLogger(this).error(new n.A("geoevent-connection","Found malformed feature - no geometry found",e)),e}async _queryBuddyServices(){try{const{relatedFeatures:e,keepLatestArchive:t}=this._serviceDefinition,s=this._queryRelatedFeatures(e),r=this._queryArchive(t);await s;const o=await r;if(!o)return;for(const e of o.features)this.onFeature(this._enrich(e))}catch(e){i.A.getLogger(this).error(new n.A("geoevent-connection","Encountered an error when querying buddy services",{error:e}))}}async _queryRelatedFeatures(e){if(!e)return;const t=await this._queryBuddy(e.featuresUrl);this._addRelatedFeatures(t)}async _queryArchive(e){if(e)return this._queryBuddy(e.featuresUrl)}async _queryBuddy(e){const t=new((await Promise.all([s.e(3161),s.e(3359),s.e(1147),s.e(1132),s.e(5494),s.e(8951),s.e(9040),s.e(5516),s.e(3600),s.e(1185)]).then(s.bind(s,13600))).default)({url:e}),{capabilities:r}=await t.load(),o=r.query.supportsMaxRecordCountFactor,n=r.query.supportsPagination,i=r.query.supportsCentroid,a=this._config.maxRecordCountFactor,c=t.capabilities.query.maxRecordCount,h=o?c*a:c,l=new w.A;if(l.outFields=this._config.outFields??["*"],l.where=this._config.filter?.where??"1=1",l.returnGeometry=!0,l.returnExceededLimitFeatures=!0,l.outSpatialReference=S.A.fromJSON(this._config.spatialReference),i&&(l.returnCentroid=!0),o&&(l.maxRecordCountFactor=a),n)return l.num=h,t.destroy(),this._queryPages(e,l);const u=await(0,_.eW)(e,l,this._config.sourceSpatialReference);return t.destroy(),u.data}async _queryPages(e,t,s=[],r=0){t.start=null!=t.num?r*t.num:null;const{data:o}=await(0,_.eW)(e,t,this._config.sourceSpatialReference);return o.exceededTransferLimit&&r<(this._config.maxQueryDepth??0)?(o.features.forEach((e=>s.push(e))),this._queryPages(e,t,s,r+1)):(s.forEach((e=>o.features.push(e))),o)}_addRelatedFeatures(e){const t=new Map,s=e.features,r=this._serviceDefinition.relatedFeatures.joinField;for(const e of s){const s=e.attributes[r];t.set(s,e)}this._relatedFeatures=t}};v=(0,r._)([(0,h.$)("esri.layers.graphics.sources.connections.GeoEventConnection")],v);const A=v;let F=class extends f{constructor(e){super({}),this.connectionStatus="connected",this.errorString=null;const{geometryType:t,spatialReference:s,sourceSpatialReference:r}=e;this._featureZScaler=(0,u.N)(t,r,s)}normalizeCtorArgs(){return{}}updateCustomParameters(e){}sendMessageToSocket(e){}sendMessageToClient(e){if("type"in e)switch(e.type){case"features":case"featureResult":for(const t of e.features)null!=this._featureZScaler&&this._featureZScaler(t.geometry),this.onFeature(t)}this.onMessage(e)}};function C(e,t){if(null==e&&null==t)return null;const s={};return null!=t&&(s.geometry=t),null!=e&&(s.where=e),s}function N(e,t,s,r,o,n,i,a,c){const h={source:e,sourceSpatialReference:t,spatialReference:s,geometryType:r,filter:C(o,n),maxReconnectionAttempts:i,maxReconnectionInterval:a,customParameters:c};return e?e.path.startsWith("wss://")||e.path.startsWith("ws://")?new p(h):new A(h):new F(h)}(0,r._)([(0,l.MZ)()],F.prototype,"connectionStatus",void 0),(0,r._)([(0,l.MZ)()],F.prototype,"errorString",void 0),F=(0,r._)([(0,h.$)("esri.layers.support.ClientSideConnection")],F)},58501:(e,t,s)=>{s.d(t,{q:()=>o});var r=s(62815);function o(e,t,s){if(!s?.features||!s.hasZ)return;const o=(0,r.N)(s.geometryType,t,e.outSpatialReference);if(null!=o)for(const e of s.features)o(e.geometry)}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3761],{43334:(e,t,s)=>{s.d(t,{N3:()=>o,Om:()=>r});class r{constructor(e=null,t={},s,r){this.geometry=e,this.attributes=t,this.centroid=s,this.objectId=r,this.displayId=0,this.geohashX=0,this.geohashY=0}weakClone(){const e=new r(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e.geohashX=this.geohashX,e.geohashY=this.geohashY,e}clone(){const e=this.geometry?.clone(),t=new r(e,{...this.attributes},this.centroid?.clone(),this.objectId);return t.displayId=this.displayId,t.geohashX=this.geohashX,t.geohashY=this.geohashY,t}}function o(e){return!!e.geometry?.coords?.length}},58512:(e,t,s)=>{s.d(t,{A:()=>r});class r{constructor(){this.objectIdFieldName=null,this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){const e=new r;return e.objectIdFieldName=this.objectIdFieldName,e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}},92722:(e,t,s)=>{s.d(t,{A:()=>r});class r{constructor(e=[],t=[],s=!1){this.lengths=e??[],this.coords=t??[],this.hasIndeterminateRingOrder=s}static fromRect(e){const[t,s,o,n]=e,i=o-t,a=n-s;return new r([5],[t,s,i,0,0,a,-i,0,0,-a])}get isPoint(){return 0===this.lengths.length}get maxLength(){return Math.max(...this.lengths)}get size(){return this.lengths.reduce(((e,t)=>e+t))}forEachVertex(e){let t=0;this.lengths.length||e(this.coords[0],this.coords[1]);for(let s=0;s<this.lengths.length;s++){const r=this.lengths[s];for(let s=0;s<r;s++)e(this.coords[2*(s+t)],this.coords[2*(s+t)+1]);t+=r}}deltaDecode(){const e=this.clone(),{coords:t,lengths:s}=e;let r=0;for(const e of s){for(let s=1;s<e;s++)t[2*(r+s)]+=t[2*(r+s)-2],t[2*(r+s)+1]+=t[2*(r+s)-1];r+=e}return e}clone(e){if(0===this.lengths.length)return new r([],[this.coords[0],this.coords[1]]);const t=2*(0===this.lengths.length?1:this.lengths.reduce(((e,t)=>e+t))),s=this.coords.slice(0,t);return e?(e.set(s),new r(this.lengths,e,this.hasIndeterminateRingOrder)):new r(Array.from(this.lengths),Array.from(s),this.hasIndeterminateRingOrder)}}},30624:(e,t,s)=>{s.r(t),s.d(t,{createConnection:()=>N});var r=s(90237),o=(s(59456),s(78888)),n=s(49186),i=s(53966),a=s(74887),c=s(84952),h=(s(44208),s(87811),s(40608)),l=s(10107),u=s(62815),d=s(65529);let g=class extends d.A.EventedAccessor{destroy(){this.emit("destroy")}get connectionError(){return this.errorString?new n.A("stream-connection",this.errorString):null}onFeature(e){this.emit("data-received",e)}onMessage(e){this.emit("message-received",e)}};(0,r._)([(0,l.MZ)({readOnly:!0})],g.prototype,"connectionError",null),g=(0,r._)([(0,h.$)("esri.layers.support.StreamConnection")],g);const f=g;var y,m;(m=y||(y={}))[m.CONNECTING=0]="CONNECTING",m[m.OPEN=1]="OPEN",m[m.CLOSING=2]="CLOSING",m[m.CLOSED=3]="CLOSED";let p=class extends f{constructor(e){super({}),this._outstandingMessages=[],this.errorString=null;const{geometryType:t,spatialReference:s,sourceSpatialReference:r}=e;this._config=e,this._featureZScaler=(0,u.N)(t,r,s),this._open()}normalizeCtorArgs(){return{}}async _open(){await this._tryCreateWebSocket(),this.destroyed||await this._handshake()}destroy(){super.destroy(),null!=this._websocket&&(this._websocket.onopen=null,this._websocket.onclose=null,this._websocket.onerror=null,this._websocket.onmessage=null,this._websocket.close()),this._websocket=null}get connectionStatus(){if(null==this._websocket)return"disconnected";switch(this._websocket.readyState){case y.CONNECTING:case y.OPEN:return"connected";case y.CLOSING:case y.CLOSED:return"disconnected"}}sendMessageToSocket(e){null!=this._websocket?this._websocket.send(JSON.stringify(e)):this._outstandingMessages.push(e)}sendMessageToClient(e){this._onMessage(e)}updateCustomParameters(e){this._config.customParameters=e,null!=this._websocket&&this._websocket.close()}async _tryCreateWebSocket(e=this._config.source.path,t=1e3,s=0){try{if(this.destroyed)return;const t=(0,c.a6)(e,this._config.customParameters??{});this._websocket=await this._createWebSocket(t),this.notifyChange("connectionStatus")}catch(r){const o=t/1e3;return this._config.maxReconnectionAttempts&&s>=this._config.maxReconnectionAttempts?(i.A.getLogger(this).error(new n.A("websocket-connection","Exceeded maxReconnectionAttempts attempts. No further attempts will be made")),void this.destroy()):(i.A.getLogger(this).error(new n.A("websocket-connection",`Failed to connect. Attempting to reconnect in ${o}s`,r)),await(0,a.Pl)(t),this._tryCreateWebSocket(e,Math.min(1.5*t,1e3*this._config.maxReconnectionInterval),s+1))}}_setWebSocketJSONParseHandler(e){e.onmessage=e=>{try{const t=JSON.parse(e.data);this._onMessage(t)}catch(e){return void i.A.getLogger(this).error(new n.A("websocket-connection","Failed to parse message, invalid JSON",{error:e}))}}}_createWebSocket(e){return new Promise(((t,s)=>{const r=new WebSocket(e);r.onopen=()=>{if(r.onopen=null,this.destroyed)return r.onclose=null,void r.close();r.onclose=e=>this._onClose(e),r.onerror=e=>this._onError(e),this._setWebSocketJSONParseHandler(r),t(r)},r.onclose=e=>{r.onopen=r.onclose=null,s(e)}}))}async _handshake(e=1e4){const t=this._websocket;if(null==t)return;const s=(0,a.Tw)(),r=t.onmessage,{filter:o,outFields:c,spatialReference:h}=this._config;return s.timeout(e),t.onmessage=e=>{let a=null;try{a=JSON.parse(e.data)}catch(e){}a&&"object"==typeof a||(i.A.getLogger(this).error(new n.A("websocket-connection","Protocol violation. Handshake failed - malformed message",e.data)),s.reject(),this.destroy()),a.spatialReference?.wkid!==h?.wkid&&(i.A.getLogger(this).error(new n.A("websocket-connection",`Protocol violation. Handshake failed - expected wkid of ${h.wkid}`,e.data)),s.reject(),this.destroy()),"json"!==a.format&&(i.A.getLogger(this).error(new n.A("websocket-connection","Protocol violation. Handshake failed - format is not set",e.data)),s.reject(),this.destroy()),o&&a.filter!==o&&i.A.getLogger(this).error(new n.A("websocket-connection","Tried to set filter, but server doesn't support it")),c&&a.outFields!==c&&i.A.getLogger(this).error(new n.A("websocket-connection","Tried to set outFields, but server doesn't support it")),t.onmessage=r;for(const e of this._outstandingMessages)t.send(JSON.stringify(e));this._outstandingMessages=[],s.resolve()},t.send(JSON.stringify({filter:o,outFields:c,format:"json",spatialReference:{wkid:h.wkid}})),s.promise}_onMessage(e){if(this.onMessage(e),"type"in e)switch(e.type){case"features":case"featureResult":for(const t of e.features)null!=this._featureZScaler&&this._featureZScaler(t.geometry),this.onFeature(t)}}_onError(e){const t="Encountered an error over WebSocket connection";this._set("errorString",t),i.A.getLogger(this).error("websocket-connection",t)}_onClose(e){this._websocket=null,this.notifyChange("connectionStatus"),1e3!==e.code&&i.A.getLogger(this).error("websocket-connection",`WebSocket closed unexpectedly with error code ${e.code}`),this.destroyed||this._open()}};(0,r._)([(0,l.MZ)()],p.prototype,"connectionStatus",null),(0,r._)([(0,l.MZ)()],p.prototype,"errorString",void 0),p=(0,r._)([(0,h.$)("esri.layers.graphics.sources.connections.WebSocketConnection")],p);var _=s(80893),w=s(61956),b=s(65864),S=s(16930);const k={maxQueryDepth:5,maxRecordCountFactor:3};let v=class extends p{constructor(e){super({...k,...e}),this._buddyServicesQuery=null,this._relatedFeatures=null}async _open(){const e=await this._fetchServiceDefinition(this._config.source);e.timeInfo.trackIdField||i.A.getLogger(this).warn("GeoEvent service was configured without a TrackIdField. This may result in certain functionality being disabled. The purgeOptions.maxObservations property will have no effect.");const t=this._fetchWebSocketUrl(e.streamUrls,this._config.spatialReference);this._buddyServicesQuery||(this._buddyServicesQuery=this._queryBuddyServices()),await this._buddyServicesQuery,await this._tryCreateWebSocket(t);const{filter:s,outFields:r}=this._config;this.destroyed||this._setFilter(s,r)}_onMessage(e){if("attributes"in e){let t;try{t=this._enrich(e),null!=this._featureZScaler&&this._featureZScaler(t.geometry)}catch(e){return void i.A.getLogger(this).error(new n.A("geoevent-connection","Failed to parse message",e))}this.onFeature(t)}else this.onMessage(e)}async _fetchServiceDefinition(e){const t={f:"json",...this._config.customParameters},s=(0,o.A)(e.path,{query:t,responseType:"json"}),r=(await s).data;return this._serviceDefinition=r,r}_fetchWebSocketUrl(e,t){const s=e[0],{urls:r,token:o}=s,n=this._inferWebSocketBaseUrl(r);return(0,c.a6)(`${n}/subscribe`,{outSR:""+t.wkid,token:o})}_inferWebSocketBaseUrl(e){if(1===e.length)return e[0];for(const t of e)if(t.includes("wss"))return t;return i.A.getLogger(this).error(new n.A("geoevent-connection","Unable to infer WebSocket url",e)),null}async _setFilter(e,t){const s=this._websocket;if(null==s||null==e&&null==t)return;const r=JSON.stringify({filter:this._serializeFilter(e,t)});let o=!1;const c=(0,a.Tw)();return s.onmessage=e=>{const t=JSON.parse(e.data);t.filter&&(t.error&&(i.A.getLogger(this).error(new n.A("geoevent-connection","Failed to set service filter",t.error)),this._set("errorString",`Could not set service filter - ${t.error}`),c.reject(t.error)),this._setWebSocketJSONParseHandler(s),o=!0,c.resolve())},s.send(r),setTimeout((()=>{o||(this.destroyed||this._websocket!==s||i.A.getLogger(this).error(new n.A("geoevent-connection","Server timed out when setting filter")),c.reject())}),1e4),c.promise}_serializeFilter(e,t){const s={};if(null==e&&null==t)return s;if(e?.geometry)try{const t=(0,b.rS)(e.geometry);if("extent"!==t.type)throw new n.A(`Expected extent but found type ${t.type}`);s.geometry=JSON.stringify(t.shiftCentralMeridian())}catch(e){i.A.getLogger(this).error(new n.A("geoevent-connection","Encountered an error when setting connection geometryDefinition",e))}return e?.where&&"1 = 1"!==e.where&&"1=1"!==e.where&&(s.where=e.where),null!=t&&(s.outFields=t.join(",")),s}_enrich(e){if(!this._relatedFeatures)return e;const t=this._serviceDefinition.relatedFeatures.joinField,s=e.attributes[t],r=this._relatedFeatures.get(s);if(!r)return i.A.getLogger(this).warn("geoevent-connection","Feature join failed. Is the join field configured correctly?",e),e;const{attributes:o,geometry:a}=r;for(const t in o)e.attributes[t]=o[t];return a&&(e.geometry=a),e.geometry||e.centroid||i.A.getLogger(this).error(new n.A("geoevent-connection","Found malformed feature - no geometry found",e)),e}async _queryBuddyServices(){try{const{relatedFeatures:e,keepLatestArchive:t}=this._serviceDefinition,s=this._queryRelatedFeatures(e),r=this._queryArchive(t);await s;const o=await r;if(!o)return;for(const e of o.features)this.onFeature(this._enrich(e))}catch(e){i.A.getLogger(this).error(new n.A("geoevent-connection","Encountered an error when querying buddy services",{error:e}))}}async _queryRelatedFeatures(e){if(!e)return;const t=await this._queryBuddy(e.featuresUrl);this._addRelatedFeatures(t)}async _queryArchive(e){if(e)return this._queryBuddy(e.featuresUrl)}async _queryBuddy(e){const t=new((await Promise.all([s.e(3161),s.e(3359),s.e(1147),s.e(1132),s.e(5494),s.e(6240),s.e(9040),s.e(2777),s.e(5516),s.e(3600),s.e(806)]).then(s.bind(s,13600))).default)({url:e}),{capabilities:r}=await t.load(),o=r.query.supportsMaxRecordCountFactor,n=r.query.supportsPagination,i=r.query.supportsCentroid,a=this._config.maxRecordCountFactor,c=t.capabilities.query.maxRecordCount,h=o?c*a:c,l=new w.A;if(l.outFields=this._config.outFields??["*"],l.where=this._config.filter?.where??"1=1",l.returnGeometry=!0,l.returnExceededLimitFeatures=!0,l.outSpatialReference=S.A.fromJSON(this._config.spatialReference),i&&(l.returnCentroid=!0),o&&(l.maxRecordCountFactor=a),n)return l.num=h,t.destroy(),this._queryPages(e,l);const u=await(0,_.eW)(e,l,this._config.sourceSpatialReference);return t.destroy(),u.data}async _queryPages(e,t,s=[],r=0){t.start=null!=t.num?r*t.num:null;const{data:o}=await(0,_.eW)(e,t,this._config.sourceSpatialReference);return o.exceededTransferLimit&&r<(this._config.maxQueryDepth??0)?(o.features.forEach((e=>s.push(e))),this._queryPages(e,t,s,r+1)):(s.forEach((e=>o.features.push(e))),o)}_addRelatedFeatures(e){const t=new Map,s=e.features,r=this._serviceDefinition.relatedFeatures.joinField;for(const e of s){const s=e.attributes[r];t.set(s,e)}this._relatedFeatures=t}};v=(0,r._)([(0,h.$)("esri.layers.graphics.sources.connections.GeoEventConnection")],v);const A=v;let F=class extends f{constructor(e){super({}),this.connectionStatus="connected",this.errorString=null;const{geometryType:t,spatialReference:s,sourceSpatialReference:r}=e;this._featureZScaler=(0,u.N)(t,r,s)}normalizeCtorArgs(){return{}}updateCustomParameters(e){}sendMessageToSocket(e){}sendMessageToClient(e){if("type"in e)switch(e.type){case"features":case"featureResult":for(const t of e.features)null!=this._featureZScaler&&this._featureZScaler(t.geometry),this.onFeature(t)}this.onMessage(e)}};function C(e,t){if(null==e&&null==t)return null;const s={};return null!=t&&(s.geometry=t),null!=e&&(s.where=e),s}function N(e,t,s,r,o,n,i,a,c){const h={source:e,sourceSpatialReference:t,spatialReference:s,geometryType:r,filter:C(o,n),maxReconnectionAttempts:i,maxReconnectionInterval:a,customParameters:c};return e?e.path.startsWith("wss://")||e.path.startsWith("ws://")?new p(h):new A(h):new F(h)}(0,r._)([(0,l.MZ)()],F.prototype,"connectionStatus",void 0),(0,r._)([(0,l.MZ)()],F.prototype,"errorString",void 0),F=(0,r._)([(0,h.$)("esri.layers.support.ClientSideConnection")],F)},58501:(e,t,s)=>{s.d(t,{q:()=>o});var r=s(62815);function o(e,t,s){if(!s?.features||!s.hasZ)return;const o=(0,r.N)(s.geometryType,t,e.outSpatialReference);if(null!=o)for(const e of s.features)o(e.geometry)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6483,3069],{3330:(e,t,i)=>{i.d(t,{GB:()=>r,Qo:()=>l,Y4:()=>s});var n=i(96285);class r{}function s(e){return e instanceof n.bo?e===r.instance:"unknown"===e?.toString().toLowerCase()}function l(e){return s(e)?r.instance:e}r.instance=new n.oh("Etc/UTC")},13069:(e,t,i)=>{i.d(t,{lk:()=>r,vD:()=>l,yS:()=>s});const n="randomUUID"in crypto;function r(){if(n)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function s(){return`{${r().toUpperCase()}}`}function l(){return`{${r()}}`}},70328:(e,t,i)=>{i.d(t,{BI:()=>f,Ej:()=>u,Hq:()=>d,Ie:()=>h,Jt:()=>y,Ne:()=>p,RF:()=>o,aI:()=>F,fA:()=>s,hZ:()=>c,iT:()=>a,is:()=>g,qv:()=>_,vI:()=>m,v_:()=>T,vt:()=>r,w1:()=>l});var n=i(5443);function r(e=T){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function s(e,t,i,n,s,l,o=r()){return o[0]=e,o[1]=t,o[2]=i,o[3]=n,o[4]=s,o[5]=l,o}function l(e,t){const i=isFinite(e[2])||isFinite(e[5]);return new n.A(i?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function o(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function d(e,t,i=0,n=t.length/3){let r=e[0],s=e[1],l=e[2],o=e[3],a=e[4],d=e[5];for(let e=0;e<n;e++)r=Math.min(r,t[i+3*e]),s=Math.min(s,t[i+3*e+1]),l=Math.min(l,t[i+3*e+2]),o=Math.max(o,t[i+3*e]),a=Math.max(a,t[i+3*e+1]),d=Math.max(d,t[i+3*e+2]);e[0]=r,e[1]=s,e[2]=l,e[3]=o,e[4]=a,e[5]=d}function u(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function p(e,t,i=e){return i[0]=t[0],i[1]=t[1],i[2]=t[2],i!==e&&(i[3]=e[3],i[4]=e[4],i[5]=e[5]),i}function m(e,t,i=e){return i[3]=t[0],i[4]=t[1],i[5]=t[2],i!==e&&(i[0]=e[0],i[1]=e[1],i[2]=e[2]),e}function c(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function h(e){return e?c(e,_):r(_)}function y(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function f(e,t,i,n,r){return e[0]=t,e[1]=i,e[2]=Number.NEGATIVE_INFINITY,e[3]=n,e[4]=r,e[5]=Number.POSITIVE_INFINITY,e}function g(e){return 6===e.length}function F(e,t,i){if(null==e||null==t)return e===t;if(!g(e)||!g(t))return!1;if(i){for(let n=0;n<e.length;n++)if(!i(e[n],t[n]))return!1}else for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}i(19419);const _=[1/0,1/0,1/0,-1/0,-1/0,-1/0],T=[0,0,0,0,0,0];r()},20437:(e,t,i)=>{i.d(t,{A:()=>f});var n,r=i(90237),s=i(66552),l=i(25482),o=i(10107),a=i(56507),d=(i(87811),i(44208),i(93223)),u=i(36005),p=i(40608),m=i(72088),c=i(98453);const h=new s.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 y=n=class extends l.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 i=null;try{i=t?JSON.parse(t):null}catch(e){}return i?.value??null}readValueType(e,{description:t}){let i=null;try{i=t?JSON.parse(t):null}catch(e){}return i?h.fromJSON(i.fieldValueType):null}clone(){return new n({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,r._)([(0,o.MZ)({type:String,json:{write:!0}})],y.prototype,"alias",void 0),(0,r._)([(0,o.MZ)({type:[String,Number],json:{write:{allowNull:!0}}})],y.prototype,"defaultValue",void 0),(0,r._)([(0,o.MZ)()],y.prototype,"description",void 0),(0,r._)([(0,u.w)("description")],y.prototype,"readDescription",null),(0,r._)([(0,o.MZ)({types:m.gK,json:{read:{reader:m.rS},write:!0}})],y.prototype,"domain",void 0),(0,r._)([(0,o.MZ)({type:Boolean,json:{write:!0}})],y.prototype,"editable",void 0),(0,r._)([(0,o.MZ)({type:a.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],y.prototype,"length",void 0),(0,r._)([(0,o.MZ)({type:String,json:{write:!0}})],y.prototype,"name",void 0),(0,r._)([(0,o.MZ)({type:Boolean,json:{write:!0}})],y.prototype,"nullable",void 0),(0,r._)([(0,d.e)(c.m)],y.prototype,"type",void 0),(0,r._)([(0,o.MZ)()],y.prototype,"valueType",void 0),(0,r._)([(0,u.w)("valueType",["description"])],y.prototype,"readValueType",null),(0,r._)([(0,o.MZ)({type:Boolean,json:{read:!1}})],y.prototype,"visible",void 0),y=n=(0,r._)([(0,p.$)("esri.layers.support.Field")],y);const f=y},95466:(e,t,i)=>{i.d(t,{A:()=>m});var n=i(49186),r=i(25482),s=i(53966),l=i(91869),o=i(3330),a=i(30524),d=i(56400),u=i(96285);const p=new Map;class m{static fromJSON(e){return new m(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new m(e.fields??[],f(e))}static fromLayerJSON(e){return new m(e.fields??[],f(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const i=[];for(const e of this.fields){const t=e?.name,n=h(t);if(t&&n){const r=c(t);this._fieldsMap.set(t,e),this._fieldsMap.set(r,e),this._normalizedFieldsMap.set(n,e),i.push(`${r}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,a.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,a.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,a.te)(e)||(0,a.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}i.sort(),this.uid=i.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,a.te)(e)||(0,a.Xz)(e)||e.nullable||void 0!==(0,a.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(c(e))??this._normalizedFieldsMap.get(h(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(s.A.getLogger("esri.layers.support.FieldsIndex").error(new n.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),d.n$):y.has(t.type)?d.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===d.L5?o.GB.instance:t===d.n$?u.mQ.utcInstance:(0,l.tE)(p,t,(()=>u.oh.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,a.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,r.Wj)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function c(e){return e.trim().toLowerCase()}function h(e){return(0,a.rS)(e)?.toLowerCase()??""}const y=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function f(e){const t=new Map;if(!e.fields)return t;const i=!0===e.datesInUnknownTimezone,{timeInfo:n,editFieldsInfo:r}=e,s=(n?"startField"in n?n.startField:n.startTimeField:"")??"",l=(n?"endField"in n?n.endField:n.endTimeField:"")??"",o=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,d.ZS)(e.dateFieldsTimeReference):null,a=r?function(e){return"timeZone"in e}(r)?r.timeZone??o:r.dateFieldsTimeReference?(0,d.ZS)(r.dateFieldsTimeReference):o??d.n$:null,u=n?function(e){return"timeZone"in e}(n)?n.timeZone??o:n.timeReference?(0,d.ZS)(n.timeReference):o:null,p=new Map([[c(r?.creationDateField??""),a],[c(r?.editDateField??""),a],[c(s),u],[c(l),u]]);for(const{name:n,type:r}of e.fields)if(y.has(r))t.set(n,d.L5);else if("date"!==r&&"esriFieldTypeDate"!==r)t.set(n,null);else if(i)t.set(n,d.L5);else{const e=p.get(c(n??""))??o;t.set(n,e)}return t}},72088:(e,t,i)=>{i.d(t,{rS:()=>b,gK:()=>M}),i(44208);var n,r=i(90237),s=i(4718),l=i(10107),o=(i(53966),i(93223)),a=i(40608),d=i(25482);i(87811);let u=n=class extends d.oY{constructor(e){super(e),this.name=null,this.code=null}clone(){return new n({name:this.name,code:this.code})}};(0,r._)([(0,l.MZ)({type:String,json:{write:!0}})],u.prototype,"name",void 0),(0,r._)([(0,l.MZ)({type:[String,Number],json:{write:!0}})],u.prototype,"code",void 0),u=n=(0,r._)([(0,a.$)("esri.layers.support.CodedValue")],u);const p=new(i(66552).J)({inherited:"inherited",codedValue:"coded-value",range:"range"});let m=class extends d.oY{constructor(e){super(e),this.name=null,this.type=null}};(0,r._)([(0,l.MZ)({type:String,json:{write:!0}})],m.prototype,"name",void 0),(0,r._)([(0,o.e)(p)],m.prototype,"type",void 0),m=(0,r._)([(0,a.$)("esri.layers.support.Domain")],m);const c=m;var h;let y=h=class extends c{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const i=String(e);this.codedValues.some((e=>(String(e.code)===i&&(t=e.name),!!t)))}return t}clone(){return new h({codedValues:(0,s.o8)(this.codedValues),name:this.name})}};(0,r._)([(0,l.MZ)({type:[u],json:{write:!0}})],y.prototype,"codedValues",void 0),(0,r._)([(0,o.e)({codedValue:"coded-value"})],y.prototype,"type",void 0),y=h=(0,r._)([(0,a.$)("esri.layers.support.CodedValueDomain")],y);const f=y;var g;i(49186);let F=g=class extends c{constructor(e){super(e),this.type="inherited"}clone(){return new g}};(0,r._)([(0,o.e)({inherited:"inherited"})],F.prototype,"type",void 0),F=g=(0,r._)([(0,a.$)("esri.layers.support.InheritedDomain")],F);const _=F;var T;let v=T=class extends c{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new T({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,r._)([(0,l.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,i){t[i]=[this.minValue||0,e]}}}})],v.prototype,"maxValue",void 0),(0,r._)([(0,l.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,i){t[i]=[e,this.maxValue||0]}}}})],v.prototype,"minValue",void 0),(0,r._)([(0,o.e)({range:"range"})],v.prototype,"type",void 0),v=T=(0,r._)([(0,a.$)("esri.layers.support.RangeDomain")],v);const w=v,M={key:"type",base:c,typeMap:{range:v,"coded-value":f,inherited:_}};function b(e){if(!e?.type)return null;switch(e.type){case"range":return w.fromJSON(e);case"codedValue":return f.fromJSON(e);case"inherited":return _.fromJSON(e)}return null}},17036:(e,t,i)=>{i.d(t,{p:()=>a});var n=i(44208),r=i(53966),s=i(20437),l=i(95466),o=i(30524);function a(){return{fields:{type:[s.A],value:null,set:function(e){if(e&&(0,n.A)("big-integer-warning-enabled")){const t=e.filter((e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8));if(t.length){const e=t.map((e=>`'${e.name}'`)).join(", ");r.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return l.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const i=this.fieldsIndex?.has(t);i||r.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,o.DB)(this.fieldsIndex,e)}}}}},98453:(e,t,i)=>{i.d(t,{m:()=>n});const n=new(i(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},92935:(e,t,i)=>{var n;i.d(t,{X:()=>n}),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(n||(n={}))}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3116,5899,9062,3069],{39516:(e,t,r)=>{async function i(e,t){const{WhereClause:i}=await Promise.all([r.e(835),r.e(4800)]).then(r.bind(r,50835));return i.create(e,t)}function n(e,t){return"1=1"===e?t:"1=1"===t?e:null!=e&&""!==e?null!=t&&""!==t?`(${e}) AND (${t})`:e:t}r.d(t,{G:()=>i,m:()=>n})},3330:(e,t,r)=>{r.d(t,{GB:()=>n,Qo:()=>o,Y4:()=>s});var i=r(96285);class n{}function s(e){return e instanceof i.bo?e===n.instance:"unknown"===e?.toString().toLowerCase()}function o(e){return s(e)?n.instance:e}n.instance=new i.oh("Etc/UTC")},13069:(e,t,r)=>{r.d(t,{lk:()=>n,vD:()=>o,yS:()=>s});const i="randomUUID"in crypto;function n(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function s(){return`{${n().toUpperCase()}}`}function o(){return`{${n()}}`}},70328:(e,t,r)=>{r.d(t,{BI:()=>m,Ej:()=>u,Hq:()=>p,Ie:()=>h,Jt:()=>f,Ne:()=>d,RF:()=>l,aI:()=>_,fA:()=>s,hZ:()=>y,iT:()=>a,is:()=>g,qv:()=>w,vI:()=>c,v_:()=>v,vt:()=>n,w1:()=>o});var i=r(5443);function n(e=v){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function s(e,t,r,i,s,o,l=n()){return l[0]=e,l[1]=t,l[2]=r,l[3]=i,l[4]=s,l[5]=o,l}function o(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new i.A(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function p(e,t,r=0,i=t.length/3){let n=e[0],s=e[1],o=e[2],l=e[3],a=e[4],p=e[5];for(let e=0;e<i;e++)n=Math.min(n,t[r+3*e]),s=Math.min(s,t[r+3*e+1]),o=Math.min(o,t[r+3*e+2]),l=Math.max(l,t[r+3*e]),a=Math.max(a,t[r+3*e+1]),p=Math.max(p,t[r+3*e+2]);e[0]=n,e[1]=s,e[2]=o,e[3]=l,e[4]=a,e[5]=p}function u(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function d(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function c(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function y(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function h(e){return e?y(e,w):n(w)}function f(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function m(e,t,r,i,n){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=i,e[4]=n,e[5]=Number.POSITIVE_INFINITY,e}function g(e){return 6===e.length}function _(e,t,r){if(null==e||null==t)return e===t;if(!g(e)||!g(t))return!1;if(r){for(let i=0;i<e.length;i++)if(!r(e[i],t[i]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r(19419);const w=[1/0,1/0,1/0,-1/0,-1/0,-1/0],v=[0,0,0,0,0,0];n()},88982:(e,t,r)=>{r.r(t),r.d(t,{default:()=>ae});var i=r(90237),n=r(78888),s=r(5503),o=r(49186),l=r(91869),a=r(92071),p=r(74887),u=r(84952),d=r(10107),c=(r(44208),r(53966),r(87811),r(40608)),y=r(4146),h=r(36563),f=r(55359),m=r(36708),g=r(35666);function _(e,t){return{ignoreOrigin:this.originIdOf(t)<g.Gr.PORTAL_ITEM}}var w=r(63074),v=r(25036),S=r(10873),M=r(91880),F=r(1873);let b=class extends((0,v.j)((0,w.d)((0,a.P)(y.A)))){constructor(e){super(e),this._layerCache=new f.q(20,(e=>e.destroy())),this._oidToReference=new Map,this._layerToReference=new Map,this.layers=new s.A,this.maximumVisibleSublayers=10,this.opacity=1,this.persistenceEnabled=!0,this.title="Layers In View",this.type="catalog-dynamic-group",this.visible=!0}initialize(){this.addHandles((0,m.wB)((()=>this._orderBy),(()=>{this._updateLayerSortValues(),this._sortAllLayers()})))}load(e){return this.addResolvingPromise(this.parent.load()),Promise.resolve(this)}destroy(){this._oidToReference.clear(),this._layerToReference.clear(),this._layerCache.destroy()}get _orderBy(){return this.parent.orderBy?.find((e=>!e.valueExpression&&e.field))??new M.A({field:this.parent.objectIdField})}get _referenceComparator(){const e=this._orderBy,t=this.parent.fieldsIndex.get(e.field),r=(0,F.FM)(t?.toJSON().type,"descending"===e.order);return(e,t)=>r(e.sortValue,t.sortValue)||e.objectId-e.objectId}acquireLayer(e){const t=this._getLayerReference(e);return t.count++,(0,h.hA)((()=>{t.count--,t.count||this._destroyLayerReference(t)}))}_getLayerReference(e){const t=e.getObjectId();return(0,l.tE)(this._oidToReference,t,(()=>{const t=e.getObjectId(),r=e.getAttribute(this.parent.itemSourceField),i=new Z(e,t,r),n=this._layerCache.pop(r);return n?(this._addLayer(i,n),i):(this.parent.createLayerFromFootprint(e).then((e=>{i.count?this._addLayer(i,e):(this._layerCache.get(r)||this._layerCache.put(i.itemSource,e),i.layer=null)})).catch((()=>{})),i)}))}_destroyLayerReference(e){e.layer&&(this._layerToReference.delete(e.layer),this.layers.remove(e.layer),this._layerCache.put(e.itemSource,e.layer),e.layer=null),this._oidToReference.delete(e.objectId)}_addLayer(e,t){e.layer=t,this._layerToReference.set(t,e),this._updateLayerSortValue(e),t.parent=this,this.layers.add(t),this._sortAllLayers()}_updateLayerSortValues(){for(const e of this._layerToReference.values())this._updateLayerSortValue(e)}_updateLayerSortValue(e){e.sortValue=e.footprint.getAttribute(this._orderBy.field)}_sortAllLayers(){this.layers.sort(((e,t)=>this._referenceComparator(this._layerToReference.get(e),this._layerToReference.get(t))))}};(0,i._)([(0,d.MZ)()],b.prototype,"_orderBy",null),(0,i._)([(0,d.MZ)()],b.prototype,"_referenceComparator",null),(0,i._)([(0,d.MZ)({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],b.prototype,"id",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],b.prototype,"layers",void 0),(0,i._)([(0,d.MZ)({json:{write:{overridePolicy:_}}})],b.prototype,"maximumVisibleSublayers",void 0),(0,i._)([(0,d.MZ)(S.ke)],b.prototype,"opacity",void 0),(0,i._)([(0,d.MZ)({type:String,nonNullable:!0,json:{write:{overridePolicy:_}}})],b.prototype,"title",void 0),(0,i._)([(0,d.MZ)({json:{read:!1}})],b.prototype,"type",void 0),(0,i._)([(0,d.MZ)({type:Boolean,json:{name:"visibility",write:!0}})],b.prototype,"visible",void 0),b=(0,i._)([(0,c.$)("esri.layers.catalog.CatalogDynamicGroupLayer")],b);const x=b;class Z{constructor(e,t,r){this.footprint=e,this.objectId=t,this.itemSource=r,this.count=0,this.layer=null,this.sortValue=void 0}}var I=r(13874),A=(r(86162),r(94409),r(65345),r(42980),r(39290),r(92438),r(96576)),T=(r(93618),r(65494),r(15036)),R=r(4718),O=r(4206),E=r(87718),j=r(30524),L=r(81457),C=r(39383),N=r(30291),V=r(94985);let P=class extends((0,v.j)((0,E.F)((0,w.d)((0,a.P)(y.A))))){constructor(e){super(e),this.charts=null,this.editingEnabled=!0,this.elevationInfo=null,this.formTemplate=null,this.labelingInfo=null,this.labelsVisible=!0,this.legendEnabled=!0,this.maxScale=0,this.minScale=0,this.opacity=1,this.persistenceEnabled=!0,this.popupEnabled=!0,this.popupTemplate=null,this.title="Footprints",this.type="catalog-footprint",this.visible=!0}load(e){return this.addResolvingPromise(this._doLoad(e)),Promise.resolve(this)}async _doLoad(e){await this.parent.load(e),(0,j.yp)(this.renderer,this.fieldsIndex),this.addHandles([this.parent.on("apply-edits",(e=>this.emit("apply-edits",e))),this.parent.on("edits",(e=>this.emit("edits",e))),this.parent.on("refresh",(e=>this.emit("refresh",e)))])}get apiKey(){return this.parent.apiKey}get capabilities(){return this.parent.capabilities}get customParameters(){return this.parent.customParameters}get datesInUnknownTimezone(){return this.parent.datesInUnknownTimezone}get definitionExpression(){return this.parent.definitionExpression}get editingInfo(){return this.parent.editingInfo}get effectiveCapabilities(){return this.parent.effectiveCapabilities}get defaultPopupTemplate(){return this.createPopupTemplate()}get effectiveEditingEnabled(){return!1}get fields(){return this.parent.fields}get fieldsIndex(){return this.parent.fieldsIndex}get globalIdField(){return this.globalIdField}get geometryType(){return this.parent.geometryType}get objectIdField(){return this.parent.objectIdField}get orderBy(){return this.parent.orderBy}get parsedUrl(){return this.parent.parsedUrl}set renderer(e){(0,j.yp)(e,this.fieldsIndex),this._set("renderer",e)}get renderer(){return this._isOverridden("renderer")?this._get("renderer"):function(){const e=new V.A({style:"solid",color:[0,0,0,0],outline:{style:"solid",color:[96,96,96,.75],width:.75}});return new A.A({symbol:e})}()}get timeExtent(){return this.parent.timeExtent}get timeInfo(){return this.parent.timeInfo}get timeOffset(){return this.parent.timeOffset}get typeIdField(){return this.parent.typeIdField}get types(){return this.parent.types}get useViewTime(){return this.parent.useViewTime}async applyEdits(e,t){return this.parent.applyEdits(e,t)}createPopupTemplate(e){const t={fields:this.parent.fields,objectIdField:this.parent.objectIdField,title:this.title};return(0,N.tn)(t,e)}createQuery(){return this.parent.createQuery()}getField(e){return this.parent.getField(e)}getFieldDomain(e,t){return this.parent.getFieldDomain(e,t)}queryFeatures(e,t){return this.parent.queryFeatures(e,t)}queryFeatureCount(e,t){return this.parent.queryFeatureCount(e,t)}queryObjectIds(e,t){return this.parent.queryObjectIds(e,t)}};(0,i._)([(0,d.MZ)({readOnly:!0})],P.prototype,"apiKey",null),(0,i._)([(0,d.MZ)({readOnly:!0})],P.prototype,"capabilities",null),(0,i._)([(0,d.MZ)({readOnly:!0})],P.prototype,"customParameters",null),(0,i._)([(0,d.MZ)({readOnly:!0})],P.prototype,"datesInUnknownTimezone",null),(0,i._)([(0,d.MZ)({readOnly:!0})],P.prototype,"definitionExpression",null),(0,i._)([(0,d.MZ)({readOnly:!0})],P.prototype,"editingInfo",null),(0,i._)([(0,d.MZ)({readOnly:!0})],P.prototype,"effectiveCapabilities",null),(0,i._)([(0,d.MZ)({json:{origins:{"web-scene":{write:!1}},write:!0}})],P.prototype,"charts",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],P.prototype,"defaultPopupTemplate",null),(0,i._)([(0,d.MZ)({type:Boolean,nonNullable:!0,json:{name:"enableEditing",write:!0}})],P.prototype,"editingEnabled",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],P.prototype,"effectiveEditingEnabled",null),(0,i._)([(0,d.MZ)((()=>{const e=(0,R.o8)(S.Yj),t=e.json.origins;return t["web-map"]={read:!1,write:!1},t["portal-item"]={read:!1,write:!1},e})())],P.prototype,"elevationInfo",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],P.prototype,"fields",null),(0,i._)([(0,d.MZ)({readOnly:!0})],P.prototype,"fieldsIndex",null),(0,i._)([(0,d.MZ)({readOnly:!0})],P.prototype,"globalIdField",null),(0,i._)([(0,d.MZ)({type:O.A,json:{name:"formInfo",write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],P.prototype,"formTemplate",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],P.prototype,"geometryType",null),(0,i._)([(0,d.MZ)({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],P.prototype,"id",void 0),(0,i._)([(0,d.MZ)({type:[L.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:C.w,write:!0}})],P.prototype,"labelingInfo",void 0),(0,i._)([(0,d.MZ)(S.kF)],P.prototype,"labelsVisible",void 0),(0,i._)([(0,d.MZ)(S.fV)],P.prototype,"legendEnabled",void 0),(0,i._)([(0,d.MZ)((()=>{const e=(0,R.o8)(S.hG);return e.json.origins.service.read=!1,e})())],P.prototype,"maxScale",void 0),(0,i._)([(0,d.MZ)((()=>{const e=(0,R.o8)(S.hn);return e.json.origins.service.read=!1,e})())],P.prototype,"minScale",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],P.prototype,"objectIdField",null),(0,i._)([(0,d.MZ)(S.ke)],P.prototype,"opacity",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],P.prototype,"orderBy",null),(0,i._)([(0,d.MZ)({readOnly:!0})],P.prototype,"parsedUrl",null),(0,i._)([(0,d.MZ)(S.M6)],P.prototype,"popupEnabled",void 0),(0,i._)([(0,d.MZ)({type:I.A,json:{name:"popupInfo",write:!0}})],P.prototype,"popupTemplate",void 0),(0,i._)([(0,d.MZ)({types:T.H,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:_}}})],P.prototype,"renderer",null),(0,i._)([(0,d.MZ)({readOnly:!0})],P.prototype,"timeExtent",null),(0,i._)([(0,d.MZ)({readOnly:!0})],P.prototype,"timeInfo",null),(0,i._)([(0,d.MZ)({readOnly:!0})],P.prototype,"timeOffset",null),(0,i._)([(0,d.MZ)({type:String,nonNullable:!0,json:{write:{overridePolicy:_}}})],P.prototype,"title",void 0),(0,i._)([(0,d.MZ)({json:{read:!1}})],P.prototype,"type",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],P.prototype,"typeIdField",null),(0,i._)([(0,d.MZ)({readOnly:!0})],P.prototype,"types",null),(0,i._)([(0,d.MZ)({readOnly:!0})],P.prototype,"useViewTime",null),(0,i._)([(0,d.MZ)({type:Boolean,json:{name:"visibility",write:!0}})],P.prototype,"visible",void 0),P=(0,i._)([(0,c.$)("esri.layers.catalog.CatalogFootprintLayer")],P);const D=P;var q=r(72593),B=r(52136),Q=r(18768),z=r(69208),G=r(47685),$=r(72390),J=r(16131),U=r(32756),k=r(8303),H=r(54310),K=r(82935),W=r(15426),Y=r(33143),X=r(17036),ee=r(4513),te=r(91908),re=r(20655),ie=r(80812),ne=r(61956);const se=(0,X.p)();function oe(e,t,r,i){const n=e.write({},i);(function(e){if(null==e)return!0;const t=Object.keys(e);return!t.length||1===t.length&&"id"===t[0]})(n)||(t[r]=n)}let le=class extends((0,$.j)((0,G.w6)((0,w.d)((0,U.f)((0,K.e)((0,v.j)((0,H.J)((0,Q.b)((0,J.q)((0,k.A)((0,a.P)((0,z.d)((0,B.p)(y.A)))))))))))))){constructor(e){super(e),this._portals=new Map,this.dynamicGroupLayer=new x({parent:this}),this.fields=null,this.fieldsIndex=null,this.footprintLayer=new D({parent:this}),this.itemNameField="cd_itemname",this.itemSourceField="cd_itemsource",this.itemTypeField="cd_itemtype",this.layers=new s.A([this.dynamicGroupLayer,this.footprintLayer]),this.maxScaleField="cd_maxscale",this.minScaleField="cd_minscale",this.outFields=null,this.supportedSourceTypes=new Set(["Catalog Layer"]),this.source=new q.default({layer:this,supportedSourceTypes:this.supportedSourceTypes}),this.type="catalog",this.typeIdField=null,this.types=null}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Feature Service"]},e).catch(p.QP).then((async()=>{const{url:e,source:r,portalItem:i}=this;if(!e)throw new o.A("catalog-layer:missing-url","Catalog layer must be created with a url");if(null==this.layerId){const r=await this._fetchFirstValidLayerId(t);if(null==r)throw new o.A("catalog-layer:missing-layerId","There is no Catalog Layer in the service",{service:e});this.layerId=r}await r.load({signal:t});const{sourceJSON:n}=r;n&&(this.sourceJSON=n,this.read(n,{origin:"service",portalItem:i,portal:i?.portal,url:this.parsedUrl}))})).then((()=>(0,W.VA)(this,"load",e)));return this.addResolvingPromise(r),Promise.resolve(this)}destroy(){this.footprintLayer.destroy(),this.dynamicGroupLayer.destroy();for(const e of this._portals.values())e.destroy();this._portals.clear()}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("capabilities"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return this.loaded&&null!=this.capabilities&&this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}get effectiveEditingEnabled(){return!1}get parsedUrl(){const e=(0,u.An)(this.url);return null!=e&&null!=this.layerId&&(e.path=(0,u.fj)(e.path,this.layerId.toString())),e}async applyEdits(e,t){return(0,W.ct)(this,e,t)}on(e,t){return super.on(e,t)}async createLayerFromFootprint(e){const t=await this._createLayer(e);return this._configureLayer(t,e),t}createQuery(){const e=new ne.A,t=this.capabilities?.query;e.returnGeometry=!0,t&&(e.compactGeometryEnabled=t.supportsCompactGeometry,e.defaultSpatialReferenceEnabled=t.supportsDefaultSpatialReference),e.outFields=["*"];const{timeOffset:r,timeExtent:i}=this;return e.timeExtent=null!=r&&null!=i?i.offset(-r.value,r.unit):i||null,e.where=this.definitionExpression||"1=1",e}getFeatureType(e){return(0,W.xd)(this.types,this.typeIdField,e)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=t?.feature,i=this.getFeatureType(r);if(i){const t=i.domains&&i.domains[e];if(t&&"inherited"!==t.type)return t}return this.getField(e)?.domain}async hasDataChanged(){return(0,W.jp)(this)}async queryFeatures(e,t){const r=await this.load(),i=await r.source.queryFeatures(ne.A.from(e)??r.createQuery(),t);if(i?.features)for(const e of i.features)e.layer=e.sourceLayer=r.footprintLayer;return i}async queryObjectIds(e,t){return(await this.load()).source.queryObjectIds(ne.A.from(e)??this.createQuery(),t)}async queryFeatureCount(e,t){return(await this.load()).source.queryFeatureCount(ne.A.from(e)??this.createQuery(),t)}async queryExtent(e,t){return(await this.load()).source.queryExtent(ne.A.from(e)??this.createQuery(),t)}serviceSupportsSpatialReference(e){return this.loaded&&(0,te.D)(this,e)}read(e,t){if(super.read(e,t),e){const{footprintLayer:r,dynamicGroupLayer:i}=e;r&&this.footprintLayer.read(r,t),i&&this.dynamicGroupLayer.read(i,t)}}async _fetchFirstValidLayerId(e){const{data:t}=await(0,n.A)(this.url,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e});if(Array.isArray(t?.layers))return t.layers.find((({type:e})=>this.supportedSourceTypes.has(e)))?.id}async _createLayer(e){const t=e.getAttribute(this.itemSourceField),r=JSON.parse(t);if(function(e){return"object"==typeof e&&null!=e&&"itemId"in e&&"portalUrl"in e}(r)){const{itemId:e,portalUrl:t}=r,i=(0,l.tE)(this._portals,t,(()=>new re.A({url:t})));return y.A.fromPortalItem(new ie.default({id:e,portal:i}))}return function(e){return"object"==typeof e&&null!=e&&"url"in e}(r)?y.A.fromArcGISServerUrl({url:r.url}):new(await ee.S.UnsupportedLayer())}_configureLayer(e,t){const r=t.getAttribute(this.itemNameField);r&&(e.title=r);const i=t.getAttribute(this.maxScaleField);null!=i&&"maxScale"in e&&(e.maxScale=i);const n=t.getAttribute(this.minScaleField);null!=n&&"minScale"in e&&(e.minScale=n)}};(0,i._)([(0,d.MZ)({readOnly:!0})],le.prototype,"createQueryVersion",null),(0,i._)([(0,d.MZ)({readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,writer:oe}}})],le.prototype,"dynamicGroupLayer",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],le.prototype,"editingEnabled",null),(0,i._)([(0,d.MZ)({readOnly:!0})],le.prototype,"effectiveEditingEnabled",null),(0,i._)([(0,d.MZ)({...se.fields,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],le.prototype,"fields",void 0),(0,i._)([(0,d.MZ)(se.fieldsIndex)],le.prototype,"fieldsIndex",void 0),(0,i._)([(0,d.MZ)({readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,writer:oe}}})],le.prototype,"footprintLayer",void 0),(0,i._)([(0,d.MZ)(S.id)],le.prototype,"id",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],le.prototype,"itemNameField",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],le.prototype,"itemSourceField",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],le.prototype,"itemTypeField",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],le.prototype,"layers",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],le.prototype,"maxScaleField",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],le.prototype,"minScaleField",void 0),(0,i._)([(0,d.MZ)({value:"CatalogLayer",type:["CatalogLayer"]})],le.prototype,"operationalLayerType",void 0),(0,i._)([(0,d.MZ)(se.outFields)],le.prototype,"outFields",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],le.prototype,"parsedUrl",null),(0,i._)([(0,d.MZ)({readOnly:!0})],le.prototype,"source",void 0),(0,i._)([(0,d.MZ)({json:{read:!1}})],le.prototype,"type",void 0),(0,i._)([(0,d.MZ)({type:String})],le.prototype,"typeIdField",void 0),(0,i._)([(0,d.MZ)({type:[Y.A]})],le.prototype,"types",void 0),le=(0,i._)([(0,c.$)("esri.layers.CatalogLayer")],le);const ae=le},52136:(e,t,r)=>{r.d(t,{p:()=>o});var i=r(90237),n=r(10107),s=(r(44208),r(53966),r(87811),r(40608));const o=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i._)([(0,n.MZ)({type:String})],t.prototype,"apiKey",null),t=(0,i._)([(0,s.$)("esri.layers.mixins.APIKeyMixin")],t),t}},18768:(e,t,r)=>{r.d(t,{b:()=>a});var i=r(90237),n=r(53966),s=r(10107),o=(r(44208),r(87811),r(40608)),l=r(60694);const a=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,l.qg)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,l.Jf)(e,n.A.getLogger(this)))}};return(0,i._)([(0,s.MZ)()],t.prototype,"title",null),(0,i._)([(0,s.MZ)({type:String})],t.prototype,"url",null),t=(0,i._)([(0,o.$)("esri.layers.mixins.ArcGISService")],t),t}},87718:(e,t,r)=>{r.d(t,{F:()=>I});var i,n=r(90237),s=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),l=r(49186),a=r(25482),p=r(93637),u=r(76369),d=r(59456),c=r(60945),y=r(66552),h=r(4718),f=r(61956);const m=new y.J({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),g=new y.J({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let _=i=class extends a.oY{constructor(e){super(e),this.where=null,this.geometry=null,this.spatialRelationship="intersects",this.distance=void 0,this.objectIds=null,this.units=null,this.timeExtent=null}createQuery(e={}){const{where:t,geometry:r,spatialRelationship:i,timeExtent:n,objectIds:s,units:o,distance:l}=this;return new f.A({geometry:(0,h.o8)(r),objectIds:(0,h.o8)(s),spatialRelationship:i,timeExtent:(0,h.o8)(n),where:t,units:o,distance:l,...e})}clone(){const{where:e,geometry:t,spatialRelationship:r,timeExtent:n,objectIds:s,units:o,distance:l}=this;return new i({geometry:(0,h.o8)(t),objectIds:(0,h.o8)(s),spatialRelationship:r,timeExtent:(0,h.o8)(n),where:e,units:o,distance:l})}};(0,n._)([(0,s.MZ)({type:String,json:{write:!0}})],_.prototype,"where",void 0),(0,n._)([(0,s.MZ)({types:d.yR,json:{write:!0}})],_.prototype,"geometry",void 0),(0,n._)([(0,s.MZ)({type:m.apiValues,json:{name:"spatialRel",read:{reader:m.read},write:{allowNull:!1,writer:m.write,overridePolicy(){return{enabled:null!=this.geometry}}}}})],_.prototype,"spatialRelationship",void 0),(0,n._)([(0,s.MZ)({type:Number,json:{write:{overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],_.prototype,"distance",void 0),(0,n._)([(0,s.MZ)({type:[Number],json:{write:!0}})],_.prototype,"objectIds",void 0),(0,n._)([(0,s.MZ)({type:g.apiValues,json:{read:g.read,write:{writer:g.write,overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],_.prototype,"units",void 0),(0,n._)([(0,s.MZ)({type:c.A,json:{write:!0}})],_.prototype,"timeExtent",void 0),_=i=(0,n._)([(0,o.$)("esri.layers.support.FeatureFilter")],_);const w=_;var v;const S={read:{reader:u.LF},write:{writer:u.M9,overridePolicy(){return{allowNull:null!=this.excludedEffect,isRequired:null==this.excludedEffect}}}},M={read:{reader:u.LF},write:{writer:u.M9,overridePolicy(){return{allowNull:null!=this.includedEffect,isRequired:null==this.includedEffect}}}},F={name:"showExcludedLabels",default:!0};let b=v=class extends a.oY{constructor(e){super(e),this.filter=null,this.includedEffect=null,this.excludedEffect=null,this.excludedLabelsVisible=!1}write(e,t){const r=super.write(e,t);if(t?.origin){if(r.filter){const e=Object.keys(r.filter);if(e.length>1||"where"!==e[0])return t.messages?.push(new l.A("web-document-write:unsupported-feature-effect","Invalid feature effect 'filter'. A filter can only contain a 'where' property",{layer:t.layer,effect:this})),null}if("showExcludedLabels"in r)return t.messages?.push(new l.A("web-document-write:unsupported-feature-effect","Invalid value for property 'excludedLabelsVisible' which should always be 'true'",{layer:t.layer,effect:this})),null}return r}clone(){return new v({filter:null!=this.filter?this.filter.clone():null,includedEffect:this.includedEffect,excludedEffect:this.excludedEffect,excludedLabelsVisible:this.excludedLabelsVisible})}};(0,n._)([(0,s.MZ)({type:w,json:{write:{allowNull:!0,writer(e,t,r,i){const n=e?.write({},i);n&&0!==Object.keys(n).length?(0,p.sM)(r,n,t):(0,p.sM)(r,null,t)}}}})],b.prototype,"filter",void 0),(0,n._)([(0,s.MZ)({json:{write:!0,origins:{"web-map":S,"portal-item":S}}})],b.prototype,"includedEffect",void 0),(0,n._)([(0,s.MZ)({json:{write:!0,origins:{"web-map":M,"portal-item":M}}})],b.prototype,"excludedEffect",void 0),(0,n._)([(0,s.MZ)({type:Boolean,json:{write:!0,name:"showExcludedLabels",origins:{"web-map":F,"portal-item":F}}})],b.prototype,"excludedLabelsVisible",void 0),b=v=(0,n._)([(0,o.$)("esri.layers.support.FeatureEffect")],b);const x=b,Z={write:{allowNull:!0}},I=e=>{let t=class extends e{constructor(){super(...arguments),this.featureEffect=null}};return(0,n._)([(0,s.MZ)({type:x,json:{origins:{"web-map":Z,"portal-item":Z}}})],t.prototype,"featureEffect",void 0),t=(0,n._)([(0,o.$)("esri.layers.mixins.FeatureEffectLayer")],t),t}},32756:(e,t,r)=>{r.d(t,{f:()=>u});var i=r(90237),n=r(93637),s=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),l=r(91880);function a(e,t,r){if(!e)return null;const i=e.find((e=>!!e.field));if(!i)return null;const n=new l.A;return n.read(i,r),[n]}function p(e,t,r,i){const s=e.find((e=>!!e.field));s&&(0,n.sM)(r,[s.toJSON()],t)}const u=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,i._)([(0,s.MZ)({type:[l.A],json:{origins:{"web-scene":{write:!1,read:!1}},read:{source:"layerDefinition.orderBy",reader:a},write:{target:"layerDefinition.orderBy",writer:p}}})],t.prototype,"orderBy",void 0),t=(0,i._)([(0,o.$)("esri.layers.mixins.OrderedLayer")],t),t}},33143:(e,t,r)=>{r.d(t,{A:()=>y});var i=r(90237),n=r(69540),s=r(25482),o=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),a=r(40608),p=r(43937),u=r(72088),d=r(29005);let c=class extends((0,n.O)(s.oY)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,u.rS)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i._)([(0,o.MZ)({json:{write:!0}})],c.prototype,"id",void 0),(0,i._)([(0,o.MZ)({json:{write:!0}})],c.prototype,"name",void 0),(0,i._)([(0,o.MZ)({json:{write:!0}})],c.prototype,"domains",void 0),(0,i._)([(0,l.w)("domains")],c.prototype,"readDomains",null),(0,i._)([(0,p.K)("domains")],c.prototype,"writeDomains",null),(0,i._)([(0,o.MZ)({type:[d.A],json:{write:!0}})],c.prototype,"templates",void 0),c=(0,i._)([(0,a.$)("esri.layers.support.FeatureType")],c);const y=c},20437:(e,t,r)=>{r.d(t,{A:()=>m});var i,n=r(90237),s=r(66552),o=r(25482),l=r(10107),a=r(56507),p=(r(87811),r(44208),r(93223)),u=r(36005),d=r(40608),c=r(72088),y=r(98453);const h=new s.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 r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?.value??null}readValueType(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?h.fromJSON(r.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,l.MZ)({type:String,json:{write:!0}})],f.prototype,"alias",void 0),(0,n._)([(0,l.MZ)({type:[String,Number],json:{write:{allowNull:!0}}})],f.prototype,"defaultValue",void 0),(0,n._)([(0,l.MZ)()],f.prototype,"description",void 0),(0,n._)([(0,u.w)("description")],f.prototype,"readDescription",null),(0,n._)([(0,l.MZ)({types:c.gK,json:{read:{reader:c.rS},write:!0}})],f.prototype,"domain",void 0),(0,n._)([(0,l.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"editable",void 0),(0,n._)([(0,l.MZ)({type:a.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],f.prototype,"length",void 0),(0,n._)([(0,l.MZ)({type:String,json:{write:!0}})],f.prototype,"name",void 0),(0,n._)([(0,l.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"nullable",void 0),(0,n._)([(0,p.e)(y.m)],f.prototype,"type",void 0),(0,n._)([(0,l.MZ)()],f.prototype,"valueType",void 0),(0,n._)([(0,u.w)("valueType",["description"])],f.prototype,"readValueType",null),(0,n._)([(0,l.MZ)({type:Boolean,json:{read:!1}})],f.prototype,"visible",void 0),f=i=(0,n._)([(0,d.$)("esri.layers.support.Field")],f);const m=f},95466:(e,t,r)=>{r.d(t,{A:()=>c});var i=r(49186),n=r(25482),s=r(53966),o=r(91869),l=r(3330),a=r(30524),p=r(56400),u=r(96285);const d=new Map;class c{static fromJSON(e){return new c(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new c(e.fields??[],m(e))}static fromLayerJSON(e){return new c(e.fields??[],m(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,i=h(t);if(t&&i){const n=y(t);this._fieldsMap.set(t,e),this._fieldsMap.set(n,e),this._normalizedFieldsMap.set(i,e),r.push(`${n}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,a.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,a.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,a.te)(e)||(0,a.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,a.te)(e)||(0,a.Xz)(e)||e.nullable||void 0!==(0,a.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(y(e))??this._normalizedFieldsMap.get(h(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(s.A.getLogger("esri.layers.support.FieldsIndex").error(new i.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),p.n$):f.has(t.type)?p.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===p.L5?l.GB.instance:t===p.n$?u.mQ.utcInstance:(0,o.tE)(d,t,(()=>u.oh.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,a.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,n.Wj)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function y(e){return e.trim().toLowerCase()}function h(e){return(0,a.rS)(e)?.toLowerCase()??""}const f=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function m(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:i,editFieldsInfo:n}=e,s=(i?"startField"in i?i.startField:i.startTimeField:"")??"",o=(i?"endField"in i?i.endField:i.endTimeField:"")??"",l=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,p.ZS)(e.dateFieldsTimeReference):null,a=n?function(e){return"timeZone"in e}(n)?n.timeZone??l:n.dateFieldsTimeReference?(0,p.ZS)(n.dateFieldsTimeReference):l??p.n$:null,u=i?function(e){return"timeZone"in e}(i)?i.timeZone??l:i.timeReference?(0,p.ZS)(i.timeReference):l:null,d=new Map([[y(n?.creationDateField??""),a],[y(n?.editDateField??""),a],[y(s),u],[y(o),u]]);for(const{name:i,type:n}of e.fields)if(f.has(n))t.set(i,p.L5);else if("date"!==n&&"esriFieldTypeDate"!==n)t.set(i,null);else if(r)t.set(i,p.L5);else{const e=d.get(y(i??""))??l;t.set(i,e)}return t}},37352:(e,t,r)=>{r.d(t,{A:()=>u});var i,n=r(90237),s=r(5503),o=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(40608));let p=i=class extends o.oY{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new s.A}clone(){return new i({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,n._)([(0,l.MZ)({type:String,json:{write:!0}})],p.prototype,"floorField",void 0),(0,n._)([(0,l.MZ)({json:{read:!1,write:!1}})],p.prototype,"viewAllMode",void 0),(0,n._)([(0,l.MZ)({json:{read:!1,write:!1}})],p.prototype,"viewAllLevelIds",void 0),p=i=(0,n._)([(0,a.$)("esri.layers.support.LayerFloorInfo")],p);const u=p},91880:(e,t,r)=>{r.d(t,{A:()=>d});var i,n=r(90237),s=r(66552),o=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(40608));const p=new s.J({asc:"ascending",desc:"descending"});let u=i=class extends o.oY{constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,n._)([(0,l.MZ)({type:String,json:{write:!0}})],u.prototype,"field",void 0),(0,n._)([(0,l.MZ)({type:String,json:{write:!0}})],u.prototype,"valueExpression",void 0),(0,n._)([(0,l.MZ)({type:p.apiValues,json:{read:p.read,write:p.write}})],u.prototype,"order",void 0),u=i=(0,n._)([(0,a.$)("esri.layers.support.OrderByInfo")],u);const d=u},72088:(e,t,r)=>{r.d(t,{rS:()=>b,gK:()=>F}),r(44208);var i,n=r(90237),s=r(4718),o=r(10107),l=(r(53966),r(93223)),a=r(40608),p=r(25482);r(87811);let u=i=class extends p.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}})],u.prototype,"name",void 0),(0,n._)([(0,o.MZ)({type:[String,Number],json:{write:!0}})],u.prototype,"code",void 0),u=i=(0,n._)([(0,a.$)("esri.layers.support.CodedValue")],u);const d=new(r(66552).J)({inherited:"inherited",codedValue:"coded-value",range:"range"});let c=class extends p.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,l.e)(d)],c.prototype,"type",void 0),c=(0,n._)([(0,a.$)("esri.layers.support.Domain")],c);const y=c;var h;let f=h=class extends y{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some((e=>(String(e.code)===r&&(t=e.name),!!t)))}return t}clone(){return new h({codedValues:(0,s.o8)(this.codedValues),name:this.name})}};(0,n._)([(0,o.MZ)({type:[u],json:{write:!0}})],f.prototype,"codedValues",void 0),(0,n._)([(0,l.e)({codedValue:"coded-value"})],f.prototype,"type",void 0),f=h=(0,n._)([(0,a.$)("esri.layers.support.CodedValueDomain")],f);const m=f;var g;r(49186);let _=g=class extends y{constructor(e){super(e),this.type="inherited"}clone(){return new g}};(0,n._)([(0,l.e)({inherited:"inherited"})],_.prototype,"type",void 0),_=g=(0,n._)([(0,a.$)("esri.layers.support.InheritedDomain")],_);const w=_;var v;let S=v=class extends y{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new v({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,r){t[r]=[this.minValue||0,e]}}}})],S.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,r){t[r]=[e,this.maxValue||0]}}}})],S.prototype,"minValue",void 0),(0,n._)([(0,l.e)({range:"range"})],S.prototype,"type",void 0),S=v=(0,n._)([(0,a.$)("esri.layers.support.RangeDomain")],S);const M=S,F={key:"type",base:y,typeMap:{range:S,"coded-value":m,inherited:w}};function b(e){if(!e?.type)return null;switch(e.type){case"range":return M.fromJSON(e);case"codedValue":return m.fromJSON(e);case"inherited":return w.fromJSON(e)}return null}},17036:(e,t,r)=>{r.d(t,{p:()=>a});var i=r(44208),n=r(53966),s=r(20437),o=r(95466),l=r(30524);function a(){return{fields:{type:[s.A],value:null,set:function(e){if(e&&(0,i.A)("big-integer-warning-enabled")){const t=e.filter((e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8));if(t.length){const e=t.map((e=>`'${e.name}'`)).join(", ");n.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return o.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const r=this.fieldsIndex?.has(t);r||n.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,l.DB)(this.fieldsIndex,e)}}}}},98453:(e,t,r)=>{r.d(t,{m:()=>i});const i=new(r(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},32730:(e,t,r)=>{r.d(t,{BI:()=>m,D3:()=>h,XJ:()=>f,lc:()=>y,mX:()=>_,rU:()=>g,tH:()=>F});var i=r(799);const n="__begin__",s="__end__",o=new RegExp(n,"ig"),l=new RegExp(s,"ig"),a=new RegExp("^"+n,"i"),p=new RegExp(s+"$","i"),u='"',d=u+" + ",c=" + "+u;function y(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function h(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function f(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=y(e.labelExpression),t.type="conventional"),t}function m(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return _(t.expression);case"arcade":return t.expression}return null}function g(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(w);return t?.[1].trim()||null}(t.expression);case"arcade":return F(t.expression)}return null}function _(e){let t;return e?(t=(0,i.HC)(e,(e=>n+'$feature["'+e+'"]'+s)),t=a.test(t)?t.replace(a,""):u+t,t=p.test(t)?t.replace(p,""):t+u,t=t.replaceAll(o,d).replaceAll(l,c)):t='""',t}const w=/^\s*\{([^}]+)\}\s*$/i,v=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*$/i,S=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,M=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])([\w\s]+)(\1)\s*\));?\s*$/i;function F(e){if(!e)return null;let t=v.exec(e)||S.exec(e);return t?t[1]||t[3]:(t=M.exec(e),t?t[2]:null)}},22453:(e,t,r)=>{r.d(t,{S:()=>d,d:()=>S});var i=r(44208),n=r(60694);function s(e,t,r){return!!l(e,t,r)}function o(e,t,r){return l(e,t,r)}function l(e,t,r){return e&&e.hasOwnProperty(t)?e[t]:r}const a={name:"supportsName",size:"supportsSize",contentType:"supportsContentType",keywords:"supportsKeywords",exifInfo:"supportsExifInfo"};function p(e){const t=e?.supportedSpatialAggregationStatistics?.map((e=>e.toLowerCase()));return{envelope:!!t?.includes("envelopeaggregate"),centroid:!!t?.includes("centroidaggregate"),convexHull:!!t?.includes("convexhullaggregate")}}function u(e,t){const r=e?.supportedOperationsWithCacheHint?.map((e=>e.toLowerCase()));return!!r?.includes(t.toLowerCase())}function d(e,t){return{analytics:c(e),attachment:y(e),data:h(e),metadata:f(e),operations:m(e.capabilities,e,t),query:g(e,t),queryRelated:_(e),queryTopFeatures:w(e),editing:v(e)}}function c(e){return{supportsCacheHint:u(e.advancedQueryCapabilities,"queryAnalytics")}}function y(e){const t=e.attachmentProperties,r={supportsName:!1,supportsSize:!1,supportsContentType:!1,supportsKeywords:!1,supportsExifInfo:!1,supportsCacheHint:u(e.advancedQueryCapabilities,"queryAttachments"),supportsResize:s(e,"supportsAttachmentsResizing",!1)};return t&&Array.isArray(t)&&t.forEach((e=>{const t=a[e.name];t&&(r[t]=!!e.isEnabled)})),r}function h(e){return{isVersioned:s(e,"isDataVersioned",!1),supportsAttachment:s(e,"hasAttachments",!1),supportsM:s(e,"hasM",!1),supportsZ:s(e,"hasZ",!1)}}function f(e){return{supportsAdvancedFieldProperties:s(e,"supportsFieldDescriptionProperty",!1)}}function m(e,t,r){const i=e?e.toLowerCase().split(",").map((e=>e.trim())):[],o=r?(0,n.qg)(r):null,l=i.includes(null!=o&&"MapServer"===o.serverType?"data":"query"),a=i.includes("editing")&&!t.datesInUnknownTimezone;let p=a&&i.includes("create"),u=a&&i.includes("delete"),d=a&&i.includes("update");const c=i.includes("changetracking"),y=t.advancedQueryCapabilities;return a&&!(p||u||d)&&(p=u=d=!0),{supportsCalculate:s(t,"supportsCalculate",!1),supportsTruncate:s(t,"supportsTruncate",!1),supportsValidateSql:s(t,"supportsValidateSql",!1),supportsAdd:p,supportsDelete:u,supportsEditing:a,supportsChangeTracking:c,supportsQuery:l,supportsQueryAnalytics:s(y,"supportsQueryAnalytic",!1),supportsQueryAttachments:s(y,"supportsQueryAttachments",!1),supportsQueryTopFeatures:s(y,"supportsTopFeaturesQuery",!1),supportsResizeAttachments:s(t,"supportsAttachmentsResizing",!1),supportsSync:i.includes("sync"),supportsUpdate:d,supportsExceedsLimitStatistics:s(t,"supportsExceedsLimitStatistics",!1),supportsAsyncConvert3D:s(t,"supportsAsyncConvert3D",!1)}}function g(e,t){const r=e.advancedQueryCapabilities,l=e.ownershipBasedAccessControlForFeatures,a=e.archivingInfo,d=e.currentVersion,c=t?.includes("MapServer"),y=!c||d>=(0,i.A)("mapserver-pbf-version-support"),h=(0,n.Wo)(t),f=new Set((e.supportedQueryFormats??"").split(",").map((e=>e.toLowerCase().trim())));return{supportsStatistics:s(r,"supportsStatistics",e.supportsStatistics),supportsPercentileStatistics:s(r,"supportsPercentileStatistics",!1),supportsSpatialAggregationStatistics:s(r,"supportsSpatialAggregationStatistics",!1),supportedSpatialAggregationStatistics:p(r),supportsCentroid:s(r,"supportsReturningGeometryCentroid",!1),supportsDistance:s(r,"supportsQueryWithDistance",!1),supportsDistinct:s(r,"supportsDistinct",e.supportsAdvancedQueries),supportsExtent:s(r,"supportsReturningQueryExtent",!1),supportsGeometryProperties:s(r,"supportsReturningGeometryProperties",!1),supportsHavingClause:s(r,"supportsHavingClause",!1),supportsOrderBy:s(r,"supportsOrderBy",e.supportsAdvancedQueries),supportsPagination:s(r,"supportsPagination",!1),supportsQuantization:s(e,"supportsCoordinatesQuantization",!1),supportsQuantizationEditMode:s(e,"supportsQuantizationEditMode",!1),supportsQueryGeometry:s(e,"supportsReturningQueryGeometry",!1),supportsResultType:s(r,"supportsQueryWithResultType",!1),supportsMaxRecordCountFactor:s(r,"supportsMaxRecordCountFactor",!1),supportsSqlExpression:s(r,"supportsSqlExpression",!1),supportsStandardizedQueriesOnly:s(e,"useStandardizedQueries",!1),supportsTopFeaturesQuery:s(r,"supportsTopFeaturesQuery",!1),supportsQueryByAnonymous:s(l,"allowAnonymousToQuery",!0),supportsQueryByOthers:s(l,"allowOthersToQuery",!0),supportsHistoricMoment:s(a,"supportsQueryWithHistoricMoment",!1),supportsFormatPBF:y&&f.has("pbf"),supportsDisjointSpatialRelationship:s(r,"supportsDisjointSpatialRel",!1),supportsCacheHint:s(r,"supportsQueryWithCacheHint",!1)||u(r,"query"),supportsDefaultSpatialReference:s(r,"supportsDefaultSR",!1),supportsCompactGeometry:h,supportsFullTextSearch:s(r,"supportsFullTextSearch",!1),maxRecordCountFactor:o(e,"maxRecordCountFactor",void 0),maxRecordCount:o(e,"maxRecordCount",void 0),standardMaxRecordCount:o(e,"standardMaxRecordCount",void 0),tileMaxRecordCount:o(e,"tileMaxRecordCount",void 0)}}function _(e){const t=e.advancedQueryCapabilities,r=s(t,"supportsAdvancedQueryRelated",!1);return{supportsPagination:s(t,"supportsQueryRelatedPagination",!1),supportsCount:r,supportsOrderBy:r,supportsCacheHint:u(t,"queryRelated")}}function w(e){return{supportsCacheHint:u(e.advancedQueryCapabilities,"queryTopFilter")}}function v(e){const t=e.ownershipBasedAccessControlForFeatures,r=e?e.advancedEditingCapabilities:void 0;return{supportsGeometryUpdate:s(e,"allowGeometryUpdates",!0),supportsGlobalId:s(e,"supportsApplyEditsWithGlobalIds",!1),supportsReturnServiceEditsInSourceSpatialReference:s(e,"supportsReturnServiceEditsInSourceSR",!1),supportsRollbackOnFailure:s(e,"supportsRollbackOnFailureParameter",!1),supportsUpdateWithoutM:s(e,"allowUpdateWithoutMValues",!1),supportsUploadWithItemId:s(e,"supportsAttachmentsByUploadId",!1),supportsDeleteByAnonymous:s(t,"allowAnonymousToDelete",!0),supportsDeleteByOthers:s(t,"allowOthersToDelete",!0),supportsUpdateByAnonymous:s(t,"allowAnonymousToUpdate",!0),supportsUpdateByOthers:s(t,"allowOthersToUpdate",!0),supportsAsyncApplyEdits:s(r,"supportsAsyncApplyEdits",!1),zDefault:o(e,"zDefault",void 0)}}function S(e){return{operations:{supportsAppend:s(e,"supportsAppend",!1),supportsExportClip:s(e,"supportsExportClip",!1),supportsExportFrameset:s(e,"supportsExportFrameset",!1),supportsMensuration:s(e,"supportsMensuration",!1),supportsUpdate:s(e,"supportsUpdate",!1)},query:{supportsCoverageQuery:e?.playbackInfo?.klv["0601"]??!1}}}},96520:(e,t,r)=>{r.d(t,{u:()=>o});var i=r(83047),n=r(21325);function s(e,t,r){if(null==e.hasM||e.hasZ)for(const e of t)for(const t of e)t.length>2&&(t[2]*=r)}function o(e,t,r){if(!e&&!t||!r)return;const n=(0,i.G9)(r);l(e,r,n),l(t,r,n)}function l(e,t,r){if(e)for(const i of e)a(i.geometry,t,r)}function a(e,t,r){if(!e?.spatialReference||(0,n.aI)(e.spatialReference,t))return;const o=(0,i.G9)(e.spatialReference)/r;if(1!==o)if("x"in e)null!=e.z&&(e.z*=o);else if("rings"in e)s(e,e.rings,o);else if("paths"in e)s(e,e.paths,o);else if("points"in e&&(null==e.hasM||e.hasZ))for(const t of e.points)t.length>2&&(t[2]*=o)}},58501:(e,t,r)=>{r.d(t,{q:()=>n});var i=r(62815);function n(e,t,r){if(!r?.features||!r.hasZ)return;const n=(0,i.N)(r.geometryType,t,e.outSpatialReference);if(null!=n)for(const e of r.features)n(e.geometry)}},22671:(e,t,r)=>{r.d(t,{A:()=>w});var i,n=r(90237),s=r(59456),o=r(52106),l=r(66552),a=r(25482),p=r(4718),u=r(10107),d=(r(44208),r(53966),r(36005)),c=r(40608),y=r(43937),h=r(16930),f=r(65864),m=r(20437);const g=new l.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let _=i=class extends a.oY{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=h.A.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const n=e[t],s=o.A.fromJSON(n),l=n.geometry?.spatialReference;null==s.geometry||l||(s.geometry.spatialReference=r);const a=n.aggregateGeometries,p=s.aggregateGeometries;if(a&&null!=p)for(const e in p){const t=p[e],i=a[e],n=i?.spatialReference;null==t||n||(t.spatialReference=r)}i.push(s)}return i}writeGeometryType(e,t,r,i){if(e)return void g.write(e,t,r,i);const{features:n}=this;if(n)for(const e of n)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,f.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=h.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,p.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,n]}=e,s=this.features,o=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((n-e)/r)));for(let e=0,t=s.length;e<t;e++)o?.(s[e].geometry)||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,n],scale:[s,o]}=r;let l=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}const p=this._getHydrationFunction(e,(e=>e*s+i),(e=>n-e*o),l,a);for(const{geometry:e}of t)null!=e&&p&&p(e);return this.transform=null,this}_quantizePoints(e,t,r){let i,n;const s=[];for(let o=0,l=e.length;o<l;o++){const l=e[o];if(o>0){const e=t(l[0]),o=r(l[1]);e===i&&o===n||(s.push([e-i,o-n]),i=e,n=o)}else i=t(l[0]),n=r(l[1]),s.push([i,n])}return s.length>0?s:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,f.Bi)(e)?e.rings:e.paths,n=[];for(let e=0,s=i.length;e<s;e++){const s=i[e],o=this._quantizePoints(s,t,r);o&&n.push(o)}return n.length>0?((0,f.Bi)(e)?e.rings=n:e.paths=n,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,n){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const s=(0,f.Bi)(e)?e.rings:e.paths;let o,l;for(let e=0,i=s.length;e<i;e++){const i=s[e];for(let e=0,n=i.length;e<n;e++){const n=i[e];e>0?(o+=n[0],l+=n[1]):(o=n[0],l=n[1]),n[0]=t(o),n[1]=r(l)}}if(i&&n)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=n(r[3])}}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(n)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),n&&null!=e.mmax&&null!=e.mmin&&(e.mmax=n(e.mmax),e.mmin=n(e.mmin))}:"multipoint"===e?e=>{const s=e.points;let o,l;for(let e=0,i=s.length;e<i;e++){const i=s[e];e>0?(o+=i[0],l+=i[1]):(o=i[0],l=i[1]),i[0]=t(o),i[1]=r(l)}if(i&&n)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2]),t[3]=n(t[3])}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2])}else if(n)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=n(t[2])}}:null}};(0,n._)([(0,u.MZ)({type:String,json:{write:!0}})],_.prototype,"displayFieldName",void 0),(0,n._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"exceededTransferLimit",void 0),(0,n._)([(0,u.MZ)({type:[o.A],json:{write:!0}})],_.prototype,"features",void 0),(0,n._)([(0,d.w)("features")],_.prototype,"readFeatures",null),(0,n._)([(0,u.MZ)({type:[m.A],json:{write:!0}})],_.prototype,"fields",void 0),(0,n._)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],_.prototype,"geometryType",void 0),(0,n._)([(0,y.K)("geometryType")],_.prototype,"writeGeometryType",null),(0,n._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasM",void 0),(0,n._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasZ",void 0),(0,n._)([(0,u.MZ)({types:s.yR,json:{write:!0}})],_.prototype,"queryGeometry",void 0),(0,n._)([(0,d.w)("queryGeometry")],_.prototype,"readQueryGeometry",null),(0,n._)([(0,u.MZ)({type:h.A,json:{write:!0}})],_.prototype,"spatialReference",void 0),(0,n._)([(0,y.K)("spatialReference")],_.prototype,"writeSpatialReference",null),(0,n._)([(0,u.MZ)({json:{write:!0}})],_.prototype,"transform",void 0),_=i=(0,n._)([(0,c.$)("esri.rest.support.FeatureSet")],_),_.prototype.toJSON.isDefaultToJSON=!0;const w=_},59868:(e,t,r)=>{r.d(t,{A7:()=>p,Cx:()=>u,Hk:()=>d,UK:()=>a}),r(44208);var i=r(94985),n=r(31593),s=r(53930),o=r(68249),l=r(93470);const a=s.A.fromJSON(l.Cb),p=n.A.fromJSON(l.yM),u=i.A.fromJSON(l.WR),d=o.A.fromJSON(l.JZ);s.A.fromJSON(l.nC),n.A.fromJSON(l.HW),i.A.fromJSON(l.b6)},93470:(e,t,r)=>{r.d(t,{Cb:()=>n,HW:()=>p,JZ:()=>l,WR:()=>o,b6:()=>u,nC:()=>a,yM:()=>s});const i=[252,146,31,255],n={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},s={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},o={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},l={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},a={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},p={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},u={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2777],{92071:(e,r,t)=>{t.d(r,{P:()=>S,L:()=>w});var i=t(90237),a=t(69622),s=t(76953),o=t(4718),n=t(35666);class l{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(n.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const r=new l,t=this._originStores[n.Gr.DEFAULTS];t&&t.forEach(((e,t)=>{r.set(t,(0,o.o8)(e),n.Gr.DEFAULTS)}));for(let t=n.Gr.SERVICE;t<n.AU;t++){const i=this._originStores[t];i&&i.forEach(((i,a)=>{e&&e.has(a)||r.set(a,(0,o.o8)(i),t)}))}return r}get(e,r){const t=void 0===r?this._values:this._originStores[r];return t?t.get(e):void 0}keys(e){const r=null==e?this._values:this._originStores[e];return r?[...r.keys()]:[]}set(e,r,t=n.Gr.USER){let i=this._originStores[t];if(i||(i=new Map,this._originStores[t]=i),i.set(e,r),!this._values.has(e)||this._propertyOriginMap.get(e)<=t){const i=this._values.get(e);return this._values.set(e,r),this._propertyOriginMap.set(e,t),i!==r}return!1}delete(e,r=n.Gr.USER){const t=this._originStores[r];if(!t)return;const i=t.get(e);if(t.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===r){this._values.delete(e);for(let t=r-1;t>=0;t--){const r=this._originStores[t];if(r&&r.has(e)){this._values.set(e,r.get(e)),this._propertyOriginMap.set(e,t);break}}}return i}has(e,r){const t=void 0===r?this._values:this._originStores[r];return!!t&&t.has(e)}revert(e,r){for(;r>0&&!this.has(e,r);)--r;const t=this._originStores[r],i=t?.get(e),a=this._values.get(e);return this._values.set(e,i),this._propertyOriginMap.set(e,r),a!==i}originOf(e){return this._propertyOriginMap.get(e)||n.Gr.DEFAULTS}forEach(e){this._values.forEach(e)}}var p=t(45917),u=t(88620),c=t(40608);const d=e=>{let r=class extends e{constructor(...e){super(...e);const r=(0,u.oY)(this),t=r.store,i=new l;r.store=i,(0,s.k)(r,t,i)}read(e,r){(0,p.L)(this,e,r)}getAtOrigin(e,r){const t=y(this),i=(0,n.aB)(r);if("string"==typeof e)return t.get(e,i);const a={};return e.forEach((e=>{a[e]=t.get(e,i)})),a}originOf(e){return(0,n.OL)(this.originIdOf(e))}originIdOf(e){return y(this).originOf(e)}revert(e,r){const t=y(this),i=(0,n.aB)(r),a=(0,u.oY)(this);let s;s="string"==typeof e?"*"===e?t.keys(i):[e]:e,s.forEach((e=>{a.invalidate(e),t.revert(e,i),a.commit(e)}))}};return r=(0,i._)([(0,c.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],r),r};function y(e){return(0,u.oY)(e).store}let h=class extends(d(a.A)){};h=(0,i._)([(0,c.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],h);var g=t(16649),f=t(49422);const m=e=>{let r=class extends e{constructor(...e){super(...e)}clear(e,r="user"){return v(this).delete(e,(0,n.aB)(r))}write(e,r){return(0,f.M)(this,e=e||{},r),e}setAtOrigin(e,r,t){(0,u.oY)(this).setAtOrigin(e,r,(0,n.aB)(t))}removeOrigin(e){const r=v(this),t=(0,n.aB)(e),i=r.keys(t);for(const e of i)r.originOf(e)===t&&r.set(e,r.get(e,t),n.Gr.USER)}updateOrigin(e,r){const t=v(this),i=(0,n.aB)(r),a=(0,g.Jt)(this,e);for(let r=i+1;r<n.AU;++r)t.delete(e,r);t.set(e,a,i)}toJSON(e){return this.write({},e)}};return r=(0,i._)([(0,c.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],r),r.prototype.toJSON.isDefaultToJSON=!0,r};function v(e){return(0,u.oY)(e).store}const S=e=>{let r=class extends(m(d(e))){constructor(...e){super(...e)}};return r=(0,i._)([(0,c.$)("esri.core.MultiOriginJSONSupport")],r),r};let w=class extends(S(a.A)){};w=(0,i._)([(0,c.$)("esri.core.MultiOriginJSONSupport")],w)},69208:(e,r,t)=>{t.d(r,{d:()=>o});var i=t(90237),a=t(10107),s=(t(44208),t(53966),t(87811),t(40608));const o=e=>{let r=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,i._)([(0,a.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],r.prototype,"customParameters",void 0),r=(0,i._)([(0,s.$)("esri.layers.mixins.CustomParametersMixin")],r),r}},16131:(e,r,t)=>{t.d(r,{q:()=>v});var i=t(90237),a=t(49186),s=t(84952),o=t(10107),n=(t(44208),t(53966),t(87811),t(36005)),l=t(40608),p=t(43937),u=t(89317),c=t(45917),d=t(49422);const y={ArcGISAnnotationLayer:!0,ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GeoRSS:!0,GroupLayer:!0,KML:!0,KnowledgeGraphLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,OrientedImageryLayer:!0,SubtypeGroupLayer:!0,VectorTileLayer:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},h={ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,OpenStreetMap:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0},g={ArcGISFeatureLayer:!0,SubtypeGroupTable:!0},f={"web-scene/operational-layers":{ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledElevationServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BuildingSceneLayer:!0,CSV:!0,GeoJSON:!0,GroupLayer:!0,IntegratedMesh3DTilesLayer:!0,IntegratedMeshLayer:!0,KML:!0,LineOfSightLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,PointCloudLayer:!0,RasterDataLayer:!0,VectorTileLayer:!0,Voxel:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},"web-scene/basemap":{ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0},"web-scene/ground":{ArcGISTiledElevationServiceLayer:!0,RasterDataElevationLayer:!0},"web-scene/tables":{ArcGISFeatureLayer:!0},"web-map/operational-layers":y,"web-map/basemap":h,"web-map/tables":g,"link-chart/operational-layers":{...y,LinkChartLayer:!0},"link-chart/basemap":h,"link-chart/tables":g,"portal-item/operational-layers":{ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,BuildingSceneLayer:!0,IntegratedMesh3DTilesLayer:!0,IntegratedMeshLayer:!0,MediaLayer:!0,OrientedImageryLayer:!0,PointCloudLayer:!0,SubtypeGroupLayer:!0}};var m=t(10873);const v=e=>{let r=class extends e{constructor(){super(...arguments),this.persistenceEnabled=!0,this.title=null}readId(e,r,t){return"Group Layer"===t?.portalItem?.type?void 0:e}writeListMode(e,r,t,i){(i&&"ground"===i.layerContainerType||e&&(0,d.R)(this,t,{},i))&&(r[t]=e)}writeOperationalLayerType(e,r,t,i){e&&"tables"!==i?.layerContainerType&&(r.layerType=e)}writeTitle(e,r){r.title=e??"Layer"}read(e,r){r&&(r.layer=this),(0,c.t)(this,e,(r=>super.read(e,r)),r)}write(e,r){if(!this.persistenceEnabled)return null;if(r?.origin){const e=`${r.origin}/${r.layerContainerType||"operational-layers"}`,t=f[e];let i=!!t?.[this.operationalLayerType];if("ArcGISTiledElevationServiceLayer"===this.operationalLayerType&&"web-scene/operational-layers"===e&&(i=!1),"ArcGISDimensionLayer"===this.operationalLayerType&&"web-map/operational-layers"===e&&(i=!1),!i)return r.messages?.push(new a.A("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this})),null}const t=super.write(e,{...r,layer:this}),i=!!r&&!!r.messages&&!!r.messages.filter((e=>e instanceof a.A&&"web-document-write:property-required"===e.name)).length;return(0,s.w8)(t?.url)?(r?.messages?.push(new a.A("layer:invalid-url",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' using a Blob URL cannot be written to web scenes and web maps`,{layer:this})),null):!this.url&&i?null:t}beforeSave(){}};return(0,i._)([(0,o.MZ)({type:String,json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0}},"portal-item":{write:!1}}}})],r.prototype,"id",void 0),(0,i._)([(0,n.w)("id",["id"])],r.prototype,"readId",null),(0,i._)([(0,o.MZ)(m.C1)],r.prototype,"listMode",void 0),(0,i._)([(0,p.K)("listMode")],r.prototype,"writeListMode",null),(0,i._)([(0,o.MZ)({type:String,readOnly:!0,json:{read:!1,write:{target:"layerType",ignoreOrigin:!0},origins:{"portal-item":{write:!1},"web-scene":{name:"layerType",read:!1,write:{enabled:!0,ignoreOrigin:!0,layerContainerTypes:u.K}}}}})],r.prototype,"operationalLayerType",void 0),(0,i._)([(0,p.K)("operationalLayerType")],r.prototype,"writeOperationalLayerType",null),(0,i._)([(0,o.MZ)(m.ke)],r.prototype,"opacity",void 0),(0,i._)([(0,o.MZ)({type:Boolean,readOnly:!1})],r.prototype,"persistenceEnabled",void 0),(0,i._)([(0,o.MZ)({type:String,json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}},"portal-item":{write:!1}}},value:"Layer"})],r.prototype,"title",void 0),(0,i._)([(0,p.K)("title"),(0,p.K)(["web-scene"],"title")],r.prototype,"writeTitle",null),(0,i._)([(0,o.MZ)({type:Boolean,json:{origins:{"web-scene":{name:"visibility",write:{enabled:!0,layerContainerTypes:u.K}}},name:"visibility",write:!0}})],r.prototype,"visible",void 0),r=(0,i._)([(0,l.$)("esri.layers.mixins.OperationalLayer")],r),r}},8303:(e,r,t)=>{t.d(r,{A:()=>L});var i=t(90237),a=t(92602),s=t(70333),o=t(78888),n=t(60999),l=t(49186),p=t(53966),u=t(97768),c=t(74887),d=t(84952),y=t(10107),h=(t(44208),t(87811),t(36005)),g=t(40608),f=t(43937),m=t(83531),v=t(20655),S=t(80812),w=t(41318),I=t(10407);const L=e=>{let r=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,u.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,r,t){if(r.itemId)return new S.default({id:r.itemId,portal:t?.portal})}writePortalItem(e,r){e?.id&&(r.itemId=e.id)}async loadFromPortal(e,r){if(this.portalItem?.id)try{const{load:i}=await Promise.all([t.e(5356),t.e(1204)]).then(t.bind(t,41204));return(0,c.Te)(r),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},r)}catch(e){throw(0,c.zf)(e)||p.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,c.QP)(e),!0))))}async setUserPrivileges(e,r){if(!a.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(r);if(this.url)try{const{features:{edit:t,fullEdit:i},content:{updateItem:a}}=await this._fetchUserPrivileges(e,r);this._set("userHasEditingPrivileges",t),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",a)}catch(e){(0,c.QP)(e)}}async _fetchUserPrivileges(e,r){let t=this.portalItem;if(!e||!t||!t.loaded||t.sourceUrl)return this._fetchFallbackUserPrivileges(r);const i=e===t.id;if(i&&t.portal.user)return(0,I.It)(t);let a,o;if(i)a=t.portal.url;else try{a=await(0,m.wI)(this.url,r)}catch(e){(0,c.QP)(e)}if(!a||!(0,d.b8)(a,t.portal.url))return this._fetchFallbackUserPrivileges(r);try{const e=null!=r?r.signal:null;o=await(s.id?.getCredential(`${a}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.QP)(e)}const n=!0,l=!1,p=!1;if(!o)return{features:{edit:n,fullEdit:l},content:{updateItem:p}};try{if(i?await t.reload():(t=new S.default({id:e,portal:{url:a}}),await t.load(r)),t.portal.user)return(0,I.It)(t)}catch(e){(0,c.QP)(e)}return{features:{edit:n,fullEdit:l},content:{updateItem:p}}}async _fetchFallbackUserPrivileges(e){let r=!0;try{r=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.QP)(e)}return{features:{edit:r,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const r=this.url?s.id?.findCredential(this.url):null;if(!r)return!0;const t=b.credential===r?b.user:await this._fetchEditingUser(e);return b.credential=r,b.user=t,null==t?.privileges||t.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const r=this.portalItem?.portal?.user;if(r)return r;const t=s.id.findServerInfo(this.url??"");if(!t?.owningSystemUrl)return null;const i=`${t.owningSystemUrl}/sharing/rest`,a=v.A.getDefault();if(a&&a.loaded&&(0,d.S8)(a.restUrl)===(0,d.S8)(i))return a.user;const l=`${i}/community/self`,p=null!=e?e.signal:null,u=await(0,n.Ke)((0,o.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:p}));return u.ok?w.A.fromJSON(u.value.data):null}read(e,r){r&&(r.layer=this),super.read(e,r)}write(e,r){const t=r?.portal,i=this.portalItem?.id&&(this.portalItem.portal||v.A.getDefault());return t&&i&&!(0,d.ut)(i.restUrl,t.restUrl)?(r.messages&&r.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...r,layer:this})}};return(0,i._)([(0,y.MZ)({type:S.default})],r.prototype,"portalItem",null),(0,i._)([(0,h.w)("web-document","portalItem",["itemId"])],r.prototype,"readPortalItem",null),(0,i._)([(0,f.K)("web-document","portalItem",{itemId:{type:String}})],r.prototype,"writePortalItem",null),(0,i._)([(0,y.MZ)({clonable:!1})],r.prototype,"resourceReferences",void 0),(0,i._)([(0,y.MZ)({type:Boolean,readOnly:!0})],r.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,y.MZ)({type:Boolean,readOnly:!0})],r.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,y.MZ)({type:Boolean,readOnly:!0})],r.prototype,"userHasUpdateItemPrivileges",void 0),r=(0,i._)([(0,g.$)("esri.layers.mixins.PortalLayer")],r),r},b={credential:null,user:null}},54310:(e,r,t)=>{t.d(r,{J:()=>S});var i=t(90237),a=t(53966),s=t(74887),o=t(10107),n=t(79901),l=(t(87811),t(44208),t(40608)),p=t(89317),u=t(5503),c=(t(60999),t(49186),t(14012),t(80559));const d=new u.A,y=new WeakMap;function h(e){(function(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e})(e)&&d.push(new WeakRef(e))}function g(e,r){return Number.isFinite(e)&&Number.isFinite(r)?r<=0?e:g(r,e%r):0}let f=0,m=0;function v(){const e=Date.now();let r=!1;for(const t of d){const i=t.deref();i?i.refreshInterval&&e-(y.get(i)??0)+5>=6e4*i.refreshInterval&&(y.set(i,e),i.refresh(e)):r=!0}if(r)for(let e=d.length-1;e>=0;e--)d.at(e).deref()||d.removeAt(e)}(0,c.fm)((()=>{const e=Date.now();let r=0;for(const t of d){const i=t.deref();i&&(r=g(Math.round(6e4*i.refreshInterval),r),i.refreshInterval?y.get(i)||y.set(i,e):y.delete(i))}if(r!==m){if(m=r,clearInterval(f),0===m)return void(f=0);f=setInterval(v,m)}}));const S=e=>{let r=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,s.sg)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||h(this)}),(()=>{}))}destroy(){!function(e){const r=d.find((r=>r.deref()===e));r&&d.remove(r)}(this)}castRefreshInterval(e){return e>=.1?e:e<=0?0:.1}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,s.QZ)(this._debounceHasDataChanged()).then((r=>{r&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:r})}),(e=>{a.A.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}get test(){const e=this;return{set refreshInterval(r){e._set("refreshInterval",r)}}}};return(0,i._)([(0,o.MZ)({type:Number,json:{write:!0,origins:{"web-scene":{write:{enabled:!0,layerContainerTypes:p.K}}}}})],r.prototype,"refreshInterval",void 0),(0,i._)([(0,n.w)("refreshInterval")],r.prototype,"castRefreshInterval",null),(0,i._)([(0,o.MZ)({readOnly:!0})],r.prototype,"refreshTimestamp",void 0),(0,i._)([(0,o.MZ)({readOnly:!0})],r.prototype,"refreshParameters",null),r=(0,i._)([(0,l.$)("esri.layers.mixins.RefreshableLayer")],r),r}},29005:(e,r,t)=>{t.d(r,{A:()=>c});var i=t(90237),a=t(69540),s=t(66552),o=t(25482),n=t(10107),l=(t(44208),t(53966),t(87811),t(40608));const p=new s.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let u=class extends((0,a.O)(o.oY)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i._)([(0,n.MZ)({json:{write:!0}})],u.prototype,"name",void 0),(0,i._)([(0,n.MZ)({json:{write:!0}})],u.prototype,"description",void 0),(0,i._)([(0,n.MZ)({json:{read:p.read,write:p.write}})],u.prototype,"drawingTool",void 0),(0,i._)([(0,n.MZ)({json:{write:!0}})],u.prototype,"prototype",void 0),(0,i._)([(0,n.MZ)({json:{write:!0}})],u.prototype,"thumbnail",void 0),u=(0,i._)([(0,l.$)("esri.layers.support.FeatureTemplate")],u);const c=u},39383:(e,r,t)=>{t.d(r,{w:()=>p,z:()=>c});var i=t(49186),a=t(4718),s=t(53966),o=t(81457);const n=()=>s.A.getLogger("esri.layers.support.labelingInfo"),l=/\[([^[\]]+)\]/gi;function p(e,r,t){return e?e.map((e=>{const i=new o.A;if(i.read(e,t),i.labelExpression){const e=r.fields||r.layerDefinition?.fields||this.fields;i.labelExpression=i.labelExpression.replaceAll(l,((r,t)=>`[${function(e,r){if(!r)return e;const t=e.toLowerCase();for(let e=0;e<r.length;e++){const i=r[e].name;if(i.toLowerCase()===t)return i}return e}(t,e)}]`))}return i})):null}const u={esriGeometryPoint:["above-right","above-center","above-left","center-center","center-left","center-right","below-center","below-left","below-right"],esriGeometryPolygon:["always-horizontal"],esriGeometryPolyline:["center-along","above-along","below-along"],esriGeometryMultipoint:null,esriGeometryEnvelope:null};function c(e,r){const t=(0,a.o8)(e);return t.some((e=>function(e,r){const t=e.labelPlacement,a=u[r];if(!e.symbol)return n().warn("No ILabelClass symbol specified."),!0;if(!a)return n().error(new i.A("labeling:unsupported-geometry-type",`Unable to create labels for layer, geometry type '${r}' is not supported`)),!0;if(!a.includes(t)){const i=a[0];t&&n().warn(`Found invalid label placement type ${t} for ${r}. Defaulting to ${i}`),e.labelPlacement=i}return!1}(e,r)))?[]:t}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3622],{43334:(e,t,r)=>{r.d(t,{N3:()=>o,Om:()=>n});class n{constructor(e=null,t={},r,n){this.geometry=e,this.attributes=t,this.centroid=r,this.objectId=n,this.displayId=0,this.geohashX=0,this.geohashY=0}weakClone(){const e=new n(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e.geohashX=this.geohashX,e.geohashY=this.geohashY,e}clone(){const e=this.geometry?.clone(),t=new n(e,{...this.attributes},this.centroid?.clone(),this.objectId);return t.displayId=this.displayId,t.geohashX=this.geohashX,t.geohashY=this.geohashY,t}}function o(e){return!!e.geometry?.coords?.length}},58512:(e,t,r)=>{r.d(t,{A:()=>n});class n{constructor(){this.objectIdFieldName=null,this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){const e=new n;return e.objectIdFieldName=this.objectIdFieldName,e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}},92722:(e,t,r)=>{r.d(t,{A:()=>n});class n{constructor(e=[],t=[],r=!1){this.lengths=e??[],this.coords=t??[],this.hasIndeterminateRingOrder=r}static fromRect(e){const[t,r,o,s]=e,i=o-t,a=s-r;return new n([5],[t,r,i,0,0,a,-i,0,0,-a])}get isPoint(){return 0===this.lengths.length}get maxLength(){return Math.max(...this.lengths)}get size(){return this.lengths.reduce(((e,t)=>e+t))}forEachVertex(e){let t=0;this.lengths.length||e(this.coords[0],this.coords[1]);for(let r=0;r<this.lengths.length;r++){const n=this.lengths[r];for(let r=0;r<n;r++)e(this.coords[2*(r+t)],this.coords[2*(r+t)+1]);t+=n}}deltaDecode(){const e=this.clone(),{coords:t,lengths:r}=e;let n=0;for(const e of r){for(let r=1;r<e;r++)t[2*(n+r)]+=t[2*(n+r)-2],t[2*(n+r)+1]+=t[2*(n+r)-1];n+=e}return e}clone(e){if(0===this.lengths.length)return new n([],[this.coords[0],this.coords[1]]);const t=2*(0===this.lengths.length?1:this.lengths.reduce(((e,t)=>e+t))),r=this.coords.slice(0,t);return e?(e.set(r),new n(this.lengths,e,this.hasIndeterminateRingOrder)):new n(Array.from(this.lengths),Array.from(r),this.hasIndeterminateRingOrder)}}},90708:(e,t,r)=>{r.d(t,{B2:()=>F,BW:()=>q,Ch:()=>ne,DF:()=>x,Di:()=>Q,E2:()=>z,IE:()=>w,Nl:()=>H,Q4:()=>oe,Rk:()=>ie,Ux:()=>Y,Ye:()=>k,ZF:()=>J,eY:()=>$,jH:()=>W,jQ:()=>re,kz:()=>K,oN:()=>E,q3:()=>X,qK:()=>v,qN:()=>R,z5:()=>j,zv:()=>B});var n=r(49186),o=r(53966),s=r(97768),i=r(70328),a=r(19419),u=r(65864),l=r(43334),c=r(58512),h=r(92722);function d(e,t){return e?t?4:3:t?3:2}const f=()=>o.A.getLogger("esri.layers.graphics.featureConversionUtils"),m={esriGeometryPoint:0,esriGeometryPolyline:2,esriGeometryPolygon:3,esriGeometryMultipoint:0,esriGeometryEnvelope:0},y=(e,t,r,n,o,s)=>{e[r]=o,e[r+1]=s},p=(e,t,r,n,o,s)=>{e[r]=o,e[r+1]=s,e[r+2]=t[n+2]},g=(e,t,r,n,o,s)=>{e[r]=o,e[r+1]=s,e[r+2]=t[n+3]},b=(e,t,r,n,o,s)=>{e[r]=o,e[r+1]=s,e[r+2]=t[n+2],e[r+3]=t[n+3]};function _(e,t,r,n){if(e){if(r)return t&&n?b:p;if(t&&n)return g}else if(t&&n)return p;return y}function w({scale:e,translate:t},r){return Math.round((r-t[0])/e[0])}function F({scale:e,translate:t},r){return Math.round((t[1]-r)/e[1])}function I({scale:e,translate:t},r,n){return r*e[n]+t[n]}function x(e,t,r){return e?t?r?N(e):G(e):r?A(e):P(e):null}function P(e){const t=e.coords;return{x:t[0],y:t[1]}}function S(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e}function G(e){const t=e.coords;return{x:t[0],y:t[1],z:t[2]}}function M(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.z,e}function A(e){const t=e.coords;return{x:t[0],y:t[1],m:t[2]}}function T(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.m,e}function N(e){const t=e.coords;return{x:t[0],y:t[1],z:t[2],m:t[3]}}function C(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.z,e.coords[3]=t.m,e}function D(e,t){return e&&t?C:e?M:t?T:S}function R(e,t,r=D(null!=t.z,null!=t.m)){return r(e,t)}function v(e,t,r){if(null==e)return null;const n=d(t,r),o=[];for(let t=0;t<e.coords.length;t+=n){const r=[];for(let o=0;o<n;o++)r.push(e.coords[t+o]);o.push(r)}return t?r?{points:o,hasZ:t,hasM:r}:{points:o,hasZ:t}:r?{points:o,hasM:r}:{points:o}}function Z(e,t,r=d(t.hasZ,t.hasM)){e.lengths[0]=t.points.length;const n=e.coords;let o=0;for(const e of t.points)for(let t=0;t<r;t++)n[o++]=e[t];return e}function q(e,t,r){if(!e)return null;const n=d(t,r),{coords:o,lengths:s}=e,i=[];let a=0;for(const e of s){const t=[];for(let r=0;r<e;r++){const e=[];for(let t=0;t<n;t++)e.push(o[a++]);t.push(e)}i.push(t)}return t?r?{paths:i,hasZ:t,hasM:r}:{paths:i,hasZ:t}:r?{paths:i,hasM:r}:{paths:i}}function O(e,t,r=d(t.hasZ,t.hasM)){const{lengths:n,coords:o}=e;let s=0;for(const e of t.paths){for(const t of e)for(let e=0;e<r;e++)o[s++]=t[e];n.push(e.length)}return e}function j(e,t,r){if(!e)return null;const n=d(t,r),{coords:o,lengths:s}=e,i=[];let a=0;for(const e of s){const t=[];for(let r=0;r<e;r++){const e=[];for(let t=0;t<n;t++)e.push(o[a++]);t.push(e)}i.push(t)}return t?r?{rings:i,hasZ:t,hasM:r}:{rings:i,hasZ:t}:r?{rings:i,hasM:r}:{rings:i}}function k(e,t,r=t.hasZ,n=t.hasM){return function(e,t,r,n){const o=d(r,n),{lengths:s,coords:i}=e;let a=0;ae(e);for(const e of t){for(const t of e)for(let e=0;e<o;e++)i[a++]=t[e];s.push(e.length)}return e}(e,t.rings,r,n)}const V=[],L=[];function z(e,t,r,n,o){V[0]=e;const[s]=Q(L,V,t,r,n,o);return ue(V),ue(L),s}function Q(e,t,r,o,s,i){if(ue(e),!r){for(const r of t){const t=i?r.attributes[i]:void 0;e.push(new l.Om(null,r.attributes,null,t))}return e}switch(r){case"esriGeometryPoint":return function(e,t,r,n,o){const s=D(r,n);for(const{geometry:r,attributes:n}of t){const t=null!=r?s(new h.A,r):null;e.push(new l.Om(t,n,null,o?n[o]:void 0))}return e}(e,t,o,s,i);case"esriGeometryMultipoint":return function(e,t,r,n,o){const s=d(r,n);for(const{geometry:r,attributes:n}of t){const t=null!=r?Z(new h.A,r,s):null;e.push(new l.Om(t,n,null,o?n[o]:void 0))}return e}(e,t,o,s,i);case"esriGeometryPolyline":return function(e,t,r,n,o){const s=d(r,n);for(const{geometry:r,attributes:n,centroid:i}of t){const t=null!=r?O(new h.A,r,s):null,a=null!=i?R(new h.A,i):null;e.push(new l.Om(t,n,a,o?n[o]:void 0))}return e}(e,t,o,s,i);case"esriGeometryPolygon":return function(e,t,r,n,o){for(const{geometry:s,centroid:i,attributes:a}of t){const t=null!=s?k(new h.A,s,r,n):null,u=o?a[o]:void 0;null!=i?e.push(new l.Om(t,a,S(new h.A,i),u)):e.push(new l.Om(t,a,null,u))}return e}(e,t,o,s,i);default:f().error("convertToFeatureSet:unknown-geometry",new n.A(`Unable to parse unknown geometry type '${r}'`)),ue(e)}return e}function E(e,t,r,n){L[0]=e,U(V,L,t,r,n);const o=V[0];return ue(V),ue(L),o}function Y(e,t,r){if(null==e)return null;const o=new h.A;return"hasZ"in e&&null==t&&(t=e.hasZ),"hasM"in e&&null==r&&(r=e.hasM),(0,u.fT)(e)?D(null!=t?t:null!=e.z,null!=r?r:null!=e.m)(o,e):(0,u.Bi)(e)?k(o,e,t,r):(0,u.Rg)(e)?O(o,e,d(t,r)):(0,u.U9)(e)?Z(o,e,d(t,r)):void f().error("convertFromGeometry:unknown-geometry",new n.A(`Unable to parse unknown geometry type '${e}'`))}function B(e,t,r,o){const s=e&&("coords"in e?e:e.geometry);if(null==s)return null;switch(t){case"esriGeometryPoint":{let e=P;return r&&o?e=N:r?e=G:o&&(e=A),e(s)}case"esriGeometryMultipoint":return v(s,r,o);case"esriGeometryPolyline":return q(s,r,o);case"esriGeometryPolygon":return j(s,r,o);default:return f().error("convertToGeometry:unknown-geometry",new n.A(`Unable to parse unknown geometry type '${t}'`)),null}}function U(e,t,r,o,s){if(ue(e),null==r)return function(e,t){for(const r of t)e.push({attributes:r.attributes});return e}(e,t);switch(r){case"esriGeometryPoint":return function(e,t,r,n){let o=P;r&&n?o=N:r?o=G:n&&(o=A);for(const r of t){const{geometry:t,attributes:n}=r,s=null!=t?o(t):null;e.push({attributes:n,geometry:s})}return e}(e,t,o,s);case"esriGeometryMultipoint":return function(e,t,r,n){for(const{geometry:o,attributes:s}of t)e.push({attributes:s,geometry:null!=o?v(o,r,n):null});return e}(e,t,o,s);case"esriGeometryPolyline":return function(e,t,r,n){for(const{geometry:o,attributes:s}of t)e.push({attributes:s,geometry:null!=o?q(o,r,n):null});return e}(e,t,o,s);case"esriGeometryPolygon":return function(e,t,r,n){for(const{geometry:o,attributes:s,centroid:i}of t){const t=null!=o?j(o,r,n):null;if(null!=i){const r=P(i);e.push({attributes:s,centroid:r,geometry:t})}else e.push({attributes:s,geometry:t})}return e}(e,t,o,s);default:f().error("convertToFeatureSet:unknown-geometry",new n.A(`Unable to parse unknown geometry type '${r}'`))}return e}function J(e){const{objectIdFieldName:t,spatialReference:r,transform:n,fields:o,hasM:s,hasZ:i,features:a,geometryType:u,exceededTransferLimit:l,uniqueIdField:c,queryGeometry:h,queryGeometryType:d}=e,f={features:U([],a,u,i,s),fields:o,geometryType:u,objectIdFieldName:t,spatialReference:r,uniqueIdField:c,queryGeometry:B(h,d,!1,!1)};return n&&(f.transform=n),l&&(f.exceededTransferLimit=l),s&&(f.hasM=s),i&&(f.hasZ=i),f}function X(e,t){const r=new c.A,{hasM:o,hasZ:s,features:i,objectIdFieldName:a,spatialReference:u,geometryType:l,exceededTransferLimit:h,transform:d,fields:m}=e;return m&&(r.fields=m),r.geometryType=l??null,r.objectIdFieldName=a??t??null,r.spatialReference=u??null,r.objectIdFieldName?(i&&Q(r.features,i,l,s,o,r.objectIdFieldName),h&&(r.exceededTransferLimit=h),o&&(r.hasM=o),s&&(r.hasZ=s),d&&(r.transform=d),r):(f().error(new n.A("optimized-features:invalid-objectIdFieldName","objectIdFieldName is missing")),r)}function $(e){const{transform:t,features:r,hasM:n,hasZ:o}=e;if(!t)return e;for(const e of r)null!=e.geometry&&ne(e.geometry,e.geometry,n,o,t),null!=e.centroid&&ne(e.centroid,e.centroid,n,o,t);return e.transform=null,e}function W(e,t){const{geometryType:r,features:n,hasM:o,hasZ:s}=t;if(!e)return t;for(let t=0;t<n.length;t++){const i=n[t],a=i.weakClone();a.geometry=new h.A,H(a.geometry,i.geometry,o,s,r,e),i.centroid&&(a.centroid=new h.A,H(a.centroid,i.centroid,o,s,"esriGeometryPoint",e)),n[t]=a}return t.transform=e,t}function H(e,t,r,n,o,s,i=r,a=n){if(ae(e),!t?.coords.length)return null;const u=m[o],{coords:l,lengths:c}=t,h=d(r,n),f=d(r&&i,n&&a),y=_(r,n,i,a);if(!c.length)return y(e.coords,l,0,0,w(s,l[0]),F(s,l[1])),ae(e,h,0),e;let p,g,b,I,x=0,P=0,S=P;for(const t of c){if(t<u)continue;let r=0;P=S,b=p=w(s,l[x]),I=g=F(s,l[x+1]),y(e.coords,l,P,x,b,I),r++,x+=h,P+=f;for(let n=1;n<t;n++,x+=h)b=w(s,l[x]),I=F(s,l[x+1]),b===p&&I===g||(y(e.coords,l,P,x,b-p,I-g),P+=f,r++,p=b,g=I);r>=u&&(e.lengths.push(r),S=P)}return ue(e.coords,S),e.coords.length?e:null}function K(e,t,r,n,o,s,i=r,a=n){if(ae(e),!t?.coords.length)return null;const u=m[o],{coords:l,lengths:c}=t,h=d(r,n),f=d(r&&i,n&&a),y=_(r,n,i,a);if(!c.length)return y(e.coords,l,0,0,l[0],l[1]),ae(e,h,0),e;let p=0;const g=s*s;for(const t of c){if(t<u){p+=t*h;continue}const r=e.coords.length/f,n=p,o=p+(t-1)*h;y(e.coords,l,e.coords.length,n,l[n],l[n+1]),te(e.coords,l,h,g,y,n,o),y(e.coords,l,e.coords.length,o,l[o],l[o+1]);const s=e.coords.length/f-r;s>=u?e.lengths.push(s):ue(e.coords,r*f),p+=t*h}return e.coords.length?e:null}function ee(e,t,r,n){const o=e[t],s=e[t+1],i=e[r],a=e[r+1],u=e[n],l=e[n+1];let c=i,h=a,d=u-c,f=l-h;if(0!==d||0!==f){const e=((o-c)*d+(s-h)*f)/(d*d+f*f);e>1?(c=u,h=l):e>0&&(c+=d*e,h+=f*e)}return d=o-c,f=s-h,d*d+f*f}function te(e,t,r,n,o,s,i){let a,u=n,l=0;for(let e=s+r;e<i;e+=r)a=ee(t,e,s,i),a>u&&(l=e,u=a);u>n&&(l-s>r&&te(e,t,r,n,o,s,l),o(e,t,e.length,l,t[l],t[l+1]),i-l>r&&te(e,t,r,n,o,l,i))}function re(e,t,r,n){if(!t?.coords?.length)return null;const o=d(r,n);let s=Number.POSITIVE_INFINITY,u=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,c=Number.NEGATIVE_INFINITY;if(t&&t.coords){const e=t.coords;for(let t=0;t<e.length;t+=o){const r=e[t],n=e[t+1];s=Math.min(s,r),l=Math.max(l,r),u=Math.min(u,n),c=Math.max(c,n)}}return(0,i.is)(e)?(0,i.BI)(e,s,u,l,c):(0,a.fA)(s,u,l,c,e),e}function ne(e,t,r,n,o){const{coords:i,lengths:a}=t,u=d(r,n);if(!i.length)return e!==t&&ae(e),e;(0,s.Lw)(o);const{originPosition:l,scale:c,translate:h}=o,f=le;f.originPosition=l;const m=f.scale;m[0]=c[0]??1,m[1]=-(c[1]??1),m[2]=c[2]??1,m[3]=c[3]??1;const y=f.translate;if(y[0]=h[0]??0,y[1]=h[1]??0,y[2]=h[2]??0,y[3]=h[3]??0,!a.length){for(let t=0;t<u;++t)e.coords[t]=I(f,i[t],t);return e!==t&&ae(e,u,0),e}let p=0;for(let t=0;t<a.length;t++){const r=a[t];e.lengths[t]=r;for(let t=0;t<u;++t)e.coords[p+t]=I(f,i[p+t],t);let n=e.coords[p],o=e.coords[p+1];p+=u;for(let t=1;t<r;t++,p+=u){n+=i[p]*m[0],o+=i[p+1]*m[1],e.coords[p]=n,e.coords[p+1]=o;for(let t=2;t<u;++t)e.coords[p+t]=I(f,i[p+t],t)}}return e!==t&&ae(e,i.length,a.length),e}function oe(e,t,r,n,o,s){if(ae(e),e.lengths.push(...t.lengths),r===o&&n===s)for(let r=0;r<t.coords.length;r++)e.coords.push(t.coords[r]);else{const i=d(r,n),a=_(r,n,o,s),u=t.coords;for(let t=0;t<u.length;t+=i)a(e.coords,u,e.coords.length,t,u[t],u[t+1])}return e}function se(e,t,r,n){let o=0,s=e[n*t],i=e[n*(t+1)];for(let a=1;a<r;a++){const r=s+e[n*(t+a)],u=i+e[n*(t+a)+1],l=(r-s)*(u+i);s=r,i=u,o+=l}return.5*o}function ie(e,t){const{coords:r,lengths:n}=e;let o=0,s=0;for(let e=0;e<n.length;e++){const i=n[e];s+=se(r,o,i,t),o+=i}return Math.abs(s)}function ae(e,t=0,r=0){ue(e.lengths,r),ue(e.coords,t)}function ue(e,t=0){e.length!==t&&(e.length=t)}const le={originPosition:"lowerLeft",scale:[1,1,1,1],translate:[0,0,0,0]}},93622:(e,t,r)=>{r.d(t,{A:()=>P});var n=r(90237),o=r(69622),s=r(49186),i=r(44208),a=r(74887),u=r(84952),l=r(10107),c=(r(53966),r(87811),r(40608)),h=r(21325),d=r(20557),f=r(27733),m=r(2272),y=r(20615),p=(r(59456),r(80893)),g=r(61956),b=r(5443),_=r(78286),w=r(99199),F=r(71575),I=r(22671);let x=class extends o.A{constructor(e){super(e),this.dynamicDataSource=null,this.fieldsIndex=null,this.gdbVersion=null,this.infoFor3D=null,this.pbfSupported=!1,this.queryAttachmentsSupported=!1,this.sourceSpatialReference=null,this.url=null}get parsedUrl(){return(0,u.An)(this.url)}async execute(e,t){const r=await this.executeJSON(e,t);return this.featureSetFromJSON(e,r,t)}async executeJSON(e,t){const r=this._normalizeQuery(e),n=null!=e.outStatistics?.[0],o=(0,i.A)("featurelayer-pbf-statistics"),s=!n||o;let a;if(this.pbfSupported&&s)try{a=await(0,F.S)(this.url,r,t)}catch(e){if("query:parsing-pbf"!==e.name)throw e;this.pbfSupported=!1}return this.pbfSupported&&s||(a=await(0,w.e)(this.url,r,t)),this._normalizeFields(a.fields),a}async featureSetFromJSON(e,t,n){if(!this._queryIs3DObjectFormat(e)||null==this.infoFor3D||!t.features)return I.A.fromJSON(t);const{meshFeatureSetFromJSON:o}=await(0,a.qr)(Promise.all([r.e(3030),r.e(4873),r.e(7761),r.e(7738),r.e(9755)]).then(r.bind(r,40050)),n);return o(e,this.infoFor3D,t)}executeForCount(e,t){return(0,y.I)(this.url,this._normalizeQuery(e),t)}executeForExtent(e,t){return async function(e,t,r){const n=(0,m.Dl)(e),o=await(0,p.Jf)(n,g.A.from(t),{...r}),s=o.data.extent;return!s||isNaN(s.xmin)||isNaN(s.ymin)||isNaN(s.xmax)||isNaN(s.ymax)?{count:o.data.count,extent:null}:{count:o.data.count,extent:b.A.fromJSON(s)}}(this.url,this._normalizeQuery(e),t)}executeForIds(e,t){return(0,_.V)(this.url,this._normalizeQuery(e),t)}async executeRelationshipQuery(e,t){const[{default:n},{executeRelationshipQuery:o}]=await(0,a.qr)(Promise.all([r.e(6591).then(r.bind(r,26591)),r.e(5257).then(r.bind(r,15257))]),t);return e=n.from(e),(this.gdbVersion||this.dynamicDataSource)&&((e=e.clone()).gdbVersion=e.gdbVersion||this.gdbVersion,e.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource),o(this.url,e,t)}async executeRelationshipQueryForCount(e,t){const[{default:n},{executeRelationshipQueryForCount:o}]=await(0,a.qr)(Promise.all([r.e(6591).then(r.bind(r,26591)),r.e(5257).then(r.bind(r,15257))]),t);return e=n.from(e),(this.gdbVersion||this.dynamicDataSource)&&((e=e.clone()).gdbVersion=e.gdbVersion||this.gdbVersion,e.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource),o(this.url,e,t)}async executeAttachmentQuery(e,t){const{executeAttachmentQuery:n,fetchAttachments:o,processAttachmentQueryResult:s}=await(0,a.qr)(r.e(5771).then(r.bind(r,65771)),t),i=(0,m.Dl)(this.url);return s(i,await(this.queryAttachmentsSupported?n(i,e,t):o(i,e,t)))}async executeTopFeaturesQuery(e,t){const{executeTopFeaturesQuery:n}=await(0,a.qr)(r.e(1273).then(r.bind(r,11273)),t);return n(this.parsedUrl,e,this.sourceSpatialReference,t)}async executeForTopIds(e,t){const{executeForTopIds:n}=await(0,a.qr)(r.e(1277).then(r.bind(r,21277)),t);return n(this.parsedUrl,e,t)}async executeForTopExtents(e,t){const{executeForTopExtents:n}=await(0,a.qr)(r.e(8018).then(r.bind(r,8018)),t);return n(this.parsedUrl,e,t)}async executeForTopCount(e,t){const{executeForTopCount:n}=await(0,a.qr)(r.e(980).then(r.bind(r,10980)),t);return n(this.parsedUrl,e,t)}_normalizeQuery(e){let t=g.A.from(e);t.sourceSpatialReference=t.sourceSpatialReference||this.sourceSpatialReference,(this.gdbVersion||this.dynamicDataSource)&&(t=t===e?t.clone():t,t.gdbVersion=e.gdbVersion||this.gdbVersion,t.dynamicDataSource=e.dynamicDataSource?f.L.from(e.dynamicDataSource):this.dynamicDataSource);const{infoFor3D:r}=this;if(null!=r&&this._queryIs3DObjectFormat(e)){t=t===e?t.clone():t,t.formatOf3DObjects=null;const{supportedFormats:n,queryFormats:o}=r,i=(0,d.R_)("model/gltf-binary",n)??(0,d.E1)("glb",n),a=(0,d.R_)("model/gltf+json",n)??(0,d.E1)("gltf",n);for(const e of o){if(e===i){t.formatOf3DObjects=e;break}e!==a||t.formatOf3DObjects||(t.formatOf3DObjects=e)}if(!t.formatOf3DObjects)throw new s.A("query:unsupported-3d-query-formats","Could not find any supported 3D object query format. Only supported formats are 3D_glb and 3D_gltf");if(t.outSpatialReference&&!(0,h.aI)(t.outSpatialReference,this.sourceSpatialReference))throw new s.A("query:unsupported-out-spatial-reference","3D object feature services do not support projection of geometries");if(null==t.outFields||!t.outFields.includes("*")){t=t===e?t.clone():t,null==t.outFields&&(t.outFields=[]);const{originX:n,originY:o,originZ:s,translationX:i,translationY:a,translationZ:u,scaleX:l,scaleY:c,scaleZ:h,rotationX:d,rotationY:f,rotationZ:m,rotationDeg:y}=r.transformFieldRoles;t.outFields.push(n,o,s,i,a,u,l,c,h,d,f,m,y)}}return t}_normalizeFields(e){if(null!=this.fieldsIndex&&null!=e)for(const t of e){const e=this.fieldsIndex.get(t.name);e&&Object.assign(t,e.toJSON())}}_queryIs3DObjectFormat(e){return null!=this.infoFor3D&&!0===e.returnGeometry&&"xyFootprint"!==e.multipatchOption&&!e.outStatistics}};(0,n._)([(0,l.MZ)({type:f.L})],x.prototype,"dynamicDataSource",void 0),(0,n._)([(0,l.MZ)()],x.prototype,"fieldsIndex",void 0),(0,n._)([(0,l.MZ)()],x.prototype,"gdbVersion",void 0),(0,n._)([(0,l.MZ)()],x.prototype,"infoFor3D",void 0),(0,n._)([(0,l.MZ)({readOnly:!0})],x.prototype,"parsedUrl",null),(0,n._)([(0,l.MZ)()],x.prototype,"pbfSupported",void 0),(0,n._)([(0,l.MZ)()],x.prototype,"queryAttachmentsSupported",void 0),(0,n._)([(0,l.MZ)()],x.prototype,"sourceSpatialReference",void 0),(0,n._)([(0,l.MZ)({type:String})],x.prototype,"url",void 0),x=(0,n._)([(0,c.$)("esri.layers.graphics.sources.support.QueryTask")],x);const P=x},20557:(e,t,r)=>{r.d(t,{E1:()=>a,Fm:()=>u,JZ:()=>m,R_:()=>i,fu:()=>o,oF:()=>s,rq:()=>l});const n=[["binary","application/octet-stream","bin",""]];function o(e,t){return null!=h(t.name,e?.supportedFormats??[])}function s(e,t){if(!e)return!1;const r=l(t,e.supportedFormats??[]);return null!=r&&e.editFormats.includes(r)}function i(e,t){return d(function(e,t){const r=e.toLowerCase();return c(t).find((e=>f(e)===r))}(e,t))}function a(e,t){return d(h(e,t))}function u(e,t){return f(function(e,t){return c(t).find((t=>d(t)===e))}(e,t))}function l(e,t){return a(e.name,t)??i(e.type,t)}function c(e){return[...n,...e]}function h(e,t){const r=e.toLowerCase();return c(t).find((e=>function(e){return e?.[2].split(",").map((e=>e.toLowerCase()))??[]}(e).some((e=>r.endsWith(e)))))}function d(e){return e?.[0]}function f(e){return e?.[1].toLowerCase()}function m(e){return e.tables?.find((e=>"assetMaps"===e.role))}},20615:(e,t,r)=>{r.d(t,{I:()=>i});var n=r(2272),o=r(80893),s=r(61956);async function i(e,t,r){const i=(0,n.Dl)(e);return(0,o.gW)(i,s.A.from(t),{...r}).then((e=>e.data.count))}},78286:(e,t,r)=>{r.d(t,{V:()=>i});var n=r(2272),o=r(80893),s=r(61956);async function i(e,t,r){const i=(0,n.Dl)(e);return(0,o.Pk)(i,s.A.from(t),{...r}).then((e=>e.data.objectIds))}},99199:(e,t,r)=>{r.d(t,{e:()=>u,s:()=>a});var n=r(2272),o=r(80893),s=r(22671),i=r(61956);async function a(e,t,r){const n=await u(e,t,r);return s.A.fromJSON(n)}async function u(e,t,r){const s=(0,n.Dl)(e),a={...r},u=i.A.from(t),{data:l}=await(0,o.eW)(s,u,u.sourceSpatialReference,a);return l}},71575:(e,t,r)=>{r.d(t,{S:()=>p});var n=r(2272),o=r(97768),s=r(62815),i=r(90708);function a(e,t){return t}function u(e,t,r,n){switch(r){case 0:return d(e,t+n,0);case 1:return"lowerLeft"===e.originPosition?d(e,t+n,1):function({translate:e,scale:t},r,n){return e[n]-r*t[n]}(e,t+n,1)}}function l(e,t,r,n){return 2===r?d(e,t,2):u(e,t,r,n)}function c(e,t,r,n){return 2===r?0===t?0:d(e,t,3):u(e,t,r,n)}function h(e,t,r,n){return 3===r?0===t?0:d(e,t,3):l(e,t,r,n)}function d({translate:e,scale:t},r,n){return e[n]+r*t[n]}class f{constructor(e){this._options=e,this.geometryTypes=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"],this._previousCoordinate=[0,0],this._transform=null,this._applyTransform=a,this._lengths=[],this._currentLengthIndex=0,this._toAddInCurrentPath=0,this._vertexDimension=0,this._mValueOffset=null,this._coordinateBuffer=null,this._coordinateBufferPtr=0,this._attributesConstructor=class{}}createFeatureResult(){return{fields:[],features:[]}}finishFeatureResult(e){if(this._options.applyTransform&&(e.transform=null),this._attributesConstructor=class{},this._coordinateBuffer=null,this._lengths.length=0,!e.hasZ)return;const t=(0,s.N)(e.geometryType,this._options.sourceSpatialReference,e.spatialReference);if(null!=t)for(const r of e.features)t(r.geometry)}createSpatialReference(){return{}}addField(e,t){const r=e.fields;(0,o.Lw)(r),r.push(t);const n=r.map((e=>e.name));this._attributesConstructor=function(){for(const e of n)this[e]=null}}addFeature(e,t){e.features.push(t)}prepareFeatures(e){switch(this._transform=e.transform,this._options.applyTransform&&e.transform&&(this._applyTransform=this._deriveApplyTransform(e)),this._mValueOffset=null,this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&(this._mValueOffset=this._vertexDimension,this._vertexDimension++),e.geometryType){case"esriGeometryPoint":this.addCoordinate=(e,t,r)=>this.addCoordinatePoint(e,t,r),this.createGeometry=e=>this.createPointGeometry(e);break;case"esriGeometryPolygon":this.addCoordinate=(e,t,r)=>this._addCoordinatePolygon(e,t,r),this.createGeometry=e=>this._createPolygonGeometry(e);break;case"esriGeometryPolyline":this.addCoordinate=(e,t,r)=>this._addCoordinatePolyline(e,t,r),this.createGeometry=e=>this._createPolylineGeometry(e);break;case"esriGeometryMultipoint":this.addCoordinate=(e,t,r)=>this._addCoordinateMultipoint(e,t,r),this.createGeometry=e=>this._createMultipointGeometry(e)}}createFeature(){return this._lengths.length=0,this._currentLengthIndex=0,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,{attributes:new this._attributesConstructor}}allocateCoordinates(){}addLength(e,t,r){0===this._lengths.length&&(this._toAddInCurrentPath=t),this._lengths.push(t)}addQueryGeometry(e,t){const{queryGeometry:r,queryGeometryType:n}=t,o=(0,i.Ch)(r.clone(),r,!1,!1,this._transform),s=(0,i.zv)(o,n,!1,!1);e.queryGeometryType=n,e.queryGeometry={...s}}createPointGeometry(e){const t={x:0,y:0,spatialReference:e.spatialReference};return e.hasZ&&(t.z=0),e.hasM&&(t.m=0),t}addCoordinatePoint(e,t,r){const n=this._transform;switch(t=this._applyTransform(n,t,r,0),r){case 0:e.x=t;break;case 1:e.y=t;break;case 2:"z"in e?e.z=t:e.m=t;break;case 3:e.m=t}}_transformPathLikeValue(e,t){let r=0;t<=1&&(r=this._previousCoordinate[t],this._previousCoordinate[t]+=e);const n=this._transform;return null===this._mValueOffset||0!==e||t%this._mValueOffset?this._applyTransform(n,e,t,r):0}_addCoordinatePolyline(e,t,r){this._dehydratedAddPointsCoordinate(e.paths,t,r)}_addCoordinatePolygon(e,t,r){this._dehydratedAddPointsCoordinate(e.rings,t,r)}_addCoordinateMultipoint(e,t,r){0===r&&e.points.push([]);const n=this._transformPathLikeValue(t,r);e.points[e.points.length-1].push(n)}_createPolygonGeometry(e){return{rings:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createPolylineGeometry(e){return{paths:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createMultipointGeometry(e){return{points:[],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_dehydratedAddPointsCoordinate(e,t,r){0===r&&0==this._toAddInCurrentPath--&&(e.push([]),this._toAddInCurrentPath=this._lengths[++this._currentLengthIndex]-1,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0);const n=this._transformPathLikeValue(t,r),o=e[e.length-1];0===r&&(this._coordinateBufferPtr=0,this._coordinateBuffer=new Array(this._vertexDimension),o.push(this._coordinateBuffer)),this._coordinateBuffer[this._coordinateBufferPtr++]=n}_deriveApplyTransform(e){const{hasZ:t,hasM:r}=e;return t&&r?h:t?l:r?c:u}}var m=r(80893),y=(r(22671),r(61956));async function p(e,t,r){const o=(0,n.Dl)(e),s={...r},i=y.A.from(t),a=!i.quantizationParameters,{data:u}=await(0,m.IJ)(o,i,new f({sourceSpatialReference:i.sourceSpatialReference,applyTransform:a}),s);return u}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3622],{43334:(e,t,r)=>{r.d(t,{N3:()=>o,Om:()=>n});class n{constructor(e=null,t={},r,n){this.geometry=e,this.attributes=t,this.centroid=r,this.objectId=n,this.displayId=0,this.geohashX=0,this.geohashY=0}weakClone(){const e=new n(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e.geohashX=this.geohashX,e.geohashY=this.geohashY,e}clone(){const e=this.geometry?.clone(),t=new n(e,{...this.attributes},this.centroid?.clone(),this.objectId);return t.displayId=this.displayId,t.geohashX=this.geohashX,t.geohashY=this.geohashY,t}}function o(e){return!!e.geometry?.coords?.length}},58512:(e,t,r)=>{r.d(t,{A:()=>n});class n{constructor(){this.objectIdFieldName=null,this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){const e=new n;return e.objectIdFieldName=this.objectIdFieldName,e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}},92722:(e,t,r)=>{r.d(t,{A:()=>n});class n{constructor(e=[],t=[],r=!1){this.lengths=e??[],this.coords=t??[],this.hasIndeterminateRingOrder=r}static fromRect(e){const[t,r,o,s]=e,i=o-t,a=s-r;return new n([5],[t,r,i,0,0,a,-i,0,0,-a])}get isPoint(){return 0===this.lengths.length}get maxLength(){return Math.max(...this.lengths)}get size(){return this.lengths.reduce(((e,t)=>e+t))}forEachVertex(e){let t=0;this.lengths.length||e(this.coords[0],this.coords[1]);for(let r=0;r<this.lengths.length;r++){const n=this.lengths[r];for(let r=0;r<n;r++)e(this.coords[2*(r+t)],this.coords[2*(r+t)+1]);t+=n}}deltaDecode(){const e=this.clone(),{coords:t,lengths:r}=e;let n=0;for(const e of r){for(let r=1;r<e;r++)t[2*(n+r)]+=t[2*(n+r)-2],t[2*(n+r)+1]+=t[2*(n+r)-1];n+=e}return e}clone(e){if(0===this.lengths.length)return new n([],[this.coords[0],this.coords[1]]);const t=2*(0===this.lengths.length?1:this.lengths.reduce(((e,t)=>e+t))),r=this.coords.slice(0,t);return e?(e.set(r),new n(this.lengths,e,this.hasIndeterminateRingOrder)):new n(Array.from(this.lengths),Array.from(r),this.hasIndeterminateRingOrder)}}},90708:(e,t,r)=>{r.d(t,{B2:()=>F,BW:()=>q,Ch:()=>ne,DF:()=>x,Di:()=>Q,E2:()=>z,IE:()=>w,Nl:()=>H,Q4:()=>oe,Rk:()=>ie,Ux:()=>Y,Ye:()=>k,ZF:()=>J,eY:()=>$,jH:()=>W,jQ:()=>re,kz:()=>K,oN:()=>E,q3:()=>X,qK:()=>v,qN:()=>R,z5:()=>j,zv:()=>B});var n=r(49186),o=r(53966),s=r(97768),i=r(70328),a=r(19419),u=r(65864),l=r(43334),c=r(58512),h=r(92722);function d(e,t){return e?t?4:3:t?3:2}const f=()=>o.A.getLogger("esri.layers.graphics.featureConversionUtils"),m={esriGeometryPoint:0,esriGeometryPolyline:2,esriGeometryPolygon:3,esriGeometryMultipoint:0,esriGeometryEnvelope:0},y=(e,t,r,n,o,s)=>{e[r]=o,e[r+1]=s},p=(e,t,r,n,o,s)=>{e[r]=o,e[r+1]=s,e[r+2]=t[n+2]},g=(e,t,r,n,o,s)=>{e[r]=o,e[r+1]=s,e[r+2]=t[n+3]},b=(e,t,r,n,o,s)=>{e[r]=o,e[r+1]=s,e[r+2]=t[n+2],e[r+3]=t[n+3]};function _(e,t,r,n){if(e){if(r)return t&&n?b:p;if(t&&n)return g}else if(t&&n)return p;return y}function w({scale:e,translate:t},r){return Math.round((r-t[0])/e[0])}function F({scale:e,translate:t},r){return Math.round((t[1]-r)/e[1])}function I({scale:e,translate:t},r,n){return r*e[n]+t[n]}function x(e,t,r){return e?t?r?N(e):G(e):r?A(e):P(e):null}function P(e){const t=e.coords;return{x:t[0],y:t[1]}}function S(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e}function G(e){const t=e.coords;return{x:t[0],y:t[1],z:t[2]}}function M(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.z,e}function A(e){const t=e.coords;return{x:t[0],y:t[1],m:t[2]}}function T(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.m,e}function N(e){const t=e.coords;return{x:t[0],y:t[1],z:t[2],m:t[3]}}function C(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.z,e.coords[3]=t.m,e}function D(e,t){return e&&t?C:e?M:t?T:S}function R(e,t,r=D(null!=t.z,null!=t.m)){return r(e,t)}function v(e,t,r){if(null==e)return null;const n=d(t,r),o=[];for(let t=0;t<e.coords.length;t+=n){const r=[];for(let o=0;o<n;o++)r.push(e.coords[t+o]);o.push(r)}return t?r?{points:o,hasZ:t,hasM:r}:{points:o,hasZ:t}:r?{points:o,hasM:r}:{points:o}}function Z(e,t,r=d(t.hasZ,t.hasM)){e.lengths[0]=t.points.length;const n=e.coords;let o=0;for(const e of t.points)for(let t=0;t<r;t++)n[o++]=e[t];return e}function q(e,t,r){if(!e)return null;const n=d(t,r),{coords:o,lengths:s}=e,i=[];let a=0;for(const e of s){const t=[];for(let r=0;r<e;r++){const e=[];for(let t=0;t<n;t++)e.push(o[a++]);t.push(e)}i.push(t)}return t?r?{paths:i,hasZ:t,hasM:r}:{paths:i,hasZ:t}:r?{paths:i,hasM:r}:{paths:i}}function O(e,t,r=d(t.hasZ,t.hasM)){const{lengths:n,coords:o}=e;let s=0;for(const e of t.paths){for(const t of e)for(let e=0;e<r;e++)o[s++]=t[e];n.push(e.length)}return e}function j(e,t,r){if(!e)return null;const n=d(t,r),{coords:o,lengths:s}=e,i=[];let a=0;for(const e of s){const t=[];for(let r=0;r<e;r++){const e=[];for(let t=0;t<n;t++)e.push(o[a++]);t.push(e)}i.push(t)}return t?r?{rings:i,hasZ:t,hasM:r}:{rings:i,hasZ:t}:r?{rings:i,hasM:r}:{rings:i}}function k(e,t,r=t.hasZ,n=t.hasM){return function(e,t,r,n){const o=d(r,n),{lengths:s,coords:i}=e;let a=0;ae(e);for(const e of t){for(const t of e)for(let e=0;e<o;e++)i[a++]=t[e];s.push(e.length)}return e}(e,t.rings,r,n)}const V=[],L=[];function z(e,t,r,n,o){V[0]=e;const[s]=Q(L,V,t,r,n,o);return ue(V),ue(L),s}function Q(e,t,r,o,s,i){if(ue(e),!r){for(const r of t){const t=i?r.attributes[i]:void 0;e.push(new l.Om(null,r.attributes,null,t))}return e}switch(r){case"esriGeometryPoint":return function(e,t,r,n,o){const s=D(r,n);for(const{geometry:r,attributes:n}of t){const t=null!=r?s(new h.A,r):null;e.push(new l.Om(t,n,null,o?n[o]:void 0))}return e}(e,t,o,s,i);case"esriGeometryMultipoint":return function(e,t,r,n,o){const s=d(r,n);for(const{geometry:r,attributes:n}of t){const t=null!=r?Z(new h.A,r,s):null;e.push(new l.Om(t,n,null,o?n[o]:void 0))}return e}(e,t,o,s,i);case"esriGeometryPolyline":return function(e,t,r,n,o){const s=d(r,n);for(const{geometry:r,attributes:n,centroid:i}of t){const t=null!=r?O(new h.A,r,s):null,a=null!=i?R(new h.A,i):null;e.push(new l.Om(t,n,a,o?n[o]:void 0))}return e}(e,t,o,s,i);case"esriGeometryPolygon":return function(e,t,r,n,o){for(const{geometry:s,centroid:i,attributes:a}of t){const t=null!=s?k(new h.A,s,r,n):null,u=o?a[o]:void 0;null!=i?e.push(new l.Om(t,a,S(new h.A,i),u)):e.push(new l.Om(t,a,null,u))}return e}(e,t,o,s,i);default:f().error("convertToFeatureSet:unknown-geometry",new n.A(`Unable to parse unknown geometry type '${r}'`)),ue(e)}return e}function E(e,t,r,n){L[0]=e,U(V,L,t,r,n);const o=V[0];return ue(V),ue(L),o}function Y(e,t,r){if(null==e)return null;const o=new h.A;return"hasZ"in e&&null==t&&(t=e.hasZ),"hasM"in e&&null==r&&(r=e.hasM),(0,u.fT)(e)?D(null!=t?t:null!=e.z,null!=r?r:null!=e.m)(o,e):(0,u.Bi)(e)?k(o,e,t,r):(0,u.Rg)(e)?O(o,e,d(t,r)):(0,u.U9)(e)?Z(o,e,d(t,r)):void f().error("convertFromGeometry:unknown-geometry",new n.A(`Unable to parse unknown geometry type '${e}'`))}function B(e,t,r,o){const s=e&&("coords"in e?e:e.geometry);if(null==s)return null;switch(t){case"esriGeometryPoint":{let e=P;return r&&o?e=N:r?e=G:o&&(e=A),e(s)}case"esriGeometryMultipoint":return v(s,r,o);case"esriGeometryPolyline":return q(s,r,o);case"esriGeometryPolygon":return j(s,r,o);default:return f().error("convertToGeometry:unknown-geometry",new n.A(`Unable to parse unknown geometry type '${t}'`)),null}}function U(e,t,r,o,s){if(ue(e),null==r)return function(e,t){for(const r of t)e.push({attributes:r.attributes});return e}(e,t);switch(r){case"esriGeometryPoint":return function(e,t,r,n){let o=P;r&&n?o=N:r?o=G:n&&(o=A);for(const r of t){const{geometry:t,attributes:n}=r,s=null!=t?o(t):null;e.push({attributes:n,geometry:s})}return e}(e,t,o,s);case"esriGeometryMultipoint":return function(e,t,r,n){for(const{geometry:o,attributes:s}of t)e.push({attributes:s,geometry:null!=o?v(o,r,n):null});return e}(e,t,o,s);case"esriGeometryPolyline":return function(e,t,r,n){for(const{geometry:o,attributes:s}of t)e.push({attributes:s,geometry:null!=o?q(o,r,n):null});return e}(e,t,o,s);case"esriGeometryPolygon":return function(e,t,r,n){for(const{geometry:o,attributes:s,centroid:i}of t){const t=null!=o?j(o,r,n):null;if(null!=i){const r=P(i);e.push({attributes:s,centroid:r,geometry:t})}else e.push({attributes:s,geometry:t})}return e}(e,t,o,s);default:f().error("convertToFeatureSet:unknown-geometry",new n.A(`Unable to parse unknown geometry type '${r}'`))}return e}function J(e){const{objectIdFieldName:t,spatialReference:r,transform:n,fields:o,hasM:s,hasZ:i,features:a,geometryType:u,exceededTransferLimit:l,uniqueIdField:c,queryGeometry:h,queryGeometryType:d}=e,f={features:U([],a,u,i,s),fields:o,geometryType:u,objectIdFieldName:t,spatialReference:r,uniqueIdField:c,queryGeometry:B(h,d,!1,!1)};return n&&(f.transform=n),l&&(f.exceededTransferLimit=l),s&&(f.hasM=s),i&&(f.hasZ=i),f}function X(e,t){const r=new c.A,{hasM:o,hasZ:s,features:i,objectIdFieldName:a,spatialReference:u,geometryType:l,exceededTransferLimit:h,transform:d,fields:m}=e;return m&&(r.fields=m),r.geometryType=l??null,r.objectIdFieldName=a??t??null,r.spatialReference=u??null,r.objectIdFieldName?(i&&Q(r.features,i,l,s,o,r.objectIdFieldName),h&&(r.exceededTransferLimit=h),o&&(r.hasM=o),s&&(r.hasZ=s),d&&(r.transform=d),r):(f().error(new n.A("optimized-features:invalid-objectIdFieldName","objectIdFieldName is missing")),r)}function $(e){const{transform:t,features:r,hasM:n,hasZ:o}=e;if(!t)return e;for(const e of r)null!=e.geometry&&ne(e.geometry,e.geometry,n,o,t),null!=e.centroid&&ne(e.centroid,e.centroid,n,o,t);return e.transform=null,e}function W(e,t){const{geometryType:r,features:n,hasM:o,hasZ:s}=t;if(!e)return t;for(let t=0;t<n.length;t++){const i=n[t],a=i.weakClone();a.geometry=new h.A,H(a.geometry,i.geometry,o,s,r,e),i.centroid&&(a.centroid=new h.A,H(a.centroid,i.centroid,o,s,"esriGeometryPoint",e)),n[t]=a}return t.transform=e,t}function H(e,t,r,n,o,s,i=r,a=n){if(ae(e),!t?.coords.length)return null;const u=m[o],{coords:l,lengths:c}=t,h=d(r,n),f=d(r&&i,n&&a),y=_(r,n,i,a);if(!c.length)return y(e.coords,l,0,0,w(s,l[0]),F(s,l[1])),ae(e,h,0),e;let p,g,b,I,x=0,P=0,S=P;for(const t of c){if(t<u)continue;let r=0;P=S,b=p=w(s,l[x]),I=g=F(s,l[x+1]),y(e.coords,l,P,x,b,I),r++,x+=h,P+=f;for(let n=1;n<t;n++,x+=h)b=w(s,l[x]),I=F(s,l[x+1]),b===p&&I===g||(y(e.coords,l,P,x,b-p,I-g),P+=f,r++,p=b,g=I);r>=u&&(e.lengths.push(r),S=P)}return ue(e.coords,S),e.coords.length?e:null}function K(e,t,r,n,o,s,i=r,a=n){if(ae(e),!t?.coords.length)return null;const u=m[o],{coords:l,lengths:c}=t,h=d(r,n),f=d(r&&i,n&&a),y=_(r,n,i,a);if(!c.length)return y(e.coords,l,0,0,l[0],l[1]),ae(e,h,0),e;let p=0;const g=s*s;for(const t of c){if(t<u){p+=t*h;continue}const r=e.coords.length/f,n=p,o=p+(t-1)*h;y(e.coords,l,e.coords.length,n,l[n],l[n+1]),te(e.coords,l,h,g,y,n,o),y(e.coords,l,e.coords.length,o,l[o],l[o+1]);const s=e.coords.length/f-r;s>=u?e.lengths.push(s):ue(e.coords,r*f),p+=t*h}return e.coords.length?e:null}function ee(e,t,r,n){const o=e[t],s=e[t+1],i=e[r],a=e[r+1],u=e[n],l=e[n+1];let c=i,h=a,d=u-c,f=l-h;if(0!==d||0!==f){const e=((o-c)*d+(s-h)*f)/(d*d+f*f);e>1?(c=u,h=l):e>0&&(c+=d*e,h+=f*e)}return d=o-c,f=s-h,d*d+f*f}function te(e,t,r,n,o,s,i){let a,u=n,l=0;for(let e=s+r;e<i;e+=r)a=ee(t,e,s,i),a>u&&(l=e,u=a);u>n&&(l-s>r&&te(e,t,r,n,o,s,l),o(e,t,e.length,l,t[l],t[l+1]),i-l>r&&te(e,t,r,n,o,l,i))}function re(e,t,r,n){if(!t?.coords?.length)return null;const o=d(r,n);let s=Number.POSITIVE_INFINITY,u=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,c=Number.NEGATIVE_INFINITY;if(t&&t.coords){const e=t.coords;for(let t=0;t<e.length;t+=o){const r=e[t],n=e[t+1];s=Math.min(s,r),l=Math.max(l,r),u=Math.min(u,n),c=Math.max(c,n)}}return(0,i.is)(e)?(0,i.BI)(e,s,u,l,c):(0,a.fA)(s,u,l,c,e),e}function ne(e,t,r,n,o){const{coords:i,lengths:a}=t,u=d(r,n);if(!i.length)return e!==t&&ae(e),e;(0,s.Lw)(o);const{originPosition:l,scale:c,translate:h}=o,f=le;f.originPosition=l;const m=f.scale;m[0]=c[0]??1,m[1]=-(c[1]??1),m[2]=c[2]??1,m[3]=c[3]??1;const y=f.translate;if(y[0]=h[0]??0,y[1]=h[1]??0,y[2]=h[2]??0,y[3]=h[3]??0,!a.length){for(let t=0;t<u;++t)e.coords[t]=I(f,i[t],t);return e!==t&&ae(e,u,0),e}let p=0;for(let t=0;t<a.length;t++){const r=a[t];e.lengths[t]=r;for(let t=0;t<u;++t)e.coords[p+t]=I(f,i[p+t],t);let n=e.coords[p],o=e.coords[p+1];p+=u;for(let t=1;t<r;t++,p+=u){n+=i[p]*m[0],o+=i[p+1]*m[1],e.coords[p]=n,e.coords[p+1]=o;for(let t=2;t<u;++t)e.coords[p+t]=I(f,i[p+t],t)}}return e!==t&&ae(e,i.length,a.length),e}function oe(e,t,r,n,o,s){if(ae(e),e.lengths.push(...t.lengths),r===o&&n===s)for(let r=0;r<t.coords.length;r++)e.coords.push(t.coords[r]);else{const i=d(r,n),a=_(r,n,o,s),u=t.coords;for(let t=0;t<u.length;t+=i)a(e.coords,u,e.coords.length,t,u[t],u[t+1])}return e}function se(e,t,r,n){let o=0,s=e[n*t],i=e[n*(t+1)];for(let a=1;a<r;a++){const r=s+e[n*(t+a)],u=i+e[n*(t+a)+1],l=(r-s)*(u+i);s=r,i=u,o+=l}return.5*o}function ie(e,t){const{coords:r,lengths:n}=e;let o=0,s=0;for(let e=0;e<n.length;e++){const i=n[e];s+=se(r,o,i,t),o+=i}return Math.abs(s)}function ae(e,t=0,r=0){ue(e.lengths,r),ue(e.coords,t)}function ue(e,t=0){e.length!==t&&(e.length=t)}const le={originPosition:"lowerLeft",scale:[1,1,1,1],translate:[0,0,0,0]}},93622:(e,t,r)=>{r.d(t,{A:()=>P});var n=r(90237),o=r(69622),s=r(49186),i=r(44208),a=r(74887),u=r(84952),l=r(10107),c=(r(53966),r(87811),r(40608)),h=r(21325),d=r(20557),f=r(27733),m=r(2272),y=r(20615),p=(r(59456),r(80893)),g=r(61956),b=r(5443),_=r(78286),w=r(99199),F=r(71575),I=r(22671);let x=class extends o.A{constructor(e){super(e),this.dynamicDataSource=null,this.fieldsIndex=null,this.gdbVersion=null,this.infoFor3D=null,this.pbfSupported=!1,this.queryAttachmentsSupported=!1,this.sourceSpatialReference=null,this.url=null}get parsedUrl(){return(0,u.An)(this.url)}async execute(e,t){const r=await this.executeJSON(e,t);return this.featureSetFromJSON(e,r,t)}async executeJSON(e,t){const r=this._normalizeQuery(e),n=null!=e.outStatistics?.[0],o=(0,i.A)("featurelayer-pbf-statistics"),s=!n||o;let a;if(this.pbfSupported&&s)try{a=await(0,F.S)(this.url,r,t)}catch(e){if("query:parsing-pbf"!==e.name)throw e;this.pbfSupported=!1}return this.pbfSupported&&s||(a=await(0,w.e)(this.url,r,t)),this._normalizeFields(a.fields),a}async featureSetFromJSON(e,t,n){if(!this._queryIs3DObjectFormat(e)||null==this.infoFor3D||!t.features)return I.A.fromJSON(t);const{meshFeatureSetFromJSON:o}=await(0,a.qr)(Promise.all([r.e(3030),r.e(4873),r.e(7761),r.e(7738),r.e(9755)]).then(r.bind(r,40050)),n);return o(e,this.infoFor3D,t)}executeForCount(e,t){return(0,y.I)(this.url,this._normalizeQuery(e),t)}executeForExtent(e,t){return async function(e,t,r){const n=(0,m.Dl)(e),o=await(0,p.Jf)(n,g.A.from(t),{...r}),s=o.data.extent;return!s||isNaN(s.xmin)||isNaN(s.ymin)||isNaN(s.xmax)||isNaN(s.ymax)?{count:o.data.count,extent:null}:{count:o.data.count,extent:b.A.fromJSON(s)}}(this.url,this._normalizeQuery(e),t)}executeForIds(e,t){return(0,_.V)(this.url,this._normalizeQuery(e),t)}async executeRelationshipQuery(e,t){const[{default:n},{executeRelationshipQuery:o}]=await(0,a.qr)(Promise.all([Promise.resolve().then(r.bind(r,26591)),r.e(5257).then(r.bind(r,15257))]),t);return e=n.from(e),(this.gdbVersion||this.dynamicDataSource)&&((e=e.clone()).gdbVersion=e.gdbVersion||this.gdbVersion,e.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource),o(this.url,e,t)}async executeRelationshipQueryForCount(e,t){const[{default:n},{executeRelationshipQueryForCount:o}]=await(0,a.qr)(Promise.all([Promise.resolve().then(r.bind(r,26591)),r.e(5257).then(r.bind(r,15257))]),t);return e=n.from(e),(this.gdbVersion||this.dynamicDataSource)&&((e=e.clone()).gdbVersion=e.gdbVersion||this.gdbVersion,e.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource),o(this.url,e,t)}async executeAttachmentQuery(e,t){const{executeAttachmentQuery:n,fetchAttachments:o,processAttachmentQueryResult:s}=await(0,a.qr)(r.e(5771).then(r.bind(r,65771)),t),i=(0,m.Dl)(this.url);return s(i,await(this.queryAttachmentsSupported?n(i,e,t):o(i,e,t)))}async executeTopFeaturesQuery(e,t){const{executeTopFeaturesQuery:n}=await(0,a.qr)(r.e(1273).then(r.bind(r,11273)),t);return n(this.parsedUrl,e,this.sourceSpatialReference,t)}async executeForTopIds(e,t){const{executeForTopIds:n}=await(0,a.qr)(r.e(1277).then(r.bind(r,21277)),t);return n(this.parsedUrl,e,t)}async executeForTopExtents(e,t){const{executeForTopExtents:n}=await(0,a.qr)(r.e(8018).then(r.bind(r,8018)),t);return n(this.parsedUrl,e,t)}async executeForTopCount(e,t){const{executeForTopCount:n}=await(0,a.qr)(r.e(980).then(r.bind(r,10980)),t);return n(this.parsedUrl,e,t)}_normalizeQuery(e){let t=g.A.from(e);t.sourceSpatialReference=t.sourceSpatialReference||this.sourceSpatialReference,(this.gdbVersion||this.dynamicDataSource)&&(t=t===e?t.clone():t,t.gdbVersion=e.gdbVersion||this.gdbVersion,t.dynamicDataSource=e.dynamicDataSource?f.L.from(e.dynamicDataSource):this.dynamicDataSource);const{infoFor3D:r}=this;if(null!=r&&this._queryIs3DObjectFormat(e)){t=t===e?t.clone():t,t.formatOf3DObjects=null;const{supportedFormats:n,queryFormats:o}=r,i=(0,d.R_)("model/gltf-binary",n)??(0,d.E1)("glb",n),a=(0,d.R_)("model/gltf+json",n)??(0,d.E1)("gltf",n);for(const e of o){if(e===i){t.formatOf3DObjects=e;break}e!==a||t.formatOf3DObjects||(t.formatOf3DObjects=e)}if(!t.formatOf3DObjects)throw new s.A("query:unsupported-3d-query-formats","Could not find any supported 3D object query format. Only supported formats are 3D_glb and 3D_gltf");if(t.outSpatialReference&&!(0,h.aI)(t.outSpatialReference,this.sourceSpatialReference))throw new s.A("query:unsupported-out-spatial-reference","3D object feature services do not support projection of geometries");if(null==t.outFields||!t.outFields.includes("*")){t=t===e?t.clone():t,null==t.outFields&&(t.outFields=[]);const{originX:n,originY:o,originZ:s,translationX:i,translationY:a,translationZ:u,scaleX:l,scaleY:c,scaleZ:h,rotationX:d,rotationY:f,rotationZ:m,rotationDeg:y}=r.transformFieldRoles;t.outFields.push(n,o,s,i,a,u,l,c,h,d,f,m,y)}}return t}_normalizeFields(e){if(null!=this.fieldsIndex&&null!=e)for(const t of e){const e=this.fieldsIndex.get(t.name);e&&Object.assign(t,e.toJSON())}}_queryIs3DObjectFormat(e){return null!=this.infoFor3D&&!0===e.returnGeometry&&"xyFootprint"!==e.multipatchOption&&!e.outStatistics}};(0,n._)([(0,l.MZ)({type:f.L})],x.prototype,"dynamicDataSource",void 0),(0,n._)([(0,l.MZ)()],x.prototype,"fieldsIndex",void 0),(0,n._)([(0,l.MZ)()],x.prototype,"gdbVersion",void 0),(0,n._)([(0,l.MZ)()],x.prototype,"infoFor3D",void 0),(0,n._)([(0,l.MZ)({readOnly:!0})],x.prototype,"parsedUrl",null),(0,n._)([(0,l.MZ)()],x.prototype,"pbfSupported",void 0),(0,n._)([(0,l.MZ)()],x.prototype,"queryAttachmentsSupported",void 0),(0,n._)([(0,l.MZ)()],x.prototype,"sourceSpatialReference",void 0),(0,n._)([(0,l.MZ)({type:String})],x.prototype,"url",void 0),x=(0,n._)([(0,c.$)("esri.layers.graphics.sources.support.QueryTask")],x);const P=x},20557:(e,t,r)=>{r.d(t,{E1:()=>a,Fm:()=>u,JZ:()=>m,R_:()=>i,fu:()=>o,oF:()=>s,rq:()=>l});const n=[["binary","application/octet-stream","bin",""]];function o(e,t){return null!=h(t.name,e?.supportedFormats??[])}function s(e,t){if(!e)return!1;const r=l(t,e.supportedFormats??[]);return null!=r&&e.editFormats.includes(r)}function i(e,t){return d(function(e,t){const r=e.toLowerCase();return c(t).find((e=>f(e)===r))}(e,t))}function a(e,t){return d(h(e,t))}function u(e,t){return f(function(e,t){return c(t).find((t=>d(t)===e))}(e,t))}function l(e,t){return a(e.name,t)??i(e.type,t)}function c(e){return[...n,...e]}function h(e,t){const r=e.toLowerCase();return c(t).find((e=>function(e){return e?.[2].split(",").map((e=>e.toLowerCase()))??[]}(e).some((e=>r.endsWith(e)))))}function d(e){return e?.[0]}function f(e){return e?.[1].toLowerCase()}function m(e){return e.tables?.find((e=>"assetMaps"===e.role))}},20615:(e,t,r)=>{r.d(t,{I:()=>i});var n=r(2272),o=r(80893),s=r(61956);async function i(e,t,r){const i=(0,n.Dl)(e);return(0,o.gW)(i,s.A.from(t),{...r}).then((e=>e.data.count))}},78286:(e,t,r)=>{r.d(t,{V:()=>i});var n=r(2272),o=r(80893),s=r(61956);async function i(e,t,r){const i=(0,n.Dl)(e);return(0,o.Pk)(i,s.A.from(t),{...r}).then((e=>e.data.objectIds))}},99199:(e,t,r)=>{r.d(t,{e:()=>u,s:()=>a});var n=r(2272),o=r(80893),s=r(22671),i=r(61956);async function a(e,t,r){const n=await u(e,t,r);return s.A.fromJSON(n)}async function u(e,t,r){const s=(0,n.Dl)(e),a={...r},u=i.A.from(t),{data:l}=await(0,o.eW)(s,u,u.sourceSpatialReference,a);return l}},71575:(e,t,r)=>{r.d(t,{S:()=>p});var n=r(2272),o=r(97768),s=r(62815),i=r(90708);function a(e,t){return t}function u(e,t,r,n){switch(r){case 0:return d(e,t+n,0);case 1:return"lowerLeft"===e.originPosition?d(e,t+n,1):function({translate:e,scale:t},r,n){return e[n]-r*t[n]}(e,t+n,1)}}function l(e,t,r,n){return 2===r?d(e,t,2):u(e,t,r,n)}function c(e,t,r,n){return 2===r?0===t?0:d(e,t,3):u(e,t,r,n)}function h(e,t,r,n){return 3===r?0===t?0:d(e,t,3):l(e,t,r,n)}function d({translate:e,scale:t},r,n){return e[n]+r*t[n]}class f{constructor(e){this._options=e,this.geometryTypes=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"],this._previousCoordinate=[0,0],this._transform=null,this._applyTransform=a,this._lengths=[],this._currentLengthIndex=0,this._toAddInCurrentPath=0,this._vertexDimension=0,this._mValueOffset=null,this._coordinateBuffer=null,this._coordinateBufferPtr=0,this._attributesConstructor=class{}}createFeatureResult(){return{fields:[],features:[]}}finishFeatureResult(e){if(this._options.applyTransform&&(e.transform=null),this._attributesConstructor=class{},this._coordinateBuffer=null,this._lengths.length=0,!e.hasZ)return;const t=(0,s.N)(e.geometryType,this._options.sourceSpatialReference,e.spatialReference);if(null!=t)for(const r of e.features)t(r.geometry)}createSpatialReference(){return{}}addField(e,t){const r=e.fields;(0,o.Lw)(r),r.push(t);const n=r.map((e=>e.name));this._attributesConstructor=function(){for(const e of n)this[e]=null}}addFeature(e,t){e.features.push(t)}prepareFeatures(e){switch(this._transform=e.transform,this._options.applyTransform&&e.transform&&(this._applyTransform=this._deriveApplyTransform(e)),this._mValueOffset=null,this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&(this._mValueOffset=this._vertexDimension,this._vertexDimension++),e.geometryType){case"esriGeometryPoint":this.addCoordinate=(e,t,r)=>this.addCoordinatePoint(e,t,r),this.createGeometry=e=>this.createPointGeometry(e);break;case"esriGeometryPolygon":this.addCoordinate=(e,t,r)=>this._addCoordinatePolygon(e,t,r),this.createGeometry=e=>this._createPolygonGeometry(e);break;case"esriGeometryPolyline":this.addCoordinate=(e,t,r)=>this._addCoordinatePolyline(e,t,r),this.createGeometry=e=>this._createPolylineGeometry(e);break;case"esriGeometryMultipoint":this.addCoordinate=(e,t,r)=>this._addCoordinateMultipoint(e,t,r),this.createGeometry=e=>this._createMultipointGeometry(e)}}createFeature(){return this._lengths.length=0,this._currentLengthIndex=0,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,{attributes:new this._attributesConstructor}}allocateCoordinates(){}addLength(e,t,r){0===this._lengths.length&&(this._toAddInCurrentPath=t),this._lengths.push(t)}addQueryGeometry(e,t){const{queryGeometry:r,queryGeometryType:n}=t,o=(0,i.Ch)(r.clone(),r,!1,!1,this._transform),s=(0,i.zv)(o,n,!1,!1);e.queryGeometryType=n,e.queryGeometry={...s}}createPointGeometry(e){const t={x:0,y:0,spatialReference:e.spatialReference};return e.hasZ&&(t.z=0),e.hasM&&(t.m=0),t}addCoordinatePoint(e,t,r){const n=this._transform;switch(t=this._applyTransform(n,t,r,0),r){case 0:e.x=t;break;case 1:e.y=t;break;case 2:"z"in e?e.z=t:e.m=t;break;case 3:e.m=t}}_transformPathLikeValue(e,t){let r=0;t<=1&&(r=this._previousCoordinate[t],this._previousCoordinate[t]+=e);const n=this._transform;return null===this._mValueOffset||0!==e||t%this._mValueOffset?this._applyTransform(n,e,t,r):0}_addCoordinatePolyline(e,t,r){this._dehydratedAddPointsCoordinate(e.paths,t,r)}_addCoordinatePolygon(e,t,r){this._dehydratedAddPointsCoordinate(e.rings,t,r)}_addCoordinateMultipoint(e,t,r){0===r&&e.points.push([]);const n=this._transformPathLikeValue(t,r);e.points[e.points.length-1].push(n)}_createPolygonGeometry(e){return{rings:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createPolylineGeometry(e){return{paths:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createMultipointGeometry(e){return{points:[],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_dehydratedAddPointsCoordinate(e,t,r){0===r&&0==this._toAddInCurrentPath--&&(e.push([]),this._toAddInCurrentPath=this._lengths[++this._currentLengthIndex]-1,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0);const n=this._transformPathLikeValue(t,r),o=e[e.length-1];0===r&&(this._coordinateBufferPtr=0,this._coordinateBuffer=new Array(this._vertexDimension),o.push(this._coordinateBuffer)),this._coordinateBuffer[this._coordinateBufferPtr++]=n}_deriveApplyTransform(e){const{hasZ:t,hasM:r}=e;return t&&r?h:t?l:r?c:u}}var m=r(80893),y=(r(22671),r(61956));async function p(e,t,r){const o=(0,n.Dl)(e),s={...r},i=y.A.from(t),a=!i.quantizationParameters,{data:u}=await(0,m.IJ)(o,i,new f({sourceSpatialReference:i.sourceSpatialReference,applyTransform:a}),s);return u}}}]);