@arcgis/core 4.27.0-rc.3 → 4.27.0-rc.4

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 (134) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{0e65e00173b66c7fec2e.js → 09e677ca7532a281d262.js} +1 -1
  3. package/assets/esri/core/workers/chunks/{89001ee8d3f69fa03cc1.js → 0f7ddb063ee0664f2fca.js} +1 -1
  4. package/assets/esri/core/workers/chunks/17ab08f60764244b2cf8.js +1 -0
  5. package/assets/esri/core/workers/chunks/{2446e336b1f7256d4fde.js → 2c587ed66e2586cccb8d.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{00c7b9fb375c9a934158.js → 38c6452dc9cf18e8bca8.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{16db0bc87d87a7313dc4.js → 4806df402845c717c842.js} +1 -1
  8. package/assets/esri/core/workers/chunks/4884432d80e9af947449.js +1 -0
  9. package/assets/esri/core/workers/chunks/588cd91d08cec5207be1.js +1 -0
  10. package/assets/esri/core/workers/chunks/{83e3d104886b48f00397.js → 633c00c02a81397fc8df.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{efb96aefe979a0f5c632.js → 640e8ac3498be30c6614.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{33901eb1574e46abd9af.js → 6c213768715c52625855.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{5e6471dd2a08e66b47d0.js → 6e4940fe3bba014c921b.js} +57 -58
  14. package/assets/esri/core/workers/chunks/{3160af63b860b52db389.js → 6f724f75f85dc3989d60.js} +1 -1
  15. package/assets/esri/core/workers/chunks/8b05fb365336cc42fecc.js +1 -0
  16. package/assets/esri/core/workers/chunks/8eec6da5e862cc33ea2b.js +1 -0
  17. package/assets/esri/core/workers/chunks/90d8f297d9cb359e071d.js +1 -0
  18. package/assets/esri/core/workers/chunks/91785144901dfe56c5e2.js +1 -0
  19. package/assets/esri/core/workers/chunks/{471f6eba213412b82840.js → 927417abea79c955b216.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{adaa9d4239f4e905d011.js → 9d4bd73dd50400e9d328.js} +1 -1
  21. package/assets/esri/core/workers/chunks/a324cc07d486061d0d8e.js +1 -0
  22. package/assets/esri/core/workers/chunks/a40130579791293cefa2.js +1 -0
  23. package/assets/esri/core/workers/chunks/{50f910797c17c3028521.js → a49718c74053314ed741.js} +1 -1
  24. package/assets/esri/core/workers/chunks/ad2891985e0fe45aa8d2.js +1 -0
  25. package/assets/esri/core/workers/chunks/afcba35eea836aea98ca.js +1 -0
  26. package/assets/esri/core/workers/chunks/b3d2e397ea74ebef4423.js +1 -0
  27. package/assets/esri/core/workers/chunks/b5fb9da45cc9dee286f8.js +1 -0
  28. package/assets/esri/core/workers/chunks/b846d4215210aac9f6ef.js +1 -0
  29. package/assets/esri/core/workers/chunks/c7dc821db8c14fec24a7.js +1 -0
  30. package/assets/esri/core/workers/chunks/c9df9a0a4a45f9a53ce9.js +1 -0
  31. package/assets/esri/core/workers/chunks/{45a4041881e6235d73a2.js → d0a9711f48dfa5fee68a.js} +1 -1
  32. package/assets/esri/core/workers/chunks/e23ec4f867c4735eec20.js +1 -0
  33. package/assets/esri/core/workers/chunks/{ff42585e1b1d0c5497af.js → ea16230a0edfc9f756bd.js} +1 -1
  34. package/assets/esri/core/workers/chunks/ef900614353505afb210.js +1 -0
  35. package/assets/esri/themes/base/_View.scss +2 -5
  36. package/assets/esri/themes/base/widgets/_Feature.scss +12 -4
  37. package/assets/esri/themes/dark/main.css +1 -1
  38. package/assets/esri/themes/light/main.css +1 -1
  39. package/assets/esri/themes/light/view.css +1 -1
  40. package/chunks/DefaultMaterial.glsl.js +42 -42
  41. package/chunks/Terrain.glsl.js +7 -7
  42. package/copyright.txt +1 -1
  43. package/geometry/Mesh.js +1 -1
  44. package/geometry/support/meshUtils/bounds.js +1 -1
  45. package/geometry/support/meshUtils/georeference.js +1 -1
  46. package/interfaces.d.ts +3 -3
  47. package/kernel.js +1 -1
  48. package/layers/OrientedImageryLayer.js +1 -1
  49. package/layers/SceneLayer.js +1 -1
  50. package/layers/VideoLayer.js +1 -1
  51. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  52. package/layers/graphics/editingSupport.js +1 -1
  53. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  54. package/layers/graphics/sources/OGCFeatureSource.js +1 -1
  55. package/layers/graphics/sources/support/clientSideDefaults.js +1 -1
  56. package/layers/graphics/sources/support/uploadAssets.js +1 -1
  57. package/layers/mixins/ArcGISImageService.js +1 -1
  58. package/layers/mixins/ImageryTileMixin.js +1 -1
  59. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  60. package/layers/orientedImagery/core/bestImageUtils.js +1 -1
  61. package/layers/orientedImagery/core/coverageUtils.js +1 -1
  62. package/layers/orientedImagery/transformations/groundToImageUtils.js +1 -1
  63. package/layers/orientedImagery/transformations/imageToGroundUtils.js +1 -1
  64. package/layers/support/SubtypeSublayer.js +1 -1
  65. package/layers/support/capabilities.js +1 -1
  66. package/layers/support/layerUtils.js +1 -1
  67. package/layers/support/serviceCapabilitiesUtils.js +1 -1
  68. package/layers/video/VideoCameraSensorModel.js +5 -0
  69. package/layers/video/VideoController.js +1 -1
  70. package/layers/video/videoUtils.js +1 -1
  71. package/package.json +1 -1
  72. package/portal/PortalItem.js +1 -1
  73. package/renderers/support/colorRampUtils.js +1 -1
  74. package/rest/support/meshFeatureSet.js +1 -1
  75. package/smartMapping/labels/bins.js +5 -0
  76. package/smartMapping/labels/clusters.js +1 -1
  77. package/smartMapping/labels/support/utils.js +5 -0
  78. package/smartMapping/support/binningUtils.js +1 -1
  79. package/support/revision.js +1 -1
  80. package/views/2d/layers/features/schemaUtils.js +1 -1
  81. package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
  82. package/views/3d/layers/I3SMeshView3D.js +1 -1
  83. package/views/3d/layers/I3SMeshViewLabeler.js +1 -1
  84. package/views/3d/layers/I3SMeshWorkerHandle.js +1 -1
  85. package/views/3d/layers/SceneLayerWorker.js +1 -1
  86. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  87. package/views/3d/layers/i3s/I3SClientMaterialUtil.js +5 -0
  88. package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
  89. package/views/3d/layers/i3s/I3SGeometryUtil.js +1 -1
  90. package/views/3d/layers/i3s/I3SOverrides.js +1 -1
  91. package/views/3d/terrain/TerrainRenderer.js +1 -1
  92. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +19 -20
  93. package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +2 -2
  94. package/views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js +9 -9
  95. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  96. package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
  97. package/views/DOMContainer.js +1 -1
  98. package/views/PopupView.js +1 -1
  99. package/views/ui/DefaultUI.js +1 -1
  100. package/views/ui/UI.js +1 -1
  101. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  102. package/widgets/Editor/EditorViewModel.js +1 -1
  103. package/widgets/Editor/UpdateWorkflow.js +1 -1
  104. package/widgets/Editor/workflowUtils.js +1 -1
  105. package/widgets/Feature/support/featureUtils.js +1 -1
  106. package/widgets/FeatureForm/FormExpressionsManager.js +1 -1
  107. package/widgets/FeatureForm/RelationshipInput.js +1 -1
  108. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  109. package/widgets/OrientedImageryViewer.js +1 -1
  110. package/widgets/Popup.js +1 -1
  111. package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.js +1 -1
  112. package/assets/esri/core/workers/chunks/013de5c2955801b329b3.js +0 -1
  113. package/assets/esri/core/workers/chunks/0618fb0058f39ecd363f.js +0 -1
  114. package/assets/esri/core/workers/chunks/07163dcbb871f927a580.js +0 -1
  115. package/assets/esri/core/workers/chunks/0e46687004392c493c06.js +0 -1
  116. package/assets/esri/core/workers/chunks/21328f3dd26abe84a10d.js +0 -1
  117. package/assets/esri/core/workers/chunks/2faa8f08f2fdaac3f4af.js +0 -1
  118. package/assets/esri/core/workers/chunks/624521961fe1f2c4f2c5.js +0 -1
  119. package/assets/esri/core/workers/chunks/6f510f28526c73ab453c.js +0 -1
  120. package/assets/esri/core/workers/chunks/7479dc0c790337af7597.js +0 -1
  121. package/assets/esri/core/workers/chunks/a6ddf80eb324c35076e1.js +0 -1
  122. package/assets/esri/core/workers/chunks/a7fd2a95fde197c06828.js +0 -1
  123. package/assets/esri/core/workers/chunks/b8e6c64792a512df4c4d.js +0 -1
  124. package/assets/esri/core/workers/chunks/bf9e1fde9f6b2b4f10c0.js +0 -1
  125. package/assets/esri/core/workers/chunks/c96db6b7ce47bd343fdb.js +0 -1
  126. package/assets/esri/core/workers/chunks/cfa3b2b1e184681e9af4.js +0 -1
  127. package/assets/esri/core/workers/chunks/d95ca50ca7af4c222036.js +0 -1
  128. package/assets/esri/core/workers/chunks/ee5ee03dd2c7dc940272.js +0 -1
  129. package/assets/esri/core/workers/chunks/f720967ba8c5486a26a2.js +0 -1
  130. package/layers/orientedImagery/core/Affixes.js +0 -5
  131. package/layers/orientedImagery/core/CameraProperties.js +0 -5
  132. package/layers/orientedImagery/core/ImageProperties.js +0 -5
  133. package/layers/orientedImagery/core/ImageryTypes.js +0 -5
  134. package/layers/orientedImagery/core/imageryUtils.js +0 -5
@@ -2,83 +2,83 @@
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{I as e}from"./mat4f64.js";import{ForwardLinearDepth as r}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js";import{Offset as o}from"../views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.js";import{ShaderOutput as a}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 s}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{InstancedDoublePrecision as l}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js";import{NormalAttribute as t,NormalType as n}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{PositionAttribute as d}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/PositionAttribute.glsl.js";import{SymbolColor as c}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/SymbolColor.glsl.js";import{TextureCoordinateAttribute as m}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexColor as g}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{VertexNormal as u}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js";import{VerticalOffset as p}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js";import{DefaultMaterialAuxiliaryPasses as v}from"../views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js";import{ComputeNormalTexture as h}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js";import{EvaluateAmbientOcclusion as f}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as b,addAmbientBoostFactor as w,addLightingGlobalFactor as x}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightIntensity as y}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{multipassTerrainTest as C}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import{Normals as T}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Normals.glsl.js";import{PhysicallyBasedRendering as L}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRendering.glsl.js";import{PhysicallyBasedRenderingParameters as j,PBRMode as M}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadShadowMapPass as P,ReadShadowMapDraw as $}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{colorTextureUV as O,normalTextureUV as N,emissiveTextureUV as A,occlusionTextureUV as S,metallicRoughnessTextureUV as E}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TextureTransformUV.glsl.js";import{VisualVariables as V}from"../views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js";import{symbolAlphaCutoff as D}from"../views/3d/webgl-engine/core/shaderLibrary/util/AlphaCutoff.js";import{DiscardOrAdjustAlphaPass as _}from"../views/3d/webgl-engine/core/shaderLibrary/util/AlphaDiscard.glsl.js";import{MixExternalColor as U}from"../views/3d/webgl-engine/core/shaderLibrary/util/MixExternalColor.glsl.js";import{addProjViewLocalOrigin as B,addCameraPosition as F}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float3PassUniform as I}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{Float4PassUniform as R}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatPassUniform as z}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as W}from"../views/3d/webgl-engine/core/shaderModules/interfaces.js";import{Matrix4PassUniform as k}from"../views/3d/webgl-engine/core/shaderModules/Matrix4PassUniform.js";import{ShaderBuilder as G}from"../views/3d/webgl-engine/core/shaderModules/ShaderBuilder.js";import{Texture2DPassUniform as q}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{TransparencyPassType as H}from"../views/3d/webgl-engine/lib/TransparencyPassType.js";import{VertexAttribute as J}from"../views/3d/webgl-engine/lib/VertexAttribute.js";function K(K){const Q=new G,{vertex:X,fragment:Y,varyings:Z}=Q;if(B(X,K),Q.include(d),Z.add("vpos","vec3"),Q.include(V,K),Q.include(l,K),Q.include(p,K),K.hasColorTextureTransform&&Q.include(O),K.output===a.Color||K.output===a.Alpha){K.hasNormalTextureTransform&&Q.include(N),K.hasEmissionTextureTransform&&Q.include(A),K.hasOcclusionTextureTransform&&Q.include(S),K.hasMetallicRoughnessTextureTransform&&Q.include(E),F(X,K),Q.include(t,K),Q.include(s,K);const a=K.normalType===n.Attribute||K.normalType===n.Compressed;a&&K.offsetBackfaces&&Q.include(o),Q.include(h,K),Q.include(u,K),K.instancedColor&&Q.attributes.add(J.INSTANCECOLOR,"vec4"),Z.add("vPositionLocal","vec3"),Q.include(m,K),Q.include(r,K),Q.include(c,K),Q.include(g,K),X.uniforms.add(new R("externalColor",(e=>e.externalColor))),Z.add("vcolorExt","vec4"),K.hasMultipassTerrain&&Z.add("depth","float");const i=K.hasModelTransformation;i&&X.uniforms.add(new k("model",(r=>r.modelTransformation??e))),X.code.add(W`
5
+ import{b as e}from"./mat3.js";import{c as r}from"./mat3f64.js";import{I as o}from"./mat4f64.js";import{ForwardLinearDepth as a}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js";import{Offset as i}from"../views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.js";import{ShaderOutput as s}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as l}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{InstancedDoublePrecision as n}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js";import{NormalAttribute as d,NormalType as c}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{PositionAttribute as m}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/PositionAttribute.glsl.js";import{SymbolColor as g}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/SymbolColor.glsl.js";import{TextureCoordinateAttribute as u}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexColor as p}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{VertexNormal as v}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js";import{VerticalOffset as h}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js";import{DefaultMaterialAuxiliaryPasses as f}from"../views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js";import{ComputeNormalTexture as b}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js";import{EvaluateAmbientOcclusion as w}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as x,addAmbientBoostFactor as y,addLightingGlobalFactor as C}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightIntensity as T}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{multipassTerrainTest as j}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import{Normals as L}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Normals.glsl.js";import{PhysicallyBasedRendering as M}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRendering.glsl.js";import{PhysicallyBasedRenderingParameters as P,PBRMode as $}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadShadowMapPass as O,ReadShadowMapDraw as N}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{colorTextureUV as A,normalTextureUV as S,emissiveTextureUV as E,occlusionTextureUV as V,metallicRoughnessTextureUV as D}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TextureTransformUV.glsl.js";import{VisualVariables as _}from"../views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js";import{symbolAlphaCutoff as U}from"../views/3d/webgl-engine/core/shaderLibrary/util/AlphaCutoff.js";import{DiscardOrAdjustAlphaPass as B}from"../views/3d/webgl-engine/core/shaderLibrary/util/AlphaDiscard.glsl.js";import{MixExternalColor as F}from"../views/3d/webgl-engine/core/shaderLibrary/util/MixExternalColor.glsl.js";import{addProjViewLocalOrigin as I,addCameraPosition as R}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float3PassUniform as z}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{Float4PassUniform as W}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatPassUniform as k}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as G}from"../views/3d/webgl-engine/core/shaderModules/interfaces.js";import{Matrix3PassUniform as q}from"../views/3d/webgl-engine/core/shaderModules/Matrix3PassUniform.js";import{Matrix4PassUniform as H}from"../views/3d/webgl-engine/core/shaderModules/Matrix4PassUniform.js";import{ShaderBuilder as J}from"../views/3d/webgl-engine/core/shaderModules/ShaderBuilder.js";import{Texture2DPassUniform as K}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{TransparencyPassType as Q}from"../views/3d/webgl-engine/lib/TransparencyPassType.js";import{VertexAttribute as X}from"../views/3d/webgl-engine/lib/VertexAttribute.js";function Y(Y){const Z=new J,{vertex:ee,fragment:re,varyings:oe}=Z;if(I(ee,Y),Z.include(m),oe.add("vpos","vec3"),Z.include(_,Y),Z.include(n,Y),Z.include(h,Y),Y.hasColorTextureTransform&&Z.include(A),Y.output===s.Color||Y.output===s.Alpha){Y.hasNormalTextureTransform&&Z.include(S),Y.hasEmissionTextureTransform&&Z.include(E),Y.hasOcclusionTextureTransform&&Z.include(V),Y.hasMetallicRoughnessTextureTransform&&Z.include(D),R(ee,Y),Z.include(d,Y),Z.include(t,Y);const s=Y.normalType===c.Attribute||Y.normalType===c.Compressed;s&&Y.offsetBackfaces&&Z.include(i),Z.include(b,Y),Z.include(v,Y),Y.instancedColor&&Z.attributes.add(X.INSTANCECOLOR,"vec4"),oe.add("vPositionLocal","vec3"),Z.include(u,Y),Z.include(a,Y),Z.include(g,Y),Z.include(p,Y),ee.uniforms.add(new W("externalColor",(e=>e.externalColor))),oe.add("vcolorExt","vec4"),Y.hasMultipassTerrain&&oe.add("depth","float");const l=Y.hasModelTransformation;if(l){const a=r();ee.uniforms.add(new H("model",(e=>e.modelTransformation??o))),ee.uniforms.add(new q("normalTransform",(r=>(e(a,r.modelTransformation??o),a))))}ee.code.add(G`
6
6
  void main(void) {
7
7
  forwardNormalizedVertexColor();
8
8
  vcolorExt = externalColor;
9
- ${K.instancedColor?"vcolorExt *= instanceColor * 0.003921568627451;":""}
9
+ ${Y.instancedColor?"vcolorExt *= instanceColor * 0.003921568627451;":""}
10
10
  vcolorExt *= vvColor();
11
11
  vcolorExt *= getSymbolColor();
12
12
  forwardColorMixMode();
13
13
 
14
- if (vcolorExt.a < ${W.float(D)}) {
14
+ if (vcolorExt.a < ${G.float(U)}) {
15
15
  gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
16
16
  } else {
17
17
  vpos = calculateVPos();
18
- ${i?"vpos = (model * vec4(vpos, 1.0)).xyz;":""}
18
+ ${l?"vpos = (model * vec4(vpos, 1.0)).xyz;":""}
19
19
  vPositionLocal = vpos - view[3].xyz;
20
20
  vpos = subtractOrigin(vpos);
21
- ${a?W`vNormalWorld = dpNormal(vvLocalNormal(normalModel()));`:""}
21
+ ${s?G`vNormalWorld = ${l?"normalize(normalTransform * dpNormal(vvLocalNormal(normalModel())))":"dpNormal(vvLocalNormal(normalModel()))"};`:""}
22
22
  vpos = addVerticalOffset(vpos, localOrigin);
23
- ${K.hasVertexTangents?"vTangent = dpTransformVertexTangent(tangent);":""}
23
+ ${Y.hasVertexTangents?"vTangent = dpTransformVertexTangent(tangent);":""}
24
24
  gl_Position = transformPosition(proj, view, vpos);
25
- ${a&&K.offsetBackfaces?"gl_Position = offsetBackfacingClipPosition(gl_Position, vpos, vNormalWorld, cameraPosition);":""}
25
+ ${s&&Y.offsetBackfaces?"gl_Position = offsetBackfacingClipPosition(gl_Position, vpos, vNormalWorld, cameraPosition);":""}
26
26
  }
27
27
 
28
- ${K.hasMultipassTerrain?"depth = (view * vec4(vpos, 1.0)).z;":""}
28
+ ${Y.hasMultipassTerrain?"depth = (view * vec4(vpos, 1.0)).z;":""}
29
29
  forwardLinearDepth();
30
30
  forwardTextureCoordinates();
31
- ${K.hasColorTextureTransform?W`forwardColorUV();`:""}
32
- ${K.hasNormalTextureTransform?W`forwardNormalUV();`:""}
33
- ${K.hasEmissionTextureTransform?W`forwardEmissiveUV();`:""}
34
- ${K.hasOcclusionTextureTransform?W`forwardOcclusionUV();`:""}
35
- ${K.hasMetallicRoughnessTextureTransform?W`forwardMetallicRoughnessUV();`:""}
31
+ ${Y.hasColorTextureTransform?G`forwardColorUV();`:""}
32
+ ${Y.hasNormalTextureTransform?G`forwardNormalUV();`:""}
33
+ ${Y.hasEmissionTextureTransform?G`forwardEmissiveUV();`:""}
34
+ ${Y.hasOcclusionTextureTransform?G`forwardOcclusionUV();`:""}
35
+ ${Y.hasMetallicRoughnessTextureTransform?G`forwardMetallicRoughnessUV();`:""}
36
36
  }
37
- `)}switch(K.output){case a.Alpha:Q.include(i,K),Q.include(_,K),Q.include(C,K),Y.uniforms.add(new z("opacity",(e=>e.opacity)),new z("layerOpacity",(e=>e.layerOpacity))),K.hasColorTexture&&Y.uniforms.add(new q("tex",(e=>e.texture))),Y.include(U),Y.code.add(W`
37
+ `)}switch(Y.output){case s.Alpha:Z.include(l,Y),Z.include(B,Y),Z.include(j,Y),re.uniforms.add(new k("opacity",(e=>e.opacity)),new k("layerOpacity",(e=>e.layerOpacity))),Y.hasColorTexture&&re.uniforms.add(new K("tex",(e=>e.texture))),re.include(F),re.code.add(G`
38
38
  void main() {
39
39
  discardBySlice(vpos);
40
- ${K.hasMultipassTerrain?"terrainDepthTest(gl_FragCoord, depth);":""}
41
- ${K.hasColorTexture?W`
42
- vec4 texColor = texture(tex, ${K.hasColorTextureTransform?W`colorUV`:W`vuv0`});
43
- ${K.textureAlphaPremultiplied?"texColor.rgb /= texColor.a;":""}
44
- discardOrAdjustAlpha(texColor);`:W`vec4 texColor = vec4(1.0);`}
45
- ${K.hasVertexColors?W`float opacity_ = layerOpacity * mixExternalOpacity(vColor.a * opacity, texColor.a, vcolorExt.a, int(colorMixMode));`:W`float opacity_ = layerOpacity * mixExternalOpacity(opacity, texColor.a, vcolorExt.a, int(colorMixMode));`}
40
+ ${Y.hasMultipassTerrain?"terrainDepthTest(gl_FragCoord, depth);":""}
41
+ ${Y.hasColorTexture?G`
42
+ vec4 texColor = texture(tex, ${Y.hasColorTextureTransform?G`colorUV`:G`vuv0`});
43
+ ${Y.textureAlphaPremultiplied?"texColor.rgb /= texColor.a;":""}
44
+ discardOrAdjustAlpha(texColor);`:G`vec4 texColor = vec4(1.0);`}
45
+ ${Y.hasVertexColors?G`float opacity_ = layerOpacity * mixExternalOpacity(vColor.a * opacity, texColor.a, vcolorExt.a, int(colorMixMode));`:G`float opacity_ = layerOpacity * mixExternalOpacity(opacity, texColor.a, vcolorExt.a, int(colorMixMode));`}
46
46
  fragColor = vec4(opacity_);
47
47
  }
48
- `);break;case a.Color:Q.include(i,K),Q.include(b,K),Q.include(f,K),Q.include(_,K),Q.include(K.instancedDoublePrecision?P:$,K),Q.include(C,K),F(Y,K),Y.uniforms.add(X.uniforms.get("localOrigin"),new I("ambient",(e=>e.ambient)),new I("diffuse",(e=>e.diffuse)),new z("opacity",(e=>e.opacity)),new z("layerOpacity",(e=>e.layerOpacity))),K.hasColorTexture&&Y.uniforms.add(new q("tex",(e=>e.texture))),Q.include(j,K),Q.include(L,K),Y.include(U),Q.include(T,K),w(Y),x(Y),y(Y),Y.code.add(W`
48
+ `);break;case s.Color:Z.include(l,Y),Z.include(x,Y),Z.include(w,Y),Z.include(B,Y),Z.include(Y.instancedDoublePrecision?O:N,Y),Z.include(j,Y),R(re,Y),re.uniforms.add(ee.uniforms.get("localOrigin"),new z("ambient",(e=>e.ambient)),new z("diffuse",(e=>e.diffuse)),new k("opacity",(e=>e.opacity)),new k("layerOpacity",(e=>e.layerOpacity))),Y.hasColorTexture&&re.uniforms.add(new K("tex",(e=>e.texture))),Z.include(P,Y),Z.include(M,Y),re.include(F),Z.include(L,Y),y(re),C(re),T(re),re.code.add(G`
49
49
  void main() {
50
50
  discardBySlice(vpos);
51
- ${K.hasMultipassTerrain?"terrainDepthTest(gl_FragCoord, depth);":""}
52
- ${K.hasColorTexture?W`
53
- vec4 texColor = texture(tex, ${K.hasColorTextureTransform?W`colorUV`:W`vuv0`});
54
- ${K.textureAlphaPremultiplied?"texColor.rgb /= texColor.a;":""}
55
- discardOrAdjustAlpha(texColor);`:W`vec4 texColor = vec4(1.0);`}
51
+ ${Y.hasMultipassTerrain?"terrainDepthTest(gl_FragCoord, depth);":""}
52
+ ${Y.hasColorTexture?G`
53
+ vec4 texColor = texture(tex, ${Y.hasColorTextureTransform?G`colorUV`:G`vuv0`});
54
+ ${Y.textureAlphaPremultiplied?"texColor.rgb /= texColor.a;":""}
55
+ discardOrAdjustAlpha(texColor);`:G`vec4 texColor = vec4(1.0);`}
56
56
  shadingParams.viewDirection = normalize(vpos - cameraPosition);
57
- ${K.normalType===n.ScreenDerivative?W`
58
- vec3 normal = screenDerivativeNormal(vPositionLocal);`:W`
57
+ ${Y.normalType===c.ScreenDerivative?G`
58
+ vec3 normal = screenDerivativeNormal(vPositionLocal);`:G`
59
59
  shadingParams.normalView = vNormalWorld;
60
60
  vec3 normal = shadingNormal(shadingParams);`}
61
- ${K.pbrMode===M.Normal?"applyPBRFactors();":""}
61
+ ${Y.pbrMode===$.Normal?"applyPBRFactors();":""}
62
62
  float ssao = evaluateAmbientOcclusionInverse();
63
63
  ssao *= getBakedOcclusion();
64
64
 
65
65
  vec3 posWorld = vpos + localOrigin;
66
66
 
67
67
  float additionalAmbientScale = additionalDirectedAmbientLight(posWorld);
68
- float shadow = ${K.receiveShadows?"readShadowMap(vpos, linearDepth)":K.spherical?"lightingGlobalFactor * (1.0 - additionalAmbientScale)":"0.0"};
68
+ float shadow = ${Y.receiveShadows?"readShadowMap(vpos, linearDepth)":Y.spherical?"lightingGlobalFactor * (1.0 - additionalAmbientScale)":"0.0"};
69
69
 
70
70
  vec3 matColor = max(ambient, diffuse);
71
- ${K.hasVertexColors?W`
71
+ ${Y.hasVertexColors?G`
72
72
  vec3 albedo = mixExternalColor(vColor.rgb * matColor, texColor.rgb, vcolorExt.rgb, int(colorMixMode));
73
- float opacity_ = layerOpacity * mixExternalOpacity(vColor.a * opacity, texColor.a, vcolorExt.a, int(colorMixMode));`:W`
73
+ float opacity_ = layerOpacity * mixExternalOpacity(vColor.a * opacity, texColor.a, vcolorExt.a, int(colorMixMode));`:G`
74
74
  vec3 albedo = mixExternalColor(matColor, texColor.rgb, vcolorExt.rgb, int(colorMixMode));
75
75
  float opacity_ = layerOpacity * mixExternalOpacity(opacity, texColor.a, vcolorExt.a, int(colorMixMode));`}
76
- ${K.hasNormalTexture?W`
77
- mat3 tangentSpace = ${K.hasVertexTangents?"computeTangentSpace(normal);":"computeTangentSpace(normal, vpos, vuv0);"}
78
- vec3 shadingNormal = computeTextureNormal(tangentSpace, ${K.hasNormalTextureTransform?W`normalUV`:"vuv0"});`:W`vec3 shadingNormal = normal;`}
79
- vec3 normalGround = ${K.spherical?W`normalize(posWorld);`:W`vec3(0.0, 0.0, 1.0);`}
76
+ ${Y.hasNormalTexture?G`
77
+ mat3 tangentSpace = ${Y.hasVertexTangents?"computeTangentSpace(normal);":"computeTangentSpace(normal, vpos, vuv0);"}
78
+ vec3 shadingNormal = computeTextureNormal(tangentSpace, ${Y.hasNormalTextureTransform?G`normalUV`:"vuv0"});`:G`vec3 shadingNormal = normal;`}
79
+ vec3 normalGround = ${Y.spherical?G`normalize(posWorld);`:G`vec3(0.0, 0.0, 1.0);`}
80
80
 
81
- ${K.snowCover?W`
81
+ ${Y.snowCover?G`
82
82
  float snow = smoothstep(0.5, 0.55, dot(normal, normalGround));
83
83
  albedo = mix(albedo, vec3(1), snow);
84
84
  shadingNormal = mix(shadingNormal, normal, snow);
@@ -86,14 +86,14 @@ import{I as e}from"./mat4f64.js";import{ForwardLinearDepth as r}from"../views/3d
86
86
 
87
87
  vec3 additionalLight = ssao * mainLightIntensity * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor;
88
88
 
89
- ${K.pbrMode===M.Normal||K.pbrMode===M.Schematic?W`
89
+ ${Y.pbrMode===$.Normal||Y.pbrMode===$.Schematic?G`
90
90
  float additionalAmbientIrradiance = additionalAmbientIrradianceFactor * mainLightIntensity[2];
91
- ${K.snowCover?W`
91
+ ${Y.snowCover?G`
92
92
  mrr = mix(mrr, vec3(0.0, 1.0, 0.04), snow);
93
93
  emission = mix(emission, vec3(0.0), snow);`:""}
94
94
 
95
- vec3 shadedColor = evaluateSceneLightingPBR(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight, shadingParams.viewDirection, normalGround, mrr, emission, additionalAmbientIrradiance);`:W`vec3 shadedColor = evaluateSceneLighting(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight);`}
95
+ vec3 shadedColor = evaluateSceneLightingPBR(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight, shadingParams.viewDirection, normalGround, mrr, emission, additionalAmbientIrradiance);`:G`vec3 shadedColor = evaluateSceneLighting(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight);`}
96
96
  fragColor = highlightSlice(vec4(shadedColor, opacity_), vpos);
97
- ${K.transparencyPassType===H.Color?W`fragColor = premultiplyAlpha(fragColor);`:""}
97
+ ${Y.transparencyPassType===Q.Color?G`fragColor = premultiplyAlpha(fragColor);`:""}
98
98
  }
99
- `)}return Q.include(v,K),Q}const Q=Object.freeze(Object.defineProperty({__proto__:null,build:K},Symbol.toStringTag,{value:"Module"}));export{Q as D,K as b};
99
+ `)}return Z.include(f,Y),Z}const Z=Object.freeze(Object.defineProperty({__proto__:null,build:Y},Symbol.toStringTag,{value:"Module"}));export{Z as D,Y as b};
@@ -7,7 +7,7 @@ float z = 1.0 - abs(normalCompressed.x) - abs(normalCompressed.y);
7
7
  vec3 n = vec3(normalCompressed + vec2(normalCompressed.x >= 0.0 ? 1.0 : -1.0,
8
8
  normalCompressed.y >= 0.0 ? 1.0 : -1.0) * min(z, 0.0), z);
9
9
  return normalize(n);
10
- }`)};N(T,r),a.include(v,r);const I=r.overlayMode!==z.Disabled;switch(r.output){case d.Color:{a.include(M,r),a.include(b,r),I&&a.include(P,{...r,pbrMode:r.pbrMode===j.Terrain?j.TerrainWithWater:j.Water});const t=r.overlayMode===z.EnabledWithWater;t&&a.include(w,r),k.add("vnormal","vec3"),k.add("vpos","vec3"),k.add("vup","vec3"),H(),r.screenSizePerspective&&D(T);const n=r.receiveShadows&&!r.renderOccluded;n&&a.include(s,r),r.screenSizePerspective&&(k.add("screenSizeDistanceToCamera","float"),k.add("screenSizeCosAngle","float")),T.code.add(U`
10
+ }`)};N(T,r),a.include(v,r);const I=r.overlayMode!==z.Disabled,q=I&&r.invisible;switch(r.output){case d.Color:{a.include(M,r),a.include(b,r),I&&a.include(P,{...r,pbrMode:r.pbrMode===j.Terrain?j.TerrainWithWater:j.Water});const t=r.overlayMode===z.EnabledWithWater;t&&a.include(w,r),k.add("vnormal","vec3"),k.add("vpos","vec3"),k.add("vup","vec3"),H(),r.screenSizePerspective&&D(T);const n=r.receiveShadows&&!r.renderOccluded;n&&a.include(s,r),r.screenSizePerspective&&(k.add("screenSizeDistanceToCamera","float"),k.add("screenSizeCosAngle","float")),T.code.add(U`
11
11
  void main(void) {
12
12
  //Position
13
13
  vpos = position;
@@ -121,29 +121,29 @@ return (min(min(c.r, c.g), c.b) + max(max(c.r, c.g), c.b)) * 0.5;
121
121
  fragColor = mix(fragColor, vec4(1.0, 0.0, 0.0, 1.0), edgeFactor);`:""}
122
122
  fragColor = highlightSlice(fragColor, vpos);
123
123
  }
124
- `)}break;case d.Depth:I&&a.include(P,r),a.include(h,r),t(a),n(a),T.code.add(U`
124
+ `)}break;case d.Depth:q&&a.include(P,r),a.include(h,r),t(a),n(a),T.code.add(U`
125
125
  void main(void) {
126
- ${I?U`setOverlayVTC(getUV0());`:""}
126
+ ${q?U`setOverlayVTC(getUV0());`:""}
127
127
  gl_Position = transformPositionWithDepth(proj, view, position, nearFar, linearDepth);
128
128
  }
129
129
  `),_.code.add(U`
130
130
  void main() {
131
- ${I&&r.invisible?U`if (getCombinedOverlayColor().a == 0.0) { discard; }`:""}
131
+ ${q?U`if (getCombinedOverlayColor().a == 0.0) { discard; }`:""}
132
132
  outputDepth(linearDepth);
133
133
  }
134
134
  `);break;case d.Shadow:case d.ShadowHighlight:case d.ShadowExcludeHighlight:a.include(h,r),t(a),n(a),T.code.add(U`void main(void) {
135
135
  gl_Position = transformPositionWithDepth(proj, view, position, nearFar, linearDepth);
136
136
  }`),_.code.add(U`void main() {
137
137
  outputDepth(linearDepth);
138
- }`);break;case d.Normal:I&&a.include(P,r),k.add("vnormal","vec3"),D(T),H(),T.code.add(U`
138
+ }`);break;case d.Normal:q&&a.include(P,r),k.add("vnormal","vec3"),D(T),H(),T.code.add(U`
139
139
  void main(void) {
140
- ${I?U`setOverlayVTC(getUV0());`:""}
140
+ ${q?U`setOverlayVTC(getUV0());`:""}
141
141
  gl_Position = transformPosition(proj, view, position);
142
142
  vnormal = normalize((viewNormal * vec4(getNormal(), 1.0)).xyz);
143
143
  }
144
144
  `),_.code.add(U`
145
145
  void main() {
146
- ${I&&r.invisible?U`if (getCombinedOverlayColor().a == 0.0) { discard; }`:""}
146
+ ${q?U`if (getCombinedOverlayColor().a == 0.0) { discard; }`:""}
147
147
  vec3 normal = normalize(vnormal);
148
148
  if (gl_FrontFacing == false) {
149
149
  normal = -normal;
package/copyright.txt CHANGED
@@ -1,4 +1,4 @@
1
- COPYRIGHT © 2022 Esri
1
+ COPYRIGHT © 2023 Esri
2
2
 
3
3
  All rights reserved under the copyright laws of the United States
4
4
  and applicable international laws, treaties, and conventions.
package/geometry/Mesh.js CHANGED
@@ -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/Error.js";import{HandleOwnerMixin as r}from"../core/HandleOwner.js";import o from"../core/Loadable.js";import s from"../core/Logger.js";import{EsriPromiseMixin as n}from"../core/Promise.js";import{whenOrAbort as i}from"../core/promiseUtils.js";import{watch as a}from"../core/reactiveUtils.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{subclass as p}from"../core/accessorSupport/decorators/subclass.js";import{c as l}from"../chunks/vec3f64.js";import m from"./Extent.js";import h from"./Geometry.js";import u from"./Point.js";import f from"./Polygon.js";import{composeAxes as d,create as g}from"./support/axisAngleDegrees.js";import x from"./support/MeshComponent.js";import y from"./support/MeshGeoreferencedRelativeVertexSpace.js";import v from"./support/MeshGeoreferencedVertexSpace.js";import j from"./support/MeshLocalVertexSpace.js";import w from"./support/MeshTransform.js";import{MeshVertexAttributes as b}from"./support/MeshVertexAttributes.js";import{triangulate as S}from"./support/triangulationUtils.js";import{getProjectedExtent as L,getExtentFromPositions as A}from"./support/meshUtils/bounds.js";import{centerAt as M}from"./support/meshUtils/centerAt.js";import{project as P}from"./support/meshUtils/georeference.js";import{loadExternal as R}from"./support/meshUtils/loadExternal.js";import{Metadata as F}from"./support/meshUtils/Metadata.js";import{offset as E}from"./support/meshUtils/offset.js";import{convertUnitGeometry as U,createUnitSizeBox as C,extractSingleFaceOfBox as _,createUnitSizeSphere as z,createUnitSizeCylinder as G,convertPlaneSizeParameter as O,createUnitSizePlane as T}from"./support/meshUtils/primitives.js";import{rotate as V}from"./support/meshUtils/rotate.js";import{scale as W}from"./support/meshUtils/scale.js";var B;const k="esri.geometry.Mesh",D={base:null,key:"type",defaultKeyValue:"georeferenced",typeMap:{georeferenced:v,"georeferenced-relative":y,local:j}};let N=B=class extends(r(o.LoadableMixin(n(h)))){constructor(e){super(e),this.components=null,this.vertexSpace=new v,this.transform=null,this.metadata=new F,this.hasZ=!0,this.hasM=!1,this.vertexAttributes=new b,this.type="mesh"}initialize(){(0===this.metadata.externalSources.length||this.vertexAttributes.position.length)&&(this.loadStatus="loaded"),this.when((()=>{this.handles.add(a((()=>({vertexAttributes:this.vertexAttributes,components:this.components?.map((e=>e.clone()))})),(()=>this._clearSources()),{once:!0,sync:!0}))}))}get hasExtent(){return this.loaded?this.vertexAttributes.position.length>0&&(!this.components||this.components.length>0):null!=this.metadata.displaySource?.extent}get _transformedExtent(){const{components:e,spatialReference:t,vertexAttributes:r,vertexSpace:o}=this,s=r.position;if(0===s.length||e&&0===e.length)return new m({xmin:0,ymin:0,zmin:0,xmax:0,ymax:0,zmax:0,spatialReference:t});if("local"===o.type){const{_untransformedExtent:e,transform:r}=this;return L(e,r,o,t)}if("georeferenced-relative"===o.type){const{transform:e}=this,r=P(t,e,o,s,t);return A(r,t)}return A(s,t)}get _untransformedExtent(){return A(this.vertexAttributes.position,this.spatialReference)}get anchor(){const{vertexSpace:e}=this;if(e.isRelative)return e.getOriginPoint(this.spatialReference);const{center:t,zmin:r}=this._transformedExtent;return new u({x:t.x,y:t.y,z:r,spatialReference:this.spatialReference})}get origin(){const{vertexSpace:e}=this;return e.isRelative?e.getOriginPoint(this.spatialReference):this._transformedExtent.center}get extent(){return this.loaded||null==this.metadata?.displaySource?.extent?this._transformedExtent:this.metadata.displaySource.extent.clone()}addComponent(e){this.loaded?(this.components||(this.components=[]),this.components.push(x.from(e)),this.notifyChange("components")):s.getLogger(this).error("addComponent()","Mesh must be loaded before applying operations")}removeComponent(e){if(this.loaded){if(this.components){const t=this.components.indexOf(e);if(-1!==t)return this.components.splice(t,1),void this.notifyChange("components")}s.getLogger(this).error("removeComponent()","Provided component is not part of the list of components")}else s.getLogger(this).error("removeComponent()","Mesh must be loaded before applying operations")}rotate(e,t,r,o){return d(e,t,r,H),V(this,H,o),this}offset(e,t,r,o){return this.loaded?(Z[0]=e,Z[1]=t,Z[2]=r,E(this,Z,o),this):(s.getLogger(this).error("offset()","Mesh must be loaded before applying operations"),this)}scale(e,t){return this.loaded?(W(this,e,t),this):(s.getLogger(this).error("scale()","Mesh must be loaded before applying operations"),this)}centerAt(e,t){return this.loaded?(M(this,e,t),this):(s.getLogger(this).error("centerAt()","Mesh must be loaded before applying operations"),this)}load(e){const{metadata:{displaySource:t}}=this;return t&&this.addResolvingPromise(R(this,t,e)),Promise.resolve(this)}addExternalSources(e){this.metadata.externalSources.addMany(e)}updateDisplaySource(e){this.metadata.displaySource=e}clone(){return this.cloneWithVertexSpace(this.vertexSpace.clone())}cloneWithVertexSpace(e){let t=null;if(this.components){const e=new Map,r=new Map;t=this.components.map((t=>t.cloneWithDeduplication(e,r)))}const r={components:t,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes.clone(),vertexSpace:e,transform:this.transform?.clone()??null,metadata:this.metadata.clone()};return new B(r)}cloneShallow(){return new B({components:this.components,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes,vertexSpace:this.vertexSpace.clone(),transform:this.transform,metadata:this.metadata})}vertexAttributesChanged(){this.notifyChange("vertexAttributes")}async toBinaryGLTF(e){const t=import("./support/meshUtils/exporters/gltf/gltfexport.js"),r=this.load(),o=await Promise.all([t,r]),{toBinaryGLTF:s}=o[0];return s(this,e)}get memoryUsage(){let e=0;if(e+=this.vertexAttributes.memoryUsage,null!=this.components)for(const t of this.components)e+=t.memoryUsage;return e}_clearSources(){this.metadata.clearSources()}static createBox(e,t){if(!(e instanceof u))return s.getLogger(k).error(".createBox()","expected location to be a Point instance"),null;const r=new B(U(C(),e,t));return t&&t.imageFace&&"all"!==t.imageFace?_(r,t.imageFace):r}static createSphere(e,t){return e instanceof u?new B(U(z(t&&t.densificationFactor||0),e,t)):(s.getLogger(k).error(".createSphere()","expected location to be a Point instance"),null)}static createCylinder(e,t){return e instanceof u?new B(U(G(t&&t.densificationFactor||0),e,t)):(s.getLogger(k).error(".createCylinder()","expected location to be a Point instance"),null)}static createPlane(e,t){if(!(e instanceof u))return s.getLogger(k).error(".createPlane()","expected location to be a Point instance"),null;const r=t?.facing??"up",o=O(r,t?.size);return new B(U(T(r),e,{...t,size:o}))}static createFromPolygon(e,t){if(!(e instanceof f))return s.getLogger(k).error(".createFromPolygon()","expected polygon to be a Polygon instance"),null;const r=S(e);return new B({vertexAttributes:new b({position:r.position}),components:[new x({faces:r.faces,shading:"flat",material:t?.material??null})],spatialReference:e.spatialReference,vertexSpace:new v})}static async createFromGLTF(e,r,o){if(!(e instanceof u))throw s.getLogger(k).error(".createfromGLTF()","expected location to be a Point instance"),new t("invalid-input","Expected location to be a Point instance");const{loadGLTFMesh:n}=await i(import("./support/meshUtils/loadGLTFMesh.js"),o);return new B(await n(e,r,o))}static async createFromFiles(e,r,o){if(!(e instanceof u)){const e="Expected location to be a Point instance";throw s.getLogger(k).error(".createFromFiles()",e),new t("invalid-input",e)}const n=B.createWithExternalSource(e,r),i=o?.layer;if(!i){const e="A layer is needed to convert the files";throw s.getLogger(k).error(".createFromFiles()",e),new t("invalid-input",e)}const[a]=await i.uploadAssets([n],o);return a}static createWithExternalSource(e,t,r){const o=r?.extent??null,{x:s,y:n,z:i,spatialReference:a}=e,c=r?.transform?.clone()??new w,p=r?.vertexSpace??new j({origin:[s,n,i??0]}),l={source:t,extent:o},m=new F;return m.externalSources.push(l),new B({metadata:m,transform:c,vertexSpace:p,spatialReference:a})}static createIncomplete(e,r){const{x:o,y:s,z:n,spatialReference:i}=e,a=r?.transform?.clone()??new w,c=r?.vertexSpace??new j({origin:[o,s,n??0]}),p=new B({transform:a,vertexSpace:c,spatialReference:i});return p.addResolvingPromise(Promise.reject(new t("mesh-incomplete","Mesh resources are not complete"))),p}};e([c({type:[x],json:{write:!0}})],N.prototype,"components",void 0),e([c({nonNullable:!0,types:D,constructOnly:!0,json:{write:!0}})],N.prototype,"vertexSpace",void 0),e([c({type:w,json:{write:!0}})],N.prototype,"transform",void 0),e([c({constructOnly:!0})],N.prototype,"metadata",void 0),e([c()],N.prototype,"hasExtent",null),e([c()],N.prototype,"_transformedExtent",null),e([c()],N.prototype,"_untransformedExtent",null),e([c()],N.prototype,"anchor",null),e([c()],N.prototype,"origin",null),e([c({readOnly:!0,json:{read:!1}})],N.prototype,"extent",null),e([c({readOnly:!0,json:{read:!1,write:!0,default:!0}})],N.prototype,"hasZ",void 0),e([c({readOnly:!0,json:{read:!1,write:!0,default:!1}})],N.prototype,"hasM",void 0),e([c({type:b,nonNullable:!0,json:{write:!0}})],N.prototype,"vertexAttributes",void 0),N=B=e([p(k)],N);const Z=l(),H=g(),I=N;export{I as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import t from"../core/Error.js";import{HandleOwnerMixin as r}from"../core/HandleOwner.js";import o from"../core/Loadable.js";import s from"../core/Logger.js";import{EsriPromiseMixin as n}from"../core/Promise.js";import{whenOrAbort as i}from"../core/promiseUtils.js";import{watch as a}from"../core/reactiveUtils.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{subclass as p}from"../core/accessorSupport/decorators/subclass.js";import{c as l}from"../chunks/vec3f64.js";import m from"./Extent.js";import h from"./Geometry.js";import u from"./Point.js";import f from"./Polygon.js";import{composeAxes as d,create as g}from"./support/axisAngleDegrees.js";import x from"./support/MeshComponent.js";import y from"./support/MeshGeoreferencedRelativeVertexSpace.js";import v from"./support/MeshGeoreferencedVertexSpace.js";import j from"./support/MeshLocalVertexSpace.js";import w from"./support/MeshTransform.js";import{MeshVertexAttributes as S}from"./support/MeshVertexAttributes.js";import{triangulate as b}from"./support/triangulationUtils.js";import{getProjectedExtent as L,getExtentFromPositions as R}from"./support/meshUtils/bounds.js";import{centerAt as A}from"./support/meshUtils/centerAt.js";import{project as M}from"./support/meshUtils/georeference.js";import{loadExternal as P}from"./support/meshUtils/loadExternal.js";import{Metadata as F}from"./support/meshUtils/Metadata.js";import{offset as E}from"./support/meshUtils/offset.js";import{convertUnitGeometry as U,createUnitSizeBox as C,extractSingleFaceOfBox as _,createUnitSizeSphere as z,createUnitSizeCylinder as G,convertPlaneSizeParameter as O,createUnitSizePlane as T}from"./support/meshUtils/primitives.js";import{rotate as V}from"./support/meshUtils/rotate.js";import{scale as W}from"./support/meshUtils/scale.js";var B;const k="esri.geometry.Mesh",D={base:null,key:"type",defaultKeyValue:"georeferenced",typeMap:{georeferenced:v,"georeferenced-relative":y,local:j}};let N=B=class extends(r(o.LoadableMixin(n(h)))){constructor(e){super(e),this.components=null,this.vertexSpace=new v,this.transform=null,this.metadata=new F,this.hasZ=!0,this.hasM=!1,this.vertexAttributes=new S,this.type="mesh"}initialize(){(0===this.metadata.externalSources.length||this.vertexAttributes.position.length)&&(this.loadStatus="loaded"),this.when((()=>{this.handles.add(a((()=>({vertexAttributes:this.vertexAttributes,components:this.components?.map((e=>e.clone()))})),(()=>this._clearSources()),{once:!0,sync:!0}))}))}get hasExtent(){return this.loaded?this.vertexAttributes.position.length>0&&(!this.components||this.components.length>0):null!=this.metadata.displaySource?.extent}get _transformedExtent(){const{components:e,spatialReference:t,vertexAttributes:r,vertexSpace:o}=this,s=r.position;if(0===s.length||e&&0===e.length)return new m({xmin:0,ymin:0,zmin:0,xmax:0,ymax:0,zmax:0,spatialReference:t});if("local"===o.type){const{_untransformedExtent:e,transform:r}=this;return L(e,r,o,t)}if("georeferenced-relative"===o.type){const{transform:e}=this,r=M({positions:s,transform:e,vertexSpace:o,inSpatialReference:t,outSpatialReference:t,local:!1});return R(r,t)}return R(s,t)}get _untransformedExtent(){return R(this.vertexAttributes.position,this.spatialReference)}get anchor(){const{vertexSpace:e}=this;if(e.isRelative)return e.getOriginPoint(this.spatialReference);const{center:t,zmin:r}=this._transformedExtent;return new u({x:t.x,y:t.y,z:r,spatialReference:this.spatialReference})}get origin(){const{vertexSpace:e}=this;return e.isRelative?e.getOriginPoint(this.spatialReference):this._transformedExtent.center}get extent(){return this.loaded||null==this.metadata?.displaySource?.extent?this._transformedExtent:this.metadata.displaySource.extent.clone()}addComponent(e){this.loaded?(this.components||(this.components=[]),this.components.push(x.from(e)),this.notifyChange("components")):s.getLogger(this).error("addComponent()","Mesh must be loaded before applying operations")}removeComponent(e){if(this.loaded){if(this.components){const t=this.components.indexOf(e);if(-1!==t)return this.components.splice(t,1),void this.notifyChange("components")}s.getLogger(this).error("removeComponent()","Provided component is not part of the list of components")}else s.getLogger(this).error("removeComponent()","Mesh must be loaded before applying operations")}rotate(e,t,r,o){return d(e,t,r,H),V(this,H,o),this}offset(e,t,r,o){return this.loaded?(Z[0]=e,Z[1]=t,Z[2]=r,E(this,Z,o),this):(s.getLogger(this).error("offset()","Mesh must be loaded before applying operations"),this)}scale(e,t){return this.loaded?(W(this,e,t),this):(s.getLogger(this).error("scale()","Mesh must be loaded before applying operations"),this)}centerAt(e,t){return this.loaded?(A(this,e,t),this):(s.getLogger(this).error("centerAt()","Mesh must be loaded before applying operations"),this)}load(e){const{metadata:{displaySource:t}}=this;return t&&this.addResolvingPromise(P(this,t,e)),Promise.resolve(this)}addExternalSources(e){this.metadata.externalSources.addMany(e)}updateDisplaySource(e){this.metadata.displaySource=e}clone(){return this.cloneWithVertexSpace(this.vertexSpace.clone())}cloneWithVertexSpace(e){let t=null;if(this.components){const e=new Map,r=new Map;t=this.components.map((t=>t.cloneWithDeduplication(e,r)))}const r={components:t,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes.clone(),vertexSpace:e,transform:this.transform?.clone()??null,metadata:this.metadata.clone()};return new B(r)}cloneShallow(){return new B({components:this.components,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes,vertexSpace:this.vertexSpace.clone(),transform:this.transform,metadata:this.metadata})}vertexAttributesChanged(){this.notifyChange("vertexAttributes")}async toBinaryGLTF(e){const t=import("./support/meshUtils/exporters/gltf/gltfexport.js"),r=this.load(),o=await Promise.all([t,r]),{toBinaryGLTF:s}=o[0];return s(this,e)}get memoryUsage(){let e=0;if(e+=this.vertexAttributes.memoryUsage,null!=this.components)for(const t of this.components)e+=t.memoryUsage;return e}_clearSources(){this.metadata.clearSources()}static createBox(e,t){if(!(e instanceof u))return s.getLogger(k).error(".createBox()","expected location to be a Point instance"),null;const r=new B(U(C(),e,t));return t&&t.imageFace&&"all"!==t.imageFace?_(r,t.imageFace):r}static createSphere(e,t){return e instanceof u?new B(U(z(t&&t.densificationFactor||0),e,t)):(s.getLogger(k).error(".createSphere()","expected location to be a Point instance"),null)}static createCylinder(e,t){return e instanceof u?new B(U(G(t&&t.densificationFactor||0),e,t)):(s.getLogger(k).error(".createCylinder()","expected location to be a Point instance"),null)}static createPlane(e,t){if(!(e instanceof u))return s.getLogger(k).error(".createPlane()","expected location to be a Point instance"),null;const r=t?.facing??"up",o=O(r,t?.size);return new B(U(T(r),e,{...t,size:o}))}static createFromPolygon(e,t){if(!(e instanceof f))return s.getLogger(k).error(".createFromPolygon()","expected polygon to be a Polygon instance"),null;const r=b(e);return new B({vertexAttributes:new S({position:r.position}),components:[new x({faces:r.faces,shading:"flat",material:t?.material??null})],spatialReference:e.spatialReference,vertexSpace:new v})}static async createFromGLTF(e,r,o){if(!(e instanceof u))throw s.getLogger(k).error(".createfromGLTF()","expected location to be a Point instance"),new t("invalid-input","Expected location to be a Point instance");const{loadGLTFMesh:n}=await i(import("./support/meshUtils/loadGLTFMesh.js"),o);return new B(await n(e,r,o))}static async createFromFiles(e,r,o){if(!(e instanceof u)){const e="Expected location to be a Point instance";throw s.getLogger(k).error(".createFromFiles()",e),new t("invalid-input",e)}const n=B.createWithExternalSource(e,r),i=o?.layer;if(!i){const e="A layer is needed to convert the files";throw s.getLogger(k).error(".createFromFiles()",e),new t("invalid-input",e)}const[a]=await i.uploadAssets([n],o);return a}static createWithExternalSource(e,t,r){const o=r?.extent??null,{x:s,y:n,z:i,spatialReference:a}=e,c=r?.transform?.clone()??new w,p=r?.vertexSpace??new j({origin:[s,n,i??0]}),l={source:t,extent:o},m=new F;return m.externalSources.push(l),new B({metadata:m,transform:c,vertexSpace:p,spatialReference:a})}static createIncomplete(e,r){const{x:o,y:s,z:n,spatialReference:i}=e,a=r?.transform?.clone()??new w,c=r?.vertexSpace??new j({origin:[o,s,n??0]}),p=new B({transform:a,vertexSpace:c,spatialReference:i});return p.addResolvingPromise(Promise.reject(new t("mesh-incomplete","Mesh resources are not complete"))),p}};e([c({type:[x],json:{write:!0}})],N.prototype,"components",void 0),e([c({nonNullable:!0,types:D,constructOnly:!0,json:{write:!0}})],N.prototype,"vertexSpace",void 0),e([c({type:w,json:{write:!0}})],N.prototype,"transform",void 0),e([c({constructOnly:!0})],N.prototype,"metadata",void 0),e([c()],N.prototype,"hasExtent",null),e([c()],N.prototype,"_transformedExtent",null),e([c()],N.prototype,"_untransformedExtent",null),e([c()],N.prototype,"anchor",null),e([c()],N.prototype,"origin",null),e([c({readOnly:!0,json:{read:!1}})],N.prototype,"extent",null),e([c({readOnly:!0,json:{read:!1,write:!0,default:!0}})],N.prototype,"hasZ",void 0),e([c({readOnly:!0,json:{read:!1,write:!0,default:!1}})],N.prototype,"hasM",void 0),e([c({type:S,nonNullable:!0,json:{write:!0}})],N.prototype,"vertexAttributes",void 0),N=B=e([p(k)],N);const Z=l(),H=g(),I=N;export{I 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 n from"../../Extent.js";import{project as t}from"./georeference.js";function m({xmin:n,xmax:m,ymin:r,ymax:x,zmin:i,zmax:o},l,c,f){i??=0,o??=0,a??=new Float64Array(24);const h=a;return h[0]=n,h[1]=r,h[2]=i,h[3]=n,h[4]=x,h[5]=i,h[6]=m,h[7]=x,h[8]=i,h[9]=m,h[10]=r,h[11]=i,h[12]=n,h[13]=r,h[14]=o,h[15]=n,h[16]=x,h[17]=o,h[18]=m,h[19]=x,h[20]=o,h[21]=m,h[22]=r,h[23]=o,t(f,l,c,h,f,h),e(h,f)}let a=null;function e(t,m){let a=1/0,e=1/0,r=1/0,x=-1/0,i=-1/0,o=-1/0;const l=t.length;let c=0;for(;c<l;){const n=t[c++],m=t[c++],l=t[c++];a=Math.min(a,n),e=Math.min(e,m),r=Math.min(r,l),x=Math.max(x,n),i=Math.max(i,m),o=Math.max(o,l)}return new n({xmin:a,ymin:e,zmin:r,xmax:x,ymax:i,zmax:o,spatialReference:m})}export{e as getExtentFromPositions,m as getProjectedExtent};
5
+ import t from"../../Extent.js";import{project as n}from"./georeference.js";function e({xmin:t,xmax:e,ymin:i,ymax:o,zmin:r,zmax:x},l,c,s){r??=0,x??=0,a??=new Float64Array(24);const f=a;return f[0]=t,f[1]=i,f[2]=r,f[3]=t,f[4]=o,f[5]=r,f[6]=e,f[7]=o,f[8]=r,f[9]=e,f[10]=i,f[11]=r,f[12]=t,f[13]=i,f[14]=x,f[15]=t,f[16]=o,f[17]=x,f[18]=e,f[19]=o,f[20]=x,f[21]=e,f[22]=i,f[23]=x,n({positions:f,transform:l,vertexSpace:c,inSpatialReference:s,outSpatialReference:s,outPositions:f,local:!1}),m(f,s)}let a=null;function m(n,e){let a=1/0,m=1/0,i=1/0,o=-1/0,r=-1/0,x=-1/0;const l=n.length;let c=0;for(;c<l;){const t=n[c++],e=n[c++],l=n[c++];a=Math.min(a,t),m=Math.min(m,e),i=Math.min(i,l),o=Math.max(o,t),r=Math.max(r,e),x=Math.max(x,l)}return new t({xmin:a,ymin:m,zmin:i,xmax:o,ymax:r,zmax:x,spatialReference:e})}export{m as getExtentFromPositions,e as getProjectedExtent};
@@ -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{getMetersPerCartesianUnitForSR as n,convertUnit as t}from"../../../core/unitUtils.js";import{c as e}from"../../../chunks/mat3f64.js";import{j as r,m as o,a as i,k as a}from"../../../chunks/mat4.js";import{I as l,c as s}from"../../../chunks/mat4f64.js";import{k as c}from"../../../chunks/vec3.js";import{Z as u,f}from"../../../chunks/vec3f64.js";import{b as p}from"../../../chunks/mat3.js";import{projectBuffer as m,canProjectWithoutEngine as g,computeTranslationToOriginAndRotation as h}from"../../projection.js";import{getSphericalPCPF as j}from"../../spatialReferenceEllipsoidUtils.js";import{newDoubleArray as y,copyInto as w}from"../DoubleArray.js";import A from"../MeshGeoreferencedRelativeVertexSpace.js";import R from"../MeshGeoreferencedVertexSpace.js";import x from"../MeshLocalVertexSpace.js";import F from"../MeshTransform.js";import{t as v,a as k}from"../../../chunks/vec32.js";import{isGeographicMesh as M}from"./geographicUtils.js";import{transformNormal as d,transformTangent as S,projectFromPCPF as b,projectNormalFromPCPF as z,projectTangentFromPCPF as G,projectToPCPF as U,projectNormalToPCPF as V,projectTangentToPCPF as O}from"./projection.js";function P(n,t,e){return M(t.spatialReference,e)?Z(n,t,e):L(n,t,e)}function T(n,t,e,r){const{position:o,normal:i,tangent:a}=n;if(!t.isRelative)return{position:o,normal:i,tangent:a};const s=e?.localMatrix??l;return P({position:v(new Float64Array(o.length),o,s),normal:null!=i?d(i,new Float32Array(i.length),s):null,tangent:null!=a?S(a,new Float32Array(a.length),s):null},t.getOriginPoint(r),{geographic:!t.isGeoreferenced})}function q(n,t,e){if(e?.useTransform){const{position:r,normal:o,tangent:i}=n,{x:a,y:l,z:s}=t,c=f(a,l,s??0);return{vertexAttributes:{position:r,normal:o,tangent:i},vertexSpace:e.geographic??1?new x({origin:c}):new A({origin:c}),transform:new F}}return{vertexAttributes:P(n,t,e),vertexSpace:new R,transform:null}}function D(n,t,e){return M(t.spatialReference,e)?K(n,t,e):J(n,t,e)}function E(n,t,e,r,o){if(!t.isRelative)return D(n,r,o);const{spatialReference:i}=r,a=T(n,t,e,i);return r.equals(t.getOriginPoint(i))?J(a,r,o):D(a,r,o)}function I(n,t,e,i,a,s){const f=e.isRelative?e.origin:u,p=e.isRelative?t?.localMatrix??l:l;if(e.isGeoreferenced){const t=s??y(i.length);if(r(p,l)?w(t,i):v(t,i,p),!c(f,u)){const[n,e,r]=f;for(let o=0;o<t.length;o+=3)t[o]+=n,t[o+1]+=e,t[o+2]+=r}return m(t,n,0,t,a,0,t.length/3),t}const A=j(n),R=g(n,A)?A:n;h(n,f,$,R),o($,$,p);const x=s??y(i.length);return v(x,i,$),m(x,R,0,x,a,0,x.length/3),x}function L(n,t,e){const r=new Float64Array(n.position.length),o=n.position,i=t.x,a=t.y,l=t.z??0,s=Y(e?e.unit:null,t.spatialReference);for(let c=0;c<o.length;c+=3)r[c]=o[c]*s+i,r[c+1]=o[c+1]*s+a,r[c+2]=o[c+2]*s+l;return{position:r,normal:n.normal,tangent:n.tangent}}function Z(n,t,e){const r=t.spatialReference,o=N(t,e,$),i=new Float64Array(n.position.length),a=B(n.position,o,r,i),l=p(nn,o);return{position:a,normal:C(a,i,n.normal,l,r),tangent:H(a,i,n.tangent,l,r)}}function B(n,t,e,r){v(r,n,t);const o=new Float64Array(n.length);return b(r,o,e)}function C(n,t,e,r,o){if(null==e)return null;const i=new Float32Array(e.length);return k(i,e,r),z(i,n,t,o,i),i}function H(n,t,e,r,o){if(null==e)return null;const i=new Float32Array(e.length);k(i,e,r,4);for(let a=3;a<i.length;a+=4)i[a]=e[a];return G(i,n,t,o,i),i}function J(n,t,e){const r=new Float64Array(n.position.length),o=n.position,i=t.x,a=t.y,l=t.z??0,s=Y(e?e.unit:null,t.spatialReference);for(let c=0;c<o.length;c+=3)r[c]=(o[c]-i)/s,r[c+1]=(o[c+1]-a)/s,r[c+2]=(o[c+2]-l)/s;return{position:r,normal:n.normal,tangent:n.tangent}}function K(n,t,e){const r=t.spatialReference;N(t,e,$);const o=i(_,$),a=new Float64Array(n.position.length),l=Q(n.position,r,o,a),s=p(nn,o);return{position:l,normal:W(n.normal,n.position,a,r,s),tangent:X(n.tangent,n.position,a,r,s)}}function N(n,t,e){h(n.spatialReference,[n.x,n.y,n.z??0],e,j(n.spatialReference));const r=Y(t?t.unit:null,n.spatialReference);return a(e,e,[r,r,r]),e}function Q(n,t,e,r){const o=U(n,t,r),i=new Float64Array(o.length);return v(i,o,e),i}function W(n,t,e,r,o){if(null==n)return null;const i=V(n,t,e,r,new Float32Array(n.length));return k(i,i,o),i}function X(n,t,e,r,o){if(null==n)return null;const i=O(n,t,e,r,new Float32Array(n.length));return k(i,i,o,4),i}function Y(e,r){if(null==e)return 1;const o=n(r);return 1/t(o,"meters",e)}const $=s(),_=s(),nn=e();export{P as georeference,T as georeferenceApplyTransform,q as georeferenceByTransform,I as project,D as ungeoreference,E as ungeoreferenceByTransform};
5
+ import{getMetersPerCartesianUnitForSR as n,convertUnit as t}from"../../../core/unitUtils.js";import{c as e}from"../../../chunks/mat3f64.js";import{j as r,m as o,a as i,k as a}from"../../../chunks/mat4.js";import{I as s,c as l}from"../../../chunks/mat4f64.js";import{k as c}from"../../../chunks/vec3.js";import{Z as u,f}from"../../../chunks/vec3f64.js";import{b as p}from"../../../chunks/mat3.js";import{projectBuffer as m,canProjectWithoutEngine as g,computeTranslationToOriginAndRotation as h}from"../../projection.js";import{getSphericalPCPF as j}from"../../spatialReferenceEllipsoidUtils.js";import{newDoubleArray as y,copyInto as R}from"../DoubleArray.js";import w from"../MeshGeoreferencedRelativeVertexSpace.js";import A from"../MeshGeoreferencedVertexSpace.js";import x from"../MeshLocalVertexSpace.js";import v from"../MeshTransform.js";import{t as F,a as k}from"../../../chunks/vec32.js";import{isGeographicMesh as S}from"./geographicUtils.js";import{transformNormal as M,transformTangent as d,projectFromPCPF as b,projectNormalFromPCPF as z,projectTangentFromPCPF as G,projectToPCPF as P,projectNormalToPCPF as U,projectTangentToPCPF as V}from"./projection.js";function O(n,t,e){return S(t.spatialReference,e)?Z(n,t,e):L(n,t,e)}function T(n,t,e,r){const{position:o,normal:i,tangent:a}=n;if(!t.isRelative)return{position:o,normal:i,tangent:a};const l=e?.localMatrix??s;return O({position:F(new Float64Array(o.length),o,l),normal:null!=i?M(i,new Float32Array(i.length),l):null,tangent:null!=a?d(a,new Float32Array(a.length),l):null},t.getOriginPoint(r),{geographic:!t.isGeoreferenced})}function q(n,t,e){if(e?.useTransform){const{position:r,normal:o,tangent:i}=n,{x:a,y:s,z:l}=t,c=f(a,s,l??0);return{vertexAttributes:{position:r,normal:o,tangent:i},vertexSpace:e.geographic??1?new x({origin:c}):new w({origin:c}),transform:new v}}return{vertexAttributes:O(n,t,e),vertexSpace:new A,transform:null}}function D(n,t,e){return S(t.spatialReference,e)?K(n,t,e):J(n,t,e)}function E(n,t,e,r,o){if(!t.isRelative)return D(n,r,o);const{spatialReference:i}=r,a=T(n,t,e,i);return r.equals(t.getOriginPoint(i))?J(a,r,o):D(a,r,o)}function I({positions:n,transform:t,vertexSpace:e,inSpatialReference:i,outSpatialReference:a,outPositions:l,local:f}){const p=e.isRelative?e.origin:u,w=e.isRelative?t?.localMatrix??s:s;if(e.isGeoreferenced){const t=l??y(n.length);if(r(w,s)?R(t,n):F(t,n,w),!c(p,u)){const[n,e,r]=p;for(let o=0;o<t.length;o+=3)t[o]+=n,t[o+1]+=e,t[o+2]+=r}return m(t,i,0,t,a,0,t.length/3),t}const A=j(i),x=!f&&g(i,A)?A:i;h(i,p,$,x),o($,$,w);const v=l??y(n.length);return F(v,n,$),m(v,x,0,v,a,0,v.length/3),v}function L(n,t,e){const r=new Float64Array(n.position.length),o=n.position,i=t.x,a=t.y,s=t.z??0,l=Y(e?e.unit:null,t.spatialReference);for(let c=0;c<o.length;c+=3)r[c]=o[c]*l+i,r[c+1]=o[c+1]*l+a,r[c+2]=o[c+2]*l+s;return{position:r,normal:n.normal,tangent:n.tangent}}function Z(n,t,e){const r=t.spatialReference,o=N(t,e,$),i=new Float64Array(n.position.length),a=B(n.position,o,r,i),s=p(nn,o);return{position:a,normal:C(a,i,n.normal,s,r),tangent:H(a,i,n.tangent,s,r)}}function B(n,t,e,r){F(r,n,t);const o=new Float64Array(n.length);return b(r,o,e)}function C(n,t,e,r,o){if(null==e)return null;const i=new Float32Array(e.length);return k(i,e,r),z(i,n,t,o,i),i}function H(n,t,e,r,o){if(null==e)return null;const i=new Float32Array(e.length);k(i,e,r,4);for(let a=3;a<i.length;a+=4)i[a]=e[a];return G(i,n,t,o,i),i}function J(n,t,e){const r=new Float64Array(n.position.length),o=n.position,i=t.x,a=t.y,s=t.z??0,l=Y(e?e.unit:null,t.spatialReference);for(let c=0;c<o.length;c+=3)r[c]=(o[c]-i)/l,r[c+1]=(o[c+1]-a)/l,r[c+2]=(o[c+2]-s)/l;return{position:r,normal:n.normal,tangent:n.tangent}}function K(n,t,e){const r=t.spatialReference;N(t,e,$);const o=i(_,$),a=new Float64Array(n.position.length),s=Q(n.position,r,o,a),l=p(nn,o);return{position:s,normal:W(n.normal,n.position,a,r,l),tangent:X(n.tangent,n.position,a,r,l)}}function N(n,t,e){h(n.spatialReference,[n.x,n.y,n.z??0],e,j(n.spatialReference));const r=Y(t?t.unit:null,n.spatialReference);return a(e,e,[r,r,r]),e}function Q(n,t,e,r){const o=P(n,t,r),i=new Float64Array(o.length);return F(i,o,e),i}function W(n,t,e,r,o){if(null==n)return null;const i=U(n,t,e,r,new Float32Array(n.length));return k(i,i,o),i}function X(n,t,e,r,o){if(null==n)return null;const i=V(n,t,e,r,new Float32Array(n.length));return k(i,i,o,4),i}function Y(e,r){if(null==e)return 1;const o=n(r);return 1/t(o,"meters",e)}const $=l(),_=l(),nn=e();export{O as georeference,T as georeferenceApplyTransform,q as georeferenceByTransform,I as project,D as ungeoreference,E as ungeoreferenceByTransform};
package/interfaces.d.ts CHANGED
@@ -9143,7 +9143,7 @@ declare namespace __esri {
9143
9143
  *
9144
9144
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-intl.html#createJSONLoader)
9145
9145
  */
9146
- location: string | any | Function;
9146
+ location: string | URL | Function;
9147
9147
  }
9148
9148
 
9149
9149
  export type LocaleChangeCallback = (newLocale: string) => void;
@@ -43127,7 +43127,7 @@ declare namespace __esri {
43127
43127
  *
43128
43128
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html#esriRequest)
43129
43129
  */
43130
- esriRequest(url: string | any, options?: RequestOptions): Promise<RequestResponse>;
43130
+ esriRequest(url: string | URL, options?: RequestOptions): Promise<RequestResponse>;
43131
43131
  }
43132
43132
 
43133
43133
  const __requestMapped: request;
@@ -43238,7 +43238,7 @@ declare namespace __esri {
43238
43238
  *
43239
43239
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html#RequestOptions)
43240
43240
  */
43241
- query?: any | any;
43241
+ query?: any | URLSearchParams;
43242
43242
  /**
43243
43243
  * Response format.
43244
43244
  *
package/kernel.js CHANGED
@@ -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 has from"./core/has.js";import{getInterceptor as t,addQueryParameter as e}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";const a="4.27";let s=a;s="4.27.0-rc.3";const r={async request(e,a){const{default:s}=await import("./request.js"),r=e.options,n=r.responseType;r.signal=a?.signal,r.responseType="native"===n||"native-request-init"===n?"native-request-init":n&&["blob","json","text"].includes(n)&&t(e.url)?.after?n:"array-buffer";const o=await s(e.url,r),i={data:o.data,httpStatus:o.httpStatus,ssl:o.ssl};switch(o.requestOptions?.responseType){case"native-request-init":return delete i.data.signal,i;case"blob":i.data=await i.data.arrayBuffer();break;case"json":i.data=(new TextEncoder).encode(JSON.stringify(i.data)).buffer;break;case"text":i.data=(new TextEncoder).encode(i.data).buffer}return{result:i,transferList:[i.data]}}};let n;function o(t){n=t}function i(t){const a=n?.findCredential(t);return a?.token?e(t,"token",a.token):t}has("host-webworker");export{i as addTokenParameter,s as fullVersion,n as id,o as setId,a as version,r as workerMessages};
5
+ import has from"./core/has.js";import{getInterceptor as t,addQueryParameter as e}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";const a="4.27";let s=a;s="4.27.0-rc.4";const r={async request(e,a){const{default:s}=await import("./request.js"),r=e.options,n=r.responseType;r.signal=a?.signal,r.responseType="native"===n||"native-request-init"===n?"native-request-init":n&&["blob","json","text"].includes(n)&&t(e.url)?.after?n:"array-buffer";const o=await s(e.url,r),i={data:o.data,httpStatus:o.httpStatus,ssl:o.ssl};switch(o.requestOptions?.responseType){case"native-request-init":return delete i.data.signal,i;case"blob":i.data=await i.data.arrayBuffer();break;case"json":i.data=(new TextEncoder).encode(JSON.stringify(i.data)).buffer;break;case"text":i.data=(new TextEncoder).encode(i.data).buffer}return{result:i,transferList:[i.data]}}};let n;function o(t){n=t}function i(t){const a=n?.findCredential(t);return a?.token?e(t,"token",a.token):t}has("host-webworker");export{i as addTokenParameter,s as fullVersion,n as id,o as setId,a as version,r as workerMessages};
@@ -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 r from"../core/Error.js";import{property as o}from"../core/accessorSupport/decorators/property.js";import"../core/accessorSupport/ensureType.js";import"../core/arrayUtils.js";import"../core/has.js";import{subclass as t}from"../core/accessorSupport/decorators/subclass.js";import i from"./FeatureLayer.js";import p from"./orientedImagery/core/Affixes.js";import s from"./orientedImagery/core/CameraProperties.js";let a=class extends i{constructor(){super(...arguments),this.affixes=null,this.geometryType="point",this.operationalLayerType="OrientedImageryLayer",this.type="oriented-imagery"}get effectiveElevationSource(){const{elevationSource:e,affixes:r}=this;if(!e||!e.url?.trim())return;let o=e.url.trim();if(r){const{demPathSuffix:e,demPathPrefix:t}=r;t?.trim()&&(o=`${t.trim()}/${o}`),e?.trim()&&(o+=`/${e.trim()}`)}return{...e,url:o}}_verifySource(){if(super._verifySource(),"point"!==this.geometryType)throw new r("oriented-imagery-layer:invalid-geometry-type","OrientedImageryLayer only supports point geometry type")}};e([o({type:p,json:{write:!0}})],a.prototype,"affixes",void 0),e([o({type:s,json:{write:!0}})],a.prototype,"cameraProperties",void 0),e([o({json:{write:!0}})],a.prototype,"coverage",void 0),e([o({json:{write:!0}})],a.prototype,"coveragePercent",void 0),e([o({json:{write:!0}})],a.prototype,"defaultSearchLocation",void 0),e([o({json:{write:!0}})],a.prototype,"depthImage",void 0),e([o({json:{write:!0}})],a.prototype,"geometryType",void 0),e([o()],a.prototype,"imageProperties",void 0),e([o({type:Number,json:{write:!0}})],a.prototype,"maximumDistance",void 0),e([o({type:["OrientedImageryLayer"]})],a.prototype,"operationalLayerType",void 0),e([o({json:{read:!1},value:"oriented-imagery",readOnly:!0})],a.prototype,"type",void 0),e([o({json:{write:!0}})],a.prototype,"elevationSource",void 0),e([o()],a.prototype,"effectiveElevationSource",null),a=e([t("esri.layers.OrientedImageryLayer")],a);const y=a;export{y as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import r from"../core/Error.js";import{property as o}from"../core/accessorSupport/decorators/property.js";import"../core/accessorSupport/ensureType.js";import"../core/arrayUtils.js";import"../core/has.js";import{subclass as t}from"../core/accessorSupport/decorators/subclass.js";import a from"./FeatureLayer.js";const i=e=>(r,o,t)=>{if(!r)return null;const a=r[0].orientedImageryProperties;return a?a[e]:null};let s=class extends a{constructor(){super(...arguments),this.geometryType="point",this.operationalLayerType="OrientedImageryLayer",this.type="oriented-imagery"}get effectiveElevationSource(){const{elevationSource:e,demPathPrefix:r,demPathSuffix:o}=this;if(!e?.url?.trim())return e;let t=e.url.trim();return r?.trim()&&(t=`${r.trim()}/${t}`),o?.trim()&&(t+=`/${o.trim()}`),{...e,url:t}}_verifySource(){if(super._verifySource(),"point"!==this.geometryType)throw new r("oriented-imagery-layer:invalid-geometry-type","OrientedImageryLayer only supports point geometry type")}};e([o({json:{type:Number,write:!0,read:{source:"layers",reader:i("cameraHeading")}}})],s.prototype,"cameraHeading",void 0),e([o({json:{type:Number,write:!0,read:{source:"layers",reader:i("cameraHeight")}}})],s.prototype,"cameraHeight",void 0),e([o({json:{type:Number,write:!0,read:{source:"layers",reader:i("cameraPitch")}}})],s.prototype,"cameraPitch",void 0),e([o({json:{type:Number,write:!0,read:{source:"layers",reader:i("cameraRoll")}}})],s.prototype,"cameraRoll",void 0),e([o({json:{type:Number,write:!0,read:{source:"layers",reader:i("coveragePercent")}}})],s.prototype,"coveragePercent",void 0),e([o({json:{write:!0,read:{source:"layers",reader:i("demPathPrefix")}}})],s.prototype,"demPathPrefix",void 0),e([o({json:{write:!0,read:{source:"layers",reader:i("demPathSuffix")}}})],s.prototype,"demPathSuffix",void 0),e([o({json:{write:!0,read:{source:"layers",reader:i("depthImagePathPrefix")}}})],s.prototype,"depthImagePathPrefix",void 0),e([o({json:{write:!0,read:{source:"layers",reader:i("depthImagePathSuffix")}}})],s.prototype,"depthImagePathSuffix",void 0),e([o({json:{type:Number,write:!0,read:{source:"layers",reader:i("farDistance")}}})],s.prototype,"farDistance",void 0),e([o({json:{write:!0}})],s.prototype,"geometryType",void 0),e([o({json:{type:Number,write:!0,read:{source:"layers",reader:i("horizontalFieldOfView")}}})],s.prototype,"horizontalFieldOfView",void 0),e([o({json:{write:!0,read:{source:"layers",reader:i("horizontalMeasurementUnit")}}})],s.prototype,"horizontalMeasurementUnit",void 0),e([o({json:{write:!0,read:{source:"layers",reader:i("imagePathPrefix")}}})],s.prototype,"imagePathPrefix",void 0),e([o({json:{write:!0,read:{source:"layers",reader:i("imagePathSuffix")}}})],s.prototype,"imagePathSuffix",void 0),e([o({json:{type:Number,write:!0,read:{source:"layers",reader:i("imageRotation")}}})],s.prototype,"imageRotation",void 0),e([o({type:Number,json:{write:!0,read:{source:"layers",reader:i("maximumDistance")}}})],s.prototype,"maximumDistance",void 0),e([o({json:{write:!0,read:{source:"layers",reader:i("nearDistance")}}})],s.prototype,"nearDistance",void 0),e([o({type:["OrientedImageryLayer"]})],s.prototype,"operationalLayerType",void 0),e([o({json:{write:!0,read:{source:"layers",reader:i("orientedImageryType")}}})],s.prototype,"orientedImageryType",void 0),e([o({json:{read:!1},value:"oriented-imagery",readOnly:!0})],s.prototype,"type",void 0),e([o({json:{write:!0,read:{source:"layers",reader:i("verticalFieldOfView")}}})],s.prototype,"verticalFieldOfView",void 0),e([o({json:{write:!0,read:{source:"layers",reader:i("verticalMeasurementUnit")}}})],s.prototype,"verticalMeasurementUnit",void 0),e([o({json:{write:!0,read:{source:"layers",reader:i("videoPathPrefix")}}})],s.prototype,"videoPathPrefix",void 0),e([o({json:{write:!0,read:{source:"layers",reader:i("videoPathSuffix")}}})],s.prototype,"videoPathSuffix",void 0),e([o({json:{write:!0,read:{source:"layers",reader:i("elevationSource")}}})],s.prototype,"elevationSource",void 0),e([o()],s.prototype,"effectiveElevationSource",null),s=e([t("esri.layers.OrientedImageryLayer")],s);const d=s;export{d as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.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 i}from"../renderers/support/types.js";import o from"../request.js";import{ClonableMixin as s}from"../core/Clonable.js";import a from"../core/Collection.js";import n from"../core/Error.js";import p from"../core/Logger.js";import{MultiOriginJSONMixin as l}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as d,isAbortError as y}from"../core/promiseUtils.js";import{whenOnce as u}from"../core/reactiveUtils.js";import{join as c}from"../core/urlUtils.js";import{property as f}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 m}from"../core/accessorSupport/decorators/reader.js";import{subclass as g}from"../core/accessorSupport/decorators/subclass.js";import{OriginId as v}from"../core/accessorSupport/PropertyOrigin.js";import b from"./Layer.js";import{APIKeyMixin as I}from"./mixins/APIKeyMixin.js";import{ArcGISService as w}from"./mixins/ArcGISService.js";import{EditBusLayer as j}from"./mixins/EditBusLayer.js";import{OperationalLayer as L}from"./mixins/OperationalLayer.js";import{PortalLayer as F}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as S}from"./mixins/ScaleRangeLayer.js";import{SceneService as O,SaveOperationType as _}from"./mixins/SceneService.js";import{zeroCapabilities as T}from"./support/capabilities.js";import{elevationInfo as E,labelsVisible as A,legendEnabled as P,popupEnabled as x,screenSizePerspectiveEnabled as D}from"./support/commonProperties.js";import{FeatureReduction as U}from"./support/FeatureReduction.js";import R from"./support/FeatureReductionSelection.js";import{FetchAssociatedFeatureLayer as q}from"./support/FetchAssociatedFeatureLayer.js";import{defineFieldProperties as Q}from"./support/fieldProperties.js";import C from"./support/FieldsIndex.js";import{fixRendererFields as N,unpackFieldNames as G}from"./support/fieldUtils.js";import{I3SNodePageDefinition as k,I3SMaterialDefinition as V,I3STextureSetDefinition as K,I3SGeometryDefinition as M}from"./support/I3SLayerDefinitions.js";import $ from"./support/LabelClass.js";import{reader as W}from"./support/labelingInfo.js";import z from"./support/LayerFloorInfo.js";import{RangeInfo as B}from"./support/RangeInfo.js";import H from"./support/SceneFilter.js";import{loadStyleRenderer as Z}from"../renderers/support/styleUtils.js";import J from"../rest/support/Query.js";import{sceneLayerEditingEnabled as X}from"../support/featureFlags.js";import{createPopupTemplate as Y}from"../support/popupUtils.js";import{queryAttributesFromCachedAttributesId as ee}from"../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as te,getFetchPopupTemplate as re}from"../views/layers/support/popupUtils.js";import{transparencyToOpacity as ie}from"../webdoc/support/opacityUtils.js";const oe=["3DObject","Point"],se=Q();let ae=class extends(j(O(w(L(F(S(l(I(s(b)))))))))){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 a,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._set("renderer",null)}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 C(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 pe[this.profile]||"mesh"}set renderer(e){N(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:i,supportsUploadWithItemId:o,supportsGeometryUpdate:s,supportsReturnServiceEditsInSourceSpatialReference:a},data:{supportsZ:n,supportsM:p,isVersioned:l,supportsAttachment:d},operations:{supportsEditing:y,supportsAdd:u,supportsUpdate:c,supportsDelete:f,supportsQuery:h,supportsQueryAttachments:m}}=e,g=e.operations.supportsChangeTracking,v=!!this.associatedLayer?.infoFor3D&&X();return{query:t,editing:{supportsGlobalId:r,supportsReturnServiceEditsInSourceSpatialReference:a,supportsRollbackOnFailure:i,supportsGeometryUpdate:v&&s,supportsUploadWithItemId:o},data:{supportsAttachment:d,supportsZ:n,supportsM:p,isVersioned:l},operations:{supportsQuery:h,supportsQueryAttachments:m,supportsEditing:y&&g,supportsAdd:v&&u&&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&&ne[r]?ne[r]:(p.getLogger(this).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(d).then((()=>this._fetchService(t))).then((()=>Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),this._loadFilterGeometries()]))).then((()=>this._validateElevationInfo())).then((()=>this._applyAssociatedLayerOverrides())).then((()=>this._populateFieldUsageInfo())).then((()=>Z(this,{origin:"service"},t))).then((()=>N(this.renderer,this.fieldsIndex))).then((()=>this.finishLoadEditablePortalLayer(e)));return this.addResolvingPromise(r),Promise.resolve(this)}async beforeSave(){null!=this.filter&&(this.filter=this.filter.clone(),await this.load())}async _loadFilterGeometries(){if(this.filter)try{await this.filter.loadGeometries(this.spatialReference)}catch(e){p.getLogger(this).error("#_loadFilterGeometries()",this,"Failed to load filter geometries. Geometry filter will not be applied for this layer.",{error:e}),this.filter=null}}createQuery(){const e=new J;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=G(this.fieldsIndex,await te(this,re(this)));return ee(this.parsedUrl.path,this.attributeStorageInfo??[],e,t,r)}async queryCachedFeature(e,r){const i=await this.queryCachedAttributes(e,[r]);if(!i||0===i.length)throw new n("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const o=new t;return o.attributes=i[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:(p.getLogger(this).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return Y(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 n("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 n("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 n("scenelayer:no-cached-statistics","Cached statistics are not available for this layer");const r=this.fieldsIndex.get(e);if(!r)throw new n("scenelayer:field-unexisting",`Field '${e}' does not exist on the layer`);for(const i of this.statisticsInfo)if(i.name===r.name){const e=c(this.parsedUrl.path,i.href);return o(e,{query:{f:"json",token:this.apiKey},responseType:"json",signal:t?t.signal:null}).then((e=>e.data))}throw new n("scenelayer:no-cached-statistics","Cached statistics for this attribute are not available")}async saveAs(e,t){return this._debouncedSaveOperations(_.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(_.SAVE,e)}async applyEdits(e,t){const{applyEdits:r}=await import("./graphics/editingSupport.js");if(await this.load(),!this.associatedLayer)throw new n(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),r(this,this.associatedLayer.source,e,t)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new n(`${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&&!oe.includes(e.layerType))throw new n("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 n("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 n("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,i=!1;if(null==e)r=!0,i=!0;else{const o=t&&t.isGeographic;switch(e){case"east-north-up":case"earth-centered":r=!0,i=o;break;case"vertex-reference-frame":r=!0,i=!o;break;default:r=!1}}if(!r)throw new n("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!i)throw new n("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 n("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)),i={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||r,supportsLayerQuery:r};this._fieldUsageInfo[e.name]=i}}_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=h(this);for(let r=0;r<e.length;r++){const i=e[r],o=this.originIdOf(i),s=this.associatedLayer.originIdOf(i);o<s&&(s===v.SERVICE||s===v.PORTAL_ITEM)&&t.setAtOrigin(i,this.associatedLayer[i],s)}}async _setAssociatedFeatureLayer(e){if(!["mesh-pyramids","points"].includes(this.profile))return;const t=new q(this.parsedUrl,this.portalItem,this.apiKey,e);try{this.associatedLayer=await t.fetch()}catch(r){y(r)||this._logWarningOnPopupEnabled()}}async _logWarningOnPopupEnabled(){await u((()=>this.popupEnabled&&null!=this.popupTemplate));const e=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?p.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${e}`):p.getLogger(this).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&&p.getLogger(this).warn(".elevationInfo=","Mesh scene layers don't support relative-to-scene elevation mode"),e.featureExpressionInfo&&"0"!==e.featureExpressionInfo.expression&&p.getLogger(this).warn(".elevationInfo=","Scene layers do not support featureExpressionInfo"))}};e([f({types:{key:"type",base:U,typeMap:{selection:R}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:!0},"portal-item":{name:"layerDefinition.featureReduction",write:!0}}}})],ae.prototype,"featureReduction",void 0),e([f({type:[B],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}}})],ae.prototype,"rangeInfos",void 0),e([f({json:{read:!1}})],ae.prototype,"associatedLayer",void 0),e([f({type:["show","hide"]})],ae.prototype,"listMode",void 0),e([f({type:["ArcGISSceneServiceLayer"]})],ae.prototype,"operationalLayerType",void 0),e([f({json:{read:!1},readOnly:!0})],ae.prototype,"type",void 0),e([f({...se.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],ae.prototype,"fields",void 0),e([f()],ae.prototype,"types",null),e([f()],ae.prototype,"typeIdField",null),e([f()],ae.prototype,"templates",null),e([f()],ae.prototype,"formTemplate",null),e([f({readOnly:!0})],ae.prototype,"fieldsIndex",null),e([f({type:z,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],ae.prototype,"floorInfo",void 0),e([f(se.outFields)],ae.prototype,"outFields",void 0),e([f({type:k,readOnly:!0,json:{read:!1}})],ae.prototype,"nodePages",void 0),e([m("service","nodePages",["nodePages","pointNodePages"])],ae.prototype,"readNodePages",null),e([f({type:[V],readOnly:!0})],ae.prototype,"materialDefinitions",void 0),e([f({type:[K],readOnly:!0})],ae.prototype,"textureSetDefinitions",void 0),e([f({type:[M],readOnly:!0})],ae.prototype,"geometryDefinitions",void 0),e([f({readOnly:!0})],ae.prototype,"serviceUpdateTimeStamp",void 0),e([f({readOnly:!0})],ae.prototype,"attributeStorageInfo",void 0),e([f({readOnly:!0})],ae.prototype,"statisticsInfo",void 0),e([f({type:a.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],ae.prototype,"excludeObjectIds",void 0),e([f({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],ae.prototype,"definitionExpression",void 0),e([f({type:H,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],ae.prototype,"filter",void 0),e([f({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],ae.prototype,"path",void 0),e([f(E)],ae.prototype,"elevationInfo",null),e([f({type:String})],ae.prototype,"geometryType",null),e([f(A)],ae.prototype,"labelsVisible",void 0),e([f({type:[$],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:W},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:W},write:!0}})],ae.prototype,"labelingInfo",void 0),e([f(P)],ae.prototype,"legendEnabled",void 0),e([f({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?ie(r):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],ae.prototype,"opacity",void 0),e([f({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],ae.prototype,"priority",void 0),e([f({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],ae.prototype,"semantic",void 0),e([f({types:i,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],ae.prototype,"renderer",null),e([f({json:{read:!1}})],ae.prototype,"cachedDrawingInfo",void 0),e([m("service","cachedDrawingInfo")],ae.prototype,"readCachedDrawingInfo",null),e([f({readOnly:!0,json:{read:!1}})],ae.prototype,"capabilities",null),e([f({type:Boolean,json:{read:!1}})],ae.prototype,"editingEnabled",null),e([f({readOnly:!0,json:{write:!1,read:!1}})],ae.prototype,"infoFor3D",null),e([f(x)],ae.prototype,"popupEnabled",void 0),e([f({type:r,json:{name:"popupInfo",write:!0}})],ae.prototype,"popupTemplate",void 0),e([f({readOnly:!0,json:{read:!1}})],ae.prototype,"defaultPopupTemplate",null),e([f({type:String,json:{read:!1}})],ae.prototype,"objectIdField",void 0),e([m("service","objectIdField",["objectIdField","fields"])],ae.prototype,"readObjectIdField",null),e([f({type:String,json:{read:!1}})],ae.prototype,"globalIdField",void 0),e([m("service","globalIdField",["globalIdField","fields"])],ae.prototype,"readGlobalIdField",null),e([f({readOnly:!0,type:String,json:{read:!1}})],ae.prototype,"displayField",null),e([f({type:String,json:{read:!1}})],ae.prototype,"profile",void 0),e([m("service","profile",["store.profile"])],ae.prototype,"readProfile",null),e([f({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],ae.prototype,"normalReferenceFrame",void 0),e([f(D)],ae.prototype,"screenSizePerspectiveEnabled",void 0),ae=e([g("esri.layers.SceneLayer")],ae);const ne={"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"},pe={"mesh-pyramids":"mesh",points:"point",lines:"polyline",polygons:"polygon"},le=ae;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{ClonableMixin as i}from"../core/Clonable.js";import a from"../core/Collection.js";import n from"../core/Error.js";import p from"../core/Logger.js";import{MultiOriginJSONMixin as l}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as d,isAbortError as y}from"../core/promiseUtils.js";import{whenOnce as u}from"../core/reactiveUtils.js";import{join as c}from"../core/urlUtils.js";import{property as f}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 m}from"../core/accessorSupport/decorators/reader.js";import{subclass as g}from"../core/accessorSupport/decorators/subclass.js";import{OriginId as v}from"../core/accessorSupport/PropertyOrigin.js";import b from"./Layer.js";import{APIKeyMixin as I}from"./mixins/APIKeyMixin.js";import{ArcGISService as w}from"./mixins/ArcGISService.js";import{EditBusLayer as j}from"./mixins/EditBusLayer.js";import{OperationalLayer as L}from"./mixins/OperationalLayer.js";import{PortalLayer as F}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as S}from"./mixins/ScaleRangeLayer.js";import{SceneService as O,SaveOperationType as _}from"./mixins/SceneService.js";import{zeroCapabilities as A}from"./support/capabilities.js";import{elevationInfo as T,labelsVisible as E,legendEnabled as P,popupEnabled as x,screenSizePerspectiveEnabled as D}from"./support/commonProperties.js";import{FeatureReduction as U}from"./support/FeatureReduction.js";import R from"./support/FeatureReductionSelection.js";import{FetchAssociatedFeatureLayer as q}from"./support/FetchAssociatedFeatureLayer.js";import{defineFieldProperties as C}from"./support/fieldProperties.js";import Q from"./support/FieldsIndex.js";import{fixRendererFields as N,unpackFieldNames as G}from"./support/fieldUtils.js";import{I3SNodePageDefinition as k,I3SMaterialDefinition as V,I3STextureSetDefinition as K,I3SGeometryDefinition as M}from"./support/I3SLayerDefinitions.js";import $ from"./support/LabelClass.js";import{reader as W}from"./support/labelingInfo.js";import z from"./support/LayerFloorInfo.js";import{RangeInfo as B}from"./support/RangeInfo.js";import H from"./support/SceneFilter.js";import{loadStyleRenderer as Z}from"../renderers/support/styleUtils.js";import J from"../rest/support/Query.js";import{sceneLayerEditingEnabled as X}from"../support/featureFlags.js";import{createPopupTemplate as Y}from"../support/popupUtils.js";import{queryAttributesFromCachedAttributesId as ee}from"../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as te,getFetchPopupTemplate as re}from"../views/layers/support/popupUtils.js";import{transparencyToOpacity as se}from"../webdoc/support/opacityUtils.js";const oe=["3DObject","Point"],ie=C();let ae=class extends(j(O(w(L(F(S(l(I(i(b)))))))))){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 a,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._set("renderer",null)}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 pe[this.profile]||"mesh"}set renderer(e){N(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??A,{query:t,editing:{supportsGlobalId:r,supportsRollbackOnFailure:s,supportsUploadWithItemId:o,supportsGeometryUpdate:i,supportsReturnServiceEditsInSourceSpatialReference:a},data:{supportsZ:n,supportsM:p,isVersioned:l,supportsAttachment:d},operations:{supportsEditing:y,supportsAdd:u,supportsUpdate:c,supportsDelete:f,supportsQuery:h,supportsQueryAttachments:m,supportsAsyncConvert3D:g}}=e,v=e.operations.supportsChangeTracking,b=!!this.associatedLayer?.infoFor3D&&X();return{query:t,editing:{supportsGlobalId:r,supportsReturnServiceEditsInSourceSpatialReference:a,supportsRollbackOnFailure:s,supportsGeometryUpdate:b&&i,supportsUploadWithItemId:o},data:{supportsAttachment:d,supportsZ:n,supportsM:p,isVersioned:l},operations:{supportsQuery:h,supportsQueryAttachments:m,supportsEditing:y&&v,supportsAdd:b&&u&&v,supportsDelete:b&&f&&v,supportsUpdate:c&&v,supportsAsyncConvert3D: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&&ne[r]?ne[r]:(p.getLogger(this).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(d).then((()=>this._fetchService(t))).then((()=>Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),this._loadFilterGeometries()]))).then((()=>this._validateElevationInfo())).then((()=>this._applyAssociatedLayerOverrides())).then((()=>this._populateFieldUsageInfo())).then((()=>Z(this,{origin:"service"},t))).then((()=>N(this.renderer,this.fieldsIndex))).then((()=>this.finishLoadEditablePortalLayer(e)));return this.addResolvingPromise(r),Promise.resolve(this)}async beforeSave(){null!=this.filter&&(this.filter=this.filter.clone(),await this.load())}async _loadFilterGeometries(){if(this.filter)try{await this.filter.loadGeometries(this.spatialReference)}catch(e){p.getLogger(this).error("#_loadFilterGeometries()",this,"Failed to load filter geometries. Geometry filter will not be applied for this layer.",{error:e}),this.filter=null}}createQuery(){const e=new J;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=G(this.fieldsIndex,await te(this,re(this)));return ee(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 n("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:(p.getLogger(this).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return Y(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 n("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 n("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 n("scenelayer:no-cached-statistics","Cached statistics are not available for this layer");const r=this.fieldsIndex.get(e);if(!r)throw new n("scenelayer:field-unexisting",`Field '${e}' does not exist on the layer`);for(const s of this.statisticsInfo)if(s.name===r.name){const e=c(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 n("scenelayer:no-cached-statistics","Cached statistics for this attribute are not available")}async saveAs(e,t){return this._debouncedSaveOperations(_.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(_.SAVE,e)}async applyEdits(e,t){const{applyEdits:r}=await import("./graphics/editingSupport.js");if(await this.load(),!this.associatedLayer)throw new n(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),r(this,this.associatedLayer.source,e,t)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new n(`${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&&!oe.includes(e.layerType))throw new n("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 n("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 n("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 n("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!s)throw new n("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 n("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=h(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===v.SERVICE||i===v.PORTAL_ITEM)&&t.setAtOrigin(s,this.associatedLayer[s],i)}}async _setAssociatedFeatureLayer(e){if(!["mesh-pyramids","points"].includes(this.profile))return;const t=new q(this.parsedUrl,this.portalItem,this.apiKey,e);try{this.associatedLayer=await t.fetch()}catch(r){y(r)||this._logWarningOnPopupEnabled()}}async _logWarningOnPopupEnabled(){await u((()=>this.popupEnabled&&null!=this.popupTemplate));const e=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?p.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${e}`):p.getLogger(this).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&&p.getLogger(this).warn(".elevationInfo=","Mesh scene layers don't support relative-to-scene elevation mode"),e.featureExpressionInfo&&"0"!==e.featureExpressionInfo.expression&&p.getLogger(this).warn(".elevationInfo=","Scene layers do not support featureExpressionInfo"))}};e([f({types:{key:"type",base:U,typeMap:{selection:R}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:!0},"portal-item":{name:"layerDefinition.featureReduction",write:!0}}}})],ae.prototype,"featureReduction",void 0),e([f({type:[B],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}}})],ae.prototype,"rangeInfos",void 0),e([f({json:{read:!1}})],ae.prototype,"associatedLayer",void 0),e([f({type:["show","hide"]})],ae.prototype,"listMode",void 0),e([f({type:["ArcGISSceneServiceLayer"]})],ae.prototype,"operationalLayerType",void 0),e([f({json:{read:!1},readOnly:!0})],ae.prototype,"type",void 0),e([f({...ie.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],ae.prototype,"fields",void 0),e([f()],ae.prototype,"types",null),e([f()],ae.prototype,"typeIdField",null),e([f()],ae.prototype,"templates",null),e([f()],ae.prototype,"formTemplate",null),e([f({readOnly:!0})],ae.prototype,"fieldsIndex",null),e([f({type:z,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],ae.prototype,"floorInfo",void 0),e([f(ie.outFields)],ae.prototype,"outFields",void 0),e([f({type:k,readOnly:!0,json:{read:!1}})],ae.prototype,"nodePages",void 0),e([m("service","nodePages",["nodePages","pointNodePages"])],ae.prototype,"readNodePages",null),e([f({type:[V],readOnly:!0})],ae.prototype,"materialDefinitions",void 0),e([f({type:[K],readOnly:!0})],ae.prototype,"textureSetDefinitions",void 0),e([f({type:[M],readOnly:!0})],ae.prototype,"geometryDefinitions",void 0),e([f({readOnly:!0})],ae.prototype,"serviceUpdateTimeStamp",void 0),e([f({readOnly:!0})],ae.prototype,"attributeStorageInfo",void 0),e([f({readOnly:!0})],ae.prototype,"statisticsInfo",void 0),e([f({type:a.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],ae.prototype,"excludeObjectIds",void 0),e([f({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],ae.prototype,"definitionExpression",void 0),e([f({type:H,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],ae.prototype,"filter",void 0),e([f({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],ae.prototype,"path",void 0),e([f(T)],ae.prototype,"elevationInfo",null),e([f({type:String})],ae.prototype,"geometryType",null),e([f(E)],ae.prototype,"labelsVisible",void 0),e([f({type:[$],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:W},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:W},write:!0}})],ae.prototype,"labelingInfo",void 0),e([f(P)],ae.prototype,"legendEnabled",void 0),e([f({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?se(r):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],ae.prototype,"opacity",void 0),e([f({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],ae.prototype,"priority",void 0),e([f({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],ae.prototype,"semantic",void 0),e([f({types:s,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],ae.prototype,"renderer",null),e([f({json:{read:!1}})],ae.prototype,"cachedDrawingInfo",void 0),e([m("service","cachedDrawingInfo")],ae.prototype,"readCachedDrawingInfo",null),e([f({readOnly:!0,json:{read:!1}})],ae.prototype,"capabilities",null),e([f({type:Boolean,json:{read:!1}})],ae.prototype,"editingEnabled",null),e([f({readOnly:!0,json:{write:!1,read:!1}})],ae.prototype,"infoFor3D",null),e([f(x)],ae.prototype,"popupEnabled",void 0),e([f({type:r,json:{name:"popupInfo",write:!0}})],ae.prototype,"popupTemplate",void 0),e([f({readOnly:!0,json:{read:!1}})],ae.prototype,"defaultPopupTemplate",null),e([f({type:String,json:{read:!1}})],ae.prototype,"objectIdField",void 0),e([m("service","objectIdField",["objectIdField","fields"])],ae.prototype,"readObjectIdField",null),e([f({type:String,json:{read:!1}})],ae.prototype,"globalIdField",void 0),e([m("service","globalIdField",["globalIdField","fields"])],ae.prototype,"readGlobalIdField",null),e([f({readOnly:!0,type:String,json:{read:!1}})],ae.prototype,"displayField",null),e([f({type:String,json:{read:!1}})],ae.prototype,"profile",void 0),e([m("service","profile",["store.profile"])],ae.prototype,"readProfile",null),e([f({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],ae.prototype,"normalReferenceFrame",void 0),e([f(D)],ae.prototype,"screenSizePerspectiveEnabled",void 0),ae=e([g("esri.layers.SceneLayer")],ae);const ne={"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"},pe={"mesh-pyramids":"mesh",points:"point",lines:"polyline",polygons:"polygon"},le=ae;export{le 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 t}from"../chunks/tslib.es6.js";import"../geometry.js";import r from"../request.js";import{clamp as e}from"../core/mathUtils.js";import{MultiOriginJSONMixin as o}from"../core/MultiOriginJSONSupport.js";import{property as i}from"../core/accessorSupport/decorators/property.js";import"../core/accessorSupport/ensureType.js";import"../core/arrayUtils.js";import"../core/has.js";import{reader as s}from"../core/accessorSupport/decorators/reader.js";import{subclass as l}from"../core/accessorSupport/decorators/subclass.js";import p from"../geometry/SpatialReference.js";import n from"./Layer.js";import{BlendLayer as a}from"./mixins/BlendLayer.js";import{CustomParametersMixin as u}from"./mixins/CustomParametersMixin.js";import{ScaleRangeLayer as c}from"./mixins/ScaleRangeLayer.js";import{url as y}from"./support/commonProperties.js";import m from"./support/PlaybackInfo.js";import{getVideoLayerCapabilities as d}from"./support/serviceCapabilitiesUtils.js";import h from"./support/TelemetryData.js";import f from"./support/TelemetryDisplay.js";import v from"./support/VideoFrame.js";import g from"./video/VideoController.js";import{readVideoTimeExtent as j}from"./video/videoUtils.js";import b from"../geometry/Polygon.js";import S from"../geometry/Extent.js";let O=class extends(a(c(o(u(n))))){constructor(t){super(t),this.capabilities=null,this.connectionInfo=null,this.controller=new g,this.copyright=null,this.coverage=null,this.currentFrame=null,this.currentTelemetry=null,this.description=null,this.frameCount=null,this.initialExtent=null,this.playbackInfo=null,this.posterUrl=null,this.protocol="hls",this.qualities=null,this.sourceJSON=null,this.spatialReference=p.WGS84,this.telemetryDisplay=null,this.videoTimeExtent=null,this.title=null,this.type="video",this.url=null}load(t){const r=null!=t?t.signal:null;return this.addResolvingPromise(this._fetchService(r)),Promise.resolve(this)}get buffered(){return this.controller.buffered}readCapabilitiesFromService(t,r){return d(r)}get currentMetadata(){return this.controller?.currentMetadata}get currentTime(){return this.controller.currentTime}get duration(){return this.controller.duration}get ended(){return this.controller.ended}get loop(){return this.controller.loop}set loop(t){this.controller.loop=t}get muted(){return this.controller.muted}set muted(t){this.controller.muted=t}get playbackRate(){return this.controller.rate}set playbackRate(t){this.controller.rate=t}get playbackUrl(){return this.connectionInfo&&this.protocol?this.connectionInfo[this.protocol]:null}get sourceUrl(){return this.controller.sourceUrl??""}set sourceUrl(t){this.controller.sourceUrl=t}get state(){return this.controller.state}get waiting(){return this.controller.waiting}play(){this.controller.play()}pause(){this.controller.pause()}reset(){this.controller.reset()}setCurrentTime(t){if(!this.duration)return;const r=e(t,0,this.duration);this.controller.setCurrentTime(r)}getCurrentFrame(){}toGround(){}toVideo(){}async _fetchService(t){if(this.sourceJSON)return void this.read(this.sourceJSON,{origin:"service",url:this.parsedUrl});const{data:e,ssl:o}=await r(this.parsedUrl.path,{query:{f:"json",...this.parsedUrl.query,...this.customParameters},signal:t});o&&(this.url=this.url.replace(/^http:/i,"https:")),this.sourceJSON=e,this.read(e,{origin:"service",url:this.parsedUrl})}};t([i({readOnly:!0})],O.prototype,"buffered",null),t([i({readOnly:!0,json:{read:!1}})],O.prototype,"capabilities",void 0),t([s("service","capabilities",["supportsCoverageQuery","supportsExportClip","supportsMensuration"])],O.prototype,"readCapabilitiesFromService",null),t([i({readOnly:!0,json:{read:{source:"connectionUrl"}}})],O.prototype,"connectionInfo",void 0),t([i()],O.prototype,"controller",void 0),t([i({type:String})],O.prototype,"copyright",void 0),t([i({type:b})],O.prototype,"coverage",void 0),t([i({type:v})],O.prototype,"currentFrame",void 0),t([i({readOnly:!0})],O.prototype,"currentMetadata",null),t([i({type:h})],O.prototype,"currentTelemetry",void 0),t([i({type:Number})],O.prototype,"currentTime",null),t([i({type:String})],O.prototype,"description",void 0),t([i({type:Number})],O.prototype,"duration",null),t([i({type:Boolean})],O.prototype,"ended",null),t([i({type:Number})],O.prototype,"frameCount",void 0),t([i({type:S})],O.prototype,"initialExtent",void 0),t([i({type:Boolean})],O.prototype,"loop",null),t([i({type:Boolean})],O.prototype,"muted",null),t([i({type:m})],O.prototype,"playbackInfo",void 0),t([i({type:Number})],O.prototype,"playbackRate",null),t([i({readOnly:!0})],O.prototype,"playbackUrl",null),t([i({readOnly:!0,json:{read:{source:"poster"}}})],O.prototype,"posterUrl",void 0),t([i({type:String})],O.prototype,"protocol",void 0),t([i({readOnly:!0})],O.prototype,"qualities",void 0),t([i()],O.prototype,"sourceJSON",void 0),t([i({type:String})],O.prototype,"sourceUrl",null),t([i()],O.prototype,"spatialReference",void 0),t([i({type:String})],O.prototype,"state",null),t([i({type:f})],O.prototype,"telemetryDisplay",void 0),t([i({readOnly:!0,nonNullable:!1,json:{read:{reader:j,source:"time"}}})],O.prototype,"videoTimeExtent",void 0),t([i({readOnly:!0,json:{read:{source:"name"}}})],O.prototype,"title",void 0),t([i({readOnly:!0})],O.prototype,"type",void 0),t([i(y)],O.prototype,"url",void 0),t([i({readOnly:!0})],O.prototype,"waiting",null),O=t([l("esri.layers.VideoLayer")],O);const U=O;export{U as default};
5
+ import{_ as t}from"../chunks/tslib.es6.js";import"../geometry.js";import r from"../request.js";import{clamp as e}from"../core/mathUtils.js";import{MultiOriginJSONMixin as o}from"../core/MultiOriginJSONSupport.js";import{property as i}from"../core/accessorSupport/decorators/property.js";import"../core/accessorSupport/ensureType.js";import"../core/arrayUtils.js";import"../core/has.js";import{reader as s}from"../core/accessorSupport/decorators/reader.js";import{subclass as l}from"../core/accessorSupport/decorators/subclass.js";import n from"../geometry/SpatialReference.js";import p from"./Layer.js";import{BlendLayer as a}from"./mixins/BlendLayer.js";import{CustomParametersMixin as u}from"./mixins/CustomParametersMixin.js";import{ScaleRangeLayer as c}from"./mixins/ScaleRangeLayer.js";import{url as m}from"./support/commonProperties.js";import y from"./support/PlaybackInfo.js";import{getVideoLayerCapabilities as d}from"./support/serviceCapabilitiesUtils.js";import h from"./support/TelemetryData.js";import f from"./support/TelemetryDisplay.js";import v from"./support/VideoFrame.js";import g from"./video/VideoController.js";import{readVideoTimeExtent as j}from"./video/videoUtils.js";import S from"../geometry/Polygon.js";import b from"../geometry/Extent.js";let O=class extends(a(c(o(u(p))))){constructor(t){super(t),this.capabilities=null,this.connectionInfo=null,this.controller=new g,this.copyright=null,this.coverage=null,this.currentFrame=null,this.currentTelemetry=null,this.description=null,this.frameCount=null,this.initialExtent=null,this.playbackInfo=null,this.posterUrl=null,this.protocol="hls",this.qualities=null,this.sourceJSON=null,this.spatialReference=n.WGS84,this.telemetryDisplay=null,this.videoTimeExtent=null,this.title=null,this.type="video",this.url=null}load(t){const r=null!=t?t.signal:null;return this.addResolvingPromise(this._fetchService(r)),Promise.resolve(this)}get buffered(){return this.controller.buffered}readCapabilitiesFromService(t,r){return d(r)}get currentMetadata(){return this.controller?.currentMetadata}get currentTime(){return this.controller.currentTime}get duration(){return this.controller.duration}get ended(){return this.controller.ended}get loop(){return this.controller.loop}set loop(t){this.controller.loop=t}get muted(){return this.controller.muted}set muted(t){this.controller.muted=t}get playbackRate(){return this.controller.rate}set playbackRate(t){this.controller.rate=t}get playbackUrl(){return this.connectionInfo&&this.protocol?this.connectionInfo[this.protocol]:null}get sourceUrl(){return this.controller.sourceUrl??""}set sourceUrl(t){this.controller.sourceUrl=t}get state(){return this.controller.state}get waiting(){return this.controller.waiting}play(){this.controller.play()}pause(){this.controller.pause()}reset(){this.controller.reset()}setCurrentTime(t){if(!this.duration)return;const r=e(t,0,this.duration);this.controller.setCurrentTime(r)}getCurrentFrame(){}toGround(t,r){return this.controller?.cameraSensorModel?.metadataSupportsTransforms?this.controller.cameraSensorModel.transformImageToGeo(t,r):null}toVideo(t){if(!this.controller?.cameraSensorModel?.metadataSupportsTransforms)return null;const r=this.controller.cameraSensorModel.transformGeoToImage(t.x,t.y,t.z);return{x:r[0],y:r[1]}}async _fetchService(t){if(this.sourceJSON)return void this.read(this.sourceJSON,{origin:"service",url:this.parsedUrl});const{data:e,ssl:o}=await r(this.parsedUrl.path,{query:{f:"json",...this.parsedUrl.query,...this.customParameters},signal:t});o&&(this.url=this.url.replace(/^http:/i,"https:")),this.sourceJSON=e,this.read(e,{origin:"service",url:this.parsedUrl})}};t([i({readOnly:!0})],O.prototype,"buffered",null),t([i({readOnly:!0,json:{read:!1}})],O.prototype,"capabilities",void 0),t([s("service","capabilities",["supportsCoverageQuery","supportsExportClip","supportsMensuration"])],O.prototype,"readCapabilitiesFromService",null),t([i({readOnly:!0,json:{read:{source:"connectionUrl"}}})],O.prototype,"connectionInfo",void 0),t([i()],O.prototype,"controller",void 0),t([i({type:String})],O.prototype,"copyright",void 0),t([i({type:S})],O.prototype,"coverage",void 0),t([i({type:v})],O.prototype,"currentFrame",void 0),t([i({readOnly:!0})],O.prototype,"currentMetadata",null),t([i({type:h})],O.prototype,"currentTelemetry",void 0),t([i({type:Number})],O.prototype,"currentTime",null),t([i({type:String})],O.prototype,"description",void 0),t([i({type:Number})],O.prototype,"duration",null),t([i({type:Boolean})],O.prototype,"ended",null),t([i({type:Number})],O.prototype,"frameCount",void 0),t([i({type:b})],O.prototype,"initialExtent",void 0),t([i({type:Boolean})],O.prototype,"loop",null),t([i({type:Boolean})],O.prototype,"muted",null),t([i({type:y})],O.prototype,"playbackInfo",void 0),t([i({type:Number})],O.prototype,"playbackRate",null),t([i({readOnly:!0})],O.prototype,"playbackUrl",null),t([i({readOnly:!0,json:{read:{source:"poster"}}})],O.prototype,"posterUrl",void 0),t([i({type:String})],O.prototype,"protocol",void 0),t([i({readOnly:!0})],O.prototype,"qualities",void 0),t([i()],O.prototype,"sourceJSON",void 0),t([i({type:String})],O.prototype,"sourceUrl",null),t([i()],O.prototype,"spatialReference",void 0),t([i({type:String})],O.prototype,"state",null),t([i({type:f})],O.prototype,"telemetryDisplay",void 0),t([i({readOnly:!0,nonNullable:!1,json:{read:{reader:j,source:"time"}}})],O.prototype,"videoTimeExtent",void 0),t([i({readOnly:!0,json:{read:{source:"name"}}})],O.prototype,"title",void 0),t([i({readOnly:!0})],O.prototype,"type",void 0),t([i(m)],O.prototype,"url",void 0),t([i({readOnly:!0})],O.prototype,"waiting",null),O=t([l("esri.layers.VideoLayer")],O);const U=O;export{U as default};