@arcgis/core 4.27.0-next.20230320 → 4.27.0-next.20230321

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 (200) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/29ee4f14602caf6967e4.js +1 -0
  3. package/assets/esri/core/workers/chunks/{c36efbdd0a84fe851bbb.js → 433686dfda9e2ff1f98b.js} +1 -1
  4. package/assets/esri/core/workers/chunks/70ea44365021b665c213.js +1 -0
  5. package/assets/esri/core/workers/chunks/{f150bd21c3b9e098da57.js → 92951b85676df776961f.js} +56 -56
  6. package/assets/esri/core/workers/chunks/{19355af765993931a7c0.js → 9b196a726c6d175ca60f.js} +1 -1
  7. package/assets/esri/core/workers/chunks/bc002e4dff8859571a7a.js +1 -0
  8. package/assets/esri/core/workers/chunks/c5dd23d11fa91b0f318e.js +1 -0
  9. package/assets/esri/core/workers/chunks/c8f019d13f6b22481f2e.js +1 -0
  10. package/assets/esri/core/workers/chunks/f1ab86dbbd5b04e2a96c.js +1 -0
  11. package/assets/esri/themes/base/widgets/_Editor.scss +18 -0
  12. package/assets/esri/themes/base/widgets/_ItemList.scss +13 -33
  13. package/assets/esri/themes/dark/main.css +1 -1
  14. package/assets/esri/themes/light/main.css +1 -1
  15. package/assets/esri/themes/light/view.css +1 -1
  16. package/assets/esri/widgets/Editor/t9n/Editor.json +1 -1
  17. package/assets/esri/widgets/Editor/t9n/Editor_en.json +1 -1
  18. package/assets/esri/widgets/Slice/t9n/Slice_ar.json +1 -1
  19. package/assets/esri/widgets/Slice/t9n/Slice_bg.json +1 -1
  20. package/assets/esri/widgets/Slice/t9n/Slice_bs.json +1 -1
  21. package/assets/esri/widgets/Slice/t9n/Slice_ca.json +1 -1
  22. package/assets/esri/widgets/Slice/t9n/Slice_cs.json +1 -1
  23. package/assets/esri/widgets/Slice/t9n/Slice_da.json +1 -1
  24. package/assets/esri/widgets/Slice/t9n/Slice_de.json +1 -1
  25. package/assets/esri/widgets/Slice/t9n/Slice_el.json +1 -1
  26. package/assets/esri/widgets/Slice/t9n/Slice_es.json +1 -1
  27. package/assets/esri/widgets/Slice/t9n/Slice_et.json +1 -1
  28. package/assets/esri/widgets/Slice/t9n/Slice_fi.json +1 -1
  29. package/assets/esri/widgets/Slice/t9n/Slice_fr.json +1 -1
  30. package/assets/esri/widgets/Slice/t9n/Slice_he.json +1 -1
  31. package/assets/esri/widgets/Slice/t9n/Slice_hr.json +1 -1
  32. package/assets/esri/widgets/Slice/t9n/Slice_hu.json +1 -1
  33. package/assets/esri/widgets/Slice/t9n/Slice_id.json +1 -1
  34. package/assets/esri/widgets/Slice/t9n/Slice_it.json +1 -1
  35. package/assets/esri/widgets/Slice/t9n/Slice_ja.json +1 -1
  36. package/assets/esri/widgets/Slice/t9n/Slice_ko.json +1 -1
  37. package/assets/esri/widgets/Slice/t9n/Slice_lt.json +1 -1
  38. package/assets/esri/widgets/Slice/t9n/Slice_lv.json +1 -1
  39. package/assets/esri/widgets/Slice/t9n/Slice_nb.json +1 -1
  40. package/assets/esri/widgets/Slice/t9n/Slice_nl.json +1 -1
  41. package/assets/esri/widgets/Slice/t9n/Slice_pl.json +1 -1
  42. package/assets/esri/widgets/Slice/t9n/Slice_pt-BR.json +1 -1
  43. package/assets/esri/widgets/Slice/t9n/Slice_pt-PT.json +1 -1
  44. package/assets/esri/widgets/Slice/t9n/Slice_ro.json +1 -1
  45. package/assets/esri/widgets/Slice/t9n/Slice_ru.json +1 -1
  46. package/assets/esri/widgets/Slice/t9n/Slice_sk.json +1 -1
  47. package/assets/esri/widgets/Slice/t9n/Slice_sl.json +1 -1
  48. package/assets/esri/widgets/Slice/t9n/Slice_sr.json +1 -1
  49. package/assets/esri/widgets/Slice/t9n/Slice_sv.json +1 -1
  50. package/assets/esri/widgets/Slice/t9n/Slice_th.json +1 -1
  51. package/assets/esri/widgets/Slice/t9n/Slice_tr.json +1 -1
  52. package/assets/esri/widgets/Slice/t9n/Slice_uk.json +1 -1
  53. package/assets/esri/widgets/Slice/t9n/Slice_vi.json +1 -1
  54. package/assets/esri/widgets/Slice/t9n/Slice_zh-CN.json +1 -1
  55. package/assets/esri/widgets/Slice/t9n/Slice_zh-HK.json +1 -1
  56. package/assets/esri/widgets/Slice/t9n/Slice_zh-TW.json +1 -1
  57. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ar.json +1 -1
  58. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_bg.json +1 -1
  59. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_bs.json +1 -1
  60. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ca.json +1 -1
  61. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_cs.json +1 -1
  62. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_da.json +1 -1
  63. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_de.json +1 -1
  64. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_el.json +1 -1
  65. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_es.json +1 -1
  66. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_et.json +1 -1
  67. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_fi.json +1 -1
  68. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_fr.json +1 -1
  69. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_he.json +1 -1
  70. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_hr.json +1 -1
  71. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_hu.json +1 -1
  72. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_id.json +1 -1
  73. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_it.json +1 -1
  74. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ja.json +1 -1
  75. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ko.json +1 -1
  76. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_lt.json +1 -1
  77. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_lv.json +1 -1
  78. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_nb.json +1 -1
  79. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_nl.json +1 -1
  80. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_pl.json +1 -1
  81. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_pt-BR.json +1 -1
  82. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_pt-PT.json +1 -1
  83. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ro.json +1 -1
  84. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ru.json +1 -1
  85. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_sk.json +1 -1
  86. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_sl.json +1 -1
  87. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_sr.json +1 -1
  88. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_sv.json +1 -1
  89. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_th.json +1 -1
  90. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_tr.json +1 -1
  91. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_uk.json +1 -1
  92. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_vi.json +1 -1
  93. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_zh-CN.json +1 -1
  94. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_zh-HK.json +1 -1
  95. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_zh-TW.json +1 -1
  96. package/chunks/ColorMaterial.glsl.js +16 -14
  97. package/interfaces.d.ts +1 -1
  98. package/layers/SceneLayer.js +1 -1
  99. package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
  100. package/package.json +1 -1
  101. package/support/revision.js +1 -1
  102. package/views/3d/analysis/Slice/SliceTool.js +1 -1
  103. package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
  104. package/views/3d/environment/CloudsData.js +1 -1
  105. package/views/3d/environment/CloudsGenerator.js +1 -1
  106. package/views/3d/interactive/editingTools/transformGraphic/GraphicScaleRotateTransform.js +1 -1
  107. package/views/3d/interactive/editingTools/transformGraphic/GraphicTransformTool.js +1 -1
  108. package/views/3d/interactive/editingTools/transformGraphic/ScaleRotateMeshAdapter.js +1 -1
  109. package/views/3d/interactive/editingTools/transformGraphic/ScaleRotateObjectSymbol3DAdapter.js +1 -1
  110. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  111. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  112. package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
  113. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  114. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  115. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  116. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  117. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  118. package/views/3d/layers/graphics/Graphics3DSymbol.js +1 -1
  119. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  120. package/views/3d/layers/graphics/Graphics3DWebStyleSymbol.js +1 -1
  121. package/views/3d/layers/graphics/interfaces.js +1 -1
  122. package/views/3d/layers/graphics/polygonUtils.js +1 -1
  123. package/views/3d/layers/support/FastSymbolUpdates.js +1 -1
  124. package/views/3d/support/buffer/InterleavedLayout.js +1 -1
  125. package/views/3d/support/buffer/glUtil.js +1 -1
  126. package/views/3d/support/buffer/workerHelper.js +1 -1
  127. package/views/3d/support/engineContent/line.js +1 -1
  128. package/views/3d/terrain/TerrainSurface.js +1 -1
  129. package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +2 -2
  130. package/views/3d/webgl-engine/core/shaderModules/ShaderBuilder.js +1 -1
  131. package/views/3d/webgl-engine/lib/DefaultVertexAttributeLocations.js +1 -1
  132. package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
  133. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  134. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  135. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  136. package/views/3d/webgl-engine/shaders/ColorMaterial.glsl.js +1 -1
  137. package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
  138. package/views/3d/webgl-engine/shaders/ColorMaterialTechniqueConfiguration.js +1 -1
  139. package/views/interactive/tooltip/TransformTooltipInfos.js +1 -1
  140. package/views/interactive/tooltip/content/TooltipContentTransformRotate.js +1 -1
  141. package/views/interactive/tooltip/content/TooltipContentTransformScale.js +1 -1
  142. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  143. package/widgets/Editor/CreateFeaturesWorkflowData.js +1 -1
  144. package/widgets/Editor/EditorViewModel.js +1 -1
  145. package/widgets/Editor/Upload.js +5 -0
  146. package/widgets/Editor/UploadState.js +4 -0
  147. package/widgets/Editor/workflowUtils.js +1 -1
  148. package/widgets/Editor.js +1 -1
  149. package/widgets/FeatureTemplates/ItemList.js +1 -1
  150. package/widgets/FeatureTemplates/TemplateItem.js +1 -1
  151. package/widgets/FeatureTemplates.js +1 -1
  152. package/widgets/LayerList/LayerListViewModel.js +1 -1
  153. package/widgets/ScaleBar/ScaleBarViewModel.js +1 -1
  154. package/assets/esri/core/workers/chunks/1ee774c3f29d8074da12.js +0 -1
  155. package/assets/esri/core/workers/chunks/2883a59fc1fc9e4d71af.js +0 -1
  156. package/assets/esri/core/workers/chunks/4d4cbfe72835c0460b09.js +0 -1
  157. package/assets/esri/core/workers/chunks/5bded2588008117d0c35.js +0 -1
  158. package/assets/esri/core/workers/chunks/9f02a0670ad73718d8f9.js +0 -1
  159. package/assets/esri/core/workers/chunks/ec73d16ef169adfc34fb.js +0 -1
  160. package/assets/esri/widgets/Directions/t9n/Printout.json +0 -1
  161. package/assets/esri/widgets/Directions/t9n/Printout_ar.json +0 -1
  162. package/assets/esri/widgets/Directions/t9n/Printout_bg.json +0 -1
  163. package/assets/esri/widgets/Directions/t9n/Printout_bs.json +0 -1
  164. package/assets/esri/widgets/Directions/t9n/Printout_ca.json +0 -1
  165. package/assets/esri/widgets/Directions/t9n/Printout_cs.json +0 -1
  166. package/assets/esri/widgets/Directions/t9n/Printout_da.json +0 -1
  167. package/assets/esri/widgets/Directions/t9n/Printout_de.json +0 -1
  168. package/assets/esri/widgets/Directions/t9n/Printout_el.json +0 -1
  169. package/assets/esri/widgets/Directions/t9n/Printout_en.json +0 -1
  170. package/assets/esri/widgets/Directions/t9n/Printout_es.json +0 -1
  171. package/assets/esri/widgets/Directions/t9n/Printout_et.json +0 -1
  172. package/assets/esri/widgets/Directions/t9n/Printout_fi.json +0 -1
  173. package/assets/esri/widgets/Directions/t9n/Printout_fr.json +0 -1
  174. package/assets/esri/widgets/Directions/t9n/Printout_he.json +0 -1
  175. package/assets/esri/widgets/Directions/t9n/Printout_hr.json +0 -1
  176. package/assets/esri/widgets/Directions/t9n/Printout_hu.json +0 -1
  177. package/assets/esri/widgets/Directions/t9n/Printout_id.json +0 -1
  178. package/assets/esri/widgets/Directions/t9n/Printout_it.json +0 -1
  179. package/assets/esri/widgets/Directions/t9n/Printout_ja.json +0 -1
  180. package/assets/esri/widgets/Directions/t9n/Printout_ko.json +0 -1
  181. package/assets/esri/widgets/Directions/t9n/Printout_lt.json +0 -1
  182. package/assets/esri/widgets/Directions/t9n/Printout_lv.json +0 -1
  183. package/assets/esri/widgets/Directions/t9n/Printout_nb.json +0 -1
  184. package/assets/esri/widgets/Directions/t9n/Printout_nl.json +0 -1
  185. package/assets/esri/widgets/Directions/t9n/Printout_pl.json +0 -1
  186. package/assets/esri/widgets/Directions/t9n/Printout_pt-BR.json +0 -1
  187. package/assets/esri/widgets/Directions/t9n/Printout_pt-PT.json +0 -1
  188. package/assets/esri/widgets/Directions/t9n/Printout_ro.json +0 -1
  189. package/assets/esri/widgets/Directions/t9n/Printout_ru.json +0 -1
  190. package/assets/esri/widgets/Directions/t9n/Printout_sk.json +0 -1
  191. package/assets/esri/widgets/Directions/t9n/Printout_sl.json +0 -1
  192. package/assets/esri/widgets/Directions/t9n/Printout_sr.json +0 -1
  193. package/assets/esri/widgets/Directions/t9n/Printout_sv.json +0 -1
  194. package/assets/esri/widgets/Directions/t9n/Printout_th.json +0 -1
  195. package/assets/esri/widgets/Directions/t9n/Printout_tr.json +0 -1
  196. package/assets/esri/widgets/Directions/t9n/Printout_uk.json +0 -1
  197. package/assets/esri/widgets/Directions/t9n/Printout_vi.json +0 -1
  198. package/assets/esri/widgets/Directions/t9n/Printout_zh-CN.json +0 -1
  199. package/assets/esri/widgets/Directions/t9n/Printout_zh-HK.json +0 -1
  200. package/assets/esri/widgets/Directions/t9n/Printout_zh-TW.json +0 -1
