@arcgis/core 4.34.0-next.91 → 4.34.0-next.93

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 (212) hide show
  1. package/Color.js +1 -1
  2. package/Ground.js +1 -1
  3. package/WebScene.js +1 -1
  4. package/assets/esri/core/workers/RemoteClient.js +1 -1
  5. package/assets/esri/core/workers/chunks/004b13c1db79c9e668b1.js +1 -0
  6. package/assets/esri/core/workers/chunks/{700b5a536f97233bc4af.js → 03b455e9405a8b6fec68.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{a244afea77127e54dd3a.js → 08b0fc6bfe9640ee2525.js} +1 -1
  8. package/assets/esri/core/workers/chunks/0a981061df08da19372c.js +1 -0
  9. package/assets/esri/core/workers/chunks/20003728a679479b14dc.js +1 -0
  10. package/assets/esri/core/workers/chunks/352511dbc67166face40.js +1 -0
  11. package/assets/esri/core/workers/chunks/3acd79a6a0572926a799.js +1 -0
  12. package/assets/esri/core/workers/chunks/3d7923d25734d03a4d27.js +1 -0
  13. package/assets/esri/core/workers/chunks/48133effac2eacc2196e.js +1 -0
  14. package/assets/esri/core/workers/chunks/4dfcd03082be83600f3a.js +1 -0
  15. package/assets/esri/core/workers/chunks/503c81dda242e6077317.js +1 -0
  16. package/assets/esri/core/workers/chunks/{06aed0a5464965be8d52.js → 56b3bb68b61b77138186.js} +1 -1
  17. package/assets/esri/core/workers/chunks/5746c4861af83c1d57a8.js +1 -0
  18. package/assets/esri/core/workers/chunks/5aacd1c6b171c99b41f5.js +1 -0
  19. package/assets/esri/core/workers/chunks/5eb7f6f5121c8830c561.js +1 -0
  20. package/assets/esri/core/workers/chunks/6810ecdeccf4b7eae5e2.js +1 -0
  21. package/assets/esri/core/workers/chunks/6b208f5d423da64c8559.js +1 -0
  22. package/assets/esri/core/workers/chunks/{8bdbd94a59269e216fba.js → 6c3b585b9cb6bb640fb0.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{7a240ab31d9ff2d2c5af.js → 73db6c070b049fe05147.js} +1 -1
  24. package/assets/esri/core/workers/chunks/801451fb572bc5f1f270.js +1 -0
  25. package/assets/esri/core/workers/chunks/82e0d22619dc26920ca9.js +1 -0
  26. package/assets/esri/core/workers/chunks/{6aa349e1adf844df4b5b.js → 8b9a50cfaa5a7df02dad.js} +1 -1
  27. package/assets/esri/core/workers/chunks/8de9e50de0ac66ae1573.js +1 -0
  28. package/assets/esri/core/workers/chunks/8f426cb210a4250517d5.js +1 -0
  29. package/assets/esri/core/workers/chunks/94ddf029698991d853b9.js +1 -0
  30. package/assets/esri/core/workers/chunks/97eb2cfc1f036feea9a9.js +1 -0
  31. package/assets/esri/core/workers/chunks/{a85acb948cc7d22be592.js → 992b1389710d716d3450.js} +1 -1
  32. package/assets/esri/core/workers/chunks/9adecee0ed2f1df3b0d2.js +1 -0
  33. package/assets/esri/core/workers/chunks/a0fab8cd791c33d3895d.js +1 -0
  34. package/assets/esri/core/workers/chunks/{e99fc64b67bb0c71dc34.js → ad67e5eb4b8c0c14cea6.js} +1 -1
  35. package/assets/esri/core/workers/chunks/b5c829e904bc9cb5347d.js +1 -0
  36. package/assets/esri/core/workers/chunks/bec9ddd38c9ab9f2561b.js +1 -0
  37. package/assets/esri/core/workers/chunks/bf9031749d10e7d457b6.js +1 -0
  38. package/assets/esri/core/workers/chunks/bf9d09493fd849ea69fd.js +1 -0
  39. package/assets/esri/core/workers/chunks/{58e2652810143f509fe1.js → c473b15d4d52f0a63d20.js} +1 -1
  40. package/assets/esri/core/workers/chunks/c8e4fe0e3b109eb80e8e.js +1 -0
  41. package/assets/esri/core/workers/chunks/cd0c222a36caa7f80860.js +1 -0
  42. package/assets/esri/core/workers/chunks/ce175801937e80e3c487.js +1 -0
  43. package/assets/esri/core/workers/chunks/{100a0041ee42b0b2fa32.js → e5d974593043d5e2b502.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{1194c2432c31def87db1.js → f71b76c9506178124fa3.js} +1 -1
  45. package/assets/esri/themes/base/_core.scss +0 -2
  46. package/assets/esri/themes/base/widgets/_OrientedImageryViewerNavigationUI.scss +10 -7
  47. package/assets/esri/themes/dark/main.css +1 -1
  48. package/assets/esri/themes/light/main.css +1 -1
  49. package/assets/esri/themes/light/view.css +1 -1
  50. package/chunks/CutFillComposition.glsl.js +15 -3
  51. package/chunks/CutFillMask.glsl.js +1 -1
  52. package/chunks/languageUtils.js +1 -1
  53. package/config.js +1 -1
  54. package/core/CollectionFlattener.js +1 -1
  55. package/editing/sharedTemplates/executor/support/createPresetServiceEdit.js +1 -1
  56. package/geometry/operators/json/graphicBufferOperator.js +1 -1
  57. package/geometry/support/aaBoundingRect.js +1 -1
  58. package/geometry/support/geometryUtils.js +1 -1
  59. package/geometry/support/meshUtils/elevationSampler.js +1 -1
  60. package/geometry/support/meshUtils.js +1 -1
  61. package/geometry/support/triangle.js +1 -1
  62. package/interfaces.d.ts +52 -261
  63. package/kernel.js +1 -1
  64. package/layers/BaseElevationLayer.js +1 -1
  65. package/layers/BaseTileLayer.js +1 -1
  66. package/layers/ElevationLayer.js +1 -1
  67. package/layers/FeatureLayer.js +1 -1
  68. package/layers/GaussianSplatLayer.js +1 -1
  69. package/layers/ImageryTileLayer.js +1 -1
  70. package/layers/ParquetLayer.js +1 -1
  71. package/layers/graphics/sources/ParquetSource.js +1 -1
  72. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  73. package/layers/orientedImagery/transformations/updateElevationUtils.js +1 -1
  74. package/layers/support/ElevationQuery.js +1 -1
  75. package/layers/support/ElevationQueryContext.js +5 -0
  76. package/layers/support/ElevationSampler.js +1 -1
  77. package/layers/support/ElevationTile.js +1 -1
  78. package/layers/support/GeometryDescriptor.js +1 -1
  79. package/layers/support/ParquetEncodingLocation.js +1 -1
  80. package/layers/support/ParquetEncodingWkb.js +1 -1
  81. package/layers/support/RasterBandInfo.js +1 -1
  82. package/layers/support/TileElevationSampler.js +5 -0
  83. package/layers/support/TileInfo.js +1 -1
  84. package/layers/support/TileKey.js +1 -1
  85. package/layers/support/TilemapCache.js +1 -1
  86. package/layers/support/layerUtils.js +1 -1
  87. package/layers/support/parquetEncodingUtils.js +5 -0
  88. package/layers/support/parquetUtils.js +1 -1
  89. package/networks/UtilityNetwork.js +1 -1
  90. package/networks/support/typeUtils.js +1 -1
  91. package/package.json +2 -2
  92. package/popup/FieldInfo.js +1 -1
  93. package/rest/networks/support/Association.js +1 -1
  94. package/rest/print.js +1 -1
  95. package/support/revision.js +1 -1
  96. package/symbols/cim/CIMSymbolHelper.js +1 -1
  97. package/symbols/cim/cimAnalyzer.js +1 -1
  98. package/symbols/cim/effects/EffectOffset.js +1 -1
  99. package/views/2d/analysis/ElevationProfile/ElevationProfileLineVisualization2D.js +1 -1
  100. package/views/2d/analysis/ElevationProfileAnalysisView2D.js +1 -1
  101. package/views/2d/engine/Stage.js +1 -1
  102. package/views/2d/engine/flow/BrushFlow.js +1 -1
  103. package/views/2d/engine/vectorTiles/VectorTileRendererHelper3D.js +1 -1
  104. package/views/2d/engine/webgl/Overlay.js +1 -1
  105. package/views/2d/engine/webgl/OverlayMultipoint.js +1 -1
  106. package/views/2d/engine/webgl/SpriteMosaic.js +1 -1
  107. package/views/2d/engine/webgl/TextureManager.js +1 -1
  108. package/views/2d/engine/webgl/animatedFormats/AnimatableTextureResource.js +1 -1
  109. package/views/2d/engine/webgl/animatedFormats/utils.js +1 -1
  110. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
  111. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedTechnique.js +1 -1
  112. package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexFillTechnique.js +1 -1
  113. package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillTechnique.js +1 -1
  114. package/views/2d/engine/webgl/shaderGraph/techniques/fill/GradientFillTechnique.js +1 -1
  115. package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternFillTechnique.js +1 -1
  116. package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillTechnique.js +1 -1
  117. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelTechnique.js +1 -1
  118. package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeTechnique.js +1 -1
  119. package/views/2d/engine/webgl/shaderGraph/techniques/line/TexturedLineTechnique.js +1 -1
  120. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerTechnique.js +1 -1
  121. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextTechnique.js +1 -1
  122. package/views/2d/engine/webgl/shaderGraph/utils.js +1 -1
  123. package/views/2d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles2D.js +1 -1
  124. package/views/2d/layers/VideoLayerView2D.js +1 -1
  125. package/views/2d/navigation/actions/Pan.js +1 -1
  126. package/views/3d/analysis/ElevationProfile/ElevationProfileLineSceneComputation.js +1 -1
  127. package/views/3d/analysis/ElevationProfile/ElevationProfileLineVisualization3D.js +1 -1
  128. package/views/3d/analysis/ElevationProfile/ElevationProfileVisualization3D.js +1 -1
  129. package/views/3d/analysis/ElevationProfileAnalysisView3D.js +1 -1
  130. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
  131. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementTool.js +1 -1
  132. package/views/3d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles3D.js +1 -1
  133. package/views/3d/support/hitTest.js +1 -1
  134. package/views/3d/support/pointsOfInterest/StableSurfaceCenter.js +1 -1
  135. package/views/3d/support/popupHitTest.js +1 -1
  136. package/views/3d/terrain/ExtentHelper.js +1 -1
  137. package/views/3d/webgl-engine/lib/CutFillColor.js +1 -1
  138. package/views/3d/webgl-engine/shaders/CutFillComposition.glsl.js +1 -1
  139. package/views/SceneView.js +1 -1
  140. package/views/View2D.js +1 -1
  141. package/views/Viewport2DMixin.js +1 -1
  142. package/views/analysis/ElevationProfile/ElevationProfileController.js +1 -1
  143. package/views/analysis/ElevationProfile/ElevationProfileLineComputation.js +1 -1
  144. package/views/analysis/ElevationProfile/ElevationProfileLineQueryComputation.js +1 -1
  145. package/views/analysis/ElevationProfile/ElevationProfileResult.js +1 -1
  146. package/views/analysis/ExclusiveOperationManager.js +5 -0
  147. package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
  148. package/views/interactive/snapping/featureSources/WorkerTileTreeDebugger.js +1 -1
  149. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js +1 -1
  150. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorkerHandle.js +1 -1
  151. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTileStore.js +1 -1
  152. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.js +1 -1
  153. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTilesSimple.js +1 -1
  154. package/views/interactive/snapping/featureSources/featureServiceSource/PendingFeatureTile.js +1 -1
  155. package/views/interactive/snapping/featureSources/queryEngineUtils.js +1 -1
  156. package/views/navigation/Navigation.js +1 -1
  157. package/views/support/GroundViewElevationSampler.js +1 -1
  158. package/views/video/VideoOperationalDataView.js +1 -1
  159. package/widgets/BasemapGallery/support/basemapCompatibilityUtils.js +1 -1
  160. package/widgets/Feature/FeatureExpression.js +1 -1
  161. package/widgets/Feature/FeatureMedia.js +1 -1
  162. package/widgets/Feature/FeatureViewModel.js +1 -1
  163. package/widgets/Feature.js +1 -1
  164. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  165. package/widgets/FeatureTable.js +1 -1
  166. package/widgets/Legend/LegendViewModel.js +1 -1
  167. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  168. package/widgets/OrientedImageryViewer/components/ImageViewer.js +1 -1
  169. package/widgets/OrientedImageryViewer/components/NavigationUI360.js +1 -1
  170. package/widgets/OrientedImageryViewer/components/NavigationUIPanoramicViewModel.js +1 -1
  171. package/widgets/OrientedImageryViewer/services/DepthImageService.js +5 -0
  172. package/widgets/PanoramicViewer.js +1 -1
  173. package/widgets/Search/SearchViewModel.js +1 -1
  174. package/widgets/Sketch/SketchViewModel.js +1 -1
  175. package/widgets/support/decorators/vmEvent.js +1 -1
  176. package/assets/esri/core/workers/chunks/08374e5805fcedc1cb57.js +0 -1
  177. package/assets/esri/core/workers/chunks/14114be3afd6d292f89c.js +0 -1
  178. package/assets/esri/core/workers/chunks/2605062e44f2d4e73f14.js +0 -1
  179. package/assets/esri/core/workers/chunks/282c4f3484c605ce7d5e.js +0 -1
  180. package/assets/esri/core/workers/chunks/2e1cc11462846febb3b2.js +0 -1
  181. package/assets/esri/core/workers/chunks/37b5007660535f1c91c6.js +0 -1
  182. package/assets/esri/core/workers/chunks/393274af1804e5b6046a.js +0 -1
  183. package/assets/esri/core/workers/chunks/3ff3e1507220d3869c76.js +0 -1
  184. package/assets/esri/core/workers/chunks/4133ab8720e7e4afa9a6.js +0 -1
  185. package/assets/esri/core/workers/chunks/4d807bfe75108438db83.js +0 -1
  186. package/assets/esri/core/workers/chunks/5ad1985a9e66fb2232ae.js +0 -1
  187. package/assets/esri/core/workers/chunks/5b7a2ee44883b1fb2a5f.js +0 -1
  188. package/assets/esri/core/workers/chunks/614a00a3179f8fe23f45.js +0 -1
  189. package/assets/esri/core/workers/chunks/83065bef261314f9b2c5.js +0 -1
  190. package/assets/esri/core/workers/chunks/8cae725e631d922853c8.js +0 -1
  191. package/assets/esri/core/workers/chunks/8f4cfef97716c3502b0f.js +0 -1
  192. package/assets/esri/core/workers/chunks/9bb6984f24cd5461a754.js +0 -1
  193. package/assets/esri/core/workers/chunks/9f2a3f37fe9b19ef1209.js +0 -1
  194. package/assets/esri/core/workers/chunks/a1196637268b89281780.js +0 -1
  195. package/assets/esri/core/workers/chunks/b240298b8b643a323d34.js +0 -1
  196. package/assets/esri/core/workers/chunks/b47f26d6aa9a2848a677.js +0 -1
  197. package/assets/esri/core/workers/chunks/b661ea374fe38c8e29ca.js +0 -1
  198. package/assets/esri/core/workers/chunks/b8997ae5893afa0298d1.js +0 -1
  199. package/assets/esri/core/workers/chunks/baa48614d9567d5f240d.js +0 -1
  200. package/assets/esri/core/workers/chunks/c20862fe15295a294bbd.js +0 -1
  201. package/assets/esri/core/workers/chunks/c3020747f9001ca6a6e7.js +0 -1
  202. package/assets/esri/core/workers/chunks/c7c76a8a1c47eb62bef1.js +0 -1
  203. package/assets/esri/core/workers/chunks/eea9d49d55c2d1355497.js +0 -1
  204. package/assets/esri/core/workers/chunks/fb6ebb780bb59e252887.js +0 -1
  205. package/assets/esri/core/workers/chunks/ff6d189ba78980d40bb5.js +0 -1
  206. package/assets/esri/themes/base/widgets/_ButtonMenu.scss +0 -87
  207. package/widgets/FeatureTable/Grid/support/ButtonMenu.d.ts +0 -4
  208. package/widgets/FeatureTable/Grid/support/ButtonMenu.js +0 -5
  209. package/widgets/FeatureTable/Grid/support/ButtonMenuItem.d.ts +0 -4
  210. package/widgets/FeatureTable/Grid/support/ButtonMenuItem.js +0 -5
  211. package/widgets/FeatureTable/Grid/support/ButtonMenuViewModel.d.ts +0 -4
  212. package/widgets/FeatureTable/Grid/support/ButtonMenuViewModel.js +0 -5
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1776],{8303:(e,t,i)=>{i.d(t,{A:()=>S});var r=i(31635),s=i(92602),l=i(70333),o=i(78888),n=i(60999),a=i(49186),u=i(53966),h=i(97768),c=i(74887),p=i(84952),d=i(10107),y=(i(44208),i(87811),i(36005)),f=i(40608),m=i(43937),g=i(77548),_=i(20655),v=i(80812),w=i(41318),A=i(10407);const S=e=>{const t=e;let S=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,h.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,t,i){if(t.itemId)return new v.default({id:t.itemId,portal:i?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:r}=await i.e(1204).then(i.bind(i,41204));return(0,c.Te)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,c.zf)(e)||u.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,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:r},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,c.QP)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=!l.id?.findCredential(this.url),s=e===i.id;if(s&&i.portal.user)return this._getUserPrivileges(i,r);let o,n;if(s)o=i.portal.url;else try{o=await(0,g.wI)(this.url,t)}catch(e){(0,c.QP)(e)}if(!o||!(0,p.b8)(o,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;n=await(l.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.QP)(e)}const a=!0,u=!1,h=!1;if(!n)return{features:{edit:a,fullEdit:u},content:{updateItem:h}};try{if(s?await i.reload():(i=new v.default({id:e,portal:{url:o}}),await i.load(t)),i.portal.user)return this._getUserPrivileges(i,r)}catch(e){(0,c.QP)(e)}return{features:{edit:a,fullEdit:u},content:{updateItem:h}}}_getUserPrivileges(e,t){const i=(0,A.It)(e);return t&&(i.features.edit=!0),i}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?l.id?.findCredential(this.url):null;if(!t)return!0;const i=b.credential===t?b.user:await this._fetchEditingUser(e);return b.credential=t,b.user=i,null==i?.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=l.id?.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,s=_.A.getDefault();if(s&&s.loaded&&(0,p.S8)(s.restUrl)===(0,p.S8)(r))return s.user;const a=`${r}/community/self`,u=null!=e?e.signal:null,h=await(0,n.Ke)((0,o.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return h.ok?w.A.fromJSON(h.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t?.portal,r=this.portalItem?.id&&(this.portalItem.portal||_.A.getDefault());return i&&r&&!(0,p.ut)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new a.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,{...t,layer:this})}};return(0,r.Cg)([(0,d.MZ)({type:v.default})],S.prototype,"portalItem",null),(0,r.Cg)([(0,y.w)("web-document","portalItem",["itemId"])],S.prototype,"readPortalItem",null),(0,r.Cg)([(0,m.K)("web-document","portalItem",{itemId:{type:String}})],S.prototype,"writePortalItem",null),(0,r.Cg)([(0,d.MZ)({clonable:!1})],S.prototype,"resourceReferences",void 0),(0,r.Cg)([(0,d.MZ)({type:Boolean,readOnly:!0})],S.prototype,"userHasEditingPrivileges",void 0),(0,r.Cg)([(0,d.MZ)({type:Boolean,readOnly:!0})],S.prototype,"userHasFullEditingPrivileges",void 0),(0,r.Cg)([(0,d.MZ)({type:Boolean,readOnly:!0})],S.prototype,"userHasUpdateItemPrivileges",void 0),S=(0,r.Cg)([(0,f.$)("esri.layers.mixins.PortalLayer")],S),S},b={credential:null,user:null}},10407:(e,t,i)=>{i.d(t,{It:()=>d,LG:()=>o,OM:()=>u,Sm:()=>h,Y:()=>n,bK:()=>a,mm:()=>p,sQ:()=>c});var r=i(91218),s=i(16930),l=i(28735);function o(e,t){if(!n(e,t)){const i=e.typeKeywords;i?i.push(t):e.typeKeywords=[t]}}function n(e,t){return!!e.typeKeywords?.includes(t)}function a(e){return n(e,p.HOSTED_SERVICE)}function u(e,t){const i=e.typeKeywords;if(i){const e=i.indexOf(t);e>-1&&i.splice(e,1)}}function h(e,t,i){i?o(e,t):u(e,t)}async function c(e){const t=e.clone().normalize();let i;if(t.length>1)for(const e of t)i?e.width>i.width&&(i=e):i=e;else i=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,l.ci)(e);const i=s.A.WGS84;return await(0,r.initializeProjection)(t,i),(0,r.project)(e,i)}(i)}const p={CHARTS:"Charts",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery"};function d(e){const{portal:t,isOrgItem:i,itemControl:r}=e,s=t.user?.privileges;let l=!s||s.includes("features:user:edit"),o=!!i&&!!s?.includes("features:user:fullEdit");const n="update"===r||"admin"===r;return n?o=l=!0:o&&(l=!0),{features:{edit:l,fullEdit:o},content:{updateItem:n}}}},18768:(e,t,i)=>{i.d(t,{b:()=>a});var r=i(31635),s=i(53966),l=i(10107),o=(i(44208),i(87811),i(40608)),n=i(60694);const a=e=>{const t=e;let i=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,n.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,n.Jf)(e,s.A.getLogger(this)))}};return(0,r.Cg)([(0,l.MZ)()],i.prototype,"title",null),(0,r.Cg)([(0,l.MZ)({type:String})],i.prototype,"url",null),i=(0,r.Cg)([(0,o.$)("esri.layers.mixins.ArcGISService")],i),i}},25943:(e,t,i)=>{i.d(t,{d:()=>x});var r,s=i(31635),l=i(78888),o=i(65008),n=i(49186),a=i(36563),u=(i(44208),i(66344)),h=i(15142),c=i(74887),p=i(36708),d=i(96211),y=i(84952),f=i(10107),m=(i(53966),i(87811),i(40608)),g=i(72802),_=i(4718),v=i(69397),w=i(34275);class A{constructor(e){!function(e){if(!e?.location)throw new n.A("tilemap:missing-location","Location missing from tilemap response");if(!1===e.valid)throw new n.A("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new n.A("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new n.A("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new n.A("tilemap:data-mismatch","Number of data items does not match width/height of tilemap")}(e);const{location:t,data:i}=e;this.location=Object.freeze((0,_.o8)(t));const r=this.location.width,s=this.location.height;let l=!0,o=!0;const a=function(e,t=!1){return e<=w.y9?t?new Array(e).fill(0):new Array(e):new Uint32Array(e)}(Math.ceil(r*s/32));let u=0;for(let e=0;e<i.length;e++){const t=e%32;i[e]?(o=!1,a[u]|=1<<t):l=!1,31===t&&++u}o?(this._availability="unavailable",this.byteSize=40):l?(this._availability="available",this.byteSize=40):(this._availability=a,this.byteSize=40+(0,v.Qf)(a))}getAvailability(e,t){if("unavailable"===this._availability||"available"===this._availability)return this._availability;const i=(e-this.location.top)*this.location.width+(t-this.location.left),r=i%32,s=i>>5,l=this._availability;return s<0||s>l.length?"unknown":l[s]&1<<r?"available":"unavailable"}static fromDefinition(e,t){const i=e.service.request||l.A,{row:r,col:s,width:o,height:a}=e,u={query:{f:"json"}};return t=t?{...u,...t}:u,i(function(e){let t;if(e.service.tileServers?.length){const i=e.service.tileServers;t=`${i&&i.length?i[e.row%i.length]:e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}else t=`${e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`;const i=e.service.query;return i&&(t=`${t}?${i}`),t}(e),t).then(e=>e.data).catch(e=>{if(422===e?.details?.httpStatus)return{location:{top:r,left:s,width:o,height:a},valid:!0,data:new Array(o*a).fill(0)};throw e}).then(e=>{if(e.location&&(e.location.top!==r||e.location.left!==s||e.location.width!==o||e.location.height!==a))throw new n.A("tilemap:location-mismatch","Tilemap response for different location than requested",{response:e,definition:{top:r,left:s,width:o,height:a}});return A.fromJSON(e)})}static fromJSON(e){return Object.freeze(new A(e))}}function S(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}function b(e,t,i){return new n.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i})}let x=class extends o.A{static{r=this}constructor(e){super(e),this._pendingTilemapRequests={},this.request=l.A,this.size=32,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new u.q(2097152),this.addHandles((0,p.wB)(()=>{const{layer:e}=this;return[e?.parsedUrl,e?.tileServers,e?.apiKey,e?.customParameters]},()=>this._initializeTilemapDefinition(),p.Vh))}get effectiveMinLOD(){return this.minLOD??this.layer.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.layer.tileInfo.lods[this.layer.tileInfo.lods.length-1].level}getAvailability(e,t,i){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return"unavailable";const r=this._tilemapFromCache(e,t,i,this._tmpTilemapDefinition);return r?r.getAvailability(t,i):"unknown"}fetchAvailability(e,t,i,r){return!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD?Promise.reject(b(e,t,i)):this._fetchTilemap(e,t,i,r).catch(e=>e).then(r=>{if(r instanceof A){const s=r.getAvailability(t,i);if("unavailable"===s)throw b(e,t,i);return s}if((0,c.zf)(r))throw r;return"unknown"})}fetchAvailabilityUpsample(e,t,i,r,s){r.level=e,r.row=t,r.col=i;const l=this.layer.tileInfo;l.updateTileInfo(r);const o=this.fetchAvailability(e,t,i,s).catch(e=>{if((0,c.zf)(e))throw e;if(l.upsampleTile(r))return this.fetchAvailabilityUpsample(r.level,r.row,r.col,r,s);throw e});return this._fetchAvailabilityUpsamplePrefetch(r.id,e,t,i,s,o),o}async _fetchAvailabilityUpsamplePrefetch(e,t,i,s,l,o){if(!this._prefetchingEnabled||null==e)return;const n=`prefetch-${e}`;if(this.hasHandles(n))return;const u=new AbortController;o.then(()=>u.abort(),()=>u.abort());let h=!1;const p=(0,a.hA)(()=>{h||(h=!0,u.abort())});if(this.addHandles(p,n),await(0,d.md)(10,u.signal).catch(()=>{}),h||(h=!0,this.removeHandles(n)),(0,c.G4)(u))return;const y=new g.U(e,t,i,s),f={...l,signal:u.signal},m=this.layer.tileInfo;for(let e=0;r._prefetches.length<r._maxPrefetch&&m.upsampleTile(y);++e){const e=this.fetchAvailability(y.level,y.row,y.col,f);r._prefetches.push(e);const t=()=>{r._prefetches.removeUnordered(e)};e.then(t,t)}}static{this._maxPrefetch=4}static{this._prefetches=new h.A({initialSize:r._maxPrefetch})}static cleanupTilemapCache(){this._prefetches.prune()}_fetchTilemap(e,t,i,r){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return Promise.reject(new n.A("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));const s=this._tmpTilemapDefinition,l=this._tilemapFromCache(e,t,i,s);if(l)return Promise.resolve(l);const o=r?.signal;return r={...r,signal:null},new Promise((e,t)=>{(0,c.u7)(o,()=>t((0,c.NK)()));const i=S(s);let l=this._pendingTilemapRequests[i];if(!l){l=A.fromDefinition(s,r).then(e=>(this._tilemapCache.put(i,e,e.byteSize),e));const e=()=>{delete this._pendingTilemapRequests[i]};this._pendingTilemapRequests[i]=l,l.then(e,e)}l.then(e,t)})}_initializeTilemapDefinition(){if(!this.layer.parsedUrl)return;const{parsedUrl:e,apiKey:t,customParameters:i}=this.layer;this._tilemapCache.clear(),this._tmpTilemapDefinition={service:{url:e.path,query:(0,y.x0)({...e.query,...i,token:t??e.query?.token}),tileServers:this.layer.tileServers,request:this.request},width:this.size,height:this.size,level:0,row:0,col:0}}_tilemapFromCache(e,t,i,r){r.level=e,r.row=t-t%this.size,r.col=i-i%this.size;const s=S(r);return this._tilemapCache.get(s)}get test(){}};(0,s.Cg)([(0,f.MZ)({constructOnly:!0})],x.prototype,"layer",void 0),(0,s.Cg)([(0,f.MZ)({constructOnly:!0})],x.prototype,"minLOD",void 0),(0,s.Cg)([(0,f.MZ)({constructOnly:!0})],x.prototype,"maxLOD",void 0),(0,s.Cg)([(0,f.MZ)({constructOnly:!0})],x.prototype,"request",void 0),(0,s.Cg)([(0,f.MZ)({constructOnly:!0})],x.prototype,"size",void 0),x=r=(0,s.Cg)([(0,m.$)("esri.layers.support.TilemapCache")],x)},44159:(e,t,i)=>{i.d(t,{A:()=>s});var r=i(93687);class s{static{this.pool=new r.A(()=>new s(""),null,null,25,50)}static getId(e,t,i,r){return"object"==typeof e?`${e.level}/${e.row}/${e.col}/${e.world}`:`${e}/${t}/${i}/${r}`}constructor(e,t,i,r){this.set(e,t,i,r)}get key(){return this}get id(){return this.toString()}get normalizedId(){return`${this.level}/${this.row}/${this.col}`}set id(e){this.set(e)}get hash(){const e=4095&this.row,t=4095&this.col,i=63&this.level;return(3&this.world)<<30|t<<22|e<<8|i}acquire(e,t,i,r){this.set(e,t,i,r)}contains(e){const t=e.level-this.level;return t>=0&&this.row===e.row>>t&&this.col===e.col>>t&&this.world===e.world}containsChild(e){const t=e.level-this.level;return t>0&&this.row===e.row>>t&&this.col===e.col>>t&&this.world===e.world}equals(e){return this.level===e.level&&this.row===e.row&&this.col===e.col&&this.world===e.world}clone(){return new s(this)}release(){this.level=0,this.row=0,this.col=0,this.world=0}set(e,t,i,r){if(null==e)this.level=0,this.row=0,this.col=0,this.world=0;else if("object"==typeof e)this.level=e.level||0,this.row=e.row||0,this.col=e.col||0,this.world=e.world||0;else if("string"==typeof e){const[t,i,r,s]=e.split("/");this.level=parseFloat(t),this.row=parseFloat(i),this.col=parseFloat(r),this.world=parseFloat(s)}else this.level=+e,this.row=+t,this.col=+i,this.world=+r||0;return this}toString(){return`${this.level}/${this.row}/${this.col}/${this.world}`}getParentKey(){return this.level<=0?null:new s(this.level-1,this.row>>1,this.col>>1,this.world)}getNormalizedNeighbor(e,t,i){const r=this.clone();return r.col+=e,r.row+=t,i.normalizeKey(r),r}getChildKeys(){const e=this.level+1,t=this.row<<1,i=this.col<<1,r=this.world;return[new s(e,t,i,r),new s(e,t,i+1,r),new s(e,t+1,i,r),new s(e,t+1,i+1,r)]}compareRowMajor(e){return this.row<e.row?-1:this.row>e.row?1:this.col<e.col?-1:this.col>e.col?1:0}}},48757:(e,t,i)=>{i.r(t),i.d(t,{default:()=>ye});var r=i(31635),s=i(78888),l=i(60999),o=i(49186),n=i(4718),a=i(92071),u=i(74887),h=i(84952),c=i(10107),p=(i(44208),i(53966)),d=i(36005),y=i(40608),f=i(43937),m=i(5443),g=i(16930),_=i(4146),v=i(52136),w=i(89186),A=i(18768),S=i(63074),b=i(69208),x=i(16131),I=i(8303),C=i(54310),M=i(25036),P=i(10873);let R=null;var T=i(34275);class U{constructor(e,t){this._spriteSource=e,this._maxTextureSize=t,this.devicePixelRatio=1,this._spriteImageFormat="png",this._isRetina=!1,this._spritesData={},this.image=null,this.width=null,this.height=null,this.loadStatus="not-loaded","url"===e.type&&e.spriteFormat&&(this._spriteImageFormat=e.spriteFormat),e.pixelRatio&&(this.devicePixelRatio=e.pixelRatio),this.baseURL=e.spriteUrl}get spriteNames(){const e=[];for(const t in this._spritesData)e.push(t);return e.sort(),e}getSpriteInfo(e){return this._spritesData?this._spritesData[e]:null}async load(e){if(this.baseURL){this.loadStatus="loading";try{await this._loadSprites(e),this.loadStatus="loaded"}catch{this.loadStatus="failed"}}else this.loadStatus="failed"}async _loadSprites(e){this._isRetina=this.devicePixelRatio>1.15;const{width:t,height:i,data:r,json:s}=await this._getSpriteData(this._spriteSource,e),l=Object.keys(s);if(!l||0===l.length||!r)return this._spritesData=this.image=null,void(this.width=this.height=0);this._spritesData=s,this.width=t,this.height=i;const n=Math.max(this._maxTextureSize,4096);if(t>n||i>n){const e=`Sprite resource for style ${this.baseURL} is bigger than the maximum allowed of ${n} pixels}`;throw p.A.getLogger("esri.layers.support.SpriteSource").error(e),new o.A("SpriteSource",e)}let a;for(let e=0;e<r.length;e+=4)a=r[e+3]/255,r[e]=r[e]*a,r[e+1]=r[e+1]*a,r[e+2]=r[e+2]*a;this.image=r}async _getSpriteData(e,t){if("image"===e.type){let t,i;if(this.devicePixelRatio<1.15){if(!e.spriteSource1x)throw new o.A("SpriteSource","no image data provided for low resolution sprites!");t=e.spriteSource1x.image,i=e.spriteSource1x.json}else{if(!e.spriteSource2x)throw new o.A("SpriteSource","no image data provided for high resolution sprites!");t=e.spriteSource2x.image,i=e.spriteSource2x.json}return"width"in t&&"height"in t&&"data"in t&&((0,T.mw)(t.data)||(0,T.UR)(t.data))?{width:t.width,height:t.height,data:new Uint8Array(t.data),json:i}:{...z(t),json:i}}const i=(0,h.An)(this.baseURL),r=i.query?"?"+(0,h.x0)(i.query):"",l=this._isRetina?"@2x":"",n=`${i.path}${l}.${this._spriteImageFormat}${r}`,a=`${i.path}${l}.json${r}`,[u,c]=await Promise.all([(0,s.A)(a,t),(0,s.A)(n,{responseType:"image",...t})]);return{...z(c.data),json:u.data}}}function z(e){const t=document.createElement("canvas"),i=t.getContext("2d");t.width=e.width,t.height=e.height,i.drawImage(e,0,0,e.width,e.height);const r=i.getImageData(0,0,e.width,e.height);return{width:e.width,height:e.height,data:new Uint8Array(r.data)}}var E=i(87045),L=i(25943),O=i(21325),D=i(28735),$=i(44159);class k{constructor(e){this.url=e}destroy(){this._tileIndexPromise=null}async fetchTileIndex(){return this._tileIndexPromise||(this._tileIndexPromise=(0,s.A)(this.url).then(e=>e.data.index)),this._tileIndexPromise}async dataKey(e,t){const i=await this.fetchTileIndex();return(0,u.Te)(t),this._getIndexedDataKey(i,e)}_getIndexedDataKey(e,t){const i=[t];if(t.level<0||t.row<0||t.col<0||t.row>>t.level>0||t.col>>t.level>0)return null;let r=t;for(;0!==r.level;)r=new $.A(r.level-1,r.row>>1,r.col>>1,r.world),i.push(r);let s,l,o=e,n=i.pop();if(1===o)return n;for(;i.length;)if(s=i.pop(),l=(1&s.col)+((1&s.row)<<1),o){if(0===o[l]){n=null;break}if(1===o[l]){n=s;break}n=s,o=o[l]}return n}}var j=i(97768);class B{constructor(e,t){this._tilemap=e,this._tileIndexUrl=t}destroy(){this._tilemap=(0,j.pR)(this._tilemap),this._tileIndexPromise=null}async fetchTileIndex(e){return this._tileIndexPromise||(this._tileIndexPromise=(0,s.A)(this._tileIndexUrl,{query:{...e?.query}}).then(e=>e.data.index)),this._tileIndexPromise}dataKey(e,t){const{level:i,row:r,col:s}=e,l=new $.A(e);return this._tilemap.fetchAvailabilityUpsample(i,r,s,l,t).then(()=>(l.world=e.world,l)).catch(e=>{if((0,u.zf)(e))throw e;return null})}}var Z=i(91869);class K{constructor(e){this._tileUrl=e,this._promise=null,this._abortController=null,this._abortOptions=[]}getData(e){(null==this._promise||(0,u.G4)(this._abortController?.signal))&&(this._promise=this._makeRequest(this._tileUrl));const t=this._abortOptions;return t.push(e),(0,u.u7)(e,()=>{t.every(e=>(0,u.G4)(e))&&this._abortController.abort()}),this._promise.then(e=>(0,n.o8)(e))}async _makeRequest(e){this._abortController=new AbortController;const{data:t}=await(0,s.A)(e,{responseType:"array-buffer",signal:this._abortController.signal});return t}}const F=new Map;function N(e,t){return(0,Z.tE)(F,e,()=>new K(e)).getData(t).finally(()=>F.delete(e))}class q{constructor(e,t,i){this.tilemap=null,this.tileInfo=null,this.capabilities=null,this.fullExtent=null,this.initialExtent=null,this.name=e,this.sourceUrl=t;const r=(0,h.An)(this.sourceUrl),s=(0,n.o8)(i),l=s.tiles;if(r)for(let e=0;e<l.length;e++){const t=(0,h.An)(l[e]);t&&((0,h.oP)(t.path)||(t.path=(0,h.fj)(r.path,t.path)),l[e]=(0,h.a6)(t.path,{...r.query,...t.query}))}this.tileServers=l;const o=i.capabilities&&i.capabilities.split(",").map(e=>e.toLowerCase().trim()),a=!0===i?.exportTilesAllowed,u=!0===o?.includes("tilemap"),c=a&&i.hasOwnProperty("maxExportTilesCount")?i.maxExportTilesCount:0;this.capabilities={operations:{supportsExportTiles:a,supportsTileMap:u},exportTiles:a?{maxExportTilesCount:+c}:null},this.tileInfo=E.A.fromJSON(s.tileInfo);const p=i.tileMap?(0,h.a6)((0,h.fj)(r.path,i.tileMap),r.query??{}):null;u?(this.type="vector-tile",this.tilemap=new B(new L.d({layer:{parsedUrl:r,tileInfo:this.tileInfo},minLOD:s.minLOD??this.tileInfo.lods[0].level,maxLOD:s.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}),p)):p&&(this.tilemap=new k(p)),this.fullExtent=m.A.fromJSON(i.fullExtent),this.initialExtent=m.A.fromJSON(i.initialExtent)}destroy(){this.tilemap?.destroy()}async getRefKey(e,t){return this.tilemap?this.tilemap.dataKey(e,t):e}requestTile(e,t,i,r){return function(e,t,i,r,s){const l=(0,h.An)(e),o=l.query;if(o)for(const[e,s]of Object.entries(o))switch(s){case"{x}":o[e]=r.toString();break;case"{y}":o[e]=i.toString();break;case"{z}":o[e]=t.toString()}const n=l.path;return N((0,h.a6)(n.replaceAll(/\{z\}/gi,t.toString()).replaceAll(/\{y\}/gi,i.toString()).replaceAll(/\{x\}/gi,r.toString()),{...l.query}),s)}(this.tileServers[t%this.tileServers.length],e,t,i,r)}isCompatibleWith(e){const t=this.tileInfo,i=e.tileInfo;if(!t.spatialReference.equals(i.spatialReference))return!1;if(!t.origin.equals(i.origin))return!1;if(Math.round(t.dpi)!==Math.round(i.dpi))return!1;const r=t.lods,s=i.lods,l=Math.min(r.length,s.length);for(let e=0;e<l;e++){const t=r[e],i=s[e];if(t.level!==i.level||Math.round(t.scale)!==Math.round(i.scale))return!1}return!0}}function G(...e){let t;for(const i of e)if(null!=i)if((0,h.BQ)(i)){if(t){const e=t.split("://")[0];t=e+":"+i.trim()}}else t=(0,h.oP)(i)?i:(0,h.fj)(t,i);return t?(0,h.UC)(t):void 0}async function H(e,t,i,r,l){let o,n,a;if((0,u.Te)(l),"string"==typeof i){const e=(0,h.S8)(i);a=await(0,s.A)(e,{...l,responseType:"json",query:{f:"json",...l?.query}}),a.ssl&&(o&&(o=o.replace(/^http:/i,"https:")),n&&(n=n.replace(/^http:/i,"https:"))),o=e,n=e}else null!=i&&(a={data:i},o=i.jsonUrl||null,n=r);const c=a?.data;if(V(c))return e.styleUrl=o||null,async function(e,t,i,r){const s=i?(0,h.nM)(i):(0,h.gd)();e.styleBase=s,e.style=t,t["sprite-format"]&&"webp"===t["sprite-format"].toLowerCase()&&(e.spriteFormat="webp");const l=[];if(t.sources&&t.sources.esri){const i=t.sources.esri;i.url?await H(e,"esri",G(s,i.url),void 0,r):l.push(H(e,"esri",i,s,r))}for(const i of Object.keys(t.sources))"esri"!==i&&"tilejson"!==i&&"vector"===t.sources[i].type&&(t.sources[i].url?l.push(H(e,i,G(s,t.sources[i].url),void 0,r)):t.sources[i].tiles&&l.push(H(e,i,t.sources[i],s,r)));await Promise.all(l)}(e,c,n,l);if(function(e){return!V(e)}(c))return e.sourceUrl?W(e,c,n,!1,t,l):(e.sourceUrl=o||null,Q(c)&&null==e.style&&(t="tilejson"),W(e,c,n,!0,t,l));throw new Error("You must specify the URL or the JSON for a service or for a style.")}function Q(e){return"object"==typeof e&&!!e&&"tilejson"in e&&null!=e.tilejson}function V(e){return!!e&&"sources"in e&&!!e.sources}async function W(e,t,i,r,s,l){const o=i?(0,h.UC)(i)+"/":(0,h.gd)(),a=function(e,t){const i=512;if(function(e){return e.hasOwnProperty("tileInfo")}(e)){const t=e?.tileInfo;return null!=t&&(null==t.rows&&(t.rows=i),null==t.cols&&(t.cols=i)),e}const r={xmin:-20037507.067161843,ymin:-20037507.067161843,xmax:20037507.067161843,ymax:20037507.067161843,spatialReference:{wkid:102100,latestWkid:3857}};let s,l=null;if(Q(e)){const{bounds:i,vector_layers:r}=e;if(i){const e=(0,D.Gh)({x:i[0],y:i[1],spatialReference:(0,n.o8)(O.KK)}),t=(0,D.Gh)({x:i[2],y:i[3],spatialReference:(0,n.o8)(O.KK)});l={xmin:e.x,ymin:e.y,xmax:t.x,ymax:t.y,spatialReference:(0,n.o8)(O.ch)}}if(r&&r.length>0)s={version:8,sprite:"",glyphs:"",sources:{tilejson:{type:"vector",url:e.tilejson}},layers:J(r)};else if(null==t.style)throw new Error("The TileJSON source does not contain any vector_layers. This VectorTileLayer cannot be loaded.")}null===l&&(l=r);let o=78271.51696400007,a=295828763.7957775;const u=[],h=e.hasOwnProperty("maxzoom")&&null!=e.maxzoom?Math.abs(+e.maxzoom):22;for(let e=0;e<=h;e++)u.push({level:e,scale:a,resolution:o}),o/=2,a/=2;return{capabilities:"TilesOnly",initialExtent:l,fullExtent:r,minScale:0,maxScale:0,tiles:e.tiles,tileInfo:{rows:i,cols:i,dpi:96,format:"pbf",origin:{x:-20037508.342787,y:20037508.342787},lods:u,spatialReference:(0,n.o8)(O.ch)},defaultStyles:s}}(t,e),u=new q(s,(0,h.a6)(o,l?.query??{}),a);if(!r&&e.primarySourceName in e.sourceNameToSource){const t=e.sourceNameToSource[e.primarySourceName];if(!t.isCompatibleWith(u))return;null!=u.fullExtent&&(null!=t.fullExtent?t.fullExtent.union(u.fullExtent):t.fullExtent=u.fullExtent.clone()),t.tileInfo&&u.tileInfo&&t.tileInfo.lods.length<u.tileInfo.lods.length&&(t.tileInfo=u.tileInfo)}if(r&&(e.sourceBase=o,e.source=t,e.validatedSource=a,e.primarySourceName=s),e.sourceNameToSource[s]=u,!Q(e)&&"defaultStyles"in t&&!e.style){if(null==t.defaultStyles)throw new Error;return"string"==typeof t.defaultStyles?H(e,"",G(o,t.defaultStyles,"root.json"),void 0,l):H(e,"",t.defaultStyles,G(o,"root.json"),l)}if(Q(t)&&null==e.style&&a.defaultStyles)return H(e,"",a.defaultStyles,G(o,"root.json"),l)}function J(e){const t=[];for(const i of e)i.geometry_type?t.push(Y(i.geometry_type.toLowerCase(),i,!1)):(t.push(Y("polygon",i,!0)),t.push(Y("line",i,!0)),t.push(Y("circle",i,!0)));return t}function Y(e,t,i){const{id:r,minzoom:s,maxzoom:l}=t,o={type:"polygon"===e||"polygons"===e?"fill":"line"===e||"lines"===e?"line":"circle",id:r,source:"tilejson","source-layer":r,minzoom:s,maxzoom:l};switch(e){case"fill":i&&(o.id+="_polygon",o.filter='(["==", "$type", "Polygon"])'),o.paint={"fill-color":"#808080"};break;case"line":i&&(o.id+="_line",o.filter='(["==", "$type", "LineString"])');break;case"circle":i&&(o.id+="_point",o.filter='(["==", "$type", "Point"])')}return o}var X=i(88788),ee=i(39131),te=i(97159),ie=i(86738),re=i(91806);const se=1e-6;function le(e,t){if(e===t)return!0;if(null==e&&null!=t)return!1;if(null!=e&&null==t)return!1;if(null==e||null==t)return!1;if(!e.spatialReference.equals(t.spatialReference)||e.dpi!==t.dpi)return!1;const i=e.origin,r=t.origin;if(Math.abs(i.x-r.x)>=se||Math.abs(i.y-r.y)>=se)return!1;let s,l;e.lods[0].scale>t.lods[0].scale?(s=e,l=t):(l=e,s=t);for(let e=s.lods[0].scale;e>=l.lods[l.lods.length-1].scale-se;e/=2)if(Math.abs(e-l.lods[0].scale)<se)return!0;return!1}function oe(e,t){if(e===t)return e;if(null==e&&null!=t)return t;if(null!=e&&null==t)return e;if(null==e||null==t)return null;const i=e.size[0],r=e.format,s=e.dpi,l=new ie.A({x:e.origin.x,y:e.origin.y}),o=e.spatialReference,n=e.lods[0].scale>t.lods[0].scale?e.lods[0]:t.lods[0],a=e.lods[e.lods.length-1].scale<=t.lods[t.lods.length-1].scale?e.lods[e.lods.length-1]:t.lods[t.lods.length-1],u=n.scale,h=n.resolution,c=a.scale,p=[];let d=u,y=h,f=0;for(;d>=c;)p.push(new re.A({level:f,resolution:y,scale:d})),f++,d/=2,y/=2;return new E.A({size:[i,i],dpi:s,format:r||"pbf",origin:l,lods:p,spatialReference:o})}var ne=i(45013);class ae{constructor(e){this.getUnmaskedRenderer=e}}function ue(e){const t=e.getExtension("WEBGL_debug_renderer_info");return t?new ae(()=>e.getParameter(t.UNMASKED_RENDERER_WEBGL)):null}let he;function ce(){return he??=function(){const e=new pe,t=function(e){if("undefined"==typeof WebGL2RenderingContext)return null;const t=document.createElement("canvas");if(!t)return null;let i=t.getContext("webgl2",{failIfMajorPerformanceCaveat:!0});if(null==i&&(i=t.getContext("webgl2"),null!=i&&(e.majorPerformanceCaveat=!0,e.unmaskedRenderer=ue(i)?.getUnmaskedRenderer()??"unknown")),null==i)return i;e.available=!0,e.maxTextureSize=i.getParameter(i.MAX_TEXTURE_SIZE),e.supportsVertexShaderSamplers=i.getParameter(i.MAX_VERTEX_TEXTURE_IMAGE_UNITS)>0;const r=i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.HIGH_FLOAT);return r&&(e.supportsHighPrecisionFragment=r.precision>0),i}(e);return null==t||(e.supportsColorBufferFloat=null!==t.getExtension("EXT_color_buffer_float"),e.supportsColorBufferFloatBlend=null!==t.getExtension("EXT_float_blend"),e.supportsColorBufferHalfFloat=e.supportsColorBufferFloat||null!==t.getExtension("EXT_color_buffer_half_float")),e}(),he}class pe{constructor(){this.available=!1,this.majorPerformanceCaveat=!1,this.maxTextureSize=0,this.supportsVertexShaderSamplers=!1,this.supportsHighPrecisionFragment=!1,this.supportsColorBufferFloat=!1,this.supportsColorBufferFloatBlend=!1,this.supportsColorBufferHalfFloat=!1,this.unmaskedRenderer="unloaded"}}let de=class extends((0,S.dM)((0,M.j)((0,C.J)((0,w.f)((0,A.b)((0,x.q)((0,I.A)((0,b.d)((0,v.p)((0,a.P)(_.A))))))))))){constructor(...e){super(...e),this._spriteSourceMap=new Map,this.currentStyleInfo=null,this.isReference=null,this.operationalLayerType="VectorTileLayer",this.path=null,this.refreshInterval=0,this.style=null,this.tilemapCache=null,this.type="vector-tile"}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){if(this.sourceNameToSource)for(const e of Object.values(this.sourceNameToSource))e?.destroy();this.primarySource?.destroy(),this._spriteSourceMap.clear()}async prefetchResources(e){await this.loadSpriteSource(globalThis.devicePixelRatio||1,e)}load(e){const t=this.loadFromPortal({supportedTypes:["Vector Tile Service"],supportsData:!1},e).catch(u.QP).then(async()=>{if(!this.portalItem?.id)return;const t=`${this.portalItem.itemCdnUrl}/resources/styles/root.json`;(await(0,s.A)(t,{...e,query:{f:"json",...this.customParameters,token:this.apiKey},authMode:this.portalItem.portal.authMode})).data&&this.read({url:t},(0,X.v)(this.portalItem,"portal-item"))}).catch(u.QP).then(()=>this._loadStyle(e));return this.addResolvingPromise(t),Promise.resolve(this)}get apiKey(){return super.apiKey}set apiKey(e){super.apiKey=e}set portalItem(e){super.portalItem=e}get attributionDataUrl(){const e=this.currentStyleInfo,t=e?.serviceUrl&&(0,h.An)(e.serviceUrl);if(!t)return null;const i=this._getDefaultAttribution(t.path);return i?(0,h.a6)(i,{...this.customParameters,token:this.apiKey}):null}get capabilities(){const e=this.primarySource;return e?e.capabilities:{operations:{supportsExportTiles:!1,supportsTileMap:!1},exportTiles:null}}get fullExtent(){return this.primarySource?.fullExtent||null}get initialExtent(){return this.primarySource?.initialExtent||null}get parsedUrl(){return this.serviceUrl?(0,h.An)(this.serviceUrl):null}get serviceUrl(){return this.currentStyleInfo?.serviceUrl||null}get spatialReference(){return this.tileInfo?.spatialReference??null}get styleUrl(){return this.currentStyleInfo?.styleUrl||null}writeStyleUrl(e,t){e&&(0,h.BQ)(e)&&(e=`https:${e}`);const i=(0,ee.py)(e);t.styleUrl=(0,te.e)(e,i)}get tileInfo(){const e=[];for(const t in this.sourceNameToSource)e.push(this.sourceNameToSource[t]);let t=this.primarySource?.tileInfo||new E.A;if(e.length>1)for(let i=0;i<e.length;i++)le(t,e[i].tileInfo)&&(t=oe(t,e[i].tileInfo));return t}readTilemapCache(e,t){const i=t.capabilities?.includes("Tilemap");return i?new L.d({layer:this}):null}set url(e){if(!e)return void this._set("url",e);const t=(0,h.An)(e);this._set("url",t.path),t.query&&(this.customParameters={...this.customParameters,...t.query})}readVersion(e,t){return t.version?parseFloat(t.version):parseFloat(t.currentVersion)}async loadSpriteSource(e=1,t){if(!this._spriteSourceMap.has(e)){const i=ce().maxTextureSize,r=this.currentStyleInfo?.spriteUrl?(0,h.a6)(this.currentStyleInfo.spriteUrl,{...this.customParameters,token:this.apiKey}):null,s=new U({type:"url",spriteUrl:r,pixelRatio:e,spriteFormat:this.currentStyleInfo?.spriteFormat},i);await s.load(t),this._spriteSourceMap.set(e,s)}return this._spriteSourceMap.get(e)}async setSpriteSource(e,t){if(!e)return null;const i=ce().maxTextureSize,r=e.spriteUrl,s=r?(0,h.a6)(r,{...this.customParameters,token:this.apiKey}):null;if(!s&&"url"===e.type)return null;const l=new U(e,i);try{await l.load(t);const i=e.pixelRatio||1;return this._spriteSourceMap.clear(),this._spriteSourceMap.set(i,l),s&&this.currentStyleInfo&&(this.currentStyleInfo.spriteUrl=s),this.emit("spriteSource-change",{spriteSource:l}),l}catch(e){(0,u.QP)(e)}return null}async loadStyle(e,t){const i=e||this.style||this.url;return this._loadingTask&&"string"==typeof i&&this.url===i||(this._loadingTask?.abort(),this._loadingTask=(0,l.UT)(e=>(this._spriteSourceMap.clear(),this._getSourceAndStyle(i,{signal:e})),t)),this._loadingTask.promise}getStyleLayerId(e){return this.styleRepository.getStyleLayerId(e)}getStyleLayerIndex(e){return this.styleRepository.getStyleLayerIndex(e)}getPaintProperties(e){return(0,n.o8)(this.styleRepository?.getPaintProperties(e))}setPaintProperties(e,t){const i=this.styleRepository.isPainterDataDriven(e);this.styleRepository.setPaintProperties(e,t);const r=this.styleRepository.isPainterDataDriven(e);this.emit("paint-change",{layer:e,paint:t,isDataDriven:i||r})}getStyleLayer(e){return(0,n.o8)(this.styleRepository.getStyleLayer(e))}setStyleLayer(e,t){this.styleRepository.setStyleLayer(e,t),this.emit("style-layer-change",{layer:e,index:t})}deleteStyleLayer(e){this.styleRepository.deleteStyleLayer(e),this.emit("delete-style-layer",{layer:e})}getLayoutProperties(e){return(0,n.o8)(this.styleRepository.getLayoutProperties(e))}setLayoutProperties(e,t){this.styleRepository.setLayoutProperties(e,t),this.emit("layout-change",{layer:e,layout:t})}setStyleLayerVisibility(e,t){this.styleRepository.setStyleLayerVisibility(e,t),this.emit("style-layer-visibility-change",{layer:e,visibility:t})}getStyleLayerVisibility(e){return this.styleRepository.getStyleLayerVisibility(e)}write(e,t){return t?.origin&&!this.styleUrl?(t.messages&&t.messages.push(new o.A("vectortilelayer:unsupported",`VectorTileLayer (${this.title}, ${this.id}) with style defined by JSON only are not supported`,{layer:this})),null):super.write(e,t)}getTileUrl(e,t,i){return null}async _getSourceAndStyle(e,t){if(!e)throw new Error("invalid style!");const i=await async function(e,t){const i={source:null,sourceBase:null,sourceUrl:null,validatedSource:null,style:null,styleBase:null,styleUrl:null,sourceNameToSource:{},primarySourceName:"",spriteFormat:"png"},[r,s]="string"==typeof e?[e,null]:[null,e.jsonUrl];return await H(i,"esri",e,s,t),{layerDefinition:i.validatedSource,url:r,serviceUrl:i.sourceUrl,style:i.style,styleUrl:i.styleUrl,spriteUrl:i.style?.sprite&&G(i.styleBase,i.style.sprite),spriteFormat:i.spriteFormat,glyphsUrl:i.style?.glyphs&&G(i.styleBase,i.style.glyphs),sourceNameToSource:i.sourceNameToSource,primarySourceName:i.primarySourceName}}(e,{...t,query:{...this.customParameters,token:this.apiKey}});"webp"===i.spriteFormat&&(await function(){if(R)return R;const e={lossy:"UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",lossless:"UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA==",alpha:"UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAARBxAR/Q9ERP8DAABWUDggGAAAABQBAJ0BKgEAAQAAAP4AAA3AAP7mtQAAAA==",animation:"UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA"};return R=new Promise(t=>{const i=new Image;i.onload=()=>{i.onload=i.onerror=null,t(i.width>0&&i.height>0)},i.onerror=()=>{i.onload=i.onerror=null,t(!1)},i.src="data:image/webp;base64,"+e.lossy}),R}()||(i.spriteFormat="png")),this._set("currentStyleInfo",{...i}),"string"==typeof e?(this.url=e,this.style=null):(this.url=null,this.style=e),this._set("sourceNameToSource",i.sourceNameToSource),this._set("primarySource",i.sourceNameToSource[i.primarySourceName]),this._set("styleRepository",new ne.A(i.style,!1)),this.read(i.layerDefinition,{origin:"service"}),this.emit("load-style")}_getDefaultAttribution(e){const t=e.match(/^https?:\/\/(?:basemaps|basemapsbeta|basemapsdev)(?:-api)?\.arcgis\.com(\/[^/]+)?\/arcgis\/rest\/services\/([^/]+(\/[^/]+)*)\/vectortileserver/i),i=["OpenBasemap_v2","OpenBasemap_GCS_v2","OpenStreetMap_v2","OpenStreetMap_Daylight_v2","OpenStreetMap_Export_v2","OpenStreetMap_FTS_v2","OpenStreetMap_GCS_v2","World_Basemap","World_Basemap_v2","World_Basemap_Export_v2","World_Basemap_GCS_v2","World_Basemap_WGS84","World_Contours_v2","World_Hillshade_v2"];if(!t)return;const r=t[2]&&t[2].toLowerCase();if(!r)return;const s=t[1]||"";for(const e of i)if(e.toLowerCase().includes(r))return(0,h.S8)(`//static.arcgis.com/attribution/Vector${s}/${e}`)}async _loadStyle(e){return this._loadingTask?.promise??this.loadStyle(null,e)}};(0,r.Cg)([(0,c.MZ)({readOnly:!0})],de.prototype,"attributionDataUrl",null),(0,r.Cg)([(0,c.MZ)({type:["show","hide"]})],de.prototype,"listMode",void 0),(0,r.Cg)([(0,c.MZ)({json:{read:!0,write:!0}})],de.prototype,"blendMode",void 0),(0,r.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],de.prototype,"capabilities",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],de.prototype,"currentStyleInfo",void 0),(0,r.Cg)([(0,c.MZ)({json:{read:!1},readOnly:!0,type:m.A})],de.prototype,"fullExtent",null),(0,r.Cg)([(0,c.MZ)({json:{read:!1},readOnly:!0,type:m.A})],de.prototype,"initialExtent",null),(0,r.Cg)([(0,c.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],de.prototype,"isReference",void 0),(0,r.Cg)([(0,c.MZ)({type:["VectorTileLayer"]})],de.prototype,"operationalLayerType",void 0),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],de.prototype,"parsedUrl",null),(0,r.Cg)([(0,c.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],de.prototype,"path",void 0),(0,r.Cg)([(0,c.MZ)({type:Number,json:{write:!1,origins:{"web-map":{write:!1},"web-scene":{write:!1},"portal-item":{write:!1}}}})],de.prototype,"refreshInterval",void 0),(0,r.Cg)([(0,c.MZ)()],de.prototype,"style",void 0),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],de.prototype,"serviceUrl",null),(0,r.Cg)([(0,c.MZ)({type:g.A,readOnly:!0})],de.prototype,"spatialReference",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],de.prototype,"styleRepository",void 0),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],de.prototype,"sourceNameToSource",void 0),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],de.prototype,"primarySource",void 0),(0,r.Cg)([(0,c.MZ)({type:String,readOnly:!0,json:{write:{ignoreOrigin:!0},origins:{"web-document":{write:{ignoreOrigin:!0,isRequired:!0}}}}})],de.prototype,"styleUrl",null),(0,r.Cg)([(0,f.K)(["portal-item","web-document"],"styleUrl")],de.prototype,"writeStyleUrl",null),(0,r.Cg)([(0,c.MZ)({json:{read:!1,origins:{service:{read:!1}}},readOnly:!0,type:E.A})],de.prototype,"tileInfo",null),(0,r.Cg)([(0,c.MZ)()],de.prototype,"tilemapCache",void 0),(0,r.Cg)([(0,d.w)("service","tilemapCache",["capabilities","tileInfo"])],de.prototype,"readTilemapCache",null),(0,r.Cg)([(0,c.MZ)({json:{read:!1},readOnly:!0,value:"vector-tile"})],de.prototype,"type",void 0),(0,r.Cg)([(0,c.MZ)({json:{origins:{"web-document":{read:{source:"styleUrl"}},"portal-item":{read:{source:"url"}}},write:!1,read:!1}}),(0,c.MZ)(P.OZ)],de.prototype,"url",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],de.prototype,"version",void 0),(0,r.Cg)([(0,d.w)("version",["version","currentVersion"])],de.prototype,"readVersion",null),de=(0,r.Cg)([(0,y.$)("esri.layers.VectorTileLayer")],de);const ye=de},52136:(e,t,i)=>{i.d(t,{p:()=>o});var r=i(31635),s=i(10107),l=(i(44208),i(53966),i(87811),i(40608));const o=e=>{const t=e;let i=class extends t{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,r.Cg)([(0,s.MZ)({type:String})],i.prototype,"apiKey",null),i=(0,r.Cg)([(0,l.$)("esri.layers.mixins.APIKeyMixin")],i),i}},60999:(e,t,i)=>{i.d(t,{DZ:()=>y,Ke:()=>d,Tj:()=>h,UT:()=>f,jJ:()=>u});var r=i(31635),s=i(65008),l=i(97768),o=i(74887),n=i(10107),a=i(40608);function u(e,t,i){return(0,o.Lx)(e.map((e,r)=>t.apply(i,[e,r])))}async function h(e,t,i){return(await(0,o.Lx)(e.map((e,r)=>t.apply(i,[e,r])))).map(e=>e.value)}function c(e){return{ok:!0,value:e}}function p(e){return{ok:!1,error:e}}async function d(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return c(await e)}catch(e){return p(e)}}async function y(e){try{return c(await e)}catch(e){return(0,o.QP)(e),p(e)}}function f(e,t){return new m(e,t)}let m=class extends s.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,l.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:i}=this._abortController;this.promise=e(i),this.promise.then(e=>{this._result=c(e),this._cleanup()},e=>{this._result=p(e),this._cleanup()}),this._abortHandle=(0,o.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,l.xt)(this._abortHandle),this._abortController=null}};(0,r.Cg)([(0,n.MZ)()],m.prototype,"value",null),(0,r.Cg)([(0,n.MZ)()],m.prototype,"error",null),(0,r.Cg)([(0,n.MZ)()],m.prototype,"finished",null),(0,r.Cg)([(0,n.MZ)()],m.prototype,"promise",void 0),(0,r.Cg)([(0,n.MZ)()],m.prototype,"_result",void 0),m=(0,r.Cg)([(0,a.$)("esri.core.asyncUtils.ReactiveTask")],m)},66344:(e,t,i)=>{i.d(t,{q:()=>n});const r=!!(0,i(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class s{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._users=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._users.clear(),this._db=null}register(e){this._users.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._users.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const i=this._db.get(e.id+t);return i?.size??0}put(e,t,i,s,o){t=e.id+t;const n=this._db.get(t);if(n&&(this._size-=n.size,e.size-=n.size,this._db.delete(t),n.entry!==i&&this._notifyRemove(t,n.entry,n.size,0)),s>this._maxSize)return void this._notifyRemove(t,i,s,0);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!s||s<0)return r||console.warn(`Refusing to cache entry with size ${s} for key ${t}`),void this._notifyRemove(t,i,0,0);const a=1+Math.max(o,-4)- -3;this._db.set(t,new l(i,s,a)),this._size+=s,e.size+=s,this._checkSize()}updateSize(e,t){t=e.id+t;const i=this._db.get(t);if(!i)return;this._size-=i.size,e.size-=i.size;let r=i.entry.usedMemory;for(;r>this._maxSize;){const e=this._notifyRemove(t,i.entry,r,1);if(!(null!=e&&e>0))return void this._db.delete(t);r=e}i.size=r,this._size+=r,e.size+=r,this._checkSize()}pop(e,t){t=e.id+t;const i=this._db.get(t);if(i)return this._size-=i.size,e.size-=i.size,this._db.delete(t),++this._hit,i.entry;++this._miss}get(e,t){t=e.id+t;const i=this._db.get(t);if(void 0!==i)return this._db.delete(t),i.lives=i.lifetime,this._db.set(t,i),++this._hit,i.entry;++this._miss}peek(e,t){const i=this._db.get(e.id+t);return i?++this._hit:++this._miss,i?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},i=new Array;this._db.forEach((e,r)=>{const s=e.lifetime;i[s]=(i[s]||0)+e.size,this._users.forEach(i=>{const{id:s,name:l}=i;if(r.startsWith(s)){const i=t[l]||0;t[l]=i+e.size}})});const r={};this._users.forEach(e=>{const i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const s=t[i]||0;t[i]=s,r[i]=Math.round(100*e.hitRate)+"%"}else r[i]="0%"});const s=Object.keys(t);s.sort((e,i)=>t[i]-t[e]),s.forEach(i=>e[i]=Math.round(t[i]/2**20)+"MB / "+r[i]);for(let t=i.length-1;t>=0;--t){const r=i[t];r&&(e["Priority "+(t+-3-1)]=Math.round(r/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forEach(e=>e.resetHitRate())}clear(e){const t=e.id;this._db.forEach((e,i)=>{i.startsWith(t)&&(this._size-=e.size,this._db.delete(i),this._notifyRemove(i,e.entry,e.size,0))}),e.size=0}clearAll(){this._db.forEach((e,t)=>this._notifyRemove(t,e.entry,e.size,0)),this._users.forEach(e=>e.size=0),this._size=0,this._db.clear()}*values(e){for(const[t,i]of this._db)t.startsWith(e.id)&&(yield i.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,i,r){const s=this._users.get(e.split(o)[0])?.removeFunc,l=s?.(t,r,i);return"number"==typeof l?l:null}_checkSize(){this._sizeLimits.forEach((e,t)=>this._checkSizeLimits(e,t)),this._checkSizeLimits(this.maxSize)}setMaxSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){const i=t??this;if(i.size<=e)return;const r=t?.id;let s=!0;for(;s;){s=!1;for(const[l,n]of this._db)if(0===n.lifetime&&(!r||l.startsWith(r))){const r=t??this._users.get(l.split(o)[0]);if(this._purgeItem(l,n,r),i.size<=.9*e)return;s||=this._db.has(l)}}for(const[s,l]of this._db)if(!r||s.startsWith(r)){const r=t??this._users.get(s.split(o)[0]);if(this._purgeItem(s,l,r),i.size<=.9*e)return}}_purgeItem(e,t,i){if(this._db.delete(e),t.lives<=1){this._size-=t.size,i&&(i.size-=t.size);const r=this._notifyRemove(e,t.entry,t.size,1);null!=r&&r>0&&(this._size+=r,i&&(i.size+=r),t.lives=t.lifetime,t.size=r,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}new s(0);class l{constructor(e,t,i){this.entry=e,this.size=t,this.lifetime=i,this.lives=i}}const o=":";class n{constructor(e,t){this.removeFunc=t,this._storage=new s,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy(),this._storage=null}put(e,t,i=1){this._storage.put(this,e,t,i,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},69208:(e,t,i)=>{i.d(t,{d:()=>o});var r=i(31635),s=i(10107),l=(i(44208),i(53966),i(87811),i(40608));const o=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.customParameters=null}};return(0,r.Cg)([(0,s.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],i.prototype,"customParameters",void 0),i=(0,r.Cg)([(0,l.$)("esri.layers.mixins.CustomParametersMixin")],i),i}},69540:(e,t,i)=>{i.d(t,{OU:()=>h,Pw:()=>c});var r=i(31635),s=i(65008),l=(i(44208),i(4718)),o=(i(53966),i(97768)),n=i(88620),a=i(40608);const u=Symbol("ClonableMixin"),h=e=>{var t;const i=e;let s=class extends i{constructor(){super(...arguments),this[t]=!0}static{t=u}clone(e){const t=(0,n.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");const i=t.metadata,r=t.store,s={},a=new Map;for(const t in i){const o=i[t],n=r?.originOf(t),u=o.clonable;if(o.readOnly||!1===u||7!==n&&0!==n&&5!==n&&4!==n)continue;const h=this[t];let c=null;if("function"==typeof u)c=u(h,e);else if("reference"===u)c=h;else if(c=(0,l.TU)(h,e),null!=h&&null==c)continue;0===n?a.set(t,c):s[t]=c}const u=new(0,Object.getPrototypeOf(this).constructor)(s);if(a.size){const e=(0,n.oY)(u)?.store;if(e)for(const[t,i]of a)e.set(t,i,0)}return u}};return s=(0,r.Cg)([(0,a.$)("esri.core.Clonable")],s),s},c=h(s.A)},78553:(e,t,i)=>{i.d(t,{D:()=>l,p:()=>s});var r=i(56507);function s(e){const t=(0,r.Vr)(100*(1-e));return Math.max(0,Math.min(t,100))}function l(e){const t=1-e/100;return Math.max(0,Math.min(t,1))}},88788:(e,t,i)=>{i.d(t,{m:()=>o,v:()=>l});var r=i(84952),s=i(20655);function l(e,t){return{...n(e,t),readResourcePaths:[]}}function o(e,t,i){const s=(0,r.An)(e.itemUrl);return{...n(e,t),messages:[],writtenProperties:[],blockedRelativeUrls:[],verifyItemRelativeUrls:s?{rootPath:s.path,writtenUrls:[]}:null,resources:i?{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}:null}}function n(e,t){return{origin:t,url:(0,r.An)(e.itemUrl),portal:e.portal||s.A.getDefault(),portalItem:e}}},89186:(e,t,i)=>{i.d(t,{f:()=>c});var r=i(31635),s=i(10107),l=(i(44208),i(53966),i(87811),i(36005)),o=i(40608),n=i(16930),a=i(87045),u=i(65509),h=i(25943);const c=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.copyright=null,this.minScale=0,this.maxScale=0,this.spatialReference=null,this.tileInfo=null,this.tilemapCache=null}destroy(){this.tilemapCache?.destroy?.()}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}get supportsBlankTile(){return this.version>=10.2}readTilemapCache(e,t,i){const r=t.capabilities?.includes("Tilemap");let{minLOD:s,maxLOD:l,minScale:o,maxScale:n}=t;if(null==s&&null==l&&(0!==o||0!==n)){const e=e=>Math.round(1e4*e)/1e4;o=e(o||t.tileInfo.lods[0].scale),n=e(n||t.tileInfo.lods[t.tileInfo.lods.length-1].scale);for(const i of t.tileInfo.lods){const t=e(i.scale);s=t>=o?i.level:s,l=t>=n?i.level:l}}if(r)return new h.d({layer:this,minLOD:s,maxLOD:l});if(t.tileInfo){const e=new a.A;return e.read(t.tileInfo,i),new u.A(e,s,l)}return null}};return(0,r.Cg)([(0,s.MZ)({json:{read:{source:"copyrightText"}}})],i.prototype,"copyright",void 0),(0,r.Cg)([(0,s.MZ)()],i.prototype,"minScale",void 0),(0,r.Cg)([(0,l.w)("service","minScale")],i.prototype,"readMinScale",null),(0,r.Cg)([(0,s.MZ)()],i.prototype,"maxScale",void 0),(0,r.Cg)([(0,l.w)("service","maxScale")],i.prototype,"readMaxScale",null),(0,r.Cg)([(0,s.MZ)({type:n.A})],i.prototype,"spatialReference",void 0),(0,r.Cg)([(0,s.MZ)({readOnly:!0})],i.prototype,"supportsBlankTile",null),(0,r.Cg)([(0,s.MZ)({type:a.A})],i.prototype,"tileInfo",void 0),(0,r.Cg)([(0,s.MZ)()],i.prototype,"tilemapCache",void 0),(0,r.Cg)([(0,l.w)("service","tilemapCache",["capabilities","tileInfo"])],i.prototype,"readTilemapCache",null),(0,r.Cg)([(0,s.MZ)()],i.prototype,"version",void 0),i=(0,r.Cg)([(0,o.$)("esri.layers.mixins.ArcGISCachedService")],i),i}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[588,7548,8207],{4146:(e,t,i)=>{i.d(t,{A:()=>_});var r=i(31635),s=i(78888),n=i(49186),a=i(65529),l=i(4902),o=i(92474),h=i(53966),u=i(74887),c=i(84952),d=i(10107),p=(i(44208),i(87811),i(40608)),f=i(5443),y=i(16930),g=i(92602),m=i(79677);let v=0,_=class extends((0,a.Zt)((0,l.sA)(o.x_))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new f.A(-180,-90,180,90,y.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+v++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=y.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await Promise.all([i.e(812),i.e(7982)]).then(i.bind(i,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:r}=await Promise.all([i.e(812),i.e(5613),i.e(5710)]).then(i.bind(i,45613));try{return await r(t)}catch(e){const i=t?.portalItem,r=i?.id||"unset",s=i?.portal?.url||g.A.portalUrl;throw h.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+s+"', id: '"+r+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,u.zf)(e)||h.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){const{parent:e}=this;e&&(this.parent=null,e.removeChildLayer?.(this))}get effectiveVisible(){return this.visible&&(this.parent?.effectiveVisible??!0)}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}removeFromParent(){const{parent:e}=this;e&&(e.removeChildLayer?.(this),this.parent=null)}get parsedUrl(){return(0,c.An)(this.url)}createLayerView(e,t){return Promise.reject(new n.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,s.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new n.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,r.Cg)([(0,d.MZ)({type:String})],_.prototype,"attributionDataUrl",void 0),(0,r.Cg)([(0,d.MZ)({readOnly:!0})],_.prototype,"effectiveVisible",null),(0,r.Cg)([(0,d.MZ)({type:f.A})],_.prototype,"fullExtent",void 0),(0,r.Cg)([(0,d.MZ)({readOnly:!0})],_.prototype,"hasAttributionData",null),(0,r.Cg)([(0,d.MZ)({type:String,clonable:!1})],_.prototype,"id",void 0),(0,r.Cg)([(0,d.MZ)({type:Boolean,nonNullable:!0})],_.prototype,"legendEnabled",void 0),(0,r.Cg)([(0,d.MZ)({type:["show","hide","hide-children"]})],_.prototype,"listMode",void 0),(0,r.Cg)([(0,d.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],_.prototype,"opacity",void 0),(0,r.Cg)([(0,d.MZ)({clonable:!1})],_.prototype,"parent",void 0),(0,r.Cg)([(0,d.MZ)({readOnly:!0})],_.prototype,"parsedUrl",null),(0,r.Cg)([(0,d.MZ)({type:Boolean,readOnly:!0})],_.prototype,"persistenceEnabled",void 0),(0,r.Cg)([(0,d.MZ)({type:Boolean})],_.prototype,"popupEnabled",void 0),(0,r.Cg)([(0,d.MZ)({type:Boolean})],_.prototype,"attributionVisible",void 0),(0,r.Cg)([(0,d.MZ)({type:y.A})],_.prototype,"spatialReference",void 0),(0,r.Cg)([(0,d.MZ)({type:String})],_.prototype,"title",void 0),(0,r.Cg)([(0,d.MZ)({readOnly:!0,json:{read:!1}})],_.prototype,"type",void 0),(0,r.Cg)([(0,d.MZ)()],_.prototype,"url",void 0),(0,r.Cg)([(0,d.MZ)({type:m.A})],_.prototype,"visibilityTimeExtent",void 0),(0,r.Cg)([(0,d.MZ)({type:Boolean,nonNullable:!0})],_.prototype,"visible",void 0),_=(0,r.Cg)([(0,p.$)("esri.layers.Layer")],_)},4902:(e,t,i)=>{i.d(t,{PH:()=>l,sA:()=>a});var r=i(31635),s=i(40608);let n=0;const a=e=>{const t=e;let i=class extends t{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+n++})}};return i=(0,r.Cg)([(0,s.$)("esri.core.Identifiable")],i),i},l=e=>{const t=e;let i=class extends t{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:n++})}};return i=(0,r.Cg)([(0,s.$)("esri.core.Identifiable.NumericIdentifiable")],i),i};a(class{})},8303:(e,t,i)=>{i.d(t,{A:()=>C});var r=i(31635),s=i(92602),n=i(70333),a=i(78888),l=i(60999),o=i(49186),h=i(53966),u=i(97768),c=i(74887),d=i(84952),p=i(10107),f=(i(44208),i(87811),i(36005)),y=i(40608),g=i(43937),m=i(77548),v=i(20655),_=i(80812),w=i(41318),b=i(10407);const C=e=>{const t=e;let C=class extends t{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,t,i){if(t.itemId)return new _.default({id:t.itemId,portal:i?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:r}=await i.e(1204).then(i.bind(i,41204));return(0,c.Te)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,c.zf)(e)||h.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,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:r},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,c.QP)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=!n.id?.findCredential(this.url),s=e===i.id;if(s&&i.portal.user)return this._getUserPrivileges(i,r);let a,l;if(s)a=i.portal.url;else try{a=await(0,m.wI)(this.url,t)}catch(e){(0,c.QP)(e)}if(!a||!(0,d.b8)(a,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;l=await(n.id?.getCredential(`${a}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.QP)(e)}const o=!0,h=!1,u=!1;if(!l)return{features:{edit:o,fullEdit:h},content:{updateItem:u}};try{if(s?await i.reload():(i=new _.default({id:e,portal:{url:a}}),await i.load(t)),i.portal.user)return this._getUserPrivileges(i,r)}catch(e){(0,c.QP)(e)}return{features:{edit:o,fullEdit:h},content:{updateItem:u}}}_getUserPrivileges(e,t){const i=(0,b.It)(e);return t&&(i.features.edit=!0),i}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const i=M.credential===t?M.user:await this._fetchEditingUser(e);return M.credential=t,M.user=i,null==i?.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=n.id?.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,s=v.A.getDefault();if(s&&s.loaded&&(0,d.S8)(s.restUrl)===(0,d.S8)(r))return s.user;const o=`${r}/community/self`,h=null!=e?e.signal:null,u=await(0,l.Ke)((0,a.A)(o,{authMode:"no-prompt",query:{f:"json"},signal:h}));return u.ok?w.A.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t?.portal,r=this.portalItem?.id&&(this.portalItem.portal||v.A.getDefault());return i&&r&&!(0,d.ut)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new o.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,{...t,layer:this})}};return(0,r.Cg)([(0,p.MZ)({type:_.default})],C.prototype,"portalItem",null),(0,r.Cg)([(0,f.w)("web-document","portalItem",["itemId"])],C.prototype,"readPortalItem",null),(0,r.Cg)([(0,g.K)("web-document","portalItem",{itemId:{type:String}})],C.prototype,"writePortalItem",null),(0,r.Cg)([(0,p.MZ)({clonable:!1})],C.prototype,"resourceReferences",void 0),(0,r.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],C.prototype,"userHasEditingPrivileges",void 0),(0,r.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],C.prototype,"userHasFullEditingPrivileges",void 0),(0,r.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],C.prototype,"userHasUpdateItemPrivileges",void 0),C=(0,r.Cg)([(0,y.$)("esri.layers.mixins.PortalLayer")],C),C},M={credential:null,user:null}},10407:(e,t,i)=>{i.d(t,{It:()=>p,LG:()=>a,OM:()=>h,Sm:()=>u,Y:()=>l,bK:()=>o,mm:()=>d,sQ:()=>c});var r=i(91218),s=i(16930),n=i(28735);function a(e,t){if(!l(e,t)){const i=e.typeKeywords;i?i.push(t):e.typeKeywords=[t]}}function l(e,t){return!!e.typeKeywords?.includes(t)}function o(e){return l(e,d.HOSTED_SERVICE)}function h(e,t){const i=e.typeKeywords;if(i){const e=i.indexOf(t);e>-1&&i.splice(e,1)}}function u(e,t,i){i?a(e,t):h(e,t)}async function c(e){const t=e.clone().normalize();let i;if(t.length>1)for(const e of t)i?e.width>i.width&&(i=e):i=e;else i=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,n.ci)(e);const i=s.A.WGS84;return await(0,r.initializeProjection)(t,i),(0,r.project)(e,i)}(i)}const d={CHARTS:"Charts",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery"};function p(e){const{portal:t,isOrgItem:i,itemControl:r}=e,s=t.user?.privileges;let n=!s||s.includes("features:user:edit"),a=!!i&&!!s?.includes("features:user:fullEdit");const l="update"===r||"admin"===r;return l?a=n=!0:a&&(n=!0),{features:{edit:n,fullEdit:a},content:{updateItem:l}}}},16215:(e,t,i)=>{i.d(t,{S:()=>s,Y:()=>r});const r=Symbol("BasemapInstance");function s(e){return null!=e&&"object"==typeof e&&r in e}},18768:(e,t,i)=>{i.d(t,{b:()=>o});var r=i(31635),s=i(53966),n=i(10107),a=(i(44208),i(87811),i(40608)),l=i(60694);const o=e=>{const t=e;let i=class extends t{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(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,s.A.getLogger(this)))}};return(0,r.Cg)([(0,n.MZ)()],i.prototype,"title",null),(0,r.Cg)([(0,n.MZ)({type:String})],i.prototype,"url",null),i=(0,r.Cg)([(0,a.$)("esri.layers.mixins.ArcGISService")],i),i}},25943:(e,t,i)=>{i.d(t,{d:()=>S});var r,s=i(31635),n=i(78888),a=i(65008),l=i(49186),o=i(36563),h=(i(44208),i(66344)),u=i(15142),c=i(74887),d=i(36708),p=i(96211),f=i(84952),y=i(10107),g=(i(53966),i(87811),i(40608)),m=i(72802),v=i(4718),_=i(69397),w=i(34275);class b{constructor(e){!function(e){if(!e?.location)throw new l.A("tilemap:missing-location","Location missing from tilemap response");if(!1===e.valid)throw new l.A("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new l.A("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new l.A("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new l.A("tilemap:data-mismatch","Number of data items does not match width/height of tilemap")}(e);const{location:t,data:i}=e;this.location=Object.freeze((0,v.o8)(t));const r=this.location.width,s=this.location.height;let n=!0,a=!0;const o=function(e,t=!1){return e<=w.y9?t?new Array(e).fill(0):new Array(e):new Uint32Array(e)}(Math.ceil(r*s/32));let h=0;for(let e=0;e<i.length;e++){const t=e%32;i[e]?(a=!1,o[h]|=1<<t):n=!1,31===t&&++h}a?(this._availability="unavailable",this.byteSize=40):n?(this._availability="available",this.byteSize=40):(this._availability=o,this.byteSize=40+(0,_.Qf)(o))}getAvailability(e,t){if("unavailable"===this._availability||"available"===this._availability)return this._availability;const i=(e-this.location.top)*this.location.width+(t-this.location.left),r=i%32,s=i>>5,n=this._availability;return s<0||s>n.length?"unknown":n[s]&1<<r?"available":"unavailable"}static fromDefinition(e,t){const i=e.service.request||n.A,{row:r,col:s,width:a,height:o}=e,h={query:{f:"json"}};return t=t?{...h,...t}:h,i(function(e){let t;if(e.service.tileServers?.length){const i=e.service.tileServers;t=`${i&&i.length?i[e.row%i.length]:e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}else t=`${e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`;const i=e.service.query;return i&&(t=`${t}?${i}`),t}(e),t).then(e=>e.data).catch(e=>{if(422===e?.details?.httpStatus)return{location:{top:r,left:s,width:a,height:o},valid:!0,data:new Array(a*o).fill(0)};throw e}).then(e=>{if(e.location&&(e.location.top!==r||e.location.left!==s||e.location.width!==a||e.location.height!==o))throw new l.A("tilemap:location-mismatch","Tilemap response for different location than requested",{response:e,definition:{top:r,left:s,width:a,height:o}});return b.fromJSON(e)})}static fromJSON(e){return Object.freeze(new b(e))}}function C(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}function M(e,t,i){return new l.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i})}let S=class extends a.A{static{r=this}constructor(e){super(e),this._pendingTilemapRequests={},this.request=n.A,this.size=32,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new h.q(2097152),this.addHandles((0,d.wB)(()=>{const{layer:e}=this;return[e?.parsedUrl,e?.tileServers,e?.apiKey,e?.customParameters]},()=>this._initializeTilemapDefinition(),d.Vh))}get effectiveMinLOD(){return this.minLOD??this.layer.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.layer.tileInfo.lods[this.layer.tileInfo.lods.length-1].level}getAvailability(e,t,i){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return"unavailable";const r=this._tilemapFromCache(e,t,i,this._tmpTilemapDefinition);return r?r.getAvailability(t,i):"unknown"}fetchAvailability(e,t,i,r){return!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD?Promise.reject(M(e,t,i)):this._fetchTilemap(e,t,i,r).catch(e=>e).then(r=>{if(r instanceof b){const s=r.getAvailability(t,i);if("unavailable"===s)throw M(e,t,i);return s}if((0,c.zf)(r))throw r;return"unknown"})}fetchAvailabilityUpsample(e,t,i,r,s){r.level=e,r.row=t,r.col=i;const n=this.layer.tileInfo;n.updateTileInfo(r);const a=this.fetchAvailability(e,t,i,s).catch(e=>{if((0,c.zf)(e))throw e;if(n.upsampleTile(r))return this.fetchAvailabilityUpsample(r.level,r.row,r.col,r,s);throw e});return this._fetchAvailabilityUpsamplePrefetch(r.id,e,t,i,s,a),a}async _fetchAvailabilityUpsamplePrefetch(e,t,i,s,n,a){if(!this._prefetchingEnabled||null==e)return;const l=`prefetch-${e}`;if(this.hasHandles(l))return;const h=new AbortController;a.then(()=>h.abort(),()=>h.abort());let u=!1;const d=(0,o.hA)(()=>{u||(u=!0,h.abort())});if(this.addHandles(d,l),await(0,p.md)(10,h.signal).catch(()=>{}),u||(u=!0,this.removeHandles(l)),(0,c.G4)(h))return;const f=new m.U(e,t,i,s),y={...n,signal:h.signal},g=this.layer.tileInfo;for(let e=0;r._prefetches.length<r._maxPrefetch&&g.upsampleTile(f);++e){const e=this.fetchAvailability(f.level,f.row,f.col,y);r._prefetches.push(e);const t=()=>{r._prefetches.removeUnordered(e)};e.then(t,t)}}static{this._maxPrefetch=4}static{this._prefetches=new u.A({initialSize:r._maxPrefetch})}static cleanupTilemapCache(){this._prefetches.prune()}_fetchTilemap(e,t,i,r){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return Promise.reject(new l.A("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));const s=this._tmpTilemapDefinition,n=this._tilemapFromCache(e,t,i,s);if(n)return Promise.resolve(n);const a=r?.signal;return r={...r,signal:null},new Promise((e,t)=>{(0,c.u7)(a,()=>t((0,c.NK)()));const i=C(s);let n=this._pendingTilemapRequests[i];if(!n){n=b.fromDefinition(s,r).then(e=>(this._tilemapCache.put(i,e,e.byteSize),e));const e=()=>{delete this._pendingTilemapRequests[i]};this._pendingTilemapRequests[i]=n,n.then(e,e)}n.then(e,t)})}_initializeTilemapDefinition(){if(!this.layer.parsedUrl)return;const{parsedUrl:e,apiKey:t,customParameters:i}=this.layer;this._tilemapCache.clear(),this._tmpTilemapDefinition={service:{url:e.path,query:(0,f.x0)({...e.query,...i,token:t??e.query?.token}),tileServers:this.layer.tileServers,request:this.request},width:this.size,height:this.size,level:0,row:0,col:0}}_tilemapFromCache(e,t,i,r){r.level=e,r.row=t-t%this.size,r.col=i-i%this.size;const s=C(r);return this._tilemapCache.get(s)}get test(){}};(0,s.Cg)([(0,y.MZ)({constructOnly:!0})],S.prototype,"layer",void 0),(0,s.Cg)([(0,y.MZ)({constructOnly:!0})],S.prototype,"minLOD",void 0),(0,s.Cg)([(0,y.MZ)({constructOnly:!0})],S.prototype,"maxLOD",void 0),(0,s.Cg)([(0,y.MZ)({constructOnly:!0})],S.prototype,"request",void 0),(0,s.Cg)([(0,y.MZ)({constructOnly:!0})],S.prototype,"size",void 0),S=r=(0,s.Cg)([(0,g.$)("esri.layers.support.TilemapCache")],S)},35982:(e,t,i)=>{i.d(t,{B:()=>o});var r=i(4576),s=i(36563),n=i(53966),a=i(74887),l=i(29953);class o{constructor(e,t,i,r,s={}){this._mainMethod=t,this._transferLists=i,this._listeners=[],this._promise=(0,l.ho)(e,{...s,schedule:r}).then(e=>{if(void 0===this._thread){this._thread=e,this._promise=null,s.hasInitialize&&this.broadcast({},"initialize");for(const e of this._listeners)this._connectListener(e)}else e.close()}),this._promise.catch(t=>n.A.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`))}on(e,t){const i={removed:!1,eventName:e,callback:t,threadHandle:null};return this._listeners.push(i),this._connectListener(i),(0,s.hA)(()=>{i.removed=!0,(0,r.TF)(this._listeners,i),this._thread&&null!=i.threadHandle&&i.threadHandle.remove()})}destroy(){this._thread&&(this._thread.close(),this._thread=null),this._promise=null,this._listeners.length=0,this._transferLists={}}invoke(e,t,i){return this.invokeMethod(this._mainMethod,e,t,i)}invokeMethod(e,t,i,r){if(this._thread){const s=this._transferLists[e],n=s?s(t):[];return this._thread.invoke(e,t,{transferList:n,signal:i,priority:r})}return this._promise?this._promise.then(()=>((0,a.Te)(i),this.invokeMethod(e,t,i))):Promise.reject(null)}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then(h):this._promise?this._promise.then(()=>this.broadcast(e,t)):Promise.reject()}get promise(){return this._promise}_connectListener(e){this._thread&&this._thread.on(e.eventName,e.callback).then(t=>{e.removed||(e.threadHandle=t)})}}function h(){}},36708:(e,t,i)=>{i.d(t,{C_:()=>d,OH:()=>y,Vh:()=>g,on:()=>c,pc:()=>m,wB:()=>o,z7:()=>h});var r=i(37955),s=i(36563),n=i(97768),a=i(74887),l=i(14012);function o(e,t,i={}){return u(e,t,i,p)}function h(e,t,i={}){return u(e,t,i,f)}function u(e,t,i={},r){let s=null;const a=i.once?(e,i)=>{r(e)&&((0,n.xt)(s),t(e,i))}:(e,i)=>{r(e)&&t(e,i)};if(s=(0,l.Cn)(e,a,i.sync,i.equals),i.initial){const t=e();a(t,t)}return s}function c(e,t,i,a={}){let l=null,h=null,u=null;function c(){l&&h&&(h.remove(),a.onListenerRemove?.(l),l=null,h=null)}function d(e){a.once&&a.once&&(0,n.xt)(u),i(e)}const p=o(e,(e,i)=>{c(),(0,r.wb)(e)&&(l=e,h=(0,r.on)(e,t,d),a.onListenerAdd?.(e))},{sync:a.sync,initial:!0});return u=(0,s.hA)(()=>{p.remove(),c()}),u}function d(e,t){return function(e,t,i){if((0,a.G4)(i))return Promise.reject((0,a.NK)());const r=e();if(t?.(r))return Promise.resolve(r);let l=null;function o(){l=(0,n.xt)(l)}return new Promise((r,n)=>{l=(0,s.vE)([(0,a.u7)(i,()=>{o(),n((0,a.NK)())}),u(e,e=>{o(),r(e)},{sync:!1,once:!0},t??p)])})}(e,f,t)}function p(e){return!0}function f(e){return!!e}i(80559);const y={sync:!0},g={initial:!0},m={sync:!0,initial:!0}},54239:(e,t,i)=>{i.d(t,{A:()=>m});var r,s=i(31635),n=i(4576),a=i(66552),l=i(25482),o=i(83047),h=i(67076),u=i(10107),c=(i(44208),i(53966),i(36005)),d=i(40608),p=i(43937);const f=(0,a.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),y=f.jsonValues.slice();(0,n.Xy)(y,"orthometric");const g=(0,a.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let m=r=class extends l.o{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,i){return f.write(e,t,i)}readHeightModel(e,t,i){return f.read(e)||(i?.messages&&i.messages.push(function(e,t){return new h.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:i})),null)}readHeightUnit(e,t,i){return g.read(e)||(i?.messages&&i.messages.push(v(e,{context:i})),null)}readHeightUnitService(e,t,i){return(0,o.LA)(e)||g.read(e)||(i?.messages&&i.messages.push(v(e,{context:i})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new r({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const i=(0,o.k1)(t);return new r({heightModel:e.heightModel,heightUnit:i??void 0,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new r;return t.read(e,{origin:"web-scene"}),t}};function v(e,t){return new h.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,s.Cg)([(0,u.MZ)({type:f.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:y,default:"ellipsoidal",write:{isRequired:!0}}}}})],m.prototype,"heightModel",void 0),(0,s.Cg)([(0,p.K)("web-scene","heightModel")],m.prototype,"writeHeightModel",null),(0,s.Cg)([(0,c.w)(["web-scene","service"],"heightModel")],m.prototype,"readHeightModel",null),(0,s.Cg)([(0,u.MZ)({type:g.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g.jsonValues,write:{writer:g.write,isRequired:!0}}}}})],m.prototype,"heightUnit",void 0),(0,s.Cg)([(0,c.w)("web-scene","heightUnit")],m.prototype,"readHeightUnit",null),(0,s.Cg)([(0,c.w)("service","heightUnit")],m.prototype,"readHeightUnitService",null),(0,s.Cg)([(0,u.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],m.prototype,"vertCRS",void 0),(0,s.Cg)([(0,c.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],m.prototype,"readVertCRS",null),m=r=(0,s.Cg)([(0,d.$)("esri.geometry.HeightModelInfo")],m)},60999:(e,t,i)=>{i.d(t,{DZ:()=>f,Ke:()=>p,Tj:()=>u,UT:()=>y,jJ:()=>h});var r=i(31635),s=i(65008),n=i(97768),a=i(74887),l=i(10107),o=i(40608);function h(e,t,i){return(0,a.Lx)(e.map((e,r)=>t.apply(i,[e,r])))}async function u(e,t,i){return(await(0,a.Lx)(e.map((e,r)=>t.apply(i,[e,r])))).map(e=>e.value)}function c(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function p(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return c(await e)}catch(e){return d(e)}}async function f(e){try{return c(await e)}catch(e){return(0,a.QP)(e),d(e)}}function y(e,t){return new g(e,t)}let g=class extends s.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,n.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:i}=this._abortController;this.promise=e(i),this.promise.then(e=>{this._result=c(e),this._cleanup()},e=>{this._result=d(e),this._cleanup()}),this._abortHandle=(0,a.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,n.xt)(this._abortHandle),this._abortController=null}};(0,r.Cg)([(0,l.MZ)()],g.prototype,"value",null),(0,r.Cg)([(0,l.MZ)()],g.prototype,"error",null),(0,r.Cg)([(0,l.MZ)()],g.prototype,"finished",null),(0,r.Cg)([(0,l.MZ)()],g.prototype,"promise",void 0),(0,r.Cg)([(0,l.MZ)()],g.prototype,"_result",void 0),g=(0,r.Cg)([(0,o.$)("esri.core.asyncUtils.ReactiveTask")],g)},66344:(e,t,i)=>{i.d(t,{q:()=>l});const r=!!(0,i(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class s{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._users=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._users.clear(),this._db=null}register(e){this._users.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._users.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const i=this._db.get(e.id+t);return i?.size??0}put(e,t,i,s,a){t=e.id+t;const l=this._db.get(t);if(l&&(this._size-=l.size,e.size-=l.size,this._db.delete(t),l.entry!==i&&this._notifyRemove(t,l.entry,l.size,0)),s>this._maxSize)return void this._notifyRemove(t,i,s,0);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!s||s<0)return r||console.warn(`Refusing to cache entry with size ${s} for key ${t}`),void this._notifyRemove(t,i,0,0);const o=1+Math.max(a,-4)- -3;this._db.set(t,new n(i,s,o)),this._size+=s,e.size+=s,this._checkSize()}updateSize(e,t){t=e.id+t;const i=this._db.get(t);if(!i)return;this._size-=i.size,e.size-=i.size;let r=i.entry.usedMemory;for(;r>this._maxSize;){const e=this._notifyRemove(t,i.entry,r,1);if(!(null!=e&&e>0))return void this._db.delete(t);r=e}i.size=r,this._size+=r,e.size+=r,this._checkSize()}pop(e,t){t=e.id+t;const i=this._db.get(t);if(i)return this._size-=i.size,e.size-=i.size,this._db.delete(t),++this._hit,i.entry;++this._miss}get(e,t){t=e.id+t;const i=this._db.get(t);if(void 0!==i)return this._db.delete(t),i.lives=i.lifetime,this._db.set(t,i),++this._hit,i.entry;++this._miss}peek(e,t){const i=this._db.get(e.id+t);return i?++this._hit:++this._miss,i?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},i=new Array;this._db.forEach((e,r)=>{const s=e.lifetime;i[s]=(i[s]||0)+e.size,this._users.forEach(i=>{const{id:s,name:n}=i;if(r.startsWith(s)){const i=t[n]||0;t[n]=i+e.size}})});const r={};this._users.forEach(e=>{const i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const s=t[i]||0;t[i]=s,r[i]=Math.round(100*e.hitRate)+"%"}else r[i]="0%"});const s=Object.keys(t);s.sort((e,i)=>t[i]-t[e]),s.forEach(i=>e[i]=Math.round(t[i]/2**20)+"MB / "+r[i]);for(let t=i.length-1;t>=0;--t){const r=i[t];r&&(e["Priority "+(t+-3-1)]=Math.round(r/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forEach(e=>e.resetHitRate())}clear(e){const t=e.id;this._db.forEach((e,i)=>{i.startsWith(t)&&(this._size-=e.size,this._db.delete(i),this._notifyRemove(i,e.entry,e.size,0))}),e.size=0}clearAll(){this._db.forEach((e,t)=>this._notifyRemove(t,e.entry,e.size,0)),this._users.forEach(e=>e.size=0),this._size=0,this._db.clear()}*values(e){for(const[t,i]of this._db)t.startsWith(e.id)&&(yield i.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,i,r){const s=this._users.get(e.split(a)[0])?.removeFunc,n=s?.(t,r,i);return"number"==typeof n?n:null}_checkSize(){this._sizeLimits.forEach((e,t)=>this._checkSizeLimits(e,t)),this._checkSizeLimits(this.maxSize)}setMaxSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){const i=t??this;if(i.size<=e)return;const r=t?.id;let s=!0;for(;s;){s=!1;for(const[n,l]of this._db)if(0===l.lifetime&&(!r||n.startsWith(r))){const r=t??this._users.get(n.split(a)[0]);if(this._purgeItem(n,l,r),i.size<=.9*e)return;s||=this._db.has(n)}}for(const[s,n]of this._db)if(!r||s.startsWith(r)){const r=t??this._users.get(s.split(a)[0]);if(this._purgeItem(s,n,r),i.size<=.9*e)return}}_purgeItem(e,t,i){if(this._db.delete(e),t.lives<=1){this._size-=t.size,i&&(i.size-=t.size);const r=this._notifyRemove(e,t.entry,t.size,1);null!=r&&r>0&&(this._size+=r,i&&(i.size+=r),t.lives=t.lifetime,t.size=r,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}new s(0);class n{constructor(e,t,i){this.entry=e,this.size=t,this.lifetime=i,this.lives=i}}const a=":";class l{constructor(e,t){this.removeFunc=t,this._storage=new s,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy(),this._storage=null}put(e,t,i=1){this._storage.put(this,e,t,i,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},68611:(e,t,i)=>{i.r(t),i.d(t,{default:()=>T});var r=i(31635),s=i(78888),n=i(49186),a=i(97768),l=i(92071),o=i(74887),h=i(84952),u=i(10107),c=(i(44208),i(53966),i(87811),i(36005)),d=i(40608),p=i(54239),f=i(4146),y=i(89186),g=i(18768),m=i(16131),v=i(8303),_=i(10873);class w{constructor(e,t,i,r){this._hasNoDataValues=null,this._minValue=null,this._maxValue=null,"pixelData"in e?(this.values=e.pixelData,this.width=e.width,this.height=e.height,this.noDataValue=e.noDataValue):(this.values=e,this.width=t,this.height=i,this.noDataValue=r)}get hasNoDataValues(){if(null==this._hasNoDataValues){const e=this.noDataValue;this._hasNoDataValues=this.values.includes(e)}return this._hasNoDataValues}get minValue(){return this._ensureBounds(),this._minValue}get maxValue(){return this._ensureBounds(),this._maxValue}get usedMemory(){return this.values.byteLength+256}_ensureBounds(){if(null!=this._minValue)return;const{noDataValue:e,values:t}=this;let i=1/0,r=-1/0,s=!0;for(const n of t)n===e?this._hasNoDataValues=!0:(i=n<i?n:i,r=n>r?n:r,s=!1);s?(this._minValue=0,this._maxValue=0):(this._minValue=i,this._maxValue=r>-3e38?r:0)}}var b=i(35982);class C extends b.B{constructor(e=null){super("LercWorker","_decode",{_decode:e=>[e.buffer]},e,{strategy:"dedicated"}),this.schedule=e,this.ref=0}decode(e,t,i){return e&&0!==e.byteLength?this.invoke({buffer:e,options:t},i):Promise.resolve(null)}release(){--this.ref<=0&&(M.forEach((e,t)=>{e===this&&M.delete(t)}),this.destroy())}}const M=new Map;let S=class extends((0,y.f)((0,g.b)((0,m.q)((0,v.A)((0,l.P)(f.A)))))){constructor(...e){super(...e),this.capabilities={operations:{supportsTileMap:!1}},this.copyright=null,this.heightModelInfo=null,this.path=null,this.minScale=void 0,this.maxScale=void 0,this.opacity=1,this.operationalLayerType="ArcGISTiledElevationServiceLayer",this.sourceJSON=null,this.type="elevation",this.url=null,this.version=null,this._lercDecoder=function(e=null){let t=M.get(e);return t||(null!=e?(t=new C(t=>e.immediate.schedule(t)),M.set(e,t)):(t=new C,M.set(null,t))),++t.ref,t}()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._lercDecoder=(0,a.Gz)(this._lercDecoder)}readCapabilities(e,t){const i=t.capabilities&&t.capabilities.split(",").map(e=>e.toLowerCase().trim());return i?{operations:{supportsTileMap:i.includes("tilemap")}}:{operations:{supportsTileMap:!1}}}readVersion(e,t){let i=t.currentVersion;return i||(i=9.3),i}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"],supportsData:!1,validateItem:e=>{if(e.typeKeywords)for(let t=0;t<e.typeKeywords.length;t++)if("elevation 3d layer"===e.typeKeywords[t].toLowerCase())return!0;throw new n.A("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}' ",{type:"Image Service",expectedType:"Image Service Elevation 3D Layer"})}},e).catch(o.QP).then(()=>this._fetchImageService(t))),Promise.resolve(this)}fetchTile(e,t,i,r){const n=r?.signal,a={responseType:"array-buffer",signal:n},l={noDataValue:r?.noDataValue,returnFileInfo:!0};return this.load().then(()=>this._fetchTileAvailability(e,t,i,r)).then(()=>(0,s.A)(this.getTileUrl(e,t,i),a)).then(e=>this._lercDecoder.decode(e.data,l,n)).then(e=>new w(e))}getTileUrl(e,t,i){const r=!this.capabilities.operations.supportsTileMap&&this.supportsBlankTile,s=(0,h.x0)({...this.parsedUrl.query,blankTile:!r&&null});return`${this.parsedUrl.path}/tile/${e}/${t}/${i}${s?"?"+s:""}`}async queryElevation(e,t){const{ElevationQuery:r}=await i.e(2095).then(i.bind(i,64476));return(0,o.Te)(t),(new r).query(this,e,t)}async createElevationSampler(e,t){const{ElevationQuery:r}=await i.e(2095).then(i.bind(i,64476));return(0,o.Te)(t),(new r).createSampler(this,e,t)}_fetchTileAvailability(e,t,i,r){return this.tilemapCache?this.tilemapCache.fetchAvailability(e,t,i,r):Promise.resolve("unknown")}async _fetchImageService(e){if(this.sourceJSON)return this.sourceJSON;const t={query:{f:"json",...this.parsedUrl.query},responseType:"json",signal:e},i=await(0,s.A)(this.parsedUrl.path,t);i.ssl&&(this.url=this.url?.replace(/^http:/i,"https:")),this.sourceJSON=i.data,this.read(i.data,{origin:"service",url:this.parsedUrl})}get hasOverriddenFetchTile(){return!this.fetchTile[A]}};(0,r.Cg)([(0,u.MZ)({readOnly:!0})],S.prototype,"capabilities",void 0),(0,r.Cg)([(0,c.w)("service","capabilities",["capabilities"])],S.prototype,"readCapabilities",null),(0,r.Cg)([(0,u.MZ)({json:{read:{source:"copyrightText"}}})],S.prototype,"copyright",void 0),(0,r.Cg)([(0,u.MZ)({readOnly:!0,type:p.A})],S.prototype,"heightModelInfo",void 0),(0,r.Cg)([(0,u.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],S.prototype,"path",void 0),(0,r.Cg)([(0,u.MZ)({type:["show","hide"]})],S.prototype,"listMode",void 0),(0,r.Cg)([(0,u.MZ)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],S.prototype,"minScale",void 0),(0,r.Cg)([(0,u.MZ)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],S.prototype,"maxScale",void 0),(0,r.Cg)([(0,u.MZ)({json:{read:!1,write:!1,origins:{"web-document":{read:!1,write:!1}}}})],S.prototype,"opacity",void 0),(0,r.Cg)([(0,u.MZ)({type:["ArcGISTiledElevationServiceLayer"]})],S.prototype,"operationalLayerType",void 0),(0,r.Cg)([(0,u.MZ)()],S.prototype,"sourceJSON",void 0),(0,r.Cg)([(0,u.MZ)({json:{read:!1},value:"elevation",readOnly:!0})],S.prototype,"type",void 0),(0,r.Cg)([(0,u.MZ)(_.OZ)],S.prototype,"url",void 0),(0,r.Cg)([(0,u.MZ)()],S.prototype,"version",void 0),(0,r.Cg)([(0,c.w)("version",["currentVersion"])],S.prototype,"readVersion",null),S=(0,r.Cg)([(0,d.$)("esri.layers.ElevationLayer")],S);const A=Symbol("default-fetch-tile");S.prototype.fetchTile[A]=!0;const T=S},69397:(e,t,i)=>{i.d(t,{$B:()=>s,Qf:()=>h,Qh:()=>l,RS:()=>n,ez:()=>d,lM:()=>a,qK:()=>c});var r=i(34275);function s(e){return 32+e.length}const n=16;function a(e){if(!e)return 0;let t=c;for(const i in e)e.hasOwnProperty(i)&&(t+=o(e[i],!1));return t}function l(e){if(!e)return 0;if("number"==typeof e[0])return h(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return u(e,8);let i=d;for(let r=0;r<t;r++)i+=o(e[r]);return i}(e);let t=c;for(const i in e)e.hasOwnProperty(i)&&(t+=o(e[i]));return t}function o(e,t=!0){switch(typeof e){case"object":return t?l(e):c;case"string":return s(e);case"number":return n;case"boolean":return 4;default:return 8}}function h(...e){return e.reduce((e,t)=>e+(t?(0,r.iu)(t)?t.byteLength+p:Array.isArray(t)?u(t,n):0:0),0)}function u(e,t){return d+e.length*t}const c=32,d=16,p=145},69540:(e,t,i)=>{i.d(t,{OU:()=>u,Pw:()=>c});var r=i(31635),s=i(65008),n=(i(44208),i(4718)),a=(i(53966),i(97768)),l=i(88620),o=i(40608);const h=Symbol("ClonableMixin"),u=e=>{var t;const i=e;let s=class extends i{constructor(){super(...arguments),this[t]=!0}static{t=h}clone(e){const t=(0,l.oY)(this);(0,a.Lw)(t,"unable to clone instance of non-accessor class");const i=t.metadata,r=t.store,s={},o=new Map;for(const t in i){const a=i[t],l=r?.originOf(t),h=a.clonable;if(a.readOnly||!1===h||7!==l&&0!==l&&5!==l&&4!==l)continue;const u=this[t];let c=null;if("function"==typeof h)c=h(u,e);else if("reference"===h)c=u;else if(c=(0,n.TU)(u,e),null!=u&&null==c)continue;0===l?o.set(t,c):s[t]=c}const h=new(0,Object.getPrototypeOf(this).constructor)(s);if(o.size){const e=(0,l.oY)(h)?.store;if(e)for(const[t,i]of o)e.set(t,i,0)}return h}};return s=(0,r.Cg)([(0,o.$)("esri.core.Clonable")],s),s},c=u(s.A)},77548:(e,t,i)=>{i.d(t,{Gh:()=>y,tk:()=>c,BR:()=>u,wI:()=>h,G$:()=>p,$x:()=>d,Ov:()=>l,W_:()=>o,OP:()=>f,TU:()=>a,XX:()=>n});var r=i(70333),s=i(78888);i(7762),i(84952),i(36563),i(36708),i(4146),new WeakMap,i(16215);const n={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function a(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function l(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function o(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}async function h(e,t){const i=r.id?.findServerInfo(e);if(null!=i?.currentVersion)return i.owningSystemUrl||null;const n=e.toLowerCase().indexOf("/rest/services");if(-1===n)return null;const a=`${e.slice(0,n)}/rest/info`,l=null!=t?t.signal:null,{data:o}=await(0,s.A)(a,{query:{f:"json"},responseType:"json",signal:l});return o?.owningSystemUrl||null}function u(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function c(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function d(e,t){return null}function p(e){return null}function f(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function y(e,t){if(!t||!f(e))return;const i=(e.url,null);i&&(e.url=i)}},78553:(e,t,i)=>{i.d(t,{D:()=>n,p:()=>s});var r=i(56507);function s(e){const t=(0,r.Vr)(100*(1-e));return Math.max(0,Math.min(t,100))}function n(e){const t=1-e/100;return Math.max(0,Math.min(t,1))}},79677:(e,t,i)=>{i.d(t,{A:()=>d});var r,s=i(31635),n=i(25482),a=i(88930),l=i(10107),o=(i(44208),i(53966),i(87811),i(36005)),h=i(40608),u=i(43937),c=i(98623);let d=class extends n.o{static{r=this}static get allTime(){return p}static get empty(){return f}static fromArray(e){return new r({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(r.allTime)}get isEmpty(){return this.equals(r.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new r({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,i=this.end?.getTime()??this.end,r=e.start?.getTime()??e.start,s=e.end?.getTime()??e.end;return t===r&&i===s}expandTo(e,t=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();let i=this.start;i&&(i=(0,a.lL)(i,e,t));let s=this.end;if(s){const i=(0,a.lL)(s,e,t);s=s.getTime()===i.getTime()?i:(0,a.S1)(i,1,e,t)}return new r({start:i,end:s})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return r.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,i=this.end?.getTime()??1/0,s=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let a,l;return s>=t&&s<=i?a=s:t>=s&&t<=n&&(a=t),i>=s&&i<=n?l=i:n>=t&&n<=i&&(l=n),null==a||null==l||isNaN(a)||isNaN(l)?r.empty:new r({start:a===-1/0?null:new Date(a),end:l===1/0?null:new Date(l)})}offset(e,t,i=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();const s=new r,{start:n,end:l}=this;return null!=n&&(s.start=(0,a.S1)(n,e,t,i)),null!=l&&(s.end=(0,a.S1)(l,e,t,i)),s}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return p.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,i=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new r({start:t,end:i})}};(0,s.Cg)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,s.Cg)([(0,o.w)("end")],d.prototype,"readEnd",null),(0,s.Cg)([(0,u.K)("end")],d.prototype,"writeEnd",null),(0,s.Cg)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,s.Cg)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,s.Cg)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,s.Cg)([(0,o.w)("start")],d.prototype,"readStart",null),(0,s.Cg)([(0,u.K)("start")],d.prototype,"writeStart",null),d=r=(0,s.Cg)([(0,h.$)("esri.time.TimeExtent")],d);const p=new d,f=new d({start:void 0,end:void 0})},89186:(e,t,i)=>{i.d(t,{f:()=>c});var r=i(31635),s=i(10107),n=(i(44208),i(53966),i(87811),i(36005)),a=i(40608),l=i(16930),o=i(87045),h=i(65509),u=i(25943);const c=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.copyright=null,this.minScale=0,this.maxScale=0,this.spatialReference=null,this.tileInfo=null,this.tilemapCache=null}destroy(){this.tilemapCache?.destroy?.()}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}get supportsBlankTile(){return this.version>=10.2}readTilemapCache(e,t,i){const r=t.capabilities?.includes("Tilemap");let{minLOD:s,maxLOD:n,minScale:a,maxScale:l}=t;if(null==s&&null==n&&(0!==a||0!==l)){const e=e=>Math.round(1e4*e)/1e4;a=e(a||t.tileInfo.lods[0].scale),l=e(l||t.tileInfo.lods[t.tileInfo.lods.length-1].scale);for(const i of t.tileInfo.lods){const t=e(i.scale);s=t>=a?i.level:s,n=t>=l?i.level:n}}if(r)return new u.d({layer:this,minLOD:s,maxLOD:n});if(t.tileInfo){const e=new o.A;return e.read(t.tileInfo,i),new h.A(e,s,n)}return null}};return(0,r.Cg)([(0,s.MZ)({json:{read:{source:"copyrightText"}}})],i.prototype,"copyright",void 0),(0,r.Cg)([(0,s.MZ)()],i.prototype,"minScale",void 0),(0,r.Cg)([(0,n.w)("service","minScale")],i.prototype,"readMinScale",null),(0,r.Cg)([(0,s.MZ)()],i.prototype,"maxScale",void 0),(0,r.Cg)([(0,n.w)("service","maxScale")],i.prototype,"readMaxScale",null),(0,r.Cg)([(0,s.MZ)({type:l.A})],i.prototype,"spatialReference",void 0),(0,r.Cg)([(0,s.MZ)({readOnly:!0})],i.prototype,"supportsBlankTile",null),(0,r.Cg)([(0,s.MZ)({type:o.A})],i.prototype,"tileInfo",void 0),(0,r.Cg)([(0,s.MZ)()],i.prototype,"tilemapCache",void 0),(0,r.Cg)([(0,n.w)("service","tilemapCache",["capabilities","tileInfo"])],i.prototype,"readTilemapCache",null),(0,r.Cg)([(0,s.MZ)()],i.prototype,"version",void 0),i=(0,r.Cg)([(0,a.$)("esri.layers.mixins.ArcGISCachedService")],i),i}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2095],{64476:(e,t,n)=>{n.d(t,{ElevationQuery:()=>I});var i=n(60999),s=n(49186),a=n(97768),l=n(74887),o=n(83047),r=n(91218),c=n(19419),u=(n(44208),n(65529)),h=n(53966),m=n(86738),f=n(16930),p=n(28735);const d=()=>h.A.getLogger("esri.layers.support.ElevationSampler");class y extends u.a${queryElevation(e){return function(e,t){const n=v(e,t.spatialReference);if(!n)return null;switch(e.type){case"point":return function(e,t,n){return e.hasZ=!0,e.z=n.elevationAt(t.x,t.y),e}(e,n,t);case"polyline":return function(e,t,n){T.spatialReference=t.spatialReference;const i=e.hasM&&!e.hasZ;for(let s=0;s<e.paths.length;s++){const a=e.paths[s],l=t.paths[s];for(let e=0;e<a.length;e++){const t=a[e],s=l[e];T.x=s[0],T.y=s[1],i&&(t[3]=t[2]),t[2]=n.elevationAt(T.x,T.y)}}return e.hasZ=!0,e}(e,n,t);case"multipoint":return function(e,t,n){T.spatialReference=t.spatialReference;const i=e.hasM&&!e.hasZ;for(let s=0;s<e.points.length;s++){const a=e.points[s],l=t.points[s];T.x=l[0],T.y=l[1],i&&(a[3]=a[2]),a[2]=n.elevationAt(T.x,T.y)}return e.hasZ=!0,e}(e,n,t);default:return null}}(e.clone(),this)}}class x extends y{get spatialReference(){return this.extent.spatialReference}constructor(e,t,n){super(),this.tile=e,this.noDataValue=n;const i=e.tile.extent;this.extent=(0,c.w1)(i,t.spatialReference),this.extent.zmin=e.zmin,this.extent.zmax=e.zmax,this._aaExtent=i;const s=(0,o.GA)(t.spatialReference),a=t.lodAt(e.tile.level).resolution*s;this.demResolution={min:a,max:a}}contains(e){const t=v(e,this.spatialReference);return null!=t&&this.containsAt(t.x,t.y)}containsAt(e,t){return(0,c.Rj)(this._aaExtent,e,t)}elevationAt(e,t){if(!this.containsAt(e,t)){const n=this.extent,i=`${n.xmin}, ${n.ymin}, ${n.xmax}, ${n.ymax}`;return d().warn("#elevationAt()",`Point used to sample elevation (${e}, ${t}) is outside of the sampler extent (${i})`),this.noDataValue}return this.tile.sample(e,t)??this.noDataValue}}class w extends y{get spatialReference(){return this.extent.spatialReference}constructor(e,t,n){let i;super(),"number"==typeof t?(this.noDataValue=t,this.samplers=e):(i=t,this.noDataValue=n,this.samplers=e.map(e=>new x(e,i,this.noDataValue)));const s=this.samplers[0];if(s){this.extent=s.extent.clone();const{min:e,max:t}=s.demResolution;this.demResolution={min:e,max:t};for(let e=1;e<this.samplers.length;e++){const t=this.samplers[e];this.extent.union(t.extent),this.demResolution.min=Math.min(this.demResolution.min,t.demResolution.min),this.demResolution.max=Math.max(this.demResolution.max,t.demResolution.max)}}else this.extent=(0,c.w1)((0,c.vt)(),i?.spatialReference??f.A.WGS84),this.demResolution={min:0,max:0}}elevationAt(e,t){let n;for(const i of this.samplers)if(i.containsAt(e,t)&&(n=i.elevationAt(e,t),n!==i.noDataValue))return n;return null!=n?n:(d().warn("#elevationAt()",`Point used to sample elevation (${e}, ${t}) is outside of the sampler`),this.noDataValue)}}function v(e,t){if(null==e)return null;const n=e.spatialReference;if(n.equals(t))return e;const i=(0,p.Cv)(e,t);return i||d().error(`Cannot project geometry spatial reference (wkid:${n.wkid}) to elevation sampler spatial reference (wkid:${t.wkid})`),i}const T=new m.A;class g{constructor(e,t){this.data=e,this.safeWidth=.99999999*(e.width-1),this.dx=(e.width-1)/(t[2]-t[0]),this.dy=(e.width-1)/(t[3]-t[1]),this.x0=t[0],this.y1=t[3]}}class R{constructor(e,t=null){if(this.tile=e,null!=t&&null!=e){const n=e.extent;this._samplerData=new g(t,n)}}get zmin(){return null!=this._samplerData?this._samplerData.data.minValue:0}get zmax(){return null!=this._samplerData?this._samplerData.data.maxValue:0}get hasNoDataValues(){return!!this._samplerData?.data.hasNoDataValues}sample(e,t){if(null==this._samplerData)return;const{safeWidth:n,data:i,dx:s,dy:a,y1:l,x0:o}=this._samplerData,{width:r,values:c,noDataValue:u}=i,h=A(a*(l-t),0,n),m=A(s*(e-o),0,n),f=Math.floor(h),p=Math.floor(m),d=f*r+p,y=d+r,x=c[d],w=c[y],v=c[d+1],T=c[y+1];if(x!==u&&w!==u&&v!==u&&T!==u){const e=m-p,t=x+(v-x)*e;return t+(w+(T-w)*e-t)*(h-f)}}}function A(e,t,n){return e<t?t:e>n?n:e}var _=n(48526),E=n(82799);class D{export(){return this._exporter(this.coordinates,this.spatialReference)}clone(e){const t=new D;return t.geometry=this.geometry,t.spatialReference=this.spatialReference,t.coordinates=e||this.coordinates.map(e=>e.clone()),t._exporter=this._exporter,t}async project(e,t){if(this.spatialReference.equals(e))return this.clone();await(0,r.initializeProjection)([{source:this.spatialReference,dest:e}],{signal:t});const n=new _.A({spatialReference:this.spatialReference,points:this.coordinates.map(e=>[e.x,e.y])}),i=(0,r.project)(n,e);if(!i)return null;const s=this.coordinates.map((e,t)=>{const n=e.clone(),s=i.points[t];return n.x=s[0],n.y=s[1],n}),a=this.clone(s);return a.spatialReference=e,a}static fromGeometry(e){const t=new D;if(t.geometry=e,t.spatialReference=e.spatialReference,e instanceof D)t.coordinates=e.coordinates.map(e=>e.clone()),t._exporter=(t,n)=>{const i=e.clone(t);return i.spatialReference=n,i};else switch(e.type){case"point":{const n=e,{hasZ:i,hasM:s}=n;t.coordinates=i&&s?[new q(n.x,n.y,n.z,n.m)]:i?[new q(n.x,n.y,n.z)]:s?[new q(n.x,n.y,null,n.m)]:[new q(n.x,n.y)],t._exporter=(t,n)=>e.hasM?new m.A(t[0].x,t[0].y,t[0].z,t[0].m,n):new m.A(t[0].x,t[0].y,t[0].z,n);break}case"multipoint":{const n=e,{hasZ:i,hasM:s}=n;t.coordinates=i&&s?n.points.map(e=>new q(e[0],e[1],e[2],e[3])):i?n.points.map(e=>new q(e[0],e[1],e[2])):s?n.points.map(e=>new q(e[0],e[1],null,e[2])):n.points.map(e=>new q(e[0],e[1])),t._exporter=(t,n)=>e.hasM?new _.A({points:t.map(e=>[e.x,e.y,e.z??0,e.m??0]),hasZ:!0,hasM:!0,spatialReference:n}):new _.A({points:t.map(e=>[e.x,e.y,e.z??0]),spatialReference:n});break}case"polyline":{const n=e,i=[],s=[],{hasZ:a,hasM:l}=e;let o=0;for(const e of n.paths)if(s.push([o,o+e.length]),o+=e.length,a&&l)for(const t of e)i.push(new q(t[0],t[1],t[2],t[3]));else if(a)for(const t of e)i.push(new q(t[0],t[1],t[2]));else if(l)for(const t of e)i.push(new q(t[0],t[1],null,t[2]));else for(const t of e)i.push(new q(t[0],t[1]));t.coordinates=i,t._exporter=(t,n)=>{const i=e.hasM?t.map(e=>[e.x,e.y,e.z??0,e.m??0]):t.map(e=>[e.x,e.y,e.z??0]),a=s.map(e=>i.slice(e[0],e[1]));return new E.A({paths:a,hasM:e.hasM,hasZ:!0,spatialReference:n})};break}}return t}}class q{constructor(e,t,n=null,i=null,s=null,a=null){this.x=e,this.y=t,this.z=n,this.m=i,this.tile=s,this.elevationTile=a}clone(){return new q(this.x,this.y,this.z,this.m)}}var C=n(72802);class I{async queryAll(e,t,n){if(!(e=n?.ignoreInvisibleLayers?e.filter(e=>e.visible):e.slice()).length)throw new s.A(P,"Elevation queries require at least one elevation layer to fetch tiles from");const i=D.fromGeometry(t);let a=!1;n?.returnSampleInfo||(a=!0);const l={...F,...n,returnSampleInfo:!0},o=await this.query(e[e.length-1],i,l),r=await this._queryAllContinue(e,o,l);return r.geometry=r.geometry.export(),a&&delete r.sampleInfo,r}async query(e,t,n){if(!e)throw new s.A(P,"Elevation queries require an elevation layer to fetch tiles from");if(!t||!(t instanceof D)&&"point"!==t.type&&"multipoint"!==t.type&&"polyline"!==t.type)throw new s.A("elevation-query:invalid-geometry","Only point, polyline and multipoint geometries can be used to query elevation");const i={...F,...n},l=new M(e,t.spatialReference,i),c=i.signal;return await e.load({signal:c}),await async function(e,t,n){let i;const a=e.layer.tileInfo.spatialReference;if(t instanceof D?i=await t.project(a,n):(await(0,r.initializeProjection)([{source:t.spatialReference,dest:a}],{signal:n}),i=(0,r.project)(t,a)),!i)throw new s.A("elevation-query:spatial-reference-mismatch",`Cannot query elevation in '${t.spatialReference.wkid}' on an elevation service in '${a.wkid}'`);e.geometry=D.fromGeometry(i)}(l,t,c),await this._selectTiles(l,c),await k(l,c),function(e){e.geometry.coordinates.forEach(t=>{const n=t.elevationTile;let i=e.parameters.noDataValue;if(n){const e=n.sample(t.x,t.y);null!=e?i=e:t.elevationTile=null}t.z=i})}(l),async function(e,t){const n=await e.geometry.project(e.outSpatialReference,t);(0,a.Lw)(n);const i={geometry:n.export(),noDataValue:e.parameters.noDataValue};return e.parameters.returnSampleInfo&&(i.sampleInfo=function(e){const t=e.layer.tileInfo,n=(0,o.GA)(t.spatialReference);return e.geometry.coordinates.map(i=>{let s=-1;return i.elevationTile&&i.elevationTile!==e.outsideExtentTile&&(s=t.lodAt(i.elevationTile.tile.level).resolution*n),{demResolution:s}})}(e)),e.geometry.coordinates.forEach(e=>{e.tile=null,e.elevationTile=null}),i}(l,c)}async createSampler(e,t,n){if(!e)throw new s.A(P,"Elevation queries require an elevation layer to fetch tiles from");if(!t||"extent"!==t.type)throw new s.A("elevation-query:invalid-extent","Invalid or undefined extent");const i={...F,...n};return this._createSampler(e,t,i)}async createSamplerAll(e,t,n){if(!(e=n?.ignoreInvisibleLayers?e.filter(e=>e.visible):e.slice()).length)throw new s.A(P,"Elevation queries require at least one elevation layer to fetch tiles from");if(!t||"extent"!==t.type)throw new s.A("elevation-query:invalid-extent","Invalid or undefined extent");const i={...F,...n,returnSampleInfo:!0},a=await this._createSampler(e[e.length-1],t,i);return this._createSamplerAllContinue(e,t,a,i)}async _createSampler(e,t,n,i){const s=n.signal;await e.load({signal:s});const a=t.spatialReference,l=e.tileInfo.spatialReference;a.equals(l)||(await(0,r.initializeProjection)([{source:a,dest:l}],{signal:s}),t=(0,r.project)(t,l));const o=new V(e,t,n,i);return await this._selectTiles(o,s),await k(o,s),new w(o.elevationTiles,o.layer.tileInfo,o.parameters.noDataValue)}async _createSamplerAllContinue(e,t,n,i){if(e.pop(),!e.length)return n;const s=n.samplers.filter(e=>!e.tile.hasNoDataValues).map(e=>(0,c.VY)(e.extent)),a=await this._createSampler(e[e.length-1],t,i,s);if(0===a.samplers.length)return n;const l=n.samplers.concat(a.samplers),o=new w(l,i.noDataValue);return this._createSamplerAllContinue(e,t,o,i)}async _queryAllContinue(e,t,n){const i=e.pop(),s=t.geometry.coordinates,l=t.sampleInfo;(0,a.Lw)(l);const o=[],r=[];for(let t=0;t<s.length;t++){const n=l[t];n.demResolution>=0?n.source||(n.source=i):e.length&&(o.push(s[t]),r.push(t))}if(!e.length||0===o.length)return t;const c=t.geometry.clone(o),u=await this.query(e[e.length-1],c,n),h=u.sampleInfo;if(!h)throw new Error("no sampleInfo");return r.forEach((e,t)=>{s[e].z=u.geometry.coordinates[t].z,l[e].demResolution=h[t].demResolution}),this._queryAllContinue(e,t,n)}async _selectTiles(e,t){"geometry"===e.type&&function(e){if(null==e.layer.fullExtent)return;const t=new R(null);t.sample=()=>e.parameters.noDataValue,e.outsideExtentTile=t;const n=e.layer.fullExtent;e.geometry.coordinates.forEach(e=>{const i=e.x,s=e.y;(i<n.xmin||i>n.xmax||s<n.ymin||s>n.ymax)&&(e.elevationTile=t)})}(e);const n=e.parameters.demResolution;if("number"==typeof n)!function(e,t){const n=function(e,t){const{tileInfo:n,tilemapCache:i}=e.layer,s=t/(0,o.GA)(n.spatialReference),a=b(n,i);let l=a[0],r=0;for(let e=1;e<a.length;e++){const t=a[e];Math.abs(t.resolution-s)<Math.abs(l.resolution-s)&&(l=t,r=e)}return r}(e,t);e.selectTilesAtLOD(n)}(e,n);else if("finest-contiguous"===n)await this._selectTilesFinestContiguous(e,t);else{if("auto"!==n)throw new s.A("elevation-query:invalid-dem-resolution",`Invalid dem resolution value '${n}', expected a number, "finest-contiguous" or "auto"`);await this._selectTilesAuto(e,t)}}async _selectTilesFinestContiguous(e,t){const{tileInfo:n,tilemapCache:i}=e.layer,s=S(n,i,e.parameters.minDemResolution);await this._selectTilesFinestContiguousAt(e,s,t)}async _selectTilesFinestContiguousAt(e,t,n){const i=e.layer;if(e.selectTilesAtLOD(t),t<0)return;const a=i.tilemapCache,o=e.getTilesToFetch();try{if(a&&!L(a))await(0,l.qr)(Promise.all(o.map(e=>a.fetchAvailability(e.level,e.row,e.col,{signal:n}))),n);else if(await k(e,n),!e.allElevationTilesFetched())throw e.clearElevationTiles(),new s.A("elevation-query:has-unavailable-tiles","Some elevation tiles are unavailable")}catch(i){(0,l.QP)(i),await this._selectTilesFinestContiguousAt(e,t-1,n)}}async _selectTilesAuto(e,t){(function(e){const{tileInfo:t,tilemapCache:n}=e.layer,i=S(t,n,e.parameters.minDemResolution);e.selectTilesAtLOD(i,e.parameters.maximumAutoTileRequests)})(e),function(e){const t=e.layer.tileInfo;let n=0;const i={},s=e=>{null!=e.id&&(e.id in i?i[e.id]++:(i[e.id]=1,n++))},a=e=>{if(null==e.id)return;const t=i[e.id];1===t?(delete i[e.id],n--):i[e.id]=t-1};e.forEachTileToFetch(s,a);let l=!0;for(;l&&(l=!1,e.forEachTileToFetch(i=>{n<=e.parameters.maximumAutoTileRequests||(a(i),t.upsampleTile(i)&&(l=!0),s(i))},a),l););}(e);const n=e.layer.tilemapCache;if(!n||L(n))return this._selectTilesAutoPrefetchUpsample(e,t);const s=e.getTilesToFetch(),a={},o=s.map(async e=>{const s=new C.U(null,0,0,0,(0,c.vt)()),o=await(0,i.Ke)(n.fetchAvailabilityUpsample(e.level,e.row,e.col,s,{signal:t}));!1!==o.ok?null!=e.id&&(a[e.id]=s):(0,l.QP)(o.error)});await(0,l.qr)(Promise.all(o),t),e.remapTiles(a)}async _selectTilesAutoPrefetchUpsample(e,t){const n=e.layer.tileInfo;await k(e,t);let i=!1;e.forEachTileToFetch((e,t)=>{n.upsampleTile(e)?i=!0:t()}),i&&await this._selectTilesAutoPrefetchUpsample(e,t)}}class z{constructor(e,t){this.layer=e,this.parameters=t}}class M extends z{constructor(e,t,n){super(e,n),this.outSpatialReference=t,this.type="geometry"}selectTilesAtLOD(e){if(e<0)this.geometry.coordinates.forEach(e=>e.tile=null);else{const{tileInfo:t,tilemapCache:n}=this.layer,i=b(t,n)[e].level;this.geometry.coordinates.forEach(e=>e.tile=t.tileAt(i,e.x,e.y))}}allElevationTilesFetched(){return!this.geometry.coordinates.some(e=>!e.elevationTile)}clearElevationTiles(){for(const e of this.geometry.coordinates)e.elevationTile!==this.outsideExtentTile&&(e.elevationTile=null)}populateElevationTiles(e){for(const t of this.geometry.coordinates)!t.elevationTile&&t.tile?.id&&(t.elevationTile=e[t.tile.id])}remapTiles(e){for(const t of this.geometry.coordinates){const n=t.tile?.id;t.tile=n?e[n]:null}}getTilesToFetch(){const e={},t=[];for(const n of this.geometry.coordinates){const i=n.tile;if(!i)continue;const s=n.tile?.id;n.elevationTile||!s||e[s]||(e[s]=i,t.push(i))}return t}forEachTileToFetch(e){for(const t of this.geometry.coordinates)t.tile&&!t.elevationTile&&e(t.tile,()=>t.tile=null)}}class V extends z{constructor(e,t,n,i){super(e,n),this.type="extent",this.elevationTiles=[],this._candidateTiles=[],this._fetchedCandidates=new Set,this.extent=t.clone().intersection(e.fullExtent),this.maskExtents=i}selectTilesAtLOD(e,t){const n=this._maximumLodForRequests(t),i=Math.min(n,e);i<0?this._candidateTiles.length=0:this._selectCandidateTilesCoveringExtentAt(i)}_maximumLodForRequests(e){const{tileInfo:t,tilemapCache:n}=this.layer,i=b(t,n);if(!e)return i.length-1;const s=this.extent;if(null==s)return-1;for(let n=i.length-1;n>=0;n--){const a=i[n],l=a.resolution*t.size[0],o=a.resolution*t.size[1];if(Math.ceil(s.width/l)*Math.ceil(s.height/o)<=e)return n}return-1}allElevationTilesFetched(){return this._candidateTiles.length===this.elevationTiles.length}clearElevationTiles(){this.elevationTiles.length=0,this._fetchedCandidates.clear()}populateElevationTiles(e){for(const t of this._candidateTiles){const n=t.id&&e[t.id];n&&(this._fetchedCandidates.add(t),this.elevationTiles.push(n))}}remapTiles(e){this._candidateTiles=$(this._candidateTiles.map(t=>e[t.id]))}getTilesToFetch(){return this._candidateTiles}forEachTileToFetch(e,t){const n=this._candidateTiles;this._candidateTiles=[],n.forEach(n=>{if(this._fetchedCandidates.has(n))return void t?.(n);let i=!1;e(n,()=>i=!0),i?t?.(n):this._candidateTiles.push(n)}),this._candidateTiles=$(this._candidateTiles,t)}_selectCandidateTilesCoveringExtentAt(e){this._candidateTiles.length=0;const t=this.extent;if(null==t)return;const{tileInfo:n,tilemapCache:i}=this.layer,s=b(n,i)[e],a=n.tileAt(s.level,t.xmin,t.ymin),l=a.extent;if(null==l)return;const o=s.resolution*n.size[0],r=s.resolution*n.size[1],c=Math.ceil((t.xmax-l[0])/o),u=Math.ceil((t.ymax-l[1])/r);for(let e=0;e<u;e++)for(let t=0;t<c;t++){const i=new C.U(null,a.level,a.row-e,a.col+t);n.updateTileInfo(i),this._tileIsMasked(i)||this._candidateTiles.push(i)}}_tileIsMasked(e){return!!this.maskExtents&&this.maskExtents.some(t=>e.extent&&(0,c.gR)(t,e.extent))}}function S(e,t,n=0){const i=b(e,t);let s=i.length-1;if(n>0){const t=n/(0,o.GA)(e.spatialReference),a=i.findIndex(e=>e.resolution<t);0===a?s=0:a>0&&(s=a-1)}return s}const F={maximumAutoTileRequests:20,noDataValue:0,returnSampleInfo:!1,demResolution:"auto",minDemResolution:0,signal:null};function b(e,t){const n=e.lods;if(L(t)){const{effectiveMinLOD:e,effectiveMaxLOD:i}=t;return n.filter(t=>t.level>=e&&t.level<=i)}return n}async function k(e,t){const n=e.getTilesToFetch(),i={},s=e.parameters.cache,a=e.parameters.noDataValue,o=n.map(async n=>{if(null==n.id)return;const l=`${e.layer.uid}:${n.id}:${a}`,o=null!=s?s.get(l):null,r=null!=o?o:await e.layer.fetchTile(n.level,n.row,n.col,{noDataValue:a,signal:t});null!=s&&s.put(l,r),i[n.id]=new R(n,r)});await(0,l.qr)(Promise.allSettled(o),t),e.populateElevationTiles(i)}function $(e,t){const n={},i=[];for(const s of e){const e=s.id;e&&!n[e]?(n[e]=s,i.push(s)):t?.(s)}const s=i.sort((e,t)=>e.level-t.level);return s.filter((e,n)=>{for(let i=0;i<n;i++){const n=s[i].extent;if(n&&e.extent&&(0,c.gR)(n,e.extent))return t?.(e),!1}return!0})}function L(e){return null!=e?.tileInfo}const P="elevation-query:invalid-layer"}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6730],{8303:(e,t,r)=>{r.d(t,{A:()=>x});var i=r(31635),n=r(92602),s=r(70333),a=r(78888),o=r(60999),l=r(49186),u=r(53966),c=r(97768),h=r(74887),d=r(84952),p=r(10107),f=(r(44208),r(87811),r(36005)),g=r(40608),m=r(43937),y=r(77548),v=r(20655),M=r(80812),S=r(41318),w=r(10407);const x=e=>{const t=e;let x=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,c.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,t,r){if(t.itemId)return new M.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await r.e(1204).then(r.bind(r,41204));return(0,h.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,h.zf)(e)||u.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,h.QP)(e),!0)))}async setUserPrivileges(e,t){if(!n.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:n}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",n)}catch(e){(0,h.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=!s.id?.findCredential(this.url),n=e===r.id;if(n&&r.portal.user)return this._getUserPrivileges(r,i);let a,o;if(n)a=r.portal.url;else try{a=await(0,y.wI)(this.url,t)}catch(e){(0,h.QP)(e)}if(!a||!(0,d.b8)(a,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(s.id?.getCredential(`${a}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,h.QP)(e)}const l=!0,u=!1,c=!1;if(!o)return{features:{edit:l,fullEdit:u},content:{updateItem:c}};try{if(n?await r.reload():(r=new M.default({id:e,portal:{url:a}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,i)}catch(e){(0,h.QP)(e)}return{features:{edit:l,fullEdit:u},content:{updateItem:c}}}_getUserPrivileges(e,t){const r=(0,w.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,h.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const r=b.credential===t?b.user:await this._fetchEditingUser(e);return b.credential=t,b.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=s.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,n=v.A.getDefault();if(n&&n.loaded&&(0,d.S8)(n.restUrl)===(0,d.S8)(i))return n.user;const l=`${i}/community/self`,u=null!=e?e.signal:null,c=await(0,o.Ke)((0,a.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return c.ok?S.A.fromJSON(c.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||v.A.getDefault());return r&&i&&!(0,d.ut)(i.restUrl,r.restUrl)?(t.messages&&t.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,{...t,layer:this})}};return(0,i.Cg)([(0,p.MZ)({type:M.default})],x.prototype,"portalItem",null),(0,i.Cg)([(0,f.w)("web-document","portalItem",["itemId"])],x.prototype,"readPortalItem",null),(0,i.Cg)([(0,m.K)("web-document","portalItem",{itemId:{type:String}})],x.prototype,"writePortalItem",null),(0,i.Cg)([(0,p.MZ)({clonable:!1})],x.prototype,"resourceReferences",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],x.prototype,"userHasEditingPrivileges",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],x.prototype,"userHasFullEditingPrivileges",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],x.prototype,"userHasUpdateItemPrivileges",void 0),x=(0,i.Cg)([(0,g.$)("esri.layers.mixins.PortalLayer")],x),x},b={credential:null,user:null}},10407:(e,t,r)=>{r.d(t,{It:()=>p,LG:()=>a,OM:()=>u,Sm:()=>c,Y:()=>o,bK:()=>l,mm:()=>d,sQ:()=>h});var i=r(91218),n=r(16930),s=r(28735);function a(e,t){if(!o(e,t)){const r=e.typeKeywords;r?r.push(t):e.typeKeywords=[t]}}function o(e,t){return!!e.typeKeywords?.includes(t)}function l(e){return o(e,d.HOSTED_SERVICE)}function u(e,t){const r=e.typeKeywords;if(r){const e=r.indexOf(t);e>-1&&r.splice(e,1)}}function c(e,t,r){r?a(e,t):u(e,t)}async function h(e){const t=e.clone().normalize();let r;if(t.length>1)for(const e of t)r?e.width>r.width&&(r=e):r=e;else r=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,s.ci)(e);const r=n.A.WGS84;return await(0,i.initializeProjection)(t,r),(0,i.project)(e,r)}(r)}const d={CHARTS:"Charts",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery"};function p(e){const{portal:t,isOrgItem:r,itemControl:i}=e,n=t.user?.privileges;let s=!n||n.includes("features:user:edit"),a=!!r&&!!n?.includes("features:user:fullEdit");const o="update"===i||"admin"===i;return o?a=s=!0:a&&(s=!0),{features:{edit:s,fullEdit:a},content:{updateItem:o}}}},25036:(e,t,r)=>{r.d(t,{j:()=>a});var i=r(31635),n=r(10107),s=(r(44208),r(53966),r(87811),r(40608));const a=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;void 0!==t?.effectiveScaleRange&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,i.Cg)([(0,n.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"minScale",void 0),(0,i.Cg)([(0,n.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"maxScale",void 0),(0,i.Cg)([(0,n.MZ)({readOnly:!0})],r.prototype,"effectiveScaleRange",null),r=(0,i.Cg)([(0,s.$)("esri.layers.mixins.ScaleRangeLayer")],r),r}},36475:(e,t,r)=>{r.r(t),r.d(t,{default:()=>b});var i=r(31635),n=r(78888),s=r(49186),a=r(53966),o=r(92071),l=r(74887),u=r(10107),c=(r(44208),r(87811),r(40608)),h=r(5443),d=r(16930),p=r(4146),f=r(52136),g=r(69208),m=r(16131),y=r(8303),v=r(25036),M=r(10873),S=r(88546),w=r(56776);let x=class extends((0,m.q)((0,y.A)((0,v.j)((0,o.P)((0,g.d)((0,f.p)(p.A))))))){constructor(e){super(e),this.operationalLayerType="GaussianSplatLayer",this.type="gaussian-splat",this.opacity=1,this.minScale=0,this.maxScale=0,this.url=null,this.rootTilesetJSON=null,this.fullExtent=new h.A(-180,-90,180,90,this.spatialReference),this.spatialReference=new d.A({wkid:4326,vcsWkid:115700}),this.esriCrsSpatialReference=null,this.esriCrsFullExtent=null}get supportedSpatialReferences(){return this.initialized&&this.esriCrsSpatialReference?[this.spatialReference,this.esriCrsSpatialReference]:[this.spatialReference]}get fullExtents(){return this.initialized&&this.esriCrsFullExtent?[this.fullExtent,this.esriCrsFullExtent]:[this.fullExtent]}set elevationInfo(e){null!=e&&"absolute-height"!==e.mode||this._set("elevationInfo",e),this._validateElevationInfo(e)}async load(e){return this.addResolvingPromise(this._doLoad(e)),this}async _doLoad(e){const t=null!=e?e.signal:null;try{await this.loadFromPortal({supportedTypes:["3DTiles Service"],validateItem:e=>{if(e.typeKeywords?.includes("GaussianSplat"))return!0;throw new s.A("portal:invalid-layer-item-type","Invalid layer item, expected '${expectedType}' ",{expectedType:"3DTiles Service"})}},e)}catch(e){(0,l.QP)(e)}if(this.url){const e=(0,n.A)(this.url,{query:{...this.customParameters,token:this.apiKey},responseType:"json",signal:t}).then(e=>{this.rootTilesetJSON=e.data;const t=(0,S._8)(this.rootTilesetJSON);this.fullExtent=(0,S.uB)(this.rootTilesetJSON,!1),this.spatialReference=this.fullExtent.spatialReference,t&&(this.esriCrsFullExtent=(0,S.uB)(this.rootTilesetJSON,!0),this.esriCrsSpatialReference=this.esriCrsFullExtent.spatialReference)},e=>{(0,l.QP)(e)});await e}}_validateElevationInfo(e){const t="Gaussian Splat layers";(0,w.XF)(a.A.getLogger(this),(0,w.B)(t,"absolute-height",e)),(0,w.XF)(a.A.getLogger(this),(0,w.tW)(t,e))}};(0,i.Cg)([(0,u.MZ)({type:["GaussianSplatLayer"]})],x.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],x.prototype,"type",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0,json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}}})],x.prototype,"opacity",void 0),(0,i.Cg)([(0,u.MZ)({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:!1,write:!1}}}})],x.prototype,"minScale",void 0),(0,i.Cg)([(0,u.MZ)({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:!1,write:!1}}}})],x.prototype,"maxScale",void 0),(0,i.Cg)([(0,u.MZ)(M.OZ)],x.prototype,"url",void 0),(0,i.Cg)([(0,u.MZ)({type:h.A})],x.prototype,"fullExtent",void 0),(0,i.Cg)([(0,u.MZ)({type:d.A})],x.prototype,"spatialReference",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],x.prototype,"supportedSpatialReferences",null),(0,i.Cg)([(0,u.MZ)({type:[h.A]})],x.prototype,"fullExtents",null),(0,i.Cg)([(0,u.MZ)({type:["show","hide"]})],x.prototype,"listMode",void 0),(0,i.Cg)([(0,u.MZ)(M.Yj)],x.prototype,"elevationInfo",null),x=(0,i.Cg)([(0,c.$)("esri.layers.GaussianSplatLayer")],x);const b=x},38954:(e,t,r)=>{r.d(t,{A:()=>f,B:()=>p,C:()=>c,D:()=>h,E:()=>O,F:()=>Z,H:()=>G,a:()=>T,b:()=>y,c:()=>a,d:()=>u,e:()=>C,f:()=>l,g:()=>m,h:()=>A,i:()=>o,j:()=>v,k:()=>S,l:()=>s,m:()=>_,n:()=>b,o:()=>R,q:()=>L,r:()=>x,s:()=>M,t:()=>E,u:()=>w,v:()=>I,w:()=>d,x:()=>j,y:()=>D,z:()=>g});var i=r(51850),n=r(34304);function s(e){const t=e[0],r=e[1],i=e[2];return Math.sqrt(t*t+r*r+i*i)}function a(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function o(e,t,r,i){return e[0]=t,e[1]=r,e[2]=i,e}function l(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e}function u(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e}function c(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e}function h(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e}function d(e,t){return e[0]=Math.abs(t[0]),e[1]=Math.abs(t[1]),e[2]=Math.abs(t[2]),e}function p(e,t){return e[0]=Math.sign(t[0]),e[1]=Math.sign(t[1]),e[2]=Math.sign(t[2]),e}function f(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e}function g(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e}function m(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e}function y(e,t,r,i){return e[0]=t[0]+r[0]*i,e[1]=t[1]+r[1]*i,e[2]=t[2]+r[2]*i,e}function v(e,t){const r=t[0]-e[0],i=t[1]-e[1],n=t[2]-e[2];return Math.sqrt(r*r+i*i+n*n)}function M(e,t){const r=t[0]-e[0],i=t[1]-e[1],n=t[2]-e[2];return r*r+i*i+n*n}function S(e){const t=e[0],r=e[1],i=e[2];return t*t+r*r+i*i}function w(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function x(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}function b(e,t){const r=t[0],i=t[1],n=t[2];let s=r*r+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),e[0]=t[0]*s,e[1]=t[1]*s,e[2]=t[2]*s),e}function C(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function A(e,t,r){const i=t[0],n=t[1],s=t[2],a=r[0],o=r[1],l=r[2];return e[0]=n*l-s*o,e[1]=s*a-i*l,e[2]=i*o-n*a,e}function _(e,t,r,i){const n=t[0],s=t[1],a=t[2];return e[0]=n+i*(r[0]-n),e[1]=s+i*(r[1]-s),e[2]=a+i*(r[2]-a),e}function E(e,t,r){const i=t[0],n=t[1],s=t[2];return e[0]=r[0]*i+r[4]*n+r[8]*s+r[12],e[1]=r[1]*i+r[5]*n+r[9]*s+r[13],e[2]=r[2]*i+r[6]*n+r[10]*s+r[14],e}function R(e,t,r){const i=t[0],n=t[1],s=t[2];return e[0]=i*r[0]+n*r[3]+s*r[6],e[1]=i*r[1]+n*r[4]+s*r[7],e[2]=i*r[2]+n*r[5]+s*r[8],e}function I(e,t,r){const i=r[0],n=r[1],s=r[2],a=r[3],o=t[0],l=t[1],u=t[2],c=n*u-s*l,h=s*o-i*u,d=i*l-n*o,p=n*d-s*h,f=s*c-i*d,g=i*h-n*c,m=2*a;return e[0]=o+c*m+2*p,e[1]=l+h*m+2*f,e[2]=u+d*m+2*g,e}const P=(0,i.vt)(),U=(0,i.vt)();function L(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function O(e,t,r){const i=r[0]-t[0],n=r[1]-t[1],s=r[2]-t[2];let a=i*i+n*n+s*s;return a>0?(a=1/Math.sqrt(a),e[0]=i*a,e[1]=n*a,e[2]=s*a,e):(e[0]=0,e[1]=0,e[2]=0,e)}const T=u,k=c,H=h,Z=v,j=M,G=s,D=S;Object.freeze(Object.defineProperty({__proto__:null,abs:d,add:l,angle:function(e,t){b(P,e),b(U,t);const r=C(P,U);return r>1?0:r<-1?Math.PI:Math.acos(r)},bezier:function(e,t,r,i,n,s){const a=1-s,o=a*a,l=s*s,u=o*a,c=3*s*o,h=3*l*a,d=l*s;return e[0]=t[0]*u+r[0]*c+i[0]*h+n[0]*d,e[1]=t[1]*u+r[1]*c+i[1]*h+n[1]*d,e[2]=t[2]*u+r[2]*c+i[2]*h+n[2]*d,e},ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e},clamp:function(e,t=0,r=1){return e[0]=Math.min(Math.max(e[0],t),r),e[1]=Math.min(Math.max(e[1],t),r),e[2]=Math.min(Math.max(e[2],t),r),e},copy:a,cross:A,crossAndNormalize:function(e,t,r){const i=t[0],n=t[1],s=t[2],a=r[0],o=r[1],l=r[2],u=n*l-s*o,c=s*a-i*l,h=i*o-n*a,d=Math.sqrt(u*u+c*c+h*h);return e[0]=u/d,e[1]=c/d,e[2]=h/d,e},direction:O,dist:Z,distance:v,div:H,divide:h,dot:C,equals:function(e,t){if(e===t)return!0;const r=e[0],i=e[1],s=e[2],a=t[0],o=t[1],l=t[2],u=(0,n.FD)();return Math.abs(r-a)<=u*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-o)<=u*Math.max(1,Math.abs(i),Math.abs(o))&&Math.abs(s-l)<=u*Math.max(1,Math.abs(s),Math.abs(l))},exactEquals:L,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e},hermite:function(e,t,r,i,n,s){const a=s*s,o=a*(2*s-3)+1,l=a*(s-2)+s,u=a*(s-1),c=a*(3-2*s);return e[0]=t[0]*o+r[0]*l+i[0]*u+n[0]*c,e[1]=t[1]*o+r[1]*l+i[1]*u+n[1]*c,e[2]=t[2]*o+r[2]*l+i[2]*u+n[2]*c,e},inverse:x,len:G,length:s,lerp:_,max:g,min:f,mul:k,multiply:c,negate:w,normalize:b,random:function(e,t=1){const r=n.Ov,i=2*r()*Math.PI,s=2*r()-1,a=Math.sqrt(1-s*s)*t;return e[0]=Math.cos(i)*a,e[1]=Math.sin(i)*a,e[2]=s*t,e},rotateX:function(e,t,r,i){const n=[],s=[];return n[0]=t[0]-r[0],n[1]=t[1]-r[1],n[2]=t[2]-r[2],s[0]=n[0],s[1]=n[1]*Math.cos(i)-n[2]*Math.sin(i),s[2]=n[1]*Math.sin(i)+n[2]*Math.cos(i),e[0]=s[0]+r[0],e[1]=s[1]+r[1],e[2]=s[2]+r[2],e},rotateY:function(e,t,r,i){const n=[],s=[];return n[0]=t[0]-r[0],n[1]=t[1]-r[1],n[2]=t[2]-r[2],s[0]=n[2]*Math.sin(i)+n[0]*Math.cos(i),s[1]=n[1],s[2]=n[2]*Math.cos(i)-n[0]*Math.sin(i),e[0]=s[0]+r[0],e[1]=s[1]+r[1],e[2]=s[2]+r[2],e},rotateZ:function(e,t,r,i){const n=[],s=[];return n[0]=t[0]-r[0],n[1]=t[1]-r[1],n[2]=t[2]-r[2],s[0]=n[0]*Math.cos(i)-n[1]*Math.sin(i),s[1]=n[0]*Math.sin(i)+n[1]*Math.cos(i),s[2]=n[2],e[0]=s[0]+r[0],e[1]=s[1]+r[1],e[2]=s[2]+r[2],e},round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e},scale:m,scaleAndAdd:y,set:o,sign:p,sqrDist:j,sqrLen:D,squaredDistance:M,squaredLength:S,str:function(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"},sub:T,subtract:u,transformMat3:R,transformMat4:E,transformQuat:I},Symbol.toStringTag,{value:"Module"}))},52136:(e,t,r)=>{r.d(t,{p:()=>a});var i=r(31635),n=r(10107),s=(r(44208),r(53966),r(87811),r(40608));const a=e=>{const t=e;let r=class extends t{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.Cg)([(0,n.MZ)({type:String})],r.prototype,"apiKey",null),r=(0,i.Cg)([(0,s.$)("esri.layers.mixins.APIKeyMixin")],r),r}},54239:(e,t,r)=>{r.d(t,{A:()=>y});var i,n=r(31635),s=r(4576),a=r(66552),o=r(25482),l=r(83047),u=r(67076),c=r(10107),h=(r(44208),r(53966),r(36005)),d=r(40608),p=r(43937);const f=(0,a.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),g=f.jsonValues.slice();(0,s.Xy)(g,"orthometric");const m=(0,a.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let y=i=class extends o.o{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return f.write(e,t,r)}readHeightModel(e,t,r){return f.read(e)||(r?.messages&&r.messages.push(function(e,t){return new u.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return m.read(e)||(r?.messages&&r.messages.push(v(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,l.LA)(e)||m.read(e)||(r?.messages&&r.messages.push(v(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new i({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const r=(0,l.k1)(t);return new i({heightModel:e.heightModel,heightUnit:r??void 0,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new i;return t.read(e,{origin:"web-scene"}),t}};function v(e,t){return new u.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,n.Cg)([(0,c.MZ)({type:f.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g,default:"ellipsoidal",write:{isRequired:!0}}}}})],y.prototype,"heightModel",void 0),(0,n.Cg)([(0,p.K)("web-scene","heightModel")],y.prototype,"writeHeightModel",null),(0,n.Cg)([(0,h.w)(["web-scene","service"],"heightModel")],y.prototype,"readHeightModel",null),(0,n.Cg)([(0,c.MZ)({type:m.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m.jsonValues,write:{writer:m.write,isRequired:!0}}}}})],y.prototype,"heightUnit",void 0),(0,n.Cg)([(0,h.w)("web-scene","heightUnit")],y.prototype,"readHeightUnit",null),(0,n.Cg)([(0,h.w)("service","heightUnit")],y.prototype,"readHeightUnitService",null),(0,n.Cg)([(0,c.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],y.prototype,"vertCRS",void 0),(0,n.Cg)([(0,h.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],y.prototype,"readVertCRS",null),y=i=(0,n.Cg)([(0,d.$)("esri.geometry.HeightModelInfo")],y)},60999:(e,t,r)=>{r.d(t,{DZ:()=>f,Ke:()=>p,Tj:()=>c,UT:()=>g,jJ:()=>u});var i=r(31635),n=r(65008),s=r(97768),a=r(74887),o=r(10107),l=r(40608);function u(e,t,r){return(0,a.Lx)(e.map((e,i)=>t.apply(r,[e,i])))}async function c(e,t,r){return(await(0,a.Lx)(e.map((e,i)=>t.apply(r,[e,i])))).map(e=>e.value)}function h(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function p(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return h(await e)}catch(e){return d(e)}}async function f(e){try{return h(await e)}catch(e){return(0,a.QP)(e),d(e)}}function g(e,t){return new m(e,t)}let m=class extends n.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,s.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:r}=this._abortController;this.promise=e(r),this.promise.then(e=>{this._result=h(e),this._cleanup()},e=>{this._result=d(e),this._cleanup()}),this._abortHandle=(0,a.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,s.xt)(this._abortHandle),this._abortController=null}};(0,i.Cg)([(0,o.MZ)()],m.prototype,"value",null),(0,i.Cg)([(0,o.MZ)()],m.prototype,"error",null),(0,i.Cg)([(0,o.MZ)()],m.prototype,"finished",null),(0,i.Cg)([(0,o.MZ)()],m.prototype,"promise",void 0),(0,i.Cg)([(0,o.MZ)()],m.prototype,"_result",void 0),m=(0,i.Cg)([(0,l.$)("esri.core.asyncUtils.ReactiveTask")],m)},69208:(e,t,r)=>{r.d(t,{d:()=>a});var i=r(31635),n=r(10107),s=(r(44208),r(53966),r(87811),r(40608));const a=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.customParameters=null}};return(0,i.Cg)([(0,n.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],r.prototype,"customParameters",void 0),r=(0,i.Cg)([(0,s.$)("esri.layers.mixins.CustomParametersMixin")],r),r}},69540:(e,t,r)=>{r.d(t,{OU:()=>c,Pw:()=>h});var i=r(31635),n=r(65008),s=(r(44208),r(4718)),a=(r(53966),r(97768)),o=r(88620),l=r(40608);const u=Symbol("ClonableMixin"),c=e=>{var t;const r=e;let n=class extends r{constructor(){super(...arguments),this[t]=!0}static{t=u}clone(e){const t=(0,o.oY)(this);(0,a.Lw)(t,"unable to clone instance of non-accessor class");const r=t.metadata,i=t.store,n={},l=new Map;for(const t in r){const a=r[t],o=i?.originOf(t),u=a.clonable;if(a.readOnly||!1===u||7!==o&&0!==o&&5!==o&&4!==o)continue;const c=this[t];let h=null;if("function"==typeof u)h=u(c,e);else if("reference"===u)h=c;else if(h=(0,s.TU)(c,e),null!=c&&null==h)continue;0===o?l.set(t,h):n[t]=h}const u=new(0,Object.getPrototypeOf(this).constructor)(n);if(l.size){const e=(0,o.oY)(u)?.store;if(e)for(const[t,r]of l)e.set(t,r,0)}return u}};return n=(0,i.Cg)([(0,l.$)("esri.core.Clonable")],n),n},h=c(n.A)},78553:(e,t,r)=>{r.d(t,{D:()=>s,p:()=>n});var i=r(56507);function n(e){const t=(0,i.Vr)(100*(1-e));return Math.max(0,Math.min(t,100))}function s(e){const t=1-e/100;return Math.max(0,Math.min(t,1))}},88546:(e,t,r)=>{r.d(t,{_8:()=>f,uB:()=>g});var i=r(34727),n=r(38954),s=r(51850),a=r(73941),o=r(5443),l=r(54239),u=r(16930),c=r(9762);function h(e,t){if(!Array.isArray(e)||e.length<t)return!1;for(const t of e)if("number"!=typeof t)return!1;return!0}const d=7645211,p={xmin:-180,ymin:-90,zmin:-450,xmax:180,ymax:90,zmax:8850};function f(e){return!(!(e.extensions?.ESRI_crs?.wkid||e.extensions?.ESRI_crs?.latestWkid||e.extensions?.ESRI_crs?.wkt)||!e.root?.extensions?.ESRI_crs?.boundingVolume?.box&&!e.root?.extensions?.ESRI_crs?.boundingVolume?.sphere)}function g(e,t=!1){let r=new u.A({wkid:4326,vcsWkid:115700}),l=e.root?.boundingVolume,f=!1,g=e?.root?.transform;if(t&&(e.extensions?.ESRI_crs?.wkid||e.extensions?.ESRI_crs?.latestWkid||e.extensions?.ESRI_crs?.wkt)&&(e.root?.extensions?.ESRI_crs?.boundingVolume?.box||e.root?.extensions?.ESRI_crs?.boundingVolume?.sphere))r=new u.A(e.extensions?.ESRI_crs),l=e.root?.extensions?.ESRI_crs?.boundingVolume,g=e.root?.transform,f=!0;else if(!l)return new o.A(-180,-90,180,90,r);if(l.box){const e=l?.box;if(e[3]>d&&e[7]>d&&e[11]>d)return new o.A({...p,spatialReference:r})}const m=(0,s.vt)();if(!f&&l.region&&h(l.region,6)){const e=l.region,t=(0,i.KJ)(e[0]),n=(0,i.KJ)(e[1]),s=e[4],a=(0,i.KJ)(e[2]),u=(0,i.KJ)(e[3]),c=e[5];return new o.A({xmin:t,ymin:n,zmin:s,xmax:a,ymax:u,zmax:c,spatialReference:r})}if(l.sphere&&h(l.sphere,4)){const e=l.sphere,t=(0,s.fA)(e[0],e[1],e[2]),i=e[3]/Math.sqrt(3),d=(0,s.vt)();(0,n.d)(d,t,(0,s.fA)(i,i,i));const p=(0,s.vt)();if((0,n.f)(p,t,(0,s.fA)(i,i,i)),g&&h(g,16)){const e=g;(0,n.t)(m,d,e),(0,n.c)(d,m),(0,n.t)(m,p,e),(0,n.c)(p,m)}f||((0,c.projectBuffer)(d,a.Ro,0,d,u.A.WGS84,0),(0,c.projectBuffer)(p,a.Ro,0,p,u.A.WGS84,0));const y=(0,s.vt)(),v=(0,s.vt)();return(0,n.A)(y,d,p),(0,n.z)(v,d,p),new o.A({xmin:y[0],ymin:y[1],zmin:y[2],xmax:v[0],ymax:v[1],zmax:v[2],spatialReference:r})}if(l.box&&h(l.box,12)){const e=l.box,t=(0,s.fA)(e[0],e[1],e[2]),i=(0,s.fA)(e[3],e[4],e[5]),d=(0,s.fA)(e[6],e[7],e[8]),p=(0,s.fA)(e[9],e[10],e[11]),m=[];for(let e=0;e<8;++e)m.push((0,s.vt)());if((0,n.f)(m[0],t,i),(0,n.f)(m[0],m[0],d),(0,n.f)(m[0],m[0],p),(0,n.a)(m[1],t,i),(0,n.f)(m[1],m[1],d),(0,n.f)(m[1],m[1],p),(0,n.f)(m[2],t,i),(0,n.a)(m[2],m[2],d),(0,n.f)(m[2],m[2],p),(0,n.a)(m[3],t,i),(0,n.a)(m[3],m[3],d),(0,n.f)(m[3],m[3],p),(0,n.f)(m[4],t,i),(0,n.f)(m[4],m[4],d),(0,n.a)(m[4],m[4],p),(0,n.a)(m[5],t,i),(0,n.f)(m[5],m[5],d),(0,n.a)(m[5],m[5],p),(0,n.f)(m[6],t,i),(0,n.a)(m[6],m[6],d),(0,n.a)(m[6],m[6],p),(0,n.a)(m[7],t,i),(0,n.a)(m[7],m[7],d),(0,n.a)(m[7],m[7],p),g&&h(g,16)){const e=g;for(let t=0;t<8;++t)(0,n.t)(m[t],m[t],e)}const y=(0,s.fA)(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),v=(0,s.fA)(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE);for(let e=0;e<8;++e)f||(0,c.projectBuffer)(m[e],a.Ro,0,m[e],u.A.WGS84,0),(0,n.A)(v,v,m[e]),(0,n.z)(y,y,m[e]);return new o.A({xmin:v[0],ymin:v[1],zmin:v[2],xmax:y[0],ymax:y[1],zmax:y[2],spatialReference:r})}return new o.A(-180,-90,180,90,r)}new Map([[5773,new l.A({heightModel:"gravity-related-height",heightUnit:"meters",vertCRS:"EGM96_Geoid"})],[3855,new l.A({heightModel:"gravity-related-height",heightUnit:"meters",vertCRS:"EGM2008_Geoid"})],[115700,new l.A({heightModel:"ellipsoidal",heightUnit:"meters",vertCRS:"WGS_1984"})],[115701,new l.A({heightModel:"ellipsoidal",heightUnit:"meters",vertCRS:"ETRS_1989"})],[6360,new l.A({heightModel:"gravity-related-height",heightUnit:"us-feet",vertCRS:"NAVD88_height_(ftUS)"})],[7837,new l.A({heightModel:"gravity-related-height",heightUnit:"meters",vertCRS:"DHHN2016_(height) "})]])}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4224],{159:(e,t,r)=>{r.d(t,{A:()=>u});var n,i=r(31635),o=r(65008),s=r(10107),l=(r(44208),r(53966),r(87811),r(40608)),a=r(99157);let u=n=class extends o.A{constructor(e){super(e),this.steps=[]}getInverse(){const e=new n;for(let t=this.steps.length-1;t>=0;t--){const r=this.steps[t];e.steps.push(r.getInverse())}return e}};(0,i.Cg)([(0,s.MZ)({type:[a.A],nonNullable:!0})],u.prototype,"steps",void 0),u=n=(0,i.Cg)([(0,l.$)("esri.geometry.operators.support.GeographicTransformation")],u)},6455:(e,t,r)=>{r.d(t,{FJ:()=>v,Dp:()=>w,KV:()=>C});var n=r(31635),i=r(93637),o=r(10107),s=(r(44208),r(53966),r(87811),r(40608)),l=r(89317),a=r(69540),u=r(7762),p=r(25482),c=r(43937),d=r(83960),y=r(13069);const f={write:{overridePolicy:(e,t,r)=>({enabled:!r||"scale"===r.filterMode})}};let h=class extends((0,a.OU)(p.o)){constructor(e){super(e),this.id=(0,y.lk)(),this.maxScale=0,this.minScale=0,this.title="",this.where=null}};(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],h.prototype,"id",void 0),(0,n.Cg)([(0,o.MZ)({type:Number,json:f})],h.prototype,"maxScale",void 0),(0,n.Cg)([(0,o.MZ)({type:Number,json:f})],h.prototype,"minScale",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],h.prototype,"title",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],h.prototype,"where",void 0),h=(0,n.Cg)([(0,s.$)("esri.layers.support.DisplayFilter")],h);var g=r(41560);let m=class extends((0,a.OU)(p.o)){constructor(e){super(e),this.activeFilterId=null,this.filters=new(u.A.ofType(h)),this.mode="manual"}writeFilters(e,t,r,n){const i=e.toArray();"scale"===this.mode&&i.sort((e,t)=>{const r=(0,d.oW)(t.minScale,e.minScale),n=e.maxScale-t.maxScale;return 0===r?n:r}),t[r]=i.map(e=>e.toJSON(n))}write(e,t){return super.write(e,(0,g.mW)(this,t))}};(0,n.Cg)([(0,o.MZ)({type:String,json:{write:{overridePolicy:(e,t,r)=>({enabled:"manual"===r.filterMode,isRequired:!0})}}})],m.prototype,"activeFilterId",void 0),(0,n.Cg)([(0,o.MZ)({type:u.A.ofType(h),nonNullable:!0,json:{write:!0}})],m.prototype,"filters",void 0),(0,n.Cg)([(0,c.K)("filters")],m.prototype,"writeFilters",null),(0,n.Cg)([(0,o.MZ)({type:["manual","scale"],nonNullable:!0,json:{name:"filterMode",write:!0}})],m.prototype,"mode",void 0),m=(0,n.Cg)([(0,s.$)("esri.layers.support.DisplayFilterInfo")],m);const v=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.displayFilterEnabled=!0,this.displayFilterInfo=null}};return(0,n.Cg)([(0,o.MZ)(w)],r.prototype,"displayFilterEnabled",void 0),(0,n.Cg)([(0,o.MZ)(C)],r.prototype,"displayFilterInfo",void 0),r=(0,n.Cg)([(0,s.$)("esri.layers.mixins.DisplayFilteredLayer")],r),r},w={type:Boolean,json:{name:"layerDefinition.disableDisplayFilter",read:{reader:e=>!e},write:{layerContainerTypes:l.K,writer(e,t,r){(0,i.sM)(r,!e,t)}},origins:{"web-scene":{write:!1,read:!1}}}},C={type:m,json:{name:"layerDefinition.displayFilterInfo",write:{enabled:!0,allowNull:!0,layerContainerTypes:l.K},origins:{"web-scene":{write:!1,read:!1}}}}},8303:(e,t,r)=>{r.d(t,{A:()=>I});var n=r(31635),i=r(92602),o=r(70333),s=r(78888),l=r(60999),a=r(49186),u=r(53966),p=r(97768),c=r(74887),d=r(84952),y=r(10107),f=(r(44208),r(87811),r(36005)),h=r(40608),g=r(43937),m=r(77548),v=r(20655),w=r(80812),C=r(41318),M=r(10407);const I=e=>{const t=e;let I=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.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,t,r){if(t.itemId)return new w.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:n}=await r.e(1204).then(r.bind(r,41204));return(0,c.Te)(t),await n({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,c.zf)(e)||u.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,t){if(!i.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:n},content:{updateItem:i}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",n),this._set("userHasUpdateItemPrivileges",i)}catch(e){(0,c.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const n=!o.id?.findCredential(this.url),i=e===r.id;if(i&&r.portal.user)return this._getUserPrivileges(r,n);let s,l;if(i)s=r.portal.url;else try{s=await(0,m.wI)(this.url,t)}catch(e){(0,c.QP)(e)}if(!s||!(0,d.b8)(s,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;l=await(o.id?.getCredential(`${s}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.QP)(e)}const a=!0,u=!1,p=!1;if(!l)return{features:{edit:a,fullEdit:u},content:{updateItem:p}};try{if(i?await r.reload():(r=new w.default({id:e,portal:{url:s}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,n)}catch(e){(0,c.QP)(e)}return{features:{edit:a,fullEdit:u},content:{updateItem:p}}}_getUserPrivileges(e,t){const r=(0,M.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?o.id?.findCredential(this.url):null;if(!t)return!0;const r=x.credential===t?x.user:await this._fetchEditingUser(e);return x.credential=t,x.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=o.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const n=`${r.owningSystemUrl}/sharing/rest`,i=v.A.getDefault();if(i&&i.loaded&&(0,d.S8)(i.restUrl)===(0,d.S8)(n))return i.user;const a=`${n}/community/self`,u=null!=e?e.signal:null,p=await(0,l.Ke)((0,s.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?C.A.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,n=this.portalItem?.id&&(this.portalItem.portal||v.A.getDefault());return r&&n&&!(0,d.ut)(n.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.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,{...t,layer:this})}};return(0,n.Cg)([(0,y.MZ)({type:w.default})],I.prototype,"portalItem",null),(0,n.Cg)([(0,f.w)("web-document","portalItem",["itemId"])],I.prototype,"readPortalItem",null),(0,n.Cg)([(0,g.K)("web-document","portalItem",{itemId:{type:String}})],I.prototype,"writePortalItem",null),(0,n.Cg)([(0,y.MZ)({clonable:!1})],I.prototype,"resourceReferences",void 0),(0,n.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],I.prototype,"userHasEditingPrivileges",void 0),(0,n.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],I.prototype,"userHasFullEditingPrivileges",void 0),(0,n.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],I.prototype,"userHasUpdateItemPrivileges",void 0),I=(0,n.Cg)([(0,h.$)("esri.layers.mixins.PortalLayer")],I),I},x={credential:null,user:null}},9762:(e,t,r)=>{r.r(t),r.d(t,{projectBuffer:()=>i});var n=r(37539);function i(e,t,r,i,o,s,l=Math.floor(e.length/3)){const a=(0,n.jd)(t,o);if(null==a)return!1;if(a===n.pO){if(e===i&&r===s)return!0;const t=r+3*l;for(let n=r,o=s;n<t;n++,o++)i[o]=e[n];return!0}const u=r+3*l;for(let t=r,n=s;t<u;t+=3,n+=3)a(e,t,i,n);return!0}},10184:(e,t,r)=>{r.d(t,{A:()=>c});var n=r(31635),i=r(69540),o=r(25482),s=r(88930),l=r(10107),a=(r(44208),r(53966),r(87811),r(93223)),u=r(40608),p=r(73133);let c=class extends((0,i.OU)(o.o)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,s.t)(this.value,this.unit,"milliseconds")}};(0,n.Cg)([(0,a.e)(p.j,{nonNullable:!0})],c.prototype,"unit",void 0),(0,n.Cg)([(0,l.MZ)({type:Number,json:{write:!0},nonNullable:!0})],c.prototype,"value",void 0),c=(0,n.Cg)([(0,u.$)("esri.time.TimeInterval")],c)},10407:(e,t,r)=>{r.d(t,{It:()=>y,LG:()=>s,OM:()=>u,Sm:()=>p,Y:()=>l,bK:()=>a,mm:()=>d,sQ:()=>c});var n=r(91218),i=r(16930),o=r(28735);function s(e,t){if(!l(e,t)){const r=e.typeKeywords;r?r.push(t):e.typeKeywords=[t]}}function l(e,t){return!!e.typeKeywords?.includes(t)}function a(e){return l(e,d.HOSTED_SERVICE)}function u(e,t){const r=e.typeKeywords;if(r){const e=r.indexOf(t);e>-1&&r.splice(e,1)}}function p(e,t,r){r?s(e,t):u(e,t)}async function c(e){const t=e.clone().normalize();let r;if(t.length>1)for(const e of t)r?e.width>r.width&&(r=e):r=e;else r=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,o.ci)(e);const r=i.A.WGS84;return await(0,n.initializeProjection)(t,r),(0,n.project)(e,r)}(r)}const d={CHARTS:"Charts",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery"};function y(e){const{portal:t,isOrgItem:r,itemControl:n}=e,i=t.user?.privileges;let o=!i||i.includes("features:user:edit"),s=!!r&&!!i?.includes("features:user:fullEdit");const l="update"===n||"admin"===n;return l?s=o=!0:s&&(o=!0),{features:{edit:o,fullEdit:s},content:{updateItem:l}}}},13069:(e,t,r)=>{r.d(t,{AG:()=>l,lk:()=>i,vD:()=>s,yS:()=>o});const n="randomUUID"in crypto;function i(){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 o(){return`{${i().toUpperCase()}}`}function s(){return`{${i()}}`}function l(e){const t=e.toUpperCase();return e.startsWith("{")?t:`{${t}}`}},17036:(e,t,r)=>{r.d(t,{p:()=>a});var n=r(44208),i=r(53966),o=r(20437),s=r(95466),l=r(30524);function a(){return{fields:{type:[o.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(", ");i.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 s.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||i.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)}}}}},22671:(e,t,r)=>{r.d(t,{A:()=>v});var n,i=r(31635),o=r(52106),s=r(66552),l=r(25482),a=r(4718),u=r(10107),p=(r(44208),r(53966),r(36005)),c=r(40608),d=r(43937),y=r(16930),f=r(65864),h=r(50498),g=r(20437);const m=new s.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=n=class extends l.o{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){return this.readFeaturesWithClass(e,t,o.A)}writeGeometryType(e,t,r,n){if(e)return void m.write(e,t,r,n);const{features:i}=this;if(i)for(const e of i)if(null!=e?.geometry)return void m.write(e.geometry.type,t,r,n)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,n=(0,f.rS)(e);return n&&!r&&t.spatialReference&&(n.spatialReference=y.A.fromJSON(t.spatialReference)),n}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 n(this.cloneProperties())}cloneProperties(){return(0,a.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 n=t.features[r];if(n.geometry){const t=e?.[r];n.geometry=t?.toJSON()||n.geometry}}return t}quantize(e){const{scale:[t,r],translate:[n,i]}=e,o=this.features,s=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-n)/t),e=>Math.round((i-e)/r));for(let e=0,t=o.length;e<t;e++)s?.(o[e].geometry)||(o.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:[n,i],scale:[o,s]}=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 u=this._getHydrationFunction(e,e=>e*o+n,e=>i-e*s,l,a);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const n=y.A.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const o=e[t],s=r.fromJSON(o),l=o.geometry?.spatialReference;null==s.geometry||l||(s.geometry.spatialReference=n);const a=o.aggregateGeometries,u=s.aggregateGeometries;if(a&&null!=u)for(const e in u){const t=u[e],r=a[e],i=r?.spatialReference;null==t||i||(t.spatialReference=n)}i.push(s)}return i}_quantizePoints(e,t,r){let n,i;const o=[];for(let s=0,l=e.length;s<l;s++){const l=e[s];if(s>0){const e=t(l[0]),s=r(l[1]);e===n&&s===i||(o.push([e-n,s-i]),n=e,i=s)}else n=t(l[0]),i=r(l[1]),o.push([n,i])}return o.length>0?o: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 n=(0,f.Bi)(e)?e.rings:e.paths,i=[];for(let e=0,o=n.length;e<o;e++){const o=n[e],s=this._quantizePoints(o,t,r);s&&i.push(s)}return i.length>0?((0,f.Bi)(e)?e.rings=i:e.paths=i,e):null}:"multipoint"===e?e=>{const n=this._quantizePoints(e.points,t,r);return n&&n.length>0?(e.points=n,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,n,i){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),n&&(e.z=n(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,f.Bi)(e)?e.rings:e.paths;let s,l;for(let e=0,n=o.length;e<n;e++){const n=o[e];for(let e=0,i=n.length;e<i;e++){const i=n[e];e>0?(s+=i[0],l+=i[1]):(s=i[0],l=i[1]),i[0]=t(s),i[1]=r(l)}}if(n&&i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2]),r[3]=i(r[3])}}else if(n)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2])}}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(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),n&&null!=e.zmax&&null!=e.zmin&&(e.zmax=n(e.zmax),e.zmin=n(e.zmin)),i&&null!=e.mmax&&null!=e.mmin&&(e.mmax=i(e.mmax),e.mmin=i(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let s,l;for(let e=0,n=o.length;e<n;e++){const n=o[e];e>0?(s+=n[0],l+=n[1]):(s=n[0],l=n[1]),n[0]=t(s),n[1]=r(l)}if(n&&i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=n(t[2]),t[3]=i(t[3])}else if(n)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=n(t[2])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}}:null}};(0,i.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,i.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,i.Cg)([(0,u.MZ)({type:[o.A],json:{write:!0}})],v.prototype,"features",void 0),(0,i.Cg)([(0,p.w)("features")],v.prototype,"readFeatures",null),(0,i.Cg)([(0,u.MZ)({type:[g.A],json:{write:!0}})],v.prototype,"fields",void 0),(0,i.Cg)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:m.read}}})],v.prototype,"geometryType",void 0),(0,i.Cg)([(0,d.K)("geometryType")],v.prototype,"writeGeometryType",null),(0,i.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,i.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,i.Cg)([(0,u.MZ)({types:h.yR,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,i.Cg)([(0,p.w)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,i.Cg)([(0,u.MZ)({type:y.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,i.Cg)([(0,d.K)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,i.Cg)([(0,u.MZ)({json:{write:!0}})],v.prototype,"transform",void 0),v=n=(0,i.Cg)([(0,c.$)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0},29005:(e,t,r)=>{r.d(t,{A:()=>p});var n=r(31635),i=r(69540),o=r(66552),s=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(40608));const u=new o.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 p=class extends((0,i.OU)(s.o)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,n.Cg)([(0,l.MZ)({json:{write:!0}})],p.prototype,"name",void 0),(0,n.Cg)([(0,l.MZ)({json:{write:!0}})],p.prototype,"description",void 0),(0,n.Cg)([(0,l.MZ)({json:{read:u.read,write:u.write}})],p.prototype,"drawingTool",void 0),(0,n.Cg)([(0,l.MZ)({json:{write:!0}})],p.prototype,"prototype",void 0),(0,n.Cg)([(0,l.MZ)({json:{write:!0}})],p.prototype,"thumbnail",void 0),p=(0,n.Cg)([(0,a.$)("esri.layers.support.FeatureTemplate")],p)},32756:(e,t,r)=>{r.d(t,{Rr:()=>a,fY:()=>p,ne:()=>u});var n=r(31635),i=r(93637),o=r(10107),s=(r(44208),r(53966),r(87811),r(40608)),l=r(91880);function a(e,t,r){if(!e)return null;const n=e.find(e=>!!e.field);if(!n)return null;const i=new l.A;return i.read(n,r),[i]}const u={type:[l.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:a},write:{writer:function(e,t,r,n){const o=e.find(e=>!!e.field);o&&(0,i.sM)(r,[o.toJSON()],t)}}}},p=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,n.Cg)([(0,o.MZ)(u)],r.prototype,"orderBy",void 0),r=(0,n.Cg)([(0,s.$)("esri.layers.mixins.OrderedLayer")],r),r}},33143:(e,t,r)=>{r.d(t,{A:()=>d});var n=r(31635),i=r(69540),o=r(25482),s=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),a=r(40608),u=r(43937),p=r(80451),c=r(29005);let d=class extends((0,i.OU)(o.o)){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,p.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,n.Cg)([(0,s.MZ)({json:{write:!0}})],d.prototype,"id",void 0),(0,n.Cg)([(0,s.MZ)({json:{write:!0}})],d.prototype,"name",void 0),(0,n.Cg)([(0,s.MZ)({json:{write:!0}})],d.prototype,"domains",void 0),(0,n.Cg)([(0,l.w)("domains")],d.prototype,"readDomains",null),(0,n.Cg)([(0,u.K)("domains")],d.prototype,"writeDomains",null),(0,n.Cg)([(0,s.MZ)({type:[c.A],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,n.Cg)([(0,a.$)("esri.layers.support.FeatureType")],d)},37539:(e,t,r)=>{r.d(t,{pO:()=>h,jd:()=>d,Tp:()=>y,w5:()=>c});var n=r(34727),i=r(83047),o=r(73941),s=r(79258);Math.PI;const l=s.$O.radius,a=s.$O.eccentricitySquared,u={a1:l*a,a2:l*a*l*a,a3:l*a*a/2,a4:l*a*l*a*2.5,a5:l*a+l*a*a/2,a6:1-a};s.$O.radius,s.$O.flattening,s.Sw.radius,s.Sw.flattening,s.sH.radius,s.sH.flattening,s.sH.radius;var p=r(21325);const c={2:{5:h,7:null,9:null,10:h,1:x,6:null,8:null,0:null,3:m,11:v,2:h,4:O},5:{5:h,7:null,9:null,10:h,1:x,6:null,8:null,0:null,3:m,11:v,2:h,4:O},7:{5:null,7:h,9:null,10:h,1:null,6:I,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:h,10:h,1:null,6:null,8:M,0:null,3:null,11:null,2:null,4:null},3:{5:g,7:null,9:null,10:g,1:function(e,t,r,n){const i=e[t]/E,o=j-2*Math.atan(Math.exp(-e[t+1]/E)),s=E+e[t+2],l=Math.cos(o)*s;r[n]=Math.cos(i)*l,r[n+1]=Math.sin(i)*l,r[n+2]=Math.sin(o)*s},6:null,8:null,0:null,3:h,11:function(e,t,r,n){g(e,t,r,n),v(r,n,r,n)},2:g,4:function(e,t,r,n){g(e,t,r,n),O(r,n,r,n)}},4:{5:P,7:null,9:null,10:P,1:function(e,t,r,n){P(e,t,r,n),x(r,n,r,n)},6:null,8:null,0:null,3:function(e,t,r,n){P(e,t,r,n),m(r,n,r,n)},11:function(e,t,r,n){P(e,t,r,n),v(r,n,r,n)},2:P,4:h},1:{5:R,7:null,9:null,10:R,1:h,6:null,8:null,0:null,3:function(e,t,r,n){R(e,t,r,n),m(r,n,r,n)},11:function(e,t,r,n){R(e,t,r,n),v(r,n,r,n)},2:R,4:function(e,t,r,n){R(e,t,r,n),O(r,n,r,n)}},6:{5:null,7:A,9:null,10:A,1:null,6:h,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:T,10:T,1:null,6:null,8:h,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:h,3:null,11:null,2:null,4:null},10:{5:h,7:h,9:h,10:h,1:x,6:I,8:M,0:null,3:m,11:v,2:h,4:O},11:{5:w,7:null,9:null,10:w,1:function(e,t,r,n){w(e,t,r,n),x(r,n,r,n)},6:null,8:null,0:null,3:function(e,t,r,n){w(e,t,r,n),m(r,n,r,n)},11:h,2:w,4:function(e,t,r,n){w(e,t,r,n),O(r,n,r,n)}}};function d(e,t){return y(e,t)?.projector}function y(e,t){if(null==e||null==t)return null;if(F.source.spatialReference===e&&F.dest.spatialReference===t)return F;const r=f(e,F.source),n=f(t,F.dest);return 0===r&&0===n?(0,p.aI)(e,t)?F.projector=h:F.projector=null:F.projector=c[r][n],F}function f(e,t){return e?t.spatialReference===e?t.spatialReferenceId:(t.spatialReference=e,"metersPerUnit"in t&&(t.metersPerUnit=(0,i.GA)(e,1)),(0,o.jA)(e)?t.spatialReferenceId=1:(0,p.oT)(e)?t.spatialReferenceId=2:(0,p.K8)(e)?t.spatialReferenceId=3:(0,p.r1)(e)?t.spatialReferenceId=11:e.wkt===o.Ro.wkt?t.spatialReferenceId=4:4490===e.wkid?t.spatialReferenceId=5:e.wkt===o.FY.wkt?t.spatialReferenceId=6:e.wkt===o.LJ.wkt?t.spatialReferenceId=8:(0,p.q8)(e)?t.spatialReferenceId=7:(0,p.KQ)(e)?t.spatialReferenceId=9:t.spatialReferenceId=0):0}function h(e,t,r,n){e!==r&&(r[n++]=e[t++],r[n++]=e[t++],r[n]=e[t])}function g(e,t,r,n){r[n]=Z*(e[t]/E),r[n+1]=Z*(j-2*Math.atan(Math.exp(-e[t+1]/E))),r[n+2]=e[t+2]}function m(e,t,r,i){!function(e,t,r,i,o){const s=.4999999*Math.PI,l=(0,n.qE)(b*e[t+1],-s,s),a=Math.sin(l);r[i++]=b*e[t]*o.radius,r[i++]=o.halfSemiMajorAxis*Math.log((1+a)/(1-a)),r[i]=e[t+2]}(e,t,r,i,s.$O)}function v(e,t,r,n){r[n]=e[t]*D,r[n+1]=e[t+1]*D,r[n+2]=e[t+2]}function w(e,t,r,n){r[n]=e[t]*U,r[n+1]=e[t+1]*U,r[n+2]=e[t+2]}function C(e,t,r,n,i){const o=i+e[t+2],s=b*e[t+1],l=b*e[t],a=Math.cos(s)*o;r[n]=Math.cos(l)*a,r[n+1]=Math.sin(l)*a,r[n+2]=Math.sin(s)*o}function M(e,t,r,n){C(e,t,r,n,s.Sw.radius)}function I(e,t,r,n){C(e,t,r,n,s.sH.radius)}function x(e,t,r,n){C(e,t,r,n,s.$O.radius)}function S(e,t,r,i,o){const s=e[t],l=e[t+1],a=e[t+2],u=Math.sqrt(s*s+l*l+a*a),p=(0,n.YN)(a/(0===u?1:u)),c=Math.atan2(l,s);r[i++]=Z*c,r[i++]=Z*p,r[i]=u-o}function T(e,t,r,n){S(e,t,r,n,s.Sw.radius)}function A(e,t,r,n){S(e,t,r,n,s.sH.radius)}function R(e,t,r,n){S(e,t,r,n,s.$O.radius)}function O(e,t,r,n){!function(e,t,r,n,i){const o=b*e[t],s=b*e[t+1],l=e[t+2],a=Math.sin(s),u=Math.cos(s),p=i.radius/Math.sqrt(1-i.eccentricitySquared*a*a);r[n++]=(p+l)*u*Math.cos(o),r[n++]=(p+l)*u*Math.sin(o),r[n++]=(p*(1-i.eccentricitySquared)+l)*a}(e,t,r,n,s.$O)}function P(e,t,r,n){const i=u,o=e[t],l=e[t+1],a=e[t+2];let p,c,d,y,f,h,g,m,v,w,C,M,I,x,S,T,A,R,O,P,F;p=Math.abs(a),c=o*o+l*l,d=Math.sqrt(c),y=c+a*a,f=Math.sqrt(y),P=Math.atan2(l,o),h=a*a/y,g=c/y,x=i.a2/f,S=i.a3-i.a4/f,g>.3?(m=p/f*(1+g*(i.a1+x+h*S)/f),O=Math.asin(m),w=m*m,v=Math.sqrt(1-w)):(v=d/f*(1-h*(i.a5-x-g*S)/f),O=Math.acos(v),w=1-v*v,m=Math.sqrt(w)),C=1-s.$O.eccentricitySquared*w,M=s.$O.radius/Math.sqrt(C),I=i.a6*M,x=d-M*v,S=p-I*m,A=v*x+m*S,T=v*S-m*x,R=T/(I/C+A),O+=R,F=A+T*R/2,a<0&&(O=-O),r[n++]=Z*P,r[n++]=Z*O,r[n]=F}const F={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:h},b=(0,n.kU)(1),Z=(0,n.KJ)(1),j=.5*Math.PI,E=s.$O.radius,D=E*Math.PI/180,U=180/(E*Math.PI)},52136:(e,t,r)=>{r.d(t,{p:()=>s});var n=r(31635),i=r(10107),o=(r(44208),r(53966),r(87811),r(40608));const s=e=>{const t=e;let r=class extends t{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,n.Cg)([(0,i.MZ)({type:String})],r.prototype,"apiKey",null),r=(0,n.Cg)([(0,o.$)("esri.layers.mixins.APIKeyMixin")],r),r}},62815:(e,t,r)=>{r.d(t,{N:()=>s});var n=r(83047),i=r(73941),o=r(21325);function s(e,t,r){if(null==t||null==r||r.vcsWkid||(0,o.aI)(t,r)||(0,i.xP)(t)||(0,i.xP)(r))return null;const s=(0,n.G9)(t)/(0,n.G9)(r);if(1===s)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){null!=e?.z&&(e.z*=t)}(e,s);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const r of e.paths)for(const e of r)e.length>2&&(e[2]*=t)}(e,s);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const r of e.rings)for(const e of r)e.length>2&&(e[2]*=t)}(e,s);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const r of e.points)r.length>2&&(r[2]*=t)}(e,s);case"extent":case"esriGeometryEnvelope":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,s);default:return null}}},63396:(e,t,r)=>{r.d(t,{d:()=>x});var n=r(31635),i=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),s=r(60950),l=r(99959);class a extends l.A{constructor(e){super(),this.type="track",this.trackInfoProvider=e}get id(){return this.trackInfoProvider.id}get[s.ym](){return this.trackInfoProvider.trackInfo}}var u=r(37838),p=r(69540),c=r(25482),d=r(93637),y=r(43937),f=r(50820),h=r(10873),g=r(46499),m=r(41214);let v=class extends((0,p.OU)(c.o)){constructor(e){super(e),this.labelingInfo=null,this.labelsVisible=!0,this.renderer=null,this.visible=!0}};(0,n.Cg)([(0,i.MZ)({type:[g.A],json:{write:!0}})],v.prototype,"labelingInfo",void 0),(0,n.Cg)([(0,i.MZ)(h.kF)],v.prototype,"labelsVisible",void 0),(0,n.Cg)([(0,i.MZ)({types:m.Hg,json:{write:!0}})],v.prototype,"renderer",void 0),(0,n.Cg)([(0,i.MZ)({type:Boolean,json:{write:!0}})],v.prototype,"visible",void 0),v=(0,n.Cg)([(0,o.$)("esri.layers.support.TrackPartInfo")],v);var w=r(96576),C=r(59868),M=r(10184);let I=class extends((0,p.OU)(c.o)){constructor(e){super(e),this.enabled=!0,this.fields=[],this.latestObservations=new v({renderer:new w.A({symbol:C.UK.clone()})}),this.maxDisplayDuration=null,this.maxDisplayObservationsPerTrack=0,this.popupEnabled=!0,this.popupTemplate=null,this.previousObservations=new v({renderer:new w.A({symbol:C.UK.clone()})}),this.trackLines=new v({renderer:new w.A({symbol:C.A7.clone()})}),this.timeField="startTimeField"}writeFields(e,t,r){const n=e.filter(e=>"avg_angle"!==e.statisticType).map(e=>e.toJSON());(0,d.sM)(r,n,t)}};(0,n.Cg)([(0,i.MZ)({type:Boolean,json:{write:!0}})],I.prototype,"enabled",void 0),(0,n.Cg)([(0,i.MZ)({type:[f.A],json:{write:!0}})],I.prototype,"fields",void 0),(0,n.Cg)([(0,y.K)("fields")],I.prototype,"writeFields",null),(0,n.Cg)([(0,i.MZ)({type:v,json:{write:!0}})],I.prototype,"latestObservations",void 0),(0,n.Cg)([(0,i.MZ)({type:M.A,json:{write:!0}})],I.prototype,"maxDisplayDuration",void 0),(0,n.Cg)([(0,i.MZ)({type:Number,json:{write:!0}})],I.prototype,"maxDisplayObservationsPerTrack",void 0),(0,n.Cg)([(0,i.MZ)(h.M6)],I.prototype,"popupEnabled",void 0),(0,n.Cg)([(0,i.MZ)({type:u.A,json:{name:"popupInfo",write:!0}})],I.prototype,"popupTemplate",void 0),(0,n.Cg)([(0,i.MZ)({type:v,json:{write:!0}})],I.prototype,"previousObservations",void 0),(0,n.Cg)([(0,i.MZ)({type:v,json:{write:!0}})],I.prototype,"trackLines",void 0),(0,n.Cg)([(0,i.MZ)({type:["timeReceived","startTimeField","endTimeField"],json:{read:!0,write:!0}})],I.prototype,"timeField",void 0),I=(0,n.Cg)([(0,o.$)("esri.layers.support.TrackInfo")],I);const x=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.trackGraphicOrigin=new a(this),this.trackInfo=null}};return(0,n.Cg)([(0,i.MZ)({readOnly:!0,clonable:!1})],r.prototype,"trackGraphicOrigin",void 0),(0,n.Cg)([(0,i.MZ)({type:I})],r.prototype,"trackInfo",void 0),r=(0,n.Cg)([(0,o.$)("esri.layers.mixins.TrackableLayer")],r),r}},65977:(e,t,r)=>{r.r(t),r.d(t,{default:()=>V});var n=r(31635),i=r(37838),o=r(49186),s=r(92071),l=r(10107),a=(r(44208),r(53966),r(87811),r(40608)),u=r(5443),p=r(16930),c=r(50498),d=r(55156),y=r(60950),f=r(89808),h=r(99959);const g=Symbol("isOGCFeatureGraphicOrigin");var m;class v extends h.A{get[(m=g,y.ym)](){return this.layer}get[d.e](){return this.layer}get[f.Q](){return this.layer}constructor(e){super(),this[m]=!0,this.type="ogc-feature",this.layer=e}get id(){return this.layer.id}}var w=r(4146),C=r(92474),M=r(799),I=r(75321),x=r(4071),S=r(22671);let T=class extends C.x_{constructor(){super(...arguments),this.featureDefinition=null,this.type="ogc-feature"}load(e){return this.addResolvingPromise(this._loadOGCServices(this.layer,e)),this.when()}getSource(){const{featureDefinition:{collection:e,layerDefinition:t,spatialReference:r,supportedCrs:n},layer:{apiKey:i,customParameters:o,effectiveMaxRecordCount:s}}=this;return{type:"ogc-source",collection:e,layerDefinition:t,maxRecordCount:s,queryParameters:{apiKey:i,customParameters:o},spatialReference:r,supportedCrs:n}}queryExtent(e,t={}){return null}queryFeatureCount(e,t={}){return null}queryFeatures(e,t={}){return this.queryFeaturesJSON(e,t).then(e=>S.A.fromJSON(e))}queryFeaturesJSON(e,t={}){const r=this.getSource();return this.load(t).then(()=>(0,I.bW)(r,e,t))}queryObjectIds(e,t={}){return null}serviceSupportsSpatialReference(e){return!(!e.isWGS84&&!e.isWebMercator&&!this.featureDefinition.supportedCrs[e.wkid])}_conformsToType(e,t){const r=new RegExp(`^${(0,M.Cj)(t)}$`,"i");return e.conformsTo.some(e=>r.test(e))??!1}_getCapabilities(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryBins:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:t,maxRecordCountFactor:void 0,maxUniqueIDCount:void 0,standardMaxRecordCount:void 0,supportsCacheHint:!1,supportsCentroid:!1,supportsCentroidOnDegeneratedQuantizedGeometry:!1,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPaginationOnAggregatedQueries:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsStatistics:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,supportsSqlExpression:!1,supportsTrueCurve:!1,tileMaxRecordCount:void 0},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:x.$,editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUploadWithItemId:!1,supportsUpdateWithoutM:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}_getMaxRecordCount(e){const t=e?.components?.parameters;return t?.limit?.schema?.maximum??t?.limitFeatures?.schema?.maximum}_getStorageSpatialReference(e){const t=e.storageCrs??I.QE,r=(0,I.J0)(t);return null==r?p.A.WGS84:new p.A({wkid:r})}_getSupportedSpatialReferences(e,t){const r="#/crs",n=e.crs??[I.QE],i=n.includes(r)?n.filter(e=>e!==r).concat(t.crs??[]):n,o=/^http:\/\/www\.opengis.net\/def\/crs\/epsg\/.*\/3785$/i;return i.filter(e=>!o.test(e))}async _loadOGCServices(e,t){const r=null!=t?t.signal:null,{apiKey:n,collectionId:i,customParameters:s,fields:l,geometryType:a,hasZ:u,objectIdField:p,timeInfo:d,url:y}=e,f={fields:l?.map(e=>e.toJSON()),geometryType:c.Ye.toJSON(a),hasZ:u??!1,objectIdField:p,timeInfo:d?.toJSON()},h={apiKey:n,customParameters:s,signal:r},g=await(0,I.Ki)(y,h),[m,v]=await Promise.all([(0,I.Px)(g,h),(0,I.bV)(g,h)]);if(!this._conformsToType(m,"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson"))throw new o.A("ogc-feature-layer:no-geojson-support","Server does not support geojson");const w=v.collections.find(({id:e})=>e===i);if(!w)throw new o.A("ogc-feature-layer:collection-not-found","Server does not contain the named collection");const C=this._conformsToType(m,"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30")?await(0,I.GA)(g,h):null,x=await(0,I.GL)(w,f,h),S=this._getMaxRecordCount(C),T=this._getCapabilities(x.hasZ,S),A=this._getStorageSpatialReference(w).toJSON(),R=this._getSupportedSpatialReferences(w,v),O=new RegExp(`^${(0,M.Cj)(I.vJ)}`,"i"),P={};for(const e of R){const t=(0,I.J0)(e);null!=t&&(P[t]||(P[t]=e.replace(O,"")))}this.featureDefinition={capabilities:T,collection:w,layerDefinition:x,spatialReference:A,supportedCrs:P}}};(0,n.Cg)([(0,l.MZ)()],T.prototype,"featureDefinition",void 0),(0,n.Cg)([(0,l.MZ)({constructOnly:!0})],T.prototype,"layer",void 0),(0,n.Cg)([(0,l.MZ)()],T.prototype,"type",void 0),T=(0,n.Cg)([(0,a.$)("esri.layers.graphics.sources.OGCFeatureSource")],T);var A=r(52136),R=r(63074),O=r(69208),P=r(6455),F=r(87718),b=r(56658),Z=r(16131),j=r(32756),E=r(8303),D=r(54310),U=r(25036),_=r(82935),G=r(63396),L=r(10873),N=r(33143),k=r(20437),B=r(17036),$=r(30524),z=r(46499),q=r(39383),Q=r(41214),H=r(61956),J=r(30291);const K=(0,B.p)();let W=class extends((0,P.FJ)((0,A.p)((0,O.d)((0,b.J)((0,F.F)((0,R.dM)((0,j.fY)((0,_.e)((0,G.d)((0,U.j)((0,Z.q)((0,E.A)((0,D.J)((0,s.P)(w.A))))))))))))))){constructor(e){super(e),this.capabilities=null,this.collectionId=null,this.copyright=null,this.description=null,this.displayField=null,this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.graphicOrigin=new v(this),this.hasZ=void 0,this.labelingInfo=null,this.labelsVisible=!0,this.legendEnabled=!0,this.maxRecordCount=null,this.objectIdField=null,this.operationalLayerType="OGCFeatureLayer",this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new T({layer:this}),this.spatialReference=null,this.title=null,this.type="ogc-feature",this.typeIdField=null,this.types=null,this.url=null}destroy(){this.source?.destroy()}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["OGCFeatureServer"]},e).then(()=>this._fetchService(e))),this.when()}get defaultPopupTemplate(){return this.createPopupTemplate()}get effectiveMaxRecordCount(){return this.maxRecordCount??this.capabilities?.query.maxRecordCount??5e3}get isTable(){return this.loaded&&null==this.geometryType}set renderer(e){(0,$.yp)(e,this.fieldsIndex),this._set("renderer",e)}createPopupTemplate(e){return(0,J.tn)(this,e)}createQuery(){return new H.A}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){let r,n=!1;const i=t?.feature?.attributes,o=this.typeIdField&&i?.[this.typeIdField];return null!=o&&this.types&&(n=this.types.some(t=>t.id==o&&(r=t.domains?.[e],"inherited"===r?.type&&(r=this._getLayerDomain(e)),!0))),n||r||(r=this._getLayerDomain(e)),r}queryFeatures(e,t){return this.load().then(()=>this.source.queryFeatures(H.A.from(e)||this.createQuery(),t)).then(e=>(e?.features?.forEach(e=>{e.layer=e.sourceLayer=this,e.origin=this.graphicOrigin}),e))}async queryAttributeBins(e,t){throw new o.A("OGCFeatureLayer","Layer source does not support queryAttributeBins capability")}serviceSupportsSpatialReference(e){return this.source?.serviceSupportsSpatialReference(e)??!1}async _fetchService(e){await this.source.load(e),this.read(this.source.featureDefinition,{origin:"service"}),(0,$.yp)(this.renderer,this.fieldsIndex),(0,$.sv)(this.timeInfo,this.fieldsIndex)}_getLayerDomain(e){if(!this.fields)return null;for(const t of this.fields)if(t.name===e&&t.domain)return t.domain;return null}};(0,n.Cg)([(0,l.MZ)({readOnly:!0,json:{origins:{service:{read:!0}}}})],W.prototype,"capabilities",void 0),(0,n.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],W.prototype,"collectionId",void 0),(0,n.Cg)([(0,l.MZ)({type:String})],W.prototype,"copyright",void 0),(0,n.Cg)([(0,l.MZ)({readOnly:!0})],W.prototype,"defaultPopupTemplate",null),(0,n.Cg)([(0,l.MZ)({readOnly:!0,type:String,json:{origins:{service:{name:"collection.description"}}}})],W.prototype,"description",void 0),(0,n.Cg)([(0,l.MZ)({type:String})],W.prototype,"displayField",void 0),(0,n.Cg)([(0,l.MZ)({type:Number})],W.prototype,"effectiveMaxRecordCount",null),(0,n.Cg)([(0,l.MZ)(L.Yj)],W.prototype,"elevationInfo",void 0),(0,n.Cg)([(0,l.MZ)({type:[k.A],json:{origins:{service:{name:"layerDefinition.fields"}}}})],W.prototype,"fields",void 0),(0,n.Cg)([(0,l.MZ)(K.fieldsIndex)],W.prototype,"fieldsIndex",void 0),(0,n.Cg)([(0,l.MZ)({readOnly:!0,type:u.A,json:{origins:{service:{name:"layerDefinition.extent"}}}})],W.prototype,"fullExtent",void 0),(0,n.Cg)([(0,l.MZ)({type:c.gy.apiValues,json:{origins:{service:{name:"layerDefinition.geometryType",read:{reader:c.gy.read}}}}})],W.prototype,"geometryType",void 0),(0,n.Cg)([(0,l.MZ)({readOnly:!0,clonable:!1})],W.prototype,"graphicOrigin",void 0),(0,n.Cg)([(0,l.MZ)({type:Boolean,json:{origins:{service:{name:"layerDefinition.hasZ"}}}})],W.prototype,"hasZ",void 0),(0,n.Cg)([(0,l.MZ)({type:Boolean,readOnly:!0})],W.prototype,"isTable",null),(0,n.Cg)([(0,l.MZ)({type:[z.A],json:{origins:{"web-document":{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:q.w},write:!0}}}})],W.prototype,"labelingInfo",void 0),(0,n.Cg)([(0,l.MZ)(L.kF)],W.prototype,"labelsVisible",void 0),(0,n.Cg)([(0,l.MZ)(L.fV)],W.prototype,"legendEnabled",void 0),(0,n.Cg)([(0,l.MZ)({type:Number})],W.prototype,"maxRecordCount",void 0),(0,n.Cg)([(0,l.MZ)({type:String,json:{origins:{service:{name:"layerDefinition.objectIdField"}}}})],W.prototype,"objectIdField",void 0),(0,n.Cg)([(0,l.MZ)({type:["OGCFeatureLayer"]})],W.prototype,"operationalLayerType",void 0),(0,n.Cg)([(0,l.MZ)(L.M6)],W.prototype,"popupEnabled",void 0),(0,n.Cg)([(0,l.MZ)({type:i.A,json:{name:"popupInfo",write:!0}})],W.prototype,"popupTemplate",void 0),(0,n.Cg)([(0,l.MZ)({types:Q.Hg,json:{origins:{service:{name:"layerDefinition.drawingInfo.renderer",write:!1},"web-scene":{types:Q.XJ,name:"layerDefinition.drawingInfo.renderer",write:!0}},name:"layerDefinition.drawingInfo.renderer",write:!0}})],W.prototype,"renderer",null),(0,n.Cg)([(0,l.MZ)(L.PY)],W.prototype,"screenSizePerspectiveEnabled",void 0),(0,n.Cg)([(0,l.MZ)({readOnly:!0})],W.prototype,"source",void 0),(0,n.Cg)([(0,l.MZ)({readOnly:!0,type:p.A,json:{origins:{service:{read:!0}}}})],W.prototype,"spatialReference",void 0),(0,n.Cg)([(0,l.MZ)({type:String,json:{write:{enabled:!0,ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"collection.title"}}}})],W.prototype,"title",void 0),(0,n.Cg)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],W.prototype,"type",void 0),(0,n.Cg)([(0,l.MZ)({type:String,readOnly:!0})],W.prototype,"typeIdField",void 0),(0,n.Cg)([(0,l.MZ)({type:[N.A]})],W.prototype,"types",void 0),(0,n.Cg)([(0,l.MZ)(L.OZ)],W.prototype,"url",void 0),W=(0,n.Cg)([(0,a.$)("esri.layers.OGCFeatureLayer")],W);const V=W},69208:(e,t,r)=>{r.d(t,{d:()=>s});var n=r(31635),i=r(10107),o=(r(44208),r(53966),r(87811),r(40608));const s=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.customParameters=null}};return(0,n.Cg)([(0,i.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],r.prototype,"customParameters",void 0),r=(0,n.Cg)([(0,o.$)("esri.layers.mixins.CustomParametersMixin")],r),r}},73133:(e,t,r)=>{r.d(t,{j:()=>n});const n=(0,r(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},82935:(e,t,r)=>{r.d(t,{B:()=>y,e:()=>f});var n=r(31635),i=r(10107),o=(r(44208),r(53966),r(87811),r(36005)),s=r(40608),l=r(89317),a=r(30524),u=r(96184),p=r(73133),c=r(79677),d=r(10184);const y={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation",layerContainerTypes:l.K}}},f=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const n=r.timeOffset,i=p.j.fromJSON(r.timeOffsetUnits);return n&&i?new d.A({value:n,unit:i}):null}set timeInfo(e){(0,a.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,n.Cg)([(0,i.MZ)({type:c.A,json:{write:!1}})],r.prototype,"timeExtent",void 0),(0,n.Cg)([(0,i.MZ)({type:d.A})],r.prototype,"timeOffset",void 0),(0,n.Cg)([(0,o.w)("service","timeOffset",["timeInfo.exportOptions"])],r.prototype,"readOffset",null),(0,n.Cg)([(0,i.MZ)({value:null,type:u.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],r.prototype,"timeInfo",null),(0,n.Cg)([(0,i.MZ)(y)],r.prototype,"useViewTime",void 0),r=(0,n.Cg)([(0,s.$)("esri.layers.mixins.TemporalLayer")],r),r}},83960:(e,t,r)=>{r.d(t,{X_:()=>s,oW:()=>a,zx:()=>l});var n=r(34727),i=r(83047);const o=96;function s(e,t){const r=t||e.extent,n=e.width,s=(0,i.GA)(r?.spatialReference);return r&&n?r.width/n*s*i.dy*o:0}function l(e,t,r){return function(e,t){return 0===t||(0,n.Sp)(e,t)||e<t}(e,t)&&function(e,t){return 0===t||(0,n.Sp)(e,t)||e>t}(e,r)}function a(e,t){return(0,n.Sp)(e,t)?0:(e||Number.POSITIVE_INFINITY)>(t||Number.POSITIVE_INFINITY)?1:-1}},91218:(e,t,r)=>{r.r(t),r.d(t,{canProjectWithoutEngine:()=>z,initializeProjection:()=>Q,isEqualBaseGCS:()=>q,isLoaded:()=>F,isLoadedOrLoad:()=>b,isLoadedOrLoadFor:()=>Z,load:()=>E,project:()=>D,projectExtent:()=>re,projectMany:()=>U,projectMultipoint:()=>W,projectOrLoad:()=>_,projectOrLoadMany:()=>G,projectPoint:()=>J,projectPolygon:()=>ee,projectPolyline:()=>Y,projectWithZConversion:()=>$,projectWithoutEngine:()=>H,requiresLoad:()=>j,test:()=>k,tryProjectWithZConversion:()=>B,unload:()=>N});var n=r(49186),i=r(74887),o=r(62788),s=r(95488),l=r(51850),a=r(21276),u=r(73941),p=r(5443),c=r(91075),d=r(48526),y=r(86738),f=r(39829),h=r(82799),g=r(16930),m=r(159),v=r(9762),w=r(37539);function C(e,t,r,n,i,o){return M[0]=e,M[1]=t,M[2]=r,(0,v.projectBuffer)(M,n,0,i,o,0)}const M=(0,l.vt)();var I=r(21325),x=r(62815);let S=null,T=null,A=null,R=null,O={};const P=new s.I;function F(){return!!(T?.isLoaded()&&A?.isLoaded()&&R?.isLoaded())}function b(){return!!F()||((0,o.gc)(P),E(),!1)}function Z(e,t){return!e||!t||z(e,t)||b()}function j(e,t){return!z(e,t)&&!F()}async function E(e){null==S&&(S=Promise.all([r.e(3276).then(r.bind(r,83276)).then(e=>(T=e,T.load())),r.e(8377).then(r.bind(r,8377)).then(e=>(A=e,A.load())),r.e(2158).then(r.bind(r,12158)).then(e=>(R=e,R.load()))])),await S,(0,i.Te)(e),P.notify()}function D(e,t,r){return Array.isArray(e)?0===e.length?[]:((0,a.H)(e),U(e,e[0].spatialReference,t,r)):((0,a.f)(e),U([e],e.spatialReference,t,r)[0])}function U(e,t,r,n){if(null==t||null==r)return e;if(z(t,r,n))return e.map(e=>H(e,t,r));if(null==n?.geographicTransformation&&(0,u.jA)(t))return e.map(e=>H(e,t,g.A.WGS84)).map(e=>B(e,r));if(null==n?.geographicTransformation&&(0,u.jA)(r))return e.map(e=>B(e,g.A.WGS84)).map(e=>H(e,g.A.WGS84,r));if(!F())throw new L;if(!n?.geographicTransformation)if(n?.extendedParams)n={...n,geographicTransformation:R.getTransformation(t,r,n.areaOfInterestExtent)||new m.A};else if(!n?.areaOfInterestExtent){const e=function(e,t){return[e.wkid?.toString()??"-1",e.wkt?.toString()??"",e.wkt2?.toString()??"",t.wkid?.toString()??"-1",t.wkt?.toString()??"",t.wkt2?.toString()??""].join()}(t,r);let i=O[e];i||(i=R.getTransformation(t,r)||new m.A,O[e]=i),n={geographicTransformation:i}}return e[0].spatialReference||(e[0].spatialReference=t),e[0]instanceof c.A?T.executeMany(e,r,n):A.executeMany(e,r,n)}function _(e,t){const r=G([e],t);return null!=r.pending?{pending:r.pending,geometry:null}:null!=r.geometries?{pending:null,geometry:r.geometries[0]}:{pending:null,geometry:null}}function G(e,t){if(!F())for(const r of e)if(null!=r&&!(0,I.aI)(r.spatialReference,t)&&(0,I.fn)(r.spatialReference)&&(0,I.fn)(t)&&!z(r.spatialReference,t))return(0,o.gc)(P),{pending:E(),geometries:null};return{pending:null,geometries:e.map(e=>null==e?null:(0,I.aI)(e.spatialReference,t)?e:(0,I.fn)(e.spatialReference)&&(0,I.fn)(t)?B(e,t):null)}}class L extends n.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function N(){S=null,T=null,A=null,R=null,O={}}const k={get loadPromise(){return S}};function B(e,t){try{const r=D(e,t);if(null==r)return null;"xmin"in e&&"xmin"in r&&(r.zmin=e.zmin,r.zmax=e.zmax);const n=(0,x.N)(r.type,e.spatialReference,t);return null!=n&&n(r),r}catch(e){if(!(e instanceof L))throw e;return null}}async function $(e,t,r){const n=e.spatialReference;return null!=n&&null!=t&&await Q(n,t,null,r),B(e,t)}function z(e,t,r){return!(r?.areaOfInterestExtent||r?.extendedParams||r?.geographicTransformation)&&(!!(0,I.aI)(e,t)||(0,I.fn)(e)&&(0,I.fn)(t)&&!!(0,w.jd)(e,t))}function q(e,t){if((0,I.aI)(e,t))return!0;if(!(0,I.fn)(e)||!(0,I.fn)(t))return!1;const r=(0,I.oT)(e)||(0,I.K8)(e)||(0,I.x1)(e),n=(0,I.oT)(t)||(0,I.K8)(t)||(0,I.x1)(t);return r&&n}async function Q(e,t,r,n){if(F())return(0,i.NO)(n);if(Array.isArray(e)){for(const{source:t,dest:r,options:i}of e)if(t&&r&&!z(t,r,i))return E(n)}else if(e&&t&&!z(e,t,r))return E(n);return(0,i.NO)(n)}function H(e,t,r){return e?"x"in e?K(e,t,new y.A,r,0):"xmin"in e?ne(e,t,new p.A,r,0):"rings"in e?te(e,t,new f.A,r,0):"paths"in e?X(e,t,new h.A,r,0):"points"in e?V(e,t,new d.A,r,0):null:null}function J(e,t,r=t.spatialReference,n=0){return null!=r&&null!=e.spatialReference&&null!=K(e,e.spatialReference,t,r,n)}function K(e,t,r,n,i){oe[0]=e.x,oe[1]=e.y;const o=e.z;return oe[2]=void 0!==o?o:i,(0,v.projectBuffer)(oe,t,0,oe,n,0)?(r.x=oe[0],r.y=oe[1],r.spatialReference=n,void 0!==o||(0,u.xP)(n)?(r.z=oe[2],r.hasZ=!0):(r.z=void 0,r.hasZ=!1),void 0===e.m?(r.m=void 0,r.hasM=!1):(r.m=e.m,r.hasM=!0),r):null}function W(e,t,r=t.spatialReference,n=0){return null!=e.spatialReference&&null!=r&&null!=V(e,e.spatialReference,t,r,n)}function V(e,t,r,n,i){const{points:o,hasZ:s,hasM:l}=e,a=[],p=o.length,c=[];for(const e of o)c.push(e[0],e[1],s?e[2]:i);if(!(0,v.projectBuffer)(c,t,0,c,n,0,p))return null;const d=s||(0,u.xP)(n);for(let e=0;e<p;++e){const t=3*e,r=c[t],n=c[t+1];d&&l?a.push([r,n,c[t+2],o[e][3]]):d?a.push([r,n,c[t+2]]):l?a.push([r,n,o[e][2]]):a.push([r,n])}return r.points=a,r.spatialReference=n,r.hasZ=s,r.hasM=l,r}function Y(e,t,r=t.spatialReference,n=0){return null!=e.spatialReference&&null!=r&&null!=X(e,e.spatialReference,t,r,n)}function X(e,t,r,n,i){const{paths:o,hasZ:s,hasM:l}=e,a=[];if(!ie(o,s??!1,l??!1,t,a,n,i))return null;const p=s||(0,u.xP)(n);return r.paths=a,r.spatialReference=n,r.hasZ=p,r.hasM=l,r}function ee(e,t,r=t.spatialReference,n=0){return null!=e.spatialReference&&null!=r&&null!=te(e,e.spatialReference,t,r,n)}function te(e,t,r,n,i){const{rings:o,hasZ:s,hasM:l}=e,a=[];if(!ie(o,s??!1,l??!1,t,a,n,i))return null;const p=s||(0,u.xP)(n);return r.rings=a,r.spatialReference=n,r.hasZ=p,r.hasM=l,r}function re(e,t,r=t.spatialReference,n=0){return null!=e.spatialReference&&null!=r&&null!=ne(e,e.spatialReference,t,r,n)}function ne(e,t,r,n,i){const{xmin:o,ymin:s,xmax:l,ymax:a,hasZ:p,hasM:c}=e;if(!C(o,s,p?e.zmin:i,t,oe,n))return null;const d=p||(0,u.xP)(n);return r.xmin=oe[0],r.ymin=oe[1],d&&(r.zmin=oe[2]),C(l,a,p?e.zmax:i,t,oe,n)?(r.xmax=oe[0],r.ymax=oe[1],d&&(r.zmax=oe[2]),c&&(r.mmin=e.mmin,r.mmax=e.mmax),r.spatialReference=n,r):null}function ie(e,t,r,n,i,o,s=0){const l=new Array;for(const r of e)for(const e of r)l.push(e[0],e[1],t?e[2]:s);if(!(0,v.projectBuffer)(l,n,0,l,o,0))return!1;let a=0;i.length=0;const p=t||(0,u.xP)(o);for(const t of e){const e=new Array;for(const n of t)p&&r?e.push([l[a++],l[a++],l[a++],n[3]]):p?e.push([l[a++],l[a++],l[a++]]):r?(e.push([l[a++],l[a++],n[2]]),a++):(e.push([l[a++],l[a++]]),a++);i.push(e)}return!0}const oe=(0,l.vt)()},91880:(e,t,r)=>{r.d(t,{A:()=>p});var n,i=r(31635),o=r(66552),s=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(40608));const u=new o.J({asc:"ascending",desc:"descending"});let p=class extends s.o{static{n=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new n({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,i.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],p.prototype,"field",void 0),(0,i.Cg)([(0,l.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],p.prototype,"valueExpression",void 0),(0,i.Cg)([(0,l.MZ)({type:u.apiValues,json:{type:u.jsonValues,read:u.read,write:u.write}})],p.prototype,"order",void 0),p=n=(0,i.Cg)([(0,a.$)("esri.layers.support.OrderByInfo")],p)},96184:(e,t,r)=>{r.d(t,{A:()=>f});var n=r(31635),i=r(69540),o=r(25482),s=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),a=r(40608),u=r(43937),p=r(79677),c=r(10184),d=r(56400);function y(e,t){return c.A.fromJSON({value:e,unit:t})}let f=class extends((0,i.OU)(o.o)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0,this.stops=null}readFullTimeExtent(e,t){return t.timeExtent&&Array.isArray(t.timeExtent)&&2===t.timeExtent.length?p.A.fromArray(t.timeExtent):null}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=e.toArray():t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?y(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?y(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,n.Cg)([(0,s.MZ)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],f.prototype,"cumulative",void 0),(0,n.Cg)([(0,s.MZ)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],f.prototype,"endField",void 0),(0,n.Cg)([(0,s.MZ)({type:p.A,json:{write:{enabled:!0,allowNull:!0}}})],f.prototype,"fullTimeExtent",void 0),(0,n.Cg)([(0,l.w)("fullTimeExtent",["timeExtent"])],f.prototype,"readFullTimeExtent",null),(0,n.Cg)([(0,u.K)("fullTimeExtent")],f.prototype,"writeFullTimeExtent",null),(0,n.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"hasLiveData",void 0),(0,n.Cg)([(0,s.MZ)({type:c.A,json:{write:{enabled:!0,allowNull:!0}}})],f.prototype,"interval",void 0),(0,n.Cg)([(0,l.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],f.prototype,"readInterval",null),(0,n.Cg)([(0,u.K)("interval")],f.prototype,"writeInterval",null),(0,n.Cg)([(0,s.MZ)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],f.prototype,"startField",void 0),(0,n.Cg)([(0,s.MZ)((0,d.P6)("timeReference",!0))],f.prototype,"timeZone",void 0),(0,n.Cg)([(0,s.MZ)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],f.prototype,"trackIdField",void 0),(0,n.Cg)([(0,s.MZ)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],f.prototype,"useTime",void 0),(0,n.Cg)([(0,s.MZ)({type:[Date],json:{read:!1}})],f.prototype,"stops",void 0),f=(0,n.Cg)([(0,a.$)("esri.layers.support.TimeInfo")],f)},99157:(e,t,r)=>{r.d(t,{A:()=>a});var n,i=r(31635),o=r(65008),s=r(10107),l=(r(44208),r(53966),r(87811),r(40608));let a=n=class extends o.A{constructor(e){super(e),this.isInverse=!1,this.wkt=null,this.wkid=null}getInverse(){return new n({isInverse:!this.isInverse,wkid:this.wkid,wkt:this.wkt})}};(0,i.Cg)([(0,s.MZ)()],a.prototype,"isInverse",void 0),(0,i.Cg)([(0,s.MZ)()],a.prototype,"wkt",void 0),(0,i.Cg)([(0,s.MZ)()],a.prototype,"wkid",void 0),a=n=(0,i.Cg)([(0,l.$)("esri.geometry.operators.support.GeographicTransformationStep")],a)},99352:(e,t,r)=>{r.d(t,{F:()=>n,P:()=>i});const n={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCentroidOnDegeneratedQuantizedGeometry:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,maxUniqueIDCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},i={supportsDate:!0,supportsFixedInterval:!0,supportsAutoInterval:!0,supportsFixedBoundaries:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!0,supportedStatistics:{count:!0,sum:!0,avg:!0,var:!0,stddev:!0,min:!0,max:!0,percentileContinuous:!0,percentileDiscrete:!0,envelope:!0,centroid:!0,convexHull:!0},supportedNormalizationTypes:{field:!0,log:!0,naturalLog:!0,percentOfTotal:!0,squareRoot:!0}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5363],{41560:(e,t,n)=>{n.d(t,{Ch:()=>s,mW:()=>i});var r=n(34727),o=n(39516);function i(e,t){return{...t,filterMode:e.mode}}function s(e,t,n){const i=function(e){if("manual"===u(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:n,maxScale:r}of e.filters)t[0]=Math.max(t[0],c(n)),t[1]=Math.min(t[1],p(r));return t}(e);if(i&&((0,r.gg)(t,i[0])||(0,r.ZH)(n,i[1])))return"";const s=Array.from(a(e,t,n)),l=function(e,t,n){if(0===e.length)return!0;const o=c(e.at(0)?.minScale),i=p(e.at(-1)?.maxScale);if((0,r.ZH)(o,t)||(0,r.gg)(i,n))return!0;for(let t=0;t<e.length-1;t++){const n=e[t],o=e[t+1];if((0,r.ZH)(c(o.minScale),p(n.maxScale)))return!0}return!1}(s,t,n)?"1=1":s.map(e=>e.where||"1=1").reduce((e,t)=>(0,o.IW)(e,t),"");return l&&"1=1"!==l?l:""}function*a(e,t,n){if("manual"===u(e)){const t=e.filters.find(t=>t.id===e.activeFilterId);t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(const r of e.filters)l(r.minScale,r.maxScale,t,n)&&(yield r)}}function l(e,t,n,o){return e=c(e),n=c(n),t=p(t),!(!(0,r.Sp)(n,e)&&(o??n)>e||(0,r.Hx)(t,n)||void 0!==o&&(0,r.Sp)(o,e))}function u(e){return"mode"in e?e.mode:e.filterMode}function c(e){return e||Number.POSITIVE_INFINITY}function p(e){return e||0}},46140:(e,t,n)=>{n.d(t,{R:()=>o});var r=n(49186);let o=class e{constructor(e,t,n=""){this.major=e,this.minor=t,this._context=n}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",n=this._context&&this._context+" ";throw new r.A(t+"unsupported-version",`Required major ${n}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new e(this.major,this.minor,this._context)}static parse(t,n=""){const[o,i]=t.split("."),s=/^\s*\d+\s*$/;if(!o?.match||!s.test(o))throw new r.A((n&&n+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!i?.match||!s.test(i))throw new r.A((n&&n+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const a=parseInt(o,10),l=parseInt(i,10);return new e(a,l,n)}}},64714:(e,t,n)=>{n.d(t,{F0:()=>a,Vx:()=>c,e2:()=>f,f:()=>d});var r=n(44208),o=n(4718),i=n(99352),s=n(93470);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?s.Cb:"esriGeometryPolyline"===e?s.yM:s.WR}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function c(e,t){if((0,r.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let n=`this${p(t)} = null;`;for(const t in e)n+=`this${p(t)} = ${JSON.stringify(e[t])};`;const r=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${n};\n }\n }\n `)();return()=>new r}catch(n){return()=>({[t]:null,...e})}}function p(e){return l.test(e)?`.${e}`:`["${e}"]`}function f(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,o.o8)(e)}}]}function d(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:i.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:i.P,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},67482:(e,t,n)=>{function r(e){return null!=a(e)||null!=s(e)}function o(e){return l.test(e)}function i(e){return a(e)??s(e)}function s(e){const t=new Date(e);return function(e,t){if(Number.isNaN(e.getTime()))return!1;let n=!0;if(c&&/\d+\W*$/.test(t)){const e=t.match(/[a-zA-Z]{2,}/);if(e){let t=!1,r=0;for(;!t&&r<=e.length;)t=!u.test(e[r]),r++;n=!t}}return n}(t,e)?Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset():null}function a(e){const t=l.exec(e);if(!t?.groups)return null;const n=t.groups,r=+n.year,o=+n.month-1,i=+n.day,s=+(n.hours??"0"),a=+(n.minutes??"0"),u=+(n.seconds??"0");if(s>23)return null;if(a>59)return null;if(u>59)return null;const c=n.ms??"0",p=c?+c.padEnd(3,"0").slice(0,3):0;let f;if(n.isUTC||!n.offsetSign)f=Date.UTC(r,o,i,s,a,u,p);else{const e=+n.offsetHours,t=+n.offsetMinutes;f=6e4*("+"===n.offsetSign?-1:1)*(60*e+t)+Date.UTC(r,o,i,s,a,u,p)}return Number.isNaN(f)?null:f}n.d(t,{Br:()=>o,Cq:()=>r,_U:()=>i});const l=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,u=/^((jan(uary)?)|(feb(ruary)?)|(mar(ch)?)|(apr(il)?)|(may)|(jun(e)?)|(jul(y)?)|(aug(ust)?)|(sep(tember)?)|(oct(ober)?)|(nov(ember)?)|(dec(ember)?)|(am)|(pm)|(gmt)|(utc))$/i,c=!Number.isNaN(new Date("technology 10").getTime())},75321:(e,t,n)=>{n.d(t,{GA:()=>x,GL:()=>F,I:()=>k,J0:()=>N,Ki:()=>v,Px:()=>j,QE:()=>A,bV:()=>S,bW:()=>P,vJ:()=>T});var r=n(78888),o=n(49186),i=n(53966),s=n(84952),a=n(16930),l=n(21325),u=n(28735),c=n(90708),p=n(58512),f=n(85113),d=n(64714),m=n(82832),y=n(95466),g=n(98453),h=n(98623);const w=()=>i.A.getLogger("esri.layers.ogc.ogcFeatureUtils"),b="startindex",I=new Set([b,"offset"]),T="http://www.opengis.net/def/crs/",A=`${T}OGC/1.3/CRS84`;async function F(e,t,n={},i=5){const{links:a}=e,l=G(a,"items","application/geo+json")||G(a,"http://www.opengis.net/def/rel/ogc/1.0/items","application/geo+json");if(null==l)throw new o.A("ogc-feature-layer:missing-items-page","Missing items url");const{apiKey:u,customParameters:c,signal:p}=n,m=(0,s.s2)(l.href,e.landingPage.url),I={limit:i,...c,token:u},T=(0,s.a6)(m,I),{data:A}=await(0,r.A)(T,{signal:p,headers:{accept:"application/geo+json"}}),F=E(T,i,A.links)??b;(0,f.sO)(A);const S=(0,f.BM)(A,{geometryType:t.geometryType}),j=t.fields||S.fields||[],v=null!=t.hasZ?t.hasZ:S.hasZ,x=S.geometryType,N=t.objectIdField||S.objectIdFieldName||"OBJECTID";let P=t.timeInfo;const k=j.find(({name:e})=>e===N);if(k)k.editable=!1,k.nullable=!1;else{if(!S.objectIdFieldType)throw new o.A("ogc-feature-layer:missing-feature-id","Collection geojson require a feature id as a unique identifier");j.unshift({name:N,alias:N,type:"number"===S.objectIdFieldType?"esriFieldTypeOID":"esriFieldTypeString",editable:!1,nullable:!1})}if(N!==S.objectIdFieldName){const e=j.find(({name:e})=>e===S.objectIdFieldName);e&&(e.type="esriFieldTypeInteger")}j===S.fields&&S.unknownFields.length>0&&w().warn({name:"ogc-feature-layer:unknown-field-types",message:"Some fields types couldn't be inferred from the features and were dropped",details:{unknownFields:S.unknownFields}});for(const e of j){if(null==e.name&&(e.name=e.alias),null==e.alias&&(e.alias=e.name),"esriFieldTypeOID"!==e.type&&"esriFieldTypeGlobalID"!==e.type&&(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable),!e.name)throw new o.A("ogc-feature-layer:invalid-field-name","field name is missing",{field:e});if(!g.m.jsonValues.includes(e.type))throw new o.A("ogc-feature-layer:invalid-field-type",`invalid type for field "${e.name}"`,{field:e})}if(P){const e=new y.A(j);if(P.startTimeField){const t=e.get(P.startTimeField);t?(P.startTimeField=t.name,t.type="esriFieldTypeDate"):P.startTimeField=null}if(P.endTimeField){const t=e.get(P.endTimeField);t?(P.endTimeField=t.name,t.type="esriFieldTypeDate"):P.endTimeField=null}if(P.trackIdField){const t=e.get(P.trackIdField);t?P.trackIdField=t.name:(P.trackIdField=null,w().warn({name:"ogc-feature-layer:invalid-timeInfo-trackIdField",message:"trackIdField is missing",details:{timeInfo:P}}))}P.timeReference||={timeZoneIANA:h.n$},P.startTimeField||P.endTimeField||(w().warn({name:"ogc-feature-layer:invalid-timeInfo",message:"startTimeField and endTimeField are missing",details:{timeInfo:P}}),P=void 0)}return{drawingInfo:x?(0,d.F0)(x):null,extent:O(e),geometryType:x,fields:j,hasZ:!!v,objectIdField:N,paginationParameter:F,timeInfo:P}}async function S(e,t={}){const{links:n,url:i}=e,a=G(n,"data","application/json")||G(n,"http://www.opengis.net/def/rel/ogc/1.0/data","application/json");if(null==a)throw new o.A("ogc-feature-layer:missing-collections-page","Missing collections url");const{apiKey:l,customParameters:u,signal:c}=t,p=(0,s.s2)(a.href,i),{data:f}=await(0,r.A)(p,{signal:c,headers:{accept:"application/json"},query:{...u,token:l}});for(const t of f.collections)t.landingPage=e;return f}async function j(e,t={}){const{links:n,url:i}=e,a=G(n,"conformance","application/json")||G(n,"http://www.opengis.net/def/rel/ogc/1.0/conformance","application/json");if(null==a)throw new o.A("ogc-feature-layer:missing-conformance-page","Missing conformance url");const{apiKey:l,customParameters:u,signal:c}=t,p=(0,s.s2)(a.href,i),{data:f}=await(0,r.A)(p,{signal:c,headers:{accept:"application/json"},query:{...u,token:l}});return f}async function v(e,t={}){const{apiKey:n,customParameters:o,signal:i}=t,{data:s}=await(0,r.A)(e,{signal:i,headers:{accept:"application/json"},query:{...o,token:n}});return s.url=e,s}async function x(e,t={}){const{links:n,url:o}=e,i=G(n,"service-desc","application/vnd.oai.openapi+json;version=3.0");if(null==i)return w().warn("ogc-feature-layer:missing-openapi-page","The OGC API-Features server does not have an OpenAPI page."),null;const{apiKey:a,customParameters:l,signal:u}=t,c=(0,s.s2)(i.href,o),{data:p}=await(0,r.A)(c,{signal:u,headers:{accept:"application/vnd.oai.openapi+json;version=3.0"},query:{...l,token:a}});return p}function N(e){const t=/^http:\/\/www\.opengis.net\/def\/crs\/(?<authority>.*)\/(?<version>.*)\/(?<code>.*)$/i.exec(e),n=t?.groups;if(!n)return null;const{authority:r,code:o}=n;switch(r.toLowerCase()){case"ogc":switch(o.toLowerCase()){case"crs27":return a.A.GCS_NAD_1927.wkid;case"crs83":return 4269;case"crs84":case"crs84h":return a.A.WGS84.wkid;default:return null}case"esri":case"epsg":{const e=Number.parseInt(o,10);return Number.isNaN(e)?null:e}default:return null}}async function P(e,t,n){const r=await k(e,t,n);return(0,c.ZF)(r)}async function k(e,t,n){const{collection:{links:i,landingPage:{url:d}},layerDefinition:g,maxRecordCount:h,queryParameters:{apiKey:w,customParameters:b},spatialReference:I,supportedCrs:T}=e,A=G(i,"items","application/geo+json")||G(i,"http://www.opengis.net/def/rel/ogc/1.0/items","application/geo+json");if(null==A)throw new o.A("ogc-feature-layer:missing-items-page","Missing items url");const{geometry:F,num:S,start:j,timeExtent:v,where:x}=t;if(t.objectIds)throw new o.A("ogc-feature-layer:query-by-objectids-not-supported","Queries with object ids are not supported");const N=a.A.fromJSON(I),P=t.outSpatialReference??N,k=P.isWGS84?null:C(P,T),$=M(F,T),O=function(e){if(null==e)return null;const{start:t,end:n}=e;return`${null!=t?t.toISOString():".."}/${null!=n?n.toISOString():".."}`}(v),E=null!=(J=x)&&J&&"1=1"!==J?J:null,R=S??(null==j?h:10),q=0===j?void 0:j,{fields:D,geometryType:B,hasZ:W,objectIdField:Z,paginationParameter:_}=g,L=(0,s.s2)(A.href,d),{data:U}=await(0,r.A)(L,{...n,query:{...b,...$,crs:k,datetime:O,query:E,limit:R,[_]:q,token:w},headers:{accept:"application/geo+json"}}),V=(0,f.bd)(U,{geometryType:B,hasZ:W,objectIdField:Z}),z=V.length===R&&!!G(U.links??[],"next","application/geo+json"),H=new y.A(D);var J;for(const e of V){const t={};(0,m.MB)(H,t,e.attributes,!0);for(const e of H.fields)e.nullable&&!(e.name in t)&&(t[e.name]=null);t[Z]=e.attributes[Z],e.attributes=t}if(!k&&P.isWebMercator)for(const e of V)if(null!=e.geometry&&null!=B){const t=(0,c.zv)(e.geometry,B,W,!1);t.spatialReference=a.A.WGS84,e.geometry=(0,c.Ux)((0,u.Cv)(t,P))}for(const e of V)e.objectId=e.attributes[Z];const K=k||!k&&P.isWebMercator?P.toJSON():l.KK,Q=new p.A;return Q.exceededTransferLimit=z,Q.features=V,Q.fields=D,Q.geometryType=B,Q.hasZ=W,Q.spatialReference=K,Q}function C(e,t){const{isWebMercator:n,wkid:r}=e;if(!r)return null;const o=n?t[3857]??t[102100]??t[102113]??t[900913]:t[e.wkid];return o?`${T}${o}`:null}function $(e){if(null==e)return"";const{xmin:t,ymin:n,xmax:r,ymax:o}=e;return`${t},${n},${r},${o}`}function M(e,t){if(!function(e){return null!=e&&"extent"===e.type}(e))return null;const{spatialReference:n}=e;if(!n||n.isWGS84)return{bbox:$(e)};const r=C(n,t);return null!=r?{bbox:$(e),"bbox-crs":r}:n.isWebMercator?{bbox:$((0,u.Cv)(e,a.A.WGS84))}:null}function O(e){const t=e.extent?.spatial;if(!t)return null;const n=t.bbox[0],r=4===n.length,[o,i]=n,s=r?void 0:n[2];return{xmin:o,ymin:i,xmax:r?n[2]:n[3],ymax:r?n[3]:n[4],zmin:s,zmax:r?void 0:n[5],spatialReference:a.A.WGS84.toJSON()}}function G(e,t,n){return e.find(({rel:e,type:r})=>e===t&&r===n)??e.find(({rel:e,type:n})=>e===t&&!n)}function E(e,t,n){if(!n)return;const r=G(n,"next","application/geo+json"),o=(0,s.An)(r?.href)?.query;if(!o)return;const i=(0,s.An)(e).query,a=Object.keys(i??{}),l=Object.entries(o).filter(([e])=>!a.includes(e)).find(([e,n])=>I.has(e.toLowerCase())&&Number.parseInt(n,10)===t),u=l?.[0];return u}},82832:(e,t,n)=>{n.d(t,{$1:()=>g,CR:()=>y,MB:()=>f,PC:()=>h,Yx:()=>l,bP:()=>c});var r=n(67482),o=n(21325),i=n(30524);class s{constructor(e){this.description=e,this.code=null}}class a{constructor(e){this.globalId=null,this.objectId=null,this.success=!1,this.uniqueId=null,this.error=new s(e)}}function l(e){return new a(e)}class u{constructor(e){this.globalId=null,this.success=!0,this.objectId=this.uniqueId=e}}function c(e){return new u(e)}const p=new Set;function f(e,t,n,r=!1){p.clear();for(const o in n){const s=e.get(o);if(!s)continue;const a=d(s,n[o]);if(p.add(s.name),s&&(r||s.editable)){const e=(0,i.CJ)(s,a);if(e)return l((0,i.uo)(e,s,a));t[s.name]=a}}for(const t of e.requiredFields??[])if(!p.has(t.name))return l(`missing required field "${t.name}"`);return null}function d(e,t){let n=t;return(0,i.WA)(e)&&"string"==typeof t?n=parseFloat(t):(0,i.yM)(e)&&null!=t&&"string"!=typeof t?n=String(t):(0,i.vE)(e)&&"string"==typeof t&&(n=(0,r._U)(t)),(0,i.WX)(n)}let m;function y(e,t){if(!e||!(0,o.fn)(t))return e;if("rings"in e||"paths"in e){if(null==m)throw new TypeError("geometry engine not loaded");return m.simplify(t,e)}return e}async function g(e,t){!(0,o.fn)(e)||"esriGeometryPolygon"!==t&&"esriGeometryPolyline"!==t||await async function(){return null==m&&(m=await Promise.all([n.e(3209),n.e(7559)]).then(n.bind(n,47559))),m}()}const h={supportsAutoIntervalBin:!0,supportsFixedIntervalBin:!0,supportsFixedBoundariesBin:!0,supportsDateBin:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsNormalization:!0,supportedStatisticTypes:["COUNT","SUM","AVG","VAR","STDDEV","MIN","MAX","PERCENTILE_CONT","PERCENTILE_DISC","CentroidAggregate","EnvelopeAggregate","ConvexHullAggregate"],supportedNormalizationTypes:["field","log","naturalLog","percentOfTotal","squareRoot"]}},85113:(e,t,n)=>{n.d(t,{BM:()=>S,bd:()=>j,sO:()=>F,xD:()=>c});var r=n(67482),o=n(49186),i=n(21325),s=n(43334),a=n(92722),l=n(30524);const u={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function c(e){return u[e]}function*p(e){switch(e.type){case"Feature":yield e;break;case"FeatureCollection":for(const t of e.features)t&&(yield t)}}function*f(e){if(e)switch(e.type){case"Point":yield e.coordinates;break;case"LineString":case"MultiPoint":yield*e.coordinates;break;case"MultiLineString":case"Polygon":for(const t of e.coordinates)yield*t;break;case"MultiPolygon":for(const t of e.coordinates)for(const e of t)yield*e}}function d(e){for(const t of e)if(t.length>2)return!0;return!1}function m(e){let t=0;for(let n=0;n<e.length;n++){const r=e[n],o=e[(n+1)%e.length];t+=r[0]*o[1]-o[0]*r[1]}return t<=0}function y(e){const t=e[0],n=e[e.length-1];return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]||e.push(t),e}function g(e,t,n){switch(t.type){case"LineString":case"MultiPoint":return function(e,t,n){return b(e,t.coordinates,n),e}(e,t,n);case"MultiLineString":return function(e,t,n){for(const r of t.coordinates)b(e,r,n);return e}(e,t,n);case"MultiPolygon":return function(e,t,n){for(const r of t.coordinates){h(e,r[0],n);for(let t=1;t<r.length;t++)w(e,r[t],n)}return e}(e,t,n);case"Point":return function(e,t,n){return T(e,t.coordinates,n),e}(e,t,n);case"Polygon":return function(e,t,n){const r=t.coordinates;h(e,r[0],n);for(let t=1;t<r.length;t++)w(e,r[t],n);return e}(e,t,n)}}function h(e,t,n){const r=y(t);!function(e){return!m(e)}(r)?b(e,r,n):I(e,r,n)}function w(e,t,n){const r=y(t);!function(e){return m(e)}(r)?b(e,r,n):I(e,r,n)}function b(e,t,n){for(const r of t)T(e,r,n);e.lengths.push(t.length)}function I(e,t,n){for(let r=t.length-1;r>=0;r--)T(e,t[r],n);e.lengths.push(t.length)}function T(e,t,n){const[r,o,i]=t;e.coords.push(r,o),n.hasZ&&e.coords.push(i||0)}function A(e){switch(typeof e){case"string":return(0,r.Br)(e)?"esriFieldTypeDate":"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function F(e,t=4326){if(!e)throw new o.A("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==e.type&&"FeatureCollection"!==e.type)throw new o.A("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:e});const{crs:n}=e;if(!n)return;const r="string"==typeof n?n:"name"===n.type?n.properties.name:"EPSG"===n.type?n.properties.code:null,s=(0,i.oT)({wkid:t})?new RegExp(".*(CRS84H?|4326)$","i"):new RegExp(`.*(${t})$`,"i");if(!r||!s.test(r))throw new o.A("geojson:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:n})}function S(e,t={}){const n=[],r=new Set,o=new Set;let i,s=!1,a=null,u=!1,{geometryType:m=null}=t;for(const t of p(e)){const{geometry:e,properties:p,id:y}=t;if((!e||(m||(m=c(e.type)),c(e.type)===m))&&(s||(s=d(f(e))),u||(u=null!=y,u&&(i=typeof y,p&&(a=Object.keys(p).filter(e=>p[e]===y)))),p&&a&&u&&null!=y&&(a.length>1?a=a.filter(e=>p[e]===y):1===a.length&&(a=p[a[0]]===y?a:[])),p))for(const e in p){if(r.has(e))continue;const t=A(p[e]);if("unknown"===t){o.add(e);continue}o.delete(e),r.add(e);const i=(0,l.rS)(e);i&&n.push({name:i,alias:e,type:t})}}const y=(0,l.rS)(1===a?.length&&a[0]||null)??void 0;if(y)for(const e of n)if(e.name===y&&(0,l.WA)(e)){e.type="esriFieldTypeOID";break}return{fields:n,geometryType:m,hasZ:s,objectIdFieldName:y,objectIdFieldType:i,unknownFields:Array.from(o)}}function j(e,t){return Array.from(function*(e,t={}){const{geometryType:n,objectIdField:r}=t;for(const o of e){const{geometry:e,properties:i,id:l}=o;if(e&&c(e.type)!==n)continue;const u=i||{};let p;r&&(p=u[r],null==l||p||(u[r]=p=l));const f=new s.Om(e?g(new a.A,e,t):null,u,null,p);yield f}}(p(e),t))}}}]);