@arcgis/core 5.0.0-next.33 → 5.0.0-next.35

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 (220) hide show
  1. package/applications/Components/SketchTooltipControls.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/{f8a5b26e0231244972d8.js → 032444974011118127d7.js} +1 -1
  4. package/assets/esri/core/workers/chunks/{9252854b512237b6a0ef.js → 0446562aee0639c61485.js} +1 -1
  5. package/assets/esri/core/workers/chunks/15c1a48e8cd2a8882d85.js +1 -0
  6. package/assets/esri/core/workers/chunks/{1dd867fa7c58c06b79ea.js → 1bacdd17e199e22b5cd1.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{b56c07c0b43cb1999070.js → 1fa55d4c4b092a98bdd7.js} +1 -1
  8. package/assets/esri/core/workers/chunks/234ffd08c2be03a0b9fe.js +1 -0
  9. package/assets/esri/core/workers/chunks/32d32d3c3b38a215d20d.js +1 -0
  10. package/assets/esri/core/workers/chunks/{e7f4d135ef9665de1468.js → 33431e8131f6017de2f9.js} +1 -1
  11. package/assets/esri/core/workers/chunks/36130910ba141f34531b.js +1 -0
  12. package/assets/esri/core/workers/chunks/{096e5f94eaa226814569.js → 4356274cfa477eb6d749.js} +1 -1
  13. package/assets/esri/core/workers/chunks/48d1a443b324753921de.js +1 -0
  14. package/assets/esri/core/workers/chunks/{3c1e50c3505e5e7c946a.js → 4d5591c1b4ef37075921.js} +1 -1
  15. package/assets/esri/core/workers/chunks/4f4d51181ae7db9fbe6d.js +1 -0
  16. package/assets/esri/core/workers/chunks/{d21ae4980741be98f948.js → 59889855d23baec1adf9.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{fee942ef802a162e0248.js → 5dc0d853c21ccb6054c7.js} +1 -1
  18. package/assets/esri/core/workers/chunks/5f9e64f00329cb646f0c.js +1 -0
  19. package/assets/esri/core/workers/chunks/{d786b17cc9062b1450ac.js → 726a797f5df7eeee0b3d.js} +1 -1
  20. package/assets/esri/core/workers/chunks/768d9b6eaba7bfa18dde.js +1 -0
  21. package/assets/esri/core/workers/chunks/{a4b7ba8aec109beb5b4d.js → 7d3e665613927904ba4f.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{a2cee5ac0d4df0108425.js → 82cc758bddd9f8397b9f.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{433d249c35c56bf15806.js → 97650ee3d0eecb69ccbb.js} +3 -3
  24. package/assets/esri/core/workers/chunks/{866a608d489bf56bc371.js → a372d9af43ade7c6314c.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{add17e95f47e6904bf6d.js → a59dab47a58695c639da.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{f441fc74451330384fb0.js → abb05a903440d97a6a74.js} +1 -1
  27. package/assets/esri/core/workers/chunks/ad138b989c2c7a1168ac.js +1 -0
  28. package/assets/esri/core/workers/chunks/{5baef729beef0199c3d9.js → b536fdb655ad293d9024.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{1d4ea8db272655c0608c.js → c7c721de93bc8688e13c.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{446f76356fc116204ec3.js → c8d2cce4a426c72ab173.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{14feb12826e0c8ba7fb8.js → d14bd320f72d8e8a0ad8.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{4b6a44c6265c8959abd8.js → d3db7244fac7398cc700.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{7aa730e5ac7b268e3c98.js → dd34d56caafa38d4b8e4.js} +1 -1
  34. package/assets/esri/core/workers/chunks/ef5b13ee3362763c1096.js +1 -0
  35. package/assets/esri/core/workers/chunks/{2a17991923abc64c84c6.js → f55328aabf84770c8e6a.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{e32fc0b2c6530d28ce85.js → fa01d1813fa78034526e.js} +1 -1
  37. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  38. package/chunks/ComponentShader.glsl.js +19 -21
  39. package/chunks/Laserlines.glsl.js +1 -1
  40. package/chunks/Terrain.glsl.js +9 -11
  41. package/chunks/boundedPlane.js +1 -1
  42. package/chunks/cameraUtilsSpherical.js +1 -1
  43. package/chunks/lyr3DMain.js +1 -1
  44. package/chunks/vec32.js +1 -1
  45. package/config.js +1 -1
  46. package/core/deprecate.js +1 -1
  47. package/core/has.js +1 -1
  48. package/core/libs/gl-matrix-2/math/quat.js +1 -1
  49. package/core/libs/gl-matrix-2/math/vec3.js +1 -1
  50. package/core/workers/registry.js +1 -1
  51. package/geometry/geometryEngineJSON.js +1 -1
  52. package/geometry/operators/integrateOperator.js +1 -1
  53. package/geometry/support/buffer/BufferView.js +1 -1
  54. package/geometry/support/coordsUtils.js +1 -1
  55. package/geometry/support/curves/curveUtils.js +1 -1
  56. package/geometry/support/curves/interpolateCurve.js +5 -0
  57. package/geometry/support/lineSegment.js +1 -1
  58. package/geometry/support/meshUtils/Metadata.js +1 -1
  59. package/geometry/support/meshUtils/merge.js +1 -1
  60. package/geometry/support/sphere.js +1 -1
  61. package/geometry/support/vector.js +1 -1
  62. package/interfaces.d.ts +71 -445
  63. package/intl/locale.js +1 -1
  64. package/kernel.js +1 -1
  65. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  66. package/layers/SceneLayer.js +1 -1
  67. package/layers/VoxelWasmPerSceneView.js +1 -1
  68. package/layers/graphics/data/QueryEngine.js +1 -1
  69. package/layers/graphics/data/QueryEngineResult.js +1 -1
  70. package/layers/graphics/sources/support/uploadAssets.js +1 -1
  71. package/layers/orientedImagery/transformations/worldToImage.js +1 -1
  72. package/layers/support/layerOriginUtils.js +1 -1
  73. package/layers/voxel/VoxelVolume.js +1 -1
  74. package/package.json +3 -3
  75. package/request/config.js +1 -1
  76. package/request/process.js +1 -1
  77. package/smartMapping/statistics/support/statsWorker.js +1 -1
  78. package/support/revision.js +1 -1
  79. package/views/2d/interactive/SegmentLabels2D.js +5 -0
  80. package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
  81. package/views/3d/analysis/Dimension/lengthDimensionConstraintUtils.js +1 -1
  82. package/views/3d/analysis/Dimension/lengthDimensionUtils.js +1 -1
  83. package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
  84. package/views/3d/analysis/LineOfSight/LineOfSightIntersectionResult.js +1 -1
  85. package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
  86. package/views/3d/analysis/Viewshed/ViewshedScaleOrientManipulation.js +1 -1
  87. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  88. package/views/3d/analysis/Viewshed/ViewshedSubVisualization.js +1 -1
  89. package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
  90. package/views/3d/animation/pointToPoint/Camera.js +1 -1
  91. package/views/3d/camera/constraintUtils/distance.js +1 -1
  92. package/views/3d/camera/constraintUtils/tilt.js +1 -1
  93. package/views/3d/environment/ChapmanAtmosphere.js +1 -1
  94. package/views/3d/environment/CloudsParameters.js +1 -1
  95. package/views/3d/environment/EnvironmentManager.js +1 -1
  96. package/views/3d/environment/MarsAtmosphere.js +1 -1
  97. package/views/3d/interactive/SegmentLabels3D.js +1 -1
  98. package/views/3d/interactive/editingTools/manipulations/MoveZManipulation.js +1 -1
  99. package/views/3d/interactive/editingTools/media/MediaElementManipulator3D.js +1 -1
  100. package/views/3d/interactive/editingTools/reshape/edgeOffsetUtils.js +1 -1
  101. package/views/3d/interactive/visualElements/MeasurementArrowVisualElement.js +1 -1
  102. package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
  103. package/views/3d/layers/I3SMeshView3D.js +1 -1
  104. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  105. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  106. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  107. package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
  108. package/views/3d/layers/support/FeatureTileMeasurements3D.js +1 -1
  109. package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
  110. package/views/3d/state/Frustum.js +1 -1
  111. package/views/3d/state/controllers/FovController.js +1 -1
  112. package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
  113. package/views/3d/state/controllers/momentum/ZoomPlanarMomentumController.js +1 -1
  114. package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
  115. package/views/3d/support/FrustumExtentIntersection.js +1 -1
  116. package/views/3d/support/cameraUtils.js +1 -1
  117. package/views/3d/support/intersectionUtils.js +1 -1
  118. package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
  119. package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
  120. package/views/3d/support/pointsOfInterest/Focus.js +1 -1
  121. package/views/3d/support/viewpointUtils.js +1 -1
  122. package/views/3d/terrain/OverlayManager.js +1 -1
  123. package/views/3d/terrain/PatchRenderData.js +1 -1
  124. package/views/3d/terrain/SphericalPatch.js +1 -1
  125. package/views/3d/terrain/Tile.js +1 -1
  126. package/views/3d/webgl/RenderCamera.js +1 -1
  127. package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
  128. package/views/3d/webgl-engine/collections/Component/Material/ComponentData.glsl.js +63 -0
  129. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  130. package/views/3d/webgl-engine/collections/Component/Material/ComponentShader.glsl.js +5 -0
  131. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
  132. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  133. package/views/3d/webgl-engine/collections/Component/Material/{shader/DecodeSymbolColor.glsl.js → DecodeSymbolColor.glsl.js} +1 -1
  134. package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +1 -1
  135. package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBuffer.glsl.js +8 -8
  136. package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +7 -12
  137. package/views/3d/webgl-engine/core/shaderModules/Texture2DUintDrawUniform.js +5 -0
  138. package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
  139. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  140. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  141. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  142. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBuffer.js +1 -1
  143. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferFields.js +1 -1
  144. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferLayout.js +1 -1
  145. package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
  146. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  147. package/views/3d/webgl-engine/lib/edgeRendering/bufferLayouts.js +1 -1
  148. package/views/3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js +1 -1
  149. package/views/3d/webgl-engine/lib/geometryDataUtils.js +1 -1
  150. package/views/3d/webgl-engine/lib/triangleIntersectionUtils.js +1 -1
  151. package/views/3d/webgl-engine/materials/DefaultLayouts.js +1 -1
  152. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  153. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  154. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  155. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  156. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  157. package/views/3d/webgl-engine/materials/renderers/MergedBuffer.js +1 -1
  158. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  159. package/views/3d/webgl-engine/shaders/SphereDepthInterpolate.glsl.js +1 -1
  160. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeUtil.glsl.js +18 -18
  161. package/views/Attribution.js +1 -1
  162. package/views/SelectionManager.js +1 -1
  163. package/views/draw/support/Reshape.js +1 -1
  164. package/views/interactive/GraphicManipulator.js +1 -1
  165. package/views/interactive/SegmentLabels.js +1 -1
  166. package/views/interactive/coordinateHelper.js +1 -1
  167. package/views/interactive/editGeometry/EditGeometry.js +1 -1
  168. package/views/interactive/editGeometry/EditGeometryOperations.js +1 -1
  169. package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
  170. package/views/interactive/editGeometry/operations/SetAllVertexPositions.js +1 -1
  171. package/views/interactive/sketch/constraints.js +1 -1
  172. package/views/interactive/sketch/normalizedPoint.js +1 -1
  173. package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorker.js +1 -1
  174. package/views/interactive/snapping/featureSources/sceneLayerSource/sceneLayerSnappingUtils.js +1 -1
  175. package/views/interactive/snapping/hints/LineSnappingHint.js +1 -1
  176. package/views/interactive/tooltip/tooltipCommonUtils.js +1 -1
  177. package/views/navigation/PanSphericalMomentumEstimator.js +1 -1
  178. package/views/support/euclideanAreaMeasurementUtils.js +1 -1
  179. package/views/support/euclideanLengthMeasurementUtils.js +1 -1
  180. package/views/support/geometry3dUtils.js +1 -1
  181. package/views/support/selectionUtils.js +1 -1
  182. package/widgets/Attachments/AttachmentsViewModel.js +1 -1
  183. package/widgets/BuildingExplorer/BuildingExplorerViewModel.js +1 -1
  184. package/widgets/BuildingExplorer/BuildingNumericFilterViewModel.js +1 -1
  185. package/widgets/BuildingExplorer.js +1 -1
  186. package/widgets/Editor/EditorViewModel.js +1 -1
  187. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  188. package/widgets/Editor/Upload.js +1 -1
  189. package/widgets/Editor/components/Settings.js +1 -1
  190. package/widgets/Editor/support/SketchController.js +1 -1
  191. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  192. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  193. package/widgets/ShadowCast/DiscreteOptions.js +1 -1
  194. package/widgets/ShadowCast/DurationOptions.js +1 -1
  195. package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
  196. package/widgets/ShadowCast/ThresholdOptions.js +1 -1
  197. package/widgets/ShadowCast.js +1 -1
  198. package/widgets/Sketch/SketchViewModel.js +1 -1
  199. package/widgets/Sketch.js +1 -1
  200. package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
  201. package/widgets/support/SketchTooltipControls.js +1 -1
  202. package/assets/esri/core/workers/chunks/08957e462d06c4dc8ab5.js +0 -1
  203. package/assets/esri/core/workers/chunks/22d66d1c8dfccdbbcf30.js +0 -1
  204. package/assets/esri/core/workers/chunks/484cd728dd17b8dc1f72.js +0 -1
  205. package/assets/esri/core/workers/chunks/6c8f5a56e94fdbe6a4a5.js +0 -1
  206. package/assets/esri/core/workers/chunks/745fc2b89fd7d816f2e0.js +0 -1
  207. package/assets/esri/core/workers/chunks/79c7391f00a55e7bcf6b.js +0 -1
  208. package/assets/esri/core/workers/chunks/7f8b85de079614b9c336.js +0 -1
  209. package/assets/esri/core/workers/chunks/c2596f48b37092dd566c.js +0 -1
  210. package/assets/esri/core/workers/chunks/c6cc3db057da49755d15.js +0 -1
  211. package/assets/esri/core/workers/chunks/d6d03f22c91f528b97e5.js +0 -1
  212. package/assets/esri/core/workers/chunks/ea5bf896acfcc3106bf5.js +0 -1
  213. package/assets/esri/core/workers/chunks/f3127bdf28a1d9b8db27.js +0 -1
  214. package/chunks/geometryEngineJSON.js +0 -5
  215. package/geometry/geometryEngineAsync.d.ts +0 -39
  216. package/geometry/geometryEngineAsync.js +0 -5
  217. package/geometry/geometryEngineWorker.js +0 -5
  218. package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentData.glsl.js +0 -57
  219. package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentDataConstants.js +0 -5
  220. package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentShader.glsl.js +0 -5
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[860],{2272:(e,t,i)=>{i.d(t,{Dl:()=>u,gf:()=>c,jV:()=>l,lF:()=>h});var s=i(92602),n=i(70333),r=i(4718),o=i(84952),a=i(926);function l(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function u(e){return"string"==typeof e?(0,o.An)(e):(0,r.o8)(e)}function h(e,t,i){const s={};for(const n in e){if("declaredClass"===n)continue;const r=e[n];if(null!=r&&"function"!=typeof r)if(Array.isArray(r))s[n]=r.map(e=>h(e));else if("object"==typeof r)if(r.toJSON){const e=r.toJSON(i?.[n]);s[n]=t?e:JSON.stringify(e)}else s[n]=t?r:JSON.stringify(r);else s[n]=r}return s}async function c(e,t,r){const o=function(e,t){return e?t&&(0,a.Qc)(e)?t:(0,a.CG)(e)??n.id?.findCredential(e)?.token:null}(e,t);if(o)return o;!n.id&&s.A.request.useIdentity&&await Promise.all([i.e(7330),i.e(168),i.e(148)]).then(i.bind(i,50148));const l=await n.id.getCredential(e,r);return l?.token}},6518:(e,t,i)=>{i.d(t,{F:()=>a});var s=i(44208),n=i(75503),r=i(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.wq(9,(0,s.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach((i,s)=>{e[t++]=s}),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter(e=>this._idByBounds.has(e))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,r.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,i){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,i)}(this._index,e,e=>t(this._idByBounds.get(e)))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},36708:(e,t,i)=>{i.d(t,{C_:()=>d,OH:()=>y,Vh:()=>m,on:()=>c,pc:()=>_,wB:()=>l,z7:()=>u});var s=i(37955),n=i(36563),r=i(97768),o=i(74887),a=i(14012);function l(e,t,i={}){return h(e,t,i,p)}function u(e,t,i={}){return h(e,t,i,f)}function h(e,t,i={},s){let n=null;const o=i.once?(e,i)=>{s(e)&&((0,r.xt)(n),t(e,i))}:(e,i)=>{s(e)&&t(e,i)};if(n=(0,a.Cn)(e,o,i.sync,i.equals),i.initial){const t=e();o(t,t)}return n}function c(e,t,i,o={}){let a=null,u=null,h=null;function c(){a&&u&&(u.remove(),o.onListenerRemove?.(a),a=null,u=null)}function d(e){o.once&&o.once&&(0,r.xt)(h),i(e)}const p=l(e,(e,i)=>{c(),(0,s.wb)(e)&&(a=e,u=(0,s.on)(e,t,d),o.onListenerAdd?.(e))},{sync:o.sync,initial:!0});return h=(0,n.hA)(()=>{p.remove(),c()}),h}function d(e,t){return function(e,t,i){if((0,o.G4)(i))return Promise.reject((0,o.NK)());const s=e();if(t?.(s))return Promise.resolve(s);let a=null;function l(){a=(0,r.xt)(a)}return new Promise((s,r)=>{a=(0,n.vE)([(0,o.u7)(i,()=>{l(),r((0,o.NK)())}),h(e,e=>{l(),s(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},m={initial:!0},_={sync:!0,initial:!0}},37730:(e,t,i)=>{i.d(t,{T:()=>n});var s=i(43334);const n={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t)=>new s.Om(t,e.attributes,null,e.objectId),getGeometry:e=>e.geometry,getCentroid:(e,t)=>e.ensureCentroid(t)}},60999:(e,t,i)=>{i.d(t,{DZ:()=>f,Ke:()=>p,Tj:()=>h,UT:()=>y,aD:()=>_,jJ:()=>u});var s=i(31635),n=i(69622),r=i(97768),o=i(74887),a=i(10107),l=i(64108);function u(e,t,i){return(0,o.Lx)(e.map((e,s)=>t.apply(i,[e,s])))}async function h(e,t,i){return(await(0,o.Lx)(e.map((e,s)=>t.apply(i,[e,s])))).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,o.QP)(e),d(e)}}function y(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,r.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,o.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,r.xt)(this._abortHandle),this._abortController=null}};(0,s.Cg)([(0,a.MZ)()],m.prototype,"value",null),(0,s.Cg)([(0,a.MZ)()],m.prototype,"error",null),(0,s.Cg)([(0,a.MZ)()],m.prototype,"finished",null),(0,s.Cg)([(0,a.MZ)()],m.prototype,"promise",void 0),(0,s.Cg)([(0,a.MZ)()],m.prototype,"_result",void 0),m=(0,s.Cg)([(0,l.$)("esri.core.asyncUtils.ReactiveTask")],m);class _{constructor(){this._sequence=Promise.resolve()}async acquire(){let e;this._sequence=new Promise(t=>{e=this._sequence.then(()=>t,()=>t)});const t=await e;return{[Symbol.dispose]:t}}async run(e){const t={stack:[],error:void 0,hasError:!1};try{return(0,s.mS)(t,await this.acquire(),!1),await e()}catch(e){t.error=e,t.hasError=!0}finally{(0,s.hk)(t)}}}},64714:(e,t,i)=>{i.d(t,{F0:()=>a,Vx:()=>h,e2:()=>d,f:()=>p});var s=i(44208),n=i(4718),r=i(99352),o=i(93470);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.Cb:"esriGeometryPolyline"===e?o.yM:o.WR}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function h(e,t){if((0,s.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let i=`this${c(t)} = null;`;for(const t in e)i+=`this${c(t)} = ${JSON.stringify(e[t])};`;const s=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${i};\n }\n }\n `)();return()=>new s}catch(i){return()=>({[t]:null,...e})}}function c(e){return l.test(e)?`.${e}`:`["${e}"]`}function d(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.o8)(e)}}]}function p(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,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:r.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:r.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}}}},66344:(e,t,i)=>{i.d(t,{q:()=>a});const s=!!(0,i(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class n{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.clear()}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,n,o){t=e.id+t;const a=this._db.get(t);if(a&&(this._size-=a.size,e.size-=a.size,this._db.delete(t),a.entry!==i&&this._notifyRemove(t,a.entry,a.size,0)),n>this._maxSize)return void this._notifyRemove(t,i,n,0);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!n||n<0)return s||console.warn(`Refusing to cache entry with size ${n} for key ${t}`),void this._notifyRemove(t,i,0,0);const l=1+Math.max(o,-4)- -3;this._db.set(t,new r(i,n,l)),this._size+=n,e.size+=n,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 s=i.entry.usedMemory;for(;s>this._maxSize;){const e=this._notifyRemove(t,i.entry,s,1);if(!(null!=e&&e>0))return void this._db.delete(t);s=e}i.size=s,this._size+=s,e.size+=s,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,s)=>{const n=e.lifetime;i[n]=(i[n]||0)+e.size,this._users.forEach(i=>{const{id:n,name:r}=i;if(s.startsWith(n)){const i=t[r]||0;t[r]=i+e.size}})});const s={};this._users.forEach(e=>{const i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const n=t[i]||0;t[i]=n,s[i]=Math.round(100*e.hitRate)+"%"}else s[i]="0%"});const n=Object.keys(t);n.sort((e,i)=>t[i]-t[e]),n.forEach(i=>e[i]=Math.round(t[i]/2**20)+"MB / "+s[i]);for(let t=i.length-1;t>=0;--t){const s=i[t];s&&(e["Priority "+(t+-3-1)]=Math.round(s/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,s){const n=this._users.get(e.split(o)[0])?.removeFunc,r=n?.(t,s,i);return"number"==typeof r?r: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 s=t?.id;let n=!0;for(;n;){n=!1;for(const[r,a]of this._db)if(0===a.lifetime&&(!s||r.startsWith(s))){const s=t??this._users.get(r.split(o)[0]);if(this._purgeItem(r,a,s),i.size<=.9*e)return;n||=this._db.has(r)}}for(const[n,r]of this._db)if(!s||n.startsWith(s)){const s=t??this._users.get(n.split(o)[0]);if(this._purgeItem(n,r,s),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 s=this._notifyRemove(e,t.entry,t.size,1);null!=s&&s>0&&(this._size+=s,i&&(i.size+=s),t.lives=t.lifetime,t.size=s,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}new n(0);class r{constructor(e,t,i){this.entry=e,this.size=t,this.lifetime=i,this.lives=i}}const o=":";class a{constructor(e,t){this.removeFunc=t,this._storage=new n,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(){}}},67482:(e,t,i)=>{function s(e){return null!=a(e)||null!=o(e)}function n(e){return l.test(e)}function r(e){return a(e)??o(e)}function o(e){const t=new Date(e);return function(e,t){if(Number.isNaN(e.getTime()))return!1;let i=!0;if(h&&/\d+\W*$/.test(t)){const e=t.match(/[a-zA-Z]{2,}/);if(e){let t=!1,s=0;for(;!t&&s<=e.length;)t=!u.test(e[s]),s++;i=!t}}return i}(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 i=t.groups,s=+i.year,n=+i.month-1,r=+i.day,o=+(i.hours??"0"),a=+(i.minutes??"0"),u=+(i.seconds??"0");if(o>23)return null;if(a>59)return null;if(u>59)return null;const h=i.ms??"0",c=h?+h.padEnd(3,"0").slice(0,3):0;let d;if(i.isUTC||!i.offsetSign)d=Date.UTC(s,n,r,o,a,u,c);else{const e=+i.offsetHours,t=+i.offsetMinutes;d=6e4*("+"===i.offsetSign?-1:1)*(60*e+t)+Date.UTC(s,n,r,o,a,u,c)}return Number.isNaN(d)?null:d}i.d(t,{Br:()=>n,Cq:()=>s,_U:()=>r});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,h=!Number.isNaN(new Date("technology 10").getTime())},69540:(e,t,i)=>{i.d(t,{OU:()=>h,Pw:()=>c});var s=i(31635),n=i(69622),r=(i(44208),i(4718)),o=(i(53966),i(97768)),a=i(88620),l=i(64108);const u=Symbol("ClonableMixin"),h=e=>{var t;const i=e;let n=class extends i{constructor(){super(...arguments),this[t]=!0}static{t=u}clone(e){const t=(0,a.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");const i=t.metadata,s=t.store,n={},l=new Map;for(const t in i){const o=i[t],a=s?.originOf(t),u=o.clonable;if(o.readOnly||!1===u||7!==a&&0!==a&&5!==a&&4!==a)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,r.TU)(h,e),null!=h&&null==c)continue;0===a?l.set(t,c):n[t]=c}const u=new(0,Object.getPrototypeOf(this).constructor)(n);if(l.size){const e=(0,a.oY)(u)?.store;if(e)for(const[t,i]of l)e.set(t,i,0)}return u}};return n=(0,s.Cg)([(0,l.$)("esri.core.Clonable")],n),n},c=h(n.A)},71202:(e,t,i)=>{i.r(t),i.d(t,{default:()=>I});var s=i(11254),n=i(60999),r=i(49186),o=i(53966),a=i(74887),l=i(65864),u=i(21325),h=i(90708),c=i(83221),d=i(31464),p=i(56390),f=i(85113),y=i(64714),m=i(82832),_=i(95466),g=i(98453),b=i(30524),x=i(98623);const S={hasAttachments:!1,capabilities:"query, editing, create, delete, update",useStandardizedQueries:!0,supportsCoordinatesQuantization:!0,supportsReturningQueryGeometry:!0,advancedQueryCapabilities:{supportsQueryAttachments:!1,supportsQueryAttachmentOrderByFields:!1,supportsQueryAttachmentWithTypeWildcard:!1,supportsQueryBins:!0,supportsQueryPivot:!1,supportsQueryWithCacheHint:!0,supportsQueryWithDistance:!0,supportsQueryWithResultType:!0,supportsStatistics:!0,supportsPercentileStatistics:!0,supportsReturningGeometryCentroid:!0,supportsDistinct:!0,supportsReturningQueryExtent:!0,supportsReturningGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsSqlExpression:!0,supportsDisjointSpatialRel:!0},queryBinsCapabilities:m.PC};class I{constructor(){this._queryEngine=null,this._snapshotFeatures=async e=>{const t=await this._fetch(e);return this._createFeatures(t)}}destroy(){this._queryEngine?.destroy(),this._queryEngine=this._createDefaultAttributes=null}async load(e,t={}){this._loadOptions={url:e.url,customParameters:e.customParameters};const i=[],[s]=await Promise.all([e.url?this._fetch(t?.signal):null,this._checkProjection(e.spatialReference)]),n=(0,f.BM)(s,{geometryType:e.geometryType}),o=e.fields||n.fields||[],a=null!=e.hasZ?e.hasZ:n.hasZ,l=n.geometryType;let h=e.objectIdField||n.objectIdFieldName||"__OBJECTID";const d=e.spatialReference||u.KK;let m=e.timeInfo;o===n.fields&&n.unknownFields.length>0&&i.push({name:"geojson-layer:unknown-field-types",message:"Some fields types couldn't be inferred from the features and were dropped",details:{unknownFields:n.unknownFields}});const I=new _.A(o);let w=I.get(h);w?("esriFieldTypeString"!==w.type&&(w.type="esriFieldTypeOID"),w.editable=!1,w.nullable=!1,h=w.name):(w={alias:h,name:h,type:"string"===n.objectIdFieldType?"esriFieldTypeString":"esriFieldTypeOID",editable:!1,nullable:!1},o.unshift(w));const F={};for(const e of o){if(null==e.name&&(e.name=e.alias),null==e.alias&&(e.alias=e.name),!e.name)throw new r.A("geojson-layer:invalid-field-name","field name is missing",{field:e});if(!g.m.jsonValues.includes(e.type))throw new r.A("geojson-layer:invalid-field-type",`invalid type for field "${e.name}"`,{field:e});if(e.name!==w.name){const t=(0,b.lD)(e);void 0!==t&&(F[e.name]=t)}null==e.length&&(e.length=(0,b._b)(e))}if(m){if(m.startTimeField){const e=I.get(m.startTimeField);e?(m.startTimeField=e.name,e.type="esriFieldTypeDate"):m.startTimeField=null}if(m.endTimeField){const e=I.get(m.endTimeField);e?(m.endTimeField=e.name,e.type="esriFieldTypeDate"):m.endTimeField=null}if(m.trackIdField){const e=I.get(m.trackIdField);e?m.trackIdField=e.name:(m.trackIdField=null,i.push({name:"geojson-layer:invalid-timeInfo-trackIdField",message:"trackIdField is missing",details:{timeInfo:m}}))}m.startTimeField||m.endTimeField||(i.push({name:"geojson-layer:invalid-timeInfo",message:"startTimeField and endTimeField are missing",details:{timeInfo:m}}),m=null)}const M=l?(0,y.F0)(l):void 0,B=I.dateFields.length?{timeZoneIANA:x.n$}:null,v={warnings:i,featureErrors:[],layerDefinition:{...S,drawingInfo:M??void 0,templates:(0,y.e2)(F),extent:void 0,geometryType:l,objectIdField:h,fields:o,hasZ:!!a,timeInfo:m,dateFieldsTimeReference:B}},T={type:"object-id",fieldName:h};this._queryEngine=new p.do({fieldsIndex:_.A.fromLayerJSON({fields:o,timeInfo:m,dateFieldsTimeReference:B}),geometryType:l,hasM:!1,hasZ:a,featureIdInfo:T,spatialReference:d,timeInfo:m,featureStore:new c.A({geometryType:l,hasM:!1,hasZ:a})});const E=this._queryEngine.fieldsIndex.requiredFields.indexOf(w);E>-1&&this._queryEngine.fieldsIndex.requiredFields.splice(E,1),this._createDefaultAttributes=(0,y.Vx)(F,h);const z=this._createFeatures(s);this._objectIdGenerator=this._createObjectIdGenerator(this._queryEngine,z);const A=this._normalizeFeatures(z,v.featureErrors);this._queryEngine.featureStore.addMany(A);const{fullExtent:C,timeExtent:R}=await this._queryEngine.fetchRecomputedExtents();if(v.layerDefinition.extent=C,R){const{start:e,end:t}=R;v.layerDefinition.timeInfo.timeExtent=[e,t]}return v}async applyEdits(e){const{spatialReference:t,geometryType:i}=this._queryEngine;return await Promise.all([(0,m.$1)(t,i),(0,d.Nk)(e.adds,t),(0,d.Nk)(e.updates,t)]),await this._waitSnapshotComplete(),this._applyEdits(e)}async queryFeatures(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(e,t.signal)}async queryFeatureCount(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(e,t.signal)}async queryObjectIds(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForIds(e,t.signal)}async queryExtent(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(e,t.signal)}async querySnapping(e,t={}){return await this._waitSnapshotComplete(),await this._queryEngine.executeQueryForSnapping(e,t.signal)}async queryAttributeBins(e,t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeAttributeBinsQuery(e,t.signal)}async refresh(e){this._loadOptions.customParameters=e,this._snapshotTask?.abort(),this._snapshotTask=(0,n.UT)(this._snapshotFeatures),this._snapshotTask.promise.then(e=>{this._queryEngine.featureStore.clear(),this._objectIdGenerator=this._createObjectIdGenerator(this._queryEngine,e);const t=this._normalizeFeatures(e);t&&this._queryEngine.featureStore.addMany(t)},e=>{this._queryEngine.featureStore.clear(),(0,a.zf)(e)||o.A.getLogger("esri.layers.GeoJSONLayer").error(new r.A("geojson-layer:refresh","An error occurred during refresh",{error:e}))}),await this._waitSnapshotComplete();const{fullExtent:t,timeExtent:i}=await this._queryEngine.fetchRecomputedExtents();return{extent:t,timeExtent:i}}_createFeatures(e){if(null==e)return[];const{geometryType:t,hasZ:i,objectIdField:s}=this._queryEngine,n=(0,f.bd)(e,{geometryType:t,hasZ:i,objectIdField:s});if(!(0,u.aI)(this._queryEngine.spatialReference,u.KK))for(const e of n)null!=e.geometry&&(e.geometry=(0,h.Ux)((0,d.Cv)((0,h.zv)(e.geometry,this._queryEngine.geometryType,this._queryEngine.hasZ,!1),u.KK,this._queryEngine.spatialReference)));return n}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _fetch(e){const{url:t,customParameters:i}=this._loadOptions,n=(await(0,s.A)(t??"",{responseType:"json",query:{...i},signal:e})).data;return(0,f.sO)(n),n}_normalizeFeatures(e,t){const{objectIdField:i,fieldsIndex:s}=this._queryEngine,n=[];for(const r of e){const e=this._createDefaultAttributes(),o=(0,m.MB)(s,e,r.attributes,!0);o?t?.push(o):(this._assignObjectId(e,r.attributes,!0),r.attributes=e,r.objectId=e[i],n.push(r))}return n}async _applyEdits(e){const{adds:t,updates:i,deletes:s}=e,n={addResults:[],deleteResults:[],updateResults:[],uidToObjectId:{}};if(t?.length&&this._applyAddEdits(n,t),i?.length&&this._applyUpdateEdits(n,i),s?.length){for(const e of s)n.deleteResults.push((0,m.bP)(e));this._queryEngine.featureStore.removeManyById(s)}const{fullExtent:r,timeExtent:o}=await this._queryEngine.fetchRecomputedExtents();return{extent:r,timeExtent:o,featureEditResults:n}}_applyAddEdits(e,t){const{addResults:i}=e,{geometryType:s,hasM:n,hasZ:r,objectIdField:o,spatialReference:a,featureStore:u,fieldsIndex:c}=this._queryEngine,p=[],f={type:"object-id",fieldName:o};for(const n of t){if(n.geometry&&s!==(0,l.$B)(n.geometry)){i.push((0,m.Yx)("Incorrect geometry type."));continue}const t=this._createDefaultAttributes(),r=(0,m.MB)(c,t,n.attributes);if(r)i.push(r);else{if(this._assignObjectId(t,n.attributes),n.attributes=t,null!=n.uid){const t=n.attributes[o];e.uidToObjectId[n.uid]=t}if(null!=n.geometry){const e=n.geometry.spatialReference??a;n.geometry=(0,d.Cv)((0,m.CR)(n.geometry,e),e,a)}p.push(n),i.push((0,m.bP)(n.attributes[o]))}}u.addMany((0,h.Di)([],p,s,r,n,f))}_applyUpdateEdits({updateResults:e},t){const{geometryType:i,hasM:s,hasZ:n,objectIdField:r,spatialReference:o,featureStore:a,fieldsIndex:u}=this._queryEngine,c={type:"object-id",fieldName:r};for(const p of t){const{attributes:t,geometry:f}=p,y=t?.[r];if(null==y){e.push((0,m.Yx)(`Identifier field ${r} missing`));continue}if(!a.has(y)){e.push((0,m.Yx)(`Feature with object id ${y} missing`));continue}const _=(0,h.oN)(a.getFeature(y),i,n,s);if(null!=f){if(i!==(0,l.$B)(f)){e.push((0,m.Yx)("Incorrect geometry type."));continue}const t=f.spatialReference??o;_.geometry=(0,d.Cv)((0,m.CR)(f,t),t,o)}if(t){const i=(0,m.MB)(u,_.attributes,t);if(i){e.push(i);continue}}a.add((0,h.E2)(_,i,n,s,c)),e.push((0,m.bP)(y))}}_createObjectIdGenerator(e,t){const i=e.fieldsIndex.get(e.objectIdField);if("esriFieldTypeString"===i.type)return()=>i.name+"-"+Date.now().toString(16);let s=Number.NEGATIVE_INFINITY;for(const e of t)e.objectId&&(s=Math.max(s,e.objectId));return s=Math.max(0,s)+1,()=>s++}_assignObjectId(e,t,i=!1){const s=this._queryEngine.objectIdField;e[s]=i&&s in t?t[s]:this._objectIdGenerator()}async _checkProjection(e){try{await(0,d.Nk)(u.KK,e)}catch{throw new r.A("geojson-layer","Projection not supported")}}}},75503:(e,t,i)=>{i.d(t,{EC:()=>M,wq:()=>a});var s=i(4576),n=i(21818),r=(i(44208),i(15142)),o=i(11006);class a{constructor(e=9,t){this._compareMinX=d,this._compareMinY=p,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),S.prune(),I.prune(),w.prune(),F.prune()}all(e){l(this._data,e)}search(e,t){let i=this._data;const s=this._toBBox;if(b(e,i))for(S.clear();i;){for(let n=0,r=i.children.length;n<r;n++){const r=i.children[n],o=i.leaf?s(r):r;b(e,o)&&(i.leaf?t(r):g(e,o)?l(r,t):S.push(r))}i=S.pop()}}collides(e){let t=this._data;const i=this._toBBox;if(!b(e,t))return!1;for(S.clear();t;){for(let s=0,n=t.children.length;s<n;s++){const n=t.children[s],r=t.leaf?i(n):n;if(b(e,r)){if(t.leaf||g(e,r))return!0;S.push(n)}}t=S.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,i=e.length;t<i;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new v([]),this}remove(e){if(!e)return this;let t,i=this._data,r=null,o=0,a=!1;const l=this._toBBox(e);for(w.clear(),F.clear();i||w.length>0;){if(i||(i=w.pop(),r=w.data[w.length-1],o=F.pop()??0,a=!0),i.leaf&&(t=(0,s.qh)(i.children,(0,n.zI)(e),i.children.length,i.indexHint),-1!==t))return i.children.splice(t,1),w.push(i),this._condense(w),this;a||i.leaf||!g(i,l)?r?(o++,i=r.children[o],a=!1):i=null:(w.push(i),F.push(o),o=0,r=i,i=i.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,i,s){const n=i-t+1;let r=this._maxEntries;if(n<=r){const s=new v(e.slice(t,i+1));return u(s,this._toBBox),s}s||(s=Math.ceil(Math.log(n)/Math.log(r)),r=Math.ceil(n/r**(s-1)));const o=new T([]);o.height=s;const a=Math.ceil(n/r),l=a*Math.ceil(Math.sqrt(r));x(e,t,i,l,this._compareMinX);for(let n=t;n<=i;n+=l){const t=Math.min(n+l-1,i);x(e,n,t,a,this._compareMinY);for(let i=n;i<=t;i+=a){const n=Math.min(i+a-1,t);o.children.push(this._build(e,i,n,s-1))}}return u(o,this._toBBox),o}_insert(e,t,i){const s=this._toBBox,n=i?e:s(e);w.clear();const r=function(e,t,i,s){for(;s.push(t),!0!==t.leaf&&s.length-1!==i;){let i,s=1/0,n=1/0;for(let r=0,o=t.children.length;r<o;r++){const o=t.children[r],a=f(o),l=m(e,o)-a;l<n?(n=l,s=a<s?a:s,i=o):l===n&&a<s&&(s=a,i=o)}t=i||t.children[0]}return t}(n,this._data,t,w);for(r.children.push(e),c(r,n);t>=0&&w.data[t].children.length>this._maxEntries;)this._split(w,t),t--;!function(e,t,i){for(let s=i;s>=0;s--)c(t.data[s],e)}(n,w,t)}_split(e,t){const i=e.data[t],s=i.children.length,n=this._minEntries;this._chooseSplitAxis(i,n,s);const r=this._chooseSplitIndex(i,n,s);if(!r)return;const o=i.children.splice(r,i.children.length-r),a=i.leaf?new v(o):new T(o);a.height=i.height,u(i,this._toBBox),u(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(i,a)}_splitRoot(e,t){this._data=new T([e,t]),this._data.height=e.height+1,u(this._data,this._toBBox)}_chooseSplitIndex(e,t,i){let s,n,r;s=n=1/0;for(let o=t;o<=i-t;o++){const t=h(e,0,o,this._toBBox),a=h(e,o,i,this._toBBox),l=_(t,a),u=f(t)+f(a);l<s?(s=l,r=o,n=u<n?u:n):l===s&&u<n&&(n=u,r=o)}return r}_chooseSplitAxis(e,t,i){const s=e.leaf?this._compareMinX:d,n=e.leaf?this._compareMinY:p;this._allDistMargin(e,t,i,s)<this._allDistMargin(e,t,i,n)&&e.children.sort(s)}_allDistMargin(e,t,i,s){e.children.sort(s);const n=this._toBBox,r=h(e,0,t,n),o=h(e,i-t,i,n);let a=y(r)+y(o);for(let s=t;s<i-t;s++){const t=e.children[s];c(r,e.leaf?n(t):t),a+=y(r)}for(let s=i-t-1;s>=t;s--){const t=e.children[s];c(o,e.leaf?n(t):t),a+=y(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const i=e.data[t];if(0===i.children.length)if(t>0){const n=e.data[t-1],r=n.children;r.splice((0,s.qh)(r,i,r.length,n.indexHint),1)}else this.clear();else u(i,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let i=e;for(I.clear();i;){if(!0===i.leaf)for(const e of i.children)t((0,n.zI)(e));else I.pushArray(i.children);i=I.pop()??null}}function u(e,t){h(e,0,e.children.length,t,e)}function h(e,t,i,s,n){n||(n=new v([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let r,o=t;o<i;o++)r=e.children[o],c(n,e.leaf?s(r):r);return n}function c(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function d(e,t){return e.minX-t.minX}function p(e,t){return e.minY-t.minY}function f(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function y(e){return e.maxX-e.minX+(e.maxY-e.minY)}function m(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function _(e,t){const i=Math.max(e.minX,t.minX),s=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),r=Math.min(e.maxY,t.maxY);return Math.max(0,n-i)*Math.max(0,r-s)}function g(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function b(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function x(e,t,i,s,n){const r=[t,i];for(;r.length;){const t=r.pop(),i=r.pop();if(t-i<=s)continue;const a=i+Math.ceil((t-i)/s/2)*s;(0,o.q)(e,a,i,t,n),r.push(i,a,a,t)}}const S=new r.A,I=new r.A,w=new r.A,F=new r.A({deallocator:void 0});class M{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class B extends M{constructor(){super(...arguments),this.height=1,this.indexHint=new s.vW}}class v extends B{constructor(e){super(),this.children=e,this.leaf=!0}}class T extends B{constructor(e){super(),this.children=e,this.leaf=!1}}},82832:(e,t,i)=>{i.d(t,{$1:()=>m,CR:()=>y,MB:()=>d,PC:()=>_,Yx:()=>l,bP:()=>h});var s=i(67482),n=i(21325),r=i(30524);class o{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 o(e)}}function l(e){return new a(e)}class u{constructor(e){this.globalId=null,this.success=!0,this.objectId=this.uniqueId=e}}function h(e){return new u(e)}const c=new Set;function d(e,t,i,s=!1){c.clear();for(const n in i){const o=e.get(n);if(!o)continue;const a=p(o,i[n]);if(c.add(o.name),o&&(s||o.editable)){const e=(0,r.CJ)(o,a);if(e)return l((0,r.uo)(e,o,a));t[o.name]=a}}for(const t of e.requiredFields??[])if(!c.has(t.name))return l(`missing required field "${t.name}"`);return null}function p(e,t){let i=t;return(0,r.WA)(e)&&"string"==typeof t?i=parseFloat(t):(0,r.yM)(e)&&null!=t&&"string"!=typeof t?i=String(t):(0,r.vE)(e)&&"string"==typeof t&&(i=(0,s._U)(t)),(0,r.WX)(i)}let f;function y(e,t){if(!e||!(0,n.fn)(t))return e;if("rings"in e||"paths"in e){if(null==f)throw new TypeError("geometry engine not loaded");return f.simplify(t,e)}return e}async function m(e,t){!(0,n.fn)(e)||"esriGeometryPolygon"!==t&&"esriGeometryPolyline"!==t||await async function(){return null==f&&(f=await Promise.all([i.e(3209),i.e(7559)]).then(i.bind(i,47559))),f}()}const _={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"]}},83221:(e,t,i)=>{i.d(t,{A:()=>f});var s=i(4576),n=i(49186),r=i(65529),o=i(53966),a=i(70328),l=i(19419),u=i(90708),h=i(6518),c=i(51441),d=i(37730);const p=(0,a.vt)();class f{constructor(e){this.geometryInfo=e,this._boundsStore=new h.F,this._featuresById=new Map,this._usedMemory=0,this.events=new r.bk,this.featureAdapter=d.T}get usedMemory(){return this._usedMemory}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach(t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)}),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,i,s,n]=this.fullBounds;return{xmin:t,ymin:i,xmax:s,ymax:n,spatialReference:(0,c.ag)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map(e=>this._upsert(e));return this._emitChanged(),t.filter(s.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged(),this._usedMemory=0}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const i of e){const e=this._boundsStore.get(i.objectId);e&&t((0,a.Jt)(p,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach(t=>e(t))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,e=>{t(this._featuresById.get(e))})}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const i=this._featuresById.get(t);let s;if(i?(e.displayId=i.displayId,s=this._boundsStore.get(t),this._boundsStore.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);s=(0,u.jQ)(null!=s?s:(0,l.vt)(),e.geometry),null!=s&&this._boundsStore.set(t,s),this._featuresById.set(t,e),this._usedMemory+=this.estimateFeatureUsedMemory?.(e)??0}_upsert(e){const t=e?.objectId;if(null==t)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const i=this._featuresById.get(t);if(!i)return this._add(e),e;this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0;const{geometry:s,attributes:r}=e;for(const e in r)i.attributes[e]=r[e];return s&&(i.geometry=s,this._boundsStore.set(t,(0,u.jQ)((0,l.vt)(),s)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(i)??0,i}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(e)??0,e}}},85113:(e,t,i)=>{i.d(t,{BM:()=>M,bd:()=>B,sO:()=>F,xD:()=>c});var s=i(67482),n=i(49186),r=i(21325),o=i(90708),a=i(43334),l=i(92722),u=i(30524);const h={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function c(e){return h[e]}function*d(e){switch(e.type){case"Feature":yield e;break;case"FeatureCollection":for(const t of e.features)t&&(yield t)}}function*p(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 f(e){for(const t of e)if(t.length>2)return!0;return!1}function y(e){let t=0;for(let i=0;i<e.length;i++){const s=e[i],n=e[(i+1)%e.length];t+=s[0]*n[1]-n[0]*s[1]}return t<=0}function m(e){const t=e[0],i=e[e.length-1];t[0]===i[0]&&t[1]===i[1]&&t[2]===i[2]||e.push(t)}function _(e,t){const{coordinates:i,type:s}=e,n=t.hasZ??!1,r=!0;switch(s){case"Point":return new l.A([],[...i],n,!1);case"LineString":return(0,o.Ap)({paths:[i],hasZ:r},n,!1);case"MultiLineString":return(0,o.Ap)({paths:i,hasZ:r},n,!1);case"MultiPoint":return(0,o.PR)({points:i,hasZ:r},n,!1);case"Polygon":case"MultiPolygon":{const e=new l.A([],[],n,!1);for(const t of"Polygon"===s?[i]:i){g(e,t[0],n);for(let i=1;i<t.length;i++)b(e,t[i],n)}return e}}}function g(e,t,i){m(t),function(e){return!y(e)}(t)?S(e,t,i):x(e,t,i)}function b(e,t,i){m(t),function(e){return y(e)}(t)?S(e,t,i):x(e,t,i)}function x(e,t,i){for(const s of t)I(e,s,i);e.lengths.push(t.length)}function S(e,t,i){for(let s=t.length-1;s>=0;s--)I(e,t[s],i);e.lengths.push(t.length)}function I(e,[t,i,s],n){e.coords.push(t,i),n&&e.coords.push(s||0)}function w(e){switch(typeof e){case"string":return(0,s.Br)(e)?"esriFieldTypeDate":"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function F(e,t=4326){if(!e)throw new n.A("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==e.type&&"FeatureCollection"!==e.type)throw new n.A("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:e});const{crs:i}=e;if(!i)return;const s="string"==typeof i?i:"name"===i.type?i.properties.name:"EPSG"===i.type?i.properties.code:null,o=(0,r.oT)({wkid:t})?new RegExp(".*(CRS84H?|4326)$","i"):new RegExp(`.*(${t})$`,"i");if(!s||!o.test(s))throw new n.A("geojson:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:i})}function M(e,t={}){const i=[],s=new Set,n=new Set;let r,o=!1,a=null,l=!1,{geometryType:h=null}=t;for(const t of d(e)){const{geometry:e,properties:d,id:y}=t;if((!e||(h||(h=c(e.type)),c(e.type)===h))&&(o||(o=f(p(e))),l||(l=null!=y,l&&(r=typeof y,d&&(a=Object.keys(d).filter(e=>d[e]===y)))),d&&a&&l&&null!=y&&(a.length>1?a=a.filter(e=>d[e]===y):1===a.length&&(a=d[a[0]]===y?a:[])),d))for(const e in d){if(s.has(e))continue;const t=w(d[e]);if("unknown"===t){n.add(e);continue}n.delete(e),s.add(e);const r=(0,u.rS)(e);r&&i.push({name:r,alias:e,type:t})}}const y=(0,u.rS)(1===a?.length&&a[0]||null)??void 0;if(y)for(const e of i)if(e.name===y&&(0,u.WA)(e)){e.type="esriFieldTypeOID";break}return{fields:i,geometryType:h,hasZ:o,objectIdFieldName:y,objectIdFieldType:r,unknownFields:Array.from(n)}}function B(e,t){return Array.from(function*(e,t={}){const{geometryType:i,objectIdField:s}=t;for(const n of e){const{geometry:e,properties:r,id:o}=n;if(e&&c(e.type)!==i)continue;const l=r||{};let u;s&&(u=l[s],null==o||u||(l[s]=u=o)),yield new a.Om(e&&_(e,t),l,null,u)}}(d(e),t))}},93470:(e,t,i)=>{i.d(t,{Cb:()=>r,HW:()=>h,JR:()=>n,JZ:()=>l,WR:()=>a,b6:()=>c,fT:()=>s,nC:()=>u,yM:()=>o});const s=[252,146,31,255],n=[153,153,153,255],r={type:"esriSMS",style:"esriSMSCircle",size:6,color:s,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:s},a={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},l={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},u={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},h={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},c={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}},98453:(e,t,i)=>{i.d(t,{m:()=>s});const s=new(i(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[860],{2272:(e,t,i)=>{i.d(t,{Dl:()=>u,gf:()=>c,jV:()=>l,lF:()=>h});var s=i(92602),n=i(70333),r=i(4718),o=i(84952),a=i(926);function l(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function u(e){return"string"==typeof e?(0,o.An)(e):(0,r.o8)(e)}function h(e,t,i){const s={};for(const n in e){if("declaredClass"===n)continue;const r=e[n];if(null!=r&&"function"!=typeof r)if(Array.isArray(r))s[n]=r.map(e=>h(e));else if("object"==typeof r)if(r.toJSON){const e=r.toJSON(i?.[n]);s[n]=t?e:JSON.stringify(e)}else s[n]=t?r:JSON.stringify(r);else s[n]=r}return s}async function c(e,t,r){const o=function(e,t){return e?t&&(0,a.Qc)(e)?t:(0,a.CG)(e)??n.id?.findCredential(e)?.token:null}(e,t);if(o)return o;!n.id&&s.A.request.useIdentity&&await Promise.all([i.e(7330),i.e(168),i.e(148)]).then(i.bind(i,50148));const l=await n.id.getCredential(e,r);return l?.token}},6518:(e,t,i)=>{i.d(t,{F:()=>a});var s=i(44208),n=i(75503),r=i(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.wq(9,(0,s.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach((i,s)=>{e[t++]=s}),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter(e=>this._idByBounds.has(e))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,r.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,i){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,i)}(this._index,e,e=>t(this._idByBounds.get(e)))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},36708:(e,t,i)=>{i.d(t,{C_:()=>d,OH:()=>y,Vh:()=>m,on:()=>c,pc:()=>_,wB:()=>l,z7:()=>u});var s=i(37955),n=i(36563),r=i(97768),o=i(74887),a=i(14012);function l(e,t,i={}){return h(e,t,i,p)}function u(e,t,i={}){return h(e,t,i,f)}function h(e,t,i={},s){let n=null;const o=i.once?(e,i)=>{s(e)&&((0,r.xt)(n),t(e,i))}:(e,i)=>{s(e)&&t(e,i)};if(n=(0,a.Cn)(e,o,i.sync,i.equals),i.initial){const t=e();o(t,t)}return n}function c(e,t,i,o={}){let a=null,u=null,h=null;function c(){a&&u&&(u.remove(),o.onListenerRemove?.(a),a=null,u=null)}function d(e){o.once&&o.once&&(0,r.xt)(h),i(e)}const p=l(e,(e,i)=>{c(),(0,s.wb)(e)&&(a=e,u=(0,s.on)(e,t,d),o.onListenerAdd?.(e))},{sync:o.sync,initial:!0});return h=(0,n.hA)(()=>{p.remove(),c()}),h}function d(e,t){return function(e,t,i){if((0,o.G4)(i))return Promise.reject((0,o.NK)());const s=e();if(t?.(s))return Promise.resolve(s);let a=null;function l(){a=(0,r.xt)(a)}return new Promise((s,r)=>{a=(0,n.vE)([(0,o.u7)(i,()=>{l(),r((0,o.NK)())}),h(e,e=>{l(),s(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},m={initial:!0},_={sync:!0,initial:!0}},37730:(e,t,i)=>{i.d(t,{T:()=>n});var s=i(43334);const n={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t)=>new s.Om(t,e.attributes,null,e.objectId),getGeometry:e=>e.geometry,getCentroid:(e,t)=>e.ensureCentroid(t)}},60999:(e,t,i)=>{i.d(t,{DZ:()=>f,Ke:()=>p,Tj:()=>h,UT:()=>y,aD:()=>_,jJ:()=>u});var s=i(31635),n=i(69622),r=i(97768),o=i(74887),a=i(10107),l=i(64108);function u(e,t,i){return(0,o.Lx)(e.map((e,s)=>t.apply(i,[e,s])))}async function h(e,t,i){return(await(0,o.Lx)(e.map((e,s)=>t.apply(i,[e,s])))).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,o.QP)(e),d(e)}}function y(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,r.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,o.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,r.xt)(this._abortHandle),this._abortController=null}};(0,s.Cg)([(0,a.MZ)()],m.prototype,"value",null),(0,s.Cg)([(0,a.MZ)()],m.prototype,"error",null),(0,s.Cg)([(0,a.MZ)()],m.prototype,"finished",null),(0,s.Cg)([(0,a.MZ)()],m.prototype,"promise",void 0),(0,s.Cg)([(0,a.MZ)()],m.prototype,"_result",void 0),m=(0,s.Cg)([(0,l.$)("esri.core.asyncUtils.ReactiveTask")],m);class _{constructor(){this._sequence=Promise.resolve()}async acquire(){let e;this._sequence=new Promise(t=>{e=this._sequence.then(()=>t,()=>t)});const t=await e;return{[Symbol.dispose]:t}}async run(e){const t={stack:[],error:void 0,hasError:!1};try{return(0,s.mS)(t,await this.acquire(),!1),await e()}catch(e){t.error=e,t.hasError=!0}finally{(0,s.hk)(t)}}}},64714:(e,t,i)=>{i.d(t,{F0:()=>a,Vx:()=>h,e2:()=>d,f:()=>p});var s=i(44208),n=i(4718),r=i(99352),o=i(93470);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.Cb:"esriGeometryPolyline"===e?o.yM:o.WR}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function h(e,t){if((0,s.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let i=`this${c(t)} = null;`;for(const t in e)i+=`this${c(t)} = ${JSON.stringify(e[t])};`;const s=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${i};\n }\n }\n `)();return()=>new s}catch(i){return()=>({[t]:null,...e})}}function c(e){return l.test(e)?`.${e}`:`["${e}"]`}function d(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.o8)(e)}}]}function p(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,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:r.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:r.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}}}},66344:(e,t,i)=>{i.d(t,{q:()=>a});const s=!!(0,i(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class n{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.clear()}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,n,o){t=e.id+t;const a=this._db.get(t);if(a&&(this._size-=a.size,e.size-=a.size,this._db.delete(t),a.entry!==i&&this._notifyRemove(t,a.entry,a.size,0)),n>this._maxSize)return void this._notifyRemove(t,i,n,0);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!n||n<0)return s||console.warn(`Refusing to cache entry with size ${n} for key ${t}`),void this._notifyRemove(t,i,0,0);const l=1+Math.max(o,-4)- -3;this._db.set(t,new r(i,n,l)),this._size+=n,e.size+=n,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 s=i.entry.usedMemory;for(;s>this._maxSize;){const e=this._notifyRemove(t,i.entry,s,1);if(!(null!=e&&e>0))return void this._db.delete(t);s=e}i.size=s,this._size+=s,e.size+=s,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,s)=>{const n=e.lifetime;i[n]=(i[n]||0)+e.size,this._users.forEach(i=>{const{id:n,name:r}=i;if(s.startsWith(n)){const i=t[r]||0;t[r]=i+e.size}})});const s={};this._users.forEach(e=>{const i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const n=t[i]||0;t[i]=n,s[i]=Math.round(100*e.hitRate)+"%"}else s[i]="0%"});const n=Object.keys(t);n.sort((e,i)=>t[i]-t[e]),n.forEach(i=>e[i]=Math.round(t[i]/2**20)+"MB / "+s[i]);for(let t=i.length-1;t>=0;--t){const s=i[t];s&&(e["Priority "+(t+-3-1)]=Math.round(s/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,s){const n=this._users.get(e.split(o)[0])?.removeFunc,r=n?.(t,s,i);return"number"==typeof r?r: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 s=t?.id;let n=!0;for(;n;){n=!1;for(const[r,a]of this._db)if(0===a.lifetime&&(!s||r.startsWith(s))){const s=t??this._users.get(r.split(o)[0]);if(this._purgeItem(r,a,s),i.size<=.9*e)return;n||=this._db.has(r)}}for(const[n,r]of this._db)if(!s||n.startsWith(s)){const s=t??this._users.get(n.split(o)[0]);if(this._purgeItem(n,r,s),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 s=this._notifyRemove(e,t.entry,t.size,1);null!=s&&s>0&&(this._size+=s,i&&(i.size+=s),t.lives=t.lifetime,t.size=s,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}new n(0);class r{constructor(e,t,i){this.entry=e,this.size=t,this.lifetime=i,this.lives=i}}const o=":";class a{constructor(e,t){this.removeFunc=t,this._storage=new n,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(){}}},67482:(e,t,i)=>{function s(e){return null!=a(e)||null!=o(e)}function n(e){return l.test(e)}function r(e){return a(e)??o(e)}function o(e){const t=new Date(e);return function(e,t){if(Number.isNaN(e.getTime()))return!1;let i=!0;if(h&&/\d+\W*$/.test(t)){const e=t.match(/[a-zA-Z]{2,}/);if(e){let t=!1,s=0;for(;!t&&s<=e.length;)t=!u.test(e[s]),s++;i=!t}}return i}(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 i=t.groups,s=+i.year,n=+i.month-1,r=+i.day,o=+(i.hours??"0"),a=+(i.minutes??"0"),u=+(i.seconds??"0");if(o>23)return null;if(a>59)return null;if(u>59)return null;const h=i.ms??"0",c=h?+h.padEnd(3,"0").slice(0,3):0;let d;if(i.isUTC||!i.offsetSign)d=Date.UTC(s,n,r,o,a,u,c);else{const e=+i.offsetHours,t=+i.offsetMinutes;d=6e4*("+"===i.offsetSign?-1:1)*(60*e+t)+Date.UTC(s,n,r,o,a,u,c)}return Number.isNaN(d)?null:d}i.d(t,{Br:()=>n,Cq:()=>s,_U:()=>r});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,h=!Number.isNaN(new Date("technology 10").getTime())},69540:(e,t,i)=>{i.d(t,{OU:()=>h,Pw:()=>c});var s=i(31635),n=i(69622),r=(i(44208),i(4718)),o=(i(53966),i(97768)),a=i(88620),l=i(64108);const u=Symbol("ClonableMixin"),h=e=>{var t;const i=e;let n=class extends i{constructor(){super(...arguments),this[t]=!0}static{t=u}clone(e){const t=(0,a.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");const i=t.metadata,s=t.store,n={},l=new Map;for(const t in i){const o=i[t],a=s?.originOf(t),u=o.clonable;if(o.readOnly||!1===u||7!==a&&0!==a&&5!==a&&4!==a)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,r.TU)(h,e),null!=h&&null==c)continue;0===a?l.set(t,c):n[t]=c}const u=new(0,Object.getPrototypeOf(this).constructor)(n);if(l.size){const e=(0,a.oY)(u)?.store;if(e)for(const[t,i]of l)e.set(t,i,0)}return u}};return n=(0,s.Cg)([(0,l.$)("esri.core.Clonable")],n),n},c=h(n.A)},71202:(e,t,i)=>{i.r(t),i.d(t,{default:()=>I});var s=i(11254),n=i(60999),r=i(49186),o=i(53966),a=i(74887),l=i(65864),u=i(21325),h=i(90708),c=i(83221),d=i(31464),p=i(56390),f=i(85113),y=i(64714),m=i(82832),_=i(95466),g=i(98453),b=i(30524),x=i(98623);const S={hasAttachments:!1,capabilities:"query, editing, create, delete, update",useStandardizedQueries:!0,supportsCoordinatesQuantization:!0,supportsReturningQueryGeometry:!0,advancedQueryCapabilities:{supportsQueryAttachments:!1,supportsQueryAttachmentOrderByFields:!1,supportsQueryAttachmentWithTypeWildcard:!1,supportsQueryBins:!0,supportsQueryPivot:!1,supportsQueryWithCacheHint:!0,supportsQueryWithDistance:!0,supportsQueryWithResultType:!0,supportsStatistics:!0,supportsPercentileStatistics:!0,supportsReturningGeometryCentroid:!0,supportsDistinct:!0,supportsReturningQueryExtent:!0,supportsReturningGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsSqlExpression:!0,supportsDisjointSpatialRel:!0},queryBinsCapabilities:m.PC};class I{constructor(){this._queryEngine=null,this._snapshotFeatures=async e=>{const t=await this._fetch(e);return this._createFeatures(t)}}destroy(){this._queryEngine?.destroy(),this._queryEngine=this._createDefaultAttributes=null}async load(e,t={}){this._loadOptions={url:e.url,customParameters:e.customParameters};const i=[],[s]=await Promise.all([e.url?this._fetch(t?.signal):null,this._checkProjection(e.spatialReference)]),n=(0,f.BM)(s,{geometryType:e.geometryType}),o=e.fields||n.fields||[],a=null!=e.hasZ?e.hasZ:n.hasZ,l=n.geometryType;let h=e.objectIdField||n.objectIdFieldName||"__OBJECTID";const d=e.spatialReference||u.KK;let m=e.timeInfo;o===n.fields&&n.unknownFields.length>0&&i.push({name:"geojson-layer:unknown-field-types",message:"Some fields types couldn't be inferred from the features and were dropped",details:{unknownFields:n.unknownFields}});const I=new _.A(o);let w=I.get(h);w?("esriFieldTypeString"!==w.type&&(w.type="esriFieldTypeOID"),w.editable=!1,w.nullable=!1,h=w.name):(w={alias:h,name:h,type:"string"===n.objectIdFieldType?"esriFieldTypeString":"esriFieldTypeOID",editable:!1,nullable:!1},o.unshift(w));const F={};for(const e of o){if(null==e.name&&(e.name=e.alias),null==e.alias&&(e.alias=e.name),!e.name)throw new r.A("geojson-layer:invalid-field-name","field name is missing",{field:e});if(!g.m.jsonValues.includes(e.type))throw new r.A("geojson-layer:invalid-field-type",`invalid type for field "${e.name}"`,{field:e});if(e.name!==w.name){const t=(0,b.lD)(e);void 0!==t&&(F[e.name]=t)}null==e.length&&(e.length=(0,b._b)(e))}if(m){if(m.startTimeField){const e=I.get(m.startTimeField);e?(m.startTimeField=e.name,e.type="esriFieldTypeDate"):m.startTimeField=null}if(m.endTimeField){const e=I.get(m.endTimeField);e?(m.endTimeField=e.name,e.type="esriFieldTypeDate"):m.endTimeField=null}if(m.trackIdField){const e=I.get(m.trackIdField);e?m.trackIdField=e.name:(m.trackIdField=null,i.push({name:"geojson-layer:invalid-timeInfo-trackIdField",message:"trackIdField is missing",details:{timeInfo:m}}))}m.startTimeField||m.endTimeField||(i.push({name:"geojson-layer:invalid-timeInfo",message:"startTimeField and endTimeField are missing",details:{timeInfo:m}}),m=null)}const M=l?(0,y.F0)(l):void 0,B=I.dateFields.length?{timeZoneIANA:x.n$}:null,v={warnings:i,featureErrors:[],layerDefinition:{...S,drawingInfo:M??void 0,templates:(0,y.e2)(F),extent:void 0,geometryType:l,objectIdField:h,fields:o,hasZ:!!a,timeInfo:m,dateFieldsTimeReference:B}},T={type:"object-id",fieldName:h};this._queryEngine=new p.do({fieldsIndex:_.A.fromLayerJSON({fields:o,timeInfo:m,dateFieldsTimeReference:B}),geometryType:l,hasM:!1,hasZ:a,featureIdInfo:T,spatialReference:d,timeInfo:m,featureStore:new c.A({geometryType:l,hasM:!1,hasZ:a})});const E=this._queryEngine.fieldsIndex.requiredFields.indexOf(w);E>-1&&this._queryEngine.fieldsIndex.requiredFields.splice(E,1),this._createDefaultAttributes=(0,y.Vx)(F,h);const z=this._createFeatures(s);this._objectIdGenerator=this._createObjectIdGenerator(this._queryEngine,z);const A=this._normalizeFeatures(z,v.featureErrors);this._queryEngine.featureStore.addMany(A);const{fullExtent:C,timeExtent:R}=await this._queryEngine.fetchRecomputedExtents();if(v.layerDefinition.extent=C,R){const{start:e,end:t}=R;v.layerDefinition.timeInfo.timeExtent=[e,t]}return v}async applyEdits(e){const{spatialReference:t,geometryType:i}=this._queryEngine;return await Promise.all([(0,m.$1)(t,i),(0,d.Nk)(e.adds,t),(0,d.Nk)(e.updates,t)]),await this._waitSnapshotComplete(),this._applyEdits(e)}async queryFeatures(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(e,t.signal)}async queryFeatureCount(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(e,t.signal)}async queryObjectIds(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForIds(e,t.signal)}async queryExtent(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(e,t.signal)}async querySnapping(e,t={}){return await this._waitSnapshotComplete(),await this._queryEngine.executeQueryForSnapping(e,t.signal)}async queryAttributeBins(e,t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeAttributeBinsQuery(e,t.signal)}async refresh(e){this._loadOptions.customParameters=e,this._snapshotTask?.abort(),this._snapshotTask=(0,n.UT)(this._snapshotFeatures),this._snapshotTask.promise.then(e=>{this._queryEngine.featureStore.clear(),this._objectIdGenerator=this._createObjectIdGenerator(this._queryEngine,e);const t=this._normalizeFeatures(e);t&&this._queryEngine.featureStore.addMany(t)},e=>{this._queryEngine.featureStore.clear(),(0,a.zf)(e)||o.A.getLogger("esri.layers.GeoJSONLayer").error(new r.A("geojson-layer:refresh","An error occurred during refresh",{error:e}))}),await this._waitSnapshotComplete();const{fullExtent:t,timeExtent:i}=await this._queryEngine.fetchRecomputedExtents();return{extent:t,timeExtent:i}}_createFeatures(e){if(null==e)return[];const{geometryType:t,hasZ:i,objectIdField:s}=this._queryEngine,n=(0,f.bd)(e,{geometryType:t,hasZ:i,objectIdField:s});if(!(0,u.aI)(this._queryEngine.spatialReference,u.KK))for(const e of n)null!=e.geometry&&(e.geometry=(0,h.Ux)((0,d.Cv)((0,h.zv)(e.geometry,this._queryEngine.geometryType,this._queryEngine.hasZ,!1),u.KK,this._queryEngine.spatialReference)));return n}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _fetch(e){const{url:t,customParameters:i}=this._loadOptions,n=(await(0,s.A)(t??"",{responseType:"json",query:{...i},signal:e})).data;return(0,f.sO)(n),n}_normalizeFeatures(e,t){const{objectIdField:i,fieldsIndex:s}=this._queryEngine,n=[];for(const r of e){const e=this._createDefaultAttributes(),o=(0,m.MB)(s,e,r.attributes,!0);o?t?.push(o):(this._assignObjectId(e,r.attributes,!0),r.attributes=e,r.objectId=e[i],n.push(r))}return n}async _applyEdits(e){const{adds:t,updates:i,deletes:s}=e,n={addResults:[],deleteResults:[],updateResults:[],uidToObjectId:{}};if(t?.length&&this._applyAddEdits(n,t),i?.length&&this._applyUpdateEdits(n,i),s?.length){for(const e of s)n.deleteResults.push((0,m.bP)(e));this._queryEngine.featureStore.removeManyById(s)}const{fullExtent:r,timeExtent:o}=await this._queryEngine.fetchRecomputedExtents();return{extent:r,timeExtent:o,featureEditResults:n}}_applyAddEdits(e,t){const{addResults:i}=e,{geometryType:s,hasM:n,hasZ:r,objectIdField:o,spatialReference:a,featureStore:u,fieldsIndex:c}=this._queryEngine,p=[],f={type:"object-id",fieldName:o};for(const n of t){if(n.geometry&&s!==(0,l.$B)(n.geometry)){i.push((0,m.Yx)("Incorrect geometry type."));continue}const t=this._createDefaultAttributes(),r=(0,m.MB)(c,t,n.attributes);if(r)i.push(r);else{if(this._assignObjectId(t,n.attributes),n.attributes=t,null!=n.uid){const t=n.attributes[o];e.uidToObjectId[n.uid]=t}if(null!=n.geometry){const e=n.geometry.spatialReference??a;n.geometry=(0,d.Cv)((0,m.CR)(n.geometry,e),e,a)}p.push(n),i.push((0,m.bP)(n.attributes[o]))}}u.addMany((0,h.Di)([],p,s,r,n,f))}_applyUpdateEdits({updateResults:e},t){const{geometryType:i,hasM:s,hasZ:n,objectIdField:r,spatialReference:o,featureStore:a,fieldsIndex:u}=this._queryEngine,c={type:"object-id",fieldName:r};for(const p of t){const{attributes:t,geometry:f}=p,y=t?.[r];if(null==y){e.push((0,m.Yx)(`Identifier field ${r} missing`));continue}if(!a.has(y)){e.push((0,m.Yx)(`Feature with object id ${y} missing`));continue}const _=(0,h.oN)(a.getFeature(y),i,n,s);if(null!=f){if(i!==(0,l.$B)(f)){e.push((0,m.Yx)("Incorrect geometry type."));continue}const t=f.spatialReference??o;_.geometry=(0,d.Cv)((0,m.CR)(f,t),t,o)}if(t){const i=(0,m.MB)(u,_.attributes,t);if(i){e.push(i);continue}}a.add((0,h.E2)(_,i,n,s,c)),e.push((0,m.bP)(y))}}_createObjectIdGenerator(e,t){const i=e.fieldsIndex.get(e.objectIdField);if("esriFieldTypeString"===i.type)return()=>i.name+"-"+Date.now().toString(16);let s=Number.NEGATIVE_INFINITY;for(const e of t)e.objectId&&(s=Math.max(s,e.objectId));return s=Math.max(0,s)+1,()=>s++}_assignObjectId(e,t,i=!1){const s=this._queryEngine.objectIdField;e[s]=i&&s in t?t[s]:this._objectIdGenerator()}async _checkProjection(e){try{await(0,d.Nk)(u.KK,e)}catch{throw new r.A("geojson-layer","Projection not supported")}}}},75503:(e,t,i)=>{i.d(t,{EC:()=>M,wq:()=>a});var s=i(4576),n=i(21818),r=(i(44208),i(15142)),o=i(11006);class a{constructor(e=9,t){this._compareMinX=d,this._compareMinY=p,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),S.prune(),I.prune(),w.prune(),F.prune()}all(e){l(this._data,e)}search(e,t){let i=this._data;const s=this._toBBox;if(b(e,i))for(S.clear();i;){for(let n=0,r=i.children.length;n<r;n++){const r=i.children[n],o=i.leaf?s(r):r;b(e,o)&&(i.leaf?t(r):g(e,o)?l(r,t):S.push(r))}i=S.pop()}}collides(e){let t=this._data;const i=this._toBBox;if(!b(e,t))return!1;for(S.clear();t;){for(let s=0,n=t.children.length;s<n;s++){const n=t.children[s],r=t.leaf?i(n):n;if(b(e,r)){if(t.leaf||g(e,r))return!0;S.push(n)}}t=S.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,i=e.length;t<i;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new v([]),this}remove(e){if(!e)return this;let t,i=this._data,r=null,o=0,a=!1;const l=this._toBBox(e);for(w.clear(),F.clear();i||w.length>0;){if(i||(i=w.pop(),r=w.data[w.length-1],o=F.pop()??0,a=!0),i.leaf&&(t=(0,s.qh)(i.children,(0,n.zI)(e),i.children.length,i.indexHint),-1!==t))return i.children.splice(t,1),w.push(i),this._condense(w),this;a||i.leaf||!g(i,l)?r?(o++,i=r.children[o],a=!1):i=null:(w.push(i),F.push(o),o=0,r=i,i=i.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,i,s){const n=i-t+1;let r=this._maxEntries;if(n<=r){const s=new v(e.slice(t,i+1));return u(s,this._toBBox),s}s||(s=Math.ceil(Math.log(n)/Math.log(r)),r=Math.ceil(n/r**(s-1)));const o=new T([]);o.height=s;const a=Math.ceil(n/r),l=a*Math.ceil(Math.sqrt(r));x(e,t,i,l,this._compareMinX);for(let n=t;n<=i;n+=l){const t=Math.min(n+l-1,i);x(e,n,t,a,this._compareMinY);for(let i=n;i<=t;i+=a){const n=Math.min(i+a-1,t);o.children.push(this._build(e,i,n,s-1))}}return u(o,this._toBBox),o}_insert(e,t,i){const s=this._toBBox,n=i?e:s(e);w.clear();const r=function(e,t,i,s){for(;s.push(t),!0!==t.leaf&&s.length-1!==i;){let i,s=1/0,n=1/0;for(let r=0,o=t.children.length;r<o;r++){const o=t.children[r],a=f(o),l=m(e,o)-a;l<n?(n=l,s=a<s?a:s,i=o):l===n&&a<s&&(s=a,i=o)}t=i||t.children[0]}return t}(n,this._data,t,w);for(r.children.push(e),c(r,n);t>=0&&w.data[t].children.length>this._maxEntries;)this._split(w,t),t--;!function(e,t,i){for(let s=i;s>=0;s--)c(t.data[s],e)}(n,w,t)}_split(e,t){const i=e.data[t],s=i.children.length,n=this._minEntries;this._chooseSplitAxis(i,n,s);const r=this._chooseSplitIndex(i,n,s);if(!r)return;const o=i.children.splice(r,i.children.length-r),a=i.leaf?new v(o):new T(o);a.height=i.height,u(i,this._toBBox),u(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(i,a)}_splitRoot(e,t){this._data=new T([e,t]),this._data.height=e.height+1,u(this._data,this._toBBox)}_chooseSplitIndex(e,t,i){let s,n,r;s=n=1/0;for(let o=t;o<=i-t;o++){const t=h(e,0,o,this._toBBox),a=h(e,o,i,this._toBBox),l=_(t,a),u=f(t)+f(a);l<s?(s=l,r=o,n=u<n?u:n):l===s&&u<n&&(n=u,r=o)}return r}_chooseSplitAxis(e,t,i){const s=e.leaf?this._compareMinX:d,n=e.leaf?this._compareMinY:p;this._allDistMargin(e,t,i,s)<this._allDistMargin(e,t,i,n)&&e.children.sort(s)}_allDistMargin(e,t,i,s){e.children.sort(s);const n=this._toBBox,r=h(e,0,t,n),o=h(e,i-t,i,n);let a=y(r)+y(o);for(let s=t;s<i-t;s++){const t=e.children[s];c(r,e.leaf?n(t):t),a+=y(r)}for(let s=i-t-1;s>=t;s--){const t=e.children[s];c(o,e.leaf?n(t):t),a+=y(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const i=e.data[t];if(0===i.children.length)if(t>0){const n=e.data[t-1],r=n.children;r.splice((0,s.qh)(r,i,r.length,n.indexHint),1)}else this.clear();else u(i,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let i=e;for(I.clear();i;){if(!0===i.leaf)for(const e of i.children)t((0,n.zI)(e));else I.pushArray(i.children);i=I.pop()??null}}function u(e,t){h(e,0,e.children.length,t,e)}function h(e,t,i,s,n){n||(n=new v([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let r,o=t;o<i;o++)r=e.children[o],c(n,e.leaf?s(r):r);return n}function c(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function d(e,t){return e.minX-t.minX}function p(e,t){return e.minY-t.minY}function f(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function y(e){return e.maxX-e.minX+(e.maxY-e.minY)}function m(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function _(e,t){const i=Math.max(e.minX,t.minX),s=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),r=Math.min(e.maxY,t.maxY);return Math.max(0,n-i)*Math.max(0,r-s)}function g(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function b(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function x(e,t,i,s,n){const r=[t,i];for(;r.length;){const t=r.pop(),i=r.pop();if(t-i<=s)continue;const a=i+Math.ceil((t-i)/s/2)*s;(0,o.q)(e,a,i,t,n),r.push(i,a,a,t)}}const S=new r.A,I=new r.A,w=new r.A,F=new r.A({deallocator:void 0});class M{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class B extends M{constructor(){super(...arguments),this.height=1,this.indexHint=new s.vW}}class v extends B{constructor(e){super(),this.children=e,this.leaf=!0}}class T extends B{constructor(e){super(),this.children=e,this.leaf=!1}}},82832:(e,t,i)=>{i.d(t,{$1:()=>m,CR:()=>y,MB:()=>d,PC:()=>_,Yx:()=>l,bP:()=>h});var s=i(67482),n=i(21325),r=i(30524);class o{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 o(e)}}function l(e){return new a(e)}class u{constructor(e){this.globalId=null,this.success=!0,this.objectId=this.uniqueId=e}}function h(e){return new u(e)}const c=new Set;function d(e,t,i,s=!1){c.clear();for(const n in i){const o=e.get(n);if(!o)continue;const a=p(o,i[n]);if(c.add(o.name),o&&(s||o.editable)){const e=(0,r.CJ)(o,a);if(e)return l((0,r.uo)(e,o,a));t[o.name]=a}}for(const t of e.requiredFields??[])if(!c.has(t.name))return l(`missing required field "${t.name}"`);return null}function p(e,t){let i=t;return(0,r.WA)(e)&&"string"==typeof t?i=parseFloat(t):(0,r.yM)(e)&&null!=t&&"string"!=typeof t?i=String(t):(0,r.vE)(e)&&"string"==typeof t&&(i=(0,s._U)(t)),(0,r.WX)(i)}let f;function y(e,t){if(!e||!(0,n.fn)(t))return e;if("rings"in e||"paths"in e){if(null==f)throw new TypeError("geometry engine not loaded");return f.simplify(t,e)}return e}async function m(e,t){!(0,n.fn)(e)||"esriGeometryPolygon"!==t&&"esriGeometryPolyline"!==t||await async function(){return null==f&&(f=await i.e(1023).then(i.bind(i,81023))),f}()}const _={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"]}},83221:(e,t,i)=>{i.d(t,{A:()=>f});var s=i(4576),n=i(49186),r=i(65529),o=i(53966),a=i(70328),l=i(19419),u=i(90708),h=i(6518),c=i(51441),d=i(37730);const p=(0,a.vt)();class f{constructor(e){this.geometryInfo=e,this._boundsStore=new h.F,this._featuresById=new Map,this._usedMemory=0,this.events=new r.bk,this.featureAdapter=d.T}get usedMemory(){return this._usedMemory}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach(t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)}),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,i,s,n]=this.fullBounds;return{xmin:t,ymin:i,xmax:s,ymax:n,spatialReference:(0,c.ag)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map(e=>this._upsert(e));return this._emitChanged(),t.filter(s.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged(),this._usedMemory=0}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const i of e){const e=this._boundsStore.get(i.objectId);e&&t((0,a.Jt)(p,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach(t=>e(t))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,e=>{t(this._featuresById.get(e))})}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const i=this._featuresById.get(t);let s;if(i?(e.displayId=i.displayId,s=this._boundsStore.get(t),this._boundsStore.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);s=(0,u.jQ)(null!=s?s:(0,l.vt)(),e.geometry),null!=s&&this._boundsStore.set(t,s),this._featuresById.set(t,e),this._usedMemory+=this.estimateFeatureUsedMemory?.(e)??0}_upsert(e){const t=e?.objectId;if(null==t)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const i=this._featuresById.get(t);if(!i)return this._add(e),e;this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0;const{geometry:s,attributes:r}=e;for(const e in r)i.attributes[e]=r[e];return s&&(i.geometry=s,this._boundsStore.set(t,(0,u.jQ)((0,l.vt)(),s)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(i)??0,i}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(e)??0,e}}},85113:(e,t,i)=>{i.d(t,{BM:()=>M,bd:()=>B,sO:()=>F,xD:()=>c});var s=i(67482),n=i(49186),r=i(21325),o=i(90708),a=i(43334),l=i(92722),u=i(30524);const h={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function c(e){return h[e]}function*d(e){switch(e.type){case"Feature":yield e;break;case"FeatureCollection":for(const t of e.features)t&&(yield t)}}function*p(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 f(e){for(const t of e)if(t.length>2)return!0;return!1}function y(e){let t=0;for(let i=0;i<e.length;i++){const s=e[i],n=e[(i+1)%e.length];t+=s[0]*n[1]-n[0]*s[1]}return t<=0}function m(e){const t=e[0],i=e[e.length-1];t[0]===i[0]&&t[1]===i[1]&&t[2]===i[2]||e.push(t)}function _(e,t){const{coordinates:i,type:s}=e,n=t.hasZ??!1,r=!0;switch(s){case"Point":return new l.A([],[...i],n,!1);case"LineString":return(0,o.Ap)({paths:[i],hasZ:r},n,!1);case"MultiLineString":return(0,o.Ap)({paths:i,hasZ:r},n,!1);case"MultiPoint":return(0,o.PR)({points:i,hasZ:r},n,!1);case"Polygon":case"MultiPolygon":{const e=new l.A([],[],n,!1);for(const t of"Polygon"===s?[i]:i){g(e,t[0],n);for(let i=1;i<t.length;i++)b(e,t[i],n)}return e}}}function g(e,t,i){m(t),function(e){return!y(e)}(t)?S(e,t,i):x(e,t,i)}function b(e,t,i){m(t),function(e){return y(e)}(t)?S(e,t,i):x(e,t,i)}function x(e,t,i){for(const s of t)I(e,s,i);e.lengths.push(t.length)}function S(e,t,i){for(let s=t.length-1;s>=0;s--)I(e,t[s],i);e.lengths.push(t.length)}function I(e,[t,i,s],n){e.coords.push(t,i),n&&e.coords.push(s||0)}function w(e){switch(typeof e){case"string":return(0,s.Br)(e)?"esriFieldTypeDate":"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function F(e,t=4326){if(!e)throw new n.A("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==e.type&&"FeatureCollection"!==e.type)throw new n.A("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:e});const{crs:i}=e;if(!i)return;const s="string"==typeof i?i:"name"===i.type?i.properties.name:"EPSG"===i.type?i.properties.code:null,o=(0,r.oT)({wkid:t})?new RegExp(".*(CRS84H?|4326)$","i"):new RegExp(`.*(${t})$`,"i");if(!s||!o.test(s))throw new n.A("geojson:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:i})}function M(e,t={}){const i=[],s=new Set,n=new Set;let r,o=!1,a=null,l=!1,{geometryType:h=null}=t;for(const t of d(e)){const{geometry:e,properties:d,id:y}=t;if((!e||(h||(h=c(e.type)),c(e.type)===h))&&(o||(o=f(p(e))),l||(l=null!=y,l&&(r=typeof y,d&&(a=Object.keys(d).filter(e=>d[e]===y)))),d&&a&&l&&null!=y&&(a.length>1?a=a.filter(e=>d[e]===y):1===a.length&&(a=d[a[0]]===y?a:[])),d))for(const e in d){if(s.has(e))continue;const t=w(d[e]);if("unknown"===t){n.add(e);continue}n.delete(e),s.add(e);const r=(0,u.rS)(e);r&&i.push({name:r,alias:e,type:t})}}const y=(0,u.rS)(1===a?.length&&a[0]||null)??void 0;if(y)for(const e of i)if(e.name===y&&(0,u.WA)(e)){e.type="esriFieldTypeOID";break}return{fields:i,geometryType:h,hasZ:o,objectIdFieldName:y,objectIdFieldType:r,unknownFields:Array.from(n)}}function B(e,t){return Array.from(function*(e,t={}){const{geometryType:i,objectIdField:s}=t;for(const n of e){const{geometry:e,properties:r,id:o}=n;if(e&&c(e.type)!==i)continue;const l=r||{};let u;s&&(u=l[s],null==o||u||(l[s]=u=o)),yield new a.Om(e&&_(e,t),l,null,u)}}(d(e),t))}},93470:(e,t,i)=>{i.d(t,{Cb:()=>r,HW:()=>h,JR:()=>n,JZ:()=>l,WR:()=>a,b6:()=>c,fT:()=>s,nC:()=>u,yM:()=>o});const s=[252,146,31,255],n=[153,153,153,255],r={type:"esriSMS",style:"esriSMSCircle",size:6,color:s,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:s},a={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},l={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},u={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},h={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},c={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}},98453:(e,t,i)=>{i.d(t,{m:()=>s});const s=new(i(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7836],{22141:(n,t,r)=>{r.d(t,{$5:()=>x,CN:()=>y,JP:()=>d,KM:()=>T,Mv:()=>R,X4:()=>A,gr:()=>w,qs:()=>b,si:()=>v,xA:()=>C});var e=r(34727),o=r(77690),i=r(29242),u=r(58083),a=r(9093),c=r(38954),l=r(51850),s=r(48353),f=r(9762),p=(r(79258),r(21325)),h=r(28735),g=r(13030),m=r(73354),M=r(65686);const d="Projection may be possible after calling projection.load().";function y(n,t,r,e){n.error(`Failed to project from (wkid:${t.wkid}) to (wkid:${r.wkid}).${e?" ":""}${e}`)}function A(n,t,r,e,o,i){return F(0,g.xs.fromTypedArray(n),0,g.Xm.fromTypedArray(t),r,g.Xm.fromTypedArray(e),o,g.xs.fromTypedArray(i))?i:null}function v(n,t,r,e,o,i){return F(1,g.xs.fromTypedArray(n),0,g.Xm.fromTypedArray(t),r,g.Xm.fromTypedArray(e),o,g.xs.fromTypedArray(i))?i:null}function w(n,t,r,e){return(0,f.projectBuffer)(n,t,0,r,e,0)?r:null}function x(n,t,r,e){return(0,f.projectBuffer)(n,t,0,r,e,0)?r:null}function b(n,t,r){return(0,o.Ge)(E,r),(0,m.b)(t,n,E),(0,e.or)(E)&&(0,m.n)(t,t),t}function T(n,t,r){return(0,o.z0)(E,r),(0,M.t)(t,n,E),(0,e.or)(E)&&(0,m.n)(t,t,4),t}function C(n,t,r,e,o,i){if(!F(0,g.xs.fromTypedArray(n,4*Float32Array.BYTES_PER_ELEMENT),1,g.Xm.fromTypedArray(t),r,g.Xm.fromTypedArray(e),o,g.xs.fromTypedArray(i,4*Float32Array.BYTES_PER_ELEMENT)))return null;for(let t=3;t<n.length;t+=4)i[t]=n[t];return i}function R(n,t,r,e,o,i){if(!F(1,g.xs.fromTypedArray(n,16),1,g.Xm.fromTypedArray(t),r,g.Xm.fromTypedArray(e),o,g.xs.fromTypedArray(i,16)))return null;for(let t=3;t<n.length;t+=4)i[t]=n[t];return i}function q(n,t,r,e,i){switch((0,s.l)(e,r,k,e),1===n&&(0,u.B8)(k,k),t){case 0:return(0,o.Ge)(i,k);case 1:return(0,o.z0)(i,k)}}function F(n,t,r,e,o,i,u,a){if(!t)return;const l=e.count;if(function(n){return n.isWGS84||(0,p.x1)(n)||(0,p.q8)(n)||(0,p.KQ)(n)}(o))for(let e=0;e<l;e++)i.getVec(e,S),t.getVec(e,N),(0,c.t)(N,N,q(n,r,S,u,E)),a.setVec(e,N);else for(let o=0;o<l;o++){i.getVec(o,S),t.getVec(o,N);const l=(0,h.jg)(e.get(o,1));let s=Math.cos(l);1===r!=(0===n)&&(s=1/s),q(n,r,S,u,E),0===n?(E[0]*=s,E[1]*=s,E[2]*=s,E[3]*=s,E[4]*=s,E[5]*=s):(E[0]*=s,E[3]*=s,E[6]*=s,E[1]*=s,E[4]*=s,E[7]*=s),(0,c.t)(N,N,E),(0,c.n)(N,N),a.setVec(o,N)}return a}const S=(0,l.vt)(),N=(0,l.vt)(),k=(0,a.vt)(),E=(0,i.vt)()},27615:(n,t,r)=>{r.d(t,{CK:()=>c,Hq:()=>a,MW:()=>l,TE:()=>s,yJ:()=>f});var e=r(38954),o=r(86738),i=r(95696),u=r(18251);function a(n){return null!=n.origin}function c(n){return a(n.vertexSpace)}function l(n,t){if(!a(n))return null;const[r,e,i]=n.origin;return new o.A({x:r,y:e,z:i,spatialReference:t})}function s(n,t){const{x:r,y:e,z:o,spatialReference:a}=n,c=[r,e,o??0];return"local"===(t?.vertexSpace??function(n){return n.isGeographic||n.isWebMercator?"local":"georeferenced"}(a))?new u.A({origin:c}):new i.A({origin:c})}function f(n,t){return n.type===t.type&&(n.origin===t.origin||null!=n.origin&&null!=t.origin&&(0,e.m)(n.origin,t.origin))}},38954:(n,t,r)=>{r.d(t,{A:()=>s,B:()=>f,C:()=>y,D:()=>z,E:()=>v,F:()=>_,G:()=>U,H:()=>I,a:()=>X,b:()=>i,c:()=>d,d:()=>u,e:()=>l,f:()=>C,g:()=>T,h:()=>a,i:()=>c,j:()=>M,l:()=>R,m:()=>E,n:()=>b,o:()=>x,p:()=>q,q:()=>w,r:()=>S,s:()=>A,t:()=>F,u:()=>p,v:()=>O,w:()=>K,x:()=>m,y:()=>g,z:()=>h});var e=r(51850),o=r(34304);function i(n){const t=n[0],r=n[1],e=n[2];return Math.sqrt(t*t+r*r+e*e)}function u(n,t){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n}function a(n,t,r,e){return n[0]=t,n[1]=r,n[2]=e,n}function c(n,t,r){return n[0]=t[0]+r[0],n[1]=t[1]+r[1],n[2]=t[2]+r[2],n}function l(n,t,r){return n[0]=t[0]-r[0],n[1]=t[1]-r[1],n[2]=t[2]-r[2],n}function s(n,t,r){return n[0]=t[0]*r[0],n[1]=t[1]*r[1],n[2]=t[2]*r[2],n}function f(n,t,r){return n[0]=t[0]/r[0],n[1]=t[1]/r[1],n[2]=t[2]/r[2],n}function p(n,t){return n[0]=Math.abs(t[0]),n[1]=Math.abs(t[1]),n[2]=Math.abs(t[2]),n}function h(n,t){return n[0]=Math.sign(t[0]),n[1]=Math.sign(t[1]),n[2]=Math.sign(t[2]),n}function g(n,t,r){return n[0]=Math.min(t[0],r[0]),n[1]=Math.min(t[1],r[1]),n[2]=Math.min(t[2],r[2]),n}function m(n,t,r){return n[0]=Math.max(t[0],r[0]),n[1]=Math.max(t[1],r[1]),n[2]=Math.max(t[2],r[2]),n}function M(n,t,r){return n[0]=t[0]*r,n[1]=t[1]*r,n[2]=t[2]*r,n}function d(n,t,r,e){return n[0]=t[0]+r[0]*e,n[1]=t[1]+r[1]*e,n[2]=t[2]+r[2]*e,n}function y(n,t){const r=t[0]-n[0],e=t[1]-n[1],o=t[2]-n[2];return Math.sqrt(r*r+e*e+o*o)}function A(n,t){const r=t[0]-n[0],e=t[1]-n[1],o=t[2]-n[2];return r*r+e*e+o*o}function v(n){const t=n[0],r=n[1],e=n[2];return t*t+r*r+e*e}function w(n,t){return n[0]=-t[0],n[1]=-t[1],n[2]=-t[2],n}function x(n,t){return n[0]=1/t[0],n[1]=1/t[1],n[2]=1/t[2],n}function b(n,t){const r=t[0],e=t[1],o=t[2];let i=r*r+e*e+o*o;return i>0&&(i=1/Math.sqrt(i),n[0]=t[0]*i,n[1]=t[1]*i,n[2]=t[2]*i),n}function T(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function C(n,t,r){const e=t[0],o=t[1],i=t[2],u=r[0],a=r[1],c=r[2];return n[0]=o*c-i*a,n[1]=i*u-e*c,n[2]=e*a-o*u,n}function R(n,t,r,e){const o=t[0],i=t[1],u=t[2];return n[0]=o+e*(r[0]-o),n[1]=i+e*(r[1]-i),n[2]=u+e*(r[2]-u),n}function q(n,t,r){const e=t[0],o=t[1],i=t[2];return n[0]=r[0]*e+r[4]*o+r[8]*i+r[12],n[1]=r[1]*e+r[5]*o+r[9]*i+r[13],n[2]=r[2]*e+r[6]*o+r[10]*i+r[14],n}function F(n,t,r){const e=t[0],o=t[1],i=t[2];return n[0]=e*r[0]+o*r[3]+i*r[6],n[1]=e*r[1]+o*r[4]+i*r[7],n[2]=e*r[2]+o*r[5]+i*r[8],n}function S(n,t,r){const e=r[0],o=r[1],i=r[2],u=r[3],a=t[0],c=t[1],l=t[2],s=o*l-i*c,f=i*a-e*l,p=e*c-o*a,h=o*p-i*f,g=i*s-e*p,m=e*f-o*s,M=2*u;return n[0]=a+s*M+2*h,n[1]=c+f*M+2*g,n[2]=l+p*M+2*m,n}const N=(0,e.vt)(),k=(0,e.vt)();function E(n,t){return n[0]===t[0]&&n[1]===t[1]&&n[2]===t[2]}function _(n,t){if(n===t)return!0;const r=n[0],e=n[1],i=n[2],u=t[0],a=t[1],c=t[2],l=(0,o.FD)();return Math.abs(r-u)<=l*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(e-a)<=l*Math.max(1,Math.abs(e),Math.abs(a))&&Math.abs(i-c)<=l*Math.max(1,Math.abs(i),Math.abs(c))}function z(n,t,r){const e=r[0]-t[0],o=r[1]-t[1],i=r[2]-t[2];let u=e*e+o*o+i*i;return u>0?(u=1/Math.sqrt(u),n[0]=e*u,n[1]=o*u,n[2]=i*u,n):(n[0]=0,n[1]=0,n[2]=0,n)}const X=l,j=s,B=f,U=y,O=A,I=i,K=v;Object.freeze(Object.defineProperty({__proto__:null,abs:p,add:c,angle:function(n,t){b(N,n),b(k,t);const r=T(N,k);return r>1?0:r<-1?Math.PI:Math.acos(r)},bezier:function(n,t,r,e,o,i){const u=1-i,a=u*u,c=i*i,l=a*u,s=3*i*a,f=3*c*u,p=c*i;return n[0]=t[0]*l+r[0]*s+e[0]*f+o[0]*p,n[1]=t[1]*l+r[1]*s+e[1]*f+o[1]*p,n[2]=t[2]*l+r[2]*s+e[2]*f+o[2]*p,n},ceil:function(n,t){return n[0]=Math.ceil(t[0]),n[1]=Math.ceil(t[1]),n[2]=Math.ceil(t[2]),n},clamp:function(n,t=0,r=1){return n[0]=Math.min(Math.max(n[0],t),r),n[1]=Math.min(Math.max(n[1],t),r),n[2]=Math.min(Math.max(n[2],t),r),n},copy:u,cross:C,crossAndNormalize:function(n,t,r){const e=t[0],o=t[1],i=t[2],u=r[0],a=r[1],c=r[2],l=o*c-i*a,s=i*u-e*c,f=e*a-o*u,p=Math.sqrt(l*l+s*s+f*f);return n[0]=l/p,n[1]=s/p,n[2]=f/p,n},direction:z,dist:U,distance:y,div:B,divide:f,dot:T,equals:_,exactEquals:E,floor:function(n,t){return n[0]=Math.floor(t[0]),n[1]=Math.floor(t[1]),n[2]=Math.floor(t[2]),n},hermite:function(n,t,r,e,o,i){const u=i*i,a=u*(2*i-3)+1,c=u*(i-2)+i,l=u*(i-1),s=u*(3-2*i);return n[0]=t[0]*a+r[0]*c+e[0]*l+o[0]*s,n[1]=t[1]*a+r[1]*c+e[1]*l+o[1]*s,n[2]=t[2]*a+r[2]*c+e[2]*l+o[2]*s,n},inverse:x,len:I,length:i,lerp:R,max:m,min:g,mul:j,multiply:s,negate:w,normalize:b,random:function(n,t=1){const r=o.Ov,e=2*r()*Math.PI,i=2*r()-1,u=Math.sqrt(1-i*i)*t;return n[0]=Math.cos(e)*u,n[1]=Math.sin(e)*u,n[2]=i*t,n},rotateX:function(n,t,r,e){const o=[],i=[];return o[0]=t[0]-r[0],o[1]=t[1]-r[1],o[2]=t[2]-r[2],i[0]=o[0],i[1]=o[1]*Math.cos(e)-o[2]*Math.sin(e),i[2]=o[1]*Math.sin(e)+o[2]*Math.cos(e),n[0]=i[0]+r[0],n[1]=i[1]+r[1],n[2]=i[2]+r[2],n},rotateY:function(n,t,r,e){const o=[],i=[];return o[0]=t[0]-r[0],o[1]=t[1]-r[1],o[2]=t[2]-r[2],i[0]=o[2]*Math.sin(e)+o[0]*Math.cos(e),i[1]=o[1],i[2]=o[2]*Math.cos(e)-o[0]*Math.sin(e),n[0]=i[0]+r[0],n[1]=i[1]+r[1],n[2]=i[2]+r[2],n},rotateZ:function(n,t,r,e){const o=[],i=[];return o[0]=t[0]-r[0],o[1]=t[1]-r[1],o[2]=t[2]-r[2],i[0]=o[0]*Math.cos(e)-o[1]*Math.sin(e),i[1]=o[0]*Math.sin(e)+o[1]*Math.cos(e),i[2]=o[2],n[0]=i[0]+r[0],n[1]=i[1]+r[1],n[2]=i[2]+r[2],n},round:function(n,t){return n[0]=Math.round(t[0]),n[1]=Math.round(t[1]),n[2]=Math.round(t[2]),n},scale:M,scaleAndAdd:d,set:a,sign:h,sqrDist:O,sqrLen:K,squaredDistance:A,squaredLength:v,str:function(n){return"vec3("+n[0]+", "+n[1]+", "+n[2]+")"},sub:X,subtract:l,transformMat3:F,transformMat4:q,transformQuat:S},Symbol.toStringTag,{value:"Module"}))},48163:(n,t,r)=>{function e(){return[0,0]}function o(n){return[n[0],n[1]]}function i(n,t){return[n,t]}function u(){return i(1,1)}function a(){return i(1,0)}function c(){return i(0,1)}r.d(t,{Un:()=>l,fA:()=>i,o8:()=>o,vt:()=>e});const l=u(),s=a(),f=c();Object.freeze(Object.defineProperty({__proto__:null,ONES:l,UNIT_X:s,UNIT_Y:f,ZEROS:[0,0],clone:o,create:e,freeze:function(n,t){return[n,t]},fromArray:function(n,t=[0,0]){const r=Math.min(2,n.length);for(let e=0;e<r;++e)t[e]=n[e];return t},fromValues:i,ones:u,unitX:a,unitY:c,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},48353:(n,t,r)=>{r.d(t,{l:()=>l});var e=r(34727),o=r(58083),i=r(51850);function u(n,t,r){const e=Math.sin(n),o=Math.cos(n),i=Math.sin(t),u=Math.cos(t),a=r;return a[0]=-e,a[4]=-i*o,a[8]=u*o,a[12]=0,a[1]=o,a[5]=-i*e,a[9]=u*e,a[13]=0,a[2]=0,a[6]=u,a[10]=i,a[14]=0,a[3]=0,a[7]=0,a[11]=0,a[15]=1,a}var a=r(37539),c=r(21325);function l(n,t,r,e){const i=(0,a.Tp)(n,e);if(null==i)return!1;const l=i.source.spatialReferenceId,g=i.dest.spatialReferenceId;if(l===g&&!s(g)&&(0!==l||(0,c.aI)(n,e)))return(0,o.kN)(r,t),!0;if(s(g)){const n=a.w5[l][10],e=a.w5[10][g];return null!=n&&null!=e&&(n(t,0,p,0),e(p,0,h,0),u(f*p[0],f*p[1],r),r[12]=h[0],r[13]=h[1],r[14]=h[2],!0)}const m=s(l);if((3===g||11===g||2===g||5===g)&&(2===l||m||3===l||5===l)){const n=a.w5[l][10],e=a.w5[10][g];return null!=n&&null!=e&&(n(t,0,p,0),e(p,0,h,0),m?function(n,t,r){u(n,t,r),(0,o.mg)(r,r)}(f*p[0],f*p[1],r):(0,o.D_)(r),r[12]=h[0],r[13]=h[1],r[14]=h[2],!0)}return!1}function s(n){return 1===n||6===n||8===n||4===n}const f=(0,e.kU)(1),p=(0,i.vt)(),h=(0,i.vt)()},72258:(n,t,r)=>{r.d(t,{UR:()=>w,p5:()=>v,xK:()=>q});var e=r(53966),o=r(34727),i=r(86211),u=r(77690),a=r(29242),c=r(58083),l=r(9093),s=r(38954),f=r(51850),p=r(98764),h=r(48353),g=r(65806),m=r(27615),M=r(21325),d=r(73354),y=r(22141);const A=()=>e.A.getLogger("esri.geometry.support.meshUtils.vertexSpaceConversion");function v(n,t,{vertexSpace:r,spatialReference:e}){if("georeferenced"===r.type){const o=n;if(!(0,g.g)(t,o,e))return!1;const{origin:i}=r;return(0,s.e)(n,o,i),!0}const o=(0,p.lO)(e),i=n;if(!(0,g.g)(t,i,o))return!1;const{origin:u}=r,a=E;if(!(0,h.l)(e,u,a,o))return!1;const l=(0,c.B8)(E,a);return null!=l&&((0,s.p)(n,i,l),!0)}function w(n,t,r){const{vertexSpace:e,transform:o,vertexAttributes:i}=n,a=(0,m.Hq)(e)?o:null,f=C(n.spatialReference,r,3);if((0,m.yJ)(e,t)&&(!a||(0,c.t2)(a.localMatrix,l.zK))&&R(f)){const{position:n,normal:t,tangent:e}=i,o=r?.allowBufferReuse;return{position:o?n:n.slice(),normal:o?t:t?.slice(),tangent:o?e:e?.slice()}}switch(n.vertexSpace.type){case"local":return"local"===t.type?function({vertexAttributes:n,spatialReference:t,transform:r},{origin:e},o,i){const u=x(t,i);if(!(0,h.l)(t,e,F,u))return(0,y.CN)(A(),t,u),null;if(r&&(0,c.lw)(F,F,r.localMatrix),!(0,h.l)(t,o,S,u))return(0,y.CN)(A(),u,t),null;(0,c.B8)(S,S);const a=(0,c.lw)(F,S,F);return T(a,t,i,3),b(n,a)}(n,n.vertexSpace,t.origin,r):function({spatialReference:n,vertexAttributes:t,transform:r},{origin:e},o,i){const u=x(n,i);if(!(0,h.l)(n,e,F,u))return(0,y.CN)(A(),n,u),null;r&&(0,c.lw)(F,F,r.localMatrix),T(F,n,i,1);const a=new Float64Array(t.position.length),l=function(n,t,r,e,o){(0,d.t)(e,n,t);const i=new Float64Array(n.length);return(0,y.$5)(e,o,i,r)?i:((0,y.CN)(A(),o,r),null)}(t.position,F,n,a,u);if(!l)return null;const f=function(n,t,r,e,o,i){if(null==o)return null;const u=new Float32Array(o.length);return(0,y.qs)(o,u,i),(0,y.si)(u,n,t,r,e,u)?u:((0,y.CN)(A(),e,t),null)}(l,n,a,u,t.normal,F);if(t.normal&&!f)return null;const p=function(n,t,r,e,o,i){if(null==o)return null;const u=new Float32Array(o.length);return(0,y.KM)(o,u,i),(0,y.Mv)(u,n,t,r,e,u)?u:((0,y.CN)(A(),e,t),null)}(l,n,a,u,t.tangent,F);if(t.tangent&&!p)return null;if(o){const n=(0,s.q)(k,o);(0,d.a)(l,l,n)}return{position:l,normal:f,tangent:p}}(n,n.vertexSpace,t.origin,r);case"georeferenced":return"local"===t.type?function({vertexAttributes:n,spatialReference:t,transform:r},{origin:e},o,i){const a=x(t,i);if(!(0,h.l)(t,o,F,a))return(0,y.CN)(A(),t,a),null;const l=1/C(t,i,2);(0,c.hs)(F,F,[l,l,l]);const s=(0,c.B8)(S,F),{position:f,normal:p,tangent:g}=function(n,t,r){if(!t)return n;if(!r){const{position:r,normal:e,tangent:o}=n;return{position:(0,d.a)(new Float64Array(r.length),r,t),tangent:o,normal:e}}const e=b(n,r.localMatrix);return(0,d.a)(e.position,e.position,t),e}(n,e,r),m=new Float64Array(f.length),M=function(n,t,r,e,o){const i=(0,y.gr)(n,t,e,o);if(!i)return(0,y.CN)(A(),t,o),null;const u=new Float64Array(i.length);return(0,d.t)(u,i,r),u}(f,t,s,m,a);if(!M)return null;const v=(0,u.Ge)(N,s),w=function(n,t,r,e,o,i,u){if(null==n)return null;const a=u??new Float32Array(n.length);return(0,y.X4)(n,t,r,e,o,a)?((0,d.b)(a,a,i),a):((0,y.CN)(A(),r,o),null)}(p,f,t,m,a,v,p!==n.normal?p:void 0);if(!w&&p)return null;const T=function(n,t,r,e,o,i,u){if(null==n)return null;const a=u??new Float32Array(n.length);return(0,y.xA)(n,t,r,e,o,a)?((0,d.b)(a,a,i,4),a):((0,y.CN)(A(),r,o),null)}(g,f,t,m,a,v,g!==n.tangent?g:void 0);return!T&&g?null:{position:M,normal:w,tangent:T}}(n,n.vertexSpace,t.origin,r):function({vertexAttributes:n,transform:t,spatialReference:r},{origin:e},o,i){const u=C(r,i,3),a=e||!R(u)?(0,c.C)(F,t?.localMatrix??l.zK):null;a&&T(a,r,i,3);const{position:f,normal:p,tangent:h}=a?b(n,a):n,g=i?.allowBufferReuse,m=g?f:new Float64Array(f.length);let M=f;if(e&&(M=(0,d.a)(m,M,e)),o){const n=(0,s.q)(k,o);M=(0,d.a)(m,M,n)}return{position:M!==n.position||g?M:M.slice(),normal:p!==n.normal||g?p:p?.slice(),tangent:h!==n.tangent||g?h:h?.slice()}}(n,n.vertexSpace,t.origin,r)}}function x(n,t){return t?.useEllipsoid&&(0,M.B3)(n)?p.Y0:(0,p.lO)(n)}function b(n,t){const r=new Float64Array(n.position.length);(0,d.t)(r,n.position,t);const e=n.normal?new Float32Array(n.normal.length):null,o=n.tangent?new Float32Array(n.tangent.length):null;return e&&n.normal&&(0,y.qs)(n.normal,e,t),o&&n.tangent&&(0,y.KM)(n.tangent,o,t),{position:r,normal:e,tangent:o}}function T(n,t,r,e){const o=C(t,r,e);R(o)||(0,c.hs)(n,n,[o,o,o])}function C(n,t,r){const e=!!(1&r),o=!!(2&r),i=t?.sourceUnit,u=t?.targetUnit;if(!i&&!u)return 1;let a=q(i,n);e||!i||R(a)||(A().warn("source unit conversion not supported"),a=1);let c=1/q(u,n);return o||!u||R(c)||(A().warn("target unit conversion not supported"),c=1),a*c}function R(n){return(0,o.Io)(n,1)}function q(n,t){if(null==n)return 1;const r=(0,i.KX)(t);return 1/(0,i.oU)(r,"meters",n)}const F=(0,l.vt)(),S=(0,l.vt)(),N=(0,a.vt)(),k=(0,f.vt)(),E=(0,l.vt)()},74594:(n,t,r)=>{r.d(t,{projectMeshVertexPositions:()=>a});var e=r(9762),o=r(95696),i=r(21325),u=r(72258);function a(n,t){const r=(0,u.UR)(n,o.A.absolute);if(!r)return null;let a=r.position;return(0,i.aI)(n.spatialReference,t)||(a=new Float64Array(r.position.length),(0,e.projectBuffer)(r.position,n.spatialReference,0,a,t,0))?a:null}},98764:(n,t,r)=>{r.d(t,{Y0:()=>l,lO:()=>s});var e=r(73941),o=r(16930),i=r(21325);const u=new o.A(e.fv),a=new o.A(e.FY),c=new o.A(e.LJ),l=new o.A(e.Ro);function s(n){const t=f.get(n);if(t)return t;let r=u;if(n)if(n===a)r=a;else if(n===c)r=c;else{const t=n.wkid,e=n.latestWkid;if(null!=t||null!=e)(0,i.tl)(t)||(0,i.tl)(e)?r=a:((0,i.ZL)(t)||(0,i.ZL)(e))&&(r=c);else{const t=n.wkt2??n.wkt;if(t){const n=t.toUpperCase();n===p?r=a:n===h&&(r=c)}}}return f.set(n,r),r}const f=new Map,p=a.wkt.toUpperCase(),h=c.wkt.toUpperCase()}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7836],{22141:(n,t,r)=>{r.d(t,{$5:()=>x,CN:()=>y,JP:()=>d,KM:()=>T,Mv:()=>R,X4:()=>A,gr:()=>w,qs:()=>b,si:()=>v,xA:()=>C});var e=r(34727),o=r(77690),i=r(29242),u=r(58083),a=r(9093),c=r(38954),l=r(51850),s=r(48353),f=r(9762),p=(r(79258),r(21325)),h=r(28735),g=r(13030),m=r(73354),M=r(65686);const d="Projection may be possible after calling projection.load().";function y(n,t,r,e){n.error(`Failed to project from (wkid:${t.wkid}) to (wkid:${r.wkid}).${e?" ":""}${e}`)}function A(n,t,r,e,o,i){return F(0,g.xs.fromTypedArray(n),0,g.Xm.fromTypedArray(t),r,g.Xm.fromTypedArray(e),o,g.xs.fromTypedArray(i))?i:null}function v(n,t,r,e,o,i){return F(1,g.xs.fromTypedArray(n),0,g.Xm.fromTypedArray(t),r,g.Xm.fromTypedArray(e),o,g.xs.fromTypedArray(i))?i:null}function w(n,t,r,e){return(0,f.projectBuffer)(n,t,0,r,e,0)?r:null}function x(n,t,r,e){return(0,f.projectBuffer)(n,t,0,r,e,0)?r:null}function b(n,t,r){return(0,o.Ge)(E,r),(0,m.b)(t,n,E),(0,e.or)(E)&&(0,m.n)(t,t),t}function T(n,t,r){return(0,o.z0)(E,r),(0,M.t)(t,n,E),(0,e.or)(E)&&(0,m.n)(t,t,4),t}function C(n,t,r,e,o,i){if(!F(0,g.xs.fromTypedArray(n,4*Float32Array.BYTES_PER_ELEMENT),1,g.Xm.fromTypedArray(t),r,g.Xm.fromTypedArray(e),o,g.xs.fromTypedArray(i,4*Float32Array.BYTES_PER_ELEMENT)))return null;for(let t=3;t<n.length;t+=4)i[t]=n[t];return i}function R(n,t,r,e,o,i){if(!F(1,g.xs.fromTypedArray(n,16),1,g.Xm.fromTypedArray(t),r,g.Xm.fromTypedArray(e),o,g.xs.fromTypedArray(i,16)))return null;for(let t=3;t<n.length;t+=4)i[t]=n[t];return i}function q(n,t,r,e,i){switch((0,s.l)(e,r,k,e),1===n&&(0,u.B8)(k,k),t){case 0:return(0,o.Ge)(i,k);case 1:return(0,o.z0)(i,k)}}function F(n,t,r,e,o,i,u,a){if(!t)return;const l=e.count;if(function(n){return n.isWGS84||(0,p.x1)(n)||(0,p.q8)(n)||(0,p.KQ)(n)}(o))for(let e=0;e<l;e++)i.getVec(e,S),t.getVec(e,N),(0,c.t)(N,N,q(n,r,S,u,E)),a.setVec(e,N);else for(let o=0;o<l;o++){i.getVec(o,S),t.getVec(o,N);const l=(0,h.jg)(e.get(o,1));let s=Math.cos(l);1===r!=(0===n)&&(s=1/s),q(n,r,S,u,E),0===n?(E[0]*=s,E[1]*=s,E[2]*=s,E[3]*=s,E[4]*=s,E[5]*=s):(E[0]*=s,E[3]*=s,E[6]*=s,E[1]*=s,E[4]*=s,E[7]*=s),(0,c.t)(N,N,E),(0,c.n)(N,N),a.setVec(o,N)}return a}const S=(0,l.vt)(),N=(0,l.vt)(),k=(0,a.vt)(),E=(0,i.vt)()},27615:(n,t,r)=>{r.d(t,{CK:()=>c,Hq:()=>a,MW:()=>l,TE:()=>s,yJ:()=>f});var e=r(38954),o=r(86738),i=r(95696),u=r(18251);function a(n){return null!=n.origin}function c(n){return a(n.vertexSpace)}function l(n,t){if(!a(n))return null;const[r,e,i]=n.origin;return new o.A({x:r,y:e,z:i,spatialReference:t})}function s(n,t){const{x:r,y:e,z:o,spatialReference:a}=n,c=[r,e,o??0];return"local"===(t?.vertexSpace??function(n){return n.isGeographic||n.isWebMercator?"local":"georeferenced"}(a))?new u.A({origin:c}):new i.A({origin:c})}function f(n,t){return n.type===t.type&&(n.origin===t.origin||null!=n.origin&&null!=t.origin&&(0,e.m)(n.origin,t.origin))}},38954:(n,t,r)=>{r.d(t,{A:()=>s,B:()=>I,C:()=>f,D:()=>y,E:()=>z,F:()=>v,G:()=>_,H:()=>U,a:()=>X,b:()=>i,c:()=>d,d:()=>u,e:()=>l,f:()=>C,g:()=>T,h:()=>a,i:()=>c,j:()=>M,l:()=>R,m:()=>E,n:()=>b,o:()=>x,p:()=>q,q:()=>w,r:()=>S,s:()=>A,t:()=>F,u:()=>p,v:()=>O,w:()=>K,x:()=>m,y:()=>g,z:()=>h});var e=r(51850),o=r(34304);function i(n){const t=n[0],r=n[1],e=n[2];return Math.sqrt(t*t+r*r+e*e)}function u(n,t){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n}function a(n,t,r,e){return n[0]=t,n[1]=r,n[2]=e,n}function c(n,t,r){return n[0]=t[0]+r[0],n[1]=t[1]+r[1],n[2]=t[2]+r[2],n}function l(n,t,r){return n[0]=t[0]-r[0],n[1]=t[1]-r[1],n[2]=t[2]-r[2],n}function s(n,t,r){return n[0]=t[0]*r[0],n[1]=t[1]*r[1],n[2]=t[2]*r[2],n}function f(n,t,r){return n[0]=t[0]/r[0],n[1]=t[1]/r[1],n[2]=t[2]/r[2],n}function p(n,t){return n[0]=Math.abs(t[0]),n[1]=Math.abs(t[1]),n[2]=Math.abs(t[2]),n}function h(n,t){return n[0]=Math.sign(t[0]),n[1]=Math.sign(t[1]),n[2]=Math.sign(t[2]),n}function g(n,t,r){return n[0]=Math.min(t[0],r[0]),n[1]=Math.min(t[1],r[1]),n[2]=Math.min(t[2],r[2]),n}function m(n,t,r){return n[0]=Math.max(t[0],r[0]),n[1]=Math.max(t[1],r[1]),n[2]=Math.max(t[2],r[2]),n}function M(n,t,r){return n[0]=t[0]*r,n[1]=t[1]*r,n[2]=t[2]*r,n}function d(n,t,r,e){return n[0]=t[0]+r[0]*e,n[1]=t[1]+r[1]*e,n[2]=t[2]+r[2]*e,n}function y(n,t){const r=t[0]-n[0],e=t[1]-n[1],o=t[2]-n[2];return Math.sqrt(r*r+e*e+o*o)}function A(n,t){const r=t[0]-n[0],e=t[1]-n[1],o=t[2]-n[2];return r*r+e*e+o*o}function v(n){const t=n[0],r=n[1],e=n[2];return t*t+r*r+e*e}function w(n,t){return n[0]=-t[0],n[1]=-t[1],n[2]=-t[2],n}function x(n,t){return n[0]=1/t[0],n[1]=1/t[1],n[2]=1/t[2],n}function b(n,t){const r=t[0],e=t[1],o=t[2];let i=r*r+e*e+o*o;return i>0&&(i=1/Math.sqrt(i),n[0]=t[0]*i,n[1]=t[1]*i,n[2]=t[2]*i),n}function T(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function C(n,t,r){const e=t[0],o=t[1],i=t[2],u=r[0],a=r[1],c=r[2];return n[0]=o*c-i*a,n[1]=i*u-e*c,n[2]=e*a-o*u,n}function R(n,t,r,e){const o=t[0],i=t[1],u=t[2];return n[0]=o+e*(r[0]-o),n[1]=i+e*(r[1]-i),n[2]=u+e*(r[2]-u),n}function q(n,t,r){const e=t[0],o=t[1],i=t[2];return n[0]=r[0]*e+r[4]*o+r[8]*i+r[12],n[1]=r[1]*e+r[5]*o+r[9]*i+r[13],n[2]=r[2]*e+r[6]*o+r[10]*i+r[14],n}function F(n,t,r){const e=t[0],o=t[1],i=t[2];return n[0]=e*r[0]+o*r[3]+i*r[6],n[1]=e*r[1]+o*r[4]+i*r[7],n[2]=e*r[2]+o*r[5]+i*r[8],n}function S(n,t,r){const e=r[0],o=r[1],i=r[2],u=r[3],a=t[0],c=t[1],l=t[2],s=o*l-i*c,f=i*a-e*l,p=e*c-o*a,h=o*p-i*f,g=i*s-e*p,m=e*f-o*s,M=2*u;return n[0]=a+s*M+2*h,n[1]=c+f*M+2*g,n[2]=l+p*M+2*m,n}const N=(0,e.vt)(),k=(0,e.vt)();function E(n,t){return n[0]===t[0]&&n[1]===t[1]&&n[2]===t[2]}function _(n,t){if(n===t)return!0;const r=n[0],e=n[1],i=n[2],u=t[0],a=t[1],c=t[2],l=(0,o.FD)();return Math.abs(r-u)<=l*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(e-a)<=l*Math.max(1,Math.abs(e),Math.abs(a))&&Math.abs(i-c)<=l*Math.max(1,Math.abs(i),Math.abs(c))}function z(n,t,r){const e=r[0]-t[0],o=r[1]-t[1],i=r[2]-t[2];let u=e*e+o*o+i*i;return u>0?(u=1/Math.sqrt(u),n[0]=e*u,n[1]=o*u,n[2]=i*u,n):(n[0]=0,n[1]=0,n[2]=0,n)}const X=l,j=s,B=f,U=y,O=A,I=i,K=v;Object.freeze(Object.defineProperty({__proto__:null,abs:p,add:c,angle:function(n,t){b(N,n),b(k,t);const r=T(N,k);return r>1?0:r<-1?Math.PI:Math.acos(r)},bezier:function(n,t,r,e,o,i){const u=1-i,a=u*u,c=i*i,l=a*u,s=3*i*a,f=3*c*u,p=c*i;return n[0]=t[0]*l+r[0]*s+e[0]*f+o[0]*p,n[1]=t[1]*l+r[1]*s+e[1]*f+o[1]*p,n[2]=t[2]*l+r[2]*s+e[2]*f+o[2]*p,n},ceil:function(n,t){return n[0]=Math.ceil(t[0]),n[1]=Math.ceil(t[1]),n[2]=Math.ceil(t[2]),n},clamp:function(n,t=0,r=1){return n[0]=Math.min(Math.max(n[0],t),r),n[1]=Math.min(Math.max(n[1],t),r),n[2]=Math.min(Math.max(n[2],t),r),n},copy:u,cross:C,crossAndNormalize:function(n,t,r){const e=t[0],o=t[1],i=t[2],u=r[0],a=r[1],c=r[2],l=o*c-i*a,s=i*u-e*c,f=e*a-o*u,p=Math.sqrt(l*l+s*s+f*f);return n[0]=l/p,n[1]=s/p,n[2]=f/p,n},direction:z,dist:U,distance:y,div:B,divide:f,dot:T,equals:_,exactEquals:E,floor:function(n,t){return n[0]=Math.floor(t[0]),n[1]=Math.floor(t[1]),n[2]=Math.floor(t[2]),n},hermite:function(n,t,r,e,o,i){const u=i*i,a=u*(2*i-3)+1,c=u*(i-2)+i,l=u*(i-1),s=u*(3-2*i);return n[0]=t[0]*a+r[0]*c+e[0]*l+o[0]*s,n[1]=t[1]*a+r[1]*c+e[1]*l+o[1]*s,n[2]=t[2]*a+r[2]*c+e[2]*l+o[2]*s,n},inverse:x,len:I,length:i,lerp:R,max:m,min:g,mul:j,multiply:s,negate:w,normalize:b,random:function(n,t=1){const r=o.Ov,e=2*r()*Math.PI,i=2*r()-1,u=Math.sqrt(1-i*i)*t;return n[0]=Math.cos(e)*u,n[1]=Math.sin(e)*u,n[2]=i*t,n},rotateX:function(n,t,r,e){const o=[],i=[];return o[0]=t[0]-r[0],o[1]=t[1]-r[1],o[2]=t[2]-r[2],i[0]=o[0],i[1]=o[1]*Math.cos(e)-o[2]*Math.sin(e),i[2]=o[1]*Math.sin(e)+o[2]*Math.cos(e),n[0]=i[0]+r[0],n[1]=i[1]+r[1],n[2]=i[2]+r[2],n},rotateY:function(n,t,r,e){const o=[],i=[];return o[0]=t[0]-r[0],o[1]=t[1]-r[1],o[2]=t[2]-r[2],i[0]=o[2]*Math.sin(e)+o[0]*Math.cos(e),i[1]=o[1],i[2]=o[2]*Math.cos(e)-o[0]*Math.sin(e),n[0]=i[0]+r[0],n[1]=i[1]+r[1],n[2]=i[2]+r[2],n},rotateZ:function(n,t,r,e){const o=[],i=[];return o[0]=t[0]-r[0],o[1]=t[1]-r[1],o[2]=t[2]-r[2],i[0]=o[0]*Math.cos(e)-o[1]*Math.sin(e),i[1]=o[0]*Math.sin(e)+o[1]*Math.cos(e),i[2]=o[2],n[0]=i[0]+r[0],n[1]=i[1]+r[1],n[2]=i[2]+r[2],n},round:function(n,t){return n[0]=Math.round(t[0]),n[1]=Math.round(t[1]),n[2]=Math.round(t[2]),n},scale:M,scaleAndAdd:d,set:a,sign:h,sqrDist:O,sqrLen:K,squaredDistance:A,squaredLength:v,str:function(n){return"vec3("+n[0]+", "+n[1]+", "+n[2]+")"},sub:X,subtract:l,transformMat3:F,transformMat4:q,transformQuat:S},Symbol.toStringTag,{value:"Module"}))},48163:(n,t,r)=>{function e(){return[0,0]}function o(n){return[n[0],n[1]]}function i(n,t){return[n,t]}function u(){return i(1,1)}function a(){return i(1,0)}function c(){return i(0,1)}r.d(t,{Un:()=>l,fA:()=>i,o8:()=>o,vt:()=>e});const l=u(),s=a(),f=c();Object.freeze(Object.defineProperty({__proto__:null,ONES:l,UNIT_X:s,UNIT_Y:f,ZEROS:[0,0],clone:o,create:e,freeze:function(n,t){return[n,t]},fromArray:function(n,t=[0,0]){const r=Math.min(2,n.length);for(let e=0;e<r;++e)t[e]=n[e];return t},fromValues:i,ones:u,unitX:a,unitY:c,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},48353:(n,t,r)=>{r.d(t,{l:()=>l});var e=r(34727),o=r(58083),i=r(51850);function u(n,t,r){const e=Math.sin(n),o=Math.cos(n),i=Math.sin(t),u=Math.cos(t),a=r;return a[0]=-e,a[4]=-i*o,a[8]=u*o,a[12]=0,a[1]=o,a[5]=-i*e,a[9]=u*e,a[13]=0,a[2]=0,a[6]=u,a[10]=i,a[14]=0,a[3]=0,a[7]=0,a[11]=0,a[15]=1,a}var a=r(37539),c=r(21325);function l(n,t,r,e){const i=(0,a.Tp)(n,e);if(null==i)return!1;const l=i.source.spatialReferenceId,g=i.dest.spatialReferenceId;if(l===g&&!s(g)&&(0!==l||(0,c.aI)(n,e)))return(0,o.kN)(r,t),!0;if(s(g)){const n=a.w5[l][10],e=a.w5[10][g];return null!=n&&null!=e&&(n(t,0,p,0),e(p,0,h,0),u(f*p[0],f*p[1],r),r[12]=h[0],r[13]=h[1],r[14]=h[2],!0)}const m=s(l);if((3===g||11===g||2===g||5===g)&&(2===l||m||3===l||5===l)){const n=a.w5[l][10],e=a.w5[10][g];return null!=n&&null!=e&&(n(t,0,p,0),e(p,0,h,0),m?function(n,t,r){u(n,t,r),(0,o.mg)(r,r)}(f*p[0],f*p[1],r):(0,o.D_)(r),r[12]=h[0],r[13]=h[1],r[14]=h[2],!0)}return!1}function s(n){return 1===n||6===n||8===n||4===n}const f=(0,e.kU)(1),p=(0,i.vt)(),h=(0,i.vt)()},72258:(n,t,r)=>{r.d(t,{UR:()=>w,p5:()=>v,xK:()=>q});var e=r(53966),o=r(34727),i=r(86211),u=r(77690),a=r(29242),c=r(58083),l=r(9093),s=r(38954),f=r(51850),p=r(98764),h=r(48353),g=r(65806),m=r(27615),M=r(21325),d=r(73354),y=r(22141);const A=()=>e.A.getLogger("esri.geometry.support.meshUtils.vertexSpaceConversion");function v(n,t,{vertexSpace:r,spatialReference:e}){if("georeferenced"===r.type){const o=n;if(!(0,g.g)(t,o,e))return!1;const{origin:i}=r;return(0,s.e)(n,o,i),!0}const o=(0,p.lO)(e),i=n;if(!(0,g.g)(t,i,o))return!1;const{origin:u}=r,a=E;if(!(0,h.l)(e,u,a,o))return!1;const l=(0,c.B8)(E,a);return null!=l&&((0,s.p)(n,i,l),!0)}function w(n,t,r){const{vertexSpace:e,transform:o,vertexAttributes:i}=n,a=(0,m.Hq)(e)?o:null,f=C(n.spatialReference,r,3);if((0,m.yJ)(e,t)&&(!a||(0,c.t2)(a.localMatrix,l.zK))&&R(f)){const{position:n,normal:t,tangent:e}=i,o=r?.allowBufferReuse;return{position:o?n:n.slice(),normal:o?t:t?.slice(),tangent:o?e:e?.slice()}}switch(n.vertexSpace.type){case"local":return"local"===t.type?function({vertexAttributes:n,spatialReference:t,transform:r},{origin:e},o,i){const u=x(t,i);if(!(0,h.l)(t,e,F,u))return(0,y.CN)(A(),t,u),null;if(r&&(0,c.lw)(F,F,r.localMatrix),!(0,h.l)(t,o,S,u))return(0,y.CN)(A(),u,t),null;(0,c.B8)(S,S);const a=(0,c.lw)(F,S,F);return T(a,t,i,3),b(n,a)}(n,n.vertexSpace,t.origin,r):function({spatialReference:n,vertexAttributes:t,transform:r},{origin:e},o,i){const u=x(n,i);if(!(0,h.l)(n,e,F,u))return(0,y.CN)(A(),n,u),null;r&&(0,c.lw)(F,F,r.localMatrix),T(F,n,i,1);const a=new Float64Array(t.position.length),l=function(n,t,r,e,o){(0,d.t)(e,n,t);const i=new Float64Array(n.length);return(0,y.$5)(e,o,i,r)?i:((0,y.CN)(A(),o,r),null)}(t.position,F,n,a,u);if(!l)return null;const f=function(n,t,r,e,o,i){if(null==o)return null;const u=new Float32Array(o.length);return(0,y.qs)(o,u,i),(0,y.si)(u,n,t,r,e,u)?u:((0,y.CN)(A(),e,t),null)}(l,n,a,u,t.normal,F);if(t.normal&&!f)return null;const p=function(n,t,r,e,o,i){if(null==o)return null;const u=new Float32Array(o.length);return(0,y.KM)(o,u,i),(0,y.Mv)(u,n,t,r,e,u)?u:((0,y.CN)(A(),e,t),null)}(l,n,a,u,t.tangent,F);if(t.tangent&&!p)return null;if(o){const n=(0,s.q)(k,o);(0,d.a)(l,l,n)}return{position:l,normal:f,tangent:p}}(n,n.vertexSpace,t.origin,r);case"georeferenced":return"local"===t.type?function({vertexAttributes:n,spatialReference:t,transform:r},{origin:e},o,i){const a=x(t,i);if(!(0,h.l)(t,o,F,a))return(0,y.CN)(A(),t,a),null;const l=1/C(t,i,2);(0,c.hs)(F,F,[l,l,l]);const s=(0,c.B8)(S,F),{position:f,normal:p,tangent:g}=function(n,t,r){if(!t)return n;if(!r){const{position:r,normal:e,tangent:o}=n;return{position:(0,d.a)(new Float64Array(r.length),r,t),tangent:o,normal:e}}const e=b(n,r.localMatrix);return(0,d.a)(e.position,e.position,t),e}(n,e,r),m=new Float64Array(f.length),M=function(n,t,r,e,o){const i=(0,y.gr)(n,t,e,o);if(!i)return(0,y.CN)(A(),t,o),null;const u=new Float64Array(i.length);return(0,d.t)(u,i,r),u}(f,t,s,m,a);if(!M)return null;const v=(0,u.Ge)(N,s),w=function(n,t,r,e,o,i,u){if(null==n)return null;const a=u??new Float32Array(n.length);return(0,y.X4)(n,t,r,e,o,a)?((0,d.b)(a,a,i),a):((0,y.CN)(A(),r,o),null)}(p,f,t,m,a,v,p!==n.normal?p:void 0);if(!w&&p)return null;const T=function(n,t,r,e,o,i,u){if(null==n)return null;const a=u??new Float32Array(n.length);return(0,y.xA)(n,t,r,e,o,a)?((0,d.b)(a,a,i,4),a):((0,y.CN)(A(),r,o),null)}(g,f,t,m,a,v,g!==n.tangent?g:void 0);return!T&&g?null:{position:M,normal:w,tangent:T}}(n,n.vertexSpace,t.origin,r):function({vertexAttributes:n,transform:t,spatialReference:r},{origin:e},o,i){const u=C(r,i,3),a=e||!R(u)?(0,c.C)(F,t?.localMatrix??l.zK):null;a&&T(a,r,i,3);const{position:f,normal:p,tangent:h}=a?b(n,a):n,g=i?.allowBufferReuse,m=g?f:new Float64Array(f.length);let M=f;if(e&&(M=(0,d.a)(m,M,e)),o){const n=(0,s.q)(k,o);M=(0,d.a)(m,M,n)}return{position:M!==n.position||g?M:M.slice(),normal:p!==n.normal||g?p:p?.slice(),tangent:h!==n.tangent||g?h:h?.slice()}}(n,n.vertexSpace,t.origin,r)}}function x(n,t){return t?.useEllipsoid&&(0,M.B3)(n)?p.Y0:(0,p.lO)(n)}function b(n,t){const r=new Float64Array(n.position.length);(0,d.t)(r,n.position,t);const e=n.normal?new Float32Array(n.normal.length):null,o=n.tangent?new Float32Array(n.tangent.length):null;return e&&n.normal&&(0,y.qs)(n.normal,e,t),o&&n.tangent&&(0,y.KM)(n.tangent,o,t),{position:r,normal:e,tangent:o}}function T(n,t,r,e){const o=C(t,r,e);R(o)||(0,c.hs)(n,n,[o,o,o])}function C(n,t,r){const e=!!(1&r),o=!!(2&r),i=t?.sourceUnit,u=t?.targetUnit;if(!i&&!u)return 1;let a=q(i,n);e||!i||R(a)||(A().warn("source unit conversion not supported"),a=1);let c=1/q(u,n);return o||!u||R(c)||(A().warn("target unit conversion not supported"),c=1),a*c}function R(n){return(0,o.Io)(n,1)}function q(n,t){if(null==n)return 1;const r=(0,i.KX)(t);return 1/(0,i.oU)(r,"meters",n)}const F=(0,l.vt)(),S=(0,l.vt)(),N=(0,a.vt)(),k=(0,f.vt)(),E=(0,l.vt)()},74594:(n,t,r)=>{r.d(t,{projectMeshVertexPositions:()=>a});var e=r(9762),o=r(95696),i=r(21325),u=r(72258);function a(n,t){const r=(0,u.UR)(n,o.A.absolute);if(!r)return null;let a=r.position;return(0,i.aI)(n.spatialReference,t)||(a=new Float64Array(r.position.length),(0,e.projectBuffer)(r.position,n.spatialReference,0,a,t,0))?a:null}},98764:(n,t,r)=>{r.d(t,{Y0:()=>l,lO:()=>s});var e=r(73941),o=r(16930),i=r(21325);const u=new o.A(e.fv),a=new o.A(e.FY),c=new o.A(e.LJ),l=new o.A(e.Ro);function s(n){const t=f.get(n);if(t)return t;let r=u;if(n)if(n===a)r=a;else if(n===c)r=c;else{const t=n.wkid,e=n.latestWkid;if(null!=t||null!=e)(0,i.tl)(t)||(0,i.tl)(e)?r=a:((0,i.ZL)(t)||(0,i.ZL)(e))&&(r=c);else{const t=n.wkt2??n.wkt;if(t){const n=t.toUpperCase();n===p?r=a:n===h&&(r=c)}}}return f.set(n,r),r}const f=new Map,p=a.wkt.toUpperCase(),h=c.wkt.toUpperCase()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1713,3513],{8303:(e,t,r)=>{r.d(t,{A:()=>I});var i=r(31635),s=r(92602),n=r(70333),o=r(11254),a=r(60999),l=r(49186),d=r(53966),u=r(97768),c=r(74887),p=r(84952),h=r(91429),y=r(77548),g=r(20655),f=r(80812),m=r(41318),v=r(10407),w=r(36005),b=r(43937);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,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,r){if(t.itemId)return new f.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,c.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,c.zf)(e)||d.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:r,fullEdit:i},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",s)}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 i=!n.id?.findCredential(this.url),s=e===r.id;if(s&&r.portal.user)return this._getUserPrivileges(r,i);let o,a;if(s)o=r.portal.url;else try{o=await(0,y.wI)(this.url,t)}catch(e){(0,c.QP)(e)}if(!o||!(0,p.b8)(o,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(n.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.QP)(e)}const l=!0,d=!1,u=!1;if(!a)return{features:{edit:l,fullEdit:d},content:{updateItem:u}};try{if(s?await r.reload():(r=new f.default({id:e,portal:{url:o}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,i)}catch(e){(0,c.QP)(e)}return{features:{edit:l,fullEdit:d},content:{updateItem:u}}}_getUserPrivileges(e,t){const r=(0,v.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?n.id?.findCredential(this.url):null;if(!t)return!0;const r=A.credential===t?A.user:await this._fetchEditingUser(e);return A.credential=t,A.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=n.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,s=g.A.getDefault();if(s&&s.loaded&&(0,p.S8)(s.restUrl)===(0,p.S8)(i))return s.user;const l=`${i}/community/self`,d=null!=e?e.signal:null,u=await(0,a.Ke)((0,o.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:d}));return u.ok?m.A.fromJSON(u.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||g.A.getDefault());return r&&i&&!(0,p.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,h.MZ)({type:f.default})],I.prototype,"portalItem",null),(0,i.Cg)([(0,w.w)("web-document","portalItem",["itemId"])],I.prototype,"readPortalItem",null),(0,i.Cg)([(0,b.K)("web-document","portalItem",{itemId:{type:String}})],I.prototype,"writePortalItem",null),(0,i.Cg)([(0,h.MZ)({clonable:!1})],I.prototype,"resourceReferences",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],I.prototype,"userHasEditingPrivileges",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],I.prototype,"userHasFullEditingPrivileges",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],I.prototype,"userHasUpdateItemPrivileges",void 0),I=(0,i.Cg)([(0,h.$K)("esri.layers.mixins.PortalLayer")],I),I},A={credential:null,user:null}},8947:(e,t,r)=>{r.d(t,{L:()=>o});var i=r(60999),s=r(74887),n=r(67076);async function o(e,t,r){const o=e&&e.getAtOrigin&&e.getAtOrigin("renderer",t.origin);if(o&&"unique-value"===o.type&&o.styleOrigin){const a=await(0,i.Ke)(o.populateFromStyle());if((0,s.Te)(r),!1===a.ok){const r=a.error;t?.messages&&t.messages.push(new n.A("renderer:style-reference",`Failed to create unique value renderer from style reference: ${r.message}`,{error:r,context:t})),e.clear("renderer",t?.origin)}}}},10184:(e,t,r)=>{r.d(t,{A:()=>u});var i=r(31635),s=r(69540),n=r(25482),o=r(88930),a=r(91429),l=r(73133),d=r(93223);let u=class extends((0,s.OU)(n.o)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,o.t)(this.value,this.unit,"milliseconds")}};(0,i.Cg)([(0,d.e)(l.j,{nonNullable:!0})],u.prototype,"unit",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0},nonNullable:!0})],u.prototype,"value",void 0),u=(0,i.Cg)([(0,a.$K)("esri.time.TimeInterval")],u)},10407:(e,t,r)=>{r.d(t,{It:()=>h,LG:()=>o,OM:()=>d,Sm:()=>u,Y:()=>a,bK:()=>l,mm:()=>p,sQ:()=>c});var i=r(91218),s=r(16930),n=r(28735);function o(e,t){if(!a(e,t)){const r=e.typeKeywords;r?r.push(t):e.typeKeywords=[t]}}function a(e,t){return!!e.typeKeywords?.includes(t)}function l(e){return a(e,p.HOSTED_SERVICE)}function d(e,t){const r=e.typeKeywords;if(r){const e=r.indexOf(t);e>-1&&r.splice(e,1)}}function u(e,t,r){r?o(e,t):d(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,n.ci)(e);const r=s.A.WGS84;return await(0,i.initializeProjection)(t,r),(0,i.project)(e,r)}(r)}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 h(e){const{portal:t,isOrgItem:r,itemControl:i}=e,s=t.user?.privileges;let n=!s||s.includes("features:user:edit"),o=!!r&&!!s?.includes("features:user:fullEdit");const a="update"===i||"admin"===i;return a?o=n=!0:o&&(n=!0),{features:{edit:n,fullEdit:o},content:{updateItem:a}}}},17036:(e,t,r)=>{r.d(t,{p:()=>l});var i=r(44208),s=r(53966),n=r(20437),o=r(95466),a=r(30524);function l(){return{fields:{type:[n.A],value:null,set:function(e){if(e&&(0,i.A)("big-integer-warning-enabled")){const t=e.filter(e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8);if(t.length){const e=t.map(e=>`'${e.name}'`).join(", ");s.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return o.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const r=this.fieldsIndex?.has(t);r||s.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,a.DB)(this.fieldsIndex,e)}}}}},18768:(e,t,r)=>{r.d(t,{b:()=>a});var i=r(31635),s=r(53966),n=r(91429),o=r(60694);const a=e=>{const t=e;let r=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,o.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,o.Jf)(e,s.A.getLogger(this)))}};return(0,i.Cg)([(0,n.MZ)()],r.prototype,"title",null),(0,i.Cg)([(0,n.MZ)({type:String})],r.prototype,"url",null),r=(0,i.Cg)([(0,n.$K)("esri.layers.mixins.ArcGISService")],r),r}},20557:(e,t,r)=>{r.d(t,{Fm:()=>l,Hz:()=>h,JQ:()=>p,JZ:()=>b,ND:()=>g,R_:()=>o,U9:()=>c,fu:()=>s,nr:()=>y,oF:()=>n,rq:()=>d,z$:()=>u});const i=[["binary","application/octet-stream","bin",""]];function s(e,t){return null!=m(t.name,e?.supportedFormats??[])}function n(e,t){if(!e)return!1;const r=d(t,e.supportedFormats??[]);return null!=r&&e.editFormats.includes(r)}function o(e,t){return v(function(e,t){const r=e.toLowerCase();return f(t).find(e=>w(e)===r)}(e,t))}function a(e,t){return v(m(e,t))}function l(e,t){return w(function(e,t){return f(t).find(t=>v(t)===e)}(e,t))}function d(e,t){return a(e.name,t)??o(e.type,t)}function u(e,t,r){return o(e,r)??a(t,r)}function c({supportedFormats:e}){return u("model/gltf-binary","glb",e)}function p(e){const t=c(e);return null!=t&&e.editFormats.includes(t)}function h(e){if(!e)return null;const t=c(e),r=function({supportedFormats:e}){return u("model/gltf+json","gltf",e)}(e);let i=null;for(const s of e.queryFormats){if(s===t)return s;s===r&&(i=s)}return i}function y({supportedFormats:e}){return u("application/esri3do-SR_world","wld",e)}function g({supportedFormats:e}){return u("application/esri3do-SR_prj","prj",e)}function f(e){return[...i,...e]}function m(e,t){const r=e.toLowerCase();return f(t).find(e=>function(e){return e?.[2].split(",").map(e=>e.toLowerCase())??[]}(e).some(e=>r.endsWith(e)))}function v(e){return e?.[0]}function w(e){return e?.[1].toLowerCase()}function b(e){return e.tables?.find(e=>"assetMaps"===e.role)}},20816:(e,t,r)=>{r.d(t,{TA:()=>s,We:()=>a,Z3:()=>n,ZJ:()=>l,w5:()=>d});var i=r(11254);const s=(0,r(13069).vD)(),n=new Map,o=new Map;async function a(e,t,r){if(!e||!r)return!1;if(!t)return!0;const s=new URL(e).host;let o=n.get(s);if(!o){const t=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,"");o=(await(0,i.A)(t,{responseType:"json",query:{f:"json"}})).data.defaultVersionName}return o===t}async function l(e,t,i=!1){if(!e||!t)return!0;const n=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),a=o.get(n)?.entries();if(a)for(const[e,o]of a)if(o.name===t){const t=!o.stack?.hasForwardEdits();if(!t&&i){const[{deleteForwardEdits:t},{default:i}]=await Promise.all([r.e(2186).then(r.bind(r,32186)),r.e(2558).then(r.bind(r,32558))]),a=await t(n,e,new i({sessionId:s,moment:o.moment}));return a.success&&o.stack?.clearForwardEdits(),a.success}return t}return!0}function d(e,t){if(!e)return!1;const r=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),i=o.get(r)?.entries();if(i)for(const[e,r]of i)if(r.name===t)return"edit"===r.lockType;return!1}new Map},24770:(e,t,r)=>{r.d(t,{$I:()=>f,AU:()=>h,g7:()=>g,i4:()=>u,ui:()=>c,up:()=>v,vt:()=>d,yo:()=>y});var i=r(34727),s=r(58083),n=r(67026),o=r(82534),a=r(38954),l=r(51850);function d(e=v){return[e[0],e[1],e[2],e[3]]}function u(e,t,r=d()){return(0,a.d)(r,e),r[3]=t,r}function c(e,t=d()){const r=(0,s.l)(w,e);return m(t,(0,i.KJ)((0,n.Xd)(t,r))),t}function p(e,t,r=d()){return(0,n.x8)(w,e,f(e)),(0,n.x8)(b,t,f(t)),(0,n.lw)(w,b,w),m(r,(0,i.KJ)((0,n.Xd)(r,w)))}function h(e,t,r,i=d()){return u(l.Cw,e,I),u(l.JP,t,A),u(l.Cb,r,S),p(I,A,I),p(I,S,i),i}function y(e){return e}function g(e){return e[3]}function f(e){return(0,i.kU)(e[3])}function m(e,t){return e[3]=t,e}const v=[0,0,1,0],w=(0,o.vt)(),b=(0,o.vt)(),I=(d(),d()),A=d(),S=d()},25036:(e,t,r)=>{r.d(t,{j:()=>n});var i=r(31635),s=r(91429);const n=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,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"minScale",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"maxScale",void 0),(0,i.Cg)([(0,s.MZ)({readOnly:!0})],r.prototype,"effectiveScaleRange",null),r=(0,i.Cg)([(0,s.$K)("esri.layers.mixins.ScaleRangeLayer")],r),r}},36969:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Re});var i=r(31635),s=r(52106),n=r(37838),o=r(69540),a=r(7762),l=r(49186),d=r(36563),u=r(53966),c=r(97768),p=r(25728),h=r(74887),y=r(36708),g=r(91429),f=r(88620),m=r(86738),v=r(91218),w=r(55156),b=r(60950),I=r(89808),A=r(99959);const S=Symbol("isSceneGraphicOrigin");var C;class M extends A.A{get[(C=S,b.ym)](){return this.layer}get[w.e](){return this.layer}get[I.Q](){return this.layer}constructor(e){super(),this[C]=!0,this.type="scene",this.layer=e}get id(){return this.layer.id}}var F=r(4146),x=r(55726),L=r(52136),T=r(18768),j=r(69208),E=r(47685),O=r(16131),P=r(8303),_=r(25036),U=r(58947),Z=r(82935),R=r(25482),N=r(30524);function D({associatedLayer:e,serviceUpdateTimeStamp:t}){const r=e?.editingInfo?.lastEditDate,i=e?.serverGens,s=null!=r,n=null!=t,o=s&&n&&t.lastUpdate!==r.getTime();return s&&(o||!n&&i?.minServerGen!==i?.serverGen)}var $=r(96184),k=r(79677),q=r(10184);const H=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.serviceTimeInfo=null}get timeInfo(){const e=this.associatedLayer?.timeInfo;if(null==e)return null;const t=e.clone();return(0,N.sv)(t,this.fieldsIndex),t}set timeInfo(e){(0,N.sv)(e,this.fieldsIndex),this._override("timeInfo",e)}get timeExtent(){return this.associatedLayer?.timeExtent}set timeExtent(e){this._override("timeExtent",e)}get timeOffset(){return this.associatedLayer?.timeOffset}set timeOffset(e){this._override("timeOffset",e)}get datesInUnknownTimezone(){return this.associatedLayer?.datesInUnknownTimezone??!1}set datesInUnknownTimezone(e){this._override("datesInUnknownTimezone",e)}async loadTimeInfoFromService(e){const{serviceTimeInfo:t}=this;if(null==t)return;const{startTimeField:r,endTimeField:i}=t;if(null==r&&null==i)return;if(D({associatedLayer:this.associatedLayer,serviceUpdateTimeStamp:this.serviceUpdateTimeStamp}))return;const s=async t=>{let i=null;try{const r=await(this.fetchStatistics?.(t,e));i=r?.stats}catch{}if(null==i)return null;const{minTimeStr:s,min:n,maxTimeStr:o,max:a}=i,l=t===r?s??n:o??a;return null!=l?new Date(l):null},[n,o]=await Promise.all([s(r),s(i)]);if(null!=r&&null==n||null!=i&&null==o)return;const a=new k.A({start:n,end:o});this.setAtOrigin("timeInfo",new $.A({endField:i,startField:r,fullTimeExtent:a}),"service")}};return(0,i.Cg)([(0,g.MZ)({type:$.A,json:{read:!1,write:!1}})],r.prototype,"timeInfo",null),(0,i.Cg)([(0,g.MZ)({type:k.A,json:{read:!1,write:!1}})],r.prototype,"timeExtent",null),(0,i.Cg)([(0,g.MZ)({type:q.A,json:{read:!1,write:!1}})],r.prototype,"timeOffset",null),(0,i.Cg)([(0,g.MZ)({type:Boolean,nonNullable:!0,json:{read:!1,write:!1}})],r.prototype,"datesInUnknownTimezone",null),(0,i.Cg)([(0,g.MZ)({type:K,readOnly:!0,json:{read:{source:"timeInfo"}},clonable:!1})],r.prototype,"serviceTimeInfo",void 0),r=(0,i.Cg)([(0,g.$K)("esri.layers.mixins.TemporalSceneLayer")],r),r};let K=class extends R.o{constructor(){super(...arguments),this.endTimeField=null,this.startTimeField=null}};(0,i.Cg)([(0,g.MZ)({type:String})],K.prototype,"endTimeField",void 0),(0,i.Cg)([(0,g.MZ)({type:String})],K.prototype,"startTimeField",void 0),K=(0,i.Cg)([(0,g.$K)("esri.layers.mixins.TemporalSceneLayer.SceneServiceTimeInfo")],K);var G=r(60694),V=r(92009),Q=r(4071),J=r(10873),B=r(15426),z=r(40530),W=r(67202),Y=r(17036),X=r(95466),ee=r(50805),te=r(20557),re=r(46499),ie=r(39383),se=r(37352),ne=r(4513),oe=r(86390);let ae=class extends R.o{constructor(){super(...arguments),this.name=null,this.field=null,this.currentRangeExtent=null,this.fullRangeExtent=null,this.type="rangeInfo"}};(0,i.Cg)([(0,g.MZ)({type:String,json:{read:!0,write:{isRequired:!0}}})],ae.prototype,"name",void 0),(0,i.Cg)([(0,g.MZ)({type:String,json:{read:!0,write:{isRequired:!0}}})],ae.prototype,"field",void 0),(0,i.Cg)([(0,g.MZ)({type:[Number],json:{read:!0,write:!0}})],ae.prototype,"currentRangeExtent",void 0),(0,i.Cg)([(0,g.MZ)({type:[Number],json:{read:!0,write:!0}})],ae.prototype,"fullRangeExtent",void 0),(0,i.Cg)([(0,g.MZ)({type:["rangeInfo"],readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],ae.prototype,"type",void 0),ae=(0,i.Cg)([(0,g.$K)("esri.layers.support.RangeInfo")],ae);var le,de=r(11254),ue=r(4718),ce=r(87024),pe=r(67076),he=r(39829);let ye=le=class extends((0,R.T)(a.A.ofType(he.A))){constructor(e){super(e)}clone(){return new le(this.items.map(e=>e.clone()))}write(e,t){return this.toJSON(t)}toJSON(e){const t=e?.layer?.spatialReference;return t?this.toArray().map(r=>{if(!t.equals(r.spatialReference)){if(!(0,v.canProjectWithoutEngine)(r.spatialReference,t))return e?.messages?.push(new pe.A("scenefilter:unsupported","Scene filters with incompatible spatial references are not supported",{modification:this,spatialReference:e.layer.spatialReference,context:e})),null;const i=new he.A;(0,v.projectPolygon)(r,i,t),r=i}const i=r.toJSON(e);return delete i.spatialReference,i}).filter(e=>null!=e):this.toArray().map(t=>t.toJSON(e))}static fromJSON(e,t){const r=new le;return e.forEach(e=>r.add(he.A.fromJSON(e,t))),r}};ye=le=(0,i.Cg)([(0,g.$K)("esri.layers.support.PolygonCollection")],ye);const ge=ye;var fe,me=r(97159),ve=r(36005);let we=fe=class extends R.o{constructor(e){super(e),this.spatialRelationship="disjoint",this.geometries=new ge,this._geometriesSource=null}initialize(){this.addHandles((0,y.on)(()=>this.geometries,"after-changes",()=>this.geometries=this.geometries,y.OH))}readGeometries(e,t,r){Array.isArray(e)?this.geometries=ge.fromJSON(e,r):"web-scene"!==r.origin&&"portal-item"!==r.origin||(this._geometriesSource={url:(0,me.f)(e,r),context:r})}async loadGeometries(e,t){if(null==this._geometriesSource)return;const{url:r,context:i}=this._geometriesSource,s=await(0,de.A)(r,{responseType:"json",signal:t?.signal}),n=e.toJSON(),o=s.data.map(e=>({...e,spatialReference:n}));this.geometries=ge.fromJSON(o,i),this._geometriesSource=null}clone(){const e=new fe({geometries:(0,ue.o8)(this.geometries),spatialRelationship:this.spatialRelationship});return e._geometriesSource=this._geometriesSource,e}};(0,i.Cg)([(0,g.MZ)({type:["disjoint","contains"],nonNullable:!0,json:{write:{isRequired:!0}}})],we.prototype,"spatialRelationship",void 0),(0,i.Cg)([(0,g.MZ)({type:ge,nonNullable:!0,json:{write:!0,origins:{"web-scene":{write:{isRequired:!0}}}}}),(0,ce.P)({origins:["web-scene","portal-item"],type:"resource",prefix:"geometries",contentAddressed:!0})],we.prototype,"geometries",void 0),(0,i.Cg)([(0,ve.w)(["web-scene","portal-item","service"],"geometries")],we.prototype,"readGeometries",null),we=fe=(0,i.Cg)([(0,g.$K)("esri.layers.support.SceneFilter")],we);const be=we;var Ie=r(84952),Ae=r(8947),Se=r(41214),Ce=r(61956),Me=r(56776),Fe=r(30291);async function xe(e){const t=[];for(const r of e)r.name.toLowerCase().endsWith(".zip")?t.push(Le(r)):t.push(Promise.resolve(r));return(await Promise.all(t)).flat()}async function Le(e){const{BlobReader:t,ZipReader:i,BlobWriter:s}=await Promise.all([r.e(1967),r.e(9588)]).then(r.bind(r,9588)),n=[],o=new i(new t(e));return(await o.getEntries()).forEach(e=>{if(e.directory||/^__MACOS/i.test(e.filename))return;const t=new s;n.push(e.getData(t).then(t=>new File([t],e.filename)))}),Promise.all(n)}var Te=r(5682),je=r(45671),Ee=r(78553);const Oe=new Set(["3DObject","Point"]),Pe=(0,Y.p)();let _e=class extends(H((0,E.w6)((0,U.w6)((0,T.b)((0,O.q)((0,P.A)((0,_.j)((0,p.P)((0,j.d)((0,L.p)((0,o.OU)(F.A)))))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType="ArcGISSceneServiceLayer",this.type="scene",this.fields=null,this.graphicOrigin=new M(this),this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new a.A,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.attributeTableTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0,this.serviceItemId=void 0}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._set("renderer",null),this.associatedLayer=(0,c.pR)(this.associatedLayer)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getField(e)?.domain??null;return this.associatedLayer?(0,B.Vq)(this.associatedLayer,e,t,r):r}getFeatureType(e){return e&&this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return this.associatedLayer?.types??[]}get typeIdField(){return this.associatedLayer?.typeIdField??null}get templates(){return this.associatedLayer?.templates??null}get formTemplate(){return this.associatedLayer?.formTemplate??null}get fieldsIndex(){return new X.A(this.fields)}readNodePages(e,t,r){return"Point"===t.layerType&&(e=t.pointNodePages),null==e||"object"!=typeof e?null:ee.W4.fromJSON(e,r)}set elevationInfo(e){this._set("elevationInfo",e),this.loaded&&this._validateElevationInfo()}get effectiveCapabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.effectiveCapabilities)}get effectiveEditingEnabled(){return null!=this.associatedLayer&&(0,B.C$)(this.associatedLayer)}get geometryType(){return Ze[this.profile]||"mesh"}set renderer(e){(0,N.yp)(e,this.fieldsIndex),this._set("renderer",e)}readCachedDrawingInfo(e){return null!=e&&"object"==typeof e||(e={}),null==e.color&&(e.color=!1),e}get capabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.capabilities)}_capabilitiesFromAssociatedFeatureLayer(e){e=null!=e?e:Q.P;const{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsRollbackOnFailure:s,supportsUploadWithItemId:n,supportsGeometryUpdate:o,supportsReturnServiceEditsInSourceSpatialReference:a},data:{supportsZ:l,supportsM:d,isVersioned:u,supportsAttachment:c},operations:{supportsEditing:p,supportsAdd:h,supportsUpdate:y,supportsDelete:g,supportsQuery:f,supportsQueryAttachments:m,supportsAsyncConvert3D:v}}=e,w=e.operations.supportsChangeTracking,b=!!this.associatedLayer?.infoFor3D;return{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsReturnServiceEditsInSourceSpatialReference:a,supportsRollbackOnFailure:s,supportsGeometryUpdate:b&&o,supportsUploadWithItemId:n},data:{supportsAttachment:c,supportsZ:l,supportsM:d,isVersioned:u},operations:{supportsQuery:f,supportsQueryAttachments:m,supportsEditing:p&&w,supportsAdd:b&&h&&w,supportsDelete:b&&g&&w,supportsUpdate:y&&w,supportsAsyncConvert3D:v}}}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.associatedLayer?.editingEnabled??!1}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}get relationships(){return this.associatedLayer?.relationships}get defaultPopupTemplate(){return this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some(t=>("esriFieldTypeOID"===t.type&&(e=t.name),!!e)),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some(t=>("esriFieldTypeGlobalID"===t.type&&(e=t.name),!!e)),e||void 0}get displayField(){return this.associatedLayer?.displayField??null}readProfile(e,t){const r=t.store.profile;return null!=r&&Ue[r]?Ue[r]:(u.A.getLogger(this).error("Unknown or missing profile",{profile:r,layer:this}),"mesh-pyramids")}get useViewTime(){return this.associatedLayer?.useViewTime??!0}set useViewTime(e){this._override("useViewTime",e)}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){const t=e?.signal;await this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(h.QP),await this._fetchService(t),await Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),this._loadFilterGeometries()]),this._validateElevationInfo(),this._applyAssociatedLayerOverrides(),this._populateFieldUsageInfo(),await this.loadTimeInfoFromService(e),await(0,Ae.L)(this,{origin:"service"},t),(0,N.yp)(this.renderer,this.fieldsIndex),await this.finishLoadEditablePortalLayer(e)}async beforeSave(){null!=this.filter&&(this.filter=this.filter.clone(),await this.load())}async _loadFilterGeometries(){if(this.filter)try{await this.filter.loadGeometries(this.spatialReference)}catch(e){u.A.getLogger(this).error("#_loadFilterGeometries()",this,"Failed to load filter geometries. Geometry filter will not be applied for this layer.",{error:e}),this.filter=null}}createQuery(){const e=new Ce.A;return"mesh"===this.geometryType?this.capabilities.query.supportsReturnMesh&&(e.returnGeometry=!0):(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e.outFields=["*"],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryExtent(e||this.createQuery(),t))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatureCount(e||this.createQuery(),t))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatures(e||this.createQuery(),t)).then(e=>{if(e?.features)for(const t of e.features)t.layer=this,t.sourceLayer=this,t.origin=this.graphicOrigin;return e})}async queryRelatedFeatures(e,t){if(await this.load(),!this.associatedLayer)throw new l.A("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.associatedLayer)throw new l.A("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeaturesCount(e,t)}async queryCachedAttributes(e,t){const r=(0,N.hL)(this.fieldsIndex,await(0,je.TO)(this,(0,je.D8)(this)));return(0,Te.s1)(this.parsedUrl?.path??"",this.attributeStorageInfo??[],e,t,r,this.apiKey,this.customParameters)}async queryCachedFeature(e,t){const r=await this.queryCachedAttributes(e,[t]);if(!r||0===r.length)throw new l.A("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const i=new s.A;return i.attributes=r[0],i.layer=this,i.sourceLayer=this,i.origin=this.graphicOrigin,i}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryObjectIds(e||this.createQuery(),t))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryAttachments(e,t))}getFieldUsageInfo(e){const t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(u.A.getLogger(this).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return(0,Fe.tn)(this,e)}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return e?.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),!this.associatedLayer)throw new l.A("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new l.A("scenelayer:query-not-available","SceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return null!=this.statisticsInfo&&this.statisticsInfo.some(t=>t.name===e)}async queryCachedStatistics(e,t){return await this.load(t),await this.fetchStatistics(e,t)}async saveAs(e,t){return this._debouncedSaveOperations(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(0,e)}async applyEdits(e,t){const{applyEdits:i}=await r.e(8628).then(r.bind(r,78628));let s=t;await this.load();const n=this.associatedLayer;if(!n)throw new l.A(`${this.type}-layer:not-editable`,"Service is not editable");await n.load();const{globalIdField:o}=n,a=!!n.infoFor3D,d=s?.globalIdUsed??!0;if(a&&null==o)throw new l.A(`${this.type}-layer:not-editable`,"Valid globalIdField expected on editable SceneLayer");if(a&&!d)throw new l.A(`${this.type}-layer:globalid-required`,"globalIdUsed must not be false for SceneLayer editing as globalIds are required.");return(0,G.Wo)(n.url)&&a&&null!=e.deleteFeatures&&null!=o&&(s={...s,globalIdToObjectId:await(0,B.GA)(n,e.deleteFeatures,o)}),i(this,n.source,e,s)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new l.A(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}async convertMesh(e,t){t??={};const i=e=>{throw u.A.getLogger(this).error(".convertMesh()",e.message),e};await this.load(t),this.infoFor3D||i(new l.A("invalid:layer","SceneLayer has no capability for mesh conversion"));const s=await this.extractAndFilterFiles(e);(0,h.Te)(t);const n=s.reduce((e,t)=>(0,te.oF)(this.infoFor3D,t)?e+1:e,0);0===n&&i(new x.VP),n>1&&i(new x.XQ);const o=this.spatialReference,a=t.origin,d=await(0,v.projectWithZConversion)(a??t.defaultOrigin??new m.A({x:0,y:0,z:0,spatialReference:o}),o,t),c=o.isGeographic?"local":"georeferenced",{default:p}=await Promise.all([r.e(8487),r.e(36)]).then(r.bind(r,40036));(0,h.Te)(t);const y=p.createWithExternalSource(d,{type:"client",files:s},{vertexSpace:c,transform:(0,oe.Z)(o),unitConversionDisabled:!0}),[g]=await this.uploadAssets([y],{...t,useAssetOrigin:!a});return g}async extractAndFilterFiles(e){await this.load();const t=this.infoFor3D;return t?(await xe(e)).filter(e=>(0,te.fu)(t,e)):e}validateLayer(e){if(e.layerType&&!Oe.has(e.layerType))throw new l.A("scenelayer:layer-type-not-supported","SceneLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new l.A("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});if(this.version.major>2)throw new l.A("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});!function(e,t){let r=!1,i=!1;if(null==e)r=!0,i=!0;else{const s=t&&t.isGeographic;switch(e){case"east-north-up":case"earth-centered":r=!0,i=s;break;case"vertex-reference-frame":r=!0,i=!s;break;default:r=!1}}if(!r)throw new l.A("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!i)throw new l.A("scenelayer:incompatible-normal-reference-frame","Normal reference frame is incompatible with layer spatial reference.")}(this.normalReferenceFrame,this.spatialReference)}_getTypeKeywords(){const e=[];if("points"===this.profile)e.push("Point");else{if("mesh-pyramids"!==this.profile)throw new l.A("scenelayer:unknown-profile","SceneLayer:save() encountered an unknown SceneLayer profile: "+this.profile);e.push("3DObject")}return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(const e of this.fields){const t=!!this.attributeStorageInfo?.some(t=>t.name===e.name),r=!!this.associatedLayer?.fields?.some(t=>t&&e.name===t.name),i={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||r,supportsLayerQuery:r};this._fieldUsageInfo[e.name]=i}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPropertyOverrides(),this._applyAssociatedLayerExtentOverride(),this._applyAssociatedLayerPrivileges()}_applyAssociatedLayerFieldsOverrides(){if(!this.associatedLayer?.fields)return;let e=null;for(const t of this.associatedLayer.fields){const r=this.getField(t.name);r?(!r.domain&&t.domain&&(r.domain=t.domain.clone()),r.editable=t.editable,r.nullable=t.nullable,r.length=t.length):(e||(e=this.fields?this.fields.slice():[]),e.push(t.clone()))}e&&this._set("fields",e)}_applyAssociatedLayerPropertyOverrides(){if(!this.associatedLayer)return;const e=["popupTemplate","popupEnabled","attributeTableTemplate"],t=(0,f.oY)(this);for(let r=0;r<e.length;r++){const i=e[r],s=this.originIdOf(i),n=this.associatedLayer.originIdOf(i);s<n&&(2===n||3===n)&&t.setAtOrigin(i,this.associatedLayer[i],n)}}_applyAssociatedLayerExtentOverride(){const e=this.associatedLayer?.getAtOrigin("fullExtent","service");null!=this.associatedLayer?.infoFor3D&&e&&(0,G.Wo)(this.associatedLayer?.url)&&D(this)&&(0,f.oY)(this).setAtOrigin("fullExtent",e.clone(),2)}_applyAssociatedLayerPrivileges(){const e=this.associatedLayer;e&&(this._set("userHasEditingPrivileges",e.userHasEditingPrivileges),this._set("userHasFullEditingPrivileges",e.userHasFullEditingPrivileges),this._set("userHasUpdateItemPrivileges",e.userHasUpdateItemPrivileges))}async _setAssociatedFeatureLayer(e){if(["mesh-pyramids","points"].includes(this.profile))try{const{serverUrl:t,layerId:r,portalItem:i}=await(0,V.L)(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e}),s=await ne.S.FeatureLayer();this.associatedLayer=new s({url:t,customParameters:this.customParameters,layerId:r,portalItem:i}),await this.associatedLayer.load()}catch(e){(0,h.zf)(e)||this._logWarningOnPopupEnabled()}}async _logWarningOnPopupEnabled(){const e=new AbortController;this.addHandles((0,d.rE)(e));try{await(0,y.C_)(()=>this.popupEnabled&&null!=this.popupTemplate,e.signal)}catch(e){return void(0,h.jH)(e)}const t=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?u.A.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${t}`):u.A.getLogger(this).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${t}`)}_validateElevationInfo(){const e=this.elevationInfo;"mesh-pyramids"===this.profile&&(0,Me.XF)(u.A.getLogger(this),(0,Me.$7)("Mesh scene layers","relative-to-scene",e)),(0,Me.XF)(u.A.getLogger(this),(0,Me.tW)("Scene layers",e))}async fetchStatistics(e,t){return await async function({fieldName:e,statisticsInfo:t,errorContext:r,fieldsIndex:i,path:s,customParameters:n,apiKey:o,signal:a}){if(null==t)throw new l.A(`${r}:no-cached-statistics`,"Cached statistics are not available for this layer");const d=i.get(e);if(null==d)throw new l.A(`${r}:field-unexisting`,`Field '${e}' does not exist on the layer`);const u=t.find(e=>e.name===d.name);if(null==u)throw new l.A(`${r}:no-cached-statistics`,"Cached statistics for this attribute are not available");const c=(0,Ie.fj)(s,u.href),{data:p}=await(0,de.A)(c,{query:{f:"json",...n,token:o},responseType:"json",signal:a});return p}({fieldName:e,statisticsInfo:this.statisticsInfo,errorContext:"scenelayer",fieldsIndex:this.fieldsIndex,path:this.parsedUrl?.path??"",customParameters:this.customParameters,apiKey:this.apiKey,signal:t?.signal})}};(0,i.Cg)([(0,g.MZ)({types:{key:"type",base:z.c,typeMap:{selection:W.A}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:{allowNull:!0}},"portal-item":{name:"layerDefinition.featureReduction",write:{allowNull:!0}}}}})],_e.prototype,"featureReduction",void 0),(0,i.Cg)([(0,g.MZ)({type:[ae],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}},clonable:!1})],_e.prototype,"rangeInfos",void 0),(0,i.Cg)([(0,g.MZ)({json:{read:!1}})],_e.prototype,"associatedLayer",void 0),(0,i.Cg)([(0,g.MZ)({type:["show","hide"]})],_e.prototype,"listMode",void 0),(0,i.Cg)([(0,g.MZ)({type:["ArcGISSceneServiceLayer"]})],_e.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,g.MZ)({json:{read:!1},readOnly:!0})],_e.prototype,"type",void 0),(0,i.Cg)([(0,g.MZ)({...Pe.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],_e.prototype,"fields",void 0),(0,i.Cg)([(0,g.MZ)()],_e.prototype,"types",null),(0,i.Cg)([(0,g.MZ)()],_e.prototype,"typeIdField",null),(0,i.Cg)([(0,g.MZ)()],_e.prototype,"templates",null),(0,i.Cg)([(0,g.MZ)()],_e.prototype,"formTemplate",null),(0,i.Cg)([(0,g.MZ)({readOnly:!0})],_e.prototype,"graphicOrigin",void 0),(0,i.Cg)([(0,g.MZ)({readOnly:!0,clonable:!1})],_e.prototype,"fieldsIndex",null),(0,i.Cg)([(0,g.MZ)({type:se.A,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],_e.prototype,"floorInfo",void 0),(0,i.Cg)([(0,g.MZ)(Pe.outFields)],_e.prototype,"outFields",void 0),(0,i.Cg)([(0,g.MZ)({type:ee.W4,readOnly:!0,json:{read:!1},clonable:!1})],_e.prototype,"nodePages",void 0),(0,i.Cg)([(0,ve.w)("service","nodePages",["nodePages","pointNodePages"])],_e.prototype,"readNodePages",null),(0,i.Cg)([(0,g.MZ)({type:[ee.uV],readOnly:!0,clonable:!1})],_e.prototype,"materialDefinitions",void 0),(0,i.Cg)([(0,g.MZ)({type:[ee.Ot],readOnly:!0,clonable:!1})],_e.prototype,"textureSetDefinitions",void 0),(0,i.Cg)([(0,g.MZ)({type:[ee.L0],readOnly:!0,clonable:!1})],_e.prototype,"geometryDefinitions",void 0),(0,i.Cg)([(0,g.MZ)({readOnly:!0})],_e.prototype,"serviceUpdateTimeStamp",void 0),(0,i.Cg)([(0,g.MZ)({readOnly:!0})],_e.prototype,"attributeStorageInfo",void 0),(0,i.Cg)([(0,g.MZ)({readOnly:!0})],_e.prototype,"statisticsInfo",void 0),(0,i.Cg)([(0,g.MZ)({type:a.A.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],_e.prototype,"excludeObjectIds",void 0),(0,i.Cg)([(0,g.MZ)({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],_e.prototype,"definitionExpression",void 0),(0,i.Cg)([(0,g.MZ)({type:be,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],_e.prototype,"filter",void 0),(0,i.Cg)([(0,g.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],_e.prototype,"path",void 0),(0,i.Cg)([(0,g.MZ)(J.Yj)],_e.prototype,"elevationInfo",null),(0,i.Cg)([(0,g.MZ)({readOnly:!0,json:{read:!1}})],_e.prototype,"effectiveCapabilities",null),(0,i.Cg)([(0,g.MZ)({readOnly:!0})],_e.prototype,"effectiveEditingEnabled",null),(0,i.Cg)([(0,g.MZ)({type:String})],_e.prototype,"geometryType",null),(0,i.Cg)([(0,g.MZ)(J.kF)],_e.prototype,"labelsVisible",void 0),(0,i.Cg)([(0,g.MZ)({type:[re.A],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:ie.w},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:ie.w},write:!0}})],_e.prototype,"labelingInfo",void 0),(0,i.Cg)([(0,g.MZ)(J.fV)],_e.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,g.MZ)({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:["opacity","layerDefinition.drawingInfo.transparency"],reader(e,t){if("number"==typeof e&&e>=0&&e<=1)return e;const r=t.layerDefinition?.drawingInfo?.transparency;return void 0!==r?(0,Ee.D)(r):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],_e.prototype,"opacity",void 0),(0,i.Cg)([(0,g.MZ)({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],_e.prototype,"priority",void 0),(0,i.Cg)([(0,g.MZ)({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],_e.prototype,"semantic",void 0),(0,i.Cg)([(0,g.MZ)({types:Se.XJ,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],_e.prototype,"renderer",null),(0,i.Cg)([(0,g.MZ)({json:{read:!1}})],_e.prototype,"cachedDrawingInfo",void 0),(0,i.Cg)([(0,ve.w)("service","cachedDrawingInfo")],_e.prototype,"readCachedDrawingInfo",null),(0,i.Cg)([(0,g.MZ)({readOnly:!0,json:{read:!1}})],_e.prototype,"capabilities",null),(0,i.Cg)([(0,g.MZ)({type:Boolean,json:{read:!1}})],_e.prototype,"editingEnabled",null),(0,i.Cg)([(0,g.MZ)({readOnly:!0,json:{write:!1,read:!1}})],_e.prototype,"infoFor3D",null),(0,i.Cg)([(0,g.MZ)({readOnly:!0,json:{write:!1,read:!1}})],_e.prototype,"relationships",null),(0,i.Cg)([(0,g.MZ)(J.M6)],_e.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,g.MZ)({type:n.A,json:{name:"popupInfo",write:!0}})],_e.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,g.MZ)({readOnly:!0,json:{read:!1}})],_e.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,g.MZ)(J.zQ)],_e.prototype,"attributeTableTemplate",void 0),(0,i.Cg)([(0,g.MZ)({type:String,json:{read:!1}})],_e.prototype,"objectIdField",void 0),(0,i.Cg)([(0,ve.w)("service","objectIdField",["objectIdField","fields"])],_e.prototype,"readObjectIdField",null),(0,i.Cg)([(0,g.MZ)({type:String,json:{read:!1}})],_e.prototype,"globalIdField",void 0),(0,i.Cg)([(0,ve.w)("service","globalIdField",["globalIdField","fields"])],_e.prototype,"readGlobalIdField",null),(0,i.Cg)([(0,g.MZ)({readOnly:!0,type:String,json:{read:!1}})],_e.prototype,"displayField",null),(0,i.Cg)([(0,g.MZ)({type:String,json:{read:!1}})],_e.prototype,"profile",void 0),(0,i.Cg)([(0,ve.w)("service","profile",["store.profile"])],_e.prototype,"readProfile",null),(0,i.Cg)([(0,g.MZ)({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],_e.prototype,"normalReferenceFrame",void 0),(0,i.Cg)([(0,g.MZ)(J.PY)],_e.prototype,"screenSizePerspectiveEnabled",void 0),(0,i.Cg)([(0,g.MZ)({json:{read:!1,origins:{service:{read:!0}}}})],_e.prototype,"serviceItemId",void 0),(0,i.Cg)([(0,g.MZ)(Z.B)],_e.prototype,"useViewTime",null),_e=(0,i.Cg)([(0,g.$K)("esri.layers.SceneLayer")],_e);const Ue={"mesh-pyramids":"mesh-pyramids",meshpyramids:"mesh-pyramids","features-meshes":"mesh-pyramids",points:"points","features-points":"points",lines:"lines","features-lines":"lines",polygons:"polygons","features-polygons":"polygons"},Ze={"mesh-pyramids":"mesh",points:"point"},Re=_e},40530:(e,t,r)=>{r.d(t,{c:()=>o});var i=r(31635),s=r(25482),n=r(91429);let o=class extends s.o{constructor(){super(...arguments),this.type=null}};(0,i.Cg)([(0,n.MZ)({type:["selection","cluster","binning"],readOnly:!0,json:{read:!1,write:!0}})],o.prototype,"type",void 0),o=(0,i.Cg)([(0,n.$K)("esri.layers.support.FeatureReduction")],o)},47685:(e,t,r)=>{r.d(t,{Mk:()=>y,Zk:()=>p,w6:()=>m});var i=r(31635),s=r(65529),n=r(4718),o=r(74887),a=r(91429),l=r(20816);const d=new s.bk;function u(e){return d.on("apply-edits",new WeakRef(e))}function c(e){return d.on("update-moment",new WeakRef(e))}function p(e,t,r=null,i=!1){const s=(0,o.Tw)();return i=null==t||i,d.emit("apply-edits",{serviceUrl:e,layerId:t,gdbVersion:r,mayReceiveServiceEdits:i,result:s.promise}),s}const h=Symbol();function y(e){return null!=e&&"object"==typeof e&&h in e}function g(e){return null!=e&&"object"==typeof e&&"gdbVersion"in e}function f(e,t,r){const i=new URL(e).host,s=l.Z3.get(i),n=e=>!e||e===s;return n(t)&&n(r)||t===r}const m=e=>{var t;const r=e;let s=class extends r{static{t=h}constructor(...e){super(...e),this[t]=!0,this._applyEditsHandler=e=>{const{serviceUrl:t,layerId:r,gdbVersion:i,mayReceiveServiceEdits:s,result:o}=e,a=t===this.url,l=null!=r&&null!=this.layerId&&r===this.layerId,d=g(this),u=g(this)&&f(t,i,this.gdbVersion);if(!a||d&&!u||!l&&!s)return;const c=o.then(e=>{if(this.lastEditsEventDate=new Date,l&&(e.addedFeatures.length||e.updatedFeatures.length||e.deletedFeatures.length||e.addedAttachments.length||e.updatedAttachments.length||e.deletedAttachments.length))return this.emit("edits",(0,n.o8)(e)),e;const r=e.editedFeatures?.find(({layerId:e})=>e===this.layerId);if(r){const{adds:t,updates:i,deletes:s}=r.editedFeatures,o={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:t?t.map(({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]})):[],deletedFeatures:s?s.map(({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]})):[],updatedFeatures:i?i.map(({current:{attributes:e}})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]})):[],editedFeatures:(0,n.o8)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,n.o8)(e.historicMoment)};return this.emit("edits",o),o}const s={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:[],deletedFeatures:[],updatedFeatures:[],editedFeatures:(0,n.o8)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,n.o8)(e.historicMoment)};return"historicMoment"in this&&this._shouldUpdateHistoricMoment(t,i,s.historicMoment)&&this.emit("edits",s),s}).then(e=>("historicMoment"in this&&this._shouldUpdateHistoricMoment(t,i,e.historicMoment)&&(this.historicMoment=e.historicMoment),e));this.emit("apply-edits",{result:c})},this._updateMomentHandler=e=>{const{serviceUrl:t,gdbVersion:r,moment:i}=e,s=t===this.url,n=g(this),o=g(this)&&f(t,r,this.gdbVersion),a=g(this)&&!f(t,this.gdbVersion,null);s&&n&&o&&a&&"historicMoment"in this&&this.historicMoment!==i&&(this.historicMoment=i)},this.when().then(()=>{this.addHandles(u(this._applyEditsHandler)),"historicMoment"in this&&this.addHandles(c(this._updateMomentHandler))},()=>{})}_shouldUpdateHistoricMoment(e,t,r){return"historicMoment"in this&&this.historicMoment!==r&&(0,l.w5)(e,t)}};return(0,i.Cg)([(0,a.MZ)()],s.prototype,"lastEditsEventDate",void 0),s=(0,i.Cg)([(0,a.$K)("esri.layers.mixins.EditBusLayer")],s),s}},54239:(e,t,r)=>{r.d(t,{A:()=>f});var i,s=r(31635),n=r(4576),o=r(66552),a=r(25482),l=r(86211),d=r(67076),u=r(91429),c=r(43937),p=r(36005);const h=(0,o.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),y=h.jsonValues.slice();(0,n.Xy)(y,"orthometric");const g=(0,o.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 f=i=class extends a.o{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return h.write(e,t,r)}readHeightModel(e,t,r){return h.read(e)||(r?.messages&&r.messages.push(function(e,t){return new d.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return g.read(e)||(r?.messages&&r.messages.push(m(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,l.LA)(e)||g.read(e)||(r?.messages&&r.messages.push(m(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 m(e,t){return new d.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,s.Cg)([(0,u.MZ)({type:h.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:y,default:"ellipsoidal",write:{isRequired:!0}}}}})],f.prototype,"heightModel",void 0),(0,s.Cg)([(0,c.K)("web-scene","heightModel")],f.prototype,"writeHeightModel",null),(0,s.Cg)([(0,p.w)(["web-scene","service"],"heightModel")],f.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}}}}})],f.prototype,"heightUnit",void 0),(0,s.Cg)([(0,p.w)("web-scene","heightUnit")],f.prototype,"readHeightUnit",null),(0,s.Cg)([(0,p.w)("service","heightUnit")],f.prototype,"readHeightUnitService",null),(0,s.Cg)([(0,u.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],f.prototype,"vertCRS",void 0),(0,s.Cg)([(0,p.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],f.prototype,"readVertCRS",null),f=i=(0,s.Cg)([(0,u.$K)("esri.geometry.HeightModelInfo")],f)},55726:(e,t,r)=>{r.d(t,{$1:()=>d,H2:()=>h,MT:()=>y,VP:()=>g,WF:()=>u,Wt:()=>o,XQ:()=>f,hK:()=>p,nS:()=>c,uh:()=>a,xY:()=>l});var i=r(49186);const s="upload-assets",n=()=>new Error;class o extends i.A{constructor(){super(`${s}:unsupported`,"Layer does not support asset uploads.",n())}}class a extends i.A{constructor(){super(`${s}:no-glb-support`,"Layer does not support glb.",n())}}class l extends i.A{constructor(){super(`${s}:no-supported-source`,"No supported external source found",n())}}class d extends i.A{constructor(){super(`${s}:not-base-64`,"Expected gltf data in base64 format after conversion.",n())}}class u extends i.A{constructor(){super(`${s}:unable-to-prepare-options`,"Unable to prepare uploadAsset request options.",n())}}class c extends i.A{constructor(e,t){super(`${s}:bad-response`,`Bad response. Uploaded ${e} items and received ${t} results.`,n())}}class p extends i.A{constructor(e,t){super(`${s}-layer:upload-failed`,`Failed to upload mesh file ${e}. Error code: ${t?.code??"-1"}. Error message: ${t?.messages??"unknown"}`,n())}}class h extends i.A{constructor(e){super(`${s}-layer:unsupported-format`,`The service allowed us to upload an asset of FormatID ${e}, but it does not list it in its supported formats.`,n())}}class y extends i.A{constructor(){super(`${s}:convert3D-failed`,"convert3D failed.")}}class g extends i.A{constructor(){super("invalid-input:no-model","No supported model found")}}class f extends i.A{constructor(){super("invalid-input:multiple-models","Multiple supported models found")}}},67202:(e,t,r)=>{r.d(t,{A:()=>a});var i,s=r(31635),n=r(91429),o=r(40530);let a=i=class extends o.c{constructor(e){super(e),this.type="selection"}clone(){return new i}};(0,s.Cg)([(0,n.MZ)({type:["selection"]})],a.prototype,"type",void 0),a=i=(0,s.Cg)([(0,n.$K)("esri.layers.support.FeatureReductionSelection")],a)},69208:(e,t,r)=>{r.d(t,{d:()=>n});var i=r(31635),s=r(91429);const n=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.customParameters=null}};return(0,i.Cg)([(0,s.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.$K)("esri.layers.mixins.CustomParametersMixin")],r),r}},73133:(e,t,r)=>{r.d(t,{j:()=>i});const i=(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})},73179:(e,t,r)=>{r.d(t,{b:()=>l,h:()=>d});var i=r(4718),s=r(53966),n=r(84952),o=r(60694),a=r(10873);function l(e){const{nonStandardUrlAllowed:t=!1,separator:r}=e??{},n=(0,i.o8)(a.OZ),l=n.json?.write;return"object"==typeof l&&l&&(l.writer=function(e,t,i,s){(0,o.LS)(this,e,r,t,s)}),{...n,set:function(e){if(null==e)return void this._set("url",e);const r=(0,o.HZ)({layer:this,url:e,nonStandardUrlAllowed:t,logger:s.A.getLogger(this)});this._set("url",r.url),null!=r.layerId&&this._set("layerId",r.layerId)}}}function d(e,t){const{separator:r}=t??{},i=(0,n.An)(e.url);return null!=i&&(null!=e.dynamicDataSource?i.path=(0,n.fj)(i.path,"dynamicLayer"):null!=e.layerId&&(i.path=(0,n.fj)(i.path,r??"",e.layerId.toString()))),i}},73836:(e,t,r)=>{r.d(t,{A:()=>h});var i=r(31635),s=r(69540),n=r(25482),o=r(91429),a=r(58083),l=r(9093),d=r(67026),u=r(82534),c=r(51850),p=r(24770);let h=class extends((0,s.OU)(n.o)){constructor(e){super(e),this.translation=(0,c.vt)(),this.rotationAxis=(0,c.ci)(p.up),this.rotationAngle=0,this.scale=(0,c.fA)(1,1,1)}get rotation(){return(0,p.i4)(this.rotationAxis,this.rotationAngle)}set rotation(e){this.rotationAxis=(0,c.o8)((0,p.yo)(e)),this.rotationAngle=(0,p.g7)(e)}get localMatrix(){const e=(0,l.vt)();return(0,d.x8)(y,(0,p.yo)(this.rotation),(0,p.$I)(this.rotation)),(0,a.o1)(e,y,this.translation,this.scale),e}get localMatrixInverse(){return(0,a.B8)((0,l.vt)(),this.localMatrix)}equals(e){return this===e||null!=e&&(0,a.t2)(this.localMatrix,e.localMatrix)}};(0,i.Cg)([(0,o.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],h.prototype,"translation",void 0),(0,i.Cg)([(0,o.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],h.prototype,"rotationAxis",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],h.prototype,"rotationAngle",void 0),(0,i.Cg)([(0,o.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],h.prototype,"scale",void 0),(0,i.Cg)([(0,o.MZ)()],h.prototype,"rotation",null),(0,i.Cg)([(0,o.MZ)()],h.prototype,"localMatrix",null),(0,i.Cg)([(0,o.MZ)()],h.prototype,"localMatrixInverse",null),h=(0,i.Cg)([(0,o.$K)("esri.geometry.support.MeshTransform")],h);const y=(0,u.vt)()},80200:(e,t,r)=>{r.d(t,{T:()=>i,d:()=>g});const i={Base64:0,Hex:1,String:2,Raw:3},s=8,n=(1<<s)-1;function o(e,t){const r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function a(e){const t=[];for(let r=0,i=e.length*s;r<i;r+=s)t[r>>5]|=(e.charCodeAt(r/s)&n)<<r%32;return t}function l(e){const t=[];for(let r=0,i=32*e.length;r<i;r+=s)t.push(String.fromCharCode(e[r>>5]>>>r%32&n));return t.join("")}function d(e,t,r,i,s,n){return o(function(e,t){return e<<t|e>>>32-t}(o(o(t,e),o(i,n)),s),r)}function u(e,t,r,i,s,n,o){return d(t&r|~t&i,e,t,s,n,o)}function c(e,t,r,i,s,n,o){return d(t&i|r&~i,e,t,s,n,o)}function p(e,t,r,i,s,n,o){return d(t^r^i,e,t,s,n,o)}function h(e,t,r,i,s,n,o){return d(r^(t|~i),e,t,s,n,o)}function y(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;let r=1732584193,i=-271733879,s=-1732584194,n=271733878;for(let t=0;t<e.length;t+=16){const a=r,l=i,d=s,y=n;r=u(r,i,s,n,e[t],7,-680876936),n=u(n,r,i,s,e[t+1],12,-389564586),s=u(s,n,r,i,e[t+2],17,606105819),i=u(i,s,n,r,e[t+3],22,-1044525330),r=u(r,i,s,n,e[t+4],7,-176418897),n=u(n,r,i,s,e[t+5],12,1200080426),s=u(s,n,r,i,e[t+6],17,-1473231341),i=u(i,s,n,r,e[t+7],22,-45705983),r=u(r,i,s,n,e[t+8],7,1770035416),n=u(n,r,i,s,e[t+9],12,-1958414417),s=u(s,n,r,i,e[t+10],17,-42063),i=u(i,s,n,r,e[t+11],22,-1990404162),r=u(r,i,s,n,e[t+12],7,1804603682),n=u(n,r,i,s,e[t+13],12,-40341101),s=u(s,n,r,i,e[t+14],17,-1502002290),i=u(i,s,n,r,e[t+15],22,1236535329),r=c(r,i,s,n,e[t+1],5,-165796510),n=c(n,r,i,s,e[t+6],9,-1069501632),s=c(s,n,r,i,e[t+11],14,643717713),i=c(i,s,n,r,e[t],20,-373897302),r=c(r,i,s,n,e[t+5],5,-701558691),n=c(n,r,i,s,e[t+10],9,38016083),s=c(s,n,r,i,e[t+15],14,-660478335),i=c(i,s,n,r,e[t+4],20,-405537848),r=c(r,i,s,n,e[t+9],5,568446438),n=c(n,r,i,s,e[t+14],9,-1019803690),s=c(s,n,r,i,e[t+3],14,-187363961),i=c(i,s,n,r,e[t+8],20,1163531501),r=c(r,i,s,n,e[t+13],5,-1444681467),n=c(n,r,i,s,e[t+2],9,-51403784),s=c(s,n,r,i,e[t+7],14,1735328473),i=c(i,s,n,r,e[t+12],20,-1926607734),r=p(r,i,s,n,e[t+5],4,-378558),n=p(n,r,i,s,e[t+8],11,-2022574463),s=p(s,n,r,i,e[t+11],16,1839030562),i=p(i,s,n,r,e[t+14],23,-35309556),r=p(r,i,s,n,e[t+1],4,-1530992060),n=p(n,r,i,s,e[t+4],11,1272893353),s=p(s,n,r,i,e[t+7],16,-155497632),i=p(i,s,n,r,e[t+10],23,-1094730640),r=p(r,i,s,n,e[t+13],4,681279174),n=p(n,r,i,s,e[t],11,-358537222),s=p(s,n,r,i,e[t+3],16,-722521979),i=p(i,s,n,r,e[t+6],23,76029189),r=p(r,i,s,n,e[t+9],4,-640364487),n=p(n,r,i,s,e[t+12],11,-421815835),s=p(s,n,r,i,e[t+15],16,530742520),i=p(i,s,n,r,e[t+2],23,-995338651),r=h(r,i,s,n,e[t],6,-198630844),n=h(n,r,i,s,e[t+7],10,1126891415),s=h(s,n,r,i,e[t+14],15,-1416354905),i=h(i,s,n,r,e[t+5],21,-57434055),r=h(r,i,s,n,e[t+12],6,1700485571),n=h(n,r,i,s,e[t+3],10,-1894986606),s=h(s,n,r,i,e[t+10],15,-1051523),i=h(i,s,n,r,e[t+1],21,-2054922799),r=h(r,i,s,n,e[t+8],6,1873313359),n=h(n,r,i,s,e[t+15],10,-30611744),s=h(s,n,r,i,e[t+6],15,-1560198380),i=h(i,s,n,r,e[t+13],21,1309151649),r=h(r,i,s,n,e[t+4],6,-145523070),n=h(n,r,i,s,e[t+11],10,-1120210379),s=h(s,n,r,i,e[t+2],15,718787259),i=h(i,s,n,r,e[t+9],21,-343485551),r=o(r,a),i=o(i,l),s=o(s,d),n=o(n,y)}return[r,i,s,n]}function g(e,t=i.Hex){const r=t||i.Base64,n=y(a(e),e.length*s);switch(r){case i.Raw:return n;case i.Hex:return function(e){const t="0123456789abcdef",r=[];for(let i=0,s=4*e.length;i<s;i++)r.push(t.charAt(e[i>>2]>>i%4*8+4&15)+t.charAt(e[i>>2]>>i%4*8&15));return r.join("")}(n);case i.String:return l(n);case i.Base64:return function(e){const t=[];for(let r=0,i=4*e.length;r<i;r+=3){const i=(e[r>>2]>>r%4*8&255)<<16|(e[r+1>>2]>>(r+1)%4*8&255)<<8|e[r+2>>2]>>(r+2)%4*8&255;for(let s=0;s<4;s++)8*r+6*s>32*e.length?t.push("="):t.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(i>>6*(3-s)&63))}return t.join("")}(n)}}},82935:(e,t,r)=>{r.d(t,{B:()=>p,e:()=>h});var i=r(31635),s=r(91429),n=r(89317),o=r(30524),a=r(96184),l=r(73133),d=r(79677),u=r(10184),c=r(36005);const p={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation",layerContainerTypes:n.K}}},h=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 i=r.timeOffset,s=l.j.fromJSON(r.timeOffsetUnits);return i&&s?new u.A({value:i,unit:s}):null}set timeInfo(e){(0,o.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,i.Cg)([(0,s.MZ)({type:d.A,json:{write:!1}})],r.prototype,"timeExtent",void 0),(0,i.Cg)([(0,s.MZ)({type:u.A})],r.prototype,"timeOffset",void 0),(0,i.Cg)([(0,c.w)("service","timeOffset",["timeInfo.exportOptions"])],r.prototype,"readOffset",null),(0,i.Cg)([(0,s.MZ)({value:null,type:a.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],r.prototype,"timeInfo",null),(0,i.Cg)([(0,s.MZ)(p)],r.prototype,"useViewTime",void 0),r=(0,i.Cg)([(0,s.$K)("esri.layers.mixins.TemporalLayer")],r),r}},85648:(e,t,r)=>{r.d(t,{n:()=>s});var i=r(84952);function s(e){return n[function(e){return"json"===e.type?"application/json":"blob"===e.type?e.blob.type:function(e){const t=(0,i.Zo)(e);return l[t]||o}(e.url)}(e)]||a}const n={},o="text/plain",a=n[o],l={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const e in l)n[l[e]]=e},86390:(e,t,r)=>{r.d(t,{Z:()=>n});var i=r(86211),s=r(73836);function n(e){const t=1/(0,i.GA)(e,1);return 1!==t?new s.A({scale:[t,t,t]}):void 0}},87024:(e,t,r)=>{r.d(t,{P:()=>h});var i=r(49186),s=r(80200),n=r(76553),o=r(84952),a=r(13069),l=r(96156),d=r(35666),u=r(10107),c=r(85648),p=r(97159);function h(e){const t=e?.origins??[void 0];return(r,i)=>{const s=function(e,t,r){if("resource"===e?.type)return function(e,t,r){const i=(0,l.z4)(t,r);return{type:String,read:(e,t,r)=>{const s=(0,p.r)(e,t,r);return i.type===String?s:"function"==typeof i.type?new i.type({url:s}):void 0},write:{isRequired:i.json?.write?.isRequired,writer(t,s,a,l){if(!l?.resources)return"string"==typeof t?void(s[a]=(0,p.t)(t,l)):void(s[a]=t.write({},l));const u=function(e){return null==e?null:"string"==typeof e?e:e.url}(t),h=(0,p.t)(u,{...l,verifyItemRelativeUrls:l?.verifyItemRelativeUrls?{writtenUrls:l.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},1),m=i.type!==String&&(!(0,n.H)(this)||l?.origin&&this.originIdOf(r)>(0,d.aB)(l.origin)),v={object:this,propertyName:r,value:t,targetUrl:h,dest:s,targetPropertyName:a,context:l,params:e};l?.portalItem&&h&&!(0,o.oP)(h)?m&&e?.contentAddressed?y(v):m?function(e){const{context:t,targetUrl:r,params:i,value:s,dest:n,targetPropertyName:a}=e;if(!t.portalItem)return;const l=t.portalItem.resourceFromPath(r),d=f(s,r,t),u=(0,c.n)(d),p=(0,o.Zo)(l.path),h=i?.compress??!1;u===p?(t.resources&&g({...e,resource:l,content:d,compress:h,updates:t.resources.toUpdate}),n[a]=r):y(e)}(v):function({context:e,targetUrl:t,dest:r,targetPropertyName:i}){e.portalItem&&e.resources&&(e.resources.toKeep.push({resource:e.portalItem.resourceFromPath(t),compress:!1}),r[i]=t)}(v):l?.portalItem&&(null==h||null!=(0,p.i)(h)||(0,o.w8)(h)||m)?y(v):s[a]=h}}}}(e,t,r);switch(e?.type??"other"){case"other":return{read:!0,write:!0};case"url":{const{read:e,write:t}=p.b;return{read:e,write:t}}}}(e,r,i);for(const e of t){const t=(0,u.rM)(r,e,i);for(const e in s)t[e]=s[e]}}}function y(e){const{targetUrl:t,params:r,value:n,context:l,dest:d,targetPropertyName:u}=e;if(!l.portalItem)return;const h=(0,p.p)(t),y=f(n,t,l);if(r?.contentAddressed&&"json"!==y.type)return void l.messages?.push(new i.A("persistable:contentAddressingUnsupported",`Property "${u}" is trying to serializing a resource with content of type ${y.type} with content addressing. Content addressing is only supported for json resources.`,{content:y}));const m=r?.contentAddressed&&"json"===y.type?(0,s.d)(y.jsonString):h?.filename??(0,a.lk)(),v=(0,o.fj)(r?.prefix??h?.prefix,m),w=`${v}.${(0,c.n)(y)}`;if(r?.contentAddressed&&l.resources&&"json"===y.type){const e=l.resources.toKeep.find(({resource:e})=>e.path===w)??l.resources.toAdd.find(({resource:e})=>e.path===w);if(e)return void(d[u]=e.resource.itemRelativeUrl)}const b=l.portalItem.resourceFromPath(w);(0,o.w8)(t)&&l.resources&&l.resources.pendingOperations.push((0,o.tk)(t).then(e=>{b.path=`${v}.${(0,c.n)({type:"blob",blob:e})}`,d[u]=b.itemRelativeUrl}).catch(()=>{}));const I=r?.compress??!1;l.resources&&g({...e,resource:b,content:y,compress:I,updates:l.resources.toAdd}),d[u]=b.itemRelativeUrl}function g({object:e,propertyName:t,updates:r,resource:i,content:s,compress:n}){r.push({resource:i,content:s,compress:n,finish:r=>{!function(e,t,r){"string"==typeof e[t]?e[t]=r.url:e[t].url=r.url}(e,t,r)}})}function f(e,t,r){return"string"==typeof e?{type:"url",url:t}:{type:"json",jsonString:JSON.stringify(e.toJSON(r))}}},96184:(e,t,r)=>{r.d(t,{A:()=>h});var i=r(31635),s=r(69540),n=r(25482),o=r(91429),a=r(79677),l=r(10184),d=r(56400),u=r(36005),c=r(43937);function p(e,t){return l.A.fromJSON({value:e,unit:t})}let h=class extends((0,s.OU)(n.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?a.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?p(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?p(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],h.prototype,"cumulative",void 0),(0,i.Cg)([(0,o.MZ)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"endField",void 0),(0,i.Cg)([(0,o.MZ)({type:a.A,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"fullTimeExtent",void 0),(0,i.Cg)([(0,u.w)("fullTimeExtent",["timeExtent"])],h.prototype,"readFullTimeExtent",null),(0,i.Cg)([(0,c.K)("fullTimeExtent")],h.prototype,"writeFullTimeExtent",null),(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{write:!0}})],h.prototype,"hasLiveData",void 0),(0,i.Cg)([(0,o.MZ)({type:l.A,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"interval",void 0),(0,i.Cg)([(0,u.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],h.prototype,"readInterval",null),(0,i.Cg)([(0,c.K)("interval")],h.prototype,"writeInterval",null),(0,i.Cg)([(0,o.MZ)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"startField",void 0),(0,i.Cg)([(0,o.MZ)((0,d.P6)("timeReference",!0))],h.prototype,"timeZone",void 0),(0,i.Cg)([(0,o.MZ)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"trackIdField",void 0),(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],h.prototype,"useTime",void 0),(0,i.Cg)([(0,o.MZ)({type:[Date],json:{read:!1}})],h.prototype,"stops",void 0),h=(0,i.Cg)([(0,o.$K)("esri.layers.support.TimeInfo")],h)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1384],{31384:(e,s,t)=>{t.d(s,{uploadAssets:()=>R});var o=t(11254),r=t(44208),n=t(53966),a=t(74887),i=t(78659),c=t(84952),l=t(13069),u=t(91218),p=t(16930),d=t(63579),f=t(55726);const m={upload:{createFromFiles:.8,loadMesh:.2},uploadAssetBlobs:{prepareAssetItems:.9,uploadAssetItems:.1},uploadConvertibleSource:{uploadEditSource:.5,serviceAssetsToGlb:.5},uploadLocalMesh:{meshToAssetBlob:.5,uploadAssetBlobs:.5}};var g=t(60694),h=t(36563),w=t(91869);function y(e,s=e=>{},t){return new A(e,s,t)}class A{constructor(e,s=e=>{},t){if(this.onProgress=s,this.taskName=t,this._progressMap=new Map,this._startTime=void 0,this._timingsMap=new Map,"number"==typeof e){this._weights={};for(let s=0;s<e;s++){const t=s,o=1/e;this._weights[t]=o,this._progressMap.set(t,0)}}else this._weights=e;this.emitProgress()}emitProgress(){let e=0;for(const[s,t]of this._progressMap.entries())e+=t*this._weights[s];if(1===e&&(0,r.A)("enable-feature:esri-3dofl-upload-timings")){const e=Math.round(performance.now()-(this._startTime??0))/1e3;console.log(`${this.taskName} done in ${e} sec`);for(const[s,t]of this._timingsMap){const o=Math.round(t.end-t.start)/1e3,r=Math.round(o/e*100);console.log(this.taskName??"Task",{stepKey:s,stepTime:o,relativeTime:r})}}this.onProgress(e)}setProgress(e,s){if(this._progressMap.set(e,s),(0,r.A)("enable-feature:esri-3dofl-upload-timings")){const t=performance.now();this._startTime??=t;const o=(0,w.tE)(this._timingsMap,e,()=>({start:t,end:0}));1===s&&(o.end=t)}this.emitProgress()}simulate(e,s){return T(s=>this.setProgress(e,s),s)}makeOnProgress(e){return s=>this.setProgress(e,s)}}function T(e=e=>{},s=F){const t=performance.now();e(0);const o=setInterval(()=>{const o=performance.now()-t,r=1-Math.exp(-o/s);e(r)},j);return(0,h.hA)(()=>{clearInterval(o),e(1)})}function v(e,s=P){return(0,i.gr)((0,i.Kp)(e*x/s))}const P=10,b=10,x=8e-6,j=(0,i.l5)(50),F=(0,i.l5)(1e3),$=1e6,D=20*$,M=2e9,N=3;async function S({data:e,name:s,description:t},r,n){let i=null;try{const u=(0,c.fj)(r,"uploads"),p=(0,c.fj)(u,"info"),{data:d}=await(0,o.A)(p,{query:{f:"json"},responseType:"json"});(0,a.Te)(n);const f=(0,g.Wo)(r),m=d.maxUploadFileSize*$,h=f?M:m,w=f?Math.min(D,m):D;if(e.size>h)throw new Error("Data too large");const A=(0,c.fj)(u,"register"),{data:T}=await(0,o.A)(A,{query:{f:"json",itemName:(l=s,l.replaceAll("/","_").replaceAll("\\","_")),description:t},responseType:"json",method:"post"});if((0,a.Te)(n),!T.success)throw new Error("Registration failed");const{itemID:P}=T.item;i=(0,c.fj)(u,P);const b=(0,c.fj)(i,"uploadPart"),x=Math.ceil(e.size/w),j=new Array;for(let s=0;s<x;++s)j.push(e.slice(s*w,Math.min((s+1)*w,e.size)));const F=j.slice().reverse(),S=new Array,E=y(x,n?.onProgress,"uploadItem"),k=async()=>{for(;0!==F.length;){const e=j.length-F.length,s=F.pop(),t=new FormData,r=E.simulate(e,v(s.size));try{t.append("f","json"),t.append("file",s),t.append("partId",`${e}`);const{data:r}=await(0,o.A)(b,{timeout:0,body:t,responseType:"json",method:"post"});if((0,a.Te)(n),!r.success)throw new Error("Part upload failed")}finally{r.remove()}}};for(let e=0;e<N&&0!==F.length;++e)S.push(k());await Promise.all(S);const C=(0,c.fj)(i,"commit"),{data:R}=await(0,o.A)(C,{query:{f:"json",parts:j.map((e,s)=>s).join(",")},responseType:"json",method:"post"});if((0,a.Te)(n),!R.success)throw new Error("Commit failed");return R.item}catch(e){if(null!=i){const e=(0,c.fj)(i,"delete");await(0,o.A)(e,{query:{f:"json"},responseType:"json",method:"post"})}throw e}var l}var E=t(20557),k=t(86390),C=t(77793);async function R(e,s,t){const o=e.length;if(!o)return t?.onProgress?.(1),[];const r=y(o,t?.onProgress,"uploadAssets");return Promise.all(e.map((e,o)=>async function(e,{layer:s,ongoingUploads:t},o){const r=t.get(e);if(r)return r;if(!function(e){return!!e.infoFor3D&&!!e.url}(s))throw new f.Wt;if(function(e,s){const{parsedUrl:t}=s;return null!=t&&e.metadata.externalSources.some(e=>(0,d.eN)(e,t))}(e,s))return o?.onProgress?.(1),{mesh:e};const n=async function(e,s,t){const{metadata:o}=e,{displaySource:r}=o,n=I(r?.source,s,{checkForConversionRequired:!0}),g=null!=n?async function(e,s,t,o){return{external:{source:{type:"service",assets:await U(s,t,o)},original:!0,unitConversionDisabled:!0},info:{mesh:e}}}(e,n,s,t):o.externalSources.length>0?async function(e,s,t){const o=O(s),{externalSources:r}=e.metadata,n=function(e,s){for(const t of e){const e=I(t.source,s);if(e)return e}return null}(r,s);if(!n)throw new f.xY;const a=y(m.uploadConvertibleSource,t?.onProgress,"uploadConvertibleSource"),l={type:"service",assets:await U(n,s,{onProgress:a.makeOnProgress("uploadEditSource")})};e.addExternalSources([{source:l,original:!0}]);const g=n.reduce((e,{asset:s})=>s instanceof File?e+s.size:e,0),h=a.simulate("serviceAssetsToGlb",function(e,s=b){return(0,i.gr)((0,i.Kp)(e*x/s))}(g));try{const{source:r,transform:n,origin:a}=await async function({assets:e},s,t){const o=e.map(({assetName:e,parts:s})=>({assetName:e,assetHash:s[0].partHash}));let r;try{const e=(0,c.fj)(s.parsedUrl.path,"convert3D"),n=s.capabilities?.operations.supportsAsyncConvert3D;r=(await(n?q:Y)(e,{query:{f:"json",assets:JSON.stringify(o),transportType:"esriTransportTypeUrl",targetFormat:t,async:n},responseType:"json",timeout:0})).data}catch(e){throw new f.MT}return function(e,s){const t={source:{type:"service",assets:s.assets.map(s=>{const t=(0,E.R_)(s.contentType,e.infoFor3D.supportedFormats);if(!t)throw new f.H2(t);return new d.Qp(s.assetName,s.contentType,[new d.Bq(s.assetURL,s.assetHash)])})},origin:void 0,transform:void 0};if(s.transform){if(t.transform=(0,C.f)(s.transform),s.spatialReference){const e=p.A.fromJSON(s.spatialReference);t.origin=(0,C.V)(s.transform,e)}}else t.transform=(0,k.Z)(e.spatialReference);return t}(s,r)}(l,s,o);if(e.transform=n,a&&t?.useAssetOrigin){const s=await(0,u.projectWithZConversion)(a,e.spatialReference,t);e.vertexSpace.origin=[s.x,s.y,s.z??0]}return{external:{source:r,unitConversionDisabled:!0},info:{mesh:e,georeferenceInfo:a?{origin:a}:void 0}}}finally{h.remove()}}(e,s,t):async function(e,s,t){const o=y(m.uploadLocalMesh,t?.onProgress,"uploadLocalMesh"),r=async function(e,s,t){const o=O(s),r=await e.load(t),n=await r.toBinaryGLTF({origin:r.origin,signal:t?.signal,ignoreLocalTransform:!0,unitConversionDisabled:!0});return(0,a.Te)(t),{blob:new Blob([n],{type:"model/gltf-binary"}),assetName:`${(0,l.yS)()}.glb`,assetType:o}}(e,s,{...t,onProgress:o.makeOnProgress("meshToAssetBlob")});return{external:{source:{type:"service",assets:await Z([r],s,{...t,onProgress:o.makeOnProgress("uploadAssetBlobs")})},extent:e.extent.clone(),original:!0},info:{mesh:e}}}(e,s,t),{external:h,info:w}=await g;return(0,a.Te)(t),e.addExternalSources([h]),w}(e,s,o);t.set(e,n);try{return await n}finally{t.delete(e)}}(e,s,{...t,onProgress:r.makeOnProgress(o)})))}function I(e,{infoFor3D:s},t={}){if(!e)return null;const o=(0,d.WN)(e);if(!o)return null;const{supportedFormats:r,editFormats:n}=s,a=new Array,i=(0,E.ND)(s),c=(0,E.nr)(s);let l=!1;for(const e of o){const s=_(e,r);if(!s)return null;const{assetType:o}=s;if(t.checkForConversionRequired&&(o===i||o===c))return null;n.includes(o)&&(l=!0),a.push(s)}return l?a:null}function _(e,s){const t=(0,d.fH)(e,s);return t?{asset:e,assetType:t}:null}async function U(e,s,t){return Z(e.map(e=>async function(e,s){const{asset:t,assetType:o}=e;if(t instanceof File)return{blob:t,assetName:t.name,assetType:o};const r=await t.toBlob(s);return(0,a.Te)(s),{blob:r,assetName:t.assetName,assetType:o}}(e,t)),s,t)}async function Z(e,s,t){const o=y(m.uploadAssetBlobs,t?.onProgress,"uploadAssetBlobs"),r=await function(e,s,t){const o=y(e.length,t?.onProgress,"prepareAssetItems");return Promise.all(e.map(async(e,r)=>{const i=async function(e,s,t){const{blob:o,assetType:r,assetName:i}=e;let l=null;try{const e=await S({data:o,name:i},s.url,t);(0,a.Te)(t),l={assetType:r,assetUploadId:e.itemID}}catch(e){(0,a.QP)(e),n.A.getLogger("esri.layers.graphics.sources.support.uploadAssets").warnOnce(`Service ${s.url} does not support the REST Uploads API.`)}if(!l){const e=await(0,c._0)(o);if((0,a.Te)(t),!e.isBase64)throw new f.$1;l={assetType:r,assetData:e.data}}if(!l)throw new f.WF;return{item:l,assetName:i}}(await e,s,{...t,onProgress:o.makeOnProgress(r)});return(0,a.Te)(t),i}))}(e,s,{...t,onProgress:o.makeOnProgress("prepareAssetItems")});(0,a.Te)(t);const i=r.map(({item:e})=>e),{uploadResults:l}=await B(i,s,{...t,onProgress:o.makeOnProgress("uploadAssetItems")});return(0,a.Te)(t),e.map((e,t)=>function(e,s,t){const{success:o}=s;if(!o){const{error:t}=s;throw new f.hK(e.assetName,t)}const{assetHash:r}=s,{assetName:n,item:{assetType:a}}=e,{infoFor3D:{supportedFormats:i}}=t,c=(0,E.Fm)(a,i);if(!c)throw new f.H2(a);return new d.Qp(n,c,[new d.Bq(`${t.parsedUrl.path}/assets/${r}`,r)])}(r[t],l[t],s))}async function B(e,s,t){const r=T(t?.onProgress);try{const r=await(0,o.A)((0,c.fj)(s.parsedUrl.path,"uploadAssets"),{timeout:0,query:{f:"json",assets:JSON.stringify(e)},method:"post",responseType:"json"});if((0,a.Te)(t),r.data.uploadResults.length!==e.length)throw new f.nS(e.length,r.data.uploadResults.length);return r.data}finally{r.remove()}}function Y(e,s){return(0,o.A)(e,s)}async function q(e,s){const t=(await(0,o.A)(e,s)).data.statusUrl;for(;;){const e=(await(0,o.A)(t,{query:{f:"json"},responseType:"json"})).data;switch(e.status){case"Completed":return(0,o.A)(e.resultUrl,{query:{f:"json"},responseType:"json"});case"CompletedWithErrors":throw new Error(e.status);case"Failed ImportChanges":case"InProgress":case"Pending":case"ExportAttachments":case"ExportChanges":case"ExportingData":case"ExportingSnapshot":case"ImportAttachments":case"ProvisioningReplica":case"UnRegisteringReplica":break;default:throw new Error}await(0,a.Pl)(X)}}function O({infoFor3D:e}){const s=(0,E.U9)(e);if(!s)throw new f.uh;return s}const X=(0,i.l5)(1e3)},55726:(e,s,t)=>{t.d(s,{$1:()=>l,H2:()=>f,MT:()=>m,VP:()=>g,WF:()=>u,Wt:()=>a,XQ:()=>h,hK:()=>d,nS:()=>p,uh:()=>i,xY:()=>c});var o=t(49186);const r="upload-assets",n=()=>new Error;class a extends o.A{constructor(){super(`${r}:unsupported`,"Layer does not support asset uploads.",n())}}class i extends o.A{constructor(){super(`${r}:no-glb-support`,"Layer does not support glb.",n())}}class c extends o.A{constructor(){super(`${r}:no-supported-source`,"No supported external source found",n())}}class l extends o.A{constructor(){super(`${r}:not-base-64`,"Expected gltf data in base64 format after conversion.",n())}}class u extends o.A{constructor(){super(`${r}:unable-to-prepare-options`,"Unable to prepare uploadAsset request options.",n())}}class p extends o.A{constructor(e,s){super(`${r}:bad-response`,`Bad response. Uploaded ${e} items and received ${s} results.`,n())}}class d extends o.A{constructor(e,s){super(`${r}-layer:upload-failed`,`Failed to upload mesh file ${e}. Error code: ${s?.code??"-1"}. Error message: ${s?.messages??"unknown"}`,n())}}class f extends o.A{constructor(e){super(`${r}-layer:unsupported-format`,`The service allowed us to upload an asset of FormatID ${e}, but it does not list it in its supported formats.`,n())}}class m extends o.A{constructor(){super(`${r}:convert3D-failed`,"convert3D failed.")}}class g extends o.A{constructor(){super("invalid-input:no-model","No supported model found")}}class h extends o.A{constructor(){super("invalid-input:multiple-models","Multiple supported models found")}}},77793:(e,s,t)=>{t.d(s,{V:()=>n,f:()=>a});var o=t(86738),r=t(73836);function n(e,s,t=i){return new o.A({x:e[t.originX],y:e[t.originY],z:e[t.originZ],spatialReference:s})}function a(e,s=i){return new r.A({translation:[e[s.translationX],-e[s.translationZ],e[s.translationY]],rotationAxis:[e[s.rotationX],-e[s.rotationZ],e[s.rotationY]],rotationAngle:e[s.rotationDeg],scale:[e[s.scaleX],e[s.scaleZ],e[s.scaleY]]})}const i={originX:"originX",originY:"originY",originZ:"originZ",translationX:"translationX",translationY:"translationY",translationZ:"translationZ",scaleX:"scaleX",scaleY:"scaleY",scaleZ:"scaleZ",rotationX:"rotationX",rotationY:"rotationY",rotationZ:"rotationZ",rotationDeg:"rotationDeg"}},86390:(e,s,t)=>{t.d(s,{Z:()=>n});var o=t(86211),r=t(73836);function n(e){const s=1/(0,o.GA)(e,1);return 1!==s?new r.A({scale:[s,s,s]}):void 0}}}]);