@@ -1 +1 @@
1
- {"enableAssociations":"연관 보기","enableConnectivity":"연결성 연관","enableStructuralAttachment":"구조 첨부 파일 연관","maxAllowableAssociations":"연관 최대 허용 수","maxAllowableAssociationsExceededWarning":"더 작은 영역으로 확대하거나 '연관 최대 허용 수' 옵션 값 변경","noAssociationsFoundWarning":"현재 범위에 연관이 없음","noAssociationTypeSelectedWarning":"연관 유형을 하나 이상 지정해야 함","refreshAssociations":"연관 새로 고침","widgetLabel":"연관"}
1
+ {"enableAssociations":"연관 보기","enableConnectivity":"연결성 연관","enableStructuralAttachment":"구조 첨부 파일 연관","maxAllowableAssociations":"연관 최대 허용 수","maxAllowableAssociationsExceededWarning":"더 작은 영역으로 확대하거나 '연관 최대 허용 수' 옵션 값 변경","noAssociationsFoundWarning":"현재 범위에 연관이 없음","refreshAssociations":"연관 새로 고침","widgetLabel":"연관"}
@@ -1 +1 @@
1
- {"enableAssociations":"Peržiūrėti asociacijas","enableConnectivity":"Ryšio asociacijos","enableStructuralAttachment":"Konstrukcinių priedų asociacijos","maxAllowableAssociations":"Didžiausias leidžiamas asociacijų skaičius","maxAllowableAssociationsExceededWarning":"Priartinkite iki mažesnės srities arba pakeiskite parinkties „Didžiausias leidžiamas asociacijų skaičius“ reikšmę","noAssociationsFoundWarning":"Šiame tekste nėra asociacijų","noAssociationTypeSelectedWarning":"Turi būti nurodytas bent vienas asociacijos tipas","refreshAssociations":"Atnaujinti asociacijas","widgetLabel":"Asociacijos"}
1
+ {"enableAssociations":"Peržiūrėti asociacijas","enableConnectivity":"Ryšio asociacijos","enableStructuralAttachment":"Konstrukcinių priedų asociacijos","maxAllowableAssociations":"Didžiausias leidžiamas asociacijų skaičius","maxAllowableAssociationsExceededWarning":"Priartinkite iki mažesnės srities arba pakeiskite parinkties „Didžiausias leidžiamas asociacijų skaičius“ reikšmę","noAssociationsFoundWarning":"Šiame tekste nėra asociacijų","refreshAssociations":"Atnaujinti asociacijas","widgetLabel":"Asociacijos"}
@@ -1 +1 @@
1
- {"enableAssociations":"Skatīt saistības","enableConnectivity":"Savienojamības saistības","enableStructuralAttachment":"Strukturāla pielikuma saistības","maxAllowableAssociations":"Maksimāli pieļaujamās saistības","maxAllowableAssociationsExceededWarning":"Tuviniet līdz mazākam apgabalam vai mainiet opcijas 'Maksimāli pieļaujamās saistības' vērtību","noAssociationsFoundWarning":"Pašreizējā pārklājumā nav saistību","noAssociationTypeSelectedWarning":"Jānorāda vismaz viens saistības veids","refreshAssociations":"Atsvaidzināt saistības","widgetLabel":"Saistības"}
1
+ {"enableAssociations":"Skatīt saistības","enableConnectivity":"Savienojamības saistības","enableStructuralAttachment":"Strukturāla pielikuma saistības","maxAllowableAssociations":"Maksimāli pieļaujamās saistības","maxAllowableAssociationsExceededWarning":"Tuviniet līdz mazākam apgabalam vai mainiet opcijas 'Maksimāli pieļaujamās saistības' vērtību","noAssociationsFoundWarning":"Pašreizējā pārklājumā nav saistību","refreshAssociations":"Atsvaidzināt saistības","widgetLabel":"Saistības"}
@@ -1 +1 @@
1
- {"enableAssociations":"Vis forbindelser","enableConnectivity":"Tilkoblingsforbindelser","enableStructuralAttachment":"Strukturelle tilknytningsforbindelser","maxAllowableAssociations":"Høyeste antall tillatte forbindelser","maxAllowableAssociationsExceededWarning":"Zoom inn på et mindre område, eller endre verdien for alternativet Høyest antall tillatte forbindelser.","noAssociationsFoundWarning":"Det er ingen forbindelser i gjeldende utstrekning","noAssociationTypeSelectedWarning":"Minst én forbindelses må være spesifisert","refreshAssociations":"Oppdater forbindelser","widgetLabel":"Forbindelser"}
1
+ {"enableAssociations":"Vis forbindelser","enableConnectivity":"Tilkoblingsforbindelser","enableStructuralAttachment":"Strukturelle tilknytningsforbindelser","maxAllowableAssociations":"Høyeste antall tillatte forbindelser","maxAllowableAssociationsExceededWarning":"Zoom inn på et mindre område, eller endre verdien for alternativet Høyest antall tillatte forbindelser.","noAssociationsFoundWarning":"Det er ingen forbindelser i gjeldende utstrekning","refreshAssociations":"Oppdater forbindelser","widgetLabel":"Forbindelser"}
@@ -1 +1 @@
1
- {"enableAssociations":"Associaties weergeven","enableConnectivity":"Connectiviteit associaties","enableStructuralAttachment":"Structuurbijlage associaties","maxAllowableAssociations":"Maximaal toegestane associaties","maxAllowableAssociationsExceededWarning":"Zoom in op een kleiner gebied of wijzig de waarde van de optie \"Maximaal toegestane associaties\"","noAssociationsFoundWarning":"Er zijn geen associaties in de huidige extent","noAssociationTypeSelectedWarning":"Er moet minimaal één associatietype worden gespecificeerd","refreshAssociations":"Associaties vernieuwen","widgetLabel":"Associaties"}
1
+ {"enableAssociations":"Associaties weergeven","enableConnectivity":"Connectiviteit associaties","enableStructuralAttachment":"Structuurbijlage associaties","maxAllowableAssociations":"Maximaal toegestane associaties","maxAllowableAssociationsExceededWarning":"Zoom in op een kleiner gebied of wijzig de waarde van de optie \"Maximaal toegestane associaties\"","noAssociationsFoundWarning":"Er zijn geen associaties in de huidige extent","refreshAssociations":"Associaties vernieuwen","widgetLabel":"Associaties"}
@@ -1 +1 @@
1
- {"enableAssociations":"Wyświetl powiązania","enableConnectivity":"Powiązania łączności","enableStructuralAttachment":"Powiązania załączników strukturalnych","maxAllowableAssociations":"Maksymalna dopuszczalna liczba powiązań","maxAllowableAssociationsExceededWarning":"Przybliż mniejszy obszar lub zmień wartość opcji Maksymalna dopuszczalna liczba powiązań","noAssociationsFoundWarning":"Brak powiązań w bieżącym zasięgu","noAssociationTypeSelectedWarning":"Należy podać co najmniej jeden typ powiązania","refreshAssociations":"Odśwież powiązania","widgetLabel":"Powiązania"}
1
+ {"enableAssociations":"Wyświetl powiązania","enableConnectivity":"Powiązania łączności","enableStructuralAttachment":"Powiązania załączników strukturalnych","maxAllowableAssociations":"Maksymalna dopuszczalna liczba powiązań","maxAllowableAssociationsExceededWarning":"Przybliż mniejszy obszar lub zmień wartość opcji Maksymalna dopuszczalna liczba powiązań","noAssociationsFoundWarning":"Brak powiązań w bieżącym zasięgu","refreshAssociations":"Odśwież powiązania","widgetLabel":"Powiązania"}
@@ -1 +1 @@
1
- {"enableAssociations":"Visualizar associações","enableConnectivity":"Associações de conectividade","enableStructuralAttachment":"Associações de anexo estruturais","maxAllowableAssociations":"Máximo de associações permitidas","maxAllowableAssociationsExceededWarning":"Amplie para uma área menor ou altere o valor da opção 'Máximo de associações permitidas'","noAssociationsFoundWarning":"Não há associações na extensão atual","noAssociationTypeSelectedWarning":"Pelo menos um tipo de associação deve ser especificado","refreshAssociations":"Atualizar associações","widgetLabel":"Associações"}
1
+ {"enableAssociations":"Visualizar associações","enableConnectivity":"Associações de conectividade","enableStructuralAttachment":"Associações de anexo estruturais","maxAllowableAssociations":"Máximo de associações permitidas","maxAllowableAssociationsExceededWarning":"Amplie para uma área menor ou altere o valor da opção 'Máximo de associações permitidas'","noAssociationsFoundWarning":"Não há associações na extensão atual","refreshAssociations":"Atualizar associações","widgetLabel":"Associações"}
@@ -1 +1 @@
1
- {"enableAssociations":"Ver associações","enableConnectivity":"Associações de conectividade","enableStructuralAttachment":"Associações de anexos estruturais","maxAllowableAssociations":"Associações máximas permitidas","maxAllowableAssociationsExceededWarning":"Amplie para uma área menor ou altere o valor da opção \"Associações máximas permitidas\"","noAssociationsFoundWarning":"Não existem associações na medida atual","noAssociationTypeSelectedWarning":"Pelo menos um tipo de associação tem de ser especificado","refreshAssociations":"Atualizar associações","widgetLabel":"Associações"}
1
+ {"enableAssociations":"Ver associações","enableConnectivity":"Associações de conectividade","enableStructuralAttachment":"Associações de anexos estruturais","maxAllowableAssociations":"Associações máximas permitidas","maxAllowableAssociationsExceededWarning":"Amplie para uma área menor ou altere o valor da opção \"Associações máximas permitidas\"","noAssociationsFoundWarning":"Não existem associações na medida atual","refreshAssociations":"Atualizar associações","widgetLabel":"Associações"}
@@ -1 +1 @@
1
- {"enableAssociations":"Vizualizare asocieri","enableConnectivity":"Asocieri conectivitate","enableStructuralAttachment":"Asociații de atașare structurală","maxAllowableAssociations":"Asocieri permisibile maxime","maxAllowableAssociationsExceededWarning":"Măriți la o zonă la mică sau schimbați valoarea opțiunii „Asocieri permisibile maxime”","noAssociationsFoundWarning":"Nu există asocieri în extinderea curentă","noAssociationTypeSelectedWarning":"Trebuie să fie specificat cel puțin un tip de asociere","refreshAssociations":"Reîmprospătare asocieri","widgetLabel":"Asocieri"}
1
+ {"enableAssociations":"Vizualizare asocieri","enableConnectivity":"Asocieri conectivitate","enableStructuralAttachment":"Asociații de atașare structurală","maxAllowableAssociations":"Asocieri permisibile maxime","maxAllowableAssociationsExceededWarning":"Măriți la o zonă la mică sau schimbați valoarea opțiunii „Asocieri permisibile maxime”","noAssociationsFoundWarning":"Nu există asocieri în extinderea curentă","refreshAssociations":"Reîmprospătare asocieri","widgetLabel":"Asocieri"}
@@ -1 +1 @@
1
- {"enableAssociations":"Просмотр связей","enableConnectivity":"Сопоставления связности","enableStructuralAttachment":"Связи прикрепления к структуре","maxAllowableAssociations":"Максимальное количество связей","maxAllowableAssociationsExceededWarning":"Приблизьтесь к небольшой области или измените значение параметра 'Максимальное количество связей'.","noAssociationsFoundWarning":"В текущем экстенте нет связей","noAssociationTypeSelectedWarning":"Необходимо указать хотя бы один тип связи","refreshAssociations":"Обновить связи","widgetLabel":"Связи"}
1
+ {"enableAssociations":"Просмотр связей","enableConnectivity":"Сопоставления связности","enableStructuralAttachment":"Связи прикрепления к структуре","maxAllowableAssociations":"Максимальное количество связей","maxAllowableAssociationsExceededWarning":"Приблизьтесь к небольшой области или измените значение параметра 'Максимальное количество связей'.","noAssociationsFoundWarning":"В текущем экстенте нет связей","refreshAssociations":"Обновить связи","widgetLabel":"Связи"}
@@ -1 +1 @@
1
- {"enableAssociations":"Zobraziť asociácie","enableConnectivity":"Asociácie konektivity","enableStructuralAttachment":"Asociácie štrukturálnych príloh","maxAllowableAssociations":"Maximálny počet povolených asociácií","maxAllowableAssociationsExceededWarning":"Priblížte sa k menšej oblasti alebo zmeňte hodnotu možnosti 'Maximálny počet povolených asociácií'","noAssociationsFoundWarning":"V súčasnom rozsahu neexistujú žiadne asociácie","noAssociationTypeSelectedWarning":"Musí byť uvedený aspoň jeden typ asociácií","refreshAssociations":"Obnoviť asociácie","widgetLabel":"Asociácie"}
1
+ {"enableAssociations":"Zobraziť asociácie","enableConnectivity":"Asociácie konektivity","enableStructuralAttachment":"Asociácie štrukturálnych príloh","maxAllowableAssociations":"Maximálny počet povolených asociácií","maxAllowableAssociationsExceededWarning":"Priblížte sa k menšej oblasti alebo zmeňte hodnotu možnosti 'Maximálny počet povolených asociácií'","noAssociationsFoundWarning":"V súčasnom rozsahu neexistujú žiadne asociácie","refreshAssociations":"Obnoviť asociácie","widgetLabel":"Asociácie"}
@@ -1 +1 @@
1
- {"enableAssociations":"Oglej si asociacije","enableConnectivity":"Asociacije povezljivosti","enableStructuralAttachment":"Asociacije strukturne priloge","maxAllowableAssociations":"Največje število dovoljenih asociacij","maxAllowableAssociationsExceededWarning":"Povečajte na manjše območje ali spremenite vrednost možnosti »Največje število dovoljenih asociacij«.","noAssociationsFoundWarning":"V trenutnem obsegu ni nobenih asociacij","noAssociationTypeSelectedWarning":"Določen mora biti vsaj en tip asociacij","refreshAssociations":"Osveži asociacije","widgetLabel":"Asociacije"}
1
+ {"enableAssociations":"Oglej si asociacije","enableConnectivity":"Asociacije povezljivosti","enableStructuralAttachment":"Asociacije strukturne priloge","maxAllowableAssociations":"Največje število dovoljenih asociacij","maxAllowableAssociationsExceededWarning":"Povečajte na manjše območje ali spremenite vrednost možnosti »Največje število dovoljenih asociacij«.","noAssociationsFoundWarning":"V trenutnem obsegu ni nobenih asociacij","refreshAssociations":"Osveži asociacije","widgetLabel":"Asociacije"}
@@ -1 +1 @@
1
- {"enableAssociations":"Prikaži povezivanja","enableConnectivity":"Veze za povezivanje","enableStructuralAttachment":"Povezivanja strukturalnih priloga","maxAllowableAssociations":"Maksimalno dozvoljen broj povezivanja","maxAllowableAssociationsExceededWarning":"Zumirajte na manju oblast ili promenite vrednost opcije 'Maksimalno dozvoljen broj povezivanja'","noAssociationsFoundWarning":"Nema povezivanja u trenutnom obuhvatu","noAssociationTypeSelectedWarning":"Mora da bude naveden barem jedan tip povezivanja","refreshAssociations":"Osveži povezivanja","widgetLabel":"Povezivanja"}
1
+ {"enableAssociations":"Prikaži povezivanja","enableConnectivity":"Veze za povezivanje","enableStructuralAttachment":"Povezivanja strukturalnih priloga","maxAllowableAssociations":"Maksimalno dozvoljen broj povezivanja","maxAllowableAssociationsExceededWarning":"Zumirajte na manju oblast ili promenite vrednost opcije 'Maksimalno dozvoljen broj povezivanja'","noAssociationsFoundWarning":"Nema povezivanja u trenutnom obuhvatu","refreshAssociations":"Osveži povezivanja","widgetLabel":"Povezivanja"}
@@ -1 +1 @@
1
- {"enableAssociations":"Visa associationer","enableConnectivity":"Anslutningsassociationer","enableStructuralAttachment":"Associationer för strukturbilagor","maxAllowableAssociations":"Maximalt antal tillåtna associationer","maxAllowableAssociationsExceededWarning":"Zooma in till ett mindre område eller ändra värdet för alternativet \"Maximalt antal tillåtna associationer\"","noAssociationsFoundWarning":"Det finns inga associationer i aktuell utbredning","noAssociationTypeSelectedWarning":"Minst en associationstyp måste anges","refreshAssociations":"Uppdatera associationer","widgetLabel":"Associationer"}
1
+ {"enableAssociations":"Visa associationer","enableConnectivity":"Anslutningsassociationer","enableStructuralAttachment":"Associationer för strukturbilagor","maxAllowableAssociations":"Maximalt antal tillåtna associationer","maxAllowableAssociationsExceededWarning":"Zooma in till ett mindre område eller ändra värdet för alternativet \"Maximalt antal tillåtna associationer\"","noAssociationsFoundWarning":"Det finns inga associationer i aktuell utbredning","refreshAssociations":"Uppdatera associationer","widgetLabel":"Associationer"}
@@ -1 +1 @@
1
- {"enableAssociations":"ดูการเชื่อมโยง","enableConnectivity":"การเชื่อมโยงการเชื่อมต่อ","enableStructuralAttachment":"การเชื่อมโยงไฟล์แนบเชิงโครงสร้าง","maxAllowableAssociations":"การเชื่อมโยงสูงสุดที่อนุญาต","maxAllowableAssociationsExceededWarning":"ซูมเข้าไปยังพื้นที่ขนาดเล็กลง หรือเปลี่ยนแปลงค่าของตัวเลือก 'การเชื่อมโยงสูงสุดที่อนุญาต'","noAssociationsFoundWarning":"ไม่มีการเชื่อมโยงในขอบเขตปัจจุบัน","noAssociationTypeSelectedWarning":"ต้องระบุการเชื่อมโยงอย่างน้อยหนึ่งประเภท","refreshAssociations":"รีเฟรชการเชื่อมโยง","widgetLabel":"การเชื่อมโยง"}
1
+ {"enableAssociations":"ดูการเชื่อมโยง","enableConnectivity":"การเชื่อมโยงการเชื่อมต่อ","enableStructuralAttachment":"การเชื่อมโยงไฟล์แนบเชิงโครงสร้าง","maxAllowableAssociations":"การเชื่อมโยงสูงสุดที่อนุญาต","maxAllowableAssociationsExceededWarning":"ซูมเข้าไปยังพื้นที่ขนาดเล็กลง หรือเปลี่ยนแปลงค่าของตัวเลือก 'การเชื่อมโยงสูงสุดที่อนุญาต'","noAssociationsFoundWarning":"ไม่มีการเชื่อมโยงในขอบเขตปัจจุบัน","refreshAssociations":"รีเฟรชการเชื่อมโยง","widgetLabel":"การเชื่อมโยง"}
@@ -1 +1 @@
1
- {"enableAssociations":"İlişkilendirmeleri görüntüle","enableConnectivity":"Bağlanırlık ilişkilendirmeleri","enableStructuralAttachment":"Yapısal ek ilişkilendirmeleri","maxAllowableAssociations":"İzin verilen maksimum ilişkilendirme","maxAllowableAssociationsExceededWarning":"Daha küçük bir alana yakınlaştırın veya \"İzin verilen maksimum ilişkilendirme\" seçeneğinin değerini değiştirin","noAssociationsFoundWarning":"Geçerli yayılımda herhangi bir ilişkilendirme yok","noAssociationTypeSelectedWarning":"En az bir ilişkilendirme türü belirtilmelidir","refreshAssociations":"İlişkilendirmeleri yenile","widgetLabel":"İlişkilendirmeler"}
1
+ {"enableAssociations":"İlişkilendirmeleri görüntüle","enableConnectivity":"Bağlanırlık ilişkilendirmeleri","enableStructuralAttachment":"Yapısal ek ilişkilendirmeleri","maxAllowableAssociations":"İzin verilen maksimum ilişkilendirme","maxAllowableAssociationsExceededWarning":"Daha küçük bir alana yakınlaştırın veya \"İzin verilen maksimum ilişkilendirme\" seçeneğinin değerini değiştirin","noAssociationsFoundWarning":"Geçerli yayılımda herhangi bir ilişkilendirme yok","refreshAssociations":"İlişkilendirmeleri yenile","widgetLabel":"İlişkilendirmeler"}
@@ -1 +1 @@
1
- {"enableAssociations":"Перегляд зв'язків","enableConnectivity":"Зв'язки зв'язності","enableStructuralAttachment":"Зв'язки прикріплень до структури","maxAllowableAssociations":"Максимальна кількість допустимих зв'язків","maxAllowableAssociationsExceededWarning":"Збільште масштаб до меншої області або змініть значення параметра «Максимальна кількість допустимих зв'язків».","noAssociationsFoundWarning":"У поточному екстенті немає зв'язків","noAssociationTypeSelectedWarning":"Має бути вказано принаймні один тип зв'язків","refreshAssociations":"Оновити зв'язки","widgetLabel":"Зв'язки"}
1
+ {"enableAssociations":"Перегляд зв'язків","enableConnectivity":"Зв'язки зв'язності","enableStructuralAttachment":"Зв'язки прикріплень до структури","maxAllowableAssociations":"Максимальна кількість допустимих зв'язків","maxAllowableAssociationsExceededWarning":"Збільште масштаб до меншої області або змініть значення параметра «Максимальна кількість допустимих зв'язків».","noAssociationsFoundWarning":"У поточному екстенті немає зв'язків","refreshAssociations":"Оновити зв'язки","widgetLabel":"Зв'язки"}
@@ -1 +1 @@
1
- {"enableAssociations":"Xem liên kết","enableConnectivity":"Liên kết về khả năng kết nối","enableStructuralAttachment":"Liên kết đính kèm có kết cấu","maxAllowableAssociations":"Số lượng liên kết tối đa cho phép","maxAllowableAssociationsExceededWarning":"Phóng to một diện tích nhỏ hơn hoặc thay đổi giá trị tuỳ chọn 'Số lượng liên kết tối đa cho phép'.","noAssociationsFoundWarning":"Không có liên kết nào trong phạm vi hiện tại","noAssociationTypeSelectedWarning":"Phải chỉ định ít nhất một loại liên kết","refreshAssociations":"Làm mới liên kết","widgetLabel":"Liên kết"}
1
+ {"enableAssociations":"Xem liên kết","enableConnectivity":"Liên kết về khả năng kết nối","enableStructuralAttachment":"Liên kết đính kèm có kết cấu","maxAllowableAssociations":"Số lượng liên kết tối đa cho phép","maxAllowableAssociationsExceededWarning":"Phóng to một diện tích nhỏ hơn hoặc thay đổi giá trị tuỳ chọn 'Số lượng liên kết tối đa cho phép'.","noAssociationsFoundWarning":"Không có liên kết nào trong phạm vi hiện tại","refreshAssociations":"Làm mới liên kết","widgetLabel":"Liên kết"}
@@ -1 +1 @@
1
- {"enableAssociations":"查看关联","enableConnectivity":"连通性关联","enableStructuralAttachment":"结构附件关联","maxAllowableAssociations":"最大允许关联","maxAllowableAssociationsExceededWarning":"放大到较小的区域或更改“最大允许关联”选项的值","noAssociationsFoundWarning":"当前范围内没有关联","noAssociationTypeSelectedWarning":"必须至少指定一个关联类型","refreshAssociations":"刷新关联","widgetLabel":"关联"}
1
+ {"enableAssociations":"查看关联","enableConnectivity":"连通性关联","enableStructuralAttachment":"结构附件关联","maxAllowableAssociations":"最大允许关联","maxAllowableAssociationsExceededWarning":"放大到较小的区域或更改“最大允许关联”选项的值","noAssociationsFoundWarning":"当前范围内没有关联","refreshAssociations":"刷新关联","widgetLabel":"关联"}
@@ -1 +1 @@
1
- {"enableAssociations":"檢視關聯","enableConnectivity":"連線關聯","enableStructuralAttachment":"結構附件關聯","maxAllowableAssociations":"允許的最大關聯數","maxAllowableAssociationsExceededWarning":"放大到更小的區域或變更「允許的最大關聯數」選項的值","noAssociationsFoundWarning":"目前範圍中沒有關聯","noAssociationTypeSelectedWarning":"至少必須指定一種關聯類型","refreshAssociations":"重新整理關聯","widgetLabel":"關聯"}
1
+ {"enableAssociations":"檢視關聯","enableConnectivity":"連線關聯","enableStructuralAttachment":"結構附件關聯","maxAllowableAssociations":"允許的最大關聯數","maxAllowableAssociationsExceededWarning":"放大到更小的區域或變更「允許的最大關聯數」選項的值","noAssociationsFoundWarning":"目前範圍中沒有關聯","refreshAssociations":"重新整理關聯","widgetLabel":"關聯"}
@@ -1 +1 @@
1
- {"enableAssociations":"檢視關聯","enableConnectivity":"連線關聯","enableStructuralAttachment":"結構附件關聯","maxAllowableAssociations":"允許的最大關聯數","maxAllowableAssociationsExceededWarning":"放大到更小的區域或變更「允許的最大關聯數」選項的值","noAssociationsFoundWarning":"目前範圍中沒有關聯","noAssociationTypeSelectedWarning":"至少必須指定一種關聯類型","refreshAssociations":"重新整理關聯","widgetLabel":"關聯"}
1
+ {"enableAssociations":"檢視關聯","enableConnectivity":"連線關聯","enableStructuralAttachment":"結構附件關聯","maxAllowableAssociations":"允許的最大關聯數","maxAllowableAssociationsExceededWarning":"放大到更小的區域或變更「允許的最大關聯數」選項的值","noAssociationsFoundWarning":"目前範圍中沒有關聯","refreshAssociations":"重新整理關聯","widgetLabel":"關聯"}
@@ -2,31 +2,33 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- import{addNearFar as e,addLinearDepth as r}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js";import{ShaderOutput as o}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as i}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as t}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{ObjectAndLayerIdColor as s}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import{VertexColor as l}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{OutputDepth as a}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js";import{OutputHighlight as d}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{multipassTerrainTest as n}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import{symbolAlphaCutoff as p}from"../views/3d/webgl-engine/core/shaderLibrary/util/AlphaCutoff.js";import{ColorConversion as g}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{addProjViewLocalOrigin as u}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float4PassUniform as c}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{glsl as h}from"../views/3d/webgl-engine/core/shaderModules/interfaces.js";import{ShaderBuilder as b}from"../views/3d/webgl-engine/core/shaderModules/ShaderBuilder.js";import{TransparencyPassType as m}from"../views/3d/webgl-engine/lib/TransparencyPassType.js";import{VertexAttribute as f}from"../views/3d/webgl-engine/lib/VertexAttribute.js";function w(w){const v=new b,{vertex:C,fragment:j,varyings:y}=v;u(C,w),v.include(t,w),v.include(l,w),v.include(s,w),v.attributes.add(f.POSITION,"vec3"),y.add("vpos","vec3");const L=w.hasMultipassTerrain&&(w.output===o.Color||w.output===o.Alpha);L&&y.add("depth","float");const O=w.output===o.Depth;O&&(v.include(a,w),e(v),r(v)),C.code.add(h`
5
+ import{addNearFar as e,addLinearDepth as r}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js";import{ShaderOutput as o}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as i}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as t}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{ObjectAndLayerIdColor as l}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import{VertexColor as s}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{OutputDepth as a}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js";import{OutputHighlight as d}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{multipassTerrainTest as n}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import{VisualVariables as p}from"../views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js";import{symbolAlphaCutoff as g}from"../views/3d/webgl-engine/core/shaderLibrary/util/AlphaCutoff.js";import{ColorConversion as u}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{addProjViewLocalOrigin as c}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float4PassUniform as v}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{glsl as b}from"../views/3d/webgl-engine/core/shaderModules/interfaces.js";import{ShaderBuilder as h}from"../views/3d/webgl-engine/core/shaderModules/ShaderBuilder.js";import{TransparencyPassType as m}from"../views/3d/webgl-engine/lib/TransparencyPassType.js";import{VertexAttribute as f}from"../views/3d/webgl-engine/lib/VertexAttribute.js";function w(w){const C=new h,{vertex:j,fragment:y,attributes:L,varyings:O}=C;c(j,w),C.include(t,w),C.include(s,w),C.include(p,w),C.include(l,w),L.add(f.POSITION,"vec3"),w.vvColor&&L.add(f.COLORFEATUREATTRIBUTE,"float"),O.add("vColor","vec4"),O.add("vpos","vec3");const T=w.hasMultipassTerrain&&(w.output===o.Color||w.output===o.Alpha);T&&O.add("depth","float"),j.uniforms.add(new v("eColor",(e=>e.color)));const A=w.output===o.Depth;A&&(C.include(a,w),e(C),r(C)),j.code.add(b`
6
6
  void main(void) {
7
7
  vpos = position;
8
8
  forwardNormalizedVertexColor();
9
9
  forwardObjectAndLayerIdColor();
10
- ${L?"depth = (view * vec4(vpos, 1.0)).z;":""}
11
- gl_Position = ${O?h`transformPositionWithDepth(proj, view, vpos, nearFar, linearDepth);`:h`transformPosition(proj, view, vpos);`}
10
+
11
+ ${w.hasVertexColors?"vColor *= eColor;":w.vvColor?"vColor = eColor * interpolateVVColor(colorFeatureAttribute);":"vColor = eColor;"}
12
+ ${T?"depth = (view * vec4(vpos, 1.0)).z;":""}
13
+ gl_Position = ${A?b`transformPositionWithDepth(proj, view, vpos, nearFar, linearDepth);`:b`transformPosition(proj, view, vpos);`}
12
14
  }
13
- `),v.include(i,w),L&&v.include(n,w),j.include(g),j.uniforms.add(new c("eColor",(e=>e.color)));const $=w.output===o.Highlight;return $&&v.include(d,w),j.code.add(h`
15
+ `),C.include(i,w),T&&C.include(n,w),y.include(u);const $=w.output===o.Highlight;return $&&C.include(d,w),y.code.add(b`
14
16
  void main() {
15
17
  discardBySlice(vpos);
16
- ${L?"terrainDepthTest(gl_FragCoord, depth);":""}
17
- vec4 fColor = ${w.hasVertexColors?"vColor * eColor;":"eColor;"}
18
+ ${T?"terrainDepthTest(gl_FragCoord, depth);":""}
19
+ vec4 fColor = vColor;
18
20
 
19
- ${w.output===o.ObjectAndLayerIdColor?h`fColor.a = 1.0;`:""}
21
+ ${w.output===o.ObjectAndLayerIdColor?b`fColor.a = 1.0;`:""}
20
22
 
21
- if (fColor.a < ${h.float(p)}) {
23
+ if (fColor.a < ${b.float(g)}) {
22
24
  discard;
23
25
  }
24
26
 
25
- ${w.output===o.Alpha?h`fragColor = vec4(fColor.a);`:""}
27
+ ${w.output===o.Alpha?b`fragColor = vec4(fColor.a);`:""}
26
28
 
27
- ${w.output===o.Color?h`fragColor = highlightSlice(fColor, vpos); ${w.transparencyPassType===m.Color?"fragColor = premultiplyAlpha(fragColor);":""}`:""}
28
- ${$?h`outputHighlight();`:""};
29
- ${w.output===o.Depth?h`outputDepth(linearDepth);`:""};
30
- ${w.output===o.ObjectAndLayerIdColor?h`outputObjectAndLayerIdColor();`:""}
29
+ ${w.output===o.Color?b`fragColor = highlightSlice(fColor, vpos); ${w.transparencyPassType===m.Color?"fragColor = premultiplyAlpha(fragColor);":""}`:""}
30
+ ${$?b`outputHighlight();`:""};
31
+ ${w.output===o.Depth?b`outputDepth(linearDepth);`:""};
32
+ ${w.output===o.ObjectAndLayerIdColor?b`outputObjectAndLayerIdColor();`:""}
31
33
  }
32
- `),v}const v=Object.freeze(Object.defineProperty({__proto__:null,build:w},Symbol.toStringTag,{value:"Module"}));export{v as C,w as b};
34
+ `),C}const C=Object.freeze(Object.defineProperty({__proto__:null,build:w},Symbol.toStringTag,{value:"Module"}));export{C,w as b};
package/interfaces.d.ts CHANGED
@@ -552,7 +552,7 @@ declare namespace __esri {
552
552
  */
553
553
  startPoint: Point;
554
554
  /**
555
- * Length dimension enables the measurement of linear distances between the specified start and ending points.
555
+ * LengthDimension enables the measurement of linear distances between the specified [start](https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-LengthDimension.html#startPoint) and [end](https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-LengthDimension.html#endPoint) points.
556
556
  *
557
557
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-LengthDimension.html)
558
558
  */
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import t from"../Graphic.js";import r from"../PopupTemplate.js";import"../renderers/ClassBreaksRenderer.js";import"../renderers/DictionaryRenderer.js";import"../renderers/DotDensityRenderer.js";import"../renderers/HeatmapRenderer.js";import"../renderers/PieChartRenderer.js";import"../renderers/Renderer.js";import"../renderers/SimpleRenderer.js";import"../renderers/UniqueValueRenderer.js";import"../renderers/support/jsonUtils.js";import{webSceneRendererTypes as s}from"../renderers/support/types.js";import i from"../request.js";import o from"../core/Collection.js";import a from"../core/Error.js";import n from"../core/Logger.js";import{MultiOriginJSONMixin as l}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as p,isAbortError as d}from"../core/promiseUtils.js";import{whenOnce as u}from"../core/reactiveUtils.js";import{join as y}from"../core/urlUtils.js";import{property as c}from"../core/accessorSupport/decorators/property.js";import"../core/accessorSupport/ensureType.js";import"../core/arrayUtils.js";import"../core/has.js";import{getProperties as h}from"../core/accessorSupport/utils.js";import{reader as f}from"../core/accessorSupport/decorators/reader.js";import{subclass as m}from"../core/accessorSupport/decorators/subclass.js";import{OriginId as g}from"../core/accessorSupport/PropertyOrigin.js";import v from"./Layer.js";import{APIKeyMixin as b}from"./mixins/APIKeyMixin.js";import{ArcGISService as I}from"./mixins/ArcGISService.js";import{EditBusLayer as w}from"./mixins/EditBusLayer.js";import{OperationalLayer as j}from"./mixins/OperationalLayer.js";import{PortalLayer as L}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as S}from"./mixins/ScaleRangeLayer.js";import{SceneService as F,SaveOperationType as O}from"./mixins/SceneService.js";import{zeroCapabilities as T}from"./support/capabilities.js";import{elevationInfo as E,labelsVisible as A,legendEnabled as P,popupEnabled as _,screenSizePerspectiveEnabled as x}from"./support/commonProperties.js";import{FeatureReduction as D}from"./support/FeatureReduction.js";import U from"./support/FeatureReductionSelection.js";import{FetchAssociatedFeatureLayer as R}from"./support/FetchAssociatedFeatureLayer.js";import{defineFieldProperties as C}from"./support/fieldProperties.js";import q from"./support/FieldsIndex.js";import{fixRendererFields as Q,unpackFieldNames as N}from"./support/fieldUtils.js";import{I3SNodePageDefinition as k,I3SMaterialDefinition as G,I3STextureSetDefinition as V,I3SGeometryDefinition as K}from"./support/I3SLayerDefinitions.js";import M from"./support/LabelClass.js";import{reader as $}from"./support/labelingInfo.js";import W from"./support/LayerFloorInfo.js";import{RangeInfo as z}from"./support/RangeInfo.js";import B from"./support/SceneFilter.js";import{loadStyleRenderer as H}from"../renderers/support/styleUtils.js";import Z from"../rest/support/Query.js";import{sceneLayerEditingEnabled as J}from"../support/featureFlags.js";import{createPopupTemplate as X}from"../support/popupUtils.js";import{queryAttributesFromCachedAttributesId as Y}from"../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as ee,getFetchPopupTemplate as te}from"../views/layers/support/popupUtils.js";import{transparencyToOpacity as re}from"../webdoc/support/opacityUtils.js";const se=["3DObject","Point"],ie=C();let oe=class extends(w(F(I(j(L(S(l(b(v))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType="ArcGISSceneServiceLayer",this.type="scene",this.fields=null,this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new o,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getFeatureType(t?.feature)?.domains?.[e];return r&&"inherited"!==r.type?r:this.getField(e)?.domain??null}getFeatureType(e){return null!=e&&null!=this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return null!=this.associatedLayer?this.associatedLayer.types??[]:[]}get typeIdField(){return null!=this.associatedLayer?this.associatedLayer.typeIdField:null}get formTemplate(){return null!=this.associatedLayer?this.associatedLayer.formTemplate:null}get fieldsIndex(){return new q(this.fields)}readNodePages(e,t,r){return"Point"===t.layerType&&(e=t.pointNodePages),null==e||"object"!=typeof e?null:k.fromJSON(e,r)}set elevationInfo(e){this._set("elevationInfo",e),this.loaded&&this._validateElevationInfo()}get geometryType(){return ne[this.profile]||"mesh"}set renderer(e){Q(e,this.fieldsIndex),this._set("renderer",e)}readCachedDrawingInfo(e){return null!=e&&"object"==typeof e||(e={}),null==e.color&&(e.color=!1),e}get capabilities(){const e=null!=this.associatedLayer&&this.associatedLayer.capabilities?this.associatedLayer.capabilities:T,{query:t,editing:{supportsGlobalId:r,supportsRollbackOnFailure:s,supportsUploadWithItemId:i,supportsGeometryUpdate:o,supportsReturnServiceEditsInSourceSpatialReference:a},data:{supportsZ:n,supportsM:l,isVersioned:p,supportsAttachment:d},operations:{supportsEditing:u,supportsAdd:y,supportsUpdate:c,supportsDelete:h,supportsQuery:f,supportsQueryAttachments:m}}=e,g=e.operations.supportsChangeTracking,v=null!=this.associatedLayer&&null!=this.associatedLayer.infoFor3D&&J();return{query:t,editing:{supportsGlobalId:r,supportsReturnServiceEditsInSourceSpatialReference:a,supportsRollbackOnFailure:s,supportsGeometryUpdate:v&&o,supportsUploadWithItemId:i},data:{supportsAttachment:d,supportsZ:n,supportsM:l,isVersioned:p},operations:{supportsQuery:f,supportsQueryAttachments:m,supportsEditing:u&&g,supportsAdd:v&&y&&g,supportsDelete:v&&h&&g,supportsUpdate:c&&g}}}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.userHasEditingPrivileges}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get infoFor3D(){return null!=this.associatedLayer?this.associatedLayer.infoFor3D:null}get defaultPopupTemplate(){return null!=this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some((t=>("esriFieldTypeOID"===t.type&&(e=t.name),!!e))),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some((t=>("esriFieldTypeGlobalID"===t.type&&(e=t.name),!!e))),e||void 0}get displayField(){return null!=this.associatedLayer?this.associatedLayer.displayField:null}readProfile(e,t){const r=t.store.profile;return null!=r&&ae[r]?ae[r]:(n.getLogger(this.declaredClass).error("Unknown or missing profile",{profile:r,layer:this}),"mesh-pyramids")}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(p).then((()=>this._fetchService(t))).then((()=>Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),null!=this.filter?this.filter.loadGeometries(this.spatialReference):null]))).then((()=>this._validateElevationInfo())).then((()=>this._applyAssociatedLayerOverrides())).then((()=>this._populateFieldUsageInfo())).then((()=>H(this,{origin:"service"},t))).then((()=>Q(this.renderer,this.fieldsIndex))).then((()=>this.finishLoadEditablePortalLayer(e)));return this.addResolvingPromise(r),Promise.resolve(this)}async beforeSave(){null!=this.filter&&await this.load()}createQuery(){const e=new Z;return"mesh"!==this.geometryType&&(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e.outFields=["*"],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryExtent(e||this.createQuery(),t)))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatureCount(e||this.createQuery(),t)))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatures(e||this.createQuery(),t))).then((e=>{if(e?.features)for(const t of e.features)t.layer=this,t.sourceLayer=this;return e}))}async queryCachedAttributes(e,t){const r=N(this.fieldsIndex,await ee(this,te(this)));return Y(this.parsedUrl.path,this.attributeStorageInfo??[],e,t,r)}async queryCachedFeature(e,r){const s=await this.queryCachedAttributes(e,[r]);if(!s||0===s.length)throw new a("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const i=new t;return i.attributes=s[0],i.layer=this,i.sourceLayer=this,i}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryObjectIds(e||this.createQuery(),t)))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryAttachments(e,t)))}getFieldUsageInfo(e){const t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(n.getLogger(this.declaredClass).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return X(this,e)}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return null!=e&&e.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),null==this.associatedLayer)throw new a("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new a("scenelayer:query-not-available","SceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return null!=this.statisticsInfo&&this.statisticsInfo.some((t=>t.name===e))}async queryCachedStatistics(e,t){if(await this.load(t),!this.statisticsInfo)throw new a("scenelayer:no-cached-statistics","Cached statistics are not available for this layer");const r=this.fieldsIndex.get(e);if(!r)throw new a("scenelayer:field-unexisting",`Field '${e}' does not exist on the layer`);for(const s of this.statisticsInfo)if(s.name===r.name){const e=y(this.parsedUrl.path,s.href);return i(e,{query:{f:"json",token:this.apiKey},responseType:"json",signal:t?t.signal:null}).then((e=>e.data))}throw new a("scenelayer:no-cached-statistics","Cached statistics for this attribute are not available")}async saveAs(e,t){return this._debouncedSaveOperations(O.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(O.SAVE,e)}async applyEdits(e,t){const r=await import("./graphics/editingSupport.js");if(await this.load(),null==this.associatedLayer)throw new a(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),r.applyEdits(this,this.associatedLayer.source,e,t)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new a(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}on(e,t){return super.on(e,t)}validateLayer(e){if(e.layerType&&!se.includes(e.layerType))throw new a("scenelayer:layer-type-not-supported","SceneLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new a("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});if(this.version.major>2)throw new a("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});function t(e,t){let r=!1,s=!1;if(null==e)r=!0,s=!0;else{const i=t&&t.isGeographic;switch(e){case"east-north-up":case"earth-centered":r=!0,s=i;break;case"vertex-reference-frame":r=!0,s=!i;break;default:r=!1}}if(!r)throw new a("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!s)throw new a("scenelayer:incompatible-normal-reference-frame","Normal reference frame is incompatible with layer spatial reference.")}t(this.normalReferenceFrame,this.spatialReference)}_getTypeKeywords(){const e=[];if("points"===this.profile)e.push("Point");else{if("mesh-pyramids"!==this.profile)throw new a("scenelayer:unknown-profile","SceneLayer:save() encountered an unknown SceneLayer profile: "+this.profile);e.push("3DObject")}return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(const e of this.fields){const t=!(!this.attributeStorageInfo||!this.attributeStorageInfo.some((t=>t.name===e.name))),r=!(null==this.associatedLayer||!this.associatedLayer.fields||!this.associatedLayer.fields.some((t=>t&&e.name===t.name))),s={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||r,supportsLayerQuery:r};this._fieldUsageInfo[e.name]=s}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPopupOverrides()}_applyAssociatedLayerFieldsOverrides(){if(null==this.associatedLayer||!this.associatedLayer.fields)return;let e=null;for(const t of this.associatedLayer.fields){const r=this.getField(t.name);r?(!r.domain&&t.domain&&(r.domain=t.domain.clone()),r.editable=t.editable,r.nullable=t.nullable,r.length=t.length):(e||(e=this.fields?this.fields.slice():[]),e.push(t.clone()))}e&&this._set("fields",e)}_applyAssociatedLayerPopupOverrides(){if(null==this.associatedLayer)return;const e=["popupTemplate","popupEnabled"],t=h(this);for(let r=0;r<e.length;r++){const s=e[r],i=this.originIdOf(s),o=this.associatedLayer.originIdOf(s);i<o&&(o===g.SERVICE||o===g.PORTAL_ITEM)&&t.setAtOrigin(s,this.associatedLayer[s],o)}}async _setAssociatedFeatureLayer(e){if(!["mesh-pyramids","points"].includes(this.profile))return;const t=new R(this.parsedUrl,this.portalItem,this.apiKey,e);try{this.associatedLayer=await t.fetch()}catch(r){d(r)||this._logWarningOnPopupEnabled()}}async _logWarningOnPopupEnabled(){await u((()=>this.popupEnabled&&null!=this.popupTemplate));const e=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?n.getLogger(this.declaredClass).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${e}`):n.getLogger(this.declaredClass).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${e}`)}_validateElevationInfo(){const e=this.elevationInfo;e&&("mesh-pyramids"===this.profile&&"relative-to-scene"===e.mode&&n.getLogger(this.declaredClass).warn(".elevationInfo=","Mesh scene layers don't support relative-to-scene elevation mode"),e.featureExpressionInfo&&"0"!==e.featureExpressionInfo.expression&&n.getLogger(this.declaredClass).warn(".elevationInfo=","Scene layers do not support featureExpressionInfo"))}};e([c({types:{key:"type",base:D,typeMap:{selection:U}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:!0},"portal-item":{name:"layerDefinition.featureReduction",write:!0}}}})],oe.prototype,"featureReduction",void 0),e([c({type:[z],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}}})],oe.prototype,"rangeInfos",void 0),e([c({json:{read:!1}})],oe.prototype,"associatedLayer",void 0),e([c({type:["show","hide"]})],oe.prototype,"listMode",void 0),e([c({type:["ArcGISSceneServiceLayer"]})],oe.prototype,"operationalLayerType",void 0),e([c({json:{read:!1},readOnly:!0})],oe.prototype,"type",void 0),e([c({...ie.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],oe.prototype,"fields",void 0),e([c()],oe.prototype,"types",null),e([c()],oe.prototype,"typeIdField",null),e([c()],oe.prototype,"formTemplate",null),e([c({readOnly:!0})],oe.prototype,"fieldsIndex",null),e([c({type:W,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],oe.prototype,"floorInfo",void 0),e([c(ie.outFields)],oe.prototype,"outFields",void 0),e([c({type:k,readOnly:!0,json:{read:!1}})],oe.prototype,"nodePages",void 0),e([f("service","nodePages",["nodePages","pointNodePages"])],oe.prototype,"readNodePages",null),e([c({type:[G],readOnly:!0})],oe.prototype,"materialDefinitions",void 0),e([c({type:[V],readOnly:!0})],oe.prototype,"textureSetDefinitions",void 0),e([c({type:[K],readOnly:!0})],oe.prototype,"geometryDefinitions",void 0),e([c({readOnly:!0})],oe.prototype,"serviceUpdateTimeStamp",void 0),e([c({readOnly:!0})],oe.prototype,"attributeStorageInfo",void 0),e([c({readOnly:!0})],oe.prototype,"statisticsInfo",void 0),e([c({type:o.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],oe.prototype,"excludeObjectIds",void 0),e([c({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],oe.prototype,"definitionExpression",void 0),e([c({type:B,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],oe.prototype,"filter",void 0),e([c({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],oe.prototype,"path",void 0),e([c(E)],oe.prototype,"elevationInfo",null),e([c({type:String})],oe.prototype,"geometryType",null),e([c(A)],oe.prototype,"labelsVisible",void 0),e([c({type:[M],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:$},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:$},write:!0}})],oe.prototype,"labelingInfo",void 0),e([c(P)],oe.prototype,"legendEnabled",void 0),e([c({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:["opacity","layerDefinition.drawingInfo.transparency"],reader(e,t){if("number"==typeof e&&e>=0&&e<=1)return e;const r=t.layerDefinition?.drawingInfo?.transparency;return void 0!==r?re(r):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],oe.prototype,"opacity",void 0),e([c({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],oe.prototype,"priority",void 0),e([c({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],oe.prototype,"semantic",void 0),e([c({types:s,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],oe.prototype,"renderer",null),e([c({json:{read:!1}})],oe.prototype,"cachedDrawingInfo",void 0),e([f("service","cachedDrawingInfo")],oe.prototype,"readCachedDrawingInfo",null),e([c({readOnly:!0,json:{read:!1}})],oe.prototype,"capabilities",null),e([c({type:Boolean,json:{read:!1}})],oe.prototype,"editingEnabled",null),e([c({readOnly:!0,json:{write:!1,read:!1}})],oe.prototype,"infoFor3D",null),e([c(_)],oe.prototype,"popupEnabled",void 0),e([c({type:r,json:{name:"popupInfo",write:!0}})],oe.prototype,"popupTemplate",void 0),e([c({readOnly:!0,json:{read:!1}})],oe.prototype,"defaultPopupTemplate",null),e([c({type:String,json:{read:!1}})],oe.prototype,"objectIdField",void 0),e([f("service","objectIdField",["objectIdField","fields"])],oe.prototype,"readObjectIdField",null),e([c({type:String,json:{read:!1}})],oe.prototype,"globalIdField",void 0),e([f("service","globalIdField",["globalIdField","fields"])],oe.prototype,"readGlobalIdField",null),e([c({readOnly:!0,type:String,json:{read:!1}})],oe.prototype,"displayField",null),e([c({type:String,json:{read:!1}})],oe.prototype,"profile",void 0),e([f("service","profile",["store.profile"])],oe.prototype,"readProfile",null),e([c({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],oe.prototype,"normalReferenceFrame",void 0),e([c(x)],oe.prototype,"screenSizePerspectiveEnabled",void 0),oe=e([m("esri.layers.SceneLayer")],oe);const ae={"mesh-pyramids":"mesh-pyramids",meshpyramids:"mesh-pyramids","features-meshes":"mesh-pyramids",points:"points","features-points":"points",lines:"lines","features-lines":"lines",polygons:"polygons","features-polygons":"polygons"},ne={"mesh-pyramids":"mesh",points:"point",lines:"polyline",polygons:"polygon"},le=oe;export{le as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import t from"../Graphic.js";import r from"../PopupTemplate.js";import"../renderers/ClassBreaksRenderer.js";import"../renderers/DictionaryRenderer.js";import"../renderers/DotDensityRenderer.js";import"../renderers/HeatmapRenderer.js";import"../renderers/PieChartRenderer.js";import"../renderers/Renderer.js";import"../renderers/SimpleRenderer.js";import"../renderers/UniqueValueRenderer.js";import"../renderers/support/jsonUtils.js";import{webSceneRendererTypes as s}from"../renderers/support/types.js";import o from"../request.js";import i from"../core/Collection.js";import a from"../core/Error.js";import n from"../core/Logger.js";import{MultiOriginJSONMixin as p}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as l,isAbortError as d}from"../core/promiseUtils.js";import{whenOnce as u}from"../core/reactiveUtils.js";import{join as y}from"../core/urlUtils.js";import{property as c}from"../core/accessorSupport/decorators/property.js";import"../core/accessorSupport/ensureType.js";import"../core/arrayUtils.js";import"../core/has.js";import{getProperties as f}from"../core/accessorSupport/utils.js";import{reader as h}from"../core/accessorSupport/decorators/reader.js";import{subclass as m}from"../core/accessorSupport/decorators/subclass.js";import{OriginId as g}from"../core/accessorSupport/PropertyOrigin.js";import v from"./Layer.js";import{APIKeyMixin as b}from"./mixins/APIKeyMixin.js";import{ArcGISService as I}from"./mixins/ArcGISService.js";import{EditBusLayer as w}from"./mixins/EditBusLayer.js";import{OperationalLayer as j}from"./mixins/OperationalLayer.js";import{PortalLayer as L}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as S}from"./mixins/ScaleRangeLayer.js";import{SceneService as F,SaveOperationType as O}from"./mixins/SceneService.js";import{zeroCapabilities as T}from"./support/capabilities.js";import{elevationInfo as E,labelsVisible as A,legendEnabled as P,popupEnabled as _,screenSizePerspectiveEnabled as x}from"./support/commonProperties.js";import{FeatureReduction as D}from"./support/FeatureReduction.js";import U from"./support/FeatureReductionSelection.js";import{FetchAssociatedFeatureLayer as R}from"./support/FetchAssociatedFeatureLayer.js";import{defineFieldProperties as C}from"./support/fieldProperties.js";import q from"./support/FieldsIndex.js";import{fixRendererFields as Q,unpackFieldNames as N}from"./support/fieldUtils.js";import{I3SNodePageDefinition as k,I3SMaterialDefinition as G,I3STextureSetDefinition as V,I3SGeometryDefinition as K}from"./support/I3SLayerDefinitions.js";import M from"./support/LabelClass.js";import{reader as $}from"./support/labelingInfo.js";import W from"./support/LayerFloorInfo.js";import{RangeInfo as z}from"./support/RangeInfo.js";import B from"./support/SceneFilter.js";import{loadStyleRenderer as H}from"../renderers/support/styleUtils.js";import Z from"../rest/support/Query.js";import{sceneLayerEditingEnabled as J}from"../support/featureFlags.js";import{createPopupTemplate as X}from"../support/popupUtils.js";import{queryAttributesFromCachedAttributesId as Y}from"../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as ee,getFetchPopupTemplate as te}from"../views/layers/support/popupUtils.js";import{transparencyToOpacity as re}from"../webdoc/support/opacityUtils.js";const se=["3DObject","Point"],oe=C();let ie=class extends(w(F(I(j(L(S(p(b(v))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType="ArcGISSceneServiceLayer",this.type="scene",this.fields=null,this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new i,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getFeatureType(t?.feature)?.domains?.[e];return r&&"inherited"!==r.type?r:this.getField(e)?.domain??null}getFeatureType(e){return e&&this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return this.associatedLayer?.types??[]}get typeIdField(){return this.associatedLayer?.typeIdField??null}get templates(){return this.associatedLayer?.templates??null}get formTemplate(){return this.associatedLayer?.formTemplate??null}get fieldsIndex(){return new q(this.fields)}readNodePages(e,t,r){return"Point"===t.layerType&&(e=t.pointNodePages),null==e||"object"!=typeof e?null:k.fromJSON(e,r)}set elevationInfo(e){this._set("elevationInfo",e),this.loaded&&this._validateElevationInfo()}get geometryType(){return ne[this.profile]||"mesh"}set renderer(e){Q(e,this.fieldsIndex),this._set("renderer",e)}readCachedDrawingInfo(e){return null!=e&&"object"==typeof e||(e={}),null==e.color&&(e.color=!1),e}get capabilities(){const e=this.associatedLayer?.capabilities??T,{query:t,editing:{supportsGlobalId:r,supportsRollbackOnFailure:s,supportsUploadWithItemId:o,supportsGeometryUpdate:i,supportsReturnServiceEditsInSourceSpatialReference:a},data:{supportsZ:n,supportsM:p,isVersioned:l,supportsAttachment:d},operations:{supportsEditing:u,supportsAdd:y,supportsUpdate:c,supportsDelete:f,supportsQuery:h,supportsQueryAttachments:m}}=e,g=e.operations.supportsChangeTracking,v=!!this.associatedLayer?.infoFor3D&&J();return{query:t,editing:{supportsGlobalId:r,supportsReturnServiceEditsInSourceSpatialReference:a,supportsRollbackOnFailure:s,supportsGeometryUpdate:v&&i,supportsUploadWithItemId:o},data:{supportsAttachment:d,supportsZ:n,supportsM:p,isVersioned:l},operations:{supportsQuery:h,supportsQueryAttachments:m,supportsEditing:u&&g,supportsAdd:v&&y&&g,supportsDelete:v&&f&&g,supportsUpdate:c&&g}}}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.userHasEditingPrivileges}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}get defaultPopupTemplate(){return this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some((t=>("esriFieldTypeOID"===t.type&&(e=t.name),!!e))),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some((t=>("esriFieldTypeGlobalID"===t.type&&(e=t.name),!!e))),e||void 0}get displayField(){return this.associatedLayer?.displayField??null}readProfile(e,t){const r=t.store.profile;return null!=r&&ae[r]?ae[r]:(n.getLogger(this.declaredClass).error("Unknown or missing profile",{profile:r,layer:this}),"mesh-pyramids")}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(l).then((()=>this._fetchService(t))).then((()=>Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),null!=this.filter?this.filter.loadGeometries(this.spatialReference):null]))).then((()=>this._validateElevationInfo())).then((()=>this._applyAssociatedLayerOverrides())).then((()=>this._populateFieldUsageInfo())).then((()=>H(this,{origin:"service"},t))).then((()=>Q(this.renderer,this.fieldsIndex))).then((()=>this.finishLoadEditablePortalLayer(e)));return this.addResolvingPromise(r),Promise.resolve(this)}async beforeSave(){null!=this.filter&&await this.load()}createQuery(){const e=new Z;return"mesh"!==this.geometryType&&(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e.outFields=["*"],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryExtent(e||this.createQuery(),t)))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatureCount(e||this.createQuery(),t)))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatures(e||this.createQuery(),t))).then((e=>{if(e?.features)for(const t of e.features)t.layer=this,t.sourceLayer=this;return e}))}async queryCachedAttributes(e,t){const r=N(this.fieldsIndex,await ee(this,te(this)));return Y(this.parsedUrl.path,this.attributeStorageInfo??[],e,t,r)}async queryCachedFeature(e,r){const s=await this.queryCachedAttributes(e,[r]);if(!s||0===s.length)throw new a("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const o=new t;return o.attributes=s[0],o.layer=this,o.sourceLayer=this,o}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryObjectIds(e||this.createQuery(),t)))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryAttachments(e,t)))}getFieldUsageInfo(e){const t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(n.getLogger(this.declaredClass).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return X(this,e)}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return e?.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),!this.associatedLayer)throw new a("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new a("scenelayer:query-not-available","SceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return null!=this.statisticsInfo&&this.statisticsInfo.some((t=>t.name===e))}async queryCachedStatistics(e,t){if(await this.load(t),!this.statisticsInfo)throw new a("scenelayer:no-cached-statistics","Cached statistics are not available for this layer");const r=this.fieldsIndex.get(e);if(!r)throw new a("scenelayer:field-unexisting",`Field '${e}' does not exist on the layer`);for(const s of this.statisticsInfo)if(s.name===r.name){const e=y(this.parsedUrl.path,s.href);return o(e,{query:{f:"json",token:this.apiKey},responseType:"json",signal:t?t.signal:null}).then((e=>e.data))}throw new a("scenelayer:no-cached-statistics","Cached statistics for this attribute are not available")}async saveAs(e,t){return this._debouncedSaveOperations(O.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(O.SAVE,e)}async applyEdits(e,t){const r=await import("./graphics/editingSupport.js");if(await this.load(),!this.associatedLayer)throw new a(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),r.applyEdits(this,this.associatedLayer.source,e,t)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new a(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}on(e,t){return super.on(e,t)}validateLayer(e){if(e.layerType&&!se.includes(e.layerType))throw new a("scenelayer:layer-type-not-supported","SceneLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new a("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});if(this.version.major>2)throw new a("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});function t(e,t){let r=!1,s=!1;if(null==e)r=!0,s=!0;else{const o=t&&t.isGeographic;switch(e){case"east-north-up":case"earth-centered":r=!0,s=o;break;case"vertex-reference-frame":r=!0,s=!o;break;default:r=!1}}if(!r)throw new a("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!s)throw new a("scenelayer:incompatible-normal-reference-frame","Normal reference frame is incompatible with layer spatial reference.")}t(this.normalReferenceFrame,this.spatialReference)}_getTypeKeywords(){const e=[];if("points"===this.profile)e.push("Point");else{if("mesh-pyramids"!==this.profile)throw new a("scenelayer:unknown-profile","SceneLayer:save() encountered an unknown SceneLayer profile: "+this.profile);e.push("3DObject")}return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(const e of this.fields){const t=!(!this.attributeStorageInfo||!this.attributeStorageInfo.some((t=>t.name===e.name))),r=!!this.associatedLayer?.fields?.some((t=>t&&e.name===t.name)),s={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||r,supportsLayerQuery:r};this._fieldUsageInfo[e.name]=s}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPopupOverrides()}_applyAssociatedLayerFieldsOverrides(){if(!this.associatedLayer?.fields)return;let e=null;for(const t of this.associatedLayer.fields){const r=this.getField(t.name);r?(!r.domain&&t.domain&&(r.domain=t.domain.clone()),r.editable=t.editable,r.nullable=t.nullable,r.length=t.length):(e||(e=this.fields?this.fields.slice():[]),e.push(t.clone()))}e&&this._set("fields",e)}_applyAssociatedLayerPopupOverrides(){if(!this.associatedLayer)return;const e=["popupTemplate","popupEnabled"],t=f(this);for(let r=0;r<e.length;r++){const s=e[r],o=this.originIdOf(s),i=this.associatedLayer.originIdOf(s);o<i&&(i===g.SERVICE||i===g.PORTAL_ITEM)&&t.setAtOrigin(s,this.associatedLayer[s],i)}}async _setAssociatedFeatureLayer(e){if(!["mesh-pyramids","points"].includes(this.profile))return;const t=new R(this.parsedUrl,this.portalItem,this.apiKey,e);try{this.associatedLayer=await t.fetch()}catch(r){d(r)||this._logWarningOnPopupEnabled()}}async _logWarningOnPopupEnabled(){await u((()=>this.popupEnabled&&null!=this.popupTemplate));const e=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?n.getLogger(this.declaredClass).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${e}`):n.getLogger(this.declaredClass).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${e}`)}_validateElevationInfo(){const e=this.elevationInfo;e&&("mesh-pyramids"===this.profile&&"relative-to-scene"===e.mode&&n.getLogger(this.declaredClass).warn(".elevationInfo=","Mesh scene layers don't support relative-to-scene elevation mode"),e.featureExpressionInfo&&"0"!==e.featureExpressionInfo.expression&&n.getLogger(this.declaredClass).warn(".elevationInfo=","Scene layers do not support featureExpressionInfo"))}};e([c({types:{key:"type",base:D,typeMap:{selection:U}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:!0},"portal-item":{name:"layerDefinition.featureReduction",write:!0}}}})],ie.prototype,"featureReduction",void 0),e([c({type:[z],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}}})],ie.prototype,"rangeInfos",void 0),e([c({json:{read:!1}})],ie.prototype,"associatedLayer",void 0),e([c({type:["show","hide"]})],ie.prototype,"listMode",void 0),e([c({type:["ArcGISSceneServiceLayer"]})],ie.prototype,"operationalLayerType",void 0),e([c({json:{read:!1},readOnly:!0})],ie.prototype,"type",void 0),e([c({...oe.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],ie.prototype,"fields",void 0),e([c()],ie.prototype,"types",null),e([c()],ie.prototype,"typeIdField",null),e([c()],ie.prototype,"templates",null),e([c()],ie.prototype,"formTemplate",null),e([c({readOnly:!0})],ie.prototype,"fieldsIndex",null),e([c({type:W,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],ie.prototype,"floorInfo",void 0),e([c(oe.outFields)],ie.prototype,"outFields",void 0),e([c({type:k,readOnly:!0,json:{read:!1}})],ie.prototype,"nodePages",void 0),e([h("service","nodePages",["nodePages","pointNodePages"])],ie.prototype,"readNodePages",null),e([c({type:[G],readOnly:!0})],ie.prototype,"materialDefinitions",void 0),e([c({type:[V],readOnly:!0})],ie.prototype,"textureSetDefinitions",void 0),e([c({type:[K],readOnly:!0})],ie.prototype,"geometryDefinitions",void 0),e([c({readOnly:!0})],ie.prototype,"serviceUpdateTimeStamp",void 0),e([c({readOnly:!0})],ie.prototype,"attributeStorageInfo",void 0),e([c({readOnly:!0})],ie.prototype,"statisticsInfo",void 0),e([c({type:i.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],ie.prototype,"excludeObjectIds",void 0),e([c({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],ie.prototype,"definitionExpression",void 0),e([c({type:B,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],ie.prototype,"filter",void 0),e([c({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],ie.prototype,"path",void 0),e([c(E)],ie.prototype,"elevationInfo",null),e([c({type:String})],ie.prototype,"geometryType",null),e([c(A)],ie.prototype,"labelsVisible",void 0),e([c({type:[M],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:$},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:$},write:!0}})],ie.prototype,"labelingInfo",void 0),e([c(P)],ie.prototype,"legendEnabled",void 0),e([c({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:["opacity","layerDefinition.drawingInfo.transparency"],reader(e,t){if("number"==typeof e&&e>=0&&e<=1)return e;const r=t.layerDefinition?.drawingInfo?.transparency;return void 0!==r?re(r):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],ie.prototype,"opacity",void 0),e([c({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],ie.prototype,"priority",void 0),e([c({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],ie.prototype,"semantic",void 0),e([c({types:s,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],ie.prototype,"renderer",null),e([c({json:{read:!1}})],ie.prototype,"cachedDrawingInfo",void 0),e([h("service","cachedDrawingInfo")],ie.prototype,"readCachedDrawingInfo",null),e([c({readOnly:!0,json:{read:!1}})],ie.prototype,"capabilities",null),e([c({type:Boolean,json:{read:!1}})],ie.prototype,"editingEnabled",null),e([c({readOnly:!0,json:{write:!1,read:!1}})],ie.prototype,"infoFor3D",null),e([c(_)],ie.prototype,"popupEnabled",void 0),e([c({type:r,json:{name:"popupInfo",write:!0}})],ie.prototype,"popupTemplate",void 0),e([c({readOnly:!0,json:{read:!1}})],ie.prototype,"defaultPopupTemplate",null),e([c({type:String,json:{read:!1}})],ie.prototype,"objectIdField",void 0),e([h("service","objectIdField",["objectIdField","fields"])],ie.prototype,"readObjectIdField",null),e([c({type:String,json:{read:!1}})],ie.prototype,"globalIdField",void 0),e([h("service","globalIdField",["globalIdField","fields"])],ie.prototype,"readGlobalIdField",null),e([c({readOnly:!0,type:String,json:{read:!1}})],ie.prototype,"displayField",null),e([c({type:String,json:{read:!1}})],ie.prototype,"profile",void 0),e([h("service","profile",["store.profile"])],ie.prototype,"readProfile",null),e([c({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],ie.prototype,"normalReferenceFrame",void 0),e([c(x)],ie.prototype,"screenSizePerspectiveEnabled",void 0),ie=e([m("esri.layers.SceneLayer")],ie);const ae={"mesh-pyramids":"mesh-pyramids",meshpyramids:"mesh-pyramids","features-meshes":"mesh-pyramids",points:"points","features-points":"points",lines:"lines","features-lines":"lines",polygons:"polygons","features-polygons":"polygons"},ne={"mesh-pyramids":"mesh",points:"point",lines:"polyline",polygons:"polygon"},pe=ie;export{pe 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.27/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import{result as i}from"../../../core/asyncUtils.js";import r from"../../../core/Collection.js";import"../../../core/has.js";import s from"../../../core/Error.js";import a from"../../../core/Handles.js";import{clone as l}from"../../../core/lang.js";import n from"../../../core/Logger.js";import{destroyMaybe as o,removeMaybe as h,abortMaybe as c}from"../../../core/maybe.js";import{EsriPromiseMixin as u}from"../../../core/Promise.js";import{createAbortError as d,isAbortError as m,eachAlways as p}from"../../../core/promiseUtils.js";import{initial as _,whenOnce as f,watch as y,syncAndInitial as g,sync as x}from"../../../core/reactiveUtils.js";import{property as F}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as v}from"../../../core/accessorSupport/decorators/subclass.js";import{WatchUpdatingTracking as T}from"../../../core/support/WatchUpdatingTracking.js";import{isHostedAgolService as E}from"../../support/arcgisLayerUrl.js";import{getEffectiveLayerCapabilities as w}from"../../support/layerUtils.js";import{projectGeometry as C}from"../../../portal/support/geometryServiceUtils.js";import D from"../../../rest/support/StatisticDefinition.js";import{FeatureTileFetcher3D as b}from"../../../views/3d/layers/support/FeatureTileFetcher3D.js";import{FeatureTileFetcher3DDebugger as S}from"../../../views/3d/layers/support/FeatureTileFetcher3DDebugger.js";import O from"../../../views/3d/support/debugFlags.js";let I=class extends(u(t)){set extent(e){if(null!=e&&!e.spatialReference.equals(this.layerView.view.spatialReference))return void n.getLogger(this.declaredClass).error("#extent=","extent needs to be in the same spatial reference as the view");const t=this._get("extent");if(t===e)return;if(null!=t&&e&&t.equals(e))return;const i=null!=e?e.clone():null;this._set("extent",i)}get updating(){return!!(null!=this._tileFetcher&&this._tileFetcher.updating||null!=this._fetchDataInfoPromise||"tiles"===this.mode&&this.layerView.view.featureTiles&&this.layerView.view.featureTiles.updating||this._watchUpdatingTracking&&this._watchUpdatingTracking.updating)}get updatingTotal(){return this.updating&&null!=this._tileFetcher?this._tileFetcher.updatingTotal:0}get updatingRemaining(){return this.updating&&null!=this._tileFetcher?this._tileFetcher.updatingRemaining:0}get expectedFeatureDiff(){return this.updating&&null!=this._tileFetcher?this._tileFetcher.expectedFeatureDiff:0}get memoryForUnusedFeatures(){return null!=this._tileFetcher?this._tileFetcher.memoryForUnusedFeatures:0}get maximumNumberOfFeaturesExceeded(){return!(null==this._tileFetcher||!this._tileFetcher.maximumNumberOfFeaturesExceeded)}get maximumNumberOfFeatures(){return null!=this.displayFeatureLimit?this.displayFeatureLimit.maximumNumberOfFeatures:0}set maximumNumberOfFeatures(e){e!==this.maximumNumberOfFeatures&&this._overrideIfSome("maximumNumberOfFeatures",e)}get hasMaximumNumberOfFeaturesOverride(){return this._isOverridden("maximumNumberOfFeatures")}get mode(){const e=this.layerView.layer;if("feature"===e.type&&null!=e.infoFor3D)return"snapshot";if(!1===this.layerView.view.qualitySettings?.graphics3D?.snapshotAvailable||this.serviceDataCount===P.NO_SERVICE_DATA_COUNT||this.vertexLimitExceeded)return"tiles";const t=this.layerView.view,i=t&&t.featureTiles,r=i&&i.tilingScheme;if(e&&e.minScale&&this.serviceDataExtent&&r){const t=this._approximateExtentSizeAtScale(e.minScale,r);if((this.serviceDataExtent.width/t+this.serviceDataExtent.height/t)/2>P.MAX_SNAPSHOT_MIN_SCALE_FACTOR)return"tiles"}return!this.maximumNumberOfFeatures||this.serviceDataCount<=this.maximumNumberOfFeatures?"snapshot":"tiles"}get maxTotalSnapshotVertices(){const e=this._get("maxTotalSnapshotVertices")||0,t="snapshot"===this.mode&&null!=this._tileFetcher&&this._tileFetcher.totalVertices||0;return Math.max(e,t)}_approximateExtentSizeAtScale(e,t){const i=this.layerView.view,r=Math.ceil((i.width/t.pixelSize+i.height/t.pixelSize)/2),s=t.levels[0];return r*((s.tileSize[0]/(s.scale/e)+s.tileSize[1]/(s.scale/e))/2)}get tileDescriptors(){return"snapshot"===this.mode?new r([{id:"dummy-tile-full-extent",lij:[0,0,0]}]):this.layerView.view.featureTiles?this.layerView.view.featureTiles.tiles:new r}get test(){return{fetchDataInfoPromise:this._fetchDataInfoPromise,tileFetcher:this._tileFetcher}}constructor(e){super(e),this.type="feature-tile-3d",this._watchUpdatingTracking=new T,this.serviceDataExtent=null,this.serviceDataCount=P.NO_SERVICE_DATA_COUNT,this.vertexLimitExceeded=!1,this.displayFeatureLimit=null,this._suspended=!1,this._tileFetcher=null,this._handles=new a,this._fetchDataInfoPromise=null,this._fetchDataInfoAbortController=null,this._lifeCycleAbortController=new AbortController}initialize(){this._watchUpdatingTracking.add((()=>this.vertexLimitInfo),(()=>this._watchUpdatingTracking.addPromise(this._updateVertexLimitExceeded(null,this._lifeCycleAbortController.signal)))),this._watchUpdatingTracking.add((()=>this.mode),(()=>this._modeChanged()),_),this.addResolvingPromise(Promise.resolve().then((()=>this._verifyCapabilities())).then((()=>this._watchUpdatingTracking.addPromise(this._fetchServiceDataInfo()))).then((()=>this._initializeTileFetcher())))}_verifyCapabilities(){const e=this.layerView.layer;if("ogc-feature"!==e.type&&!w(e)?.operations.supportsQuery)throw new s("graphicscontroller:query-capability-required","Service requires query capabilities to be used as a feature layer",{layer:e})}destroy(){this._cancelFetchServiceDataInfo(),this._tileFetcher=o(this._tileFetcher),this._handles=o(this._handles),this._tilesHandle=h(this._tilesHandle),this._lifeCycleAbortController=c(this._lifeCycleAbortController),this._watchUpdatingTracking.destroy(),this._set("_watchUpdatingTracking",null)}suspend(){this._suspended||(this._suspended=!0,null!=this._tileFetcher&&this._tileFetcher.suspend())}resume(){this._suspended&&(this._suspended=!1,null!=this._tileFetcher&&this._tileFetcher.resume())}restart(){const e=()=>{null!=this._tileFetcher&&this._tileFetcher.restart()};this._watchUpdatingTracking.addPromise(this._fetchServiceDataInfo().then(e,e))}refetch(){const e=()=>{null!=this._tileFetcher&&this._tileFetcher.refetch()};this._watchUpdatingTracking.addPromise(this._fetchServiceDataInfo().then(e,e))}_initializeTileFetcher(){const e=this.layerView.view;if(!e)return;const t=f((()=>e.featureTiles?.tilingScheme),this._lifeCycleAbortController.signal);this._watchUpdatingTracking.addPromise(t),t.then((()=>{const{layerView:t,tileDescriptors:i}=this,r=t.layer,s=new b({context:this.context,filterExtent:this.extent,tileDescriptors:i,features:this.graphics});this._tileFetcher=s,this._suspended?this._tileFetcher.suspend():this._tileFetcher.resume();const a=this.layerView.view.resourceController;a&&this._handles.add(y((()=>a.memoryController.memoryFactor),(e=>s.memoryFactor=e),g));const l="polygon"===this.context.geometryType?"polygonLodFactor":"polyline"===this.context.geometryType?"polylineLodFactor":null;l&&this._handles.add(y((()=>this.layerView.view?.qualitySettings?.graphics3D?.[l]),(e=>s.lodFactor=e||1),_));const n=e=>{s.maximumNumberOfFeatures=e,s.useTileCount=this.serviceDataCount>e},o=e=>s.useTileCount=e>this.maximumNumberOfFeatures;"ogc-feature"!==r.type&&this._watchUpdatingTracking.add((()=>r.createQueryVersion),(()=>this._dataFilterChanged())),this._watchUpdatingTracking.add((()=>t.availableFields),((e,t)=>this._availableFieldsChanged(t,e))),this._watchUpdatingTracking.add((()=>t.requiredFields),((e,t)=>this._requiredFieldsChanged(t,e))),this._handles.add([r.on("apply-edits",(e=>this._applyEdits(e))),y((()=>this.extent),(e=>s.filterExtent=e),x),y((()=>this.tileDescriptors),(e=>s.tileDescriptors=e),x),y((()=>this.maximumNumberOfFeatures),n,g),y((()=>this.serviceDataCount),o,g),y((()=>O.FEATURE_TILE_FETCH_SHOW_TILES),(t=>{t&&s&&!s.debugger?(s.debugger=new S(s,e.featureTiles.tilingScheme.toTileInfo(),e),s.debugger.update()):!t&&this._tileFetcher&&s.debugger&&(s.debugger.destroy(),s.debugger=null)}),g)]),this._supportsExceedsLimitQuery||this._watchUpdatingTracking.add((()=>this.maxTotalSnapshotVertices),(()=>this._watchUpdatingTracking.addPromise(this._updateVertexLimitExceeded(null,this._lifeCycleAbortController.signal))))})).catch((()=>{}))}_modeChanged(){switch(this.mode){case"tiles":this._tilesHandle||(this._tilesHandle=this.layerView.view.featureTiles.addClient());break;default:n.getLogger(this.declaredClass).warn("Unhandled feature layer mode "+this.mode);case"snapshot":null!=this._tilesHandle&&(this._tilesHandle.remove(),this._tilesHandle=null)}}_dataFilterChanged(){this._set("maxTotalSnapshotVertices",0),this.notifyChange("maxTotalSnapshotVertices"),this.refetch()}_applyEdits(e){null!=this._tileFetcher&&this._tileFetcher.applyEdits(e).then((e=>{if(e){if(!this._lifeCycleAbortController)throw d();(e.deletedFeatures.length||e.updatedFeatures.length||e.addedFeatures.length)&&this._watchUpdatingTracking.addPromise(this._updateServiceDataExtent(this._lifeCycleAbortController.signal))}})).catch((e=>{if(!m(e))throw e}))}_availableFieldsChanged(e,t){null!=this._tileFetcher&&L(this._tileFetcher.availableFields,t)&&this.refetch()}_requiredFieldsChanged(e,t){null!=this._tileFetcher&&L(this._tileFetcher.availableFields,t)&&this.restart()}_createVertexLimitExceededQuery(e){const t=this.layerView.layer,i=t.createQuery();return i.outStatistics=[new D({statisticType:"exceedslimit",maxVertexCount:e,outStatisticFieldName:"exceedslimit",maxPointCount:1e8,maxRecordCount:1e8})],t.capabilities?.query.supportsCacheHint&&(i.cacheHint=!0),i}_createDataInfoQuery(){const e=this.layerView.layer,t=e.createQuery();return t.outSpatialReference=this.layerView.view.spatialReference,e.capabilities?.query.supportsCacheHint&&(t.cacheHint=!0),t}_fullExtentIsAccurate(){const e=this.layerView.layer;if(e.definitionExpression)return!1;switch(e.type){case"feature":case"oriented-imagery":return E(e.url);case"csv":case"geojson":case"ogc-feature":case"wfs":return!0;default:return}}async _updateServiceDataExtent(e){try{await this._tryUpdateServiceDataExtent(e)}catch(t){m(t)||this._set("serviceDataExtent",l(this.layerView.fullExtentInLocalViewSpatialReference))}}async _tryUpdateServiceDataExtent(e){const t=this.layerView,i=t.layer,r=i.capabilities?.query.supportsExtent??!1,s=l(t.fullExtentInLocalViewSpatialReference),a=i.fullExtent,n=this._fullExtentIsAccurate(),o=this.serviceDataCount;if(r&&o<=P.MAX_FEATURE_COUNT_FOR_EXTENT&&(!s||!n)&&"queryExtent"in i){const t=this._createDataInfoQuery(),r=await i.queryExtent(t,{timeout:P.QUERY_EXTENT_TIMEOUT,signal:e});this._set("serviceDataExtent",r.extent)}else if(s)this._set("serviceDataExtent",s);else if(null!=a){const r="portalItem"in i?i.portalItem:null,s=await C(a,t.view.spatialReference,r,e);this._set("serviceDataExtent",s)}else this._set("serviceDataExtent",null)}async _updateServiceDataCount(e){const t=this.layerView.layer;if(!("queryFeatureCount"in t))return void this._set("serviceDataCount",P.NO_SERVICE_DATA_COUNT);const r=await i(t.queryFeatureCount(this._createDataInfoQuery(),{timeout:P.QUERY_STATISTICS_TIMEOUT,signal:e}));if(!0===r.ok)this._set("serviceDataCount",r.value);else{if(m(r.error))throw r.error;this._set("serviceDataCount",P.NO_SERVICE_DATA_COUNT)}}get vertexLimitInfo(){if(null==this.displayFeatureLimit||null==this.displayFeatureLimit.averageSymbolComplexity)return null;const{averageSymbolComplexity:e,maximumTotalNumberOfPrimitives:t}=this.displayFeatureLimit,{primitivesPerCoordinate:i,primitivesPerFeature:r}=e,s=this._get("vertexLimitInfo");return null==s||s.maximumTotalNumberOfPrimitives!==t||s.primitivesPerCoordinate!==i||s.primitivesPerFeature!==r?{primitivesPerCoordinate:i,primitivesPerFeature:r,maximumTotalNumberOfPrimitives:t}:s}get _supportsExceedsLimitQuery(){const e=this.layerView.layer;return null!=e.capabilities&&e.capabilities.operations&&e.capabilities.operations.supportsExceedsLimitStatistics}get _minimumNumberOfVerticesForGeometry(){switch(this.layerView.layer.geometryType){case"point":case"multipoint":return 1;case"polygon":return 4;case"polyline":return 2;case"multipatch":case"mesh":return 3;default:return 0}}async _updateVertexLimitExceeded(e,t){const r=this.vertexLimitInfo;if(null==r)return void this._set("vertexLimitExceeded",!1);const s=r.primitivesPerFeature<=0,a=this._minimumNumberOfVerticesForGeometry>1;if(!s&&!a)return void this._set("vertexLimitExceeded",!1);const{primitivesPerFeature:l,primitivesPerCoordinate:n,maximumTotalNumberOfPrimitives:o}=r;let h;0!==l&&null!=e&&await e;const c=this.serviceDataCount,u=c!==P.NO_SERVICE_DATA_COUNT;if(h=u?Math.ceil((o-c*l)/(n||1)):Math.ceil(o/(n||1)),a&&(h=Math.min(h,N)),u&&this._minimumNumberOfVerticesForGeometry*c>h)return void this._set("vertexLimitExceeded",!0);if(!this._supportsExceedsLimitQuery)return void this._set("vertexLimitExceeded",this.maxTotalSnapshotVertices>h);const d=await i(this.layerView.layer.queryFeatures(this._createVertexLimitExceededQuery(h),{timeout:P.QUERY_STATISTICS_TIMEOUT,signal:t}));if(!1===d.ok){if(m(d.error))throw d.error;return void this._set("vertexLimitExceeded",!1)}const p=d.value.features[0];p&&p.attributes?this._set("vertexLimitExceeded",!!p.attributes.exceedslimit):this._set("vertexLimitExceeded",!1)}async _fetchServiceDataInfo(){this._cancelFetchServiceDataInfo();let e=new AbortController;const t=e.signal,i=this._updateServiceDataCount(t),r=p([i,this._updateVertexLimitExceeded(i,t)]),s=r.then((()=>this._updateServiceDataExtent(t))).catch((e=>{m(e)||n.getLogger(this.declaredClass).error("#fetchServiceDataInfo()",e)})).then((()=>{s===this._fetchDataInfoPromise&&(this._fetchDataInfoPromise=null,this._fetchDataInfoAbortController=null),e=null}));return e&&(this._fetchDataInfoPromise=s),this._fetchDataInfoAbortController=e,r.then((()=>{}),(()=>{}))}_cancelFetchServiceDataInfo(){const e=this._fetchDataInfoAbortController;e&&(this._fetchDataInfoAbortController=null,this._fetchDataInfoPromise=null,e.abort())}get debug(){return{storedFeatures:null!=this._tileFetcher?this._tileFetcher.storedFeatures:0,totalFeatures:null!=this._tileFetcher?this._tileFetcher.totalFeatures:0,totalVertices:null!=this._tileFetcher?this._tileFetcher.totalVertices:0,missingTiles:null!=this._tileFetcher?this._tileFetcher.missingTiles:0}}};e([F({readOnly:!0})],I.prototype,"type",void 0),e([F({constructOnly:!0})],I.prototype,"graphics",void 0),e([F({constructOnly:!0})],I.prototype,"layerView",void 0),e([F({constructOnly:!0})],I.prototype,"context",void 0),e([F()],I.prototype,"extent",null),e([F()],I.prototype,"updating",null),e([F({readOnly:!0})],I.prototype,"_watchUpdatingTracking",void 0),e([F()],I.prototype,"updatingTotal",null),e([F()],I.prototype,"updatingRemaining",null),e([F()],I.prototype,"expectedFeatureDiff",null),e([F()],I.prototype,"memoryForUnusedFeatures",null),e([F()],I.prototype,"maximumNumberOfFeaturesExceeded",null),e([F({readOnly:!0})],I.prototype,"serviceDataExtent",void 0),e([F({readOnly:!0})],I.prototype,"serviceDataCount",void 0),e([F({readOnly:!0})],I.prototype,"vertexLimitExceeded",void 0),e([F()],I.prototype,"displayFeatureLimit",void 0),e([F({type:Number})],I.prototype,"maximumNumberOfFeatures",null),e([F({readOnly:!0})],I.prototype,"mode",null),e([F({readOnly:!0})],I.prototype,"maxTotalSnapshotVertices",null),e([F({readOnly:!0,dependsOn:["mode"]})],I.prototype,"tileDescriptors",null),e([F()],I.prototype,"_tileFetcher",void 0),e([F()],I.prototype,"_fetchDataInfoPromise",void 0),e([F({readOnly:!0})],I.prototype,"vertexLimitInfo",null),I=e([v("esri.layers.graphics.controllers.FeatureTileController3D")],I);const V=1e4,U=12e3,A=1e4,N=5e6;function L(e,t){if(!t)return!1;for(const i of t)if(!e.has(i))return!0;return!1}var P;!function(e){function t(){e.MAX_FEATURE_COUNT_FOR_EXTENT=V,e.QUERY_STATISTICS_TIMEOUT=U,e.QUERY_EXTENT_TIMEOUT=A}e.NO_SERVICE_DATA_COUNT=1/0,e.MAX_SNAPSHOT_MIN_SCALE_FACTOR=5,e.reset=t}(P||(P={})),P.reset();export{I as FeatureTileController3D,P as FeatureTileController3DConstants};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import{result as i}from"../../../core/asyncUtils.js";import r from"../../../core/Collection.js";import"../../../core/has.js";import s from"../../../core/Error.js";import a from"../../../core/Handles.js";import{clone as l}from"../../../core/lang.js";import n from"../../../core/Logger.js";import{destroyMaybe as o,removeMaybe as h,abortMaybe as c}from"../../../core/maybe.js";import{EsriPromiseMixin as u}from"../../../core/Promise.js";import{createAbortError as d,isAbortError as m,eachAlways as p}from"../../../core/promiseUtils.js";import{initial as _,whenOnce as f,watch as y,syncAndInitial as g,sync as x}from"../../../core/reactiveUtils.js";import{property as F}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as v}from"../../../core/accessorSupport/decorators/subclass.js";import{WatchUpdatingTracking as T}from"../../../core/support/WatchUpdatingTracking.js";import{isHostedAgolService as E}from"../../support/arcgisLayerUrl.js";import{getEffectiveLayerCapabilities as w}from"../../support/layerUtils.js";import{projectGeometry as C}from"../../../portal/support/geometryServiceUtils.js";import D from"../../../rest/support/StatisticDefinition.js";import{FeatureTileFetcher3D as b}from"../../../views/3d/layers/support/FeatureTileFetcher3D.js";import{FeatureTileFetcher3DDebugger as S}from"../../../views/3d/layers/support/FeatureTileFetcher3DDebugger.js";import O from"../../../views/3d/support/debugFlags.js";let I=class extends(u(t)){set extent(e){if(null!=e&&!e.spatialReference.equals(this.layerView.view.spatialReference))return void n.getLogger(this.declaredClass).error("#extent=","extent needs to be in the same spatial reference as the view");const t=this._get("extent");if(t===e)return;if(null!=t&&e&&t.equals(e))return;const i=null!=e?e.clone():null;this._set("extent",i)}get updating(){return!!(null!=this._tileFetcher&&this._tileFetcher.updating||null!=this._fetchDataInfoPromise||"tiles"===this.mode&&this.layerView.view.featureTiles&&this.layerView.view.featureTiles.updating||this._watchUpdatingTracking&&this._watchUpdatingTracking.updating)}get updatingTotal(){return this.updating&&null!=this._tileFetcher?this._tileFetcher.updatingTotal:0}get updatingRemaining(){return this.updating&&null!=this._tileFetcher?this._tileFetcher.updatingRemaining:0}get expectedFeatureDiff(){return this.updating&&null!=this._tileFetcher?this._tileFetcher.expectedFeatureDiff:0}get memoryForUnusedFeatures(){return null!=this._tileFetcher?this._tileFetcher.memoryForUnusedFeatures:0}get maximumNumberOfFeaturesExceeded(){return!(null==this._tileFetcher||!this._tileFetcher.maximumNumberOfFeaturesExceeded)}get maximumNumberOfFeatures(){return null!=this.displayFeatureLimit?this.displayFeatureLimit.maximumNumberOfFeatures:0}set maximumNumberOfFeatures(e){e!==this.maximumNumberOfFeatures&&this._overrideIfSome("maximumNumberOfFeatures",e)}get hasMaximumNumberOfFeaturesOverride(){return this._isOverridden("maximumNumberOfFeatures")}get mode(){const e=this.layerView.layer;if("feature"===e.type&&null!=e.infoFor3D)return"snapshot";if(!1===this.layerView.view.qualitySettings?.graphics3D?.snapshotAvailable||this.serviceDataCount===P.NO_SERVICE_DATA_COUNT||this.vertexLimitExceeded)return"tiles";const t=this.layerView.view,i=t&&t.featureTiles,r=i&&i.tilingScheme;if(e&&e.minScale&&this.serviceDataExtent&&r){const t=this._approximateExtentSizeAtScale(e.minScale,r);if((this.serviceDataExtent.width/t+this.serviceDataExtent.height/t)/2>P.MAX_SNAPSHOT_MIN_SCALE_FACTOR)return"tiles"}return!this.maximumNumberOfFeatures||this.serviceDataCount<=this.maximumNumberOfFeatures?"snapshot":"tiles"}get maxTotalSnapshotVertices(){const e=this._get("maxTotalSnapshotVertices")||0,t="snapshot"===this.mode&&null!=this._tileFetcher&&this._tileFetcher.totalVertices||0;return Math.max(e,t)}_approximateExtentSizeAtScale(e,t){const i=this.layerView.view,r=Math.ceil((i.width/t.pixelSize+i.height/t.pixelSize)/2),s=t.levels[0];return r*((s.tileSize[0]/(s.scale/e)+s.tileSize[1]/(s.scale/e))/2)}get tileDescriptors(){return"snapshot"===this.mode?new r([{id:"dummy-tile-full-extent",lij:[0,0,0]}]):this.layerView.view.featureTiles?this.layerView.view.featureTiles.tiles:new r}get test(){return{fetchDataInfoPromise:this._fetchDataInfoPromise,tileFetcher:this._tileFetcher}}constructor(e){super(e),this.type="feature-tile-3d",this._watchUpdatingTracking=new T,this.serviceDataExtent=null,this.serviceDataCount=P.NO_SERVICE_DATA_COUNT,this.vertexLimitExceeded=!1,this.displayFeatureLimit=null,this._suspended=!1,this._tileFetcher=null,this._handles=new a,this._fetchDataInfoPromise=null,this._fetchDataInfoAbortController=null,this._lifeCycleAbortController=new AbortController}initialize(){this._watchUpdatingTracking.add((()=>this.vertexLimitInfo),(()=>this._watchUpdatingTracking.addPromise(this._updateVertexLimitExceeded(null,this._lifeCycleAbortController.signal)))),this._watchUpdatingTracking.add((()=>this.mode),(()=>this._modeChanged()),_),this.addResolvingPromise(Promise.resolve().then((()=>this._verifyCapabilities())).then((()=>this._watchUpdatingTracking.addPromise(this._fetchServiceDataInfo()))).then((()=>this._initializeTileFetcher())))}_verifyCapabilities(){const e=this.layerView.layer;if("ogc-feature"!==e.type&&!w(e)?.operations.supportsQuery)throw new s("graphicscontroller:query-capability-required","Service requires query capabilities to be used as a feature layer",{layer:e})}destroy(){this._cancelFetchServiceDataInfo(),this._tileFetcher=o(this._tileFetcher),this._handles=o(this._handles),this._tilesHandle=h(this._tilesHandle),this._lifeCycleAbortController=c(this._lifeCycleAbortController),this._watchUpdatingTracking.destroy(),this._set("_watchUpdatingTracking",null)}suspend(){this._suspended||(this._suspended=!0,null!=this._tileFetcher&&this._tileFetcher.suspend())}resume(){this._suspended&&(this._suspended=!1,null!=this._tileFetcher&&this._tileFetcher.resume())}restart(){const e=()=>{null!=this._tileFetcher&&this._tileFetcher.restart()};this._watchUpdatingTracking.addPromise(this._fetchServiceDataInfo().then(e,e))}refetch(){const e=()=>{null!=this._tileFetcher&&this._tileFetcher.refetch()};this._watchUpdatingTracking.addPromise(this._fetchServiceDataInfo().then(e,e))}_initializeTileFetcher(){const e=this.layerView.view;if(!e)return;const t=f((()=>e.featureTiles?.tilingScheme),this._lifeCycleAbortController.signal);this._watchUpdatingTracking.addPromise(t),t.then((()=>{const{layerView:t,tileDescriptors:i}=this,r=t.layer,s=new b({context:this.context,filterExtent:this.extent,tileDescriptors:i,features:this.graphics});this._tileFetcher=s,this._suspended?this._tileFetcher.suspend():this._tileFetcher.resume();const a=this.layerView.view.resourceController;a&&this._handles.add(y((()=>a.memoryController?.memoryFactor),(e=>s.memoryFactor=e),g));const l="polygon"===this.context.geometryType?"polygonLodFactor":"polyline"===this.context.geometryType?"polylineLodFactor":null;l&&this._handles.add(y((()=>this.layerView.view?.qualitySettings?.graphics3D?.[l]),(e=>s.lodFactor=e||1),_));const n=e=>{s.maximumNumberOfFeatures=e,s.useTileCount=this.serviceDataCount>e},o=e=>s.useTileCount=e>this.maximumNumberOfFeatures;"ogc-feature"!==r.type&&this._watchUpdatingTracking.add((()=>r.createQueryVersion),(()=>this._dataFilterChanged())),this._watchUpdatingTracking.add((()=>t.availableFields),((e,t)=>this._availableFieldsChanged(t,e))),this._watchUpdatingTracking.add((()=>t.requiredFields),((e,t)=>this._requiredFieldsChanged(t,e))),this._handles.add([r.on("apply-edits",(e=>this._applyEdits(e))),y((()=>this.extent),(e=>s.filterExtent=e),x),y((()=>this.tileDescriptors),(e=>s.tileDescriptors=e),x),y((()=>this.maximumNumberOfFeatures),n,g),y((()=>this.serviceDataCount),o,g),y((()=>O.FEATURE_TILE_FETCH_SHOW_TILES),(t=>{t&&s&&!s.debugger?(s.debugger=new S(s,e.featureTiles.tilingScheme.toTileInfo(),e),s.debugger.update()):!t&&this._tileFetcher&&s.debugger&&(s.debugger.destroy(),s.debugger=null)}),g)]),this._supportsExceedsLimitQuery||this._watchUpdatingTracking.add((()=>this.maxTotalSnapshotVertices),(()=>this._watchUpdatingTracking.addPromise(this._updateVertexLimitExceeded(null,this._lifeCycleAbortController.signal))))})).catch((()=>{}))}_modeChanged(){switch(this.mode){case"tiles":this._tilesHandle||(this._tilesHandle=this.layerView.view.featureTiles.addClient());break;default:n.getLogger(this.declaredClass).warn("Unhandled feature layer mode "+this.mode);case"snapshot":null!=this._tilesHandle&&(this._tilesHandle.remove(),this._tilesHandle=null)}}_dataFilterChanged(){this._set("maxTotalSnapshotVertices",0),this.notifyChange("maxTotalSnapshotVertices"),this.refetch()}_applyEdits(e){null!=this._tileFetcher&&this._tileFetcher.applyEdits(e).then((e=>{if(e){if(!this._lifeCycleAbortController)throw d();(e.deletedFeatures.length||e.updatedFeatures.length||e.addedFeatures.length)&&this._watchUpdatingTracking.addPromise(this._updateServiceDataExtent(this._lifeCycleAbortController.signal))}})).catch((e=>{if(!m(e))throw e}))}_availableFieldsChanged(e,t){null!=this._tileFetcher&&L(this._tileFetcher.availableFields,t)&&this.refetch()}_requiredFieldsChanged(e,t){null!=this._tileFetcher&&L(this._tileFetcher.availableFields,t)&&this.restart()}_createVertexLimitExceededQuery(e){const t=this.layerView.layer,i=t.createQuery();return i.outStatistics=[new D({statisticType:"exceedslimit",maxVertexCount:e,outStatisticFieldName:"exceedslimit",maxPointCount:1e8,maxRecordCount:1e8})],t.capabilities?.query.supportsCacheHint&&(i.cacheHint=!0),i}_createDataInfoQuery(){const e=this.layerView.layer,t=e.createQuery();return t.outSpatialReference=this.layerView.view.spatialReference,e.capabilities?.query.supportsCacheHint&&(t.cacheHint=!0),t}_fullExtentIsAccurate(){const e=this.layerView.layer;if(e.definitionExpression)return!1;switch(e.type){case"feature":case"oriented-imagery":return E(e.url);case"csv":case"geojson":case"ogc-feature":case"wfs":return!0;default:return}}async _updateServiceDataExtent(e){try{await this._tryUpdateServiceDataExtent(e)}catch(t){m(t)||this._set("serviceDataExtent",l(this.layerView.fullExtentInLocalViewSpatialReference))}}async _tryUpdateServiceDataExtent(e){const t=this.layerView,i=t.layer,r=i.capabilities?.query.supportsExtent??!1,s=l(t.fullExtentInLocalViewSpatialReference),a=i.fullExtent,n=this._fullExtentIsAccurate(),o=this.serviceDataCount;if(r&&o<=P.MAX_FEATURE_COUNT_FOR_EXTENT&&(!s||!n)&&"queryExtent"in i){const t=this._createDataInfoQuery(),r=await i.queryExtent(t,{timeout:P.QUERY_EXTENT_TIMEOUT,signal:e});this._set("serviceDataExtent",r.extent)}else if(s)this._set("serviceDataExtent",s);else if(null!=a){const r="portalItem"in i?i.portalItem:null,s=await C(a,t.view.spatialReference,r,e);this._set("serviceDataExtent",s)}else this._set("serviceDataExtent",null)}async _updateServiceDataCount(e){const t=this.layerView.layer;if(!("queryFeatureCount"in t))return void this._set("serviceDataCount",P.NO_SERVICE_DATA_COUNT);const r=await i(t.queryFeatureCount(this._createDataInfoQuery(),{timeout:P.QUERY_STATISTICS_TIMEOUT,signal:e}));if(!0===r.ok)this._set("serviceDataCount",r.value);else{if(m(r.error))throw r.error;this._set("serviceDataCount",P.NO_SERVICE_DATA_COUNT)}}get vertexLimitInfo(){if(null==this.displayFeatureLimit||null==this.displayFeatureLimit.averageSymbolComplexity)return null;const{averageSymbolComplexity:e,maximumTotalNumberOfPrimitives:t}=this.displayFeatureLimit,{primitivesPerCoordinate:i,primitivesPerFeature:r}=e,s=this._get("vertexLimitInfo");return null==s||s.maximumTotalNumberOfPrimitives!==t||s.primitivesPerCoordinate!==i||s.primitivesPerFeature!==r?{primitivesPerCoordinate:i,primitivesPerFeature:r,maximumTotalNumberOfPrimitives:t}:s}get _supportsExceedsLimitQuery(){const e=this.layerView.layer;return null!=e.capabilities&&e.capabilities.operations&&e.capabilities.operations.supportsExceedsLimitStatistics}get _minimumNumberOfVerticesForGeometry(){switch(this.layerView.layer.geometryType){case"point":case"multipoint":return 1;case"polygon":return 4;case"polyline":return 2;case"multipatch":case"mesh":return 3;default:return 0}}async _updateVertexLimitExceeded(e,t){const r=this.vertexLimitInfo;if(null==r)return void this._set("vertexLimitExceeded",!1);const s=r.primitivesPerFeature<=0,a=this._minimumNumberOfVerticesForGeometry>1;if(!s&&!a)return void this._set("vertexLimitExceeded",!1);const{primitivesPerFeature:l,primitivesPerCoordinate:n,maximumTotalNumberOfPrimitives:o}=r;let h;0!==l&&null!=e&&await e;const c=this.serviceDataCount,u=c!==P.NO_SERVICE_DATA_COUNT;if(h=u?Math.ceil((o-c*l)/(n||1)):Math.ceil(o/(n||1)),a&&(h=Math.min(h,N)),u&&this._minimumNumberOfVerticesForGeometry*c>h)return void this._set("vertexLimitExceeded",!0);if(!this._supportsExceedsLimitQuery)return void this._set("vertexLimitExceeded",this.maxTotalSnapshotVertices>h);const d=await i(this.layerView.layer.queryFeatures(this._createVertexLimitExceededQuery(h),{timeout:P.QUERY_STATISTICS_TIMEOUT,signal:t}));if(!1===d.ok){if(m(d.error))throw d.error;return void this._set("vertexLimitExceeded",!1)}const p=d.value.features[0];p&&p.attributes?this._set("vertexLimitExceeded",!!p.attributes.exceedslimit):this._set("vertexLimitExceeded",!1)}async _fetchServiceDataInfo(){this._cancelFetchServiceDataInfo();let e=new AbortController;const t=e.signal,i=this._updateServiceDataCount(t),r=p([i,this._updateVertexLimitExceeded(i,t)]),s=r.then((()=>this._updateServiceDataExtent(t))).catch((e=>{m(e)||n.getLogger(this.declaredClass).error("#fetchServiceDataInfo()",e)})).then((()=>{s===this._fetchDataInfoPromise&&(this._fetchDataInfoPromise=null,this._fetchDataInfoAbortController=null),e=null}));return e&&(this._fetchDataInfoPromise=s),this._fetchDataInfoAbortController=e,r.then((()=>{}),(()=>{}))}_cancelFetchServiceDataInfo(){const e=this._fetchDataInfoAbortController;e&&(this._fetchDataInfoAbortController=null,this._fetchDataInfoPromise=null,e.abort())}get debug(){return{storedFeatures:null!=this._tileFetcher?this._tileFetcher.storedFeatures:0,totalFeatures:null!=this._tileFetcher?this._tileFetcher.totalFeatures:0,totalVertices:null!=this._tileFetcher?this._tileFetcher.totalVertices:0,missingTiles:null!=this._tileFetcher?this._tileFetcher.missingTiles:0}}};e([F({readOnly:!0})],I.prototype,"type",void 0),e([F({constructOnly:!0})],I.prototype,"graphics",void 0),e([F({constructOnly:!0})],I.prototype,"layerView",void 0),e([F({constructOnly:!0})],I.prototype,"context",void 0),e([F()],I.prototype,"extent",null),e([F()],I.prototype,"updating",null),e([F({readOnly:!0})],I.prototype,"_watchUpdatingTracking",void 0),e([F()],I.prototype,"updatingTotal",null),e([F()],I.prototype,"updatingRemaining",null),e([F()],I.prototype,"expectedFeatureDiff",null),e([F()],I.prototype,"memoryForUnusedFeatures",null),e([F()],I.prototype,"maximumNumberOfFeaturesExceeded",null),e([F({readOnly:!0})],I.prototype,"serviceDataExtent",void 0),e([F({readOnly:!0})],I.prototype,"serviceDataCount",void 0),e([F({readOnly:!0})],I.prototype,"vertexLimitExceeded",void 0),e([F()],I.prototype,"displayFeatureLimit",void 0),e([F({type:Number})],I.prototype,"maximumNumberOfFeatures",null),e([F({readOnly:!0})],I.prototype,"mode",null),e([F({readOnly:!0})],I.prototype,"maxTotalSnapshotVertices",null),e([F({readOnly:!0,dependsOn:["mode"]})],I.prototype,"tileDescriptors",null),e([F()],I.prototype,"_tileFetcher",void 0),e([F()],I.prototype,"_fetchDataInfoPromise",void 0),e([F({readOnly:!0})],I.prototype,"vertexLimitInfo",null),I=e([v("esri.layers.graphics.controllers.FeatureTileController3D")],I);const V=1e4,U=12e3,A=1e4,N=5e6;function L(e,t){if(!t)return!1;for(const i of t)if(!e.has(i))return!0;return!1}var P;!function(e){function t(){e.MAX_FEATURE_COUNT_FOR_EXTENT=V,e.QUERY_STATISTICS_TIMEOUT=U,e.QUERY_EXTENT_TIMEOUT=A}e.NO_SERVICE_DATA_COUNT=1/0,e.MAX_SNAPSHOT_MIN_SCALE_FACTOR=5,e.reset=t}(P||(P={})),P.reset();export{I as FeatureTileController3D,P as FeatureTileController3DConstants};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/core",
3
- "version": "4.27.0-next.20230320",
3
+ "version": "4.27.0-next.20230321",
4
4
  "homepage": "https://js.arcgis.com",
5
5
  "description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
6
6
  "keywords": [
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- const f="20230320",b="08242b8ff69786109ad422955b0890df4746422c";export{f as buildDate,b as commitHash};
5
+ const d="20230321",b="81d27c557d60d73825d3cb6eae7df76ba385400b";export{d as buildDate,b as commitHash};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../../../chunks/tslib.es6.js";import e from"../../../../analysis/SlicePlane.js";import{clock as i}from"../../../../core/clock.js";import a from"../../../../core/Handles.js";import{releaseMaybe as s,destroyMaybe as n,removeMaybe as r}from"../../../../core/maybe.js";import{watch as l,sync as o,syncAndInitial as h}from"../../../../core/reactiveUtils.js";import{addFrameTask as p}from"../../../../core/scheduling.js";import{createScreenPoint as u,screenPointObjectToArray as c,createScreenPointArray as d}from"../../../../core/screenUtils.js";import{property as _}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{subclass as v}from"../../../../core/accessorSupport/decorators/subclass.js";import{d as P,E as y,m}from"../../../../chunks/mat4.js";import{e as g,l as w,c as f,g as M,a as D,m as T,n as V,s as b}from"../../../../chunks/vec3.js";import{a as k,c as E}from"../../../../chunks/vec3f64.js";import{a as S,c as H,n as x,f as I}from"../../../../chunks/boundedPlane.js";import{signedDistance as R,create as j,intersectRay as O,normal as C}from"../../../../geometry/support/plane.js";import{create as z}from"../../../../geometry/support/ray.js";import{sv3d as G,sm4d as U,sv2d as L}from"../../../../geometry/support/vectorStacks.js";import{POINTER_MOVE_TIMER_MS as A,PLANE_PREVIEW_OUTLINE_WIDTH as K,forceVerticalModifier as B,forceHorizontalModifier as F,PLANE_OUTLINE_COLOR as N,PLANE_BACKGROUND_COLOR as q,PREVIEW_FADE_DOT_THRESHOLD as Z,PREVIEW_FADE_DURATION_SECONDS as J,INITIAL_DEPTH_OFFSET_FRAC as Q}from"./sliceToolConfig.js";import{createShiftManipulator as W,createRotateManipulator as X,createResizeManipulator as Y,createGridVisualElement as $,createOutlineVisualElement as tt,planeToShape as et,createRotatePlane as it,RotationAxis as at,resizePlane as st,calculatePlaneHalfSize as nt,SliceOrientation as rt,createPlane as lt,DidPointerMoveRecentlyFlag as ot,calculateBoundedPlaneTranslateRotate as ht,updateShiftRestartHandle as pt,updateRotateHeadingHandle as ut,updateRotateTiltHandle as ct,updateResizeHandle as dt,createShiftPlane as _t}from"./sliceToolUtils.js";import{getRotateHeadingTexture as vt,getTiltRotateTexture as Pt}from"./images/Factory.js";import{calculateInputRotationTransform as yt}from"../../interactive/manipulatorUtils.js";import{screenToRenderPlane as mt}from"../../interactive/editingTools/dragEventPipeline3D.js";import{fromScreen as gt}from"../../support/geometryUtils/ray.js";import{newIntersector as wt}from"../../webgl-engine/lib/Intersector.js";import{StoreResults as ft}from"../../webgl-engine/lib/IntersectorInterfaces.js";import{AnalysisToolBase as Mt}from"../../../interactive/AnalysisToolBase.js";import{createManipulatorDragEventPipeline as Dt}from"../../../interactive/dragEventPipeline.js";import{createScreenPointFromEvent as Tt}from"../../../support/screenUtils.js";var Vt;let bt=Vt=class extends Mt{constructor(t){super(t),this._clock=i,this._previewPlaneOpacity=1,this.removeIncompleteOnCancel=!1,this.layersMode="none",this.shiftManipulator=null,this.rotateHeadingManipulator=null,this.rotateTiltManipulator=null,this.resizeManipulators=null,this._handles=new a,this._viewHandles=new a,this._frameTask=null,this._pointerMoveTimerMs=A,this._prevPointerMoveTimeout=null,this._previewPlaneGridVisualElement=null,this._previewPlaneOutlineVisualElement=null,this._startPlane=S(),this._previewPlane=null,this._activeKeyModifiers={},this._lastCursorPosition=u(),this._resizeHandles=[{direction:[1,0]},{direction:[1,1]},{direction:[0,1]},{direction:[-1,1]},{direction:[-1,0]},{direction:[-1,-1]},{direction:[0,-1]},{direction:[1,-1]}],this._intersector=wt(t.view.state.viewingMode),this._intersector.options.store=ft.MIN}initialize(){if(null==this.analysis)throw new Error("SliceTool requires valid analysis, but null was provided.");const t=!this.view._stage?.renderView.renderingContext.driverTest.svgPremultipliesAlpha.result;this._rotateHeadingImage=vt(this.view.toolViewManager.textures,{premultiplyAlpha:t}),this._rotateTiltImage=Pt(this.view.toolViewManager.textures);const e=t=>{this._updateManipulatorsInteractive(t),t.grabbing||(null!=this.analysisViewData.plane&&H(this.analysisViewData.plane,this._startPlane),this.inputState=null)};this.shiftManipulator=W(this.view),this.manipulators.add(this.shiftManipulator),this.shiftManipulator.events.on("grab-changed",(t=>{this._onShiftGrab(t),e(this.shiftManipulator)})),this._handles.add(this._createShiftDragPipeline(this.shiftManipulator)),this.rotateHeadingManipulator=X(this.view,this._rotateHeadingImage.texture),this.manipulators.add(this.rotateHeadingManipulator),this.rotateHeadingManipulator.events.on("grab-changed",(t=>{this._onRotateHeadingGrab(t),e(this.rotateHeadingManipulator)})),this._handles.add(this._createRotateHeadingDragPipeline(this.rotateHeadingManipulator)),this.rotateTiltManipulator=X(this.view,this._rotateTiltImage.texture),this.manipulators.add(this.rotateTiltManipulator),this.rotateTiltManipulator.events.on("grab-changed",(t=>{this._onRotateTiltGrab(t),e(this.rotateTiltManipulator)})),this._handles.add(this._createRotateTiltDragPipeline(this.rotateTiltManipulator)),this.resizeManipulators=this._resizeHandles.map(((t,i)=>{const a=Y(this.view,t);return a.events.on("grab-changed",(t=>{this._onResizeGrab(t,i),e(a)})),this._handles.add(this._createResizeDragPipeline(a)),a})),this.manipulators.addMany(this.resizeManipulators),this._previewPlaneGridVisualElement=$(this.view),this._previewPlaneOutlineVisualElement=tt(this.view),this._previewPlaneOutlineVisualElement.width=K,this._handles.add(l((()=>this.analysisViewData.plane),(()=>this._updateManipulators()),o));const i=l((()=>this.state),(t=>{"sliced"===t&&this.finishToolCreation()}),h);this._handles.add([i,l((()=>this.view.state.camera),(()=>this._onCameraChange()))])}destroy(){this._rotateHeadingImage=s(this._rotateHeadingImage),this._rotateTiltImage=s(this._rotateTiltImage),this._handles=n(this._handles),this._viewHandles=n(this._viewHandles),this._removeFrameTask(),this._clearPointerMoveTimeout(),this._previewPlaneOutlineVisualElement=n(this._previewPlaneOutlineVisualElement),this._previewPlaneGridVisualElement=n(this._previewPlaneGridVisualElement)}get state(){const t=!!this.analysisViewData.plane,e=!!this.inputState;return t?t&&e?"slicing":t&&!e?"sliced":"ready":"ready"}get cursor(){return this._isPlacingSlicePlane||"exclude"===this.layersMode?"crosshair":null!=this._creatingPointerId?"grabbing":null}set analysis(t){if(null==t)throw new Error("SliceTool requires valid analysis, but null was provided.");this._handles.remove("analysis"),this._set("analysis",t)}get inputState(){return this._get("inputState")}set inputState(t){this._set("inputState",t),this.analysisViewData.showGrid=null!=t&&"resize"===t.type,this._updateMaterials()}get _isPlacingSlicePlane(){return!this.inputState&&!this.analysisViewData.plane&&this.active}get _creatingPointerId(){return null!=this.inputState&&"shift"===this.inputState.type?this.inputState.creatingPointerId:null}enterExcludeLayerMode(){null!=this.analysisViewData.plane&&(this._set("layersMode","exclude"),this.active||(this.view.activeTool=this))}exitExcludeLayerMode(){null!=this.analysisViewData.plane&&(this._set("layersMode","none"),this.active&&(this.view.activeTool=null))}onDeactivate(){this._set("layersMode","none"),this._updatePreviewPlane(null)}onShow(){this._updateVisibility(!0)}onHide(){this._updateVisibility(!1)}_updateVisibility(t){this._updateManipulators(),t||this._clearPointerMoveTimeout()}onInputEvent(t){switch(t.type){case"pointer-drag":if(!Et(t))return;this._isPlacingSlicePlane?this._onClickPlacePlane(t)&&t.stopPropagation():this._onPointerDrag(t)&&t.stopPropagation();break;case"pointer-move":this._onPointerMove(t);break;case"pointer-up":this._onPointerUp(t)&&t.stopPropagation();break;case"immediate-click":if(!Et(t))return;this._onClickPlacePlane(t)&&t.stopPropagation();break;case"click":if(!Et(t))return;this._onClickExcludeLayer(t)&&t.stopPropagation();break;case"drag":this.inputState&&t.stopPropagation();break;case"key-down":this._onKeyDown(t)&&t.stopPropagation();break;case"key-up":this._onKeyUp(t)&&t.stopPropagation()}}onEditableChange(){this.analysisViewData.editable=this.internallyEditable}_onPointerDrag(t){const e=this.inputState;if(t.pointerId===this._creatingPointerId&&null!=e&&"shift"===e.type){const i=Tt(t);return this.shiftManipulator.events.emit("drag",{action:e.hasBeenDragged?"update":"start",pointerType:t.pointerType,start:i,screenPoint:i}),e.hasBeenDragged=!0,!0}return!1}_onPointerMove(t){this._lastCursorPosition.x=t.x,this._lastCursorPosition.y=t.y,this._resetPointerMoveTimeout(),"touch"!==t.pointerType&&this._updatePreviewPlane(Tt(t),this._activeKeyModifiers)}_onCameraChange(){this._updatePreviewPlane(this._lastCursorPosition,this._activeKeyModifiers),this._updateManipulators()}_onPointerUp(t){if(t.pointerId===this._creatingPointerId&&null!=this.analysisViewData.plane){const e=Tt(t);return this.shiftManipulator.events.emit("drag",{action:"end",start:e,screenPoint:e}),H(this.analysisViewData.plane,this._startPlane),this.inputState=null,!0}return!1}_onClickPlacePlane(t){if("exclude"===this.layersMode)return!1;if(this._isPlacingSlicePlane){const i=Tt(t),a=S();if(this._pickPlane(i,!1,this._activeKeyModifiers,a)){if(H(a,this._startPlane),this.analysis.shape=et(a,this.view,this.view.spatialReference,new e),"pointer-drag"===t.type){const e=this._calculatePickRay(i);this.inputState=kt(e,t.pointerId,a.origin,a)}return!0}}return!1}_onClickExcludeLayer(t){return!("exclude"!==this.layersMode||!this.created)&&(this.view.hitTest(Tt(t)).then((t=>{if(t.results.length){const e=t.results[0],i="graphic"===e?.type&&e.graphic;if(i){const t=i.sourceLayer||i.layer;t&&this.analysis.excludedLayers.push(t)}}else t.ground.layer?this.analysis.excludedLayers.push(t.ground.layer):this.analysis.excludeGroundSurface=!0})),this._set("layersMode","none"),this.active&&(this.view.activeTool=null),!0)}_onKeyDown(t){return(t.key===B||t.key===F)&&(this._activeKeyModifiers[t.key]=!0,null!=this._previewPlane&&this._updatePreviewPlane(this._lastCursorPosition,this._activeKeyModifiers),!0)}_onKeyUp(t){return!(t.key!==B&&t.key!==F||!this._activeKeyModifiers[t.key])&&(delete this._activeKeyModifiers[t.key],null!=this._previewPlane&&this._updatePreviewPlane(this._lastCursorPosition,this._activeKeyModifiers),!0)}_onShiftGrab(t){if("start"!==t.action||null==this.analysisViewData.plane||!t.screenPoint)return;const e=this._calculatePickRay(t.screenPoint);H(this.analysisViewData.plane,this._startPlane),this.inputState=kt(e,null,this.shiftManipulator.renderLocation,this.analysisViewData.plane)}_createShiftDragPipeline(t){return Dt(t,((t,e,i)=>{const a=this.inputState;if(null==a||"shift"!==a.type)return;const s=null!=this.analysisViewData.plane?H(this.analysisViewData.plane,S()):null;e.next(mt(this.view,a.shiftPlane)).next(this._shiftDragAdjustSensitivity(a)).next(this._shiftDragUpdatePlane(a)),i.next((()=>{null!=s&&this._updateBoundedPlane(s)}))}))}_shiftDragAdjustSensitivity(t){return e=>{if(null==this.analysisViewData.plane)return null;const i=.001,a=Math.min((1-Math.abs(g(x(this.analysisViewData.plane),e.ray.direction)/w(e.ray.direction)))/i,1),s=-R(this._startPlane.plane,e.renderEnd),n=-R(this._startPlane.plane,t.startPoint);return t.depth=t.depth*(1-a)+s*a-n,e}}_shiftDragUpdatePlane(t){return()=>{if(null==this.analysisViewData.plane)return;const e=f(G.get(),this._startPlane.origin),i=f(G.get(),x(this._startPlane));M(i,i,-t.depth),D(i,i,e);const a=I(i,this.analysisViewData.plane.basis1,this.analysisViewData.plane.basis2,S());this._updateBoundedPlane(a)}}_onRotateHeadingGrab(t){if("start"!==t.action||null==this.analysisViewData.plane||!t.screenPoint)return;const e=it(this.analysisViewData.plane,this.view.renderCoordsHelper,at.HEADING,j()),i=this._calculatePickRay(t.screenPoint),a=E();O(e,i,a)&&(H(this.analysisViewData.plane,this._startPlane),this.inputState={type:"rotate",rotatePlane:e,startPoint:a})}_createRotateHeadingDragPipeline(t){return Dt(t,((t,e,i)=>{const a=this.inputState;if(null==a||"rotate"!==a.type)return;const s=null!=this.analysisViewData.plane?H(this.analysisViewData.plane,S()):null;e.next(mt(this.view,a.rotatePlane)).next(this._rotateDragRenderPlaneToRotate(a)).next(this._rotateDragUpdatePlaneFromRotate()),i.next((()=>{null!=s&&this._updateBoundedPlane(s)}))}))}_onRotateTiltGrab(t){if("start"!==t.action||null==this.analysisViewData.plane||!t.screenPoint)return;const e=it(this.analysisViewData.plane,this.view.renderCoordsHelper,at.TILT,j()),i=this._calculatePickRay(t.screenPoint),a=E();O(e,i,a)&&(H(this.analysisViewData.plane,this._startPlane),this.inputState={type:"rotate",rotatePlane:e,startPoint:a})}_createRotateTiltDragPipeline(t){return Dt(t,((t,e,i)=>{const a=this.inputState;if(null==a||"rotate"!==a.type)return;const s=null!=this.analysisViewData.plane?H(this.analysisViewData.plane,S()):null;e.next(mt(this.view,a.rotatePlane)).next(this._rotateDragRenderPlaneToRotate(a)).next(this._rotateDragUpdatePlaneFromRotate()),i.next((()=>{null!=s&&this._updateBoundedPlane(s)}))}))}_rotateDragRenderPlaneToRotate(t){return e=>{if(null==this.analysisViewData.plane)return null;const i=C(t.rotatePlane),a=yt(t.startPoint,e.renderEnd,this.analysisViewData.plane.origin,i);return{...e,rotateAxis:i,rotateAngle:a}}}_rotateDragUpdatePlaneFromRotate(){return t=>{if(null==this.analysisViewData.plane)return;const e=P(U.get(),t.rotateAngle,t.rotateAxis);if(null==e)return;const i=T(G.get(),this._startPlane.basis1,e),a=T(G.get(),this._startPlane.basis2,e),s=I(this.analysisViewData.plane.origin,i,a,S());this._updateBoundedPlane(s)}}_onResizeGrab(t,e){if("start"!==t.action||null==this.analysisViewData.plane||!t.screenPoint)return;const i=this._calculatePickRay(t.screenPoint),a=G.get();O(this.analysisViewData.plane.plane,i,a)&&(H(this.analysisViewData.plane,this._startPlane),this.inputState={type:"resize",activeHandleIdx:e,startPoint:k(a)})}_createResizeDragPipeline(t){return Dt(t,((t,e,i)=>{const a=this.inputState;if(null==a||"resize"!==a.type||null==this.analysisViewData.plane)return;const s=H(this.analysisViewData.plane,S());e.next(mt(this.view,this.analysisViewData.plane.plane)).next(this._resizeDragUpdatePlane(a)),i.next((()=>{this._updateBoundedPlane(s)}))}))}_resizeDragUpdatePlane(t){return e=>{if(null==this.analysisViewData.plane)return;const i=this._resizeHandles[t.activeHandleIdx],a=st(i,t.startPoint,e.renderEnd,this.view.state.camera,this._startPlane,H(this.analysisViewData.plane));this._updateBoundedPlane(a)}}_updateBoundedPlane(t){const e=this.analysisViewData;if(null==e)throw new Error("valid internal object expected");e.plane=t}_updatePreviewPlane(t,e={}){let i=this._previewPlane;if(this._previewPlane=null,null==t)return this._removeFrameTask(),void this._updateManipulators();if(!this.analysisViewData.plane&&this.active){const a=null!=i?i:S();if(i=null!=i?H(i,St):null,this._pickPlane(t,!0,e,a)){const t=Z;let e=!1;null!=i&&(e=g(i.plane,a.plane)<t||g(V(G.get(),i.basis1),V(G.get(),a.basis1))<t),e&&(this._previewPlaneOpacity=0),this._previewPlane=a}}null!=this._previewPlane&&null==this._frameTask&&0===this._previewPlaneOpacity?this._frameTask=p({update:({deltaTime:t})=>{this._previewPlaneOpacity=Math.min(this._previewPlaneOpacity+t/(1e3*J),1),this._updateManipulators(),1===this._previewPlaneOpacity&&this._removeFrameTask()}}):null==this._previewPlane&&null!=this._frameTask?this._removeFrameTask():null!=this._previewPlane&&this._updateManipulators()}_removeFrameTask(){this._frameTask=r(this._frameTask)}_calculatePickRay(t){const e=z(),i=c(t,Ht);return gt(this.view.state.camera,i,e),V(e.direction,e.direction),e}_pickMinResult(t){const e=c(t,L.get());return this.view.sceneIntersectionHelper.intersectToolIntersectorScreen(e,this._intersector),this._intersector.results.min}_pickPlane(t,e,i,a){const s=this._pickMinResult(t),n=G.get();if(!s.getIntersectionPoint(n))return!1;const r=s.getTransformedNormal(G.get()),l=this.view.state.camera;g(r,l.viewForward)>0&&M(r,r,-1);const o=nt(n,l),h=(e?1:-1)*o*Q,p=M(G.get(),r,h);D(p,p,n);const u=this.analysis.tiltEnabled?rt.TILTED:rt.HORIZONTAL_OR_VERTICAL,c=i[B]?rt.VERTICAL:i[F]?rt.HORIZONTAL:u;return lt(p,r,o,o,l,c,this.view.renderCoordsHelper,a),!0}_clearPointerMoveTimeout(){this._prevPointerMoveTimeout=r(this._prevPointerMoveTimeout)}_resetPointerMoveTimeout(){this._clearPointerMoveTimeout(),this.shiftManipulator.state|=ot,this.rotateHeadingManipulator.state|=ot,this.rotateTiltManipulator.state|=ot,this._prevPointerMoveTimeout=this._clock.setTimeout((()=>{this.shiftManipulator.state&=~ot,this.rotateHeadingManipulator.state&=~ot,this.rotateTiltManipulator.state&=~ot}),this._pointerMoveTimerMs)}_updateManipulators(){if(Vt.disableEngineLayers)return;let t,e=!1;if(null!=this.analysisViewData.plane)t=this.analysisViewData.plane,e=!1;else{if(null==this._previewPlane)return this.shiftManipulator.available=!1,this.rotateHeadingManipulator.available=!1,this.rotateTiltManipulator.available=!1,this.resizeManipulators.forEach((t=>t.available=!1)),this._previewPlaneOutlineVisualElement.visible=!1,void(this._previewPlaneGridVisualElement.visible=!1);t=this._previewPlane,e=!0}const i=ht(t,U.get());e?(this.shiftManipulator.available=!1,this.rotateHeadingManipulator.available=!1,this.rotateTiltManipulator.available=!1,this.resizeManipulators.forEach((t=>t.available=!1)),this._previewPlaneOutlineVisualElement.attached=!0,this._previewPlaneGridVisualElement.attached=!0,this._previewPlaneOutlineVisualElement.visible=!0,this._previewPlaneGridVisualElement.visible=!0):(this.shiftManipulator.available=!0,this.rotateHeadingManipulator.available=!0,this.rotateTiltManipulator.available=this.analysis.tiltEnabled,this.resizeManipulators.forEach((t=>t.available=!0)),pt(this.shiftManipulator,i,t,this.view.state.camera),ut(this.rotateHeadingManipulator,i,t,this.view.renderCoordsHelper),ct(this.rotateTiltManipulator,i,t),this.resizeManipulators.forEach(((e,a)=>dt(e,this._resizeHandles[a],i,t))),this._previewPlaneOutlineVisualElement.visible=!1,this._previewPlaneGridVisualElement.visible=!1);const a=b(G.get(),w(t.basis1),w(t.basis2),1),s=y(U.get(),a),n=m(s,i,s);this._previewPlaneOutlineVisualElement.transform=n,this._previewPlaneGridVisualElement.transform=n,this._updateMaterials()}_updateMaterials(){const t=[N[0],N[1],N[2],N[3]*this._previewPlaneOpacity];this._previewPlaneOutlineVisualElement.color=t;const e=[q[0],q[1],q[2],q[3]*this._previewPlaneOpacity],i=[0,0,0,0];this._previewPlaneGridVisualElement.backgroundColor=e,this._previewPlaneGridVisualElement.gridColor=i}_updateManipulatorsInteractive(t){if(!t.grabbing)return this.shiftManipulator.interactive=!0,this.rotateHeadingManipulator.interactive=!0,this.rotateTiltManipulator.interactive=!0,void this.resizeManipulators.forEach((t=>{t.interactive=!0}));this.shiftManipulator.interactive=this.shiftManipulator===t,this.rotateHeadingManipulator.interactive=this.rotateHeadingManipulator===t,this.rotateTiltManipulator.interactive=this.rotateTiltManipulator===t,this.resizeManipulators.forEach((e=>{e.interactive=e===t}))}testData(){return{plane:this.analysisViewData.plane,setPointerMoveTimerMs:t=>{this._pointerMoveTimerMs=t}}}};function kt(t,e,i,a){const s=_t(i,x(a),t.direction,j()),n=E();return O(s,t,n)?{type:"shift",creatingPointerId:e,hasBeenDragged:!1,shiftPlane:s,depth:0,startPoint:n}:null}function Et(t){return"mouse"!==t.pointerType||0===t.button}bt.disableEngineLayers=!1,t([_()],bt.prototype,"_clock",void 0),t([_({constructOnly:!0})],bt.prototype,"view",void 0),t([_()],bt.prototype,"analysisViewData",void 0),t([_({readOnly:!0})],bt.prototype,"state",null),t([_({readOnly:!0})],bt.prototype,"cursor",null),t([_()],bt.prototype,"analysis",null),t([_()],bt.prototype,"removeIncompleteOnCancel",void 0),t([_({readOnly:!0})],bt.prototype,"layersMode",void 0),t([_({value:null})],bt.prototype,"inputState",null),t([_()],bt.prototype,"_isPlacingSlicePlane",null),t([_()],bt.prototype,"_creatingPointerId",null),bt=Vt=t([v("esri.views.3d.analysis.Slice.SliceTool")],bt);const St=S(),Ht=d(),xt=bt;export{xt as default};
5
+ import{_ as t}from"../../../../chunks/tslib.es6.js";import e from"../../../../analysis/SlicePlane.js";import{clock as i}from"../../../../core/clock.js";import a from"../../../../core/Handles.js";import{releaseMaybe as s,destroyMaybe as n,removeMaybe as r}from"../../../../core/maybe.js";import{watch as l,sync as o,syncAndInitial as h}from"../../../../core/reactiveUtils.js";import{addFrameTask as p}from"../../../../core/scheduling.js";import{createScreenPoint as u,screenPointObjectToArray as c,createScreenPointArray as d}from"../../../../core/screenUtils.js";import{property as _}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{subclass as v}from"../../../../core/accessorSupport/decorators/subclass.js";import{d as P,E as y,m}from"../../../../chunks/mat4.js";import{e as g,l as w,c as f,g as M,a as D,m as T,n as V,s as b}from"../../../../chunks/vec3.js";import{a as k,c as E}from"../../../../chunks/vec3f64.js";import{a as S,c as H,n as x,f as I}from"../../../../chunks/boundedPlane.js";import{signedDistance as R,create as j,intersectRay as O,normal as C}from"../../../../geometry/support/plane.js";import{create as z}from"../../../../geometry/support/ray.js";import{sv3d as G,sm4d as U,sv2d as L}from"../../../../geometry/support/vectorStacks.js";import{POINTER_MOVE_TIMER_MS as A,PLANE_PREVIEW_OUTLINE_WIDTH as K,forceVerticalModifier as B,forceHorizontalModifier as F,PLANE_OUTLINE_COLOR as N,PLANE_BACKGROUND_COLOR as q,PREVIEW_FADE_DOT_THRESHOLD as Z,PREVIEW_FADE_DURATION_SECONDS as J,INITIAL_DEPTH_OFFSET_FRAC as Q}from"./sliceToolConfig.js";import{createShiftManipulator as W,createRotateManipulator as X,createResizeManipulator as Y,createGridVisualElement as $,createOutlineVisualElement as tt,planeToShape as et,createRotatePlane as it,RotationAxis as at,resizePlane as st,calculatePlaneHalfSize as nt,SliceOrientation as rt,createPlane as lt,DidPointerMoveRecentlyFlag as ot,calculateBoundedPlaneTranslateRotate as ht,updateShiftRestartHandle as pt,updateRotateHeadingHandle as ut,updateRotateTiltHandle as ct,updateResizeHandle as dt,createShiftPlane as _t}from"./sliceToolUtils.js";import{getRotateHeadingTexture as vt,getTiltRotateTexture as Pt}from"./images/Factory.js";import{calculateInputRotationTransform as yt}from"../../interactive/manipulatorUtils.js";import{screenToRenderPlane as mt}from"../../interactive/editingTools/dragEventPipeline3D.js";import{fromScreen as gt}from"../../support/geometryUtils/ray.js";import{newIntersector as wt}from"../../webgl-engine/lib/Intersector.js";import{StoreResults as ft}from"../../webgl-engine/lib/IntersectorInterfaces.js";import{AnalysisToolBase as Mt}from"../../../interactive/AnalysisToolBase.js";import{createManipulatorDragEventPipeline as Dt}from"../../../interactive/dragEventPipeline.js";import{createScreenPointFromEvent as Tt}from"../../../support/screenUtils.js";var Vt;let bt=Vt=class extends Mt{constructor(t){super(t),this._clock=i,this._previewPlaneOpacity=1,this.removeIncompleteOnCancel=!1,this.layersMode="none",this.shiftManipulator=null,this.rotateHeadingManipulator=null,this.rotateTiltManipulator=null,this.resizeManipulators=null,this._handles=new a,this._viewHandles=new a,this._frameTask=null,this._pointerMoveTimerMs=A,this._prevPointerMoveTimeout=null,this._previewPlaneGridVisualElement=null,this._previewPlaneOutlineVisualElement=null,this._startPlane=S(),this._previewPlane=null,this._activeKeyModifiers={},this._lastCursorPosition=u(),this._resizeHandles=[{direction:[1,0]},{direction:[1,1]},{direction:[0,1]},{direction:[-1,1]},{direction:[-1,0]},{direction:[-1,-1]},{direction:[0,-1]},{direction:[1,-1]}],this._intersector=wt(t.view.state.viewingMode),this._intersector.options.store=ft.MIN}initialize(){if(null==this.analysis)throw new Error("SliceTool requires valid analysis, but null was provided.");const t=!this.view._stage?.renderView.renderingContext.driverTest.svgPremultipliesAlpha.result;this._rotateHeadingImage=vt(this.view.toolViewManager.textures,{premultiplyAlpha:t}),this._rotateTiltImage=Pt(this.view.toolViewManager.textures);const e=t=>{this._updateManipulatorsInteractive(t),t.grabbing||(null!=this.analysisViewData.plane&&H(this.analysisViewData.plane,this._startPlane),this.inputState=null)};this.shiftManipulator=W(this.view),this.manipulators.add(this.shiftManipulator),this.shiftManipulator.events.on("grab-changed",(t=>{this._onShiftGrab(t),e(this.shiftManipulator)})),this._handles.add(this._createShiftDragPipeline(this.shiftManipulator)),this.rotateHeadingManipulator=X(this.view,this._rotateHeadingImage.texture),this.manipulators.add(this.rotateHeadingManipulator),this.rotateHeadingManipulator.events.on("grab-changed",(t=>{this._onRotateHeadingGrab(t),e(this.rotateHeadingManipulator)})),this._handles.add(this._createRotateHeadingDragPipeline(this.rotateHeadingManipulator)),this.rotateTiltManipulator=X(this.view,this._rotateTiltImage.texture),this.manipulators.add(this.rotateTiltManipulator),this.rotateTiltManipulator.events.on("grab-changed",(t=>{this._onRotateTiltGrab(t),e(this.rotateTiltManipulator)})),this._handles.add(this._createRotateTiltDragPipeline(this.rotateTiltManipulator)),this.resizeManipulators=this._resizeHandles.map(((t,i)=>{const a=Y(this.view,t);return a.events.on("grab-changed",(t=>{this._onResizeGrab(t,i),e(a)})),this._handles.add(this._createResizeDragPipeline(a)),a})),this.manipulators.addMany(this.resizeManipulators),this._previewPlaneGridVisualElement=$(this.view),this._previewPlaneOutlineVisualElement=tt(this.view),this._previewPlaneOutlineVisualElement.width=K,this._handles.add(l((()=>[this.analysisViewData.plane,this.analysis.tiltEnabled]),(()=>this._updateManipulators()),o));const i=l((()=>this.state),(t=>{"sliced"===t&&this.finishToolCreation()}),h);this._handles.add([i,l((()=>this.view.state.camera),(()=>this._onCameraChange()))])}destroy(){this._rotateHeadingImage=s(this._rotateHeadingImage),this._rotateTiltImage=s(this._rotateTiltImage),this._handles=n(this._handles),this._viewHandles=n(this._viewHandles),this._removeFrameTask(),this._clearPointerMoveTimeout(),this._previewPlaneOutlineVisualElement=n(this._previewPlaneOutlineVisualElement),this._previewPlaneGridVisualElement=n(this._previewPlaneGridVisualElement)}get state(){const t=!!this.analysisViewData.plane,e=!!this.inputState;return t?t&&e?"slicing":t&&!e?"sliced":"ready":"ready"}get cursor(){return this._isPlacingSlicePlane||"exclude"===this.layersMode?"crosshair":null!=this._creatingPointerId?"grabbing":null}set analysis(t){if(null==t)throw new Error("SliceTool requires valid analysis, but null was provided.");this._handles.remove("analysis"),this._set("analysis",t)}get inputState(){return this._get("inputState")}set inputState(t){this._set("inputState",t),this.analysisViewData.showGrid=null!=t&&"resize"===t.type,this._updateMaterials()}get _isPlacingSlicePlane(){return!this.inputState&&!this.analysisViewData.plane&&this.active}get _creatingPointerId(){return null!=this.inputState&&"shift"===this.inputState.type?this.inputState.creatingPointerId:null}enterExcludeLayerMode(){null!=this.analysisViewData.plane&&(this._set("layersMode","exclude"),this.active||(this.view.activeTool=this))}exitExcludeLayerMode(){null!=this.analysisViewData.plane&&(this._set("layersMode","none"),this.active&&(this.view.activeTool=null))}onDeactivate(){this._set("layersMode","none"),this._updatePreviewPlane(null)}onShow(){this._updateVisibility(!0)}onHide(){this._updateVisibility(!1)}_updateVisibility(t){this._updateManipulators(),t||this._clearPointerMoveTimeout()}onInputEvent(t){switch(t.type){case"pointer-drag":if(!Et(t))return;this._isPlacingSlicePlane?this._onClickPlacePlane(t)&&t.stopPropagation():this._onPointerDrag(t)&&t.stopPropagation();break;case"pointer-move":this._onPointerMove(t);break;case"pointer-up":this._onPointerUp(t)&&t.stopPropagation();break;case"immediate-click":if(!Et(t))return;this._onClickPlacePlane(t)&&t.stopPropagation();break;case"click":if(!Et(t))return;this._onClickExcludeLayer(t)&&t.stopPropagation();break;case"drag":this.inputState&&t.stopPropagation();break;case"key-down":this._onKeyDown(t)&&t.stopPropagation();break;case"key-up":this._onKeyUp(t)&&t.stopPropagation()}}onEditableChange(){this.analysisViewData.editable=this.internallyEditable}_onPointerDrag(t){const e=this.inputState;if(t.pointerId===this._creatingPointerId&&null!=e&&"shift"===e.type){const i=Tt(t);return this.shiftManipulator.events.emit("drag",{action:e.hasBeenDragged?"update":"start",pointerType:t.pointerType,start:i,screenPoint:i}),e.hasBeenDragged=!0,!0}return!1}_onPointerMove(t){this._lastCursorPosition.x=t.x,this._lastCursorPosition.y=t.y,this._resetPointerMoveTimeout(),"touch"!==t.pointerType&&this._updatePreviewPlane(Tt(t),this._activeKeyModifiers)}_onCameraChange(){this._updatePreviewPlane(this._lastCursorPosition,this._activeKeyModifiers),this._updateManipulators()}_onPointerUp(t){if(t.pointerId===this._creatingPointerId&&null!=this.analysisViewData.plane){const e=Tt(t);return this.shiftManipulator.events.emit("drag",{action:"end",start:e,screenPoint:e}),H(this.analysisViewData.plane,this._startPlane),this.inputState=null,!0}return!1}_onClickPlacePlane(t){if("exclude"===this.layersMode)return!1;if(this._isPlacingSlicePlane){const i=Tt(t),a=S();if(this._pickPlane(i,!1,this._activeKeyModifiers,a)){if(H(a,this._startPlane),this.analysis.shape=et(a,this.view,this.view.spatialReference,new e),"pointer-drag"===t.type){const e=this._calculatePickRay(i);this.inputState=kt(e,t.pointerId,a.origin,a)}return!0}}return!1}_onClickExcludeLayer(t){return!("exclude"!==this.layersMode||!this.created)&&(this.view.hitTest(Tt(t)).then((t=>{if(t.results.length){const e=t.results[0],i="graphic"===e?.type&&e.graphic;if(i){const t=i.sourceLayer||i.layer;t&&this.analysis.excludedLayers.push(t)}}else t.ground.layer?this.analysis.excludedLayers.push(t.ground.layer):this.analysis.excludeGroundSurface=!0})),this._set("layersMode","none"),this.active&&(this.view.activeTool=null),!0)}_onKeyDown(t){return(t.key===B||t.key===F)&&(this._activeKeyModifiers[t.key]=!0,null!=this._previewPlane&&this._updatePreviewPlane(this._lastCursorPosition,this._activeKeyModifiers),!0)}_onKeyUp(t){return!(t.key!==B&&t.key!==F||!this._activeKeyModifiers[t.key])&&(delete this._activeKeyModifiers[t.key],null!=this._previewPlane&&this._updatePreviewPlane(this._lastCursorPosition,this._activeKeyModifiers),!0)}_onShiftGrab(t){if("start"!==t.action||null==this.analysisViewData.plane||!t.screenPoint)return;const e=this._calculatePickRay(t.screenPoint);H(this.analysisViewData.plane,this._startPlane),this.inputState=kt(e,null,this.shiftManipulator.renderLocation,this.analysisViewData.plane)}_createShiftDragPipeline(t){return Dt(t,((t,e,i)=>{const a=this.inputState;if(null==a||"shift"!==a.type)return;const s=null!=this.analysisViewData.plane?H(this.analysisViewData.plane,S()):null;e.next(mt(this.view,a.shiftPlane)).next(this._shiftDragAdjustSensitivity(a)).next(this._shiftDragUpdatePlane(a)),i.next((()=>{null!=s&&this._updateBoundedPlane(s)}))}))}_shiftDragAdjustSensitivity(t){return e=>{if(null==this.analysisViewData.plane)return null;const i=.001,a=Math.min((1-Math.abs(g(x(this.analysisViewData.plane),e.ray.direction)/w(e.ray.direction)))/i,1),s=-R(this._startPlane.plane,e.renderEnd),n=-R(this._startPlane.plane,t.startPoint);return t.depth=t.depth*(1-a)+s*a-n,e}}_shiftDragUpdatePlane(t){return()=>{if(null==this.analysisViewData.plane)return;const e=f(G.get(),this._startPlane.origin),i=f(G.get(),x(this._startPlane));M(i,i,-t.depth),D(i,i,e);const a=I(i,this.analysisViewData.plane.basis1,this.analysisViewData.plane.basis2,S());this._updateBoundedPlane(a)}}_onRotateHeadingGrab(t){if("start"!==t.action||null==this.analysisViewData.plane||!t.screenPoint)return;const e=it(this.analysisViewData.plane,this.view.renderCoordsHelper,at.HEADING,j()),i=this._calculatePickRay(t.screenPoint),a=E();O(e,i,a)&&(H(this.analysisViewData.plane,this._startPlane),this.inputState={type:"rotate",rotatePlane:e,startPoint:a})}_createRotateHeadingDragPipeline(t){return Dt(t,((t,e,i)=>{const a=this.inputState;if(null==a||"rotate"!==a.type)return;const s=null!=this.analysisViewData.plane?H(this.analysisViewData.plane,S()):null;e.next(mt(this.view,a.rotatePlane)).next(this._rotateDragRenderPlaneToRotate(a)).next(this._rotateDragUpdatePlaneFromRotate()),i.next((()=>{null!=s&&this._updateBoundedPlane(s)}))}))}_onRotateTiltGrab(t){if("start"!==t.action||null==this.analysisViewData.plane||!t.screenPoint)return;const e=it(this.analysisViewData.plane,this.view.renderCoordsHelper,at.TILT,j()),i=this._calculatePickRay(t.screenPoint),a=E();O(e,i,a)&&(H(this.analysisViewData.plane,this._startPlane),this.inputState={type:"rotate",rotatePlane:e,startPoint:a})}_createRotateTiltDragPipeline(t){return Dt(t,((t,e,i)=>{const a=this.inputState;if(null==a||"rotate"!==a.type)return;const s=null!=this.analysisViewData.plane?H(this.analysisViewData.plane,S()):null;e.next(mt(this.view,a.rotatePlane)).next(this._rotateDragRenderPlaneToRotate(a)).next(this._rotateDragUpdatePlaneFromRotate()),i.next((()=>{null!=s&&this._updateBoundedPlane(s)}))}))}_rotateDragRenderPlaneToRotate(t){return e=>{if(null==this.analysisViewData.plane)return null;const i=C(t.rotatePlane),a=yt(t.startPoint,e.renderEnd,this.analysisViewData.plane.origin,i);return{...e,rotateAxis:i,rotateAngle:a}}}_rotateDragUpdatePlaneFromRotate(){return t=>{if(null==this.analysisViewData.plane)return;const e=P(U.get(),t.rotateAngle,t.rotateAxis);if(null==e)return;const i=T(G.get(),this._startPlane.basis1,e),a=T(G.get(),this._startPlane.basis2,e),s=I(this.analysisViewData.plane.origin,i,a,S());this._updateBoundedPlane(s)}}_onResizeGrab(t,e){if("start"!==t.action||null==this.analysisViewData.plane||!t.screenPoint)return;const i=this._calculatePickRay(t.screenPoint),a=G.get();O(this.analysisViewData.plane.plane,i,a)&&(H(this.analysisViewData.plane,this._startPlane),this.inputState={type:"resize",activeHandleIdx:e,startPoint:k(a)})}_createResizeDragPipeline(t){return Dt(t,((t,e,i)=>{const a=this.inputState;if(null==a||"resize"!==a.type||null==this.analysisViewData.plane)return;const s=H(this.analysisViewData.plane,S());e.next(mt(this.view,this.analysisViewData.plane.plane)).next(this._resizeDragUpdatePlane(a)),i.next((()=>{this._updateBoundedPlane(s)}))}))}_resizeDragUpdatePlane(t){return e=>{if(null==this.analysisViewData.plane)return;const i=this._resizeHandles[t.activeHandleIdx],a=st(i,t.startPoint,e.renderEnd,this.view.state.camera,this._startPlane,H(this.analysisViewData.plane));this._updateBoundedPlane(a)}}_updateBoundedPlane(t){const e=this.analysisViewData;if(null==e)throw new Error("valid internal object expected");e.plane=t}_updatePreviewPlane(t,e={}){let i=this._previewPlane;if(this._previewPlane=null,null==t)return this._removeFrameTask(),void this._updateManipulators();if(!this.analysisViewData.plane&&this.active){const a=null!=i?i:S();if(i=null!=i?H(i,St):null,this._pickPlane(t,!0,e,a)){const t=Z;let e=!1;null!=i&&(e=g(i.plane,a.plane)<t||g(V(G.get(),i.basis1),V(G.get(),a.basis1))<t),e&&(this._previewPlaneOpacity=0),this._previewPlane=a}}null!=this._previewPlane&&null==this._frameTask&&0===this._previewPlaneOpacity?this._frameTask=p({update:({deltaTime:t})=>{this._previewPlaneOpacity=Math.min(this._previewPlaneOpacity+t/(1e3*J),1),this._updateManipulators(),1===this._previewPlaneOpacity&&this._removeFrameTask()}}):null==this._previewPlane&&null!=this._frameTask?this._removeFrameTask():null!=this._previewPlane&&this._updateManipulators()}_removeFrameTask(){this._frameTask=r(this._frameTask)}_calculatePickRay(t){const e=z(),i=c(t,Ht);return gt(this.view.state.camera,i,e),V(e.direction,e.direction),e}_pickMinResult(t){const e=c(t,L.get());return this.view.sceneIntersectionHelper.intersectToolIntersectorScreen(e,this._intersector),this._intersector.results.min}_pickPlane(t,e,i,a){const s=this._pickMinResult(t),n=G.get();if(!s.getIntersectionPoint(n))return!1;const r=s.getTransformedNormal(G.get()),l=this.view.state.camera;g(r,l.viewForward)>0&&M(r,r,-1);const o=nt(n,l),h=(e?1:-1)*o*Q,p=M(G.get(),r,h);D(p,p,n);const u=this.analysis.tiltEnabled?rt.TILTED:rt.HORIZONTAL_OR_VERTICAL,c=i[B]?rt.VERTICAL:i[F]?rt.HORIZONTAL:u;return lt(p,r,o,o,l,c,this.view.renderCoordsHelper,a),!0}_clearPointerMoveTimeout(){this._prevPointerMoveTimeout=r(this._prevPointerMoveTimeout)}_resetPointerMoveTimeout(){this._clearPointerMoveTimeout(),this.shiftManipulator.state|=ot,this.rotateHeadingManipulator.state|=ot,this.rotateTiltManipulator.state|=ot,this._prevPointerMoveTimeout=this._clock.setTimeout((()=>{this.shiftManipulator.state&=~ot,this.rotateHeadingManipulator.state&=~ot,this.rotateTiltManipulator.state&=~ot}),this._pointerMoveTimerMs)}_updateManipulators(){if(Vt.disableEngineLayers)return;let t,e=!1;if(null!=this.analysisViewData.plane)t=this.analysisViewData.plane,e=!1;else{if(null==this._previewPlane)return this.shiftManipulator.available=!1,this.rotateHeadingManipulator.available=!1,this.rotateTiltManipulator.available=!1,this.resizeManipulators.forEach((t=>t.available=!1)),this._previewPlaneOutlineVisualElement.visible=!1,void(this._previewPlaneGridVisualElement.visible=!1);t=this._previewPlane,e=!0}const i=ht(t,U.get());e?(this.shiftManipulator.available=!1,this.rotateHeadingManipulator.available=!1,this.rotateTiltManipulator.available=!1,this.resizeManipulators.forEach((t=>t.available=!1)),this._previewPlaneOutlineVisualElement.attached=!0,this._previewPlaneGridVisualElement.attached=!0,this._previewPlaneOutlineVisualElement.visible=!0,this._previewPlaneGridVisualElement.visible=!0):(this.shiftManipulator.available=!0,this.rotateHeadingManipulator.available=!0,this.rotateTiltManipulator.available=this.analysis.tiltEnabled,this.resizeManipulators.forEach((t=>t.available=!0)),pt(this.shiftManipulator,i,t,this.view.state.camera),ut(this.rotateHeadingManipulator,i,t,this.view.renderCoordsHelper),ct(this.rotateTiltManipulator,i,t),this.resizeManipulators.forEach(((e,a)=>dt(e,this._resizeHandles[a],i,t))),this._previewPlaneOutlineVisualElement.visible=!1,this._previewPlaneGridVisualElement.visible=!1);const a=b(G.get(),w(t.basis1),w(t.basis2),1),s=y(U.get(),a),n=m(s,i,s);this._previewPlaneOutlineVisualElement.transform=n,this._previewPlaneGridVisualElement.transform=n,this._updateMaterials()}_updateMaterials(){const t=[N[0],N[1],N[2],N[3]*this._previewPlaneOpacity];this._previewPlaneOutlineVisualElement.color=t;const e=[q[0],q[1],q[2],q[3]*this._previewPlaneOpacity],i=[0,0,0,0];this._previewPlaneGridVisualElement.backgroundColor=e,this._previewPlaneGridVisualElement.gridColor=i}_updateManipulatorsInteractive(t){if(!t.grabbing)return this.shiftManipulator.interactive=!0,this.rotateHeadingManipulator.interactive=!0,this.rotateTiltManipulator.interactive=!0,void this.resizeManipulators.forEach((t=>{t.interactive=!0}));this.shiftManipulator.interactive=this.shiftManipulator===t,this.rotateHeadingManipulator.interactive=this.rotateHeadingManipulator===t,this.rotateTiltManipulator.interactive=this.rotateTiltManipulator===t,this.resizeManipulators.forEach((e=>{e.interactive=e===t}))}testData(){return{plane:this.analysisViewData.plane,setPointerMoveTimerMs:t=>{this._pointerMoveTimerMs=t}}}};function kt(t,e,i,a){const s=_t(i,x(a),t.direction,j()),n=E();return O(s,t,n)?{type:"shift",creatingPointerId:e,hasBeenDragged:!1,shiftPlane:s,depth:0,startPoint:n}:null}function Et(t){return"mouse"!==t.pointerType||0===t.button}bt.disableEngineLayers=!1,t([_()],bt.prototype,"_clock",void 0),t([_({constructOnly:!0})],bt.prototype,"view",void 0),t([_()],bt.prototype,"analysisViewData",void 0),t([_({readOnly:!0})],bt.prototype,"state",null),t([_({readOnly:!0})],bt.prototype,"cursor",null),t([_()],bt.prototype,"analysis",null),t([_()],bt.prototype,"removeIncompleteOnCancel",void 0),t([_({readOnly:!0})],bt.prototype,"layersMode",void 0),t([_({value:null})],bt.prototype,"inputState",null),t([_()],bt.prototype,"_isPlacingSlicePlane",null),t([_()],bt.prototype,"_creatingPointerId",null),bt=Vt=t([v("esri.views.3d.analysis.Slice.SliceTool")],bt);const St=S(),Ht=d(),xt=bt;export{xt as default};