@arcgis/core 4.34.0-next.42 → 4.34.0-next.44

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 (227) hide show
  1. package/Basemap.js +1 -1
  2. package/Ground.js +1 -1
  3. package/PopupTemplate.js +1 -1
  4. package/WebDocument2D.js +1 -1
  5. package/WebScene.js +1 -1
  6. package/assets/esri/core/workers/RemoteClient.js +1 -1
  7. package/assets/esri/core/workers/chunks/07eea90733834313e9fa.js +1 -0
  8. package/assets/esri/core/workers/chunks/08840c4d3df711065571.js +1 -0
  9. package/assets/esri/core/workers/chunks/0d73afce787ee1e76b21.js +1 -0
  10. package/assets/esri/core/workers/chunks/0ebf666564d323d82259.js +1 -0
  11. package/assets/esri/core/workers/chunks/1a3a4c2c642899be37a0.js +1 -0
  12. package/assets/esri/core/workers/chunks/20ffac42ff5095af00fe.js +1 -0
  13. package/assets/esri/core/workers/chunks/{d465e1b3a8a53d9c0a12.js → 24e76fa530fc0c495fb5.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{9247d768c3eccc0828a9.js → 28d71e1b866113650c75.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{31e6eb2685872baf538a.js → 2aac5d560e4c5defe882.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{85bfd380d4f522ff8e83.js → 2ae50b02cdf126a8b562.js} +1 -1
  17. package/assets/esri/core/workers/chunks/349da65a8793f7873366.js +22 -0
  18. package/assets/esri/core/workers/chunks/4622a3e64d3c4aafa56b.js +1 -0
  19. package/assets/esri/core/workers/chunks/{eea3e0bd17479a767160.js → 48514235c32917e43a3f.js} +55 -54
  20. package/assets/esri/core/workers/chunks/5ae6e2b3557fe8730072.js +1 -0
  21. package/assets/esri/core/workers/chunks/5f28470304b57e24d94c.js +1 -0
  22. package/assets/esri/core/workers/chunks/655b8d24ffe5405f8ba1.js +1 -0
  23. package/assets/esri/core/workers/chunks/6cd828cfe41e0cab2068.js +1 -0
  24. package/assets/esri/core/workers/chunks/{ad106f5f6d6848f40de3.js → 71b222089f5e9dcee474.js} +1 -1
  25. package/assets/esri/core/workers/chunks/7b560ac0be93c6aa9940.js +1 -0
  26. package/assets/esri/core/workers/chunks/{962c0ef63de1635fb4aa.js → 7e99fc78bd0f40a8ba81.js} +1 -1
  27. package/assets/esri/core/workers/chunks/863e87ac982d7727b435.js +1 -0
  28. package/assets/esri/core/workers/chunks/8867368ab9b005460f19.js +353 -0
  29. package/assets/esri/core/workers/chunks/892623d938583cd0f006.js +1 -0
  30. package/assets/esri/core/workers/chunks/{d5d2d4df407cf078bb81.js → 97fc21355efc7b289f3b.js} +1 -1
  31. package/assets/esri/core/workers/chunks/99daf4b144838fa9ca67.js +1 -0
  32. package/assets/esri/core/workers/chunks/9d9a7333a968065b53a1.js +1 -0
  33. package/assets/esri/core/workers/chunks/{cca36750c86352c6d1f9.js → a638f1688ac9525a52a7.js} +1 -1
  34. package/assets/esri/core/workers/chunks/ab3c018c406dcd81ef9e.js +1 -0
  35. package/assets/esri/core/workers/chunks/af98c7546be409303213.js +1 -0
  36. package/assets/esri/core/workers/chunks/b01a90ce699058307bc2.js +1 -0
  37. package/assets/esri/core/workers/chunks/{9e7af4c3c0f8cf0f5c5b.js → b4251e10621fb3ad03a3.js} +1 -1
  38. package/assets/esri/core/workers/chunks/b79aa5ba0424641f878b.js +1 -0
  39. package/assets/esri/core/workers/chunks/bb56defb6dfb9b2c1f27.js +1 -0
  40. package/assets/esri/core/workers/chunks/c6da9ba188b627ab3b79.js +1 -0
  41. package/assets/esri/core/workers/chunks/{9c60599131860f635483.js → cd6398a2951922e13b86.js} +1 -1
  42. package/assets/esri/core/workers/chunks/ceb63ca9ad473c3f1820.js +1 -0
  43. package/assets/esri/core/workers/chunks/d392fbbcfac2a1b54bd6.js +1 -0
  44. package/assets/esri/core/workers/chunks/d547b27ac750953a998f.js +1 -0
  45. package/assets/esri/core/workers/chunks/{7d082bfcd13ad6e8c89d.js → d552b22219ec795aff89.js} +1 -1
  46. package/assets/esri/core/workers/chunks/dbc9bb3011f16ce33f71.js +1 -0
  47. package/assets/esri/core/workers/chunks/{7f523fa4d4ade4316625.js → e19cd07df8ce87e18832.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{c8d57588267e2fc4406c.js → e3f5afdf133c58b3d161.js} +1 -1
  49. package/assets/esri/core/workers/chunks/e505a101621de39de280.js +1 -0
  50. package/assets/esri/core/workers/chunks/e5aeb34d918dee539694.js +1 -0
  51. package/assets/esri/core/workers/chunks/e7806a57d29bca385f1d.js +1 -0
  52. package/assets/esri/core/workers/chunks/{712c740cf58c2e282efc.js → e962e6b47cb7e5a71c24.js} +1 -1
  53. package/assets/esri/core/workers/chunks/eafc4da265469e9e5e0b.js +1 -0
  54. package/assets/esri/core/workers/chunks/{88308a0dcc479688e67c.js → f1adf8ebc2c1b93857bf.js} +1 -1
  55. package/assets/esri/core/workers/chunks/f1b02c4bd5fde235212b.js +1 -0
  56. package/assets/esri/core/workers/chunks/f65b2d3a91a0c726fee4.js +1 -0
  57. package/assets/esri/core/workers/chunks/f667096ea325f690c4a6.js +1 -0
  58. package/assets/esri/core/workers/chunks/fe55833c80cf59df9c2b.js +1 -0
  59. package/assets/esri/libs/i3s/i3s.wasm +0 -0
  60. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace.json +1 -1
  61. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_en.json +1 -1
  62. package/chunks/ComponentShader.glsl.js +6 -5
  63. package/chunks/i3s.js +1 -1
  64. package/config.js +1 -1
  65. package/core/floatRGBA.js +1 -1
  66. package/graphic/graphicOrigins.d.ts +2 -0
  67. package/interfaces.d.ts +281 -124
  68. package/kernel.js +1 -1
  69. package/layers/CSVLayer.js +1 -1
  70. package/layers/GeoJSONLayer.js +1 -1
  71. package/layers/GraphicsLayer.js +1 -1
  72. package/layers/ImageryTileLayer.js +1 -1
  73. package/layers/IntegratedMesh3DTilesLayer.js +1 -1
  74. package/layers/IntegratedMeshLayer.js +1 -1
  75. package/layers/Layer.js +1 -1
  76. package/layers/MapImageLayer.js +1 -1
  77. package/layers/MediaLayer.js +1 -1
  78. package/layers/OrientedImageryLayer.js +1 -1
  79. package/layers/SceneLayer.js +1 -1
  80. package/layers/TileLayer.js +1 -1
  81. package/layers/VectorTileLayer.js +1 -1
  82. package/layers/WCSLayer.js +1 -1
  83. package/layers/WMSLayer.js +1 -1
  84. package/layers/WebTileLayer.js +1 -1
  85. package/layers/mixins/ArcGISImageService.js +1 -1
  86. package/layers/mixins/TemporalSceneLayer.js +1 -1
  87. package/layers/support/BuildingFilter.js +1 -1
  88. package/layers/support/LayerContingentValuesCache.js +1 -1
  89. package/layers/support/MapImage.js +1 -1
  90. package/layers/support/rasterDatasets/multipartParser.js +1 -1
  91. package/networks/Network.js +1 -1
  92. package/package.json +1 -1
  93. package/portal/Portal.js +1 -1
  94. package/portal/PortalItem.js +1 -1
  95. package/portal/schemas/definitions.js +1 -1
  96. package/renderers/DotDensityRenderer.js +1 -1
  97. package/renderers/FlowRenderer.js +1 -1
  98. package/renderers/VectorFieldRenderer.js +1 -1
  99. package/renderers/support/ColormapInfo.js +1 -1
  100. package/rest/featureService/FeatureService.js +1 -1
  101. package/rest/knowledgeGraph/wasmInterface/knowledgeWasmAccess.js +1 -1
  102. package/rest/support/AlgorithmicColorRamp.js +1 -1
  103. package/rest/support/AttributeBinsFeatureSet.js +1 -1
  104. package/rest/support/DirectionsFeature.js +1 -1
  105. package/rest/support/FindImagesParameters.js +1 -1
  106. package/rest/support/ImageAreaParameters.js +1 -1
  107. package/rest/support/ImageBoundaryParameters.js +1 -1
  108. package/rest/support/ImageDistanceParameters.js +1 -1
  109. package/rest/support/ImageGPSInfoParameters.js +1 -1
  110. package/rest/support/ImageHeightParameters.js +1 -1
  111. package/rest/support/ImageHistogramParameters.js +1 -1
  112. package/rest/support/ImageIdentifyParameters.js +1 -1
  113. package/rest/support/ImagePixelLocationParameters.js +1 -1
  114. package/rest/support/ImagePointParameters.js +1 -1
  115. package/rest/support/ImageToMapMultirayParameters.js +1 -1
  116. package/rest/support/ImageToMapParameters.js +1 -1
  117. package/rest/support/ImageUrlParameters.js +1 -1
  118. package/rest/support/MapToImageParameters.js +1 -1
  119. package/rest/support/MeasureFromImageParameters.js +1 -1
  120. package/rest/support/MultipartColorRamp.js +1 -1
  121. package/support/revision.js +1 -1
  122. package/support/zipUtils.js +1 -1
  123. package/symbols/cim/animationUtils.js +1 -1
  124. package/symbols/support/gfxUtils.js +1 -1
  125. package/symbols/support/symbolLayerUtils.js +1 -1
  126. package/versionManagement/VersionManagementService.js +1 -1
  127. package/versionManagement/VersioningState.js +1 -1
  128. package/views/2d/engine/webgl/GlyphMosaic.js +1 -1
  129. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/projection.js +1 -1
  130. package/views/2d/input/handlers/MouseWheelZoom.js +1 -1
  131. package/views/2d/layers/features/sources/FeatureSource.js +1 -1
  132. package/views/3d/analysis/AreaMeasurementAnalysisView3D.js +1 -1
  133. package/views/3d/analysis/DimensionAnalysisView3D.js +1 -1
  134. package/views/3d/analysis/DirectLineMeasurementAnalysisView3D.js +1 -1
  135. package/views/3d/analysis/ElevationProfileAnalysisView3D.js +1 -1
  136. package/views/3d/analysis/LineOfSightAnalysisView3D.js +1 -1
  137. package/views/3d/analysis/SliceAnalysisView3D.js +1 -1
  138. package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
  139. package/views/3d/layers/FlowSubView3D.js +1 -1
  140. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  141. package/views/3d/layers/I3SMeshView3D.js +1 -1
  142. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  143. package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
  144. package/views/3d/layers/i3s/I3SUtil.js +1 -1
  145. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  146. package/views/3d/support/GaussianSplatSortWorker.js +1 -1
  147. package/views/3d/support/GaussianSplatWorkerHandle.js +1 -1
  148. package/views/3d/support/flow/StreamlineResources3D.js +5 -0
  149. package/views/3d/support/flow/StreamlineResources3DOverlay.js +5 -0
  150. package/views/3d/support/flow/StreamlineResources3DShape.js +5 -0
  151. package/views/3d/support/flow/geometryUtils.js +1 -1
  152. package/views/3d/terrain/OverlayRenderer.js +1 -1
  153. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  154. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  155. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  156. package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentData.glsl.js +21 -14
  157. package/views/3d/webgl-engine/collections/Component/UniformComponentParameters.js +1 -1
  158. package/views/3d/webgl-engine/core/shaderLibrary/output/Emissions.glsl.js +5 -5
  159. package/views/3d/webgl-engine/core/shaderLibrary/util/RgbaFloatEncoding.glsl.js +7 -0
  160. package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
  161. package/views/3d/webgl-engine/materials/PathTechniqueConfiguration.js +1 -1
  162. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  163. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  164. package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
  165. package/views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js +7 -6
  166. package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
  167. package/views/SelectionManager.js +1 -1
  168. package/views/View.js +1 -1
  169. package/views/View2D.js +1 -1
  170. package/views/draw/Draw.js +1 -1
  171. package/webscene/spec-certification/compare.js +1 -1
  172. package/widgets/AreaMeasurement2D/AreaMeasurement2DViewModel.js +1 -1
  173. package/widgets/Editor/workflowUtils.js +1 -1
  174. package/widgets/FeatureForm/GroupInput.js +1 -1
  175. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  176. package/widgets/FeatureTable.js +1 -1
  177. package/widgets/Features/FeaturesViewModel.js +1 -1
  178. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  179. package/widgets/ValuePicker/ValuePickerCombobox.js +1 -1
  180. package/widgets/Widget.js +1 -1
  181. package/widgets/smartMapping/ClassedColorSlider/ClassedColorSliderViewModel.js +1 -1
  182. package/widgets/smartMapping/ClassedSizeSlider/ClassedSizeSliderViewModel.js +1 -1
  183. package/widgets/smartMapping/ColorSizeSlider/ColorSizeSliderViewModel.js +1 -1
  184. package/widgets/smartMapping/ColorSlider/ColorSliderViewModel.js +1 -1
  185. package/widgets/smartMapping/HeatmapSlider/HeatmapSliderViewModel.js +1 -1
  186. package/widgets/smartMapping/OpacitySlider/OpacitySliderViewModel.js +1 -1
  187. package/widgets/smartMapping/SizeSlider/SizeSliderViewModel.js +1 -1
  188. package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
  189. package/widgets/support/UtilityNetworkAssociations/FeatureUtilityNetworkAssociationsViewModel.js +1 -1
  190. package/widgets/support/UtilityNetworkAssociations/UtilityNetworkAssociationList.js +1 -1
  191. package/assets/esri/core/workers/chunks/00ae094cc21bc42faa54.js +0 -1
  192. package/assets/esri/core/workers/chunks/016d421114118307d4dd.js +0 -1
  193. package/assets/esri/core/workers/chunks/1cd15aa69f85ecfa32b0.js +0 -1
  194. package/assets/esri/core/workers/chunks/21a9f9c0cc1cde2fee90.js +0 -1
  195. package/assets/esri/core/workers/chunks/2ae0bda04fd5386b462f.js +0 -1
  196. package/assets/esri/core/workers/chunks/3358c1b04490706681cc.js +0 -1
  197. package/assets/esri/core/workers/chunks/364fb103cb139f26b455.js +0 -1
  198. package/assets/esri/core/workers/chunks/4ae15645e68e7f6dd6b7.js +0 -1
  199. package/assets/esri/core/workers/chunks/5156410dd84ea1232a6c.js +0 -1
  200. package/assets/esri/core/workers/chunks/560bb06cf1bf30df4af3.js +0 -1
  201. package/assets/esri/core/workers/chunks/5f11fff5bc16fdec42db.js +0 -1
  202. package/assets/esri/core/workers/chunks/647cff1eaaf1b622f439.js +0 -1
  203. package/assets/esri/core/workers/chunks/6b5b609b357924fa35be.js +0 -1
  204. package/assets/esri/core/workers/chunks/6b73926feb5c5d957062.js +0 -1
  205. package/assets/esri/core/workers/chunks/6c167daf115cd6abb3e5.js +0 -1
  206. package/assets/esri/core/workers/chunks/719b89341b26c3568c2f.js +0 -1
  207. package/assets/esri/core/workers/chunks/791b3130b34b52160c1f.js +0 -1
  208. package/assets/esri/core/workers/chunks/79b389baf972d329c38d.js +0 -1
  209. package/assets/esri/core/workers/chunks/7a5808c6e67c43274d86.js +0 -1
  210. package/assets/esri/core/workers/chunks/7ef7f3925495b9ade88c.js +0 -1
  211. package/assets/esri/core/workers/chunks/82955562805ad5514ed8.js +0 -346
  212. package/assets/esri/core/workers/chunks/90a9b618058dc41294de.js +0 -1
  213. package/assets/esri/core/workers/chunks/95f0c15d83d1f38e01d0.js +0 -1
  214. package/assets/esri/core/workers/chunks/98ac849cccc4d5316021.js +0 -1
  215. package/assets/esri/core/workers/chunks/a13a36207f265f720255.js +0 -1
  216. package/assets/esri/core/workers/chunks/a36be186ad10200c420c.js +0 -1
  217. package/assets/esri/core/workers/chunks/ad1e5c24c1eae5ab8e45.js +0 -1
  218. package/assets/esri/core/workers/chunks/b481807b31e59cce9931.js +0 -1
  219. package/assets/esri/core/workers/chunks/bc27cdd7c415ab166536.js +0 -1
  220. package/assets/esri/core/workers/chunks/c474800508e3ad5ce9d7.js +0 -1
  221. package/assets/esri/core/workers/chunks/c52314b987c63cd630f7.js +0 -1
  222. package/assets/esri/core/workers/chunks/d1635a7ab0c204852237.js +0 -1
  223. package/assets/esri/core/workers/chunks/da228aed337f492456cc.js +0 -1
  224. package/assets/esri/core/workers/chunks/e08b2e9213d35f85916f.js +0 -1
  225. package/assets/esri/core/workers/chunks/ec9ed7c9d64f88fcb806.js +0 -1
  226. package/assets/esri/core/workers/chunks/fb84fa28978a1820a725.js +0 -1
  227. package/views/3d/support/flow/StreamlinesResources3D.js +0 -5
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import t from"../../core/Logger.js";import{animationDebugFlags as e}from"./animationDebugFlags.js";import{defaultCIMValues as n}from"./defaultCIMValues.js";import{getExtent as o}from"./SDFHelper.js";import{getProcessParam as i,hasProcessParam as r,getSize as a,getValue as s}from"./utils.js";function m(t,e,n){return{transform:b(t,e,n.transform),fromColor:I(t,e,n.fromColor),toColor:T(t,e,n.toColor),colorMix:k(t,e,n.colorMix),toOpacity:v(t,e,n.toOpacity),opacityMix:O(t,e,n.opacityMix),shift:x(t,e,n.shift),hasAnimations:n.hasAnimations||l(e),hasShiftAnimation:n.hasShiftAnimation||c(e),hasMotionAnimations:n.hasMotionAnimations||p(e)}}function l(t){return!!t.animations&&t.animations.length>0}function c(t){return!!t.animations&&t.animations.some(t=>"CIMSymbolAnimationMoveAlongLine"===t.type)}const f=new Set(["CIMSymbolAnimationOffset","CIMSymbolAnimationRotation","CIMSymbolAnimationSize","CIMSymbolAnimationScale"]);function p(t){return!!t.animations&&t.animations.some(t=>f.has(t.type))}function u(t){return!e.forceStaticPath&&(e.forceAnimatedPath||t.hasAnimations)}function y(e,n,o){if("CIMCharacterMarker"===n.type)return t.getLogger("animationUtils").error("#handleMarker()","CIM character markers do not support animations"),o;const r=i(e,n,"OffsetX"),a=i(e,n,"OffsetY");if("CIMPictureMarker"===n.type)return{...o,transform:{type:"AnimatedTransform",relativeTranslation:!1,absoluteScale:!0,translation:z([r,a]),rotation:z(0),scale:z(i(e,n,"Size")),parent:o.transform}};const s=n.frame,m=s.ymax-s.ymin;return{...o,transform:{type:"AnimatedTransform",relativeTranslation:!1,absoluteScale:!1,translation:z([r,a]),rotation:z(0),scale:z({type:"Process",op:"Divide",left:i(e,n,"Size"),right:m}),parent:o.transform}}}function S(t,e){let n=0,o=0;const i="Absolute"!==t.anchorPointUnits;return t.anchorPoint&&(n=-t.anchorPoint.x,o=-t.anchorPoint.y),{...e,transform:{type:"AnimatedTransform",relativeTranslation:i,absoluteScale:!1,translation:z([n,o]),rotation:z(0),scale:z(1),parent:e.transform}}}function d(t,e){return"Absolute"===t.anchorPointUnits?e:S(t,e)}function M(t,e){return"Absolute"!==t.anchorPointUnits?e:S(t,e)}function A(t,e,n){return{...t,transform:{type:"AnimatedTransform",relativeTranslation:!1,absoluteScale:!1,translation:z([e,n]),rotation:z(0),scale:z(1),parent:t.transform}}}function C(t,e){const n=e?.5*-(e.xmin+e.xmax):0,i=e?.5*-(e.ymin+e.ymax):0;let r=0,a=0;if("x"in t&&"y"in t)r=t.x+n,a=t.y+i;else{const e=o(t);if(e){r=(e[0]+e[2])/2+n,a=(e[1]+e[3])/2+i}}return[r,a]}function g(t,e){switch(e.type){case"CIMPictureMarker":case"CIMVectorMarker":return i(t,e,"Rotation")}return 0}function h(t,e){switch(e.type){case"CIMPictureMarker":case"CIMVectorMarker":return i(t,e,"RotateClockwise")}return 0}function P(t,e){switch(e.type){case"CIMPointSymbol":case"CIMVectorMarker":return[1,1,1,1];case"CIMSolidStroke":case"CIMSolidFill":return i(t,e,"Color");case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":return i(t,e,"TintColor")}return[1,1,1,1]}function b(t,e,n){return{type:"AnimatedTransform",relativeTranslation:!1,absoluteScale:!1,translation:R(t,e),rotation:w(t,e),scale:L(t,e),parent:n}}function I(t,e,n){return{type:"AnimatedColor",color:z(P(t,e)),opacity:z(1),parent:n}}function T(t,e,n){const{animations:o}=e;let r=P(t,e);const a=o?.filter(t=>"CIMSymbolAnimationColor"===t.type)[0];return a&&(r=i(t,a,"ToColor")),{type:"AnimatedColor",color:z(r),opacity:z(1),parent:n}}function k(t,e,n){const{animations:o}=e,i=o?.filter(t=>"CIMSymbolAnimationColor"===t.type)[0];return i?{type:"AnimatedColor",color:z([1,1,1,1]),opacity:{from:0,to:1,timing:D(t,i?.animatedSymbolProperties)},parent:[1,1,1,1]}:n}function v(t,e,n){const{animations:o}=e;let r=z(1);const a=o?.filter(t=>"CIMSymbolAnimationTransparency"===t.type)[0];if(a){r=z({type:"Process",op:"Transparency",value:i(t,a,"ToTransparency")})}return{type:"AnimatedColor",color:z([1,1,1,1]),opacity:r,parent:n}}function O(t,e,n){const{animations:o}=e,i=o?.filter(t=>"CIMSymbolAnimationTransparency"===t.type)[0];return i?{type:"AnimatedColor",color:z([1,1,1,1]),opacity:{from:0,to:1,timing:D(t,i?.animatedSymbolProperties)},parent:[1,1,1,1]}:n}function x(t,e,n){const{animations:o}=e,a=o?.filter(t=>"CIMSymbolAnimationMoveAlongLine"===t.type)[0];if(!a)return n;let s,m;const l=D(t,a.animatedSymbolProperties),c=r(t,a,"DistanceAlong"),f=r(t,a,"Speed"),p=c&&i(t,a,"DistanceAlong"),u=f&&i(t,a,"Speed"),y=!0===a.continuous;if(!1!==p)s={type:"Process",op:"Divide",left:p,right:100},m=!0;else if(!1!==u)s={type:"Process",op:"Multiply",left:u,right:l.duration},m=!1;else{if(!y)throw new Error("Either distanceAlong, speed or continuous must be specified.");s=1,m=!0}return{type:"AnimatedShift",multiplyByLineLength:m,shift:{from:0,to:s,timing:l},parent:n}}function D(t,e){if(!e)return{duration:1,startTimeOffset:0,repeatDelay:0,timeOriginSelector:"Local",repeatType:"Loop",easing:"Linear",playAnimation:1,reverseAnimation:0};const o=i(t,e,"Duration");let r;if(i(t,e,"RandomizeStartTime")){r={type:"Process",op:"Random",min:0,max:o,seed:i(t,e,"RandomizeStartSeed")}}else r=i(t,e,"StartTimeOffset");const a=i(t,e,"RepeatDelay"),m=i(t,e,"PlayAnimation"),l=i(t,e,"ReverseAnimation"),c=s(e.repeatType,n.CIMAnimatedSymbolProperties.repeattype);return{duration:o,startTimeOffset:r,repeatDelay:a,timeOriginSelector:"None"===c?"Local":"Global",repeatType:c,easing:s(e.easing,n.CIMAnimatedSymbolProperties.easing),playAnimation:m,reverseAnimation:l}}function L(t,e){const{animations:n}=e;let o;o="CIMPictureMarker"===e.type||"CIMVectorMarker"===e.type?i(t,e,"Size"):"CIMSolidStroke"===e.type||"CIMPictureStroke"===e.type?i(t,e,"Width"):a(e)||10;const r=n?.filter(t=>"CIMSymbolAnimationScale"===t.type)[0];if(!r){const e=n?.filter(t=>"CIMSymbolAnimationSize"===t.type)[0];if(!e)return z(1);return{from:1,to:{type:"Process",op:"Divide",left:i(t,e,"ToSize"),right:o},timing:D(t,e.animatedSymbolProperties)}}return{from:1,to:i(t,r,"ScaleFactor"),timing:D(t,r.animatedSymbolProperties)}}function R(t,e){const{animations:n}=e,o=n?.filter(t=>"CIMSymbolAnimationOffset"===t.type)[0];if(!o)return z([0,0]);return{from:[0,0],to:[i(t,o,"OffsetX"),i(t,o,"OffsetY")],timing:D(t,o.animatedSymbolProperties)}}function w(t,e){const{animations:n}=e,o=h(t,e),r={type:"Process",op:"Divide",left:g(t,e),right:{type:"Process",op:"Cond",condition:o,ifTrue:-1,ifFalse:1}},a=n?.filter(t=>"CIMSymbolAnimationRotation"===t.type)[0];if(!a)return z(r);const s={type:"Process",op:"Add",left:i(t,a,"ToRotation"),right:{type:"Process",op:"Divide",left:r,right:-1}};return{from:r,to:{type:"Process",op:"Add",left:r,right:{type:"Process",op:"Cond",condition:i(t,a,"RotateClockwise"),ifTrue:{type:"Process",op:"MatchWinding",sign:-1,angle:s},ifFalse:{type:"Process",op:"MatchWinding",sign:1,angle:s}}},timing:D(t,a.animatedSymbolProperties)}}function z(t){return{from:t,to:t,timing:{duration:1,startTimeOffset:0,repeatDelay:0,timeOriginSelector:"Local",repeatType:"Loop",easing:"Linear",playAnimation:1,reverseAnimation:0}}}function F(t){if(null==t)return!1;if("object"!=typeof t)return!1;if(t.animations&&Array.isArray(t.animations)&&t.animations.length>0)return!0;for(const e in t)if(F(t[e]))return!0;return!1}export{F as checkForAnimations,m as getAnimationParams,C as getFrameTranslation,z as getStaticParam,M as handleAbsoluteAnchor,S as handleAnchor,y as handleMarker,d as handleRelativeAnchor,u as shouldUseAnimatedPath,A as translate};
5
+ import t from"../../core/Logger.js";import{animationDebugFlags as n}from"./animationDebugFlags.js";import{defaultCIMValues as e}from"./defaultCIMValues.js";import{getExtent as o}from"./SDFHelper.js";import{getProcessParam as i,hasProcessParam as r,getSize as a,getValue as s}from"./utils.js";function m(t,n,e){return{transform:b(t,n,e.transform),fromColor:I(t,n,e.fromColor),toColor:T(t,n,e.toColor),colorMix:k(t,n,e.colorMix),toOpacity:v(t,n,e.toOpacity),opacityMix:O(t,n,e.opacityMix),shift:x(t,n,e.shift),hasAnimations:e.hasAnimations||c(n),hasShiftAnimation:e.hasShiftAnimation||l(n),hasMotionAnimations:e.hasMotionAnimations||p(n)}}function c(t){return!!t.animations&&t.animations.length>0}function l(t){return!!t.animations&&t.animations.some(t=>"CIMSymbolAnimationMoveAlongLine"===t.type)}const f=new Set(["CIMSymbolAnimationOffset","CIMSymbolAnimationRotation","CIMSymbolAnimationSize","CIMSymbolAnimationScale"]);function p(t){return!!t.animations&&t.animations.some(t=>f.has(t.type))}function u(t){return!n.forceStaticPath&&(n.forceAnimatedPath||t.hasAnimations)}function y(n,e,o){if("CIMCharacterMarker"===e.type)return t.getLogger("animationUtils").error("#handleMarker()","CIM character markers do not support animations"),o;const r=i(n,e,"OffsetX"),a=i(n,e,"OffsetY");if("CIMPictureMarker"===e.type)return{...o,transform:{type:"AnimatedTransform",relativeTranslation:!1,absoluteScale:!0,translation:z([r,a]),rotation:z(0),scale:z(i(n,e,"Size")),parent:o.transform}};const s=e.frame,m=s.ymax-s.ymin;return{...o,transform:{type:"AnimatedTransform",relativeTranslation:!1,absoluteScale:!1,translation:z([r,a]),rotation:z(0),scale:z({type:"Process",op:"Divide",left:i(n,e,"Size"),right:m}),parent:o.transform}}}function d(t,n){let e=0,o=0;const i="Absolute"!==t.anchorPointUnits;return t.anchorPoint&&(e=-t.anchorPoint.x,o=-t.anchorPoint.y),{...n,transform:{type:"AnimatedTransform",relativeTranslation:i,absoluteScale:!1,translation:z([e,o]),rotation:z(0),scale:z(1),parent:n.transform}}}function S(t,n){return"Absolute"===t.anchorPointUnits?n:d(t,n)}function M(t,n){return"Absolute"!==t.anchorPointUnits?n:d(t,n)}function A(t,n,e){return{...t,transform:{type:"AnimatedTransform",relativeTranslation:!1,absoluteScale:!1,translation:z([n,e]),rotation:z(0),scale:z(1),parent:t.transform}}}function C(t,n){const e=n?.5*-(n.xmin+n.xmax):0,i=n?.5*-(n.ymin+n.ymax):0;let r=0,a=0;if("x"in t&&"y"in t)r=t.x+e,a=t.y+i;else{const n=o(t);if(n){r=(n[0]+n[2])/2+e,a=(n[1]+n[3])/2+i}}return[r,a]}function g(t,n){switch(n.type){case"CIMPictureMarker":case"CIMVectorMarker":return i(t,n,"Rotation")}return 0}function h(t,n){switch(n.type){case"CIMPictureMarker":case"CIMVectorMarker":return i(t,n,"RotateClockwise")}return 0}function P(t,n){switch(n.type){case"CIMPointSymbol":case"CIMVectorMarker":return[1,1,1,1];case"CIMSolidStroke":case"CIMSolidFill":return i(t,n,"Color");case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":return i(t,n,"TintColor")}return[1,1,1,1]}function b(t,n,e){return{type:"AnimatedTransform",relativeTranslation:!1,absoluteScale:!1,translation:R(t,n),rotation:w(t,n),scale:L(t,n),parent:e}}function I(t,n,e){return{type:"AnimatedColor",color:z(P(t,n)),opacity:z(1),parent:e}}function T(t,n,e){const{animations:o}=n;let r=P(t,n);const a=o?.find(t=>"CIMSymbolAnimationColor"===t.type);return a&&(r=i(t,a,"ToColor")),{type:"AnimatedColor",color:z(r),opacity:z(1),parent:e}}function k(t,n,e){const{animations:o}=n,i=o?.find(t=>"CIMSymbolAnimationColor"===t.type);return i?{type:"AnimatedColor",color:z([1,1,1,1]),opacity:{from:0,to:1,timing:D(t,i?.animatedSymbolProperties)},parent:[1,1,1,1]}:e}function v(t,n,e){const{animations:o}=n;let r=z(1);const a=o?.find(t=>"CIMSymbolAnimationTransparency"===t.type);if(a){r=z({type:"Process",op:"Transparency",value:i(t,a,"ToTransparency")})}return{type:"AnimatedColor",color:z([1,1,1,1]),opacity:r,parent:e}}function O(t,n,e){const{animations:o}=n,i=o?.find(t=>"CIMSymbolAnimationTransparency"===t.type);return i?{type:"AnimatedColor",color:z([1,1,1,1]),opacity:{from:0,to:1,timing:D(t,i?.animatedSymbolProperties)},parent:[1,1,1,1]}:e}function x(t,n,e){const{animations:o}=n,a=o?.find(t=>"CIMSymbolAnimationMoveAlongLine"===t.type);if(!a)return e;let s,m;const c=D(t,a.animatedSymbolProperties),l=r(t,a,"DistanceAlong"),f=r(t,a,"Speed"),p=l&&i(t,a,"DistanceAlong"),u=f&&i(t,a,"Speed"),y=!0===a.continuous;if(!1!==p)s={type:"Process",op:"Divide",left:p,right:100},m=!0;else if(!1!==u)s={type:"Process",op:"Multiply",left:u,right:c.duration},m=!1;else{if(!y)throw new Error("Either distanceAlong, speed or continuous must be specified.");s=1,m=!0}return{type:"AnimatedShift",multiplyByLineLength:m,shift:{from:0,to:s,timing:c},parent:e}}function D(t,n){if(!n)return{duration:1,startTimeOffset:0,repeatDelay:0,timeOriginSelector:"Local",repeatType:"Loop",easing:"Linear",playAnimation:1,reverseAnimation:0};const o=i(t,n,"Duration");let r;if(i(t,n,"RandomizeStartTime")){r={type:"Process",op:"Random",min:0,max:o,seed:i(t,n,"RandomizeStartSeed")}}else r=i(t,n,"StartTimeOffset");const a=i(t,n,"RepeatDelay"),m=i(t,n,"PlayAnimation"),c=i(t,n,"ReverseAnimation"),l=s(n.repeatType,e.CIMAnimatedSymbolProperties.repeattype);return{duration:o,startTimeOffset:r,repeatDelay:a,timeOriginSelector:"None"===l?"Local":"Global",repeatType:l,easing:s(n.easing,e.CIMAnimatedSymbolProperties.easing),playAnimation:m,reverseAnimation:c}}function L(t,n){const{animations:e}=n;let o;o="CIMPictureMarker"===n.type||"CIMVectorMarker"===n.type?i(t,n,"Size"):"CIMSolidStroke"===n.type||"CIMPictureStroke"===n.type?i(t,n,"Width"):a(n)||10;const r=e?.find(t=>"CIMSymbolAnimationScale"===t.type);if(!r){const n=e?.find(t=>"CIMSymbolAnimationSize"===t.type);if(!n)return z(1);return{from:1,to:{type:"Process",op:"Divide",left:i(t,n,"ToSize"),right:o},timing:D(t,n.animatedSymbolProperties)}}return{from:1,to:i(t,r,"ScaleFactor"),timing:D(t,r.animatedSymbolProperties)}}function R(t,n){const{animations:e}=n,o=e?.find(t=>"CIMSymbolAnimationOffset"===t.type);if(!o)return z([0,0]);return{from:[0,0],to:[i(t,o,"OffsetX"),i(t,o,"OffsetY")],timing:D(t,o.animatedSymbolProperties)}}function w(t,n){const{animations:e}=n,o=h(t,n),r={type:"Process",op:"Divide",left:g(t,n),right:{type:"Process",op:"Cond",condition:o,ifTrue:-1,ifFalse:1}},a=e?.find(t=>"CIMSymbolAnimationRotation"===t.type);if(!a)return z(r);const s={type:"Process",op:"Add",left:i(t,a,"ToRotation"),right:{type:"Process",op:"Divide",left:r,right:-1}};return{from:r,to:{type:"Process",op:"Add",left:r,right:{type:"Process",op:"Cond",condition:i(t,a,"RotateClockwise"),ifTrue:{type:"Process",op:"MatchWinding",sign:-1,angle:s},ifFalse:{type:"Process",op:"MatchWinding",sign:1,angle:s}}},timing:D(t,a.animatedSymbolProperties)}}function z(t){return{from:t,to:t,timing:{duration:1,startTimeOffset:0,repeatDelay:0,timeOriginSelector:"Local",repeatType:"Loop",easing:"Linear",playAnimation:1,reverseAnimation:0}}}function F(t){if(null==t)return!1;if("object"!=typeof t)return!1;if(t.animations&&Array.isArray(t.animations)&&t.animations.length>0)return!0;for(const n in t)if(F(t[n]))return!0;return!1}export{F as checkForAnimations,m as getAnimationParams,C as getFrameTranslation,z as getStaticParam,M as handleAbsoluteAnchor,d as handleAnchor,y as handleMarker,S as handleRelativeAnchor,u as shouldUseAnimatedPath,A as translate};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{getAssetUrl as t}from"../../assets.js";import e from"../../Color.js";import o from"../../request.js";import{LRUCache as s}from"../../core/LRUCache.js";import{pt2px as r}from"../../core/screenUtils.js";import{getCIMSymbolColor as n}from"./cimSymbolUtils.js";const i="picture-fill",a="simple-fill",l="simple-line",c="simple-marker",h="text",d="cim",m=new Map([["dash",[4,3]],["dashdot",[4,3,1,3]],["dot",[1,3]],["longdash",[8,3]],["longdashdot",[8,3,1,3]],["longdashdotdot",[8,3,1,3,1,3]],["shortdash",[4,1]],["shortdashdot",[4,1,1,1]],["shortdashdotdot",[4,1,1,1,1,1]],["shortdot",[1,1]],["solid",[]]]),p=new s(1e3);function u(e){const o=e.style;let s=null;if(e)switch(e.type){case c:"cross"!==o&&"x"!==o&&(s=e.color);break;case a:o&&"solid"!==o?"none"!==o&&(s={type:"pattern",x:0,y:0,src:t(`esri/symbols/patterns/${o}.png`),width:5,height:5}):s=e.color;break;case i:s={type:"pattern",src:e.url,width:r(e.width)*e.xscale,height:r(e.height)*e.yscale,x:r(e.xoffset),y:r(e.yoffset)};break;case h:s=e.color;break;case d:s=n(e)}return s}function f(t,e){const s=t+"-"+e;return void 0!==p.get(s)?Promise.resolve(p.get(s)):o(t,{responseType:"image"}).then(t=>{const o=t.data,r=o.naturalWidth,n=o.naturalHeight,i=document.createElement("canvas");i.width=r,i.height=n;const a=i.getContext("2d");a.fillStyle=e,a.fillRect(0,0,r,n),a.globalCompositeOperation="destination-in",a.drawImage(o,0,0);const l=i.toDataURL();return p.put(s,l),l})}function y(t){if(!t)return null;let e=null;switch(t.type){case a:case i:case c:e=y(t.outline);break;case l:{const o=r(t.width);null!=t.style&&"none"!==t.style&&0!==o&&(e={color:t.color,style:w(t.style),width:o,cap:t.cap,join:"miter"===t.join?r(t.miterLimit):t.join},e.dashArray=g(e).join(",")||"none");break}default:e=null}return e}function g(t){if(!t?.style)return[];const{dashArray:e,style:o,width:s}=t;if("string"==typeof e&&"none"!==e)return e.split(",").map(t=>Number(t));const r=s??0,n=m.has(o)?m.get(o).map(t=>t*r):[];if("butt"!==t.cap)for(const[i,a]of n.entries())n[i]=i%2==1?a+r:Math.max(a-r,1);return n}const w=(()=>{const t={};return e=>{if(t[e])return t[e];const o=e.replaceAll("-","");return t[e]=o,o}})(),b=new e([128,128,128]);export{b as defaultThematicColor,w as dekebabifyLineStyle,g as getDashArray,u as getFill,f as getPatternUrlWithColor,y as getStroke};
5
+ import{getAssetUrl as t}from"../../assets.js";import e from"../../Color.js";import o from"../../request.js";import{LRUCache as s}from"../../core/LRUCache.js";import{pt2px as r}from"../../core/screenUtils.js";import{getCIMSymbolColor as n}from"./cimSymbolUtils.js";const i="picture-fill",l="simple-fill",a="simple-line",c="simple-marker",h="text",d="cim",m=new Map([["dash",[4,3]],["dashdot",[4,3,1,3]],["dot",[1,3]],["longdash",[8,3]],["longdashdot",[8,3,1,3]],["longdashdotdot",[8,3,1,3,1,3]],["shortdash",[4,1]],["shortdashdot",[4,1,1,1]],["shortdashdotdot",[4,1,1,1,1,1]],["shortdot",[1,1]],["solid",[]]]),p=new s(1e3);function u(e){const o=e.style;let s=null;if(e)switch(e.type){case c:"cross"!==o&&"x"!==o&&(s=e.color);break;case l:o&&"solid"!==o?"none"!==o&&(s={type:"pattern",x:0,y:0,src:t(`esri/symbols/patterns/${o}.png`),width:5,height:5}):s=e.color;break;case i:s={type:"pattern",src:e.url,width:r(e.width)*e.xscale,height:r(e.height)*e.yscale,x:r(e.xoffset),y:r(e.yoffset)};break;case h:s=e.color;break;case d:s=n(e)}return s}function f(t,e){const s=t+"-"+e,r=p.get(s);return null!=r?Promise.resolve(r):o(t,{responseType:"image"}).then(t=>{const o=t.data,r=o.naturalWidth,n=o.naturalHeight,i=document.createElement("canvas");i.width=r,i.height=n;const l=i.getContext("2d");l.fillStyle=e,l.fillRect(0,0,r,n),l.globalCompositeOperation="destination-in",l.drawImage(o,0,0);const a=i.toDataURL();return p.put(s,a),a})}function y(t){if(!t)return null;let e=null;switch(t.type){case l:case i:case c:e=y(t.outline);break;case a:{const o=r(t.width);null!=t.style&&"none"!==t.style&&0!==o&&(e={color:t.color,style:w(t.style),width:o,cap:t.cap,join:"miter"===t.join?r(t.miterLimit):t.join},e.dashArray=g(e).join(",")||"none");break}default:e=null}return e}function g(t){if(!t?.style)return[];const{dashArray:e,style:o,width:s}=t;if("string"==typeof e&&"none"!==e)return e.split(",").map(t=>Number(t));const r=s??0,n=m.has(o)?m.get(o).map(t=>t*r):[];if("butt"!==t.cap)for(const[i,l]of n.entries())n[i]=i%2==1?l+r:Math.max(l-r,1);return n}const w=(()=>{const t={};return e=>{if(t[e])return t[e];const o=e.replaceAll("-","");return t[e]=o,o}})(),b=new e([128,128,128]);export{b as defaultThematicColor,w as dekebabifyLineStyle,g as getDashArray,u as getFill,f as getPatternUrlWithColor,y as getStroke};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../request.js";import r from"../../core/Error.js";import{LRUCache as o}from"../../core/LRUCache.js";import{create as i}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{size as t,create as s}from"../../geometry/support/aaBoundingBox.js";import{objectSymbolLayerPrimitiveBoundingBox as n}from"./symbolLayerUtils3D.js";let c=a();function a(){return new o(50)}function u(){c=a()}async function l(e,o){if(e.resource?.href)return m(e.resource.href).then(e=>[e.width,e.height]);if(e.resource?.primitive)return null!=o?[o,o]:[256,256];throw new r("symbol3d:invalid-symbol-layer","symbol layers of type Icon must have either an href or a primitive resource")}function m(r){return e(r,{responseType:"image"}).then(e=>e.data)}async function f(e,o=null){if(!e.isPrimitive){const o=e.resource?.href;if(!o)throw new r("symbol:invalid-resource","The symbol does not have a valid resource");const s=c.get(o);if(void 0!==s)return s;const{fetch:n}=await import("../../views/3d/layers/graphics/objectResourceUtils.js"),a=await n(o,{disableTextures:!0,spherical:!0}),u=t(a.referenceBoundingBox,i());return c.put(o,u),u}if(!e.resource?.primitive)throw new r("symbol:invalid-resource","The symbol does not have a valid resource");const a=s(n(e.resource.primitive));if(null!=o)for(let r=0;r<a.length;r++)a[r]*=o;return t(a,i())}export{u as clearBoundingBoxCache,l as computeIconLayerResourceSize,f as computeObjectLayerResourceSize};
5
+ import e from"../../request.js";import r from"../../core/Error.js";import{LRUCache as o}from"../../core/LRUCache.js";import{create as i}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{size as t,create as s}from"../../geometry/support/aaBoundingBox.js";import{objectSymbolLayerPrimitiveBoundingBox as n}from"./symbolLayerUtils3D.js";let c=a();function a(){return new o(50)}function u(){c=a()}async function l(e,o){if(e.resource?.href)return m(e.resource.href).then(e=>[e.width,e.height]);if(e.resource?.primitive)return null!=o?[o,o]:[256,256];throw new r("symbol3d:invalid-symbol-layer","symbol layers of type Icon must have either an href or a primitive resource")}function m(r){return e(r,{responseType:"image"}).then(e=>e.data)}async function f(e,o=null){if(!e.isPrimitive){const o=e.resource?.href;if(!o)throw new r("symbol:invalid-resource","The symbol does not have a valid resource");const s=c.get(o);if(null!=s)return s;const{fetch:n}=await import("../../views/3d/layers/graphics/objectResourceUtils.js"),a=await n(o,{disableTextures:!0,spherical:!0}),u=t(a.referenceBoundingBox,i());return c.put(o,u),u}if(!e.resource?.primitive)throw new r("symbol:invalid-resource","The symbol does not have a valid resource");const a=s(n(e.resource.primitive));if(null!=o)for(let r=0;r<a.length;r++)a[r]*=o;return t(a,i())}export{u as clearBoundingBoxCache,l as computeIconLayerResourceSize,f as computeObjectLayerResourceSize};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../request.js";import r from"../core/Error.js";import{JSONSupportMixin as s}from"../core/JSONSupport.js";import{Loadable as i}from"../core/Loadable.js";import{removeTrailingSlash as n,Url as o}from"../core/urlUtils.js";import{property as a}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{reader as u}from"../core/accessorSupport/decorators/reader.js";import{subclass as l}from"../core/accessorSupport/decorators/subclass.js";import{writer as c}from"../core/accessorSupport/decorators/writer.js";import{onApplyEditsEvent as d,emitUpdateMomentEvent as m}from"../layers/mixins/EditBusLayer.js";import{parseUrl as f}from"../rest/utils.js";import g from"./support/EditMomentStack.js";import{versionCollection as p,versionCollectionCount as h,defaultVersionNameLookup as V,currentSessionId as v}from"./support/versionManagementUtils.js";import{createVersionAdapters as y}from"./versionAdapters/utils.js";let w=class extends(s(i)){constructor(e){super(e),this.url=null,this.sourceJSON=null,this.name=null,this.defaultVersionIdentifier=null,this.capabilities=null,this._isDefault=e=>!e||e===this.defaultVersionIdentifier.name,this._dateEquals=(e,t)=>!e&&!t||!(!e||!t)&&e.toISOString()===t.toISOString(),this._applyEditsHandler=e=>{const{serviceUrl:t,gdbVersion:r,result:s}=e;t===this._featureServiceUrl&&s.then(e=>{const t=e.historicMoment;t&&this._addMomentToVersionItem(r,t)})}}initialize(){this.url=n(this.url),this._featureServiceUrl=this.url.replace(/\/VersionManagementServer/i,"/FeatureServer"),p.has(this.url)||p.set(this.url,new Map);const e=(h.get(this.url)??0)+1;h.set(this.url,e),this.when().then(()=>this.addHandles(d(this._applyEditsHandler)),()=>{})}destroy(){const e=(h.get(this.url)??1)-1;h.set(this.url,e),0===e&&p.delete(this.url),V.delete(this._featureServiceUrl)}read(e,t){this.sourceJSON=e,super.read(e,t)}readDefaultVersionIdentifier(e,t){return{name:t.defaultVersionName,guid:t.defaultVersionGuid}}writeDefaultVersionIdentifier(e,t){t.defaultVersionName=e.name,t.defaultVersionGuid=e.guid}load(e){return this.addResolvingPromise(this._fetchService(this.url,e)),Promise.resolve(this)}async createVersion(e){const[{createVersion:t},{default:r}]=await Promise.all([import("../rest/versionManagement/createVersion.js"),import("../rest/versionManagement/support/CreateVersionParameters.js")]),s=r.from(e);return t(this.url,s)}async deleteVersion(e){const[{deleteVersion:t},{default:r}]=await Promise.all([import("../rest/versionManagement/deleteVersion.js"),import("../rest/versionManagement/support/DeleteVersionParameters.js")]);let s;e.guid&&p.get(this.url)?.has(e.guid)&&(s=v??void 0);const i=new r({versionName:e.name,sessionId:s});return t(this.url,i)}async getVersionInfoExtended(e){const{getVersion:t}=await import("../rest/versionManagement/getVersion.js");return t(this.url,e.guid)}async getVersionInfos(e={}){const[{getVersionInfos:t},{default:r}]=await Promise.all([import("../rest/versionManagement/getVersionInfos.js"),import("../rest/versionManagement/support/GetVersionInfosParameters.js")]),s=r.from(e);return t(this.url,s)}async reconcile(e,t={}){const[{reconcile:r},{default:s}]=await Promise.all([import("../rest/versionManagement/gdbVersion/reconcile.js"),import("../rest/versionManagement/gdbVersion/support/ReconcileParameters.js")]),i=s.from(t);return i.sessionId=v,r(this.url,e.guid,i)}async post(e){const[{post:t},{default:r}]=await Promise.all([import("../rest/versionManagement/gdbVersion/post.js"),import("../rest/versionManagement/gdbVersion/support/PostParameters.js")]),s=r.from({sessionId:v});return t(this.url,e.guid,s)}async alterVersion(e,t){const[{alterVersion:r},{default:s}]=await Promise.all([import("../rest/versionManagement/gdbVersion/alterVersion.js"),import("../rest/versionManagement/gdbVersion/support/AlterVersionParameters.js")]),i=s.from(t);return r(this.url,e.guid,i)}async startReading(e){return(await this.startReadingWithResult(e)).success}async startReadingWithResult(e){const{startReading:t}=await import("../rest/versionManagement/gdbVersion/startReading.js"),r=await t(this.url,e.guid,v);if(r.success){const t=await this.getVersionInfoExtended(e),r=new Date(t.modifiedDate),s={name:t.versionIdentifier.name,moment:r,lockType:"read"};this._addOrUpdateItem(e.guid,s),m(this._featureServiceUrl,null,e.name,r)}return r}async stopReading(e){return(await this.stopReadingWithResult(e)).success}async stopReadingWithResult(e){const{stopReading:t}=await import("../rest/versionManagement/gdbVersion/stopReading.js"),r=await t(this.url,e.guid,v);return r.success&&(p.get(this.url)?.delete(e.guid),m(this._featureServiceUrl,null,e.name,null)),r}async startEditing(e){return(await this.startEditingWithResult(e)).success}async startEditingWithResult(e){const{startEditing:t}=await import("../rest/versionManagement/gdbVersion/startEditing.js"),r=await t(this.url,e.guid,v);if(r.success){const t=await this.getVersionInfoExtended(e),r=new Date(t.modifiedDate),s=new g(r),i={name:e.name,moment:r,lockType:"edit",stack:s};this._addOrUpdateItem(e.guid,i),m(this._featureServiceUrl,null,e.name,r)}return r}async stopEditing(e,t){return(await this.stopEditingWithResult(e,t)).success}async stopEditingWithResult(e,t){if(t){const t=p.get(this.url)?.get(e.guid);if(t?.stack?.canRedo()){const[{deleteForwardEdits:r},{default:s}]=await Promise.all([import("../rest/versionManagement/gdbVersion/deleteForwardEdits.js"),import("../rest/versionManagement/gdbVersion/support/DeleteForwardEditsParameters.js")]),i=await r(this.url,e.guid,new s({sessionId:v,moment:t.moment}));if(!i.success)return i}}const{stopEditing:r}=await import("../rest/versionManagement/gdbVersion/stopEditing.js"),s=await r(this.url,e.guid,v,t);if(s.success){const t=await this.getVersionInfoExtended(e),r=new Date(t.modifiedDate);this._addOrUpdateItem(e.guid,{name:e.name,moment:r,lockType:"read",editMomentStack:void 0}),m(this._featureServiceUrl,null,e.name,r)}return s}getLockType(e){const t=p.get(this.url)?.get(e.guid)?.lockType;return t??"none"}async changeVersion(e,t,s){if(s&&"name"in s&&!await this.getVersionInfoExtended(s))throw new r("version-management-service:invalid-version","version does not exist");if("networkServiceUrl"in e){if(this._featureServiceUrl.toLowerCase()===e.featureServiceUrl.toLowerCase())return this._changeVersionInternal(e,t,s)}else{let r;"layers"in e?(r=e.allTables.concat(e.allLayers),e.utilityNetworks&&e.utilityNetworks.forEach(e=>{this._featureServiceUrl.toLowerCase()===e.featureServiceUrl.toLowerCase()&&this._changeVersionInternal(e,t,s)})):r=e;for(const e of r)if("feature"===e.type||"subtype-group"===e.type){const r=/^(.*\/FeatureServer)\/\d+$/,i=e.url.replace(r,"$1");if(this._featureServiceUrl.toLowerCase()===i.toLowerCase()&&!this._changeVersionInternal(e,t,s))return!1}else if("group"===e.type){const r=e.allTables.concat(e.allLayers);for(const e of r)if("feature"===e.type||"subtype-group"===e.type){const r=/^(.*\/FeatureServer)\/\d+$/,i=e.url.replace(r,"$1");if(this._featureServiceUrl.toLowerCase()===i.toLowerCase()&&!this._changeVersionInternal(e,t,s))return!1}}}return!0}async changeVersionWithResult(e,t,r){let s;if("layers"in e){const t=y(e.allTables.concat(e.allLayers).filter(e=>"group"!==e.type).toArray());e.utilityNetworks&&e.utilityNetworks.forEach(e=>{const r=y([e]);t.push(...r)}),s=t}else s=e;if(r&&"name"in r){if(!await this.getVersionInfoExtended(r)){const e=new Map;for(const t of s)e.set(t,{success:!1});return e}}if(t&&"name"in t){if("none"!==this.getLockType(t)){const e=new Map;for(const t of s)e.set(t,{success:!1});return e}}const i=new Map;for(const n of s)if(n)if(n.featureServiceUrl.toLowerCase()===this._featureServiceUrl.toLowerCase()){const e=this._changeVersionInternalWithResult(n,t,r);i.set(n,e)}else i.set(n,{success:!1});return i}async getVersionIdentifierFromName(e){try{const t=await this.getVersionInfos({includeHidden:!0});return t.find(t=>t.versionIdentifier.name.toUpperCase()===e.toUpperCase())?.versionIdentifier||null}catch{return null}}async getVersionIdentifierFromGuid(e){const{getVersion:t}=await import("../rest/versionManagement/getVersion.js");try{return(await t(this.url,e)).versionIdentifier}catch{return null}}canUndo(e){const t=p.get(this.url)?.get(e.guid);return!!t?.stack?.canUndo()}canRedo(e){const t=p.get(this.url)?.get(e.guid);return!!t?.stack?.canRedo()}undo(e){const t=p.get(this.url)?.get(e.guid),r=t?.stack?.undo()||void 0;if(t&&r){const r=t.stack.peek();m(this._featureServiceUrl,null,e.name,r),p.get(this.url)?.set(e.guid,{...t,moment:r})}}redo(e){const t=p.get(this.url)?.get(e.guid),r=t?.stack?.redo()||void 0;t&&r&&(m(this._featureServiceUrl,null,e.name,r),p.get(this.url)?.set(e.guid,{...t,moment:r}))}_setUpData(e,t){let s=null,i=null,n=null,o=null;const a=e=>{const t=p?.get(this.url)?.get(e.guid);n=e.name,o=t?.moment??null};if(e&&"name"in e){if("none"!==this.getLockType(e))throw new r("version-management-service:version-locked","version is locked");s=e.name,i=null,t&&"name"in t?a(t):(n=this.defaultVersionIdentifier.name,o=t)}else s=this.defaultVersionIdentifier.name,i=e,t&&"name"in t?a(t):(n=this.defaultVersionIdentifier.name,o=t);return{fromVersionName:s,fromMoment:i,toVersionName:n,toMoment:o}}_changeVersionInternal(e,t,r){try{const{fromVersionName:s,fromMoment:i,toVersionName:n,toMoment:o}=this._setUpData(t,r);(this._isDefault(s)&&this._isDefault(e.gdbVersion)&&this._dateEquals(e.historicMoment,i)||s===e.gdbVersion&&this._dateEquals(e.historicMoment,i))&&(e.gdbVersion=n,e.historicMoment=o)}catch(s){return!1}return!0}_changeVersionInternalWithResult(e,t,r){try{const{fromVersionName:s,fromMoment:i,toVersionName:n,toMoment:o}=this._setUpData(t,r);return this._isDefault(s)&&this._isDefault(e.gdbVersion)&&this._dateEquals(e.historicMoment,i)||s===e.gdbVersion&&this._dateEquals(e.historicMoment,i)?(e.gdbVersion=n,e.historicMoment=o,{success:!0}):{success:!1}}catch(s){return{success:!1}}}_addMomentToVersionItem(e,t){const r=p.get(this.url);if(r)for(const[s,i]of r){i.name===e&&this._addToStack(s,t)}}_addToStack(e,t){const r=p.get(this.url),s=r?.get(e);return!!s?.stack&&(I(s.stack.peek(),t)&&s.stack.push(t),r.set(e,{...s,moment:t}),!0)}_addOrUpdateItem(e,t){const r=p.get(this.url),s=r?.get(e);return s?(r.set(e,{...s,...t}),!0):!(!t.name||!t.lockType)&&(r?.set(e,{...t,lockType:t.lockType}),!0)}async _fetchService(e,r){if(this.sourceJSON){this.read(this.sourceJSON,{origin:"service",url:f(e)});const t=new o(this.url).host;return void V.set(t,this.defaultVersionIdentifier.name)}const s=await t(e,{responseType:"json",query:{f:"json"},...r});this.read(s.data)}};function I(e,t){if(e){return e.getTime()<t.getTime()}return!0}e([a()],w.prototype,"url",void 0),e([a()],w.prototype,"sourceJSON",void 0),e([a({type:String,json:{write:!0}})],w.prototype,"name",void 0),e([a({json:{write:{target:{defaultVersionName:{type:String},defaultVersionGuid:{type:String}}},read:{source:["defaultVersionName","defaultVersionGuid"]}}})],w.prototype,"defaultVersionIdentifier",void 0),e([u("defaultVersionIdentifier",["defaultVersionName","defaultVersionGuid"])],w.prototype,"readDefaultVersionIdentifier",null),e([c("defaultVersionIdentifier",{defaultVersionName:{type:String},defaultVersionGuid:{type:String}})],w.prototype,"writeDefaultVersionIdentifier",null),e([a({json:{write:!0}})],w.prototype,"capabilities",void 0),w=e([l("esri.versionManagement.VersionManagementService")],w);const S=w;export{S as default};
5
+ import{__decorate as e}from"tslib";import t from"../request.js";import r from"../core/Error.js";import{JSONSupportMixin as s}from"../core/JSONSupport.js";import{Loadable as i}from"../core/Loadable.js";import{removeTrailingSlash as n,Url as o}from"../core/urlUtils.js";import{property as a}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{reader as u}from"../core/accessorSupport/decorators/reader.js";import{subclass as l}from"../core/accessorSupport/decorators/subclass.js";import{writer as d}from"../core/accessorSupport/decorators/writer.js";import{onApplyEditsEvent as c,emitUpdateMomentEvent as m}from"../layers/mixins/EditBusLayer.js";import{parseUrl as f}from"../rest/utils.js";import g from"./support/EditMomentStack.js";import{versionCollection as p,versionCollectionCount as h,defaultVersionNameLookup as V,currentSessionId as v}from"./support/versionManagementUtils.js";import{createVersionAdapters as y}from"./versionAdapters/utils.js";let w=class extends(s(i)){constructor(e){super(e),this.url=null,this.sourceJSON=null,this.name=null,this.defaultVersionIdentifier=null,this.capabilities=null,this._isDefault=e=>!e||e===this.defaultVersionIdentifier.name,this._dateEquals=(e,t)=>!e&&!t||!(!e||!t)&&e.toISOString()===t.toISOString(),this._applyEditsHandler=e=>{const{serviceUrl:t,gdbVersion:r,result:s}=e;t===this._featureServiceUrl&&s.then(e=>{const t=e.historicMoment;t&&this._addMomentToVersionItem(r,t)})}}initialize(){this.url=n(this.url),this._featureServiceUrl=this.url.replace(/\/VersionManagementServer/i,"/FeatureServer"),p.has(this.url)||p.set(this.url,new Map);const e=(h.get(this.url)??0)+1;h.set(this.url,e),this.when().then(()=>this.addHandles(c(this._applyEditsHandler)),()=>{})}destroy(){const e=(h.get(this.url)??1)-1;h.set(this.url,e),0===e&&p.delete(this.url),V.delete(this._featureServiceUrl)}read(e,t){this.sourceJSON=e,super.read(e,t)}readDefaultVersionIdentifier(e,t){return{name:t.defaultVersionName,guid:t.defaultVersionGuid}}writeDefaultVersionIdentifier(e,t){t.defaultVersionName=e.name,t.defaultVersionGuid=e.guid}get loaded(){return super.loaded}load(e){return this.addResolvingPromise(this._fetchService(this.url,e)),Promise.resolve(this)}async createVersion(e){const[{createVersion:t},{default:r}]=await Promise.all([import("../rest/versionManagement/createVersion.js"),import("../rest/versionManagement/support/CreateVersionParameters.js")]),s=r.from(e);return t(this.url,s)}async deleteVersion(e){const[{deleteVersion:t},{default:r}]=await Promise.all([import("../rest/versionManagement/deleteVersion.js"),import("../rest/versionManagement/support/DeleteVersionParameters.js")]);let s;e.guid&&p.get(this.url)?.has(e.guid)&&(s=v??void 0);const i=new r({versionName:e.name,sessionId:s});return t(this.url,i)}async getVersionInfoExtended(e){const{getVersion:t}=await import("../rest/versionManagement/getVersion.js");return t(this.url,e.guid)}async getVersionInfos(e={}){const[{getVersionInfos:t},{default:r}]=await Promise.all([import("../rest/versionManagement/getVersionInfos.js"),import("../rest/versionManagement/support/GetVersionInfosParameters.js")]),s=r.from(e);return t(this.url,s)}async reconcile(e,t={}){const[{reconcile:r},{default:s}]=await Promise.all([import("../rest/versionManagement/gdbVersion/reconcile.js"),import("../rest/versionManagement/gdbVersion/support/ReconcileParameters.js")]),i=s.from(t);return i.sessionId=v,r(this.url,e.guid,i)}async post(e){const[{post:t},{default:r}]=await Promise.all([import("../rest/versionManagement/gdbVersion/post.js"),import("../rest/versionManagement/gdbVersion/support/PostParameters.js")]),s=r.from({sessionId:v});return t(this.url,e.guid,s)}async alterVersion(e,t){const[{alterVersion:r},{default:s}]=await Promise.all([import("../rest/versionManagement/gdbVersion/alterVersion.js"),import("../rest/versionManagement/gdbVersion/support/AlterVersionParameters.js")]),i=s.from(t);return r(this.url,e.guid,i)}async startReading(e){return(await this.startReadingWithResult(e)).success}async startReadingWithResult(e){const{startReading:t}=await import("../rest/versionManagement/gdbVersion/startReading.js"),r=await t(this.url,e.guid,v);if(r.success){const t=await this.getVersionInfoExtended(e),r=new Date(t.modifiedDate),s={name:t.versionIdentifier.name,moment:r,lockType:"read"};this._addOrUpdateItem(e.guid,s),m(this._featureServiceUrl,null,e.name,r)}return r}async stopReading(e){return(await this.stopReadingWithResult(e)).success}async stopReadingWithResult(e){const{stopReading:t}=await import("../rest/versionManagement/gdbVersion/stopReading.js"),r=await t(this.url,e.guid,v);return r.success&&(p.get(this.url)?.delete(e.guid),m(this._featureServiceUrl,null,e.name,null)),r}async startEditing(e){return(await this.startEditingWithResult(e)).success}async startEditingWithResult(e){const{startEditing:t}=await import("../rest/versionManagement/gdbVersion/startEditing.js"),r=await t(this.url,e.guid,v);if(r.success){const t=await this.getVersionInfoExtended(e),r=new Date(t.modifiedDate),s=new g(r),i={name:e.name,moment:r,lockType:"edit",stack:s};this._addOrUpdateItem(e.guid,i),m(this._featureServiceUrl,null,e.name,r)}return r}async stopEditing(e,t){return(await this.stopEditingWithResult(e,t)).success}async stopEditingWithResult(e,t){if(t){const t=p.get(this.url)?.get(e.guid);if(t?.stack?.canRedo()){const[{deleteForwardEdits:r},{default:s}]=await Promise.all([import("../rest/versionManagement/gdbVersion/deleteForwardEdits.js"),import("../rest/versionManagement/gdbVersion/support/DeleteForwardEditsParameters.js")]),i=await r(this.url,e.guid,new s({sessionId:v,moment:t.moment}));if(!i.success)return i}}const{stopEditing:r}=await import("../rest/versionManagement/gdbVersion/stopEditing.js"),s=await r(this.url,e.guid,v,t);if(s.success){const t=await this.getVersionInfoExtended(e),r=new Date(t.modifiedDate);this._addOrUpdateItem(e.guid,{name:e.name,moment:r,lockType:"read",editMomentStack:void 0}),m(this._featureServiceUrl,null,e.name,r)}return s}getLockType(e){const t=p.get(this.url)?.get(e.guid)?.lockType;return t??"none"}async changeVersion(e,t,s){if(s&&"name"in s&&!await this.getVersionInfoExtended(s))throw new r("version-management-service:invalid-version","version does not exist");if("networkServiceUrl"in e){if(this._featureServiceUrl.toLowerCase()===e.featureServiceUrl.toLowerCase())return this._changeVersionInternal(e,t,s)}else{let r;"layers"in e?(r=e.allTables.concat(e.allLayers),e.utilityNetworks&&e.utilityNetworks.forEach(e=>{this._featureServiceUrl.toLowerCase()===e.featureServiceUrl.toLowerCase()&&this._changeVersionInternal(e,t,s)})):r=e;for(const e of r)if("feature"===e.type||"subtype-group"===e.type){const r=/^(.*\/FeatureServer)\/\d+$/,i=e.url.replace(r,"$1");if(this._featureServiceUrl.toLowerCase()===i.toLowerCase()&&!this._changeVersionInternal(e,t,s))return!1}else if("group"===e.type){const r=e.allTables.concat(e.allLayers);for(const e of r)if("feature"===e.type||"subtype-group"===e.type){const r=/^(.*\/FeatureServer)\/\d+$/,i=e.url.replace(r,"$1");if(this._featureServiceUrl.toLowerCase()===i.toLowerCase()&&!this._changeVersionInternal(e,t,s))return!1}}}return!0}async changeVersionWithResult(e,t,r){let s;if("layers"in e){const t=y(e.allTables.concat(e.allLayers).filter(e=>"group"!==e.type).toArray());e.utilityNetworks&&e.utilityNetworks.forEach(e=>{const r=y([e]);t.push(...r)}),s=t}else s=e;if(r&&"name"in r){if(!await this.getVersionInfoExtended(r)){const e=new Map;for(const t of s)e.set(t,{success:!1});return e}}if(t&&"name"in t){if("none"!==this.getLockType(t)){const e=new Map;for(const t of s)e.set(t,{success:!1});return e}}const i=new Map;for(const n of s)if(n)if(n.featureServiceUrl.toLowerCase()===this._featureServiceUrl.toLowerCase()){const e=this._changeVersionInternalWithResult(n,t,r);i.set(n,e)}else i.set(n,{success:!1});return i}async getVersionIdentifierFromName(e){try{const t=await this.getVersionInfos({includeHidden:!0});return t.find(t=>t.versionIdentifier.name.toUpperCase()===e.toUpperCase())?.versionIdentifier||null}catch{return null}}async getVersionIdentifierFromGuid(e){const{getVersion:t}=await import("../rest/versionManagement/getVersion.js");try{return(await t(this.url,e)).versionIdentifier}catch{return null}}canUndo(e){const t=p.get(this.url)?.get(e.guid);return!!t?.stack?.canUndo()}canRedo(e){const t=p.get(this.url)?.get(e.guid);return!!t?.stack?.canRedo()}undo(e){const t=p.get(this.url)?.get(e.guid),r=t?.stack?.undo()||void 0;if(t&&r){const r=t.stack.peek();m(this._featureServiceUrl,null,e.name,r),p.get(this.url)?.set(e.guid,{...t,moment:r})}}redo(e){const t=p.get(this.url)?.get(e.guid),r=t?.stack?.redo()||void 0;t&&r&&(m(this._featureServiceUrl,null,e.name,r),p.get(this.url)?.set(e.guid,{...t,moment:r}))}_setUpData(e,t){let s=null,i=null,n=null,o=null;const a=e=>{const t=p?.get(this.url)?.get(e.guid);n=e.name,o=t?.moment??null};if(e&&"name"in e){if("none"!==this.getLockType(e))throw new r("version-management-service:version-locked","version is locked");s=e.name,i=null,t&&"name"in t?a(t):(n=this.defaultVersionIdentifier.name,o=t)}else s=this.defaultVersionIdentifier.name,i=e,t&&"name"in t?a(t):(n=this.defaultVersionIdentifier.name,o=t);return{fromVersionName:s,fromMoment:i,toVersionName:n,toMoment:o}}_changeVersionInternal(e,t,r){try{const{fromVersionName:s,fromMoment:i,toVersionName:n,toMoment:o}=this._setUpData(t,r);(this._isDefault(s)&&this._isDefault(e.gdbVersion)&&this._dateEquals(e.historicMoment,i)||s===e.gdbVersion&&this._dateEquals(e.historicMoment,i))&&(e.gdbVersion=n,e.historicMoment=o)}catch(s){return!1}return!0}_changeVersionInternalWithResult(e,t,r){try{const{fromVersionName:s,fromMoment:i,toVersionName:n,toMoment:o}=this._setUpData(t,r);return this._isDefault(s)&&this._isDefault(e.gdbVersion)&&this._dateEquals(e.historicMoment,i)||s===e.gdbVersion&&this._dateEquals(e.historicMoment,i)?(e.gdbVersion=n,e.historicMoment=o,{success:!0}):{success:!1}}catch(s){return{success:!1}}}_addMomentToVersionItem(e,t){const r=p.get(this.url);if(r)for(const[s,i]of r){i.name===e&&this._addToStack(s,t)}}_addToStack(e,t){const r=p.get(this.url),s=r?.get(e);return!!s?.stack&&(I(s.stack.peek(),t)&&s.stack.push(t),r.set(e,{...s,moment:t}),!0)}_addOrUpdateItem(e,t){const r=p.get(this.url),s=r?.get(e);return s?(r.set(e,{...s,...t}),!0):!(!t.name||!t.lockType)&&(r?.set(e,{...t,lockType:t.lockType}),!0)}async _fetchService(e,r){if(this.sourceJSON){this.read(this.sourceJSON,{origin:"service",url:f(e)});const t=new o(this.url).host;return void V.set(t,this.defaultVersionIdentifier.name)}const s=await t(e,{responseType:"json",query:{f:"json"},...r});this.read(s.data)}};function I(e,t){if(e){return e.getTime()<t.getTime()}return!0}e([a()],w.prototype,"url",void 0),e([a()],w.prototype,"sourceJSON",void 0),e([a({type:String,json:{write:!0}})],w.prototype,"name",void 0),e([a({json:{write:{target:{defaultVersionName:{type:String},defaultVersionGuid:{type:String}}},read:{source:["defaultVersionName","defaultVersionGuid"]}}})],w.prototype,"defaultVersionIdentifier",void 0),e([u("defaultVersionIdentifier",["defaultVersionName","defaultVersionGuid"])],w.prototype,"readDefaultVersionIdentifier",null),e([d("defaultVersionIdentifier",{defaultVersionName:{type:String},defaultVersionGuid:{type:String}})],w.prototype,"writeDefaultVersionIdentifier",null),e([a({json:{write:!0}})],w.prototype,"capabilities",void 0),w=e([l("esri.versionManagement.VersionManagementService")],w);const S=w;export{S as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../core/Collection.js";import r from"../core/Error.js";import{JSONSupportMixin as s}from"../core/JSONSupport.js";import{Loadable as i}from"../core/Loadable.js";import n from"../core/Logger.js";import{property as o}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as a}from"../core/accessorSupport/decorators/subclass.js";let c=class extends(s(i)){constructor(e){super(e),this.versionManagementService=null,this.featureServiceUrl=null,this.url=null,this.currentVersion=null,this.currentVersionInfo=null,this.versionInfos=[],this.versionableItems=new t,this.usePersistentReadSessions=!1,this.state="lock-none"}initialize(){this.url=this.versionManagementService.url,this.featureServiceUrl=this.url.replace(/\/VersionManagementServer/i,"/FeatureServer"),this.addHandles([this.versionableItems.on("before-add",e=>{if(e.item.featureServiceUrl.toLowerCase()!==this.featureServiceUrl.toLowerCase())return e.preventDefault(),void n.getLogger(this).error("#add()","Cannot add versionAdapter, feature service urls do not match.")}),this.versionableItems.on("before-remove",e=>{if(0===this.versionableItems.items.length&&this.currentVersion&&"name"in this.currentVersion&&"none"!==this.versionManagementService.getLockType(this.currentVersion))return e.preventDefault(),void n.getLogger(this).error("#remove()","Cannot remove last versionAdapter.")})])}load(e){return this.addResolvingPromise(this._setUpState(e)),Promise.resolve(this)}get defaultVersionIdentifier(){return this.versionManagementService.defaultVersionIdentifier}get isDefault(){return!this.currentVersion||!!this.currentVersion&&"name"in this.currentVersion&&this.currentVersion.name===this.defaultVersionIdentifier.name}async getVersionInfos(e=!1){return e&&(this.versionInfos=await this.versionManagementService.getVersionInfos()),this.versionInfos}async alterVersion(e,t){if(this.currentVersion&&"guid"in this.currentVersion&&e.guid===this.currentVersion.guid)return!1;const r=await this.versionManagementService.alterVersion(e,t);return r&&await this.getVersionInfos(!0),r}async deleteVersion(e){if(this.currentVersion&&"guid"in this.currentVersion&&e.guid===this.currentVersion.guid)return!1;const t=await this.versionManagementService.deleteVersion(e);return t&&await this.getVersionInfos(!0),t}async getVersionInfoExtended(){return this.currentVersion&&"name"in this.currentVersion?this.versionManagementService.getVersionInfoExtended(this.currentVersion):this.versionManagementService.getVersionInfoExtended(this.defaultVersionIdentifier)}async startEditing(){if(this._isDefaultOrHistoricVersion())return{success:!1};if(!this.usePersistentReadSessions){const e=await this.versionManagementService.startReadingWithResult(this.currentVersion);if(!e.success)return e;this.state="lock-read"}const e=await this.versionManagementService.startEditingWithResult(this.currentVersion);return e.success&&(this.state="lock-write"),e}async stopEditing(e){if(this._isDefaultOrHistoricVersion())return{success:!1};const t=await this.versionManagementService.stopEditingWithResult(this.currentVersion,e);if(!t.success)return t;if(this.state="lock-read",!this.usePersistentReadSessions){const e=await this.versionManagementService.stopReadingWithResult(this.currentVersion);return e.success&&(this.state="lock-none"),e}return t}async changeVersion(e){let t=null;if(this.usePersistentReadSessions){if(this._isDefaultOrHistoricVersion(e))e&&"name"in e?(t=await this.versionManagementService.getVersionInfoExtended(e),this.state="public"===t?.access?"lock-none":"lock-read"):this.state="lock-read";else if(!await this.versionManagementService.startReading(e))throw new r("versioning:failed-lock","Failed to acquire read lock for version: "+e);this._isDefaultOrHistoricVersion(this.currentVersion)||await this.versionManagementService.stopReading(this.currentVersion)}const s=await this.versionManagementService.changeVersionWithResult(this.versionableItems,this.currentVersion,e);let i=!1;return s.forEach((e,t)=>{i=i||e.success}),i&&(this.currentVersion=e,this.currentVersionInfo=t||await this.getVersionInfoExtended(),this._isDefaultOrHistoricVersion()?this.currentVersion&&"name"in this.currentVersion?this.state="public"===this.currentVersionInfo?.access?"lock-none":"lock-read":this.state="lock-read":this.state="read"!==this.versionManagementService.getLockType(this.currentVersion)?"lock-none":"lock-read"),s}async undo(){return this._isDefaultOrHistoricVersion()?{success:!1}:(this.versionManagementService.undo(this.currentVersion),{success:!0})}async redo(){return this._isDefaultOrHistoricVersion()?{success:!1}:(this.versionManagementService.redo(this.currentVersion),{success:!0})}async _setUpState(e){await this.versionManagementService.load(e),this.state="lock-none",this.currentVersionInfo=await this.getVersionInfoExtended(),this.versionableItems.forEach(e=>{this.currentVersion?"name"in this.currentVersion?(e.gdbVersion=this.currentVersion.name,e.historicMoment=null):(e.historicMoment=this.currentVersion,e.gdbVersion=null):(e.gdbVersion=null,e.historicMoment=null)}),this.usePersistentReadSessions&&(this._isDefaultOrHistoricVersion()?this.currentVersion&&"name"in this.currentVersion?this.state="public"===this.currentVersionInfo?.access?"lock-none":"lock-read":this.state="lock-read":await this.versionManagementService.startReading(this.currentVersion)&&(this.state="lock-read"))}_isDefaultOrHistoricVersion(e=this.currentVersion){return!(e&&"name"in e)||e.name===this.versionManagementService.defaultVersionIdentifier.name}};e([o()],c.prototype,"versionManagementService",void 0),e([o()],c.prototype,"featureServiceUrl",void 0),e([o()],c.prototype,"url",void 0),e([o()],c.prototype,"currentVersion",void 0),e([o()],c.prototype,"currentVersionInfo",void 0),e([o()],c.prototype,"versionInfos",void 0),e([o()],c.prototype,"versionableItems",void 0),e([o()],c.prototype,"usePersistentReadSessions",void 0),e([o()],c.prototype,"state",void 0),e([o({readOnly:!0})],c.prototype,"defaultVersionIdentifier",null),e([o({readOnly:!0})],c.prototype,"isDefault",null),c=e([a("esri.versionManagement.VersioningState")],c);const u=c;export{u as default};
5
+ import{__decorate as e}from"tslib";import t from"../core/Collection.js";import r from"../core/Error.js";import{JSONSupportMixin as s}from"../core/JSONSupport.js";import{Loadable as i}from"../core/Loadable.js";import n from"../core/Logger.js";import{property as o}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as a}from"../core/accessorSupport/decorators/subclass.js";let c=class extends(s(i)){constructor(e){super(e),this.versionManagementService=null,this.featureServiceUrl=null,this.url=null,this.currentVersion=null,this.currentVersionInfo=null,this.versionInfos=[],this.versionableItems=new t,this.usePersistentReadSessions=!1,this.state="lock-none"}initialize(){this.url=this.versionManagementService.url,this.featureServiceUrl=this.url.replace(/\/VersionManagementServer/i,"/FeatureServer"),this.addHandles([this.versionableItems.on("before-add",e=>{if(e.item.featureServiceUrl.toLowerCase()!==this.featureServiceUrl.toLowerCase())return e.preventDefault(),void n.getLogger(this).error("#add()","Cannot add versionAdapter, feature service urls do not match.")}),this.versionableItems.on("before-remove",e=>{if(0===this.versionableItems.items.length&&this.currentVersion&&"name"in this.currentVersion&&"none"!==this.versionManagementService.getLockType(this.currentVersion))return e.preventDefault(),void n.getLogger(this).error("#remove()","Cannot remove last versionAdapter.")})])}load(e){return this.addResolvingPromise(this._setUpState(e)),Promise.resolve(this)}get defaultVersionIdentifier(){return this.versionManagementService.defaultVersionIdentifier}get isDefault(){return!this.currentVersion||!!this.currentVersion&&"name"in this.currentVersion&&this.currentVersion.name===this.defaultVersionIdentifier.name}get loaded(){return super.loaded}async getVersionInfos(e=!1){return e&&(this.versionInfos=await this.versionManagementService.getVersionInfos()),this.versionInfos}async alterVersion(e,t){if(this.currentVersion&&"guid"in this.currentVersion&&e.guid===this.currentVersion.guid)return!1;const r=await this.versionManagementService.alterVersion(e,t);return r&&await this.getVersionInfos(!0),r}async deleteVersion(e){if(this.currentVersion&&"guid"in this.currentVersion&&e.guid===this.currentVersion.guid)return!1;const t=await this.versionManagementService.deleteVersion(e);return t&&await this.getVersionInfos(!0),t}async getVersionInfoExtended(){return this.currentVersion&&"name"in this.currentVersion?this.versionManagementService.getVersionInfoExtended(this.currentVersion):this.versionManagementService.getVersionInfoExtended(this.defaultVersionIdentifier)}async startEditing(){if(this._isDefaultOrHistoricVersion())return{success:!1};if(!this.usePersistentReadSessions){const e=await this.versionManagementService.startReadingWithResult(this.currentVersion);if(!e.success)return e;this.state="lock-read"}const e=await this.versionManagementService.startEditingWithResult(this.currentVersion);return e.success&&(this.state="lock-write"),e}async stopEditing(e){if(this._isDefaultOrHistoricVersion())return{success:!1};const t=await this.versionManagementService.stopEditingWithResult(this.currentVersion,e);if(!t.success)return t;if(this.state="lock-read",!this.usePersistentReadSessions){const e=await this.versionManagementService.stopReadingWithResult(this.currentVersion);return e.success&&(this.state="lock-none"),e}return t}async changeVersion(e){let t=null;if(this.usePersistentReadSessions){if(this._isDefaultOrHistoricVersion(e))e&&"name"in e?(t=await this.versionManagementService.getVersionInfoExtended(e),this.state="public"===t?.access?"lock-none":"lock-read"):this.state="lock-read";else if(!await this.versionManagementService.startReading(e))throw new r("versioning:failed-lock","Failed to acquire read lock for version: "+e);this._isDefaultOrHistoricVersion(this.currentVersion)||await this.versionManagementService.stopReading(this.currentVersion)}const s=await this.versionManagementService.changeVersionWithResult(this.versionableItems,this.currentVersion,e);let i=!1;return s.forEach((e,t)=>{i=i||e.success}),i&&(this.currentVersion=e,this.currentVersionInfo=t||await this.getVersionInfoExtended(),this._isDefaultOrHistoricVersion()?this.currentVersion&&"name"in this.currentVersion?this.state="public"===this.currentVersionInfo?.access?"lock-none":"lock-read":this.state="lock-read":this.state="read"!==this.versionManagementService.getLockType(this.currentVersion)?"lock-none":"lock-read"),s}async undo(){return this._isDefaultOrHistoricVersion()?{success:!1}:(this.versionManagementService.undo(this.currentVersion),{success:!0})}async redo(){return this._isDefaultOrHistoricVersion()?{success:!1}:(this.versionManagementService.redo(this.currentVersion),{success:!0})}async _setUpState(e){await this.versionManagementService.load(e),this.state="lock-none",this.currentVersionInfo=await this.getVersionInfoExtended(),this.versionableItems.forEach(e=>{this.currentVersion?"name"in this.currentVersion?(e.gdbVersion=this.currentVersion.name,e.historicMoment=null):(e.historicMoment=this.currentVersion,e.gdbVersion=null):(e.gdbVersion=null,e.historicMoment=null)}),this.usePersistentReadSessions&&(this._isDefaultOrHistoricVersion()?this.currentVersion&&"name"in this.currentVersion?this.state="public"===this.currentVersionInfo?.access?"lock-none":"lock-read":this.state="lock-read":await this.versionManagementService.startReading(this.currentVersion)&&(this.state="lock-read"))}_isDefaultOrHistoricVersion(e=this.currentVersion){return!(e&&"name"in e)||e.name===this.versionManagementService.defaultVersionIdentifier.name}};e([o()],c.prototype,"versionManagementService",void 0),e([o()],c.prototype,"featureServiceUrl",void 0),e([o()],c.prototype,"url",void 0),e([o()],c.prototype,"currentVersion",void 0),e([o()],c.prototype,"currentVersionInfo",void 0),e([o()],c.prototype,"versionInfos",void 0),e([o()],c.prototype,"versionableItems",void 0),e([o()],c.prototype,"usePersistentReadSessions",void 0),e([o()],c.prototype,"state",void 0),e([o({readOnly:!0})],c.prototype,"defaultVersionIdentifier",null),e([o({readOnly:!0})],c.prototype,"isDefault",null),c=e([a("esri.versionManagement.VersioningState")],c);const u=c;export{u as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import has from"../../../../core/has.js";import{throwIfNotAbortError as t}from"../../../../core/promiseUtils.js";import e from"./Rect.js";import i from"./RectangleBinPack.js";import{Texture as h}from"../../../webgl/Texture.js";import{TextureDescriptor as s}from"../../../webgl/TextureDescriptor.js";const r=256,a=t=>Math.floor(t/256);function n(t){const e=new Set;for(const i of t)e.add(a(i));return e}function c(e,i,h){return e.has(i)||e.set(i,h().then(()=>{e.delete(i)}).catch(h=>{e.delete(i),t(h)})),e.get(i)}const o=t=>({rect:new e(0,0,0,0),page:0,metrics:{left:0,width:0,height:0,advance:0,top:0},code:t,sdf:!0});class l{constructor(t,e,h){this.width=0,this.height=0,this._dirties=[],this._glyphData=[],this._currentPage=0,this._glyphCache={},this._textures=[],this._rangePromises=new Map,this._preloadCache={},this.width=t,this.height=e,this._glyphSource=h,this._binPack=new i(t-4,e-4),this._glyphData.push(new Uint8Array(t*e)),this._dirties.push(!0),this._textures.push(null),this._initDecorationGlyphs()}dispose(){this._binPack=null;for(const t of this._textures)t&&t.dispose();this._textures.length=0,this._glyphData.length=0}_initDecorationGlyphs(){const t=[117,149,181,207,207,181,149,117],e=[],i=[];for(let r=0;r<t.length;r++){const h=t[r];for(let t=0;t<11;t++){const s=r>=3&&r<5&&t>=3&&t<8?255:0;e.push(h),i.push(s)}}const h={metrics:{width:5,height:2,left:0,top:0,advance:0},bitmap:new Uint8Array(e)},s={metrics:{width:5,height:2,left:0,top:0,advance:0},bitmap:new Uint8Array(i)};this._recordGlyph(h),this._recordGlyph(s)}getTexture(t,e){if(!this._textures[e]){const i=new s(this.width,this.height);i.pixelFormat=6406,i.wrapMode=33071,this._textures[e]=new h(t,i,new Uint8Array(this.width*this.height))}return this._dirties[e]&&(this._textures[e].setData(this._glyphData[e]),this._dirties[e]=!1),this._textures[e]}async getGlyphItems(t,e,i){const h=this._getGlyphCache(t);return await this._fetchRanges(t,e,i),e.map(e=>this._getMosaicItem(h,t,e))}bind(t,e,i,h){const s=this.getTexture(t,i);s.setSamplingMode(e),t.bindTexture(s,h)}preloadASCIIGlyphCache(t){const e=this._preloadCache[t];if(null!=e)return e;const i=this._glyphSource.preloadASCIIRange(t).then(()=>{const e=this._getGlyphCache(t);for(let i=0;i<256;i++)this._getMosaicItem(e,t,i)});return this._preloadCache[t]=i,i}_getGlyphCache(t){return this._glyphCache[t]||(this._glyphCache[t]={}),this._glyphCache[t]}_invalidate(){this._dirties[this._currentPage]=!0}async _fetchRanges(t,e,i){const h=n(e),s=[];h.forEach(e=>{s.push(this._fetchRange(t,e,i))}),await Promise.all(s)}async _fetchRange(t,e,i){if(e>r)return;const h=t+e;return c(this._rangePromises,h,()=>this._glyphSource.getRange(t,e,i))}_getMosaicItem(t,e,i){if(!t[i]){const h=this._glyphSource.getGlyph(e,i);if(!h?.metrics)return o(i);const s=this._recordGlyph(h),r=this._currentPage,a=h.metrics;t[i]={rect:s,page:r,metrics:a,code:i,sdf:!0},this._invalidate()}return t[i]}_recordGlyph(t){const h=t.metrics;let s;if(0===h.width)s=new e(0,0,0,0);else{const e=3,r=h.width+2*e,a=h.height+2*e;s=this._binPack.allocate(r,a),s.isEmpty&&(this._dirties[this._currentPage]||(this._glyphData[this._currentPage]=null),this._currentPage=this._glyphData.length,this._glyphData.push(new Uint8Array(this.width*this.height)),this._dirties.push(!0),this._textures.push(null),this._initDecorationGlyphs(),this._binPack=new i(this.width-4,this.height-4),s=this._binPack.allocate(r,a));const n=this._glyphData[this._currentPage],c=t.bitmap;let o,l;if(c)for(let t=0;t<a;t++){o=r*t,l=this.width*(s.y+t)+s.x;for(let t=0;t<r;t++)n[l+t]=c[o+t]}has("esri-glyph-debug")&&this._showDebugPage(n)}return s}_showDebugPage(t){const e=document.createElement("canvas"),i=e.getContext("2d"),h=new ImageData(this.width,this.height),s=h.data;e.width=this.width,e.height=this.height,e.style.border="1px solid black";for(let r=0;r<t.length;++r)s[4*r]=t[r],s[4*r+1]=0,s[4*r+2]=0,s[4*r+3]=255;i.putImageData(h,0,0),document.body.appendChild(e)}}export{l as default};
5
+ import has from"../../../../core/has.js";import{throwIfNotAbortError as t}from"../../../../core/promiseUtils.js";import e from"./Rect.js";import i from"./RectangleBinPack.js";import{Texture as h}from"../../../webgl/Texture.js";import{TextureDescriptor as s}from"../../../webgl/TextureDescriptor.js";const r=256,a=t=>Math.floor(t/256);function n(t){const e=new Set;for(const i of t)e.add(a(i));return e}function c(e,i,h){return e.has(i)||e.set(i,h().then(()=>{e.delete(i)}).catch(h=>{e.delete(i),t(h)})),e.get(i)}const o=t=>({rect:new e(0,0,0,0),page:0,metrics:{left:0,width:0,height:0,advance:0,top:0},code:t,sdf:!0});class l{constructor(t,e,h){this.width=0,this.height=0,this._dirties=[],this._glyphData=[],this._currentPage=0,this._glyphCache={},this._textures=[],this._rangePromises=new Map,this._preloadCache={},this.width=t,this.height=e,this._glyphSource=h,this._binPack=new i(t,e),this._glyphData.push(new Uint8Array(t*e)),this._dirties.push(!0),this._textures.push(null),this._initDecorationGlyphs()}dispose(){this._binPack=null;for(const t of this._textures)t&&t.dispose();this._textures.length=0,this._glyphData.length=0}_initDecorationGlyphs(){const t=[117,149,181,207,207,181,149,117],e=[],i=[];for(let r=0;r<t.length;r++){const h=t[r];for(let t=0;t<11;t++){const s=r>=3&&r<5&&t>=3&&t<8?255:0;e.push(h),i.push(s)}}const h={metrics:{width:5,height:2,left:0,top:0,advance:0},bitmap:new Uint8Array(e)},s={metrics:{width:5,height:2,left:0,top:0,advance:0},bitmap:new Uint8Array(i)};this._recordGlyph(h),this._recordGlyph(s)}getTexture(t,e){if(!this._textures[e]){const i=new s(this.width,this.height);i.pixelFormat=6406,i.wrapMode=33071,this._textures[e]=new h(t,i,new Uint8Array(this.width*this.height))}return this._dirties[e]&&(this._textures[e].setData(this._glyphData[e]),this._dirties[e]=!1),this._textures[e]}async getGlyphItems(t,e,i){const h=this._getGlyphCache(t);return await this._fetchRanges(t,e,i),e.map(e=>this._getMosaicItem(h,t,e))}bind(t,e,i,h){const s=this.getTexture(t,i);s.setSamplingMode(e),t.bindTexture(s,h)}preloadASCIIGlyphCache(t){const e=this._preloadCache[t];if(null!=e)return e;const i=this._glyphSource.preloadASCIIRange(t).then(()=>{const e=this._getGlyphCache(t);for(let i=0;i<256;i++)this._getMosaicItem(e,t,i)});return this._preloadCache[t]=i,i}_getGlyphCache(t){return this._glyphCache[t]||(this._glyphCache[t]={}),this._glyphCache[t]}_invalidate(){this._dirties[this._currentPage]=!0}async _fetchRanges(t,e,i){const h=n(e),s=[];h.forEach(e=>{s.push(this._fetchRange(t,e,i))}),await Promise.all(s)}async _fetchRange(t,e,i){if(e>r)return;const h=t+e;return c(this._rangePromises,h,()=>this._glyphSource.getRange(t,e,i))}_getMosaicItem(t,e,i){if(!t[i]){const h=this._glyphSource.getGlyph(e,i);if(!h?.metrics)return o(i);const s=this._recordGlyph(h),r=this._currentPage,a=h.metrics;t[i]={rect:s,page:r,metrics:a,code:i,sdf:!0},this._invalidate()}return t[i]}_recordGlyph(t){const h=t.metrics;let s;if(0===h.width)s=new e(0,0,0,0);else{const e=3,r=h.width+2*e,a=h.height+2*e;s=this._binPack.allocate(r,a),s.isEmpty&&(this._dirties[this._currentPage]||(this._glyphData[this._currentPage]=null),this._currentPage=this._glyphData.length,this._glyphData.push(new Uint8Array(this.width*this.height)),this._dirties.push(!0),this._textures.push(null),this._initDecorationGlyphs(),this._binPack=new i(this.width,this.height),s=this._binPack.allocate(r,a));const n=this._glyphData[this._currentPage],c=t.bitmap;let o,l;if(c)for(let t=0;t<a;t++){o=r*t,l=this.width*(s.y+t)+s.x;for(let t=0;t<r;t++)n[l+t]=c[o+t]}has("esri-glyph-debug")&&this._showDebugPage(n)}return s}_showDebugPage(t){const e=document.createElement("canvas"),i=e.getContext("2d"),h=new ImageData(this.width,this.height),s=h.data;e.width=this.width,e.height=this.height,e.style.border="1px solid black";for(let r=0;r<t.length;++r)s[4*r]=t[r],s[4*r+1]=0,s[4*r+2]=0,s[4*r+3]=255;i.putImageData(h,0,0),document.body.appendChild(e)}}export{l as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{uniform as r,UniformGroup as t}from"../../../GraphShaderModule.js";import{step as n,Vec2 as o,Bool as i,texture2D as u,floor as a,fract as s,IVec2 as m,int as p,Vec3 as d,ifElse as c,lessThanEqual as f,texelFetch as l,Int as w,dot as g,Sampler2D as y}from"../../../graph/glsl.js";import{oneMinus as x}from"../utils.js";import{sampleBilinear as b}from"./sampleBilinear.js";class S extends t{}function v(e,r){const t=u(r.transformTexture,e);return new o(t.r,t.g)}function j(e,r){const{transformTexture:t,targetImageSize:n,transformSpacing:i}=r,u=a(e.multiply(n)),l=new o(4,1),w=a(u.divide(i)).multiply(l),g=s(u.add(new o(.5,.5)).divide(i)),y=new m(p(w.x),p(w.y)),x=new d(g,1);return c(f(g.x,g.y),z(t,y,x),h(t,y,x))}function z(e,r,t){const n=l(e,r,new w(0)),i=new m(r.x.add(1),r.y),u=l(e,i,new w(0));return new o(g(n.rgb,t),g(u.rgb,t))}function h(e,r,t){const n=new m(r.x.add(2),r.y),i=l(e,n,new w(0)),u=new m(r.x.add(3),r.y),a=l(e,u,new w(0));return new o(g(i.rgb,t),g(a.rgb,t))}function I(e){const r=n(new o(-1e-5,-1e-5),e).multiply(n(e,new o(1.00001,1.00001))),t=x(r.x.multiply(r.y));return new i(t)}function T(e,r,t=!1){return r?t?v(e,r):j(e,r):e}function G(e,r,t){const{bicubic:n=!1,bilinear:o=!1,nearestOnEdge:i=!1}=t??{};return n||o?b(r.texture,e,r.srcImageSize,i):u(r.texture,e)}e([r(y)],S.prototype,"transformTexture",void 0),e([r(o)],S.prototype,"targetImageSize",void 0),e([r(o)],S.prototype,"transformSpacing",void 0),e([r(o)],S.prototype,"transformGridSize",void 0);export{S as ProjectionConfig,G as getPixel,T as getPixelLocation,I as isOutside};
5
+ import{__decorate as e}from"tslib";import{uniform as r,UniformGroup as t}from"../../../GraphShaderModule.js";import{step as n,Vec2 as o,Bool as i,texture2D as m,floor as s,fract as a,IVec2 as u,int as p,Vec3 as d,ifElse as c,lessThanEqual as f,texelFetch as l,Int as w,dot as g,Sampler2D as x}from"../../../graph/glsl.js";import{sampleBicubicBSpline as y}from"../bitmapUtils.js";import{oneMinus as b}from"../utils.js";import{sampleBilinear as S}from"./sampleBilinear.js";class v extends t{}function j(e,r){const t=m(r.transformTexture,e);return new o(t.r,t.g)}function z(e,r){const{transformTexture:t,targetImageSize:n,transformSpacing:i}=r,m=s(e.multiply(n)),l=new o(4,1),w=s(m.divide(i)).multiply(l),g=a(m.add(new o(.5,.5)).divide(i)),x=new u(p(w.x),p(w.y)),y=new d(g,1);return c(f(g.x,g.y),I(t,x,y),h(t,x,y))}function I(e,r,t){const n=l(e,r,new w(0)),i=new u(r.x.add(1),r.y),m=l(e,i,new w(0));return new o(g(n.rgb,t),g(m.rgb,t))}function h(e,r,t){const n=new u(r.x.add(2),r.y),i=l(e,n,new w(0)),m=new u(r.x.add(3),r.y),s=l(e,m,new w(0));return new o(g(i.rgb,t),g(s.rgb,t))}function T(e){const r=n(new o(-1e-5,-1e-5),e).multiply(n(e,new o(1.00001,1.00001))),t=b(r.x.multiply(r.y));return new i(t)}function G(e,r,t=!1){return r?t?j(e,r):z(e,r):e}function B(e,r,t){const{bicubic:n=!1,bilinear:o=!1,nearestOnEdge:i=!1}=t??{};return n||o?n?y(r.texture,e,r.srcImageSize):S(r.texture,e,r.srcImageSize,i):m(r.texture,e)}e([r(x)],v.prototype,"transformTexture",void 0),e([r(o)],v.prototype,"targetImageSize",void 0),e([r(o)],v.prototype,"transformSpacing",void 0),e([r(o)],v.prototype,"transformGridSize",void 0);export{v as ProjectionConfig,B as getPixel,G as getPixelLocation,T as isOutside};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{InputHandler as e}from"../../../input/InputHandler.js";const t=.6;class o extends e{constructor(e,t){super(!0),this._view=e,this._canZoom=!0,this.registerIncoming("mouse-wheel",t,e=>this._handleMouseWheel(e))}_handleMouseWheel(e){if("zoom"!==this._view.navigation.actionMap.mouseWheel)return;if(e.preventDefault(),e.stopPropagation(),!this._canZoom)return;const o=this._view.mapViewNavigation,{x:i,y:n,deltaY:s}=e.data,a=1/t**(1/60*s),h=o.zoom(a,[i,n]);h&&(this._canZoom=!1,h.catch(()=>{}).then(()=>{this._canZoom=!0,o.end()}))}}export{o as MouseWheelZoom};
5
+ import{InputHandler as e}from"../../../input/InputHandler.js";const t=.6;class o extends e{constructor(e,t){super(!0),this._view=e,this._canZoom=!0,this.registerIncoming("mouse-wheel",t,e=>this._handleMouseWheel(e))}_handleMouseWheel(e){if("zoom"!==this._view.navigation.actionMap.mouseWheel)return;if(e.preventDefault(),e.stopPropagation(),!this._canZoom)return;const o=this._view.mapViewNavigation,{x:i,y:n,deltaY:s}=e.data,a=1/t**(1/60*s),h=o.zoom(a,[i,n]);this._canZoom=!1,h.catch(()=>{}).then(()=>{this._canZoom=!0,o.end()})}}export{o as MouseWheelZoom};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../../../request.js";import has from"../../../../../core/has.js";import{ignoreAbortErrors as t,throwIfNotAbortError as s}from"../../../../../core/promiseUtils.js";import{diff as r,hasRootDiffOnly as a,hasRootDiff as i}from"../../../../../core/accessorSupport/diffUtils.js";import{OptimizedFeature as n}from"../../../../../layers/graphics/OptimizedFeature.js";import{QueryEngine as o}from"../../../../../layers/graphics/data/QueryEngine.js";import{executeQuery as c,executeQueryForCount as d}from"../../../../../rest/query/operations/query.js";import u from"../../../../../rest/support/StatisticDefinition.js";import{FeatureStoreStatistics as h}from"../FeatureStoreStatistics.js";import{FeatureSourceQueryInfo as m}from"./FeatureSourceQueryInfo.js";import{StreamMessenger as p}from"./StreamMessenger.js";import{DrillDownTileLoadStrategy as l}from"./strategies/DrillDownTileLoadStrategy.js";import{PagedTileLoadStrategy as y}from"./strategies/PagedTileLoadStrategy.js";import{ParquetSnapshotLoadStrategy as _}from"./strategies/ParquetSnapshotLoadStrategy.js";import{ParquetTileLoadStrategy as g}from"./strategies/ParquetTileLoadStrategy.js";import{SnapshotLoadStrategy as f}from"./strategies/SnapshotLoadStrategy.js";import{StreamLoadStrategy as S}from"./strategies/StreamLoadStrategy.js";import{FeatureSourceChunkStore as v}from"./strategies/chunks/SourceChunkStore.js";import{FeatureMetadata as b}from"../support/FeatureMetadata.js";import{UpdateTracking2D as E}from"../../support/UpdateTracking2D.js";class F{constructor(e,t,s,r,a){this.service=e,this._aggregateAdapter=t,this._subscriptions=s,this._connection=r,this._cachedObjectIds=a,this._updateTracking=new E({debugName:"FeatureSource"}),this._didInvalidateData=!1,this._metadata=b.createFeature(e.metadata),this._store=new v(this._metadata)}destroy(){this._strategy?.destroy(),this._store.destroy(),this._streamMessenger?.destroy(),"memory"===this.service.type&&this.service.source.map(e=>e.close())}get metadata(){if(!this._metadata)throw new Error("InternalError: Metadata not defined. Was update called?");return this._metadata}get store(){return this._store}get streamMessenger(){return null==this._streamMessenger&&this._initStreamMessenger(),this._streamMessenger}get statistics(){return h.from(this._store)}get updateTracking(){return this._updateTracking}get queryEngine(){if(!this._queryEngine){if(!this._schema)return null;const{dataFilter:e}=this._schema.mutable,t=this._schema.mutable.availableFields,s=this._metadata;this._queryEngine=new o({featureStore:this._store,fieldsIndex:s.fieldsIndex,geometryType:s.geometryType,featureIdInfo:s.featureIdInfo,hasM:!1,hasZ:!1,spatialReference:this.service.outSpatialReference,aggregateAdapter:this._aggregateAdapter,timeInfo:s.timeInfo,definitionExpression:e.definitionExpression,availableFields:t})}return this._queryEngine}get isStream(){return"stream"===this._schema.type}get hasDisplayFilter(){return!!this._schema&&("displayFilterInfo"in this._schema.mutable&&null!=this._schema.mutable.displayFilterInfo)}chunks(){return Array.from(this._store.chunks())}prepareCacheUpdate(e,t){const s=new Set,r=new Set;for(const a of e)this._cachedObjectIds.has(a)||(this._cachedObjectIds.add(a),s.add(a));for(const a of t)this._cachedObjectIds.delete(a),r.add(a);this.hasDisplayFilter&&this._strategy.prepareCacheUpdate(s,r)}async applyCacheUpdate(){this.hasDisplayFilter&&await this._updateTracking.addPromise(this._strategy.applyCacheUpdate())}cleanup(){return this._store.cleanup()}onSubscribe(e){this._connection.onEvent({type:"subscribe",tile:e.tile.id});const t=this._strategy?.load(e);t&&(t.then(()=>this._connection.onEvent({type:"loaded",tile:e.tile.id})).catch(t=>this._connection.onEvent({type:"error",tile:e.tile.id,error:t})),this._updateTracking.addPromise(t))}onResume(e){this._updateTracking.addPromise(t(this._strategy?.load(e)))}onUnsubscribe(e){this._connection.onEvent({type:"unsubscribe",tile:e.tile.id}),this._strategy?.unload(e)}applyOverride(e){this._didInvalidateData=!0,this._store.applyOverride(e)}takeOverrideUpdate(){return this._store.takeOverrideUpdate()}async update(e,t){const s=e.source,n=r(this._schema?.mutable,s.mutable);if(!n)return!1;if(has("esri-2d-update-debug")&&console.debug(`Version[${t}] FeatureSource.update`,{changes:n}),this._schema=s,this._queryEngine?.destroy(),this._queryEngine=null,"feature-service"===this.service.type&&null!=this.service.queryMetadata.lastEditDate&&(this._lastEditDate=this.service.queryMetadata.lastEditDate),null==this._streamMessenger&&"stream"===this._schema.type&&this._initStreamMessenger(),a(n,"sourceRefreshVersion")&&this._strategy?.refresh)return this._strategy.refresh();if(("feature"===s.type||"parquet"===s.type)&&a(n,"availableFields")){if(await this._queryLastEditDateChanged()||this._didInvalidateData)this._didInvalidateData=!1,await this._updateStrategy(t);else{this._connection.onEvent({type:"updateFieldsStart"});try{await this._strategy.updateFields(s.mutable.availableFields),this._connection.onEvent({type:"updateFieldsEnd"})}catch(o){this._connection.onEvent({type:"updateFieldsError",error:o})}}return!1}return!!(i(n,"dataFilter")||i(n,"sourceRefreshVersion")||this._strategy.about.supportsDisplayFilter&&i(n,"displayFilterInfo"))&&(await this._updateStrategy(t),!0)}async addParquetFile(e){await this._strategy.addParquetFile(e)}unsafeSetQueryHistoricMoment(e){"feature"===this._schema.type&&(this._schema.mutable.dataFilter.historicMoment=e,this._strategy.unsafeSetQueryHistoricMoment(new Date(e)))}_initStreamMessenger(){null==this._streamMessenger&&(this._streamMessenger=new p(this._connection))}async normalizeOverrides(e){const t={historicMoment:e.historicMoment,commands:{updateWeak:e.commands.updateWeak.map(n.fromJSON),removeWeak:e.commands.removeWeak,update:e.commands.update.map(n.fromJSON),remove:e.commands.remove,release:e.commands.release}},s=e.commands.updateByIdWeak,r=await this._queryOptimizedFeatures(s);return t.commands.updateWeak.push(...r),t}async _queryOptimizedFeatures(e){if(0===e.length)return[];const t=[],s=(await this._strategy.queryByObjectId(e)).getCursor();for(;s.next();)t.push(s.readOptimizedFeatureWorldSpace());return t}getObjectIdsFromGlobalIds(e){const t=this.metadata.globalIdField;if(null==t)throw new Error("InternalError: Recieved an edit with globalIds, but not supported by the service");const s=this._store.mapObjectIdsFromGlobalIds(e,t).values();return Array.from(s)}async _queryLastEditDateChanged(){if(null==this._lastEditDate)return!1;const t=this.service.source,s={...t.query,f:"json"},r=(await e(t.path,{query:s,responseType:"json"})).data.editingInfo.lastEditDate;return r!==this._lastEditDate&&(this._lastEditDate=r,!0)}async _createStrategy(){const e="isSourceHosted"in this.service&&this.service.isSourceHosted,t=Array.isArray(this.service.source),s=this.service.source&&"collection"in this.service.source,r=e||t||s;if("stream"===this._schema.type){const e=new S(this.service,this._schema.mutable.dataFilter,this._store,{outSR:this.service.outSpatialReference},this.metadata);return this._streamMessenger.strategy=e,e}if("parquet"===this._schema.type){const e=this.service;return null!=e.geometryInfo.displayOptimization?new g(e,this._metadata,this._schema,this._store):new _(e,this._metadata,this._schema,this._store)}const a=this.service,i=m.fromSchema(a,this._schema,this._metadata),n=await this._supportSnapshotMode(a,i);return n?new f(a,i,this._store,n,this.metadata,this._connection):r?new y(a,i,this._store,this.metadata,this._connection):new l(a,i,this._store,this.metadata,this._connection)}async _updateStrategy(e){const t=await this._createStrategy();this._connection.onEvent({type:"updateStrategyStart",about:t.about});const r=!!this._strategy;this._store.clear(),this._strategy?.destroy(),this._strategy=t,has("esri-2d-update-debug")&&console.debug(`Version[${e}] FeatureSource.updateStrategy`,{strategy:t});const a=Array.from(this._subscriptions.values());if(!a.length)return void this._connection.onEvent({type:"updateStrategyEnd"});const i=Promise.all(a.map(e=>this._strategy.load(e).then(()=>this._connection.onEvent({type:"loaded",tile:e.tile.id})).catch(t=>this._connection.onEvent({type:"error",tile:e.tile.id,error:t}))));this._updateTracking.addPromise(i),this._strategy.prepareCacheUpdate(this._cachedObjectIds);try{r&&await i}catch(n){s(n)}this._connection.onEvent({type:"updateStrategyEnd"}),has("esri-2d-update-debug")&&console.debug(`Version[${e}] FeatureSource.updateStrategyEnd`,{strategy:t})}async _supportSnapshotMode(e,t){const{queryMetadata:s}=e,r=s.snapshotInfo;if(!r)return null;return await this._executeExceedsLimitQuery(e,t,r)?null:r}async _executeExceedsLimitQuery(e,t,s){if(!s.supportsExceedsLimit)return this._executeExceedsLimitFallbackQuery(e,t,s);try{const r=e.source,a=t.createQuery();a.inner.orderByFields=[],a.inner.returnGeometry=!1;const i=new u;i.statisticType="exceedslimit",i.maxPointCount=s.maxFeatureCount,i.maxRecordCount=s.maxFeatureCount,i.outStatisticFieldName="exceedslimit",s.maxVertexCount&&(i.maxVertexCount=s.maxVertexCount),a.inner.outStatistics=[i],a.inner.cacheHint=!0;const n=await c(r,a.inner,void 0,{query:a.customParameters}),o=n.data.features[0]?.attributes.exceedslimit;return!(0===o)}catch(r){return!0}}async _executeExceedsLimitFallbackQuery(e,t,s){if(s.maxVertexCount)return!0;const r=e.source,a=t.createQuery();a.inner.orderByFields=[],a.inner.returnGeometry=!1,a.inner.cacheHint=!0;try{return(await d(r,a.inner,{query:a.customParameters})).data.count>s.maxFeatureCount}catch(i){return!0}}}export{F as FeatureSource};
5
+ import e from"../../../../../request.js";import has from"../../../../../core/has.js";import{ignoreAbortErrors as t,throwIfNotAbortError as s}from"../../../../../core/promiseUtils.js";import{diff as r,hasRootDiffOnly as a,hasRootDiff as i}from"../../../../../core/accessorSupport/diffUtils.js";import{OptimizedFeature as n}from"../../../../../layers/graphics/OptimizedFeature.js";import{QueryEngine as o}from"../../../../../layers/graphics/data/QueryEngine.js";import{executeQuery as c,executeQueryForCount as d}from"../../../../../rest/query/operations/query.js";import u from"../../../../../rest/support/StatisticDefinition.js";import{FeatureStoreStatistics as h}from"../FeatureStoreStatistics.js";import{FeatureSourceQueryInfo as m}from"./FeatureSourceQueryInfo.js";import{StreamMessenger as p}from"./StreamMessenger.js";import{DrillDownTileLoadStrategy as l}from"./strategies/DrillDownTileLoadStrategy.js";import{PagedTileLoadStrategy as y}from"./strategies/PagedTileLoadStrategy.js";import{ParquetSnapshotLoadStrategy as _}from"./strategies/ParquetSnapshotLoadStrategy.js";import{ParquetTileLoadStrategy as g}from"./strategies/ParquetTileLoadStrategy.js";import{SnapshotLoadStrategy as f}from"./strategies/SnapshotLoadStrategy.js";import{StreamLoadStrategy as S}from"./strategies/StreamLoadStrategy.js";import{FeatureSourceChunkStore as v}from"./strategies/chunks/SourceChunkStore.js";import{FeatureMetadata as b}from"../support/FeatureMetadata.js";import{UpdateTracking2D as E}from"../../support/UpdateTracking2D.js";class F{constructor(e,t,s,r,a){this.service=e,this._aggregateAdapter=t,this._subscriptions=s,this._connection=r,this._cachedObjectIds=a,this._updateTracking=new E({debugName:"FeatureSource"}),this._didInvalidateData=!1,this._metadata=b.createFeature(e.metadata),this._store=new v(this._metadata)}destroy(){this._strategy?.destroy(),this._store.destroy(),this._streamMessenger?.destroy(),"memory"===this.service.type&&this.service.source.map(e=>e.close())}get metadata(){if(!this._metadata)throw new Error("InternalError: Metadata not defined. Was update called?");return this._metadata}get store(){return this._store}get streamMessenger(){return null==this._streamMessenger&&this._initStreamMessenger(),this._streamMessenger}get statistics(){return h.from(this._store)}get updateTracking(){return this._updateTracking}get queryEngine(){if(!this._queryEngine){if(!this._schema)return null;const{dataFilter:e}=this._schema.mutable,t=this._schema.mutable.availableFields,s=this._metadata;this._queryEngine=new o({featureStore:this._store,fieldsIndex:s.fieldsIndex,geometryType:s.geometryType,featureIdInfo:s.featureIdInfo,hasM:!1,hasZ:!1,spatialReference:this.service.outSpatialReference,aggregateAdapter:this._aggregateAdapter,timeInfo:s.timeInfo,definitionExpression:e.definitionExpression,availableFields:t})}return this._queryEngine}get isStream(){return"stream"===this._schema.type}get hasDisplayFilter(){return!!this._schema&&("displayFilterInfo"in this._schema.mutable&&null!=this._schema.mutable.displayFilterInfo)}chunks(){return Array.from(this._store.chunks())}prepareCacheUpdate(e,t){const s=new Set,r=new Set;for(const a of e)this._cachedObjectIds.has(a)||(this._cachedObjectIds.add(a),s.add(a));for(const a of t)this._cachedObjectIds.delete(a),r.add(a);this.hasDisplayFilter&&this._strategy.prepareCacheUpdate(s,r)}async applyCacheUpdate(){this.hasDisplayFilter&&await this._updateTracking.addPromise(this._strategy.applyCacheUpdate())}cleanup(){return this._store.cleanup()}onSubscribe(e){if(this._connection.onEvent({type:"subscribe",tile:e.tile.id}),!this._strategy)return;const t=this._strategy.load(e);t.then(()=>this._connection.onEvent({type:"loaded",tile:e.tile.id})).catch(t=>this._connection.onEvent({type:"error",tile:e.tile.id,error:t})),this._updateTracking.addPromise(t)}onResume(e){this._updateTracking.addPromise(t(this._strategy?.load(e)))}onUnsubscribe(e){this._connection.onEvent({type:"unsubscribe",tile:e.tile.id}),this._strategy?.unload(e)}applyOverride(e){this._didInvalidateData=!0,this._store.applyOverride(e)}takeOverrideUpdate(){return this._store.takeOverrideUpdate()}async update(e,t){const s=e.source,n=r(this._schema?.mutable,s.mutable);if(!n)return!1;if(has("esri-2d-update-debug")&&console.debug(`Version[${t}] FeatureSource.update`,{changes:n}),this._schema=s,this._queryEngine?.destroy(),this._queryEngine=null,"feature-service"===this.service.type&&null!=this.service.queryMetadata.lastEditDate&&(this._lastEditDate=this.service.queryMetadata.lastEditDate),null==this._streamMessenger&&"stream"===this._schema.type&&this._initStreamMessenger(),a(n,"sourceRefreshVersion")&&this._strategy?.refresh)return this._strategy.refresh();if(("feature"===s.type||"parquet"===s.type)&&a(n,"availableFields")){if(await this._queryLastEditDateChanged()||this._didInvalidateData)this._didInvalidateData=!1,await this._updateStrategy(t);else{this._connection.onEvent({type:"updateFieldsStart"});try{await this._strategy.updateFields(s.mutable.availableFields),this._connection.onEvent({type:"updateFieldsEnd"})}catch(o){this._connection.onEvent({type:"updateFieldsError",error:o})}}return!1}return!!(i(n,"dataFilter")||i(n,"sourceRefreshVersion")||this._strategy.about.supportsDisplayFilter&&i(n,"displayFilterInfo"))&&(await this._updateStrategy(t),!0)}async addParquetFile(e){await this._strategy.addParquetFile(e)}unsafeSetQueryHistoricMoment(e){"feature"===this._schema.type&&(this._schema.mutable.dataFilter.historicMoment=e,this._strategy.unsafeSetQueryHistoricMoment(new Date(e)))}_initStreamMessenger(){null==this._streamMessenger&&(this._streamMessenger=new p(this._connection))}async normalizeOverrides(e){const t={historicMoment:e.historicMoment,commands:{updateWeak:e.commands.updateWeak.map(n.fromJSON),removeWeak:e.commands.removeWeak,update:e.commands.update.map(n.fromJSON),remove:e.commands.remove,release:e.commands.release}},s=e.commands.updateByIdWeak,r=await this._queryOptimizedFeatures(s);return t.commands.updateWeak.push(...r),t}async _queryOptimizedFeatures(e){if(0===e.length)return[];const t=[],s=(await this._strategy.queryByObjectId(e)).getCursor();for(;s.next();)t.push(s.readOptimizedFeatureWorldSpace());return t}getObjectIdsFromGlobalIds(e){const t=this.metadata.globalIdField;if(null==t)throw new Error("InternalError: Recieved an edit with globalIds, but not supported by the service");const s=this._store.mapObjectIdsFromGlobalIds(e,t).values();return Array.from(s)}async _queryLastEditDateChanged(){if(null==this._lastEditDate)return!1;const t=this.service.source,s={...t.query,f:"json"},r=(await e(t.path,{query:s,responseType:"json"})).data.editingInfo.lastEditDate;return r!==this._lastEditDate&&(this._lastEditDate=r,!0)}async _createStrategy(){const e="isSourceHosted"in this.service&&this.service.isSourceHosted,t=Array.isArray(this.service.source),s=this.service.source&&"collection"in this.service.source,r=e||t||s;if("stream"===this._schema.type){const e=new S(this.service,this._schema.mutable.dataFilter,this._store,{outSR:this.service.outSpatialReference},this.metadata);return this._streamMessenger.strategy=e,e}if("parquet"===this._schema.type){const e=this.service;return null!=e.geometryInfo.displayOptimization?new g(e,this._metadata,this._schema,this._store):new _(e,this._metadata,this._schema,this._store)}const a=this.service,i=m.fromSchema(a,this._schema,this._metadata),n=await this._supportSnapshotMode(a,i);return n?new f(a,i,this._store,n,this.metadata,this._connection):r?new y(a,i,this._store,this.metadata,this._connection):new l(a,i,this._store,this.metadata,this._connection)}async _updateStrategy(e){const t=await this._createStrategy();this._connection.onEvent({type:"updateStrategyStart",about:t.about});const r=!!this._strategy;this._store.clear(),this._strategy?.destroy(),this._strategy=t,has("esri-2d-update-debug")&&console.debug(`Version[${e}] FeatureSource.updateStrategy`,{strategy:t});const a=Array.from(this._subscriptions.values());if(!a.length)return void this._connection.onEvent({type:"updateStrategyEnd"});const i=Promise.all(a.map(e=>this._strategy.load(e).then(()=>this._connection.onEvent({type:"loaded",tile:e.tile.id})).catch(t=>this._connection.onEvent({type:"error",tile:e.tile.id,error:t}))));this._updateTracking.addPromise(i),this._strategy.prepareCacheUpdate(this._cachedObjectIds);try{r&&await i}catch(n){s(n)}this._connection.onEvent({type:"updateStrategyEnd"}),has("esri-2d-update-debug")&&console.debug(`Version[${e}] FeatureSource.updateStrategyEnd`,{strategy:t})}async _supportSnapshotMode(e,t){const{queryMetadata:s}=e,r=s.snapshotInfo;if(!r)return null;return await this._executeExceedsLimitQuery(e,t,r)?null:r}async _executeExceedsLimitQuery(e,t,s){if(!s.supportsExceedsLimit)return this._executeExceedsLimitFallbackQuery(e,t,s);try{const r=e.source,a=t.createQuery();a.inner.orderByFields=[],a.inner.returnGeometry=!1;const i=new u;i.statisticType="exceedslimit",i.maxPointCount=s.maxFeatureCount,i.maxRecordCount=s.maxFeatureCount,i.outStatisticFieldName="exceedslimit",s.maxVertexCount&&(i.maxVertexCount=s.maxVertexCount),a.inner.outStatistics=[i],a.inner.cacheHint=!0;const n=await c(r,a.inner,void 0,{query:a.customParameters}),o=n.data.features[0]?.attributes.exceedslimit;return!(0===o)}catch(r){return!0}}async _executeExceedsLimitFallbackQuery(e,t,s){if(s.maxVertexCount)return!0;const r=e.source,a=t.createQuery();a.inner.orderByFields=[],a.inner.returnGeometry=!1,a.inner.cacheHint=!0;try{return(await d(r,a.inner,{query:a.customParameters})).data.count>s.maxFeatureCount}catch(i){return!0}}}export{F as FeatureSource};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import"../../../core/has.js";import{abortMaybe as s,destroyMaybe as r}from"../../../core/maybe.js";import{property as a}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as i}from"../../../core/accessorSupport/decorators/subclass.js";import{getDefaultUnitForView as o}from"../../../support/getDefaultUnitForView.js";import{AnalysisView3D as n}from"./AnalysisView3D.js";import{AreaMeasurementController as l}from"./AreaMeasurement/support/AreaMeasurementController.js";import{AreaMeasurement3DPathHelper as p}from"./AreaMeasurement/support/AreaMeasurementPathHelper.js";import{AreaMeasurementVisualization as u}from"./AreaMeasurement/support/AreaMeasurementVisualization.js";import{toPreferredLengthUnit as m,toPreferredAreaUnit as y}from"./AreaMeasurement/support/utils.js";import d from"../interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js";import{connectAnalysisViewToTool as h,removeAnalysisViewTool as c,startPlaceOperation as g}from"../../analysis/analysisViewUtils.js";import{loadGeodesicAreaMeasurementUtils as v}from"../../support/geodesicAreaMeasurementUtils.js";import{loadGeodesicLengthMeasurementUtils as M}from"../../support/geodesicLengthMeasurementUtils.js";let f=class extends(n(t)){constructor(e){super(e),this.type="area-measurement-view-3d",this.analysis=null,this.measurementData=null,this.lastDraggedVertex=null,this.stagedPoint=null,this.mode=0,this.tool=null,this.userOperation=null}initialize(){const{analysis:e,view:t}=this;this.path=new p({view:t,areaMeasurement:e}),this._analysisVisualization=new u({view:t,analysis:e,analysisViewData:this}),this.addResolvingPromise(Promise.all([v(),M()]).then(([s,r])=>{this.destroyed||(this._analysisController=new l({view:t,analysis:e,analysisViewData:this,geodesicAreaMeasurementUtils:s,geodesicLengthMeasurementUtils:r}))})),this.addHandles(h(this,d))}destroy(){c(this),this.userOperation=s(this.userOperation),this._analysisController=r(this._analysisController),this._analysisVisualization=r(this._analysisVisualization),this.path.destroy()}get updating(){return!!this._analysisVisualization?.loadingMessages}get result(){const{measurementData:e}=this;if(null==e)return{area:null,mode:null,perimeter:null};const{unit:t}=this;if("euclidean"===e.actualMeasurementMode){const{area:s,perimeterLength:r}=e;return{area:null!=s?y(s,t):null,perimeter:null!=r?m(r,t):null,mode:"euclidean"}}const{geodesicArea:s,pathLength:r}=e;return{area:null!=s?y(s,t):null,perimeter:null!=r?m(r,t):null,mode:"geodesic"}}get viewData(){return this._analysisVisualization.viewData}get areaLabel(){return this._analysisVisualization.areaLabel}get perimeterLengthLabel(){return this._analysisVisualization.perimeterLengthLabel}get validMeasurement(){return this.path.isValidPolygon}get unit(){return this.analysis.unit??o(this.view)}get testData(){}place(e){return g(this,{placementOptions:e})}};e([a()],f.prototype,"_analysisVisualization",void 0),e([a()],f.prototype,"_analysisController",void 0),e([a({readOnly:!0})],f.prototype,"type",void 0),e([a({constructOnly:!0,nonNullable:!0})],f.prototype,"analysis",void 0),e([a()],f.prototype,"updating",null),e([a()],f.prototype,"result",null),e([a()],f.prototype,"measurementData",void 0),e([a()],f.prototype,"viewData",null),e([a()],f.prototype,"areaLabel",null),e([a()],f.prototype,"perimeterLengthLabel",null),e([a()],f.prototype,"validMeasurement",null),e([a()],f.prototype,"path",void 0),e([a()],f.prototype,"lastDraggedVertex",void 0),e([a()],f.prototype,"stagedPoint",void 0),e([a()],f.prototype,"mode",void 0),e([a()],f.prototype,"unit",null),e([a()],f.prototype,"tool",void 0),e([a()],f.prototype,"userOperation",void 0),f=e([i("esri.views.3d.analysis.AreaMeasurementAnalysisView3D")],f);const w=f;export{w as default};
5
+ import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import"../../../core/has.js";import{abortMaybe as s,destroyMaybe as r}from"../../../core/maybe.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as a}from"../../../core/accessorSupport/decorators/subclass.js";import{getDefaultUnitForView as o}from"../../../support/getDefaultUnitForView.js";import{AnalysisView3D as n}from"./AnalysisView3D.js";import{AreaMeasurementController as l}from"./AreaMeasurement/support/AreaMeasurementController.js";import{AreaMeasurement3DPathHelper as u}from"./AreaMeasurement/support/AreaMeasurementPathHelper.js";import{AreaMeasurementVisualization as p}from"./AreaMeasurement/support/AreaMeasurementVisualization.js";import{toPreferredLengthUnit as m,toPreferredAreaUnit as y}from"./AreaMeasurement/support/utils.js";import d from"../interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js";import{connectAnalysisViewToTool as h,removeAnalysisViewTool as c,startPlaceOperation as g}from"../../analysis/analysisViewUtils.js";import{loadGeodesicAreaMeasurementUtils as v}from"../../support/geodesicAreaMeasurementUtils.js";import{loadGeodesicLengthMeasurementUtils as M}from"../../support/geodesicLengthMeasurementUtils.js";let f=class extends(n(t)){constructor(e){super(e),this.type="area-measurement-view-3d",this.analysis=null,this.measurementData=null,this.lastDraggedVertex=null,this.stagedPoint=null,this.mode=0,this.tool=null,this.userOperation=null}initialize(){const{analysis:e,view:t}=this;this.path=new u({view:t,areaMeasurement:e}),this._analysisVisualization=new p({view:t,analysis:e,analysisViewData:this}),this.addResolvingPromise(Promise.all([v(),M()]).then(([s,r])=>{this.destroyed||(this._analysisController=new l({view:t,analysis:e,analysisViewData:this,geodesicAreaMeasurementUtils:s,geodesicLengthMeasurementUtils:r}))})),this.addHandles(h(this,d))}destroy(){c(this),this.userOperation=s(this.userOperation),this._analysisController=r(this._analysisController),this._analysisVisualization=r(this._analysisVisualization),this.path.destroy()}get visible(){return super.visible}set visible(e){super.visible=e}get interactive(){return super.interactive}set interactive(e){super.interactive=e}get updating(){return!!this._analysisVisualization?.loadingMessages}get result(){const{measurementData:e}=this;if(null==e)return{area:null,mode:null,perimeter:null};const{unit:t}=this;if("euclidean"===e.actualMeasurementMode){const{area:s,perimeterLength:r}=e;return{area:null!=s?y(s,t):null,perimeter:null!=r?m(r,t):null,mode:"euclidean"}}const{geodesicArea:s,pathLength:r}=e;return{area:null!=s?y(s,t):null,perimeter:null!=r?m(r,t):null,mode:"geodesic"}}get viewData(){return this._analysisVisualization.viewData}get areaLabel(){return this._analysisVisualization.areaLabel}get perimeterLengthLabel(){return this._analysisVisualization.perimeterLengthLabel}get validMeasurement(){return this.path.isValidPolygon}get unit(){return this.analysis.unit??o(this.view)}get testData(){}place(e){return g(this,{placementOptions:e})}};e([i()],f.prototype,"_analysisVisualization",void 0),e([i()],f.prototype,"_analysisController",void 0),e([i({readOnly:!0})],f.prototype,"type",void 0),e([i({constructOnly:!0,nonNullable:!0})],f.prototype,"analysis",void 0),e([i()],f.prototype,"updating",null),e([i()],f.prototype,"result",null),e([i()],f.prototype,"measurementData",void 0),e([i()],f.prototype,"viewData",null),e([i()],f.prototype,"areaLabel",null),e([i()],f.prototype,"perimeterLengthLabel",null),e([i()],f.prototype,"validMeasurement",null),e([i()],f.prototype,"path",void 0),e([i()],f.prototype,"lastDraggedVertex",void 0),e([i()],f.prototype,"stagedPoint",void 0),e([i()],f.prototype,"mode",void 0),e([i()],f.prototype,"unit",null),e([i()],f.prototype,"tool",void 0),e([i()],f.prototype,"userOperation",void 0),f=e([a("esri.views.3d.analysis.AreaMeasurementAnalysisView3D")],f);const w=f;export{w as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as i}from"tslib";import t from"../../../core/Accessor.js";import{destroyHandle as o}from"../../../core/handleUtils.js";import"../../../core/has.js";import s from"../../../core/Logger.js";import{mapCollection as e}from"../../../core/mapCollectionUtils.js";import{abortMaybe as n,destroyMaybe as r}from"../../../core/maybe.js";import{property as a}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/RandomLCG.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";import{AnalysisView3D as p}from"./AnalysisView3D.js";import{DimensionController as m}from"./Dimension/DimensionController.js";import{DimensionTool as u}from"./Dimension/DimensionTool.js";import{DimensionVisualization as c}from"./Dimension/DimensionVisualization.js";import{LengthDimensionComputation as d}from"./Dimension/LengthDimensionComputation.js";import{applyProjectionAndElevationAlignment as h,logFailedGeometryProjectionError as y}from"./support/projectionUtils.js";import{connectAnalysisViewToTool as g,removeAnalysisViewTool as v,startPlaceOperation as j}from"../../analysis/analysisViewUtils.js";import{loadAutomaticLengthMeasurementUtils as D}from"../../support/automaticLengthMeasurementUtils.js";let f=class extends(p(t)){constructor(i){super(i),this.type="dimension-view-3d",this.analysis=null,this.tool=null,this.selectedDimension=null,this.userOperation=null,this._dimensionsToComputations=new Map,this._projectAndAlignPoint=null}initialize(){this._projectAndAlignPoint=i=>{if(null==i)return null;const{spatialReference:t,elevationProvider:o}=this.view,e=h(i,t,o);return null==e&&y(this.analysis,i.spatialReference,s.getLogger(this)),e};const i=e(()=>this.analysis.dimensions,i=>this._createComputation(i));this.computations=i,this.addHandles([g(this,u),o(i)]),this._analysisVisualization=new c({analysisViewData:this,view:this.view,isDecoration:!this.parent}),this.addResolvingPromise(D().then(i=>{this._analysisController=new m({analysisViewData:this,view:this.view,automaticLengthMeasurementUtils:i})}))}destroy(){this.userOperation=n(this.userOperation),v(this),this._analysisVisualization=r(this._analysisVisualization)}get updating(){return this._analysisVisualization?.loadingMessages??!1}get results(){return this.analysis.dimensions.map(i=>this._dimensionsToComputations.get(i).result)}get selectedComputation(){const{selectedDimension:i}=this;return null==i?null:this._dimensionsToComputations.get(i)}get testInfo(){}async createLengthDimensions(i){this.selectedDimension=null,await j(this,{placementOptions:i,onToolActivated:i=>i.place("multiple")})}place(i){return this.selectedDimension=null,j(this,{placementOptions:i,onToolActivated:i=>i.place("single")})}_createComputation(i){const{_dimensionsToComputations:t}=this,o=new d({dimension:i,projectAndAlignPoint:this._projectAndAlignPoint});return t.set(i,o),{computation:o,remove:()=>this._removeComputation(o)}}_removeComputation(i){const{dimension:t}=i;t===this.selectedDimension&&(this.selectedDimension=null),this._dimensionsToComputations.delete(t),i.destroy()}};i([a({readOnly:!0})],f.prototype,"type",void 0),i([a({constructOnly:!0,nonNullable:!0})],f.prototype,"analysis",void 0),i([a()],f.prototype,"tool",void 0),i([a()],f.prototype,"updating",null),i([a({readOnly:!0})],f.prototype,"results",null),i([a()],f.prototype,"computations",void 0),i([a()],f.prototype,"selectedDimension",void 0),i([a()],f.prototype,"selectedComputation",null),i([a()],f.prototype,"userOperation",void 0),i([a()],f.prototype,"_analysisVisualization",void 0),i([a()],f.prototype,"_analysisController",void 0),i([a()],f.prototype,"_dimensionsToComputations",void 0),f=i([l("esri.views.3d.analysis.DimensionAnalysisView3D")],f);const _=f;export{_ as default};
5
+ import{__decorate as i}from"tslib";import t from"../../../core/Accessor.js";import{destroyHandle as s}from"../../../core/handleUtils.js";import"../../../core/has.js";import e from"../../../core/Logger.js";import{mapCollection as o}from"../../../core/mapCollectionUtils.js";import{abortMaybe as n,destroyMaybe as r}from"../../../core/maybe.js";import{property as a}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/RandomLCG.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";import{AnalysisView3D as p}from"./AnalysisView3D.js";import{DimensionController as m}from"./Dimension/DimensionController.js";import{DimensionTool as u}from"./Dimension/DimensionTool.js";import{DimensionVisualization as c}from"./Dimension/DimensionVisualization.js";import{LengthDimensionComputation as d}from"./Dimension/LengthDimensionComputation.js";import{applyProjectionAndElevationAlignment as h,logFailedGeometryProjectionError as y}from"./support/projectionUtils.js";import{connectAnalysisViewToTool as v,removeAnalysisViewTool as g,startPlaceOperation as j}from"../../analysis/analysisViewUtils.js";import{loadAutomaticLengthMeasurementUtils as D}from"../../support/automaticLengthMeasurementUtils.js";let f=class extends(p(t)){constructor(i){super(i),this.type="dimension-view-3d",this.analysis=null,this.tool=null,this.selectedDimension=null,this.userOperation=null,this._dimensionsToComputations=new Map,this._projectAndAlignPoint=null}initialize(){this._projectAndAlignPoint=i=>{if(null==i)return null;const{spatialReference:t,elevationProvider:s}=this.view,o=h(i,t,s);return null==o&&y(this.analysis,i.spatialReference,e.getLogger(this)),o};const i=o(()=>this.analysis.dimensions,i=>this._createComputation(i));this.computations=i,this.addHandles([v(this,u),s(i)]),this._analysisVisualization=new c({analysisViewData:this,view:this.view,isDecoration:!this.parent}),this.addResolvingPromise(D().then(i=>{this._analysisController=new m({analysisViewData:this,view:this.view,automaticLengthMeasurementUtils:i})}))}destroy(){this.userOperation=n(this.userOperation),g(this),this._analysisVisualization=r(this._analysisVisualization)}get visible(){return super.visible}set visible(i){super.visible=i}get interactive(){return super.interactive}set interactive(i){super.interactive=i}get updating(){return this._analysisVisualization?.loadingMessages??!1}get results(){return this.analysis.dimensions.map(i=>this._dimensionsToComputations.get(i).result)}get selectedComputation(){const{selectedDimension:i}=this;return null==i?null:this._dimensionsToComputations.get(i)}get testInfo(){}async createLengthDimensions(i){this.selectedDimension=null,await j(this,{placementOptions:i,onToolActivated:i=>i.place("multiple")})}place(i){return this.selectedDimension=null,j(this,{placementOptions:i,onToolActivated:i=>i.place("single")})}_createComputation(i){const{_dimensionsToComputations:t}=this,s=new d({dimension:i,projectAndAlignPoint:this._projectAndAlignPoint});return t.set(i,s),{computation:s,remove:()=>this._removeComputation(s)}}_removeComputation(i){const{dimension:t}=i;t===this.selectedDimension&&(this.selectedDimension=null),this._dimensionsToComputations.delete(t),i.destroy()}};i([a({readOnly:!0})],f.prototype,"type",void 0),i([a({constructOnly:!0,nonNullable:!0})],f.prototype,"analysis",void 0),i([a()],f.prototype,"tool",void 0),i([a()],f.prototype,"updating",null),i([a({readOnly:!0})],f.prototype,"results",null),i([a()],f.prototype,"computations",void 0),i([a()],f.prototype,"selectedDimension",void 0),i([a()],f.prototype,"selectedComputation",null),i([a()],f.prototype,"userOperation",void 0),i([a()],f.prototype,"_analysisVisualization",void 0),i([a()],f.prototype,"_analysisController",void 0),i([a()],f.prototype,"_dimensionsToComputations",void 0),f=i([l("esri.views.3d.analysis.DimensionAnalysisView3D")],f);const _=f;export{_ as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import e from"../../../core/Accessor.js";import"../../../core/has.js";import{abortMaybe as i,destroyMaybe as s}from"../../../core/maybe.js";import{property as a}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";import{getDefaultUnitForView as o}from"../../../support/getDefaultUnitForView.js";import{AnalysisView3D as n}from"./AnalysisView3D.js";import{DirectLineMeasurementController as r}from"./DirectLineMeasurement/DirectLineMeasurementController.js";import{DirectLineMeasurementVisualization as u}from"./DirectLineMeasurement/DirectLineMeasurementVisualization.js";import p from"../interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js";import{connectAnalysisViewToTool as y,removeAnalysisViewTool as h,startPlaceOperation as m}from"../../analysis/analysisViewUtils.js";import{loadGeodesicLengthMeasurementUtils as d}from"../../support/geodesicLengthMeasurementUtils.js";let c=class extends(n(e)){constructor(t){super(t),this.type="direct-line-measurement-view-3d",this.analysis=null,this.tool=null,this.result=null,this.measurementMode=0,this.elevationAlignedStartPoint=null,this.elevationAlignedEndPoint=null,this.userOperation=null}initialize(){const{analysis:t,view:e}=this;this._analysisVisualization=new u({view:e,analysis:t,analysisView:this}),this.addResolvingPromise(d().then(i=>{this.destroyed||(this._analysisController=new r({view:e,analysis:t,viewData:this,geodesicLengthMeasurementUtils:i}))})),this.addHandles(y(this,p))}destroy(){h(this),this.userOperation=i(this.userOperation),this._analysisController=s(this._analysisController),this._analysisVisualization=s(this._analysisVisualization)}get updating(){return!!this._analysisVisualization?.loadingMessages}get viewMode(){return this._analysisVisualization.viewMode}get actualVisualizedMeasurement(){return this._analysisVisualization.actualVisualizedMeasurement}get visualElementOrientation(){return this._analysisVisualization.visualElementOrientation}set visualElementOrientation(t){this._analysisVisualization.visualElementOrientation=t}get allowVisualElementsOrientationChange(){return this._analysisVisualization.allowVisualElementsOrientationChange}set allowVisualElementsOrientationChange(t){this._analysisVisualization.allowVisualElementsOrientationChange=t}get triangleCollapseRatioThreshold(){return this._analysisVisualization.triangleCollapseRatioThreshold}set triangleCollapseRatioThreshold(t){this._analysisVisualization.triangleCollapseRatioThreshold=t}get directLabelText(){return this._analysisVisualization.labels.direct?.text??""}get horizontalLabelText(){return this._analysisVisualization.labels.horizontal?.text??""}get verticalLabelText(){return this._analysisVisualization.labels.vertical?.text??""}get unit(){return this.analysis.unit??o(this.view)}get testData(){}place(t){return m(this,{placementOptions:t})}};t([a()],c.prototype,"_analysisVisualization",void 0),t([a()],c.prototype,"_analysisController",void 0),t([a()],c.prototype,"updating",null),t([a({readOnly:!0})],c.prototype,"type",void 0),t([a({constructOnly:!0,nonNullable:!0})],c.prototype,"analysis",void 0),t([a()],c.prototype,"tool",void 0),t([a()],c.prototype,"result",void 0),t([a()],c.prototype,"measurementMode",void 0),t([a()],c.prototype,"elevationAlignedStartPoint",void 0),t([a()],c.prototype,"elevationAlignedEndPoint",void 0),t([a({readOnly:!0})],c.prototype,"viewMode",null),t([a({readOnly:!0})],c.prototype,"actualVisualizedMeasurement",null),t([a()],c.prototype,"visualElementOrientation",null),t([a()],c.prototype,"allowVisualElementsOrientationChange",null),t([a()],c.prototype,"triangleCollapseRatioThreshold",null),t([a({readOnly:!0})],c.prototype,"directLabelText",null),t([a({readOnly:!0})],c.prototype,"horizontalLabelText",null),t([a({readOnly:!0})],c.prototype,"verticalLabelText",null),t([a()],c.prototype,"unit",null),t([a()],c.prototype,"userOperation",void 0),c=t([l("esri.views.3d.analysis.DirectLineMeasurementAnalysisView3D")],c);const g=c;export{g as default};
5
+ import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import"../../../core/has.js";import{abortMaybe as i,destroyMaybe as s}from"../../../core/maybe.js";import{property as a}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";import{getDefaultUnitForView as n}from"../../../support/getDefaultUnitForView.js";import{AnalysisView3D as o}from"./AnalysisView3D.js";import{DirectLineMeasurementController as r}from"./DirectLineMeasurement/DirectLineMeasurementController.js";import{DirectLineMeasurementVisualization as u}from"./DirectLineMeasurement/DirectLineMeasurementVisualization.js";import p from"../interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js";import{connectAnalysisViewToTool as y,removeAnalysisViewTool as h,startPlaceOperation as m}from"../../analysis/analysisViewUtils.js";import{loadGeodesicLengthMeasurementUtils as d}from"../../support/geodesicLengthMeasurementUtils.js";let c=class extends(o(t)){constructor(e){super(e),this.type="direct-line-measurement-view-3d",this.analysis=null,this.tool=null,this.result=null,this.measurementMode=0,this.elevationAlignedStartPoint=null,this.elevationAlignedEndPoint=null,this.userOperation=null}initialize(){const{analysis:e,view:t}=this;this._analysisVisualization=new u({view:t,analysis:e,analysisView:this}),this.addResolvingPromise(d().then(i=>{this.destroyed||(this._analysisController=new r({view:t,analysis:e,viewData:this,geodesicLengthMeasurementUtils:i}))})),this.addHandles(y(this,p))}destroy(){h(this),this.userOperation=i(this.userOperation),this._analysisController=s(this._analysisController),this._analysisVisualization=s(this._analysisVisualization)}get updating(){return!!this._analysisVisualization?.loadingMessages}get visible(){return super.visible}set visible(e){super.visible=e}get interactive(){return super.interactive}set interactive(e){super.interactive=e}get viewMode(){return this._analysisVisualization.viewMode}get actualVisualizedMeasurement(){return this._analysisVisualization.actualVisualizedMeasurement}get visualElementOrientation(){return this._analysisVisualization.visualElementOrientation}set visualElementOrientation(e){this._analysisVisualization.visualElementOrientation=e}get allowVisualElementsOrientationChange(){return this._analysisVisualization.allowVisualElementsOrientationChange}set allowVisualElementsOrientationChange(e){this._analysisVisualization.allowVisualElementsOrientationChange=e}get triangleCollapseRatioThreshold(){return this._analysisVisualization.triangleCollapseRatioThreshold}set triangleCollapseRatioThreshold(e){this._analysisVisualization.triangleCollapseRatioThreshold=e}get directLabelText(){return this._analysisVisualization.labels.direct?.text??""}get horizontalLabelText(){return this._analysisVisualization.labels.horizontal?.text??""}get verticalLabelText(){return this._analysisVisualization.labels.vertical?.text??""}get unit(){return this.analysis.unit??n(this.view)}get testData(){}place(e){return m(this,{placementOptions:e})}};e([a()],c.prototype,"_analysisVisualization",void 0),e([a()],c.prototype,"_analysisController",void 0),e([a()],c.prototype,"updating",null),e([a({readOnly:!0})],c.prototype,"type",void 0),e([a({constructOnly:!0,nonNullable:!0})],c.prototype,"analysis",void 0),e([a()],c.prototype,"tool",void 0),e([a()],c.prototype,"result",void 0),e([a()],c.prototype,"measurementMode",void 0),e([a()],c.prototype,"elevationAlignedStartPoint",void 0),e([a()],c.prototype,"elevationAlignedEndPoint",void 0),e([a({readOnly:!0})],c.prototype,"viewMode",null),e([a({readOnly:!0})],c.prototype,"actualVisualizedMeasurement",null),e([a()],c.prototype,"visualElementOrientation",null),e([a()],c.prototype,"allowVisualElementsOrientationChange",null),e([a()],c.prototype,"triangleCollapseRatioThreshold",null),e([a({readOnly:!0})],c.prototype,"directLabelText",null),e([a({readOnly:!0})],c.prototype,"horizontalLabelText",null),e([a({readOnly:!0})],c.prototype,"verticalLabelText",null),e([a()],c.prototype,"unit",null),e([a()],c.prototype,"userOperation",void 0),c=e([l("esri.views.3d.analysis.DirectLineMeasurementAnalysisView3D")],c);const v=c;export{v as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as o}from"tslib";import r from"../../../core/Accessor.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as e}from"../../../core/accessorSupport/decorators/subclass.js";import{AnalysisView3D as t}from"./AnalysisView3D.js";let l=class extends(t(r)){constructor(o){super(o),this.type="elevation-profile-view-3d",this.analysis=null}get results(){return[]}};o([s({readOnly:!0})],l.prototype,"type",void 0),o([s({constructOnly:!0,nonNullable:!0})],l.prototype,"analysis",void 0),o([s({readOnly:!0,nonNullable:!0})],l.prototype,"results",null),l=o([e("esri.views.3d.analysis.ElevationProfileAnalysisView3D")],l);const i=l;export{i as default};
5
+ import{__decorate as e}from"tslib";import r from"../../../core/Accessor.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as t}from"../../../core/accessorSupport/decorators/subclass.js";import{AnalysisView3D as o}from"./AnalysisView3D.js";let i=class extends(o(r)){constructor(e){super(e),this.type="elevation-profile-view-3d",this.analysis=null}get visible(){return super.visible}set visible(e){super.visible=e}get interactive(){return super.interactive}set interactive(e){super.interactive=e}get results(){return[]}};e([s({readOnly:!0})],i.prototype,"type",void 0),e([s({constructOnly:!0,nonNullable:!0})],i.prototype,"analysis",void 0),e([s({readOnly:!0,nonNullable:!0})],i.prototype,"results",null),i=e([t("esri.views.3d.analysis.ElevationProfileAnalysisView3D")],i);const l=i;export{l as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import i from"../../../core/Collection.js";import{EventedAccessor as s}from"../../../core/Evented.js";import"../../../core/has.js";import{abortMaybe as o,destroyMaybe as r}from"../../../core/maybe.js";import{property as e}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as a}from"../../../core/accessorSupport/decorators/subclass.js";import{create as n}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{AnalysisView3D as l}from"./AnalysisView3D.js";import{LineOfSightController as p}from"./LineOfSight/LineOfSightController.js";import{LineOfSightTool as y}from"./LineOfSight/LineOfSightTool.js";import{LineOfSightVisualization as u}from"./LineOfSight/LineOfSightVisualization.js";import{connectAnalysisViewToTool as h,removeAnalysisViewTool as c,startPlaceOperation as m}from"../../analysis/analysisViewUtils.js";let d=class extends(l(s)){constructor(t){super(t),this.type="line-of-sight-view-3d",this.analysis=null,this.tool=null,this.computations=new i,this.cursorTarget=null,this.editable=!0,this.elevationAlignedObserver=null,this.observerEngineLocation=n(),this.userOperation=null}initialize(){const t=this.view,i=this.analysis;this._analysisController=new p({analysis:i,analysisViewData:this,view:t}),this._analysisVisualization=new u({analysis:i,analysisViewData:this,view:t,isDecoration:!this.parent}),this.addHandles([this._analysisController.on("result-changed",t=>{t.target!==this.cursorTarget&&this.emit("result-changed",t)}),h(this,y)])}destroy(){c(this),this.userOperation=o(this.userOperation),this._analysisController=r(this._analysisController),this._analysisVisualization=r(this._analysisVisualization)}get results(){return this.computations.map(t=>t.result)}get priority(){return this._analysisController.priority}set priority(t){this._analysisController.priority=t}get updating(){return null!=this._analysisController&&this._analysisController.updating||null!=this._analysisVisualization&&this._analysisVisualization.updating}place(t){return m(this,{placementOptions:t})}getResultForTarget(t){return this.computations.find(i=>i.target===t)?.result}get testInfo(){}};t([e({readOnly:!0})],d.prototype,"type",void 0),t([e({constructOnly:!0,nonNullable:!0})],d.prototype,"analysis",void 0),t([e()],d.prototype,"tool",void 0),t([e({readOnly:!0})],d.prototype,"results",null),t([e()],d.prototype,"priority",null),t([e()],d.prototype,"computations",void 0),t([e()],d.prototype,"cursorTarget",void 0),t([e()],d.prototype,"editable",void 0),t([e()],d.prototype,"elevationAlignedObserver",void 0),t([e()],d.prototype,"observerEngineLocation",void 0),t([e()],d.prototype,"updating",null),t([e()],d.prototype,"userOperation",void 0),t([e()],d.prototype,"_analysisController",void 0),t([e()],d.prototype,"_analysisVisualization",void 0),d=t([a("esri.views.3d.analysis.LineOfSightAnalysisView3D")],d);const g=d;export{g as default};
5
+ import{__decorate as t}from"tslib";import i from"../../../core/Collection.js";import{EventedAccessor as s}from"../../../core/Evented.js";import"../../../core/has.js";import{abortMaybe as o,destroyMaybe as e}from"../../../core/maybe.js";import{property as r}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as a}from"../../../core/accessorSupport/decorators/subclass.js";import{create as n}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{AnalysisView3D as l}from"./AnalysisView3D.js";import{LineOfSightController as p}from"./LineOfSight/LineOfSightController.js";import{LineOfSightTool as u}from"./LineOfSight/LineOfSightTool.js";import{LineOfSightVisualization as y}from"./LineOfSight/LineOfSightVisualization.js";import{connectAnalysisViewToTool as h,removeAnalysisViewTool as c,startPlaceOperation as m}from"../../analysis/analysisViewUtils.js";let d=class extends(l(s)){constructor(t){super(t),this.type="line-of-sight-view-3d",this.analysis=null,this.tool=null,this.computations=new i,this.cursorTarget=null,this.editable=!0,this.elevationAlignedObserver=null,this.observerEngineLocation=n(),this.userOperation=null}initialize(){const t=this.view,i=this.analysis;this._analysisController=new p({analysis:i,analysisViewData:this,view:t}),this._analysisVisualization=new y({analysis:i,analysisViewData:this,view:t,isDecoration:!this.parent}),this.addHandles([this._analysisController.on("result-changed",t=>{t.target!==this.cursorTarget&&this.emit("result-changed",t)}),h(this,u)])}destroy(){c(this),this.userOperation=o(this.userOperation),this._analysisController=e(this._analysisController),this._analysisVisualization=e(this._analysisVisualization)}get visible(){return super.visible}set visible(t){super.visible=t}get interactive(){return super.interactive}set interactive(t){super.interactive=t}get results(){return this.computations.map(t=>t.result)}get priority(){return this._analysisController.priority}set priority(t){this._analysisController.priority=t}get updating(){return null!=this._analysisController&&this._analysisController.updating||null!=this._analysisVisualization&&this._analysisVisualization.updating}place(t){return m(this,{placementOptions:t})}getResultForTarget(t){return this.computations.find(i=>i.target===t)?.result}get testInfo(){}};t([r({readOnly:!0})],d.prototype,"type",void 0),t([r({constructOnly:!0,nonNullable:!0})],d.prototype,"analysis",void 0),t([r()],d.prototype,"tool",void 0),t([r({readOnly:!0})],d.prototype,"results",null),t([r()],d.prototype,"priority",null),t([r()],d.prototype,"computations",void 0),t([r()],d.prototype,"cursorTarget",void 0),t([r()],d.prototype,"editable",void 0),t([r()],d.prototype,"elevationAlignedObserver",void 0),t([r()],d.prototype,"observerEngineLocation",void 0),t([r()],d.prototype,"updating",null),t([r()],d.prototype,"userOperation",void 0),t([r()],d.prototype,"_analysisController",void 0),t([r()],d.prototype,"_analysisVisualization",void 0),d=t([a("esri.views.3d.analysis.LineOfSightAnalysisView3D")],d);const g=d;export{g as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as i}from"tslib";import s from"../../../core/Accessor.js";import"../../../core/has.js";import{destroyMaybe as t}from"../../../core/maybe.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as a}from"../../../core/accessorSupport/decorators/subclass.js";import{AnalysisView3D as e}from"./AnalysisView3D.js";import{SliceController as l}from"./Slice/SliceController.js";import r from"./Slice/SliceTool.js";import{SliceVisualization as n}from"./Slice/SliceVisualization.js";import{connectAnalysisViewToTool as p,removeAnalysisViewTool as y,startPlaceOperation as c,startExclusiveInteractiveOperation as h}from"../../analysis/analysisViewUtils.js";let u=class extends(e(s)){constructor(i){super(i),this.type="slice-view-3d",this.analysis=null,this.tool=null,this.plane=null,this.active=!0,this.userOperation=null,this._analysisVisualization=null,this._analysisController=null}initialize(){this._analysisVisualization=new n({view:this.view,analysis:this.analysis,analysisViewData:this}),this._analysisController=new l({view:this.view,analysis:this.analysis,analysisViewData:this}),this.addHandles(p(this,r))}destroy(){y(this),this._analysisVisualization=t(this._analysisVisualization),this._analysisController=t(this._analysisController)}get editable(){return!this._analysisVisualization.preview}set editable(i){this._analysisVisualization.preview=!i}get showGrid(){return this._analysisVisualization?.showGrid??!1}set showGrid(i){this._analysisVisualization&&(this._analysisVisualization.showGrid=i)}get testData(){}place(i){return this.active=!0,c(this,{placementOptions:i,onToolActivated:i=>i.start("place")})}async pickLayerToExclude(i){return this.active=!0,h(this,{abortOptions:i,onToolActivated:i=>i.start("exclude")})}};i([o({readOnly:!0})],u.prototype,"type",void 0),i([o({constructOnly:!0,nonNullable:!0})],u.prototype,"analysis",void 0),i([o()],u.prototype,"tool",void 0),i([o()],u.prototype,"plane",void 0),i([o()],u.prototype,"active",void 0),i([o()],u.prototype,"editable",null),i([o()],u.prototype,"showGrid",null),i([o()],u.prototype,"userOperation",void 0),i([o()],u.prototype,"_analysisVisualization",void 0),i([o()],u.prototype,"_analysisController",void 0),u=i([a("esri.views.3d.analysis.SliceAnalysisView3D")],u);const d=u;export{d as default};
5
+ import{__decorate as i}from"tslib";import s from"../../../core/Accessor.js";import"../../../core/has.js";import{destroyMaybe as t}from"../../../core/maybe.js";import{property as e}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as a}from"../../../core/accessorSupport/decorators/subclass.js";import{AnalysisView3D as o}from"./AnalysisView3D.js";import{SliceController as l}from"./Slice/SliceController.js";import r from"./Slice/SliceTool.js";import{SliceVisualization as n}from"./Slice/SliceVisualization.js";import{connectAnalysisViewToTool as p,removeAnalysisViewTool as c,startPlaceOperation as y,startExclusiveInteractiveOperation as u}from"../../analysis/analysisViewUtils.js";let h=class extends(o(s)){constructor(i){super(i),this.type="slice-view-3d",this.analysis=null,this.tool=null,this.plane=null,this.active=!0,this.userOperation=null,this._analysisVisualization=null,this._analysisController=null}initialize(){this._analysisVisualization=new n({view:this.view,analysis:this.analysis,analysisViewData:this}),this._analysisController=new l({view:this.view,analysis:this.analysis,analysisViewData:this}),this.addHandles(p(this,r))}destroy(){c(this),this._analysisVisualization=t(this._analysisVisualization),this._analysisController=t(this._analysisController)}get visible(){return super.visible}set visible(i){super.visible=i}get interactive(){return super.interactive}set interactive(i){super.interactive=i}get editable(){return!this._analysisVisualization.preview}set editable(i){this._analysisVisualization.preview=!i}get showGrid(){return this._analysisVisualization?.showGrid??!1}set showGrid(i){this._analysisVisualization&&(this._analysisVisualization.showGrid=i)}get testData(){}place(i){return this.active=!0,y(this,{placementOptions:i,onToolActivated:i=>i.start("place")})}async pickLayerToExclude(i){return this.active=!0,u(this,{abortOptions:i,onToolActivated:i=>i.start("exclude")})}};i([e({readOnly:!0})],h.prototype,"type",void 0),i([e({constructOnly:!0,nonNullable:!0})],h.prototype,"analysis",void 0),i([e()],h.prototype,"tool",void 0),i([e()],h.prototype,"plane",void 0),i([e()],h.prototype,"active",void 0),i([e()],h.prototype,"editable",null),i([e()],h.prototype,"showGrid",null),i([e()],h.prototype,"userOperation",void 0),i([e()],h.prototype,"_analysisVisualization",void 0),i([e()],h.prototype,"_analysisController",void 0),h=i([a("esri.views.3d.analysis.SliceAnalysisView3D")],h);const d=h;export{d as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{getFeatureId as t,updatePointsFromFeatureReference as s}from"../../../analysis/featureReferenceUtils.js";import i from"../../../core/Accessor.js";import"../../../core/has.js";import r from"../../../core/Logger.js";import{mapCollection as o}from"../../../core/mapCollectionUtils.js";import{abortMaybe as a,destroyMaybe as d}from"../../../core/maybe.js";import{watch as n,initial as l,when as h,syncAndInitial as c}from"../../../core/reactiveUtils.js";import{property as p}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/RandomLCG.js";import{subclass as m}from"../../../core/accessorSupport/decorators/subclass.js";import{c as u,q as w}from"../../../chunks/vec32.js";import{create as v}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{canProjectWithoutEngine as f,isLoaded as V,projectOrLoad as y}from"../../../geometry/projectionUtils.js";import{projectBoundingRect as _}from"../../../geometry/projection/projectBoundingRect.js";import{empty as g,containsPoint as j}from"../../../geometry/support/aaBoundingRect.js";import{AnalysisView3D as R}from"./AnalysisView3D.js";import{logFailedGeometryProjectionError as b}from"./support/projectionUtils.js";import{ViewshedAnalysisVisualization as D}from"./Viewshed/ViewshedAnalysisVisualization.js";import{ViewshedComputedData as C}from"./Viewshed/ViewshedComputedData.js";import F from"./Viewshed/ViewshedTool.js";import{Intersector as H}from"../webgl-engine/lib/Intersector.js";import{Viewshed as O}from"../webgl-engine/lib/Viewshed.js";import{connectAnalysisViewToTool as U,removeAnalysisViewTool as A,startPlaceOperation as S}from"../../analysis/analysisViewUtils.js";let N=class extends(R(i)){constructor(e){super(e),this.type="viewshed-view-3d",this.analysis=null,this.tool=null,this._selectedViewshed=null,this.viewshedComputedDataHandles=null,this.userOperation=null,this._viewshedRenderNode=null,this._intersector=null}get selectedViewshed(){return this._selectedViewshed}set selectedViewshed(e){this._unselectOtherViewsheds(e),this._selectedViewshed=e}get selectedViewshedComputedData(){return this.tool?.selectedViewshedComputedData}get _isDecoration(){return!this.parent}initialize(){const e=this.view;this._viewshedRenderNode=new O({view:e,selectedViewshed:()=>this.selectedViewshed??this.tool?.stagedViewshed,isDecoration:this._isDecoration}),this._intersector=new H(this.view.state.viewingMode),this._intersector.options.hud=!1,this._intersector.options.store=0,this.viewshedComputedDataHandles=o(()=>this.analysis.viewsheds,t=>{const s=new C({renderCoordsHelper:e.renderCoordsHelper,viewshed:t}),i=Symbol();return this.addHandles([n(()=>({valid:s.valid,canProject:f(s.observer?.spatialReference,this.view.spatialReference)||V()}),({valid:e,canProject:t},i)=>{this.visible&&(e&&t?this._addViewshedsToRenderer(s):i?.valid&&i?.canProject&&this._removeViewshedsFromRenderer(s),t||b(this.analysis,s.observer.spatialReference,r.getLogger(this)))},l),...this._createFeatureReferenceHandles(s)],i),{viewshedComputedData:s,remove:()=>{this.removeHandles(i),this._removeViewshedsFromRenderer(s),s.destroy()}}}),this._analysisVisualization=new D({view:e,analysisViewData:this,isDecoration:this._isDecoration}),this.addHandles([n(()=>this.visible,e=>{const t=this.viewshedComputedDataHandles;if(null==t)return;e||(this.selectedViewshed=null);const s=t.map(e=>e.viewshedComputedData).filter(e=>e.valid).toArray();e?this._addViewshedsToRenderer(s):this._removeViewshedsFromRenderer(s)}),n(()=>e.renderCoordsHelper,e=>{this.viewshedComputedDataHandles?.forEach(({viewshedComputedData:t})=>t.renderCoordsHelper=e)}),U(this,F),h(()=>this.interactive,()=>{this._unselectOtherViewsheds(this.selectedViewshed)},c)])}destroy(){this.userOperation=a(this.userOperation),A(this),this._analysisVisualization=d(this._analysisVisualization);const e=this.viewshedComputedDataHandles;null!=e&&this._removeViewshedsFromRenderer(e.map(e=>e.viewshedComputedData).toArray())}_createFeatureReferenceHandles(e){const{view:t}=this;return[n(()=>[t.state.camera,t.slice.plane,e.viewshed.observer,e.targetRenderSpace,e.verticalFieldOfView,e.horizontalFieldOfView,e.feature],()=>{this._updateObserverFromFeature(t,e)},l),this._createElevationUpdateHandle(e),h(()=>e.needUpdateByFeature,()=>{this._updateObserverFromFeature(t,e),e.needUpdateByFeature=!1})]}_createElevationUpdateHandle(e){const t=(s,i)=>{const{view:r}=this,{observer:o}=e;if(null==o)return;const a=y(o,r.spatialReference);if(null!=a.pending)return void a.pending.finally(()=>t(s,i));const d=a.geometry;null!=d&&(_(s,i,T,r.spatialReference),j(T,[d.x,d.y])&&(e.needUpdateByFeature=!0))};return this.view.elevationProvider.on("elevation-change",({extent:e,spatialReference:s})=>t(e,s))}async createViewsheds(e){await S(this,{placementOptions:e,onToolActivated:e=>e.place("multiple")})}place(e){return S(this,{placementOptions:e,onToolActivated:e=>e.place("single")})}_addViewshedsToRenderer(e){this._viewshedRenderNode.updateViewsheds({adds:e})}_removeViewshedsFromRenderer(e){this._viewshedRenderNode.updateViewsheds({removes:e})}_updateObserverFromFeature(e,i){const r=i.observerRenderSpace,o=i.targetRenderSpace,a=u(v(),r),d={observer:r,observerSurfaceNormal:null,observerAdjusted:a,observerFeatureId:t(i.feature),target:o,targetSurfaceNormal:null,targetAdjusted:u(v(),o),targetFeatureId:null};s(e,this._intersector,d,e=>Math.min(e,.05*i.farDistanceRenderSpace)),i.observerRenderSpaceOverride=w(a,r)?null:a}_unselectOtherViewsheds(e){if(null!=e)for(const t of this.view.tools.items)t!==this.tool&&t instanceof F&&(t.analysisViewData.selectedViewshed=null)}get test(){}};e([p({readOnly:!0})],N.prototype,"type",void 0),e([p({constructOnly:!0,nonNullable:!0})],N.prototype,"analysis",void 0),e([p()],N.prototype,"tool",void 0),e([p()],N.prototype,"_selectedViewshed",void 0),e([p()],N.prototype,"selectedViewshed",null),e([p()],N.prototype,"selectedViewshedComputedData",null),e([p()],N.prototype,"viewshedComputedDataHandles",void 0),e([p()],N.prototype,"userOperation",void 0),e([p()],N.prototype,"_analysisVisualization",void 0),e([p()],N.prototype,"_viewshedRenderNode",void 0),N=e([m("esri.views.3d.analysis.ViewshedAnalysisView3D")],N);const z=N,T=g();export{z as default};
5
+ import{__decorate as e}from"tslib";import{getFeatureId as t,updatePointsFromFeatureReference as s}from"../../../analysis/featureReferenceUtils.js";import i from"../../../core/Accessor.js";import"../../../core/has.js";import r from"../../../core/Logger.js";import{mapCollection as o}from"../../../core/mapCollectionUtils.js";import{abortMaybe as a,destroyMaybe as d}from"../../../core/maybe.js";import{watch as n,initial as l,when as h,syncAndInitial as c}from"../../../core/reactiveUtils.js";import{property as p}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/RandomLCG.js";import{subclass as u}from"../../../core/accessorSupport/decorators/subclass.js";import{c as m,q as v}from"../../../chunks/vec32.js";import{create as w}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{canProjectWithoutEngine as f,isLoaded as V,projectOrLoad as y}from"../../../geometry/projectionUtils.js";import{projectBoundingRect as _}from"../../../geometry/projection/projectBoundingRect.js";import{empty as g,containsPoint as j}from"../../../geometry/support/aaBoundingRect.js";import{AnalysisView3D as R}from"./AnalysisView3D.js";import{logFailedGeometryProjectionError as b}from"./support/projectionUtils.js";import{ViewshedAnalysisVisualization as D}from"./Viewshed/ViewshedAnalysisVisualization.js";import{ViewshedComputedData as C}from"./Viewshed/ViewshedComputedData.js";import F from"./Viewshed/ViewshedTool.js";import{Intersector as H}from"../webgl-engine/lib/Intersector.js";import{Viewshed as O}from"../webgl-engine/lib/Viewshed.js";import{connectAnalysisViewToTool as U,removeAnalysisViewTool as A,startPlaceOperation as S}from"../../analysis/analysisViewUtils.js";let N=class extends(R(i)){constructor(e){super(e),this.type="viewshed-view-3d",this.analysis=null,this.tool=null,this._selectedViewshed=null,this.viewshedComputedDataHandles=null,this.userOperation=null,this._viewshedRenderNode=null,this._intersector=null}get visible(){return super.visible}set visible(e){super.visible=e}get interactive(){return super.interactive}set interactive(e){super.interactive=e}get selectedViewshed(){return this._selectedViewshed}set selectedViewshed(e){this._unselectOtherViewsheds(e),this._selectedViewshed=e}get selectedViewshedComputedData(){return this.tool?.selectedViewshedComputedData}get _isDecoration(){return!this.parent}initialize(){const e=this.view;this._viewshedRenderNode=new O({view:e,selectedViewshed:()=>this.selectedViewshed??this.tool?.stagedViewshed,isDecoration:this._isDecoration}),this._intersector=new H(this.view.state.viewingMode),this._intersector.options.hud=!1,this._intersector.options.store=0,this.viewshedComputedDataHandles=o(()=>this.analysis.viewsheds,t=>{const s=new C({renderCoordsHelper:e.renderCoordsHelper,viewshed:t}),i=Symbol();return this.addHandles([n(()=>({valid:s.valid,canProject:f(s.observer?.spatialReference,this.view.spatialReference)||V()}),({valid:e,canProject:t},i)=>{this.visible&&(e&&t?this._addViewshedsToRenderer(s):i?.valid&&i?.canProject&&this._removeViewshedsFromRenderer(s),t||b(this.analysis,s.observer.spatialReference,r.getLogger(this)))},l),...this._createFeatureReferenceHandles(s)],i),{viewshedComputedData:s,remove:()=>{this.removeHandles(i),this._removeViewshedsFromRenderer(s),s.destroy()}}}),this._analysisVisualization=new D({view:e,analysisViewData:this,isDecoration:this._isDecoration}),this.addHandles([n(()=>this.visible,e=>{const t=this.viewshedComputedDataHandles;if(null==t)return;e||(this.selectedViewshed=null);const s=t.map(e=>e.viewshedComputedData).filter(e=>e.valid).toArray();e?this._addViewshedsToRenderer(s):this._removeViewshedsFromRenderer(s)}),n(()=>e.renderCoordsHelper,e=>{this.viewshedComputedDataHandles?.forEach(({viewshedComputedData:t})=>t.renderCoordsHelper=e)}),U(this,F),h(()=>this.interactive,()=>{this._unselectOtherViewsheds(this.selectedViewshed)},c)])}destroy(){this.userOperation=a(this.userOperation),A(this),this._analysisVisualization=d(this._analysisVisualization);const e=this.viewshedComputedDataHandles;null!=e&&this._removeViewshedsFromRenderer(e.map(e=>e.viewshedComputedData).toArray())}_createFeatureReferenceHandles(e){const{view:t}=this;return[n(()=>[t.state.camera,t.slice.plane,e.viewshed.observer,e.targetRenderSpace,e.verticalFieldOfView,e.horizontalFieldOfView,e.feature],()=>{this._updateObserverFromFeature(t,e)},l),this._createElevationUpdateHandle(e),h(()=>e.needUpdateByFeature,()=>{this._updateObserverFromFeature(t,e),e.needUpdateByFeature=!1})]}_createElevationUpdateHandle(e){const t=(s,i)=>{const{view:r}=this,{observer:o}=e;if(null==o)return;const a=y(o,r.spatialReference);if(null!=a.pending)return void a.pending.finally(()=>t(s,i));const d=a.geometry;null!=d&&(_(s,i,T,r.spatialReference),j(T,[d.x,d.y])&&(e.needUpdateByFeature=!0))};return this.view.elevationProvider.on("elevation-change",({extent:e,spatialReference:s})=>t(e,s))}async createViewsheds(e){await S(this,{placementOptions:e,onToolActivated:e=>e.place("multiple")})}place(e){return S(this,{placementOptions:e,onToolActivated:e=>e.place("single")})}_addViewshedsToRenderer(e){this._viewshedRenderNode.updateViewsheds({adds:e})}_removeViewshedsFromRenderer(e){this._viewshedRenderNode.updateViewsheds({removes:e})}_updateObserverFromFeature(e,i){const r=i.observerRenderSpace,o=i.targetRenderSpace,a=m(w(),r),d={observer:r,observerSurfaceNormal:null,observerAdjusted:a,observerFeatureId:t(i.feature),target:o,targetSurfaceNormal:null,targetAdjusted:m(w(),o),targetFeatureId:null};s(e,this._intersector,d,e=>Math.min(e,.05*i.farDistanceRenderSpace)),i.observerRenderSpaceOverride=v(a,r)?null:a}_unselectOtherViewsheds(e){if(null!=e)for(const t of this.view.tools.items)t!==this.tool&&t instanceof F&&(t.analysisViewData.selectedViewshed=null)}get test(){}};e([p({readOnly:!0})],N.prototype,"type",void 0),e([p({constructOnly:!0,nonNullable:!0})],N.prototype,"analysis",void 0),e([p()],N.prototype,"tool",void 0),e([p()],N.prototype,"_selectedViewshed",void 0),e([p()],N.prototype,"selectedViewshed",null),e([p()],N.prototype,"selectedViewshedComputedData",null),e([p()],N.prototype,"viewshedComputedDataHandles",void 0),e([p()],N.prototype,"userOperation",void 0),e([p()],N.prototype,"_analysisVisualization",void 0),e([p()],N.prototype,"_viewshedRenderNode",void 0),N=e([u("esri.views.3d.analysis.ViewshedAnalysisView3D")],N);const z=N,T=g();export{z as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{equals as t}from"../../../core/arrayUtils.js";import"../../../core/has.js";import{abortMaybe as r}from"../../../core/maybe.js";import{debounce as i,throwIfAborted as s,ignoreAbortErrors as o}from"../../../core/promiseUtils.js";import l from"../../../core/RandomLCG.js";import{watch as n,when as a,sync as u}from"../../../core/reactiveUtils.js";import{property as d}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import{subclass as c}from"../../../core/accessorSupport/decorators/subclass.js";import{projectOrLoad as h}from"../../../geometry/projectionUtils.js";import{fromExtent as p,toExtent as f,intersects as m}from"../../../geometry/support/aaBoundingRect.js";import g from"../../../symbols/support/ElevationInfo.js";import{simulationSettingsEqual as _,getFlowSimulationSettings as y}from"../../2d/engine/flow/utils.js";import w from"./SubView3D.js";import{makeScheduleFunction as v}from"./support/makeScheduleFunction.js";import{FlowWorkerHandle as b}from"../support/flow/FlowWorkerHandle.js";import{materialParametersFromRenderer as S,createStreamlineGeometry as T}from"../support/flow/geometryUtils.js";import{boundingRectOfTiles as j}from"../support/flow/loadUtils.js";import{StreamlinesResources3D as R}from"../support/flow/StreamlinesResources3D.js";import x from"../support/flow/VisualQuery3D.js";import{tilesAreRelated as U}from"../terrain/tileUtils.js";import{RibbonLineMaterial as L}from"../webgl-engine/materials/RibbonLineMaterial.js";import{TaskPriority as E}from"../../support/Scheduler.js";let k=class extends w{constructor(e){super(e),this.type="flow",this.renderedTiles=null,this._abortController=null,this._frameTask=null,this.workerHandle=null,this.emissiveStrength=0,this._overrideSimulationSettings=null,this._debouncedLoad=i(async e=>{const{view:t}=this;if(!this._visible)return void this.clear();if(0===e.size)return;const r=this._computeExtent(e);if(null==r)return;const i=new x(r,this.layer.timeExtent,this._viewSizeWithEqualRatio(r),t.state.contentPixelRatio);null==this._abortController&&(this._abortController=new AbortController);const o=this._abortController,l=await this._load(i,o.signal);s(o.signal),this.clear(),this._visible&&null!=l&&(l.attach(t.stage),this._resources=l)}),this._debouncedTileUpdate=i(async()=>{const{allTiles:e}=this.surface,{featureTiles:r}=this.view,{_dataBounds:i,_featureTilesBounds:s}=this,o=e=>e.rendered&&e.visible&&C(i,e.extent);if(null==r)return void(this.renderedTiles=new Set(e.filter(e=>o(e))));const l=r.tiles.filter(e=>e.measures.visible),n=new Set;function*a(r){for(let i=0;i<e.length;++i){const a=e.at(i);if(!o(a))continue;if(!C(s,a.extent))continue;l.some(({lij:e})=>t(e,a.lij)||U(e,a.lij))&&n.add(a),r.madeProgress(),r.done&&(r=yield)}}await this._frameTask.scheduleGenerator(a),this.renderedTiles=n}),this._debugStopLoading=!1}initialize(){const{surface:e,view:t}=this,{resourceController:r}=t;this.workerHandle=new b(v(r)),this._frameTask=r.scheduler.registerTask(E.FLOW_GENERATOR),this.addHandles([n(()=>this.simulationSettings,()=>this.triggerLoad(),{sync:!0,equals:(e,t)=>null==e&&null==t||null!=e&&null!=t&&_(e,t)}),n(()=>{const{elevationInfo:e}=this;return[this._visible,e?.mode,e?.offset,e?.unit]},()=>this.triggerLoad(),u),n(()=>S(this._flowRenderer,this._opacity,this.emissiveStrength),e=>this._resources?.setMaterialParameters(e)),e.on("tiles-changed",()=>this._triggerTilesUpdate()),t.enableFeatureTiles(),n(()=>[this._dataBounds,this._featureTilesBounds],()=>this._triggerTilesUpdate()),a(()=>!t.featureTiles?.updating,()=>this._triggerTilesUpdate())]),this._triggerTilesUpdate()}destroy(){this.abort(),this.clear()}abort(){this._abortController=r(this._abortController)}get _dataBounds(){const e=h(this.layer.fullExtent,this.surface.spatialReference).geometry;return null==e?null:p(e)}get _featureTilesBounds(){const e=this.view.featureTiles?.filterExtent,t=h(e,this.surface.spatialReference).geometry;return null==t?null:p(t)}get _flowRenderer(){const e=this.layer.renderer;return"flow"!==e?.type?null:e}get _opacity(){return this.layerView.fullOpacity}get _visible(){const e=this._flowRenderer?.color;return this.layer.effectiveVisible&&this._opacity>0&&(null==e||e.a>0)}get elevationInfo(){return this.layer.elevationInfo??B}get layer(){return this.layerView.layer}get simulationSettings(){const{_flowRenderer:e,_overrideSimulationSettings:t}=this;if(null==e)return null;let r=y(e);return null!=t&&(r={...r,...t}),r}get surface(){return this.view.basemapTerrain}doRefresh(){return this.triggerLoad()}clear(){this._resources?.detach(),this._resources=null}async triggerLoad(){const{renderedTiles:e}=this;if(null==e||0===e.size||this._debugStopLoading)return;const t=this._debouncedLoad(e);return this.updatingHandles.addPromise(o(t))}async _load(e,t){const r=await this.fetchDataAndGenerateStreamlines(e,t);if(null==r||0===r.length)return null;const i=await this._createGeometry(e,r);return new R(r,i)}async fetchDataAndGenerateStreamlines(e,t){return null}async _createGeometry(e,t){const r=new L(S(this._flowRenderer,this._opacity,this.emissiveStrength)),i=new Array,s=new l(1),{view:o,elevationInfo:n}=this;function*a(l){for(let a=0;a<t.length;++a)i.push(T(o,e,t[a],n,r,s)),l.madeProgress(),l.done&&(l=yield)}return await this._frameTask.scheduleGenerator(a),i}_computeExtent(e){const{spatialReference:t}=this.surface;if(null==t)return null;const r=j(e);return null==r?null:f(r,t)}async _triggerTilesUpdate(){const e=this._debouncedTileUpdate();return this.updatingHandles.addPromise(o(e))}_viewSizeWithEqualRatio(e){const t=(e.xmax-e.xmin)/(e.ymax-e.ymin),[r,i]=this.view.size;return r<i?[r,Math.floor(r/t)]:[Math.floor(i*t),i]}get test(){}};e([d()],k.prototype,"type",void 0),e([d()],k.prototype,"renderedTiles",void 0),e([d()],k.prototype,"emissiveStrength",void 0),e([d()],k.prototype,"_dataBounds",null),e([d()],k.prototype,"_featureTilesBounds",null),e([d()],k.prototype,"_flowRenderer",null),e([d()],k.prototype,"_opacity",null),e([d()],k.prototype,"_visible",null),e([d()],k.prototype,"elevationInfo",null),e([d()],k.prototype,"layer",null),e([d()],k.prototype,"_overrideSimulationSettings",void 0),e([d()],k.prototype,"simulationSettings",null),e([d()],k.prototype,"surface",null),k=e([c("esri.views.3d.layers.FlowSubView3D")],k);const B=new g({mode:"relative-to-ground",offset:100});function C(e,t){return null==e||null==t||m(e,t)}export{k as default};
5
+ import{__decorate as e}from"tslib";import{equals as t}from"../../../core/arrayUtils.js";import"../../../core/has.js";import{abortMaybe as r}from"../../../core/maybe.js";import{debounce as i,throwIfAborted as s,ignoreAbortErrors as o}from"../../../core/promiseUtils.js";import n from"../../../core/RandomLCG.js";import{watch as l,when as a,sync as u}from"../../../core/reactiveUtils.js";import{property as d}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import{subclass as p}from"../../../core/accessorSupport/decorators/subclass.js";import{projectOrLoad as h}from"../../../geometry/projectionUtils.js";import{fromExtent as c,toExtent as f,intersects as m}from"../../../geometry/support/aaBoundingRect.js";import g from"../../../symbols/support/ElevationInfo.js";import{simulationSettingsEqual as _,getFlowSimulationSettings as y}from"../../2d/engine/flow/utils.js";import w from"./SubView3D.js";import{makeScheduleFunction as v}from"./support/makeScheduleFunction.js";import{FlowWorkerHandle as b}from"../support/flow/FlowWorkerHandle.js";import{materialParametersFromRenderer as S,createStreamlineGeometry as j}from"../support/flow/geometryUtils.js";import{boundingRectOfTiles as T}from"../support/flow/loadUtils.js";import{StreamlineResources3DOverlay as R}from"../support/flow/StreamlineResources3DOverlay.js";import{StreamlineResources3DShape as x}from"../support/flow/StreamlineResources3DShape.js";import U from"../support/flow/VisualQuery3D.js";import{tilesAreRelated as L}from"../terrain/tileUtils.js";import{RibbonLineMaterial as E}from"../webgl-engine/materials/RibbonLineMaterial.js";import{TaskPriority as k}from"../../support/Scheduler.js";let B=class extends w{constructor(e){super(e),this.type="flow",this.renderedTiles=null,this._abortController=null,this._frameTask=null,this.workerHandle=null,this.emissiveStrength=0,this._overrideSimulationSettings=null,this._debouncedLoad=i(async e=>{const{view:t}=this;if(!this._visible)return void this.clear();if(0===e.size)return;const r=this._computeExtent(e);if(null==r)return;const i=new U(r,this.layer.timeExtent,this._viewSizeWithEqualRatio(r),t.state.contentPixelRatio);null==this._abortController&&(this._abortController=new AbortController);const o=this._abortController,n=await this._load(i,o.signal);s(o.signal),this.clear(),this._visible&&null!=n&&(n.attach(),this._resources=n)}),this._debouncedTileUpdate=i(async()=>{const{allTiles:e}=this.surface,{featureTiles:r}=this.view,{_dataBounds:i,_featureTilesBounds:s}=this,o=e=>e.rendered&&e.visible&&G(i,e.extent);if(null==r)return void(this.renderedTiles=new Set(e.filter(e=>o(e))));const n=r.tiles.filter(e=>e.measures.visible),l=new Set;function*a(r){for(let i=0;i<e.length;++i){const a=e.at(i);if(!o(a))continue;if(!G(s,a.extent))continue;n.some(({lij:e})=>t(e,a.lij)||L(e,a.lij))&&l.add(a),r.madeProgress(),r.done&&(r=yield)}}await this._frameTask.scheduleGenerator(a),this.renderedTiles=l}),this._debugStopLoading=!1}initialize(){const{surface:e,view:t}=this,{resourceController:r}=t;this.workerHandle=new b(v(r)),this._frameTask=r.scheduler.registerTask(k.FLOW_GENERATOR),this.addHandles([l(()=>this.simulationSettings,()=>this.triggerLoad(),{sync:!0,equals:(e,t)=>null==e&&null==t||null!=e&&null!=t&&_(e,t)}),l(()=>{const{elevationInfo:e}=this;return[this._visible,this._draped,e?.mode,e?.offset,e?.unit]},()=>this.triggerLoad(),u),l(()=>S(this._flowRenderer,this._opacity,this.emissiveStrength),e=>this._resources?.setMaterialParameters(e)),e.on("tiles-changed",()=>this._triggerTilesUpdate()),t.enableFeatureTiles(),l(()=>[this._dataBounds,this._featureTilesBounds],()=>this._triggerTilesUpdate()),a(()=>!t.featureTiles?.updating,()=>this._triggerTilesUpdate())]),this._triggerTilesUpdate()}destroy(){this.abort(),this.clear()}abort(){this._abortController=r(this._abortController)}get _dataBounds(){const e=h(this.layer.fullExtent,this.surface.spatialReference).geometry;return null==e?null:c(e)}get _draped(){return"on-the-ground"===this.elevationInfo.mode}get _featureTilesBounds(){const e=this.view.featureTiles?.filterExtent,t=h(e,this.surface.spatialReference).geometry;return null==t?null:c(t)}get _flowRenderer(){const e=this.layer.renderer;return"flow"!==e?.type?null:e}get _opacity(){return this.layerView.fullOpacity}get _visible(){const e=this._flowRenderer?.color;return this.layer.effectiveVisible&&this._opacity>0&&(null==e||e.a>0)}get elevationInfo(){return this.layer.elevationInfo??C}get layer(){return this.layerView.layer}get simulationSettings(){const{_flowRenderer:e,_overrideSimulationSettings:t}=this;if(null==e)return null;let r=y(e);return null!=t&&(r={...r,...t}),r}get surface(){return this.view.basemapTerrain}doRefresh(){return this.triggerLoad()}clear(){this._resources?.detach(),this._resources=null}async triggerLoad(){const{renderedTiles:e}=this;if(null==e||0===e.size||this._debugStopLoading)return;const t=this._debouncedLoad(e);return this.updatingHandles.addPromise(o(t))}async _load(e,t){const r=await this.fetchDataAndGenerateStreamlines(e,t);if(null==r||0===r.length)return null;const i=await this._createGeometry(e,r);return this._draped?new R(r,i,this.surface.overlayManager):new x(r,i,this.view.stage)}async fetchDataAndGenerateStreamlines(e,t){return null}async _createGeometry(e,t){const r=new E(S(this._flowRenderer,this._opacity,this.emissiveStrength)),i=new Array,s=new n(1),{elevationInfo:o,_draped:l,view:a}=this;function*u(n){for(let u=0;u<t.length;++u)i.push(j(a,e,t[u],o,r,l,s)),n.madeProgress(),n.done&&(n=yield)}return await this._frameTask.scheduleGenerator(u),i}_computeExtent(e){const{spatialReference:t}=this.surface;if(null==t)return null;const r=T(e);return null==r?null:f(r,t)}async _triggerTilesUpdate(){const e=this._debouncedTileUpdate();return this.updatingHandles.addPromise(o(e))}_viewSizeWithEqualRatio(e){const t=(e.xmax-e.xmin)/(e.ymax-e.ymin),[r,i]=this.view.size;return r<i?[r,Math.floor(r/t)]:[Math.floor(i*t),i]}get test(){}};e([d()],B.prototype,"type",void 0),e([d()],B.prototype,"renderedTiles",void 0),e([d()],B.prototype,"emissiveStrength",void 0),e([d()],B.prototype,"_dataBounds",null),e([d()],B.prototype,"_draped",null),e([d()],B.prototype,"_featureTilesBounds",null),e([d()],B.prototype,"_flowRenderer",null),e([d()],B.prototype,"_opacity",null),e([d()],B.prototype,"_visible",null),e([d()],B.prototype,"elevationInfo",null),e([d()],B.prototype,"layer",null),e([d()],B.prototype,"_overrideSimulationSettings",void 0),e([d()],B.prototype,"simulationSettings",null),e([d()],B.prototype,"surface",null),B=e([p("esri.views.3d.layers.FlowSubView3D")],B);const C=new g({mode:"relative-to-ground",offset:100});function G(e,t){return null==e||null==t||m(e,t)}export{B as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as r}from"tslib";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";import{LayerView3D as e}from"./LayerView3D.js";import{makeScheduleFunction as t}from"./support/makeScheduleFunction.js";import{GaussianSplatSortWorkerHandle as i}from"../support/GaussianSplatWorkerHandle.js";import a from"../../layers/LayerView.js";let p=class extends(e(a)){constructor(){super(...arguments),this.type="gaussian-splat-3d",this.workerHandle=null}initialize(){const{resourceController:r}=this.view;this.workerHandle=new i(t(r))}isUpdating(){return!1}destroy(){}};r([o()],p.prototype,"layer",void 0),p=r([s("esri.views.3d.layers.GaussianSplatLayerView3D")],p);const c=p;export{c as default};
5
+ import{__decorate as r}from"tslib";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as e}from"../../../core/accessorSupport/decorators/subclass.js";import{LayerView3D as s}from"./LayerView3D.js";import{makeScheduleFunction as t}from"./support/makeScheduleFunction.js";import{GaussianSplatSortWorkerHandle as i}from"../support/GaussianSplatWorkerHandle.js";import a from"../../layers/LayerView.js";let p=class extends(s(a)){constructor(){super(...arguments),this.type="gaussian-splat-3d"}initialize(){const{resourceController:r}=this.view;this._workerHandle=new i(t(r))}isUpdating(){return!1}destroy(){this._workerHandle.destroyWorkerAndSelf()}};r([o()],p.prototype,"layer",void 0),p=r([e("esri.views.3d.layers.GaussianSplatLayerView3D")],p);const c=p;export{c as default};