@arcgis/core 4.34.0-next.17 → 4.34.0-next.18

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 (136) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{400a4c9fa62964f8fa1d.js → 1f48d6c76f0014064eca.js} +1 -1
  3. package/assets/esri/core/workers/chunks/3cf31e51266f40072f71.js +1 -0
  4. package/assets/esri/core/workers/chunks/4325fdd96d9ea344132e.js +1 -0
  5. package/assets/esri/core/workers/chunks/68374cf42a069436830d.js +1 -0
  6. package/assets/esri/core/workers/chunks/6f8de923519bb16af8ba.js +1 -0
  7. package/assets/esri/core/workers/chunks/85753105268aeff84e69.js +1 -0
  8. package/assets/esri/core/workers/chunks/8637b9cb30170ac4eae2.js +1 -0
  9. package/assets/esri/core/workers/chunks/872f151a3a2bc9052be0.js +1 -0
  10. package/assets/esri/core/workers/chunks/8b4a35e3ed39d8be3394.js +1 -0
  11. package/assets/esri/core/workers/chunks/{d33a5d79f2163ad62b1d.js → 9965961bad09910f577b.js} +1 -1
  12. package/assets/esri/core/workers/chunks/9d499a37b960273c3f84.js +1 -0
  13. package/assets/esri/core/workers/chunks/a507192771e5f4f82973.js +1 -0
  14. package/assets/esri/core/workers/chunks/a9e1caf05c81055ae194.js +1 -0
  15. package/assets/esri/core/workers/chunks/{1415d4e2f5f3193be004.js → aa4ae0e54a0507e8dd0f.js} +1 -1
  16. package/assets/esri/core/workers/chunks/d3bfd0c382c2f39a787b.js +1 -0
  17. package/assets/esri/core/workers/chunks/d6df12bed626d56cd6b2.js +1 -0
  18. package/assets/esri/core/workers/chunks/e0146db608959ead9c97.js +1 -0
  19. package/assets/esri/core/workers/chunks/f4442a2b40e44f90b461.js +1 -0
  20. package/assets/esri/core/workers/chunks/{fa5715ca3ce95d005b0a.js → faa892ad4cc8a90b6c79.js} +1 -1
  21. package/assets/esri/themes/base/widgets/_Legend.scss +2 -0
  22. package/assets/esri/themes/dark/main.css +1 -1
  23. package/assets/esri/themes/light/main.css +1 -1
  24. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ar.json +1 -1
  25. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bg.json +1 -1
  26. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bs.json +1 -1
  27. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ca.json +1 -1
  28. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_cs.json +1 -1
  29. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_da.json +1 -1
  30. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_de.json +1 -1
  31. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_el.json +1 -1
  32. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_es.json +1 -1
  33. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_et.json +1 -1
  34. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fi.json +1 -1
  35. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fr.json +1 -1
  36. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_he.json +1 -1
  37. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hr.json +1 -1
  38. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hu.json +1 -1
  39. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_id.json +1 -1
  40. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_it.json +1 -1
  41. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ja.json +1 -1
  42. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ko.json +1 -1
  43. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lt.json +1 -1
  44. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lv.json +1 -1
  45. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_nl.json +1 -1
  46. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_no.json +1 -1
  47. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pl.json +1 -1
  48. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-BR.json +1 -1
  49. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-PT.json +1 -1
  50. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ro.json +1 -1
  51. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ru.json +1 -1
  52. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sk.json +1 -1
  53. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sl.json +1 -1
  54. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sr.json +1 -1
  55. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sv.json +1 -1
  56. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_th.json +1 -1
  57. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_tr.json +1 -1
  58. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_uk.json +1 -1
  59. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_vi.json +1 -1
  60. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-CN.json +1 -1
  61. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-HK.json +1 -1
  62. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-TW.json +1 -1
  63. package/chunks/sphere.js +1 -1
  64. package/config.js +1 -1
  65. package/core/accessorSupport/trackingUtils.js +1 -1
  66. package/core/sql.js +1 -1
  67. package/geometry/spatialReferenceEllipsoidUtils.js +1 -1
  68. package/geometry/support/sphere.js +1 -1
  69. package/interfaces.d.ts +38 -33
  70. package/kernel.js +1 -1
  71. package/layers/FeatureLayer.js +1 -1
  72. package/layers/SubtypeGroupLayer.js +1 -1
  73. package/layers/VectorTileLayer.js +1 -1
  74. package/layers/VideoLayer.js +1 -1
  75. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  76. package/layers/orientedImagery/core/coverageUtils.js +1 -1
  77. package/layers/orientedImagery/core/utils.js +1 -1
  78. package/layers/orientedImagery/transformations/updateElevation.js +1 -1
  79. package/layers/orientedImagery/transformations/updateElevationUtils.js +1 -1
  80. package/layers/orientedImagery/transformations/utils.js +1 -1
  81. package/layers/support/SubtypeSublayer.js +1 -1
  82. package/layers/support/TitleCreator.js +1 -1
  83. package/layers/support/fieldUtils.js +1 -1
  84. package/layers/video/VideoCameraSensorModel.js +1 -1
  85. package/layers/video/VideoController.js +1 -1
  86. package/networks/UtilityNetwork.js +1 -1
  87. package/package.json +1 -1
  88. package/rest/knowledgeGraphService.js +1 -1
  89. package/smartMapping/renderers/support/spikeUtils.js +1 -1
  90. package/support/revision.js +1 -1
  91. package/symbols/support/previewCIMSymbol.js +1 -1
  92. package/symbols/support/previewSymbol2D.js +1 -1
  93. package/symbols/support/svgUtils.js +1 -1
  94. package/views/2d/engine/vectorTiles/style/StyleRepository.js +1 -1
  95. package/views/3d/camera/constraintUtils/tilt.js +1 -1
  96. package/views/3d/camera/intersectionUtils.js +1 -1
  97. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  98. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  99. package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
  100. package/views/3d/state/ViewState.js +1 -1
  101. package/views/3d/state/ViewStateManager.js +1 -1
  102. package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
  103. package/views/3d/state/controllers/PointToPointAnimationController.js +1 -1
  104. package/views/3d/state/utils/navigationUtils.js +1 -1
  105. package/views/3d/terrain/OverlayManager.js +1 -1
  106. package/views/3d/terrain/TerrainSurface.js +1 -1
  107. package/views/3d/terrain/TileRenderer.js +1 -1
  108. package/views/3d/webgl-engine/lib/Octree.js +1 -1
  109. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  110. package/views/3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js +1 -1
  111. package/views/SceneView.js +1 -1
  112. package/views/support/drapedUtils.js +1 -1
  113. package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
  114. package/widgets/DistanceMeasurement2D/DistanceMeasurement2DTool.js +1 -1
  115. package/widgets/Expand.js +1 -1
  116. package/widgets/Legend/styles/support/sizeRampUtils.js +1 -1
  117. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  118. package/widgets/Legend/support/sizeRampUtils.js +1 -1
  119. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  120. package/widgets/OrientedImageryViewer.js +1 -1
  121. package/widgets/support/GridControls.js +1 -1
  122. package/assets/esri/core/workers/chunks/254c4f7e277ae9915dce.js +0 -1
  123. package/assets/esri/core/workers/chunks/273beed633cc37416ad7.js +0 -1
  124. package/assets/esri/core/workers/chunks/49a57dc1e6d1048fa949.js +0 -1
  125. package/assets/esri/core/workers/chunks/500fb5f615f0c1db1b66.js +0 -1
  126. package/assets/esri/core/workers/chunks/52239e958a82ebcd2e7a.js +0 -1
  127. package/assets/esri/core/workers/chunks/78a57f5aeb277b84b3da.js +0 -1
  128. package/assets/esri/core/workers/chunks/802c6b1a6cb9264b8e4f.js +0 -1
  129. package/assets/esri/core/workers/chunks/88b1214c284c2ec7d51b.js +0 -1
  130. package/assets/esri/core/workers/chunks/932808e485f305b6a26a.js +0 -1
  131. package/assets/esri/core/workers/chunks/beb01d400f1aa089d2dc.js +0 -1
  132. package/assets/esri/core/workers/chunks/cfc5e0ec9b0290407383.js +0 -1
  133. package/assets/esri/core/workers/chunks/d2139307f62ea8bf999a.js +0 -1
  134. package/assets/esri/core/workers/chunks/ddb66fe6fcd0764daa7a.js +0 -1
  135. package/assets/esri/core/workers/chunks/eac7af86166c09c6a9be.js +0 -1
  136. package/assets/esri/core/workers/chunks/ec49e2849766402ad5c7.js +0 -1
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import t from"../Camera.js";import i from"../Viewpoint.js";import r from"../core/Collection.js";import{byId as s}from"../core/domUtils.js";import n from"../core/Error.js";import{on as a}from"../core/events.js";import{makeHandle as o}from"../core/handleUtils.js";import has from"../core/has.js";import l from"../core/Logger.js";import{destroyMaybe as p,maybeProperty as h}from"../core/maybe.js";import{ObservableChangesType as d}from"../core/ObservableChangesType.js";import{throwIfAborted as u}from"../core/promiseUtils.js";import{on as c,watch as g,initial as m,sync as y,whenOnce as f,syncAndInitial as w}from"../core/reactiveUtils.js";import{setFrameDuration as v}from"../core/scheduling.js";import{createScreenPointArray as _,createScreenPoint as b}from"../core/screenUtils.js";import{getMetersPerUnitForSR as M}from"../core/unitUtils.js";import{initialize as S}from"../core/workers/workers.js";import{property as V}from"../core/accessorSupport/decorators/property.js";import{cast as j}from"../core/accessorSupport/decorators/cast.js";import"../core/RandomLCG.js";import{subclass as R}from"../core/accessorSupport/decorators/subclass.js";import{ensureType as C,ensureClass as O}from"../core/accessorSupport/ensureType.js";import{overrideDefaultsFrom as T}from"../core/accessorSupport/overrideDefaultsFrom.js";import{create as x}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{owningCollectionProperty as E}from"../core/support/OwningCollection.js";import A from"../geometry/Extent.js";import L from"../geometry/HeightModelInfo.js";import H from"../geometry/Point.js";import{project as I,canProjectWithoutEngine as D}from"../geometry/projectionUtils.js";import G from"../geometry/SpatialReference.js";import{projectBoundingRect as F}from"../geometry/projection/projectBoundingRect.js";import{projectPointToVector as P}from"../geometry/projection/projectPointToVector.js";import{create as U,toExtent as W}from"../geometry/support/aaBoundingRect.js";import{renderSRFromViewSR as q}from"../geometry/support/coordinateSystem.js";import{getResolutionForScale as z}from"../geometry/support/scaleUtils.js";import{isImageryTileLayer as k,isTiledLayer as B,isVoxelLayer as N,isIntegratedMeshLayer as Q}from"../layers/support/layerUtils.js";import{AnalysesCollection as Y}from"../support/AnalysesCollection.js";import{WebSceneTag as Z}from"../support/tagSymbols.js";import{BreakpointsOwner as $}from"./BreakpointsOwner.js";import{DOMContainer as J}from"./DOMContainer.js";import K from"./GroundView.js";import{PopupView as X}from"./PopupView.js";import ee from"./View.js";import te from"./ViewAnimation.js";import{ViewingMode as ie,stringFromViewingMode as re,viewingModeFromString as se}from"./ViewingMode.js";import{layerView3DImporter as ne}from"./3d/layerViewModuleImportUtils.js";import ae from"./3d/analysis/AnalysisViewManager3D.js";import{Constraints as oe}from"./3d/constraints/Constraints.js";import{EnvironmentManager as le}from"./3d/environment/EnvironmentManager.js";import pe from"./3d/environment/SceneViewEnvironment.js";import he from"./3d/input/SceneInputManager.js";import{GraphicsDeconflictor as de}from"./3d/layers/graphics/GraphicsDeconflictor.js";import{Labeler as ue}from"./3d/layers/graphics/Labeler.js";import{FeatureTileTree3D as ce}from"./3d/layers/support/FeatureTileTree3D.js";import ge from"./3d/state/ViewState.js";import{ViewStateManager as me}from"./3d/state/ViewStateManager.js";import{SceneIntersectionHelper as ye}from"./3d/state/helpers/SceneIntersectionHelper.js";import{CombinedElevationProvider as fe}from"./3d/support/CombinedElevationProvider.js";import{debugFlags as we}from"./3d/support/debugFlags.js";import ve from"./3d/support/DisplayQualityProfile.js";import{getElevationAtPoint as _e}from"./3d/support/ElevationProvider.js";import{toMap as be,hitTest as Me}from"./3d/support/hitTest.js";import{popupHitTest as Se}from"./3d/support/popupHitTest.js";import Ve from"./3d/support/QualitySettings.js";import{RenderCoordsHelper as je}from"./3d/support/RenderCoordsHelper.js";import{newResourceController as Re}from"./3d/support/ResourceController.js";import Ce from"./3d/support/SceneViewPerformanceInfo.js";import{SharedSymbolResources as Oe}from"./3d/support/SharedSymbolResources.js";import{ViewSlice as Te}from"./3d/support/ViewSlice.js";import{PointsOfInterest as xe}from"./3d/support/pointsOfInterest/PointsOfInterest.js";import Ee from"./3d/terrain/TerrainSurface.js";import{isSurfaceLayerView as Ae,getTiledLayerInfo as Le,checkIfTileInfoSupportedForView as He}from"./3d/terrain/terrainUtils.js";import{Stage as Ie}from"./3d/webgl-engine/Stage.js";import{olidEnabled as De}from"./3d/webgl-engine/effects/geometry/olidUtils.js";import{defaultTolerance as Ge}from"./3d/webgl-engine/lib/Intersector.js";import{terrainId as Fe}from"./3d/webgl-engine/lib/verticalOffsetUtils.js";import{defaultHighlightName as Pe}from"./support/HighlightDefaults.js";import Ue from"./support/HighlightOptions.js";import{occludeesSupported as We}from"./support/layerViewUtils.js";import{isSupportedScreenPointEvent as qe,createScreenPointFromSupportedEvent as ze}from"./support/screenUtils.js";import{isSpatialReferenceSupported as ke}from"./support/spatialReferenceSupport.js";import{initializeTextureCompressionWorker as Be,destroyTextureCompressionWorker as Ne}from"./support/TextureCompressionHelper.js";import{check as Qe}from"./support/WebGLRequirements.js";import Ye from"./ui/DefaultUI.js";import Ze from"./ui/3d/DefaultUI3D.js";import $e from"../webscene/Environment.js";let Je=class extends($(X(J(ee)))){constructor(e){super(e),this._userClippingArea=null,this._clippingArea=null,this._initialDefaultSpatialReference=null,this._overrideDefaultEnvironmentOnly=!0,this._resolveWhenReady=[],this._resourceController=Re(this),this.deconflictor=new de({view:this}),this.labeler=new ue({view:this,deconflictor:this.deconflictor.labels}),this.sharedSymbolResources=null,this.analyses=new Y,this.basemapTerrain=null,this.elevationProvider=null,this.canvas=null,this.constraints=new oe,this.environment=new pe,this.environmentManager=new le,this.floors=new r,this.fullOpacity=1,this.graphicsView=null,this.analysisViewManager=new ae({view:this}),this.groundView=null,this.map=null,this.screenSizePerspectiveEnabled=!0,this.state=new ge({view:this}),this.slice=new Te,this.spatialReference=null,this.alphaCompositingEnabled=!1,this.preserveDrawingBufferEnabled=!1,this.supersampleScreenshotsEnabled=!0,this.type="3d",this.ui=new Ze,this._numUpdating=0,this._lastUpdateTime=0,this.updatingProgress=.5,this._importControllers=new Map,S();const t=(e=null)=>{null!=e&&e.type===d.MOVE||(this._updatingChanged(),this.map?.allLayers.forEach((async e=>{try{await e.when()}catch{}this._updatingChanged()})))};this.addHandles([c((()=>this.map?.allLayers),"after-changes",(e=>t(e)),{onListenerAdd:()=>t(),onListenerRemove:()=>t(),sync:!0}),this.allLayerViews.on("after-changes",(e=>this._updateUpdatingMonitors(e))),g((()=>this.scene),(e=>e?.load().catch((()=>{}))))]),this.inputManager=new he({view:this}),this.stateManager=new me({view:this})}initialize(){if(has("enable-feature:esri-compress-textures")&&has("wasm-simd")){const e=Be(this,this.resourceController);this.addResolvingPromise(e.promise)}this.groundView=new K({view:this}),this._updateUpdatingMonitors(),this.updatingHandles.add((()=>this.qualitySettings.memoryLimit),(e=>{this.resourceController&&(this.resourceController.memoryController.maxMemory=e)}),m),this.updatingHandles.add((()=>this.qualitySettings.additionalCacheMemory),(e=>{this.resourceController&&(this.resourceController.memoryController.additionalCacheMemory=e)}),m),this.updatingHandles.add((()=>this.qualitySettings.frameRate??0),(e=>v(e>0?1e3/Math.ceil(e):0)),m),this.addHandles([g((()=>this.spatialReference),(()=>this.notifyChange("clippingArea")),y),g((()=>({plane:this.slice.plane,isDecoration:this.slice.isDecoration})),(()=>this._updateSlice()),y)])}destroy(){this.destroyed||(Ne(this),this.updatingHandles.removeAll(),this.invalidate(),this.activeTool=null,this.layerViewManager.clear(),this._set("analysisViewManager",p(this.analysisViewManager)),this._exitSurface(),this._disposeGraphicsView(),this._disposeFocusAreasView(),this.sharedSymbolResources=p(this.sharedSymbolResources),this._set("labeler",p(this.labeler)),this._set("deconflictor",p(this.deconflictor)),this._resourceController=p(this._resourceController),this._set("stateManager",p(this.stateManager)),this._set("inputManager",p(this.inputManager)),this.state.destroy(),this.highlights.destroy(),this.removeHandles("updatingMonitors"),this._set("environmentManager",p(this.environmentManager)),this._set("environment",p(this.environment)),this.groundView=p(this.groundView),this._exitBasemapTerrain(),this.stage?.destroy(),this.slice.destroy())}get stage(){return this._stage}get renderSpatialReference(){return this.renderCoordsHelper?.spatialReference}get basemapSpatialReference(){return this.basemapTerrain?.spatialReference}get animation(){return this.state?.animation}get camera(){return this.stateManager?.camera}set camera(e){this.stateManager&&(this.stateManager.camera=e)}get contentCamera(){return this.stateManager?.contentCamera}set contentCamera(e){this.stateManager&&(this.stateManager.contentCamera=e)}installContentCameraReset(e={sticky:!1}){return this.stateManager.installContentCameraReset(e)}get center(){return this.stateManager?.center}set center(e){this.stateManager&&(this.stateManager.center=e)}get clippingArea(){if("global"===this.viewingMode)return null;const e=this.map;let t=this._userClippingArea||h(e,"clippingArea");return!this._userClippingArea&&!h(e,"clippingEnabled")||null==t?(this._clippingArea=null,null):t instanceof A?this.spatialReference&&(t=Ke(t,this.spatialReference),null==t)?(l.getLogger(this).error("#clippingArea","setting clippingArea with incompatible SpatialReference"),this._clippingArea):(t=t.clone(),null==t.intersection(this._groundAndLayersExtent)&&(t.xmin=t.xmax,t.ymin=t.ymax),t.zmin=void 0,t.zmax=void 0,t.equals(this._clippingArea)||(this._clippingArea=t),this._clippingArea):(l.getLogger(this).error("#clippingArea","only clippingArea geometries of type Extent are supported"),this._clippingArea)}set clippingArea(e){this.ready&&"global"===this.viewingMode&&null!=e?l.getLogger(this).error("#clippingArea=","Clipping area is only supported in local viewingMode"):this._userClippingArea=e}get renderDataExtent(){if(this.state.viewingMode===ie.Global)return null;const e=this.renderSpatialReference,t=this.dataExtent;return null==t||null==e||t.spatialReference.equals(e)?t:Ke(t,e)}get tileInfo(){return this.basemapTerrain?.tilingScheme?.toTileInfo()}get dataExtent(){let e=this._groundAndLayersExtent;const t=this.spatialReference||G.WGS84,i=Ke(this.clippingArea,t);null!=i&&(e=null!=e?e.intersection(i):i);const r=this._get("dataExtent");return null!=e&&e.equals(r)?r:e}get _groundAndLayersExtent(){const e=this.spatialReference||G.WGS84;let t;const i=i=>{const r=Ke(i,e);null!=r&&(null!=t?t.union(r):t=r.clone())},r=this.basemapTerrain;if(r?.spatialReference){const e=r.groundExtent;i(new A({xmin:e[0],ymin:e[1],zmin:0,xmax:e[2],ymax:e[3],zmax:0,spatialReference:r.spatialReference}))}const s=e=>{null==e.fullExtent||"graphics"===e.type&&e.internal||i(e.fullExtent)};if(this.map?.allLayers.forEach((e=>s(e))),null==t)return null;t.hasZ?(t.zmin=Math.min(0,t.zmin??0),t.zmax=Math.max(0,t.zmax??0)):(t.zmin=0,t.zmax=0);const n=this._get("_groundAndLayersExtent");return t.equals(n)?n:t}castEnvironment(e){return e?e instanceof pe?e:e instanceof $e?this.environment?.cloneWithWebsceneEnvironment(e)??pe.fromWebsceneEnvironment(e):C(pe,e):new pe}get extent(){return this.stateManager?.extent}set extent(e){this.stateManager&&(this.stateManager.extent=e)}get screenCenter(){return this.stateManager?.screenCenter}get frustum(){return this.stateManager?.frustum}get initialExtentRequired(){return this.stateManager&&!this.stateManager.hasInitialView}get defaultsFromMapSettings(){return{required:{tileInfo:!1,heightModelInfo:!0,extent:!1}}}get interacting(){return this.navigating||(this.toolViewManager?.interacting??!1)}get stationary(){return!this.animation&&!this.resizing&&(this.state?.stationary??!0)}get navigating(){return this.state?.navigating??!1}get scene(){return this.map&&Z in this.map?this.map:null}get padding(){return this.stateManager?.padding}set padding(e){this.stateManager&&(this.stateManager.padding=e)}set qualityProfile(e){ve.isValidProfile(e)&&(ve.apply(e,this.qualitySettings),this.stage?.renderView.updateQualitySettings(this.qualitySettings),this._set("qualityProfile",e))}get qualityProfile(){return this._get("qualityProfile")||ve.getDefaultProfile()}_updateSlice(){null!=this.stage&&(this.stage.renderer.slice=this.slice)}get typeSpecificPreconditionsReady(){return!!this.viewingMode&&!!this.stateManager?.preinit(this.spatialReference)}get resolution(){return null!=this.spatialReference?z(this.scale,this.spatialReference):0}get scale(){return this.stateManager?.scale}set scale(e){this.stateManager&&(this.stateManager.scale=e)}get heightModelInfo(){const e=this.getDefaultHeightModelInfo();return null!=e?L.deriveUnitFromSR(e,this.spatialReference):null}get updating(){if(this.destroying||this.destroyed)return!1;let e=0,t=this.layerViewManager.updating,i=t?this.layerViewManager.updatingRemaining:0;this.allLayerViews.forEach((r=>{if(r.isFulfilled()){if(r.updating){if(t=!0,r.suspended||Ae(r))return;++i,e+=r.updatingProgress}}else++i}));for(const s of this._updatingObjects)if(null!=s&&s.updating){const t=.1;i+=t,e+=.5*t}for(const s of this._updatingObjectsWithProgress)null!=s&&s.updating&&(++i,e+=s.updatingProgress);const r=!this.stateManager.test.updatingIgnoreRenderState&&this.state.updating;if(t=!!(t||i>0||this.updatingHandles.updating||!this.ready||!this.stationary||r||this._importControllers.size>0||this.inputManager?.updating||this.map?.allLayers?.some((e=>!e.isFulfilled()))),t?(this._numUpdating=Math.max(i,this._numUpdating),e+=this._numUpdating-i):this._numUpdating=0,this._numUpdating>0?e/=this._numUpdating:e=t?0:1,this._get("updatingProgress")!==e){const i=performance.now();if(e<1){const t=Math.min((i-this._lastUpdateTime)/2e3,1);e=this.updatingProgress*(1-t)+e*t}this._set("updatingProgress",e),this._lastUpdateTime=t&&e<1?i:0}return t}get _updatingObjects(){return[this.graphicsView,this.basemapView,this._resourceController,this.stage,this.featureTiles,this.pointsOfInterest,this.environmentManager,this.overlay,this._featureTreeDebugger,this.toolViewManager,this.analysisViewManager]}get _updatingObjectsWithProgress(){return[this.deconflictor,this.labeler,this.basemapTerrain]}get viewingMode(){const e=this._predeterminedViewingMode;if(null!=e)return re(e);const t=this.spatialReference;return t?null!=this.defaultsFromMap?.viewingMode&&t.equals(this.defaultsFromMap.spatialReference)?re(this.defaultsFromMap.viewingMode):ke(t,ie.Global)?"global":"local":"global"}set viewingMode(e){this.ready?l.getLogger(this).error("#viewingMode","viewingMode cannot be set once view is ready"):this._overrideIfSome("viewingMode",e)}get viewpoint(){return this.stateManager?.viewpoint}set viewpoint(e){this.stateManager&&(this.stateManager.viewpoint=e)}get visibleArea(){return this.stateManager?.visibleArea}get zoom(){return this.stateManager.zoom}set zoom(e){this.stateManager&&(this.stateManager.zoom=e)}get highlightOptions(){return this.highlights.find((({name:e})=>e===Pe))??new Ue}set highlightOptions(e){for(let t=0;t<this.highlights.length;++t){if(this.highlights.at(t).name===Pe)return void this.highlights.items[t].assignFrom(e)}}get resourceController(){return this._resourceController}get quality(){return this._resourceController?.memoryController?.memoryFactor??1}get resolutionScale(){return Math.sqrt(Math.min(1,this.quality/.75))}get performanceInfo(){return new Ce(this)}on(e,t,i,r){const s=this.viewEvents.on(e,t,i,r);return s||super.on(e,t)}hasEventListener(e){return super.hasEventListener(e)||this.viewEvents.hasHandler(e)}toMap(e,t){if(!this.ready)return l.getLogger(this).error("#toMap()","Scene view cannot be used before it is ready"),null;const i=qe(e)?ze(this,e):e;return be(this,i,t,this._defaultToMapOptions)}toScreen(e){if(!this.ready)return l.getLogger(this).error("#toScreen()","Scene view cannot be used before it is ready"),null;const t=(null==e.z?_e(this.elevationProvider,e):null)??0;return P(e,Xe,this.renderSpatialReference,t),this.state.camera.projectToScreen(Xe,et),b(et[0],et[1])}pixelSizeAt(e,t){if(!this.ready)return l.getLogger(this).error("#pixelSizeAt()","Scene view cannot be used before it is ready"),null;if(!e)return 0;const i=this.renderSpatialReference;P(e,Xe,i);const r=this.state.camera.computeScreenPixelSizeAt(Xe);return t&&i!==t?r*M(i)/M(t):r}overlayPixelSizeInMapUnits(e){const t=this.basemapTerrain.overlayManager;return t?t.overlayPixelSizeInMapUnits(e,(()=>this.pixelSizeAt(e))):1}hitTest(e,t){if(!this.ready)return l.getLogger(this).error("#hitTest()","Scene view cannot be used before it is ready"),null;const i=qe(e)?ze(this,e):e;return Me(this,i,t,this._defaultHitTestOptions)}async popupHitTest(e){return Se(this,e)}goTo(e,t){return this.updatingHandles.addPromise(this.stateManager.goTo(e,t))}async whenAnalysisView(e){if(null==e.parent)throw new n("view:no-analysisview-for-analysis","The analysis has not been added to view.analyses",{analysis:e});switch(e.parent.type){case"line-of-sight":case"dimension":case"viewshed":return(await this.whenLayerView(e.parent)).whenAnalysisView();default:return this.analysisViewManager.whenAnalysisView(e)}}whenLayerView(e){return super.whenLayerView(e)}async takeScreenshot(e){const t=await this._completeSettings(e);await this.whenReady();const i=await this.stage.renderView.takeScreenshot(t);return(await import("./support/screenshotUtils.js")).encode(i,t,this._pixelFormat())}async _takeScreenshot(e){const t=await this._completeSettings(e);await this.whenReady();const i=await this.stage.renderView.takeScreenshot(t);return(await import("./support/screenshotUtils.js")).encodeData(i,this._pixelFormat())}async _takeScreenshotWithObjectAndLayerId(e){const t=await this._completeSettings(e);await this.whenReady();const i=await this.stage.renderView.takeScreenshotWithOID(t),{encodeData:r}=await import("./support/screenshotUtils.js");return[r(i[0],this._pixelFormat()),r(i[1],this._pixelFormat())]}async _completeSettings(e){const{toRenderSettings:t,screenshotSuperSampleSettings:i}=await import("./support/screenshotUtils.js"),r=t(e,this);return r.pixelRatio/=this.state.pixelRatio,i(r,this.supersampleScreenshotsEnabled,this.padding)}_pixelFormat(){return{flipY:!0,premultipliedAlpha:this.stage?.renderView.getAlpha()??!1}}get test(){}async takeScreenshotWithObjectAndLayerId(e){if(!De())throw new n("360vr:objectAndLayerId-rendering-disabled","has enable-feature:objectAndLayerId-rendering must be true");const{encode:t}=await import("./support/screenshotUtils.js"),i=await this._completeSettings(e);await this.whenReady();const r=await this.stage.renderView.takeScreenshotWithOID(i),s=t(r[0],i,this._pixelFormat()),a=await this._completeSettings(e);a.format="png";return[s,t(r[1],a,this._pixelFormat())]}getColorToObjectAndLayerIdMapping(){const e=this.stage.renderView.olidRenderHelper;if(e)return e.getColorToObjectAndLayerIdMapping();throw new n("360vr:objectAndLayerId-rendering-disabled","has enable-feature:objectAndLayerId-rendering must be true")}addUpdatingPromise(e){return this.updatingHandles.addPromise(e)}importLayerView(e){return ne.importLayerView(e)}hasLayerViewModule(e){return ne.hasLayerViewModule(e)}forceDOMReadyCycle(){this.forceReadyCycle()}getDefaultSpatialReference(){return this.scene?.initialViewProperties?.spatialReference||this.defaultsFromMap?.spatialReference||this.defaultsFromMap?.ready&&this._initialDefaultSpatialReference||null}async validate(){let e=Qe(this.type);const t=has("safari");if(t&&t<9&&(e=new n("sceneview:browser-not-supported","This browser is not supported by SceneView (Safari < 9)",{type:"safari",requiredVersion:9,detectedVersion:t})),null!=e)throw l.getLogger(this).warn("#validate()",e.message),e}get _predeterminedViewingMode(){const e=this._isOverridden("viewingMode")?this._get("viewingMode"):this.scene?.initialViewProperties?.viewingMode;return null!=e?se(e):null}getSpatialReferenceSupport(e,t){const i=this._predeterminedViewingMode;if(null!=i)return this._validateSpatialReferenceForViewingMode(e,t,i)?{constraints:this._makeSpatialReferenceConstraints(e,t,i)}:null;const r=this._validateSpatialReferenceForViewingMode(e,t,ie.Local),s=this._validateSpatialReferenceForViewingMode(e,t,ie.Global);return r||s?r&&s?{constraints:this._makeSpatialReferenceConstraints(e,t,null)}:r?{constraints:this._makeSpatialReferenceConstraints(e,t,ie.Local)}:{constraints:this._makeSpatialReferenceConstraints(e,t,ie.Global)}:null}_validateSpatialReferenceForViewingMode(e,t,i){return!!ke(e,i)&&(null==t||(!!k(t)||(!B(t)||null!=Le(t,e,i))&&(!N(t)||i!==ie.Global)))}_makeSpatialReferenceConstraints(e,t,i){if(null==t)return[{spatialReference:e,viewingMode:i}];const{isWebMercator:r,isWGS84:s}=e;if(k(t)&&(r||s)){return!s||i===ie.Local||null===He(t.tileInfo,t.fullExtent,e,ie.Global)?[{spatialReference:e,viewingMode:i},{spatialReference:G.WebMercator,viewingMode:i}]:[{spatialReference:r?G.WGS84:G.WebMercator,viewingMode:i}]}return B(t)||N(t)||!r&&!s?B(t)&&r&&i!==ie.Global?[{spatialReference:e,viewingMode:i},{spatialReference:G.WGS84,viewingMode:ie.Local}]:[{spatialReference:e,viewingMode:i}]:[{spatialReference:e,viewingMode:i},{spatialReference:r?G.WGS84:G.WebMercator,viewingMode:i}]}_validateSpatialReference(e){const t=null!=this.getSpatialReferenceSupport(e),i=this._predeterminedViewingMode;return t||(null!=i?l.getLogger(this).warnOnce(`Spatial reference defined on view not supported in ${re(i)} viewing mode.`):e.isGeographic&&l.getLogger(this).warnOnce("Spatial reference is geographic but not supported.")),t}whenReady(){return new Promise((e=>{this.ready?e(this):this._resolveWhenReady.push(e)}))}trackGraphicState(e){if(!e.graphic)return l.getLogger(this).error("trackGraphicState","GraphicState.graphic must not be null or undefined to start tracking"),null;const t=this.getViewForGraphic(e.graphic);let i=null,r=!1;const s=t=>{!r&&null!=t&&"processor"in t&&"graphics-3d"===t.processor?.type&&t.processor.graphicsCore&&(i=t.processor.graphicsCore.trackGraphicState(e))};return null!=t?s(t):this.whenViewForGraphic(e.graphic,{waitForLayer:!0}).then((e=>s(e)),(()=>{})).catch((()=>{})),o((()=>{r=!0,null!=i&&(i.remove(),i=null)}))}maskOccludee(e){if(!e)return l.getLogger(this).error("maskOccludee","GraphicState.graphic must not be null or undefined to mask an occludee"),null;const t=this.getViewForGraphic(e);let i=null,r=!1;const s=t=>{!r&&null!=t&&We(t)&&(i=t.maskOccludee(e))};return null!=t?s(t):this.whenViewForGraphic(e,{waitForLayer:!0}).then((e=>s(e)),(()=>{})).catch((()=>{})),o((()=>{r=!0,null!=i&&(i.remove(),i=null)}))}getViewForGraphic(e){return e.layer===this?this.graphicsView:e.layer?this.allLayerViews.filter((e=>"media-3d"!==e.type)).find((t=>t.layer===e.layer)):null}graphicChanged(e){null!=this.graphicsView&&this.graphicsView.graphicChanged(e)}async whenViewForGraphic(e,t){return e.layer===this?(await f((()=>this.graphicsView)),this.graphicsView):e.layer&&this.map?t&&t.waitForLayer&&!this.map.allLayers.includes(e.layer)?new Promise(((t,i)=>{const r=this.map.allLayers.on("change",(s=>{s.added.includes(e.layer)&&(r.remove(),this.whenLayerView(e.layer).then(t,i))}))})):this.whenLayerView(e.layer):null}async _importModule(e,t){const i=new AbortController;this._importControllers.set(e,i),this._updatingChanged();try{const r=await it[e]();return t&&(u(i.signal),await t(i.signal)),u(i.signal),this._importControllers.delete(e),r}catch{this._importControllers.delete(e)}return null}_abortImport(e){this._importControllers.get(e)?.abort(),this._importControllers.delete(e),this._updatingChanged()}_initBasemapTerrain(){this._set("basemapTerrain",new Ee({view:this})),this._set("elevationProvider",new fe({view:this})),this.elevationProvider.register("ground",this.basemapTerrain)}_exitBasemapTerrain(){const e=this.basemapTerrain,t=this.elevationProvider;e&&(this._set("basemapTerrain",null),this._set("elevationProvider",null),t.unregister(e),t.destroy(),e.destroy())}_initGlobe(){this._initCoordinateSystem(),this.state.createInitialCamera(),this._initBasemapTerrain(),this._set("pointsOfInterest",new xe({view:this})),this._set("featureTiles",new ce({renderCoordsHelper:this.renderCoordsHelper,cameraOnSurface:this.pointsOfInterest.cameraOnSurface,focus:this.pointsOfInterest.focus,tilingSchemeOwner:this.basemapTerrain,viewState:this.state,scheduler:this._resourceController.scheduler,terrain:this.basemapTerrain}));const e=()=>{const e=this.basemapTerrain?.extent;if(this.clippingArea||e)if(e&&this.basemapTerrain.spatialReference){const e=null!=this.basemapTerrain.extent&&null!=this.basemapTerrain.spatialReference?I(W(this.basemapTerrain.extent,this.basemapTerrain.spatialReference),this.spatialReference):null;this.clippingArea?this.featureTiles.filterExtent=this.clippingArea.intersection(e):this.featureTiles.filterExtent=e}else this.featureTiles.filterExtent=this.clippingArea;else this.featureTiles.filterExtent=null};this.addHandles([this.updatingHandles.add((()=>we.FEATURE_TILE_TREE_SHOW_TILES),(e=>{e&&this.featureTiles&&!this._featureTreeDebugger?this.updatingHandles.addPromise(import("./3d/layers/support/FeatureTileTree3DDebugger.js")).then((({FeatureTileTree3DDebugger:e})=>{!this._featureTreeDebugger&&we.FEATURE_TILE_TREE_SHOW_TILES&&(this._featureTreeDebugger=new e({view:this}))})):e||!this._featureTreeDebugger||we.FEATURE_TILE_TREE_SHOW_TILES||(this._featureTreeDebugger.destroy(),this._featureTreeDebugger=null)}),w),this.updatingHandles.add((()=>this.clippingArea),e,w),this.updatingHandles.add((()=>this.basemapTerrain.extent),e,w)],"feature-tiles"),this.stateManager.init()}_exitGlobe(){this.featureTiles&&(this.stateManager.exit(),this.removeHandles("render-coords-helper"),this.removeHandles("feature-tiles"),this._set("featureTiles",p(this.featureTiles)),this._set("pointsOfInterest",p(this.pointsOfInterest)),this._exitBasemapTerrain(),this.state.reset(),this._exitCoordinateSystem())}_initCoordinateSystem(){if(this.spatialReference){const e=this.spatialReference,t=this.state.isGlobal,i=q(t,e);i!==this.renderSpatialReference&&(this._set("renderCoordsHelper",je.create(this.state.viewingMode,i)),t||this.addHandles(g((()=>this.basemapTerrain?.extent),(e=>{const t=this.renderCoordsHelper.spatialReference;null==e||0===e[0]&&0===e[1]&&0===e[2]&&0===e[3]||!F(e,this.basemapTerrain.spatialReference,tt,t)||(this.renderCoordsHelper.extent=tt)}),y),"render-coords-helper"),this.sceneIntersectionHelper&&this.sceneIntersectionHelper.setTolerance(Ge/this.renderCoordsHelper.unitInMeters))}else this._set("renderCoordsHelper",null)}_exitCoordinateSystem(){this.removeHandles("render-coords-helper"),this._set("renderCoordsHelper",null)}_updatingChanged(){this.notifyChange("updating")}_updateUpdatingMonitors(e=null){null!=e&&e.type===d.MOVE||(this.removeHandles("updatingMonitors"),this.allLayerViews.forEach((e=>{e.destroyed||(this.addHandles(g((()=>[e.updating,e.updatingProgress]),(()=>this._updatingChanged()),y),"updatingMonitors"),e.when((()=>this._updatingChanged()),(()=>this._updatingChanged())))})),this._updatingChanged())}async _prepareScreenshotOverlay(){this.overlay&&await this.overlay.prepare()}_renderScreenshotOverlay(e,t,i){if(!this.overlay||!this.overlay.hasVisibleItems)return i;const r=e.getContext("2d",{willReadFrequently:!0});return r.putImageData(i,0,0),this.overlay.renderCanvas(e,{disableDecorations:t}),r.getImageData(0,0,i.width,i.height)}_initStage(){const e={deactivatedWebGLExtensions:this.deactivatedWebGLExtensions,debugWebGLExtensions:this.debugWebGLExtensions,alpha:this.alphaCompositingEnabled,preserveDrawingBuffer:this.preserveDrawingBufferEnabled,canvas:this.renderCanvas,screenshot:{prepareOverlay:()=>this._prepareScreenshotOverlay(),renderOverlay:(e,t,i)=>this._renderScreenshotOverlay(e,t,i)}},t=new ye(this.state.viewingMode,(e=>this.stage.layers.forAll(e)),this);this._set("sceneIntersectionHelper",t);const i=s(this.surface);this._stage=new Ie({view:this,options:e,container:i}),this._updateSlice(),this.addHandles([this.updatingHandles.add((()=>this.qualitySettings.highQualityTransparency),(e=>this.stage.renderer.setParameters({highQualityTransparency:e})),m),this.on("pointer-move",(()=>this.stage?.renderer.resetAnimation())),a(this.stage.renderView.canvas,"webglcontextlost",(e=>{this.fatalError=new n("webgl-context-lost",e.statusMessage)}))],"stage"),this.renderCoordsHelper&&this.sceneIntersectionHelper.setTolerance(Ge/this.renderCoordsHelper.unitInMeters),this._set("canvas",this.stage.renderView.canvas)}_exitStage(){this._set("sceneIntersectionHelper",null),this._stage=p(this.stage),this.removeHandles("stage"),this._set("canvas",null)}_initSurface(e){this._exitSurface(),this._initStage(),this._initGlobe(),this.sharedSymbolResources=new Oe({view:this,viewingMode:e,resourceController:this._resourceController,pointsOfInterest:this.pointsOfInterest,viewState:this.state})}_exitSurface(){this.sharedSymbolResources&&(this.sharedSymbolResources.objectResourceCache.destroy(),this.sharedSymbolResources.destroy(),this.sharedSymbolResources=null,this._exitGlobe(),this._exitStage())}async _ensureGraphicsView(){if(this.graphicsView||this._importControllers.has("GraphicsView3D")||0===this.graphics.length)return;this.removeHandles("GraphicsView3D");const e=(await this._importModule("GraphicsView3D",(e=>f((()=>this.basemapTerrain?.ready),e))))?.default;e&&this._set("graphicsView",new e({view:this,getGraphics:()=>this.graphics})),this._updatingChanged()}_disposeGraphicsView(){this._abortImport("GraphicsView3D"),this.removeHandles("GraphicsView3D"),this.graphicsView&&(this.removeHandles(this.graphicsView.processor.layer.id),this.graphicsView.destroy(),this._set("graphicsView",null))}_disposeFocusAreasView(){this._abortImport("FocusAreasView"),this.removeHandles("FocusAreasView"),this.focusAreasView=p(this.focusAreasView)}async _ensureFocusAreasView(e){if(this.focusAreasView||this._importControllers.has("FocusAreasView")||0===e)return;this.removeHandles("FocusAreasView");const t=(await this._importModule("FocusAreasView"))?.FocusAreasView;t&&(this.focusAreasView=new t({view:this})),this._updatingChanged()}_startup(){const e=se(this.viewingMode);e===ie.Global&&(this._clippingArea=null),this._initSurface(e),this._set("ready",!0),this.addHandles(c((()=>this.graphics),"after-changes",(()=>this._ensureGraphicsView())),"GraphicsView3D"),this._ensureGraphicsView(),this.addHandles(g((()=>this.map?.focusAreas?.areas.length??0),(e=>this._ensureFocusAreasView(e)),{initial:!0}),"FocusAreasView");const t=this.scene?.initialViewProperties??null,i=t?.environment;i&&(this._overrideDefaultEnvironmentOnly?T(this.environment,i):this.environment=this.environment.cloneWithWebsceneEnvironment(i)),this.timeExtent=t?.timeExtent,t?.analyses.applyTo(this),this.labeler.setup(),this.environmentManager.connectView(this),this.inputManager.connect();const r=this._resolveWhenReady;this._resolveWhenReady=[],r.forEach((e=>e(this)))}_teardown(){this._initialDefaultSpatialReference=null,this.inputManager.disconnect(),this.environmentManager.disconnectView(),this._overrideDefaultEnvironmentOnly=!1,this.labeler.dispose(),this._disposeGraphicsView(),this._disposeFocusAreasView(),this._exitSurface(),this._set("ready",!1)}get _defaultToMapOptions(){const e={include:new Set};if(!this.map)return e;this.map.ground&&e.include.add(Fe);for(const t of this.allLayerViews)Q(t.layer.type)&&e.include.add(t.uid);return e}get _defaultHitTestOptions(){const e={exclude:new Set};if(!this.map)return e;this.map.ground&&this.map.ground.opacity<1&&e.exclude.add(Fe);for(const t of this.allLayerViews)Q(t.layer.type)&&t.layer.opacity<1&&e.exclude.add(t.uid);return e}static{this.type="3d"}};function Ke(e,t){return null!=e&&D(e.spatialReference,t)?I(e,t):null}e([V()],Je.prototype,"_userClippingArea",void 0),e([V()],Je.prototype,"_resourceController",void 0),e([V()],Je.prototype,"_stage",void 0),e([V({readOnly:!0})],Je.prototype,"deconflictor",void 0),e([V({readOnly:!0})],Je.prototype,"labeler",void 0),e([V(E(Y,"analyses"))],Je.prototype,"analyses",void 0),e([V({type:te,readOnly:!0})],Je.prototype,"animation",null),e([V({readOnly:!0})],Je.prototype,"basemapTerrain",void 0),e([V({readOnly:!0})],Je.prototype,"elevationProvider",void 0),e([V()],Je.prototype,"camera",null),e([V({type:t})],Je.prototype,"contentCamera",null),e([V({readOnly:!0})],Je.prototype,"canvas",void 0),e([V({type:H})],Je.prototype,"center",null),e([V({type:A})],Je.prototype,"clippingArea",null),e([V({type:oe})],Je.prototype,"constraints",void 0),e([V({type:A,readOnly:!0})],Je.prototype,"renderDataExtent",null),e([V({readOnly:!0})],Je.prototype,"tileInfo",null),e([V({type:A,readOnly:!0})],Je.prototype,"dataExtent",null),e([V({type:A,readOnly:!0})],Je.prototype,"_groundAndLayersExtent",null),e([V({type:pe})],Je.prototype,"environment",void 0),e([j("environment")],Je.prototype,"castEnvironment",null),e([V({readOnly:!0})],Je.prototype,"environmentManager",void 0),e([V({type:A})],Je.prototype,"extent",null),e([V({type:r})],Je.prototype,"floors",void 0),e([V()],Je.prototype,"screenCenter",null),e([V()],Je.prototype,"frustum",null),e([V({type:Number,readOnly:!0})],Je.prototype,"fullOpacity",void 0),e([V({readOnly:!0})],Je.prototype,"graphicsView",void 0),e([V({readOnly:!0})],Je.prototype,"analysisViewManager",void 0),e([V()],Je.prototype,"groundView",void 0),e([V({type:Boolean})],Je.prototype,"initialExtentRequired",null),e([V()],Je.prototype,"defaultsFromMapSettings",null),e([V()],Je.prototype,"interacting",null),e([V()],Je.prototype,"stationary",null),e([V()],Je.prototype,"navigating",null),e([V()],Je.prototype,"map",void 0),e([V()],Je.prototype,"padding",null),e([V({type:xe,readOnly:!0})],Je.prototype,"pointsOfInterest",void 0),e([V({type:ce,readOnly:!0})],Je.prototype,"featureTiles",void 0),e([V()],Je.prototype,"_featureTreeDebugger",void 0),e([V({type:Boolean})],Je.prototype,"screenSizePerspectiveEnabled",void 0),e([V({constructOnly:!0})],Je.prototype,"deactivatedWebGLExtensions",void 0),e([V({constructOnly:!0})],Je.prototype,"debugWebGLExtensions",void 0),e([V({constructOnly:!0})],Je.prototype,"renderCanvas",void 0),e([V({constructOnly:!0})],Je.prototype,"state",void 0),e([V({readOnly:!0})],Je.prototype,"inputManager",void 0),e([V({readOnly:!0})],Je.prototype,"stateManager",void 0),e([V({type:["low","medium","high"]})],Je.prototype,"qualityProfile",null),e([V({type:Ve,get(){let e=this._get("qualitySettings");return e||(e=new Ve,ve.apply(this.qualityProfile,e)),e}})],Je.prototype,"qualitySettings",void 0),e([V()],Je.prototype,"slice",void 0),e([V({readOnly:!0})],Je.prototype,"typeSpecificPreconditionsReady",null),e([V({readOnly:!0})],Je.prototype,"renderCoordsHelper",void 0),e([V({readOnly:!0})],Je.prototype,"sceneIntersectionHelper",void 0),e([V({type:Number,dependsOn:["scale","spatialReference"],readOnly:!0})],Je.prototype,"resolution",null),e([V({type:Number})],Je.prototype,"scale",null),e([V()],Je.prototype,"heightModelInfo",null),e([V()],Je.prototype,"spatialReference",void 0),e([V({type:Boolean,constructOnly:!0})],Je.prototype,"alphaCompositingEnabled",void 0),e([V({constructOnly:!0})],Je.prototype,"preserveDrawingBufferEnabled",void 0),e([V({type:Boolean})],Je.prototype,"supersampleScreenshotsEnabled",void 0),e([V({readOnly:!0})],Je.prototype,"type",void 0),e([V(),j((e=>e instanceof Ye?e:O(Ze,e)))],Je.prototype,"ui",void 0),e([V({type:Boolean,readOnly:!0,dependsOn:["graphicsView.updating","basemapView.updating","basemapTerrain.updating","layerViewManager.updating","layerViewManager.updatingRemaining","_resourceController.updating","stage.updating","featureTiles.updating","pointsOfInterest.updating","environmentManager.updating","overlay.updating","updatingHandles.updating","featureTreeDebugger.updating","labeler.updating","deconflictor.updating","ready","stationary","inputManager.updating","toolViewManager.updating","analysisViewManager.updating","state.updating","textures.updating"]})],Je.prototype,"updating",null),e([V()],Je.prototype,"_updatingObjects",null),e([V()],Je.prototype,"_updatingObjectsWithProgress",null),e([V({type:Number,readOnly:!0,dependsOn:["updating"]})],Je.prototype,"updatingProgress",void 0),e([V({type:["global","local"]})],Je.prototype,"viewingMode",null),e([V({type:i})],Je.prototype,"viewpoint",null),e([V({readOnly:!0})],Je.prototype,"visibleArea",null),e([V({type:Number})],Je.prototype,"zoom",null),e([V({type:Ue})],Je.prototype,"highlightOptions",null),e([V({readOnly:!0})],Je.prototype,"quality",null),e([V({readOnly:!0})],Je.prototype,"resolutionScale",null),e([V()],Je.prototype,"focusAreasView",void 0),e([V()],Je.prototype,"_defaultToMapOptions",null),e([V()],Je.prototype,"_defaultHitTestOptions",null),Je=e([R("esri.views.SceneView")],Je);const Xe=x(),et=_(),tt=U(),it={GraphicsView3D:()=>import("./3d/layers/GraphicsView3D.js"),FocusAreasView:()=>import("./3d/FocusAreasView.js")},rt=Je;export{rt as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import t from"../Camera.js";import i from"../Viewpoint.js";import r from"../core/Collection.js";import{byId as s}from"../core/domUtils.js";import n from"../core/Error.js";import{on as a}from"../core/events.js";import{makeHandle as o}from"../core/handleUtils.js";import has from"../core/has.js";import l from"../core/Logger.js";import{destroyMaybe as p,maybeProperty as h}from"../core/maybe.js";import{ObservableChangesType as d}from"../core/ObservableChangesType.js";import{throwIfAborted as c}from"../core/promiseUtils.js";import{on as u,watch as g,initial as m,sync as y,whenOnce as f,syncAndInitial as w}from"../core/reactiveUtils.js";import{setFrameDuration as v}from"../core/scheduling.js";import{createScreenPointArray as _,createScreenPoint as b}from"../core/screenUtils.js";import{cleanupWhereClauseCache as M}from"../core/sql.js";import{getMetersPerUnitForSR as S}from"../core/unitUtils.js";import{initialize as V}from"../core/workers/workers.js";import{property as j}from"../core/accessorSupport/decorators/property.js";import{cast as R}from"../core/accessorSupport/decorators/cast.js";import"../core/RandomLCG.js";import{subclass as C}from"../core/accessorSupport/decorators/subclass.js";import{ensureType as T,ensureClass as O}from"../core/accessorSupport/ensureType.js";import{overrideDefaultsFrom as x}from"../core/accessorSupport/overrideDefaultsFrom.js";import{drainNotificationQueue as E}from"../core/accessorSupport/trackingUtils.js";import{create as A}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{owningCollectionProperty as L}from"../core/support/OwningCollection.js";import H from"../geometry/Extent.js";import I from"../geometry/HeightModelInfo.js";import D from"../geometry/Point.js";import{project as G,canProjectWithoutEngine as P}from"../geometry/projectionUtils.js";import F from"../geometry/SpatialReference.js";import{cleanupSpatialReferenceEllipsoidUtils as U}from"../geometry/spatialReferenceEllipsoidUtils.js";import{projectBoundingRect as W}from"../geometry/projection/projectBoundingRect.js";import{projectPointToVector as q}from"../geometry/projection/projectPointToVector.js";import{create as k,toExtent as z}from"../geometry/support/aaBoundingRect.js";import{renderSRFromViewSR as B}from"../geometry/support/coordinateSystem.js";import{getResolutionForScale as N}from"../geometry/support/scaleUtils.js";import{isImageryTileLayer as Q,isTiledLayer as Y,isVoxelLayer as Z,isIntegratedMeshLayer as $}from"../layers/support/layerUtils.js";import{clearDefaultPortalInstance as J}from"../portal/portalDefault.js";import{AnalysesCollection as K}from"../support/AnalysesCollection.js";import{WebSceneTag as X}from"../support/tagSymbols.js";import{BreakpointsOwner as ee}from"./BreakpointsOwner.js";import{DOMContainer as te}from"./DOMContainer.js";import ie from"./GroundView.js";import{PopupView as re}from"./PopupView.js";import se from"./View.js";import ne from"./ViewAnimation.js";import{ViewingMode as ae,stringFromViewingMode as oe,viewingModeFromString as le}from"./ViewingMode.js";import{layerView3DImporter as pe}from"./3d/layerViewModuleImportUtils.js";import he from"./3d/analysis/AnalysisViewManager3D.js";import{cleanupIntersectionUtils as de}from"./3d/camera/intersectionUtils.js";import{Constraints as ce}from"./3d/constraints/Constraints.js";import{EnvironmentManager as ue}from"./3d/environment/EnvironmentManager.js";import ge from"./3d/environment/SceneViewEnvironment.js";import me from"./3d/input/SceneInputManager.js";import{GraphicsDeconflictor as ye}from"./3d/layers/graphics/GraphicsDeconflictor.js";import{Labeler as fe}from"./3d/layers/graphics/Labeler.js";import{FeatureTileTree3D as we}from"./3d/layers/support/FeatureTileTree3D.js";import{cleanupStageLayerElevationProvider as ve}from"./3d/layers/support/StageLayerElevationProvider.js";import _e from"./3d/state/ViewState.js";import{ViewStateManager as be,cleanupViewStateManager as Me}from"./3d/state/ViewStateManager.js";import{cleanupPointToPointAnimationController as Se}from"./3d/state/controllers/PointToPointAnimationController.js";import{SceneIntersectionHelper as Ve}from"./3d/state/helpers/SceneIntersectionHelper.js";import{cleanupNavigationUtils as je}from"./3d/state/utils/navigationUtils.js";import{CombinedElevationProvider as Re}from"./3d/support/CombinedElevationProvider.js";import{debugFlags as Ce}from"./3d/support/debugFlags.js";import Te from"./3d/support/DisplayQualityProfile.js";import{getElevationAtPoint as Oe}from"./3d/support/ElevationProvider.js";import{toMap as xe,hitTest as Ee}from"./3d/support/hitTest.js";import{popupHitTest as Ae}from"./3d/support/popupHitTest.js";import Le from"./3d/support/QualitySettings.js";import{RenderCoordsHelper as He}from"./3d/support/RenderCoordsHelper.js";import{newResourceController as Ie}from"./3d/support/ResourceController.js";import De from"./3d/support/SceneViewPerformanceInfo.js";import{SharedSymbolResources as Ge}from"./3d/support/SharedSymbolResources.js";import{ViewSlice as Pe}from"./3d/support/ViewSlice.js";import{PointsOfInterest as Fe}from"./3d/support/pointsOfInterest/PointsOfInterest.js";import Ue from"./3d/terrain/TerrainSurface.js";import{isSurfaceLayerView as We,getTiledLayerInfo as qe,checkIfTileInfoSupportedForView as ke}from"./3d/terrain/terrainUtils.js";import{cleanupTileRenderer as ze}from"./3d/terrain/TileRenderer.js";import{Stage as Be}from"./3d/webgl-engine/Stage.js";import{olidEnabled as Ne}from"./3d/webgl-engine/effects/geometry/olidUtils.js";import{defaultTolerance as Qe}from"./3d/webgl-engine/lib/Intersector.js";import{cleanupShadowmap as Ye}from"./3d/webgl-engine/lib/ShadowMap.js";import{terrainId as Ze}from"./3d/webgl-engine/lib/verticalOffsetUtils.js";import{cleanupEdgeProcessing as $e}from"./3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js";import{cleanupDrapedUtils as Je}from"./support/drapedUtils.js";import{defaultHighlightName as Ke}from"./support/HighlightDefaults.js";import Xe from"./support/HighlightOptions.js";import{occludeesSupported as et}from"./support/layerViewUtils.js";import{isSupportedScreenPointEvent as tt,createScreenPointFromSupportedEvent as it}from"./support/screenUtils.js";import{isSpatialReferenceSupported as rt}from"./support/spatialReferenceSupport.js";import{initializeTextureCompressionWorker as st,destroyTextureCompressionWorker as nt}from"./support/TextureCompressionHelper.js";import{check as at}from"./support/WebGLRequirements.js";import ot from"./ui/DefaultUI.js";import lt from"./ui/3d/DefaultUI3D.js";import pt from"../webscene/Environment.js";import{clearVNodeCache as ht}from"../widgets/support/vnodeCache.js";let dt=class extends(ee(re(te(se)))){constructor(e){super(e),this._userClippingArea=null,this._clippingArea=null,this._initialDefaultSpatialReference=null,this._overrideDefaultEnvironmentOnly=!0,this._resolveWhenReady=[],this._resourceController=Ie(this),this.deconflictor=new ye({view:this}),this.labeler=new fe({view:this,deconflictor:this.deconflictor.labels}),this.sharedSymbolResources=null,this.analyses=new K,this.basemapTerrain=null,this.elevationProvider=null,this.canvas=null,this.constraints=new ce,this.environment=new ge,this.environmentManager=new ue,this.floors=new r,this.fullOpacity=1,this.graphicsView=null,this.analysisViewManager=new he({view:this}),this.groundView=null,this.map=null,this.screenSizePerspectiveEnabled=!0,this.state=new _e({view:this}),this.slice=new Pe,this.spatialReference=null,this.alphaCompositingEnabled=!1,this.preserveDrawingBufferEnabled=!1,this.supersampleScreenshotsEnabled=!0,this.type="3d",this.ui=new lt,this._numUpdating=0,this._lastUpdateTime=0,this.updatingProgress=.5,this._importControllers=new Map,V();const t=(e=null)=>{null!=e&&e.type===d.MOVE||(this._updatingChanged(),this.map?.allLayers.forEach((async e=>{try{await e.when()}catch(t){}this._updatingChanged()})))};this.addHandles([u((()=>this.map?.allLayers),"after-changes",(e=>t(e)),{onListenerAdd:()=>t(),onListenerRemove:()=>t(),sync:!0}),this.allLayerViews.on("after-changes",(e=>this._updateUpdatingMonitors(e))),g((()=>this.scene),(e=>e?.load().catch((()=>{}))))]),this.inputManager=new me({view:this}),this.stateManager=new be({view:this})}initialize(){if(has("enable-feature:esri-compress-textures")&&has("wasm-simd")){const e=st(this,this.resourceController);this.addResolvingPromise(e.promise)}this.groundView=new ie({view:this}),this._updateUpdatingMonitors(),this.updatingHandles.add((()=>this.qualitySettings.memoryLimit),(e=>{this.resourceController&&(this.resourceController.memoryController.maxMemory=e)}),m),this.updatingHandles.add((()=>this.qualitySettings.additionalCacheMemory),(e=>{this.resourceController&&(this.resourceController.memoryController.additionalCacheMemory=e)}),m),this.updatingHandles.add((()=>this.qualitySettings.frameRate??0),(e=>v(e>0?1e3/Math.ceil(e):0)),m),this.addHandles([g((()=>this.spatialReference),(()=>this.notifyChange("clippingArea")),y),g((()=>({plane:this.slice.plane,isDecoration:this.slice.isDecoration})),(()=>this._updateSlice()),y)])}destroy(){this.destroyed||(nt(this),this.updatingHandles.removeAll(),this.invalidate(),this.activeTool=null,this.layerViewManager.clear(),this._set("analysisViewManager",p(this.analysisViewManager)),this._exitSurface(),this._disposeGraphicsView(),this._disposeFocusAreasView(),this.sharedSymbolResources=p(this.sharedSymbolResources),this._set("labeler",p(this.labeler)),this._set("deconflictor",p(this.deconflictor)),this._resourceController=p(this._resourceController),this._set("stateManager",p(this.stateManager)),this._set("inputManager",p(this.inputManager)),this.state.destroy(),this.highlights.destroy(),this.removeHandles("updatingMonitors"),this._set("environmentManager",p(this.environmentManager)),this._set("environment",p(this.environment)),this.groundView=p(this.groundView),this._exitBasemapTerrain(),this.stage?.destroy(),this.slice.destroy())}get stage(){return this._stage}get renderSpatialReference(){return this.renderCoordsHelper?.spatialReference}get basemapSpatialReference(){return this.basemapTerrain?.spatialReference}get animation(){return this.state?.animation}get camera(){return this.stateManager?.camera}set camera(e){this.stateManager&&(this.stateManager.camera=e)}get contentCamera(){return this.stateManager?.contentCamera}set contentCamera(e){this.stateManager&&(this.stateManager.contentCamera=e)}installContentCameraReset(e={sticky:!1}){return this.stateManager.installContentCameraReset(e)}get center(){return this.stateManager?.center}set center(e){this.stateManager&&(this.stateManager.center=e)}get clippingArea(){if("global"===this.viewingMode)return null;const e=this.map;let t=this._userClippingArea||h(e,"clippingArea");return!this._userClippingArea&&!h(e,"clippingEnabled")||null==t?(this._clippingArea=null,null):t instanceof H?this.spatialReference&&(t=ct(t,this.spatialReference),null==t)?(l.getLogger(this).error("#clippingArea","setting clippingArea with incompatible SpatialReference"),this._clippingArea):(t=t.clone(),null==t.intersection(this._groundAndLayersExtent)&&(t.xmin=t.xmax,t.ymin=t.ymax),t.zmin=void 0,t.zmax=void 0,t.equals(this._clippingArea)||(this._clippingArea=t),this._clippingArea):(l.getLogger(this).error("#clippingArea","only clippingArea geometries of type Extent are supported"),this._clippingArea)}set clippingArea(e){this.ready&&"global"===this.viewingMode&&null!=e?l.getLogger(this).error("#clippingArea=","Clipping area is only supported in local viewingMode"):this._userClippingArea=e}get renderDataExtent(){if(this.state.viewingMode===ae.Global)return null;const e=this.renderSpatialReference,t=this.dataExtent;return null==t||null==e||t.spatialReference.equals(e)?t:ct(t,e)}get tileInfo(){return this.basemapTerrain?.tilingScheme?.toTileInfo()}get dataExtent(){let e=this._groundAndLayersExtent;const t=this.spatialReference||F.WGS84,i=ct(this.clippingArea,t);null!=i&&(e=null!=e?e.intersection(i):i);const r=this._get("dataExtent");return null!=e&&e.equals(r)?r:e}get _groundAndLayersExtent(){const e=this.spatialReference||F.WGS84;let t;const i=i=>{const r=ct(i,e);null!=r&&(null!=t?t.union(r):t=r.clone())},r=this.basemapTerrain;if(r?.spatialReference){const e=r.groundExtent;i(new H({xmin:e[0],ymin:e[1],zmin:0,xmax:e[2],ymax:e[3],zmax:0,spatialReference:r.spatialReference}))}const s=e=>{null==e.fullExtent||"graphics"===e.type&&e.internal||i(e.fullExtent)};if(this.map?.allLayers.forEach((e=>s(e))),null==t)return null;t.hasZ?(t.zmin=Math.min(0,t.zmin??0),t.zmax=Math.max(0,t.zmax??0)):(t.zmin=0,t.zmax=0);const n=this._get("_groundAndLayersExtent");return t.equals(n)?n:t}castEnvironment(e){return e?e instanceof ge?e:e instanceof pt?this.environment?.cloneWithWebsceneEnvironment(e)??ge.fromWebsceneEnvironment(e):T(ge,e):new ge}get extent(){return this.stateManager?.extent}set extent(e){this.stateManager&&(this.stateManager.extent=e)}get screenCenter(){return this.stateManager?.screenCenter}get frustum(){return this.stateManager?.frustum}get initialExtentRequired(){return this.stateManager&&!this.stateManager.hasInitialView}get defaultsFromMapSettings(){return{required:{tileInfo:!1,heightModelInfo:!0,extent:!1}}}get interacting(){return this.navigating||(this.toolViewManager?.interacting??!1)}get stationary(){return!this.animation&&!this.resizing&&(this.state?.stationary??!0)}get navigating(){return this.state?.navigating??!1}get scene(){return this.map&&X in this.map?this.map:null}get padding(){return this.stateManager?.padding}set padding(e){this.stateManager&&(this.stateManager.padding=e)}set qualityProfile(e){Te.isValidProfile(e)&&(Te.apply(e,this.qualitySettings),this.stage?.renderView.updateQualitySettings(this.qualitySettings),this._set("qualityProfile",e))}get qualityProfile(){return this._get("qualityProfile")||Te.getDefaultProfile()}_updateSlice(){null!=this.stage&&(this.stage.renderer.slice=this.slice)}get typeSpecificPreconditionsReady(){return!!this.viewingMode&&!!this.stateManager?.preinit(this.spatialReference)}get resolution(){return null!=this.spatialReference?N(this.scale,this.spatialReference):0}get scale(){return this.stateManager?.scale}set scale(e){this.stateManager&&(this.stateManager.scale=e)}get heightModelInfo(){const e=this.getDefaultHeightModelInfo();return null!=e?I.deriveUnitFromSR(e,this.spatialReference):null}get updating(){if(this.destroying||this.destroyed)return!1;let e=0,t=this.layerViewManager.updating,i=t?this.layerViewManager.updatingRemaining:0;this.allLayerViews.forEach((r=>{if(r.isFulfilled()){if(r.updating){if(t=!0,r.suspended||We(r))return;++i,e+=r.updatingProgress}}else++i}));for(const s of this._updatingObjects)if(null!=s&&s.updating){const t=.1;i+=t,e+=.5*t}for(const s of this._updatingObjectsWithProgress)null!=s&&s.updating&&(++i,e+=s.updatingProgress);const r=!this.stateManager.test.updatingIgnoreRenderState&&this.state.updating;if(t=!!(t||i>0||this.updatingHandles.updating||!this.ready||!this.stationary||r||this._importControllers.size>0||this.inputManager?.updating||this.map?.allLayers?.some((e=>!e.isFulfilled()))),t?(this._numUpdating=Math.max(i,this._numUpdating),e+=this._numUpdating-i):this._numUpdating=0,this._numUpdating>0?e/=this._numUpdating:e=t?0:1,this._get("updatingProgress")!==e){const i=performance.now();if(e<1){const t=Math.min((i-this._lastUpdateTime)/2e3,1);e=this.updatingProgress*(1-t)+e*t}this._set("updatingProgress",e),this._lastUpdateTime=t&&e<1?i:0}return t}get _updatingObjects(){return[this.graphicsView,this.basemapView,this._resourceController,this.stage,this.featureTiles,this.pointsOfInterest,this.environmentManager,this.overlay,this._featureTreeDebugger,this.toolViewManager,this.analysisViewManager]}get _updatingObjectsWithProgress(){return[this.deconflictor,this.labeler,this.basemapTerrain]}get viewingMode(){const e=this._predeterminedViewingMode;if(null!=e)return oe(e);const t=this.spatialReference;return t?null!=this.defaultsFromMap?.viewingMode&&t.equals(this.defaultsFromMap.spatialReference)?oe(this.defaultsFromMap.viewingMode):rt(t,ae.Global)?"global":"local":"global"}set viewingMode(e){this.ready?l.getLogger(this).error("#viewingMode","viewingMode cannot be set once view is ready"):this._overrideIfSome("viewingMode",e)}get viewpoint(){return this.stateManager?.viewpoint}set viewpoint(e){this.stateManager&&(this.stateManager.viewpoint=e)}get visibleArea(){return this.stateManager?.visibleArea}get zoom(){return this.stateManager.zoom}set zoom(e){this.stateManager&&(this.stateManager.zoom=e)}get highlightOptions(){return this.highlights.find((({name:e})=>e===Ke))??new Xe}set highlightOptions(e){for(let t=0;t<this.highlights.length;++t){if(this.highlights.at(t).name===Ke)return void this.highlights.items[t].assignFrom(e)}}get resourceController(){return this._resourceController}get quality(){return this._resourceController?.memoryController?.memoryFactor??1}get resolutionScale(){return Math.sqrt(Math.min(1,this.quality/.75))}get performanceInfo(){return new De(this)}on(e,t,i,r){const s=this.viewEvents.on(e,t,i,r);return s||super.on(e,t)}hasEventListener(e){return super.hasEventListener(e)||this.viewEvents.hasHandler(e)}toMap(e,t){if(!this.ready)return l.getLogger(this).error("#toMap()","Scene view cannot be used before it is ready"),null;const i=tt(e)?it(this,e):e;return xe(this,i,t,this._defaultToMapOptions)}toScreen(e){if(!this.ready)return l.getLogger(this).error("#toScreen()","Scene view cannot be used before it is ready"),null;const t=(null==e.z?Oe(this.elevationProvider,e):null)??0;return q(e,ut,this.renderSpatialReference,t),this.state.camera.projectToScreen(ut,gt),b(gt[0],gt[1])}pixelSizeAt(e,t){if(!this.ready)return l.getLogger(this).error("#pixelSizeAt()","Scene view cannot be used before it is ready"),null;if(!e)return 0;const i=this.renderSpatialReference;q(e,ut,i);const r=this.state.camera.computeScreenPixelSizeAt(ut);return t&&i!==t?r*S(i)/S(t):r}overlayPixelSizeInMapUnits(e){const t=this.basemapTerrain.overlayManager;return t?t.overlayPixelSizeInMapUnits(e,(()=>this.pixelSizeAt(e))):1}hitTest(e,t){if(!this.ready)return l.getLogger(this).error("#hitTest()","Scene view cannot be used before it is ready"),null;const i=tt(e)?it(this,e):e;return Ee(this,i,t,this._defaultHitTestOptions)}async popupHitTest(e){return Ae(this,e)}goTo(e,t){return this.updatingHandles.addPromise(this.stateManager.goTo(e,t))}async whenAnalysisView(e){if(null==e.parent)throw new n("view:no-analysisview-for-analysis","The analysis has not been added to view.analyses",{analysis:e});switch(e.parent.type){case"line-of-sight":case"dimension":case"viewshed":return(await this.whenLayerView(e.parent)).whenAnalysisView();default:return this.analysisViewManager.whenAnalysisView(e)}}whenLayerView(e){return super.whenLayerView(e)}async takeScreenshot(e){const t=await this._completeSettings(e);await this.whenReady();const i=await this.stage.renderView.takeScreenshot(t);return(await import("./support/screenshotUtils.js")).encode(i,t,this._pixelFormat())}async _takeScreenshot(e){const t=await this._completeSettings(e);await this.whenReady();const i=await this.stage.renderView.takeScreenshot(t);return(await import("./support/screenshotUtils.js")).encodeData(i,this._pixelFormat())}async _takeScreenshotWithObjectAndLayerId(e){const t=await this._completeSettings(e);await this.whenReady();const i=await this.stage.renderView.takeScreenshotWithOID(t),{encodeData:r}=await import("./support/screenshotUtils.js");return[r(i[0],this._pixelFormat()),r(i[1],this._pixelFormat())]}async _completeSettings(e){const{toRenderSettings:t,screenshotSuperSampleSettings:i}=await import("./support/screenshotUtils.js"),r=t(e,this);return r.pixelRatio/=this.state.pixelRatio,i(r,this.supersampleScreenshotsEnabled,this.padding)}_pixelFormat(){return{flipY:!0,premultipliedAlpha:this.stage?.renderView.getAlpha()??!1}}get test(){}async takeScreenshotWithObjectAndLayerId(e){if(!Ne())throw new n("360vr:objectAndLayerId-rendering-disabled","has enable-feature:objectAndLayerId-rendering must be true");const{encode:t}=await import("./support/screenshotUtils.js"),i=await this._completeSettings(e);await this.whenReady();const r=await this.stage.renderView.takeScreenshotWithOID(i),s=t(r[0],i,this._pixelFormat()),a=await this._completeSettings(e);a.format="png";return[s,t(r[1],a,this._pixelFormat())]}getColorToObjectAndLayerIdMapping(){const e=this.stage.renderView.olidRenderHelper;if(e)return e.getColorToObjectAndLayerIdMapping();throw new n("360vr:objectAndLayerId-rendering-disabled","has enable-feature:objectAndLayerId-rendering must be true")}addUpdatingPromise(e){return this.updatingHandles.addPromise(e)}importLayerView(e){return pe.importLayerView(e)}hasLayerViewModule(e){return pe.hasLayerViewModule(e)}forceDOMReadyCycle(){this.forceReadyCycle()}getDefaultSpatialReference(){return this.scene?.initialViewProperties?.spatialReference||this.defaultsFromMap?.spatialReference||this.defaultsFromMap?.ready&&this._initialDefaultSpatialReference||null}async validate(){let e=at(this.type);const t=has("safari");if(t&&t<9&&(e=new n("sceneview:browser-not-supported","This browser is not supported by SceneView (Safari < 9)",{type:"safari",requiredVersion:9,detectedVersion:t})),null!=e)throw l.getLogger(this).warn("#validate()",e.message),e}get _predeterminedViewingMode(){const e=this._isOverridden("viewingMode")?this._get("viewingMode"):this.scene?.initialViewProperties?.viewingMode;return null!=e?le(e):null}getSpatialReferenceSupport(e,t){const i=this._predeterminedViewingMode;if(null!=i)return this._validateSpatialReferenceForViewingMode(e,t,i)?{constraints:this._makeSpatialReferenceConstraints(e,t,i)}:null;const r=this._validateSpatialReferenceForViewingMode(e,t,ae.Local),s=this._validateSpatialReferenceForViewingMode(e,t,ae.Global);return r||s?r&&s?{constraints:this._makeSpatialReferenceConstraints(e,t,null)}:r?{constraints:this._makeSpatialReferenceConstraints(e,t,ae.Local)}:{constraints:this._makeSpatialReferenceConstraints(e,t,ae.Global)}:null}_validateSpatialReferenceForViewingMode(e,t,i){return!!rt(e,i)&&(null==t||(!!Q(t)||(!Y(t)||null!=qe(t,e,i))&&(!Z(t)||i!==ae.Global)))}_makeSpatialReferenceConstraints(e,t,i){if(null==t)return[{spatialReference:e,viewingMode:i}];const{isWebMercator:r,isWGS84:s}=e;if(Q(t)&&(r||s)){return!s||i===ae.Local||null===ke(t.tileInfo,t.fullExtent,e,ae.Global)?[{spatialReference:e,viewingMode:i},{spatialReference:F.WebMercator,viewingMode:i}]:[{spatialReference:r?F.WGS84:F.WebMercator,viewingMode:i}]}return Y(t)||Z(t)||!r&&!s?Y(t)&&r&&i!==ae.Global?[{spatialReference:e,viewingMode:i},{spatialReference:F.WGS84,viewingMode:ae.Local}]:[{spatialReference:e,viewingMode:i}]:[{spatialReference:e,viewingMode:i},{spatialReference:r?F.WGS84:F.WebMercator,viewingMode:i}]}_validateSpatialReference(e){const t=null!=this.getSpatialReferenceSupport(e),i=this._predeterminedViewingMode;return t||(null!=i?l.getLogger(this).warnOnce(`Spatial reference defined on view not supported in ${oe(i)} viewing mode.`):e.isGeographic&&l.getLogger(this).warnOnce("Spatial reference is geographic but not supported.")),t}whenReady(){return new Promise((e=>{this.ready?e(this):this._resolveWhenReady.push(e)}))}trackGraphicState(e){if(!e.graphic)return l.getLogger(this).error("trackGraphicState","GraphicState.graphic must not be null or undefined to start tracking"),null;const t=this.getViewForGraphic(e.graphic);let i=null,r=!1;const s=t=>{!r&&null!=t&&"processor"in t&&"graphics-3d"===t.processor?.type&&t.processor.graphicsCore&&(i=t.processor.graphicsCore.trackGraphicState(e))};return null!=t?s(t):this.whenViewForGraphic(e.graphic,{waitForLayer:!0}).then((e=>s(e)),(()=>{})).catch((()=>{})),o((()=>{r=!0,null!=i&&(i.remove(),i=null)}))}maskOccludee(e){if(!e)return l.getLogger(this).error("maskOccludee","GraphicState.graphic must not be null or undefined to mask an occludee"),null;const t=this.getViewForGraphic(e);let i=null,r=!1;const s=t=>{!r&&null!=t&&et(t)&&(i=t.maskOccludee(e))};return null!=t?s(t):this.whenViewForGraphic(e,{waitForLayer:!0}).then((e=>s(e)),(()=>{})).catch((()=>{})),o((()=>{r=!0,null!=i&&(i.remove(),i=null)}))}getViewForGraphic(e){return e.layer===this?this.graphicsView:e.layer?this.allLayerViews.filter((e=>"media-3d"!==e.type)).find((t=>t.layer===e.layer)):null}graphicChanged(e){null!=this.graphicsView&&this.graphicsView.graphicChanged(e)}async whenViewForGraphic(e,t){return e.layer===this?(await f((()=>this.graphicsView)),this.graphicsView):e.layer&&this.map?t&&t.waitForLayer&&!this.map.allLayers.includes(e.layer)?new Promise(((t,i)=>{const r=this.map.allLayers.on("change",(s=>{s.added.includes(e.layer)&&(r.remove(),this.whenLayerView(e.layer).then(t,i))}))})):this.whenLayerView(e.layer):null}async _importModule(e,t){const i=new AbortController;this._importControllers.set(e,i),this._updatingChanged();try{const r=await yt[e]();return t&&(c(i.signal),await t(i.signal)),c(i.signal),this._importControllers.delete(e),r}catch{this._importControllers.delete(e)}return null}_abortImport(e){this._importControllers.get(e)?.abort(),this._importControllers.delete(e),this._updatingChanged()}_initBasemapTerrain(){this._set("basemapTerrain",new Ue({view:this})),this._set("elevationProvider",new Re({view:this})),this.elevationProvider.register("ground",this.basemapTerrain)}_exitBasemapTerrain(){const e=this.basemapTerrain,t=this.elevationProvider;e&&(this._set("basemapTerrain",null),this._set("elevationProvider",null),t.unregister(e),t.destroy(),e.destroy())}_initGlobe(){this._initCoordinateSystem(),this.state.createInitialCamera(),this._initBasemapTerrain(),this._set("pointsOfInterest",new Fe({view:this})),this._set("featureTiles",new we({renderCoordsHelper:this.renderCoordsHelper,cameraOnSurface:this.pointsOfInterest.cameraOnSurface,focus:this.pointsOfInterest.focus,tilingSchemeOwner:this.basemapTerrain,viewState:this.state,scheduler:this._resourceController.scheduler,terrain:this.basemapTerrain}));const e=()=>{const e=this.basemapTerrain?.extent;if(this.clippingArea||e)if(e&&this.basemapTerrain.spatialReference){const e=null!=this.basemapTerrain.extent&&null!=this.basemapTerrain.spatialReference?G(z(this.basemapTerrain.extent,this.basemapTerrain.spatialReference),this.spatialReference):null;this.clippingArea?this.featureTiles.filterExtent=this.clippingArea.intersection(e):this.featureTiles.filterExtent=e}else this.featureTiles.filterExtent=this.clippingArea;else this.featureTiles.filterExtent=null};this.addHandles([this.updatingHandles.add((()=>Ce.FEATURE_TILE_TREE_SHOW_TILES),(e=>{e&&this.featureTiles&&!this._featureTreeDebugger?this.updatingHandles.addPromise(import("./3d/layers/support/FeatureTileTree3DDebugger.js")).then((({FeatureTileTree3DDebugger:e})=>{!this._featureTreeDebugger&&Ce.FEATURE_TILE_TREE_SHOW_TILES&&(this._featureTreeDebugger=new e({view:this}))})):e||!this._featureTreeDebugger||Ce.FEATURE_TILE_TREE_SHOW_TILES||(this._featureTreeDebugger.destroy(),this._featureTreeDebugger=null)}),w),this.updatingHandles.add((()=>this.clippingArea),e,w),this.updatingHandles.add((()=>this.basemapTerrain.extent),e,w)],"feature-tiles"),this.stateManager.init()}_exitGlobe(){this.featureTiles&&(this.stateManager.exit(),this.removeHandles("render-coords-helper"),this.removeHandles("feature-tiles"),this._set("featureTiles",p(this.featureTiles)),this._set("pointsOfInterest",p(this.pointsOfInterest)),this._exitBasemapTerrain(),this.state.reset(),this._exitCoordinateSystem())}_initCoordinateSystem(){if(this.spatialReference){const e=this.spatialReference,t=this.state.isGlobal,i=B(t,e);i!==this.renderSpatialReference&&(this._set("renderCoordsHelper",He.create(this.state.viewingMode,i)),t||this.addHandles(g((()=>this.basemapTerrain?.extent),(e=>{const t=this.renderCoordsHelper.spatialReference;null==e||0===e[0]&&0===e[1]&&0===e[2]&&0===e[3]||!W(e,this.basemapTerrain.spatialReference,mt,t)||(this.renderCoordsHelper.extent=mt)}),y),"render-coords-helper"),this.sceneIntersectionHelper&&this.sceneIntersectionHelper.setTolerance(Qe/this.renderCoordsHelper.unitInMeters))}else this._set("renderCoordsHelper",null)}_exitCoordinateSystem(){this.removeHandles("render-coords-helper"),this._set("renderCoordsHelper",null)}_updatingChanged(){this.notifyChange("updating")}_updateUpdatingMonitors(e=null){null!=e&&e.type===d.MOVE||(this.removeHandles("updatingMonitors"),this.allLayerViews.forEach((e=>{e.destroyed||(this.addHandles(g((()=>[e.updating,e.updatingProgress]),(()=>this._updatingChanged()),y),"updatingMonitors"),e.when((()=>this._updatingChanged()),(()=>this._updatingChanged())))})),this._updatingChanged())}async _prepareScreenshotOverlay(){this.overlay&&await this.overlay.prepare()}_renderScreenshotOverlay(e,t,i){if(!this.overlay||!this.overlay.hasVisibleItems)return i;const r=e.getContext("2d",{willReadFrequently:!0});return r.putImageData(i,0,0),this.overlay.renderCanvas(e,{disableDecorations:t}),r.getImageData(0,0,i.width,i.height)}_initStage(){const e={deactivatedWebGLExtensions:this.deactivatedWebGLExtensions,debugWebGLExtensions:this.debugWebGLExtensions,alpha:this.alphaCompositingEnabled,preserveDrawingBuffer:this.preserveDrawingBufferEnabled,canvas:this.renderCanvas,screenshot:{prepareOverlay:()=>this._prepareScreenshotOverlay(),renderOverlay:(e,t,i)=>this._renderScreenshotOverlay(e,t,i)}},t=new Ve(this.state.viewingMode,(e=>this.stage.layers.forAll(e)),this);this._set("sceneIntersectionHelper",t);const i=s(this.surface);this._stage=new Be({view:this,options:e,container:i}),this._updateSlice(),this.addHandles([this.updatingHandles.add((()=>this.qualitySettings.highQualityTransparency),(e=>this.stage.renderer.setParameters({highQualityTransparency:e})),m),this.on("pointer-move",(()=>this.stage?.renderer.resetAnimation())),a(this.stage.renderView.canvas,"webglcontextlost",(e=>{this.fatalError=new n("webgl-context-lost",e.statusMessage)}))],"stage"),this.renderCoordsHelper&&this.sceneIntersectionHelper.setTolerance(Qe/this.renderCoordsHelper.unitInMeters),this._set("canvas",this.stage.renderView.canvas)}_exitStage(){this._set("sceneIntersectionHelper",null),this._stage=p(this.stage),this.removeHandles("stage"),this._set("canvas",null)}_initSurface(e){this._exitSurface(),this._initStage(),this._initGlobe(),this.sharedSymbolResources=new Ge({view:this,viewingMode:e,resourceController:this._resourceController,pointsOfInterest:this.pointsOfInterest,viewState:this.state})}_exitSurface(){this.sharedSymbolResources&&(this.sharedSymbolResources.objectResourceCache.destroy(),this.sharedSymbolResources.destroy(),this.sharedSymbolResources=null,this._exitGlobe(),this._exitStage())}async _ensureGraphicsView(){if(this.graphicsView||this._importControllers.has("GraphicsView3D")||0===this.graphics.length)return;this.removeHandles("GraphicsView3D");const e=(await this._importModule("GraphicsView3D",(e=>f((()=>this.basemapTerrain?.ready),e))))?.default;e&&this._set("graphicsView",new e({view:this,getGraphics:()=>this.graphics})),this._updatingChanged()}_disposeGraphicsView(){this._abortImport("GraphicsView3D"),this.removeHandles("GraphicsView3D"),this.graphicsView&&(this.removeHandles(this.graphicsView.processor.layer.id),this.graphicsView.destroy(),this._set("graphicsView",null))}_disposeFocusAreasView(){this._abortImport("FocusAreasView"),this.removeHandles("FocusAreasView"),this.focusAreasView=p(this.focusAreasView)}async _ensureFocusAreasView(e){if(this.focusAreasView||this._importControllers.has("FocusAreasView")||0===e)return;this.removeHandles("FocusAreasView");const t=(await this._importModule("FocusAreasView"))?.FocusAreasView;t&&(this.focusAreasView=new t({view:this})),this._updatingChanged()}_startup(){const e=le(this.viewingMode);e===ae.Global&&(this._clippingArea=null),this._initSurface(e),this._set("ready",!0),this.addHandles(u((()=>this.graphics),"after-changes",(()=>this._ensureGraphicsView())),"GraphicsView3D"),this._ensureGraphicsView(),this.addHandles(g((()=>this.map?.focusAreas?.areas.length??0),(e=>this._ensureFocusAreasView(e)),{initial:!0}),"FocusAreasView");const t=this.scene?.initialViewProperties??null,i=t?.environment;i&&(this._overrideDefaultEnvironmentOnly?x(this.environment,i):this.environment=this.environment.cloneWithWebsceneEnvironment(i)),this.timeExtent=t?.timeExtent,t?.analyses.applyTo(this),this.labeler.setup(),this.environmentManager.connectView(this),this.inputManager.connect();const r=this._resolveWhenReady;this._resolveWhenReady=[],r.forEach((e=>e(this)))}_teardown(){this._initialDefaultSpatialReference=null,this.inputManager.disconnect(),this.environmentManager.disconnectView(),this._overrideDefaultEnvironmentOnly=!1,this.labeler.dispose(),this._disposeGraphicsView(),this._disposeFocusAreasView(),this._exitSurface(),this._set("ready",!1)}get _defaultToMapOptions(){const e={include:new Set};if(!this.map)return e;this.map.ground&&e.include.add(Ze);for(const t of this.allLayerViews)$(t.layer.type)&&e.include.add(t.uid);return e}get _defaultHitTestOptions(){const e={exclude:new Set};if(!this.map)return e;this.map.ground&&this.map.ground.opacity<1&&e.exclude.add(Ze);for(const t of this.allLayerViews)$(t.layer.type)&&t.layer.opacity<1&&e.exclude.add(t.uid);return e}static{this.type="3d"}static clearStatics(){ht(),E(),M(),$e(),Me(),de(),ve(),U(),Je(),J(),ze(),Ye(),Se(),je(),_e.cleanupViewstate()}};function ct(e,t){return null!=e&&P(e.spatialReference,t)?G(e,t):null}e([j()],dt.prototype,"_userClippingArea",void 0),e([j()],dt.prototype,"_resourceController",void 0),e([j()],dt.prototype,"_stage",void 0),e([j({readOnly:!0})],dt.prototype,"deconflictor",void 0),e([j({readOnly:!0})],dt.prototype,"labeler",void 0),e([j(L(K,"analyses"))],dt.prototype,"analyses",void 0),e([j({type:ne,readOnly:!0})],dt.prototype,"animation",null),e([j({readOnly:!0})],dt.prototype,"basemapTerrain",void 0),e([j({readOnly:!0})],dt.prototype,"elevationProvider",void 0),e([j()],dt.prototype,"camera",null),e([j({type:t})],dt.prototype,"contentCamera",null),e([j({readOnly:!0})],dt.prototype,"canvas",void 0),e([j({type:D})],dt.prototype,"center",null),e([j({type:H})],dt.prototype,"clippingArea",null),e([j({type:ce})],dt.prototype,"constraints",void 0),e([j({type:H,readOnly:!0})],dt.prototype,"renderDataExtent",null),e([j({readOnly:!0})],dt.prototype,"tileInfo",null),e([j({type:H,readOnly:!0})],dt.prototype,"dataExtent",null),e([j({type:H,readOnly:!0})],dt.prototype,"_groundAndLayersExtent",null),e([j({type:ge})],dt.prototype,"environment",void 0),e([R("environment")],dt.prototype,"castEnvironment",null),e([j({readOnly:!0})],dt.prototype,"environmentManager",void 0),e([j({type:H})],dt.prototype,"extent",null),e([j({type:r})],dt.prototype,"floors",void 0),e([j()],dt.prototype,"screenCenter",null),e([j()],dt.prototype,"frustum",null),e([j({type:Number,readOnly:!0})],dt.prototype,"fullOpacity",void 0),e([j({readOnly:!0})],dt.prototype,"graphicsView",void 0),e([j({readOnly:!0})],dt.prototype,"analysisViewManager",void 0),e([j()],dt.prototype,"groundView",void 0),e([j({type:Boolean})],dt.prototype,"initialExtentRequired",null),e([j()],dt.prototype,"defaultsFromMapSettings",null),e([j()],dt.prototype,"interacting",null),e([j()],dt.prototype,"stationary",null),e([j()],dt.prototype,"navigating",null),e([j()],dt.prototype,"map",void 0),e([j()],dt.prototype,"padding",null),e([j({type:Fe,readOnly:!0})],dt.prototype,"pointsOfInterest",void 0),e([j({type:we,readOnly:!0})],dt.prototype,"featureTiles",void 0),e([j()],dt.prototype,"_featureTreeDebugger",void 0),e([j({type:Boolean})],dt.prototype,"screenSizePerspectiveEnabled",void 0),e([j({constructOnly:!0})],dt.prototype,"deactivatedWebGLExtensions",void 0),e([j({constructOnly:!0})],dt.prototype,"debugWebGLExtensions",void 0),e([j({constructOnly:!0})],dt.prototype,"renderCanvas",void 0),e([j({constructOnly:!0})],dt.prototype,"state",void 0),e([j({readOnly:!0})],dt.prototype,"inputManager",void 0),e([j({readOnly:!0})],dt.prototype,"stateManager",void 0),e([j({type:["low","medium","high"]})],dt.prototype,"qualityProfile",null),e([j({type:Le,get(){let e=this._get("qualitySettings");return e||(e=new Le,Te.apply(this.qualityProfile,e)),e}})],dt.prototype,"qualitySettings",void 0),e([j()],dt.prototype,"slice",void 0),e([j({readOnly:!0})],dt.prototype,"typeSpecificPreconditionsReady",null),e([j({readOnly:!0})],dt.prototype,"renderCoordsHelper",void 0),e([j({readOnly:!0})],dt.prototype,"sceneIntersectionHelper",void 0),e([j({type:Number,dependsOn:["scale","spatialReference"],readOnly:!0})],dt.prototype,"resolution",null),e([j({type:Number})],dt.prototype,"scale",null),e([j()],dt.prototype,"heightModelInfo",null),e([j()],dt.prototype,"spatialReference",void 0),e([j({type:Boolean,constructOnly:!0})],dt.prototype,"alphaCompositingEnabled",void 0),e([j({constructOnly:!0})],dt.prototype,"preserveDrawingBufferEnabled",void 0),e([j({type:Boolean})],dt.prototype,"supersampleScreenshotsEnabled",void 0),e([j({readOnly:!0})],dt.prototype,"type",void 0),e([j(),R((e=>e instanceof ot?e:O(lt,e)))],dt.prototype,"ui",void 0),e([j({type:Boolean,readOnly:!0,dependsOn:["graphicsView.updating","basemapView.updating","basemapTerrain.updating","layerViewManager.updating","layerViewManager.updatingRemaining","_resourceController.updating","stage.updating","featureTiles.updating","pointsOfInterest.updating","environmentManager.updating","overlay.updating","updatingHandles.updating","featureTreeDebugger.updating","labeler.updating","deconflictor.updating","ready","stationary","inputManager.updating","toolViewManager.updating","analysisViewManager.updating","state.updating","textures.updating"]})],dt.prototype,"updating",null),e([j()],dt.prototype,"_updatingObjects",null),e([j()],dt.prototype,"_updatingObjectsWithProgress",null),e([j({type:Number,readOnly:!0,dependsOn:["updating"]})],dt.prototype,"updatingProgress",void 0),e([j({type:["global","local"]})],dt.prototype,"viewingMode",null),e([j({type:i})],dt.prototype,"viewpoint",null),e([j({readOnly:!0})],dt.prototype,"visibleArea",null),e([j({type:Number})],dt.prototype,"zoom",null),e([j({type:Xe})],dt.prototype,"highlightOptions",null),e([j({readOnly:!0})],dt.prototype,"quality",null),e([j({readOnly:!0})],dt.prototype,"resolutionScale",null),e([j()],dt.prototype,"focusAreasView",void 0),e([j()],dt.prototype,"_defaultToMapOptions",null),e([j()],dt.prototype,"_defaultHitTestOptions",null),dt=e([C("esri.views.SceneView")],dt);const ut=A(),gt=_(),mt=k(),yt={GraphicsView3D:()=>import("./3d/layers/GraphicsView3D.js"),FocusAreasView:()=>import("./3d/FocusAreasView.js")},ft=dt;export{ft as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{getMetersPerUnitForSR as e}from"../../core/unitUtils.js";import t from"../../geometry/Extent.js";import{calculateTolerance as n}from"../../renderers/support/clickToleranceUtils.js";function r(n,r,i,a=new t){let s=0;if("2d"===i.type)s=r*(i.resolution??0);else if("3d"===i.type){const t=i.overlayPixelSizeInMapUnits(n),a=i.basemapSpatialReference;s=null==a||a.equals(i.spatialReference)?r*t:e(a)/e(i.spatialReference)}const o=n.x-s,l=n.y-s,c=n.x+s,m=n.y+s,{spatialReference:p}=i;return a.xmin=Math.min(o,c),a.ymin=Math.min(l,m),a.xmax=Math.max(o,c),a.ymax=Math.max(l,m),a.spatialReference=p,a}function i(e,t,i){const s=i.toMap(e);if(null==s)return!1;return r(s,n(),i,a).intersects(t)}const a=new t;export{r as createQueryGeometry,i as intersectsDrapedGeometry};
5
+ import{getMetersPerUnitForSR as e}from"../../core/unitUtils.js";import t from"../../geometry/Extent.js";import{calculateTolerance as n}from"../../renderers/support/clickToleranceUtils.js";function r(n,r,i,a=new t){let o=0;if("2d"===i.type)o=r*(i.resolution??0);else if("3d"===i.type){const t=i.overlayPixelSizeInMapUnits(n),a=i.basemapSpatialReference;o=null==a||a.equals(i.spatialReference)?r*t:e(a)/e(i.spatialReference)}const s=n.x-o,l=n.y-o,c=n.x+o,m=n.y+o,{spatialReference:p}=i;return a.xmin=Math.min(s,c),a.ymin=Math.min(l,m),a.xmax=Math.max(s,c),a.ymax=Math.max(l,m),a.spatialReference=p,a}function i(e,t,i){const o=i.toMap(e);if(null==o)return!1;return r(o,n(),i,a).intersects(t)}let a=new t;function o(){a=new t}export{o as cleanupDrapedUtils,r as createQueryGeometry,i as intersectsDrapedGeometry};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../Graphic.js";import"../../intl.js";import{multiplyOpacity as r,getContrast as s,BrightnessThreshold as i}from"../../core/colorUtils.js";import{destroyMaybe as a}from"../../core/maybe.js";import{watch as n,initial as o}from"../../core/reactiveUtils.js";import{formatDecimal as m,formatImperialArea as l,formatMetricArea as p,formatImperialLength as c,formatMetricLength as u}from"../../core/unitFormatUtils.js";import{convertUnit as h}from"../../core/unitUtils.js";import{property as d}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as v}from"../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as y}from"../../core/support/UpdatingHandles.js";import f from"../../geometry/Point.js";import g from"../../geometry/Polygon.js";import _ from"../../geometry/Polyline.js";import{e as w}from"../../chunks/areaOperator.js";import{e as L,l as b}from"../../chunks/geodeticAreaOperator.js";import{e as j,l as S}from"../../chunks/geodeticDensifyOperator.js";import{e as k,l as A}from"../../chunks/geodeticLengthOperator.js";import{e as G}from"../../chunks/lengthOperator.js";import{e as x}from"../../chunks/simplifyOperator.js";import{isSupported as M,geodesicDensify as q,geodesicLengths as C,geodesicAreas as O}from"../../geometry/support/geodesicUtils.js";import H from"../../layers/GraphicsLayer.js";import R from"../../symbols/Font.js";import U from"../../symbols/SimpleFillSymbol.js";import T from"../../symbols/SimpleLineSymbol.js";import z from"../../symbols/SimpleMarkerSymbol.js";import D from"../../symbols/TextSymbol.js";import{ViewingMode as P}from"../../views/ViewingMode.js";import{SnappingVisualizer2D as E}from"../../views/2d/interactive/SnappingVisualizer2D.js";import V from"../../views/draw/Draw.js";import{createCoordinateHelper as F}from"../../views/interactive/coordinateHelper.js";import{createManipulatorDragEventPipeline as W,screenToMap as I,dragManipulatedObject as B}from"../../views/interactive/dragEventPipeline.js";import{GraphicManipulator as J}from"../../views/interactive/GraphicManipulator.js";import{InteractiveToolBase as K}from"../../views/interactive/InteractiveToolBase.js";import{EditGeometry as N}from"../../views/interactive/editGeometry/EditGeometry.js";import{EditGeometryOperations as Q}from"../../views/interactive/editGeometry/EditGeometryOperations.js";import{SnappingContext as X}from"../../views/interactive/snapping/SnappingContext.js";import{createSnapDragEventPipelineStep as Y}from"../../views/interactive/snapping/SnappingDragPipelineStep.js";import{setupSnappingToggleHandles as Z}from"../../views/interactive/snapping/snappingUtils.js";import{fetchMessageBundle as $}from"../../intl/messages.js";import{onLocaleChange as ee}from"../../intl/locale.js";const te=1e5;let re=class extends K{constructor(e){super(e),this._measurementLayer=new H({internal:!0,listMode:"hide",visible:!1}),this._manipulatorLayer=new H({internal:!0,listMode:"hide",visible:!1}),this._snappingLayer=new H({internal:!0,listMode:"hide",visible:!1}),this._updatingHandles=new y,this._vertices=[],this._drawActive=!1,this.measurement=null,this.measurementLabel=null}initialize(){$("esri/core/t9n/Units").then((e=>{this.messages=e}));const e=this.view;this._draw=new V({view:e}),e.map.addMany([this._measurementLayer,this._manipulatorLayer,this._snappingLayer]),e.focus(),this.addHandles([ee((async()=>{this.messages=await $("esri/core/t9n/Units")})),n((()=>[this.unit,this.messages]),(()=>{this._updateGraphics()}),o),n((()=>[this.view.effectiveTheme.accentColor,this.view.effectiveTheme.textColor]),(()=>{if(!this._vertices.length)return;const e=this._vertices.map((({coord:e})=>e));for(const{handle:t}of this._vertices)t.remove();this._vertices=[],this._measurementLayer.removeAll(),this._manipulatorLayer.removeAll(),this._snappingLayer.removeAll(),this.manipulators.removeAll(),this._updateSketch(e)}))]),Z(this)}destroy(){const{map:e}=this.view;this._draw.view=null,this._draw=a(this._draw),e.removeMany([this._measurementLayer,this._manipulatorLayer,this._snappingLayer]),this._measurementLayer.removeAll(),this._manipulatorLayer.removeAll(),this._snappingLayer.removeAll(),this._set("measurement",null),this._set("measurementLabel",null),this._measurementLayer=a(this._measurementLayer),this._manipulatorLayer=a(this._manipulatorLayer),this._snappingLayer=a(this._snappingLayer),this._updatingHandles=a(this._updatingHandles),this._resetVertices()}get cursor(){return this._drawActive?"crosshair":null}set editable(e){this._set("editable",e),e||this._draw.reset()}get snappingOptions(){return this.snappingManager.options}get updating(){return this._updatingHandles.updating||this.snappingManager.updating}onActivate(){this._drawActive||0!==this._vertices.length||this._startSketch()}onShow(){this._measurementLayer.visible=!0,this._manipulatorLayer.visible=!0,this._snappingLayer.visible=!0}onHide(){this._measurementLayer.visible=!1,this._manipulatorLayer.visible=!1,this._snappingLayer.visible=!1}reset(){this.manipulators.removeAll(),this._resetVertices(),this._measurementLayer.removeAll(),this._manipulatorLayer.removeAll(),this._set("measurement",null),this._set("measurementLabel",null),this._draw.reset(),this._drawActive=!1}_getSnappingContext(e){return new X({elevationInfo:{mode:"on-the-ground",offset:0},pointer:e,editGeometryOperations:new Q(new N("point",F(!1,!1,this.view.spatialReference)),P.Local),visualizer:new E(this._snappingLayer)})}_resetVertices(){for(const{handle:e}of this._vertices)e.remove();this._vertices=[]}_startSketch(){this._drawActive=!0;const{snappingManager:e}=this,t=this._draw.create("polyline",{mode:"click",snappingManager:e});t.on(["vertex-add","vertex-update","vertex-remove","cursor-update","undo","redo"],(e=>this._updateSketch(e.vertices))),t.on("draw-complete",(()=>this._stopSketch()))}_stopSketch(){if(this._vertices.length<3)return this.reset(),void this._startSketch();this.manipulators.forEach((({manipulator:e})=>{e.interactive=!0})),this._drawActive=!1,this.finishToolCreation()}_updateSketch(e){const{spatialReference:t}=this.view;for(;this._vertices.length>e.length;){const{handle:e,manipulator:t}=this._vertices.pop();e.remove(),this.manipulators.remove(t)}for(let r=this._vertices.length;r<e.length;r++){const[s,i]=e[r],a=new f({x:s,y:i,spatialReference:t}),n=se(a,this.view,this._manipulatorLayer);this.manipulators.add(n);const o=Q.fromGeometry(a,P.Local);o.on("vertex-update",(e=>{const t=e.vertices.at(0);t&&(this._vertices[r].coord=[t.pos[0],t.pos[1]],this._updateGraphics())}));const m=W(n,((e,t,r,s)=>{const i=this._getSnappingContext(s),{snappingManager:a}=this,n=this._updatingHandles,{snappingStep:m}=Y({snappingContext:i,snappingManager:a,updatingHandles:n});t.next(I(this.view)).next((t=>{if("start"===t.action){const r=new f(t.mapStart);e.graphic.geometry=r,o.trySetGeometry(r)}return t})).next(...m).next(B({operations:o})).next((()=>{e.graphic.geometry=o.data.geometry}))}));this._vertices.push({manipulator:n,coord:[s,i],handle:m})}if(this._vertices.length){const r=this._vertices.length-1,s=this._vertices[r],[i,a]=e[r];s.coord[0]===i&&s.coord[1]===a||(s.coord=[i,a],s.manipulator.graphic.geometry=new f({x:i,y:a,spatialReference:t}));const n=this._drawActive?this._vertices[r].manipulator:null;this.manipulators.forEach((({manipulator:e})=>{e.interactive=null==n||e!==n}))}this._updateGraphics()}_updateGraphics(){if(this._vertices.length<2)return void this._measurementLayer.removeAll();const e=ie(this._vertices.map((({coord:e})=>e)),this.view.spatialReference);if(!e)return;const{measurement:a,fillGeometry:n,outlineGeometry:o}=e;this._set("measurement",a);const m=a?oe(this.messages,a,this.unit):null;if(this._set("measurementLabel",m),!n&&!o)return;let l,p,c;const{graphics:u}=this._measurementLayer,h=3===u.length,{effectiveTheme:d}=this.view;h?(l=u.at(0),p=u.at(1),c=u.at(2)):(l=new t({symbol:new U({color:r(d.accentColor,.3),outline:null})}),p=new t({symbol:new T({color:d.accentColor,width:2})}),c=new t({symbol:new D({color:d.textColor,font:new R({size:14,family:"sans-serif"}),haloColor:r(s(d.textColor,i.Low),.5),haloSize:2})}),u.removeAll(),u.addMany([l,p,c])),l.geometry=n,p.geometry=o,c.geometry=n?.centroid,c.symbol.text=m?.area??""}};function se(e,s,i){const a=8,n={style:"circle",color:r(s.effectiveTheme.accentColor,.5),outline:{type:"simple-line",width:0}},o=new z({...n,size:a}),m=new z({...n,size:1.5*a}),l=new t({geometry:e,symbol:o});return new J({view:s,layer:i,graphic:l,focusedSymbol:m})}function ie(e,t){if(2===e.length){const r=new _({paths:[e],spatialReference:t});let s;return s=t.isGeographic?M(t)?q(r,te):j(r,te,{unit:"meters"}):t.isWebMercator?j(r,te,{unit:"meters"}):r,{measurement:null,fillGeometry:null,outlineGeometry:s}}e.push(e[0]);const r=new _({paths:[e],spatialReference:t}),s=new g({rings:[e],spatialReference:t});let i,a,n=null,o=null;if(t.isGeographic)if(M(t)){if(n=q(r,te),o=q(s,te),o=x(o),!o)return null;i=C([r],"meters")[0],a=O([o],"square-meters")[0]}else{if(n=j(r,te,{unit:"meters"}),o=j(s,te,{unit:"meters"}),o=x(o),!o)return null;i=k(r,{unit:"meters"}),a=L(o,{unit:"square-meters"})}else if(t.isWebMercator){if(n=j(r,te,{unit:"meters"}),o=j(s,te,{unit:"meters"}),o=x(o),!o)return null;i=k(r,{unit:"meters"}),a=L(o,{unit:"square-meters"})}else{if(n=r,o=x(s),!o)return null;i=G(r,{unit:"meters"}),a=w(o,{unit:"square-meters"})}return{measurement:{geometry:o,area:a,perimeter:i},fillGeometry:o,outlineGeometry:n}}function ae(e){return null!=e}async function ne(e){(e?.isGeographic&&!M(e)||e?.isWebMercator)&&await Promise.all([b(),S(),A()])}function oe(e,t,r){if(!t||!e)return null;const s={area:null,perimeter:null},{area:i,perimeter:a}=t;switch(r){case"metric":s.area=p(e,i,"square-meters");break;case"imperial":s.area=l(e,i,"square-meters");break;default:{const t=h(i,"square-meters",r);s.area=m(e,t,r);break}}const n=me(r);if(n)switch(n){case"metric":s.perimeter=u(e,a,"meters");break;case"imperial":s.perimeter=c(e,a,"meters");break;default:{const t=h(a,"meters",n);s.perimeter=m(e,t,n);break}}else s.perimeter="";return s}function me(e){switch(e){case"metric":case"ares":case"hectares":return"metric";case"imperial":case"acres":return"imperial";case"square-inches":return"inches";case"square-feet":return"feet";case"square-yards":return"yards";case"square-miles":return"miles";case"square-nautical-miles":return"nautical-miles";case"square-us-feet":return"us-feet";case"square-meters":return"meters";case"square-kilometers":return"kilometers";case"square-millimeters":return"millimeters";case"square-centimeters":return"centimeters";case"square-decimeters":return"decimeters";default:return null}}e([d()],re.prototype,"_drawActive",void 0),e([d({readOnly:!0})],re.prototype,"cursor",null),e([d({value:!0})],re.prototype,"editable",null),e([d({readOnly:!0})],re.prototype,"measurement",void 0),e([d({readOnly:!0})],re.prototype,"measurementLabel",void 0),e([d()],re.prototype,"messages",void 0),e([d({constructOnly:!0})],re.prototype,"snappingManager",void 0),e([d()],re.prototype,"unit",void 0),e([d()],re.prototype,"updating",null),e([d({constructOnly:!0})],re.prototype,"view",void 0),re=e([v("esri.widgets.AreaMeasurement2D.AreaMeasurement2DTool")],re);export{re as AreaMeasurement2DTool,ie as createAreaMeasurementInfo2D,oe as createAreaMeasurementLabel,ae as isSupported,ne as loadGeometryOperators};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../Graphic.js";import"../../intl.js";import{multiplyOpacity as r,getContrast as s,BrightnessThreshold as i}from"../../core/colorUtils.js";import{destroyMaybe as a}from"../../core/maybe.js";import{watch as n,initial as o}from"../../core/reactiveUtils.js";import{formatDecimal as m,formatImperialArea as l,formatMetricArea as p,formatImperialLength as c,formatMetricLength as u}from"../../core/unitFormatUtils.js";import{convertUnit as h}from"../../core/unitUtils.js";import{property as d}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as v}from"../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as y}from"../../core/support/UpdatingHandles.js";import f from"../../geometry/Point.js";import g from"../../geometry/Polygon.js";import _ from"../../geometry/Polyline.js";import{e as w}from"../../chunks/areaOperator.js";import{e as L,l as b}from"../../chunks/geodeticAreaOperator.js";import{e as j,l as S}from"../../chunks/geodeticDensifyOperator.js";import{e as k,l as A}from"../../chunks/geodeticLengthOperator.js";import{e as G}from"../../chunks/lengthOperator.js";import{e as x}from"../../chunks/simplifyOperator.js";import{isSupported as M,geodesicDensify as q,geodesicLengths as C,geodesicAreas as O}from"../../geometry/support/geodesicUtils.js";import H from"../../layers/GraphicsLayer.js";import R from"../../symbols/Font.js";import U from"../../symbols/SimpleFillSymbol.js";import T from"../../symbols/SimpleLineSymbol.js";import z from"../../symbols/SimpleMarkerSymbol.js";import D from"../../symbols/TextSymbol.js";import{ViewingMode as P}from"../../views/ViewingMode.js";import{SnappingVisualizer2D as E}from"../../views/2d/interactive/SnappingVisualizer2D.js";import V from"../../views/draw/Draw.js";import{createCoordinateHelper as F}from"../../views/interactive/coordinateHelper.js";import{createManipulatorDragEventPipeline as W,screenToMap as I,dragManipulatedObject as B}from"../../views/interactive/dragEventPipeline.js";import{GraphicManipulator as J}from"../../views/interactive/GraphicManipulator.js";import{InteractiveToolBase as K}from"../../views/interactive/InteractiveToolBase.js";import{EditGeometry as N}from"../../views/interactive/editGeometry/EditGeometry.js";import{EditGeometryOperations as Q}from"../../views/interactive/editGeometry/EditGeometryOperations.js";import{SnappingContext as X}from"../../views/interactive/snapping/SnappingContext.js";import{createSnapDragEventPipelineStep as Y}from"../../views/interactive/snapping/SnappingDragPipelineStep.js";import{setupSnappingToggleHandles as Z}from"../../views/interactive/snapping/snappingUtils.js";import{fetchMessageBundle as $}from"../../intl/messages.js";import{onLocaleChange as ee}from"../../intl/locale.js";const te=1e5;let re=class extends K{constructor(e){super(e),this._measurementLayer=new H({internal:!0,listMode:"hide",visible:!1}),this._manipulatorLayer=new H({internal:!0,listMode:"hide",visible:!1}),this._snappingLayer=new H({internal:!0,listMode:"hide",visible:!1}),this._updatingHandles=new y,this._vertices=[],this._drawActive=!1,this.measurement=null,this.measurementLabel=null}initialize(){$("esri/core/t9n/Units").then((e=>{this.messages=e}));const e=this.view;this._draw=new V({view:e}),e.map.addMany([this._measurementLayer,this._manipulatorLayer,this._snappingLayer]),e.focus(),this.addHandles([ee((async()=>{this.messages=await $("esri/core/t9n/Units")})),n((()=>[this.unit,this.messages]),(()=>{this._updateGraphics()}),o),n((()=>[this.view.effectiveTheme.accentColor,this.view.effectiveTheme.textColor]),(()=>{if(!this._vertices.length)return;const e=this._vertices.map((({coord:e})=>e));for(const{handle:t}of this._vertices)t.remove();this._vertices=[],this._measurementLayer.removeAll(),this._manipulatorLayer.removeAll(),this._snappingLayer.removeAll(),this.manipulators.removeAll(),this._updateSketch(e)}))]),Z(this)}destroy(){const{map:e}=this.view;this._draw.view=null,this._draw=a(this._draw),e.removeMany([this._measurementLayer,this._manipulatorLayer,this._snappingLayer]),this._measurementLayer.removeAll(),this._manipulatorLayer.removeAll(),this._snappingLayer.removeAll(),this._set("measurement",null),this._set("measurementLabel",null),this._measurementLayer=a(this._measurementLayer),this._manipulatorLayer=a(this._manipulatorLayer),this._snappingLayer=a(this._snappingLayer),this._updatingHandles=a(this._updatingHandles),this._resetVertices()}get cursor(){return this._drawActive?"crosshair":null}set editable(e){this._set("editable",e),e||this._draw.reset()}get snappingOptions(){return this.snappingManager.options}get updating(){return this._updatingHandles.updating||this.snappingManager.updating}onActivate(){this._drawActive||0!==this._vertices.length||this._startSketch()}onShow(){this._measurementLayer.visible=!0,this._manipulatorLayer.visible=!0,this._snappingLayer.visible=!0}onHide(){this._measurementLayer.visible=!1,this._manipulatorLayer.visible=!1,this._snappingLayer.visible=!1}reset(){this.manipulators.removeAll(),this._resetVertices(),this._measurementLayer.removeAll(),this._manipulatorLayer.removeAll(),this._set("measurement",null),this._set("measurementLabel",null),this._draw.reset(),this._drawActive=!1}_getSnappingContext(e){return new X({elevationInfo:{mode:"on-the-ground",offset:0},pointer:e,editGeometryOperations:new Q(new N("point",F(!1,!1,this.view.spatialReference)),P.Local),visualizer:new E(this._snappingLayer)})}_resetVertices(){for(const{handle:e}of this._vertices)e.remove();this._vertices=[]}_startSketch(){this._drawActive=!0;const{snappingManager:e}=this;this._draw.create("polyline",{mode:"click",snappingManager:e}).on(["draw-complete","vertex-add","vertex-update","vertex-remove","cursor-update","undo","redo"],(e=>{this._updateSketch(e.vertices),"draw-complete"===e.type&&this._stopSketch()}))}_stopSketch(){if(this._vertices.length<3)return this.reset(),void this._startSketch();this.manipulators.forEach((({manipulator:e})=>{e.interactive=!0})),this._drawActive=!1,this.finishToolCreation()}_updateSketch(e){const{spatialReference:t}=this.view;for(;this._vertices.length>e.length;){const{handle:e,manipulator:t}=this._vertices.pop();e.remove(),this.manipulators.remove(t)}for(let r=this._vertices.length;r<e.length;r++){const[s,i]=e[r],a=new f({x:s,y:i,spatialReference:t}),n=se(a,this.view,this._manipulatorLayer);this.manipulators.add(n);const o=Q.fromGeometry(a,P.Local);o.on("vertex-update",(e=>{const t=e.vertices.at(0);t&&(this._vertices[r].coord=[t.pos[0],t.pos[1]],this._updateGraphics())}));const m=W(n,((e,t,r,s)=>{const i=this._getSnappingContext(s),{snappingManager:a}=this,n=this._updatingHandles,{snappingStep:m}=Y({snappingContext:i,snappingManager:a,updatingHandles:n});t.next(I(this.view)).next((t=>{if("start"===t.action){const r=new f(t.mapStart);e.graphic.geometry=r,o.trySetGeometry(r)}return t})).next(...m).next(B({operations:o})).next((()=>{e.graphic.geometry=o.data.geometry}))}));this._vertices.push({manipulator:n,coord:[s,i],handle:m})}if(this._vertices.length){const r=this._vertices.length-1,s=this._vertices[r],[i,a]=e[r];s.coord[0]===i&&s.coord[1]===a||(s.coord=[i,a],s.manipulator.graphic.geometry=new f({x:i,y:a,spatialReference:t}));const n=this._drawActive?this._vertices[r].manipulator:null;this.manipulators.forEach((({manipulator:e})=>{e.interactive=null==n||e!==n}))}this._updateGraphics()}_updateGraphics(){if(this._vertices.length<2)return void this._measurementLayer.removeAll();const e=ie(this._vertices.map((({coord:e})=>e)),this.view.spatialReference);if(!e)return;const{measurement:a,fillGeometry:n,outlineGeometry:o}=e;this._set("measurement",a);const m=a?oe(this.messages,a,this.unit):null;if(this._set("measurementLabel",m),!n&&!o)return;let l,p,c;const{graphics:u}=this._measurementLayer,h=3===u.length,{effectiveTheme:d}=this.view;h?(l=u.at(0),p=u.at(1),c=u.at(2)):(l=new t({symbol:new U({color:r(d.accentColor,.3),outline:null})}),p=new t({symbol:new T({color:d.accentColor,width:2})}),c=new t({symbol:new D({color:d.textColor,font:new R({size:14,family:"sans-serif"}),haloColor:r(s(d.textColor,i.Low),.5),haloSize:2})}),u.removeAll(),u.addMany([l,p,c])),l.geometry=n,p.geometry=o,c.geometry=n?.centroid,c.symbol.text=m?.area??""}};function se(e,s,i){const a=8,n={style:"circle",color:r(s.effectiveTheme.accentColor,.5),outline:{type:"simple-line",width:0}},o=new z({...n,size:a}),m=new z({...n,size:1.5*a}),l=new t({geometry:e,symbol:o});return new J({view:s,layer:i,graphic:l,focusedSymbol:m})}function ie(e,t){if(2===e.length){const r=new _({paths:[e],spatialReference:t});let s;return s=t.isGeographic?M(t)?q(r,te):j(r,te,{unit:"meters"}):t.isWebMercator?j(r,te,{unit:"meters"}):r,{measurement:null,fillGeometry:null,outlineGeometry:s}}e.push(e[0]);const r=new _({paths:[e],spatialReference:t}),s=new g({rings:[e],spatialReference:t});let i,a,n=null,o=null;if(t.isGeographic)if(M(t)){if(n=q(r,te),o=q(s,te),o=x(o),!o)return null;i=C([r],"meters")[0],a=O([o],"square-meters")[0]}else{if(n=j(r,te,{unit:"meters"}),o=j(s,te,{unit:"meters"}),o=x(o),!o)return null;i=k(r,{unit:"meters"}),a=L(o,{unit:"square-meters"})}else if(t.isWebMercator){if(n=j(r,te,{unit:"meters"}),o=j(s,te,{unit:"meters"}),o=x(o),!o)return null;i=k(r,{unit:"meters"}),a=L(o,{unit:"square-meters"})}else{if(n=r,o=x(s),!o)return null;i=G(r,{unit:"meters"}),a=w(o,{unit:"square-meters"})}return{measurement:{geometry:o,area:a,perimeter:i},fillGeometry:o,outlineGeometry:n}}function ae(e){return null!=e}async function ne(e){(e?.isGeographic&&!M(e)||e?.isWebMercator)&&await Promise.all([b(),S(),A()])}function oe(e,t,r){if(!t||!e)return null;const s={area:null,perimeter:null},{area:i,perimeter:a}=t;switch(r){case"metric":s.area=p(e,i,"square-meters");break;case"imperial":s.area=l(e,i,"square-meters");break;default:{const t=h(i,"square-meters",r);s.area=m(e,t,r);break}}const n=me(r);if(n)switch(n){case"metric":s.perimeter=u(e,a,"meters");break;case"imperial":s.perimeter=c(e,a,"meters");break;default:{const t=h(a,"meters",n);s.perimeter=m(e,t,n);break}}else s.perimeter="";return s}function me(e){switch(e){case"metric":case"ares":case"hectares":return"metric";case"imperial":case"acres":return"imperial";case"square-inches":return"inches";case"square-feet":return"feet";case"square-yards":return"yards";case"square-miles":return"miles";case"square-nautical-miles":return"nautical-miles";case"square-us-feet":return"us-feet";case"square-meters":return"meters";case"square-kilometers":return"kilometers";case"square-millimeters":return"millimeters";case"square-centimeters":return"centimeters";case"square-decimeters":return"decimeters";default:return null}}e([d()],re.prototype,"_drawActive",void 0),e([d({readOnly:!0})],re.prototype,"cursor",null),e([d({value:!0})],re.prototype,"editable",null),e([d({readOnly:!0})],re.prototype,"measurement",void 0),e([d({readOnly:!0})],re.prototype,"measurementLabel",void 0),e([d()],re.prototype,"messages",void 0),e([d({constructOnly:!0})],re.prototype,"snappingManager",void 0),e([d()],re.prototype,"unit",void 0),e([d()],re.prototype,"updating",null),e([d({constructOnly:!0})],re.prototype,"view",void 0),re=e([v("esri.widgets.AreaMeasurement2D.AreaMeasurement2DTool")],re);export{re as AreaMeasurement2DTool,ie as createAreaMeasurementInfo2D,oe as createAreaMeasurementLabel,ae as isSupported,ne as loadGeometryOperators};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../Graphic.js";import"../../intl.js";import{getContrast as i,multiplyOpacity as r,BrightnessThreshold as s}from"../../core/colorUtils.js";import{handlesGroup as o}from"../../core/handleUtils.js";import{destroyMaybe as n}from"../../core/maybe.js";import{watch as a,initial as l}from"../../core/reactiveUtils.js";import{formatDecimal as p,formatImperialLength as m,formatMetricLength as c}from"../../core/unitFormatUtils.js";import{convertUnit as h}from"../../core/unitUtils.js";import{property as u}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as d}from"../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as y}from"../../core/support/UpdatingHandles.js";import v from"../../geometry/Point.js";import g from"../../geometry/Polyline.js";import{e as _,l as f}from"../../chunks/geodeticDensifyOperator.js";import{e as w,l as L}from"../../chunks/geodeticLengthOperator.js";import{e as j}from"../../chunks/lengthOperator.js";import{isSupported as b,geodesicLengths as S,geodesicDensify as M}from"../../geometry/support/geodesicUtils.js";import x from"../../layers/GraphicsLayer.js";import C from"../../symbols/CIMSymbol.js";import A from"../../symbols/Font.js";import k from"../../symbols/SimpleMarkerSymbol.js";import G from"../../symbols/TextSymbol.js";import{ViewingMode as O}from"../../views/ViewingMode.js";import{SnappingVisualizer2D as D}from"../../views/2d/interactive/SnappingVisualizer2D.js";import H from"../../views/draw/Draw.js";import{createCoordinateHelper as P}from"../../views/interactive/coordinateHelper.js";import{createManipulatorDragEventPipeline as R,screenToMap as U,dragManipulatedObject as T}from"../../views/interactive/dragEventPipeline.js";import{GraphicManipulator as E}from"../../views/interactive/GraphicManipulator.js";import{InteractiveToolBase as I}from"../../views/interactive/InteractiveToolBase.js";import{EditGeometry as z}from"../../views/interactive/editGeometry/EditGeometry.js";import{EditGeometryOperations as V}from"../../views/interactive/editGeometry/EditGeometryOperations.js";import{SnappingContext as B}from"../../views/interactive/snapping/SnappingContext.js";import{createSnapDragEventPipelineStep as F}from"../../views/interactive/snapping/SnappingDragPipelineStep.js";import{setupSnappingToggleHandles as W}from"../../views/interactive/snapping/snappingUtils.js";import{fetchMessageBundle as N}from"../../intl/messages.js";import{onLocaleChange as q}from"../../intl/locale.js";const J=1e5;let K=class extends I{constructor(e){super(e),this._measurementLayer=new x({internal:!0,listMode:"hide",visible:!1}),this._manipulatorLayer=new x({internal:!0,listMode:"hide",visible:!1}),this._snappingLayer=new x({internal:!0,listMode:"hide",visible:!1}),this._updatingHandles=new y,this._vertices=[],this._drawActive=!1,this.measurement=null,this.measurementLabel=null}initialize(){N("esri/core/t9n/Units").then((e=>{this.messages=e}));const e=this.view;this._draw=new H({view:e}),e.map.addMany([this._measurementLayer,this._manipulatorLayer,this._snappingLayer]),e.focus(),this.addHandles([q((async()=>{this.messages=await N("esri/core/t9n/Units")})),a((()=>[this.unit,this.messages]),(()=>{this._updatePolylines()}),l),a((()=>[this.view.effectiveTheme.accentColor,this.view.effectiveTheme.textColor]),(()=>{if(!this._vertices.length)return;const e=this._vertices.map((({coord:e})=>e));for(const{handle:t}of this._vertices)t.remove();this._vertices=[],this._measurementLayer.removeAll(),this._manipulatorLayer.removeAll(),this._snappingLayer.removeAll(),this.manipulators.removeAll(),this._updateSketch(e)}))]),W(this)}destroy(){const{map:e}=this.view;this._draw.view=null,this._draw=n(this._draw),e.removeMany([this._measurementLayer,this._manipulatorLayer,this._snappingLayer]),this._measurementLayer.removeAll(),this._manipulatorLayer.removeAll(),this._snappingLayer.removeAll(),this._set("measurement",null),this._set("measurementLabel",null),this._measurementLayer=n(this._measurementLayer),this._manipulatorLayer=n(this._manipulatorLayer),this._snappingLayer=n(this._snappingLayer),this._updatingHandles=n(this._updatingHandles),this._resetVertices()}get cursor(){return this._drawActive?"crosshair":null}set editable(e){this._set("editable",e),e||this._draw.reset()}get snappingOptions(){return this.snappingManager.options}get updating(){return this._updatingHandles.updating||this.snappingManager.updating}onActivate(){this._drawActive||0!==this._vertices.length||this._startSketch()}onShow(){this._measurementLayer.visible=!0,this._manipulatorLayer.visible=!0,this._snappingLayer.visible=!0}onHide(){this._measurementLayer.visible=!1,this._manipulatorLayer.visible=!1,this._snappingLayer.visible=!1}_getSnappingContext(e){return new B({elevationInfo:{mode:"on-the-ground",offset:0},pointer:e,editGeometryOperations:new V(new z("point",P(!1,!1,this.view.spatialReference)),O.Local),visualizer:new D(this._snappingLayer)})}_resetVertices(){for(const{handle:e}of this._vertices)e.remove();this._vertices=[]}_startSketch(){this._drawActive=!0;const{snappingManager:e}=this,t=this._draw.create("polyline",{mode:"click",snappingManager:e});t.on(["vertex-add","vertex-update","vertex-remove","cursor-update","undo","redo"],(e=>this._updateSketch(e.vertices))),t.on("draw-complete",(()=>{this._stopSketch()}))}_stopSketch(){this.manipulators.forEach((({manipulator:e})=>{e.interactive=!0})),this._drawActive=!1,this.finishToolCreation()}_updateSketch(e){const{spatialReference:t}=this.view;for(;this._vertices.length>e.length;){const{handle:e,manipulator:t}=this._vertices.pop();e.remove(),this.manipulators.remove(t)}for(let l=this._vertices.length;l<e.length;l++){const[i,r]=e[l],s=new v({x:i,y:r,spatialReference:t}),n=Q(s,this.view,this._manipulatorLayer);this.manipulators.add(n);const a=V.fromGeometry(s,O.Local),p=[a.on("vertex-update",(e=>{const t=e.vertices.at(0);t&&(this._vertices[l].coord=[t.pos[0],t.pos[1]],this._updatePolylines())})),R(n,((e,t,i,r)=>{const s=this._getSnappingContext(r),{snappingManager:o}=this,n=this._updatingHandles,{snappingStep:l}=F({snappingContext:s,snappingManager:o,updatingHandles:n});t.next(U(this.view)).next((t=>{if("start"===t.action){const i=new v(t.mapStart);e.graphic.geometry=i,a.trySetGeometry(i)}return t})).next(...l).next(T({operations:a})).next((()=>{e.graphic.geometry=a.data.geometry}))}))];this._vertices.push({manipulator:n,coord:[i,r],handle:o(p)})}const i=this._vertices.length-1,r=this._vertices[i],[s,n]=e[i];r.coord[0]===s&&r.coord[1]===n||(r.coord=[s,n],r.manipulator.graphic.geometry=new v({x:s,y:n,spatialReference:t}));const a=this._drawActive?this._vertices[i].manipulator:null;this.manipulators.forEach((({manipulator:e})=>{e.interactive=null==a||e!==a})),this._updatePolylines()}_updatePolylines(){if(this._vertices.length<2)return void this._measurementLayer.removeAll();const e=X(this._vertices.map((({coord:e})=>e)),this.view.spatialReference);if(!e)return;const{measurement:o,drawing:n,original:a}=e;this._set("measurement",o);const l=$(this.messages,o,this.unit);let p,m;this._set("measurementLabel",l);const{graphics:c}=this._measurementLayer,h=2===c.length,{effectiveTheme:u}=this.view;h?(p=c.at(0),m=c.at(1)):(p=new t({symbol:new C({data:{type:"CIMSymbolReference",symbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",effects:[{type:"CIMGeometricEffectDashes",dashTemplate:[14,12],lineDashEnding:"FullGap",controlPointEnding:"NoConstraint"}],enable:!0,capStyle:"Butt",joinStyle:"Round",width:3.5,color:i(u.accentColor).toArray()},{type:"CIMSolidStroke",enable:!0,capStyle:"Butt",joinStyle:"Round",width:5,color:u.accentColor.toArray()}]}}})}),m=new t({symbol:new G({color:u.textColor,haloColor:r(i(u.textColor,s.Low),.5),haloSize:2,font:new A({size:14,family:"sans-serif"})})}),c.removeAll(),c.addMany([p,m])),p.geometry=n,m.geometry=a.extent?.center,m.symbol.text=l}};function Q(e,i,s){const o=r(i.effectiveTheme.accentColor,.5),n={type:"simple-line",width:0},a=8,l=new k({style:"circle",color:o,size:a,outline:n}),p=new k({style:"circle",color:o,size:1.5*a,outline:n}),m=new t({geometry:e,symbol:l});return new E({view:i,layer:s,graphic:m,focusedSymbol:p})}function X(e,t){const i=new g({paths:[e],spatialReference:t});let r,s;return t.isGeographic?b(t)?(r=S([i],"meters")[0],s=M(i,J)):(r=w(i,{unit:"meters"}),s=_(i,J,{unit:"meters"})):t.isWebMercator?(r=w(i,{unit:"meters"}),s=_(i,J,{unit:"meters"})):(r=j(i,{unit:"meters"}),s=i),{measurement:{geometry:s,length:r},original:i,drawing:s}}function Y(e){return null!=e}async function Z(e){(e?.isGeographic&&!b(e)||e?.isWebMercator)&&await Promise.all([f(),L()])}function $(e,t,i){if(!t||!e)return"";switch(i){case"metric":return c(e,t.length,"meters");case"imperial":return m(e,t.length,"meters");default:return p(e,h(t.length,"meters",i),i)}}e([u()],K.prototype,"_drawActive",void 0),e([u({readOnly:!0})],K.prototype,"cursor",null),e([u({value:!0})],K.prototype,"editable",null),e([u({readOnly:!0})],K.prototype,"measurement",void 0),e([u({readOnly:!0})],K.prototype,"measurementLabel",void 0),e([u()],K.prototype,"messages",void 0),e([u({constructOnly:!0})],K.prototype,"snappingManager",void 0),e([u()],K.prototype,"unit",void 0),e([u()],K.prototype,"updating",null),e([u({constructOnly:!0})],K.prototype,"view",void 0),K=e([d("esri.widgets.DistanceMeasurement2D.DistanceMeasurement2DTool")],K);export{K as DistanceMeasurement2DTool,X as createDistanceMeasurementInfo2D,$ as createDistanceMeasurementLabel,Y as isSupported,Z as loadGeometryOperators};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../Graphic.js";import"../../intl.js";import{getContrast as i,multiplyOpacity as r,BrightnessThreshold as s}from"../../core/colorUtils.js";import{handlesGroup as o}from"../../core/handleUtils.js";import{destroyMaybe as n}from"../../core/maybe.js";import{watch as a,initial as l}from"../../core/reactiveUtils.js";import{formatDecimal as p,formatImperialLength as m,formatMetricLength as c}from"../../core/unitFormatUtils.js";import{convertUnit as h}from"../../core/unitUtils.js";import{property as u}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as d}from"../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as y}from"../../core/support/UpdatingHandles.js";import v from"../../geometry/Point.js";import g from"../../geometry/Polyline.js";import{e as _,l as f}from"../../chunks/geodeticDensifyOperator.js";import{e as w,l as L}from"../../chunks/geodeticLengthOperator.js";import{e as j}from"../../chunks/lengthOperator.js";import{isSupported as b,geodesicLengths as S,geodesicDensify as M}from"../../geometry/support/geodesicUtils.js";import x from"../../layers/GraphicsLayer.js";import C from"../../symbols/CIMSymbol.js";import A from"../../symbols/Font.js";import k from"../../symbols/SimpleMarkerSymbol.js";import G from"../../symbols/TextSymbol.js";import{ViewingMode as O}from"../../views/ViewingMode.js";import{SnappingVisualizer2D as D}from"../../views/2d/interactive/SnappingVisualizer2D.js";import H from"../../views/draw/Draw.js";import{createCoordinateHelper as P}from"../../views/interactive/coordinateHelper.js";import{createManipulatorDragEventPipeline as R,screenToMap as U,dragManipulatedObject as T}from"../../views/interactive/dragEventPipeline.js";import{GraphicManipulator as E}from"../../views/interactive/GraphicManipulator.js";import{InteractiveToolBase as I}from"../../views/interactive/InteractiveToolBase.js";import{EditGeometry as z}from"../../views/interactive/editGeometry/EditGeometry.js";import{EditGeometryOperations as V}from"../../views/interactive/editGeometry/EditGeometryOperations.js";import{SnappingContext as B}from"../../views/interactive/snapping/SnappingContext.js";import{createSnapDragEventPipelineStep as F}from"../../views/interactive/snapping/SnappingDragPipelineStep.js";import{setupSnappingToggleHandles as W}from"../../views/interactive/snapping/snappingUtils.js";import{fetchMessageBundle as N}from"../../intl/messages.js";import{onLocaleChange as q}from"../../intl/locale.js";const J=1e5;let K=class extends I{constructor(e){super(e),this._measurementLayer=new x({internal:!0,listMode:"hide",visible:!1}),this._manipulatorLayer=new x({internal:!0,listMode:"hide",visible:!1}),this._snappingLayer=new x({internal:!0,listMode:"hide",visible:!1}),this._updatingHandles=new y,this._vertices=[],this._drawActive=!1,this.measurement=null,this.measurementLabel=null}initialize(){N("esri/core/t9n/Units").then((e=>{this.messages=e}));const e=this.view;this._draw=new H({view:e}),e.map.addMany([this._measurementLayer,this._manipulatorLayer,this._snappingLayer]),e.focus(),this.addHandles([q((async()=>{this.messages=await N("esri/core/t9n/Units")})),a((()=>[this.unit,this.messages]),(()=>{this._updatePolylines()}),l),a((()=>[this.view.effectiveTheme.accentColor,this.view.effectiveTheme.textColor]),(()=>{if(!this._vertices.length)return;const e=this._vertices.map((({coord:e})=>e));for(const{handle:t}of this._vertices)t.remove();this._vertices=[],this._measurementLayer.removeAll(),this._manipulatorLayer.removeAll(),this._snappingLayer.removeAll(),this.manipulators.removeAll(),this._updateSketch(e)}))]),W(this)}destroy(){const{map:e}=this.view;this._draw.view=null,this._draw=n(this._draw),e.removeMany([this._measurementLayer,this._manipulatorLayer,this._snappingLayer]),this._measurementLayer.removeAll(),this._manipulatorLayer.removeAll(),this._snappingLayer.removeAll(),this._set("measurement",null),this._set("measurementLabel",null),this._measurementLayer=n(this._measurementLayer),this._manipulatorLayer=n(this._manipulatorLayer),this._snappingLayer=n(this._snappingLayer),this._updatingHandles=n(this._updatingHandles),this._resetVertices()}get cursor(){return this._drawActive?"crosshair":null}set editable(e){this._set("editable",e),e||this._draw.reset()}get snappingOptions(){return this.snappingManager.options}get updating(){return this._updatingHandles.updating||this.snappingManager.updating}onActivate(){this._drawActive||0!==this._vertices.length||this._startSketch()}onShow(){this._measurementLayer.visible=!0,this._manipulatorLayer.visible=!0,this._snappingLayer.visible=!0}onHide(){this._measurementLayer.visible=!1,this._manipulatorLayer.visible=!1,this._snappingLayer.visible=!1}_getSnappingContext(e){return new B({elevationInfo:{mode:"on-the-ground",offset:0},pointer:e,editGeometryOperations:new V(new z("point",P(!1,!1,this.view.spatialReference)),O.Local),visualizer:new D(this._snappingLayer)})}_resetVertices(){for(const{handle:e}of this._vertices)e.remove();this._vertices=[]}_startSketch(){this._drawActive=!0;const{snappingManager:e}=this;this._draw.create("polyline",{mode:"click",snappingManager:e}).on(["draw-complete","vertex-add","vertex-update","vertex-remove","cursor-update","undo","redo"],(e=>{this._updateSketch(e.vertices),"draw-complete"===e.type&&this._stopSketch()}))}_stopSketch(){this.manipulators.forEach((({manipulator:e})=>{e.interactive=!0})),this._drawActive=!1,this.finishToolCreation()}_updateSketch(e){const{spatialReference:t}=this.view;for(;this._vertices.length>e.length;){const{handle:e,manipulator:t}=this._vertices.pop();e.remove(),this.manipulators.remove(t)}for(let l=this._vertices.length;l<e.length;l++){const[i,r]=e[l],s=new v({x:i,y:r,spatialReference:t}),n=Q(s,this.view,this._manipulatorLayer);this.manipulators.add(n);const a=V.fromGeometry(s,O.Local),p=[a.on("vertex-update",(e=>{const t=e.vertices.at(0);t&&(this._vertices[l].coord=[t.pos[0],t.pos[1]],this._updatePolylines())})),R(n,((e,t,i,r)=>{const s=this._getSnappingContext(r),{snappingManager:o}=this,n=this._updatingHandles,{snappingStep:l}=F({snappingContext:s,snappingManager:o,updatingHandles:n});t.next(U(this.view)).next((t=>{if("start"===t.action){const i=new v(t.mapStart);e.graphic.geometry=i,a.trySetGeometry(i)}return t})).next(...l).next(T({operations:a})).next((()=>{e.graphic.geometry=a.data.geometry}))}))];this._vertices.push({manipulator:n,coord:[i,r],handle:o(p)})}const i=this._vertices.length-1,r=this._vertices[i],[s,n]=e[i];r.coord[0]===s&&r.coord[1]===n||(r.coord=[s,n],r.manipulator.graphic.geometry=new v({x:s,y:n,spatialReference:t}));const a=this._drawActive?this._vertices[i].manipulator:null;this.manipulators.forEach((({manipulator:e})=>{e.interactive=null==a||e!==a})),this._updatePolylines()}_updatePolylines(){if(this._vertices.length<2)return void this._measurementLayer.removeAll();const e=X(this._vertices.map((({coord:e})=>e)),this.view.spatialReference);if(!e)return;const{measurement:o,drawing:n,original:a}=e;this._set("measurement",o);const l=$(this.messages,o,this.unit);let p,m;this._set("measurementLabel",l);const{graphics:c}=this._measurementLayer,h=2===c.length,{effectiveTheme:u}=this.view;h?(p=c.at(0),m=c.at(1)):(p=new t({symbol:new C({data:{type:"CIMSymbolReference",symbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",effects:[{type:"CIMGeometricEffectDashes",dashTemplate:[14,12],lineDashEnding:"FullGap",controlPointEnding:"NoConstraint"}],enable:!0,capStyle:"Butt",joinStyle:"Round",width:3.5,color:i(u.accentColor).toArray()},{type:"CIMSolidStroke",enable:!0,capStyle:"Butt",joinStyle:"Round",width:5,color:u.accentColor.toArray()}]}}})}),m=new t({symbol:new G({color:u.textColor,haloColor:r(i(u.textColor,s.Low),.5),haloSize:2,font:new A({size:14,family:"sans-serif"})})}),c.removeAll(),c.addMany([p,m])),p.geometry=n,m.geometry=a.extent?.center,m.symbol.text=l}};function Q(e,i,s){const o=r(i.effectiveTheme.accentColor,.5),n={type:"simple-line",width:0},a=8,l=new k({style:"circle",color:o,size:a,outline:n}),p=new k({style:"circle",color:o,size:1.5*a,outline:n}),m=new t({geometry:e,symbol:l});return new E({view:i,layer:s,graphic:m,focusedSymbol:p})}function X(e,t){const i=new g({paths:[e],spatialReference:t});let r,s;return t.isGeographic?b(t)?(r=S([i],"meters")[0],s=M(i,J)):(r=w(i,{unit:"meters"}),s=_(i,J,{unit:"meters"})):t.isWebMercator?(r=w(i,{unit:"meters"}),s=_(i,J,{unit:"meters"})):(r=j(i,{unit:"meters"}),s=i),{measurement:{geometry:s,length:r},original:i,drawing:s}}function Y(e){return null!=e}async function Z(e){(e?.isGeographic&&!b(e)||e?.isWebMercator)&&await Promise.all([f(),L()])}function $(e,t,i){if(!t||!e)return"";switch(i){case"metric":return c(e,t.length,"meters");case"imperial":return m(e,t.length,"meters");default:return p(e,h(t.length,"meters",i),i)}}e([u()],K.prototype,"_drawActive",void 0),e([u({readOnly:!0})],K.prototype,"cursor",null),e([u({value:!0})],K.prototype,"editable",null),e([u({readOnly:!0})],K.prototype,"measurement",void 0),e([u({readOnly:!0})],K.prototype,"measurementLabel",void 0),e([u()],K.prototype,"messages",void 0),e([u({constructOnly:!0})],K.prototype,"snappingManager",void 0),e([u()],K.prototype,"unit",void 0),e([u()],K.prototype,"updating",null),e([u({constructOnly:!0})],K.prototype,"view",void 0),K=e([d("esri.widgets.DistanceMeasurement2D.DistanceMeasurement2DTool")],K);export{K as DistanceMeasurement2DTool,X as createDistanceMeasurementInfo2D,$ as createDistanceMeasurementLabel,Y as isSupported,Z as loadGeometryOperators};
package/widgets/Expand.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.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import{watch as t,initial as o}from"../core/reactiveUtils.js";import{property as n}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as s}from"../core/accessorSupport/decorators/subclass.js";import i from"./Widget.js";import l from"./Expand/ExpandViewModel.js";import{loadCalciteComponents as r}from"./support/componentsUtils.js";import{globalCss as a}from"./support/globalCss.js";import{isWidget as p,hasDomNode as c}from"./support/widget.js";import{messageBundle as d}from"./support/decorators/messageBundle.js";import{tsx as h}from"./support/jsxFactory.js";const u="esri-expand",m={base:u,toggle:`${u}__toggle`,popoverContent:`${u}__popover-content`,panel:`${u}__panel`,panelContent:`${u}__panel-content`,sheet:`${u}__sheet`,contentContainer:`${u}__content-container`,icon:"esri-collapse__icon",iconFlip:"esri-collapse__icon-flip",iconNumber:`${u}__icon-number`},g="chevrons-left",_="chevrons-right";let v=class extends i{constructor(e,t){super(e,t),this.closeOnEsc=!0,this.collapseTooltip="",this.content="",this.expandTooltip="",this.focusTrapDisabled=!1,this.iconNumber=0,this.messages=null,this.messagesCommon=null,this.mode="auto",this.placement=null,this.viewModel=new l,this.toggle=()=>{this.viewModel.expanded=!this.viewModel.expanded},this._handlePopoverClose=e=>{e.target===this._popoverEl&&(this.viewModel.expanded=e.currentTarget.open)},this._handleSheetClose=e=>{this.viewModel.expanded=e.currentTarget.open},this._handlePanelClose=e=>{this.viewModel.expanded=!e.currentTarget.closed},this._handleKeyDown=e=>{this.viewModel.expanded&&"Escape"===e.key&&!this._willCloseOnEsc(e)&&e.preventDefault()},this._storeToggleActionEl=e=>{this._toggleActionEl=e},this._storePopoverEl=e=>{this._popoverEl=e}}initialize(){this.addHandles(t((()=>this.viewModel?.view?.size),(()=>this._popoverEl?.reposition()),o))}loadDependencies(){return r({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel"),popover:()=>import("@esri/calcite-components/dist/components/calcite-popover"),sheet:()=>import("@esri/calcite-components/dist/components/calcite-sheet")})}get expandTitle(){const{expanded:e,messagesCommon:t,collapseTooltip:o,expandTooltip:n}=this;return(e?o||t?.collapse:n||t?.expand)??""}get _displaySheet(){switch(this.mode){case"drawer":return!0;case"auto":return"xsmall"===this.viewModel.view?.widthBreakpoint;default:return!1}}get autoCollapse(){return this.viewModel.autoCollapse}set autoCollapse(e){this.viewModel.autoCollapse=e}get collapseIcon(){return _}set collapseIcon(e){this._overrideIfSome("collapseIcon",e)}get expanded(){return this.viewModel.expanded}set expanded(e){this.viewModel.expanded=e}get expandIcon(){return"object"==typeof this.content&&"icon"in this.content&&this.content.icon?this.content.icon:g}set expandIcon(e){this._overrideIfSome("expandIcon",e)}get group(){return this.viewModel.group}set group(e){this.viewModel.group=e}get icon(){return null}get label(){return"object"==typeof this.content&&"label"in this.content&&this.content.label?this.content.label:this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}expand(){this.viewModel.expanded=!0}collapse(){this.viewModel.expanded=!1}render(){const{_displaySheet:e,_toggleActionEl:t,viewModel:{expanded:o},label:n,placement:s}=this;return h("div",{class:this.classes(m.base,a.widget)},this._renderToggle(),e?h("calcite-sheet",{class:m.sheet,heightScale:"l",label:n,onkeydown:this._handleKeyDown,open:o,position:"block-end",onCalciteSheetClose:this._handleSheetClose},h("calcite-panel",{class:m.panel,closable:!0,closed:!o,heading:n,onkeydown:this._handleKeyDown,onCalcitePanelClose:this._handlePanelClose},h("div",{class:m.panelContent},this._renderContent()))):t?h("calcite-popover",{afterCreate:this._storePopoverEl,afterUpdate:this._storePopoverEl,focusTrapDisabled:this.focusTrapDisabled,label:n,onkeydown:this._handleKeyDown,open:o,overlayPositioning:"fixed",placement:s??this._getPlacement(),referenceElement:t,onCalcitePopoverClose:this._handlePopoverClose},h("div",{class:m.popoverContent},this._renderContent())):null)}_getPlacement(){const{container:e,view:t}=this,o=e&&t?t.ui.getPosition(e):null;if(!o||"manual"===o)return"auto";const[n,s]=o.split("-");return`${"right"===s?"left":"right"}-${"bottom"===n?"end":"start"}`}_willCloseOnEsc(e){const{closeOnEsc:t}=this;return"function"==typeof t?t(e):t}_renderBadgeNumber(){const{expanded:e,iconNumber:t}=this;return t&&!e?h("span",{class:m.iconNumber,key:"expand__icon-number"},t):null}_renderToggleButton(){const{expanded:e,expandTitle:t,expandIcon:o,collapseIcon:n}=this,s=e?n:o,i=s===g||s===_;return h("calcite-action",{afterCreate:this._storeToggleActionEl,afterUpdate:this._storeToggleActionEl,class:a.widgetButton,onclick:this.toggle,scale:"s",text:t,title:t},s?h("calcite-icon",{class:this.classes(m.icon,i&&m.iconFlip),icon:s,scale:"s"}):null)}_renderToggle(){return h("div",{class:m.toggle},this._renderToggleButton(),this._renderBadgeNumber())}_renderContent(){const{content:e}=this;return"string"==typeof e?h("div",{class:m.contentContainer,innerHTML:e,key:"content__string"}):p(e)?h("div",{afterCreate:t=>e.container=t,class:m.contentContainer,key:"content__widget"}):e instanceof HTMLElement?h("div",{afterCreate:this._attachToNode,bind:e,class:m.contentContainer,key:"content__html-element"}):c(e)?h("div",{afterCreate:this._attachToNode,bind:e.domNode,class:m.contentContainer,key:"content__node"}):null}_attachToNode(e){const t=this;e.appendChild(t)}};e([n({readOnly:!0})],v.prototype,"expandTitle",null),e([n()],v.prototype,"_toggleActionEl",void 0),e([n()],v.prototype,"_displaySheet",null),e([n()],v.prototype,"autoCollapse",null),e([n()],v.prototype,"closeOnEsc",void 0),e([n()],v.prototype,"collapseIcon",null),e([n()],v.prototype,"collapseTooltip",void 0),e([n()],v.prototype,"content",void 0),e([n()],v.prototype,"expanded",null),e([n()],v.prototype,"expandIcon",null),e([n()],v.prototype,"expandTooltip",void 0),e([n()],v.prototype,"focusTrapDisabled",void 0),e([n()],v.prototype,"group",null),e([n()],v.prototype,"icon",null),e([n()],v.prototype,"iconNumber",void 0),e([n()],v.prototype,"label",null),e([n(),d("esri/widgets/Expand/t9n/Expand")],v.prototype,"messages",void 0),e([n(),d("esri/t9n/common")],v.prototype,"messagesCommon",void 0),e([n()],v.prototype,"mode",void 0),e([n()],v.prototype,"placement",void 0),e([n()],v.prototype,"view",null),e([n({type:l})],v.prototype,"viewModel",void 0),v=e([s("esri.widgets.Expand")],v);const w=v;export{w as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import{makeHandle as t}from"../core/handleUtils.js";import{watch as o,initial as n}from"../core/reactiveUtils.js";import{property as s}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as i}from"../core/accessorSupport/decorators/subclass.js";import l from"./Widget.js";import r from"./Expand/ExpandViewModel.js";import{loadCalciteComponents as a}from"./support/componentsUtils.js";import{globalCss as c}from"./support/globalCss.js";import{isWidget as p,hasDomNode as d}from"./support/widget.js";import{messageBundle as h}from"./support/decorators/messageBundle.js";import{tsx as u}from"./support/jsxFactory.js";const m="esri-expand",g={base:m,toggle:`${m}__toggle`,popoverContent:`${m}__popover-content`,panel:`${m}__panel`,panelContent:`${m}__panel-content`,sheet:`${m}__sheet`,contentContainer:`${m}__content-container`,icon:"esri-collapse__icon",iconFlip:"esri-collapse__icon-flip",iconNumber:`${m}__icon-number`},v="chevrons-left",_="chevrons-right",w=Symbol("scheduleRender-override-handle");let y=class extends l{constructor(e,t){super(e,t),this._boundScheduledRender=this.scheduleRender.bind(this),this.closeOnEsc=!0,this.collapseTooltip="",this.content="",this.expandTooltip="",this.focusTrapDisabled=!1,this.iconNumber=0,this.messages=null,this.messagesCommon=null,this.mode="auto",this.placement=null,this.viewModel=new r,this.toggle=()=>{this.viewModel.expanded=!this.viewModel.expanded},this._handlePopoverClose=e=>{e.target===this._popoverEl&&(this.viewModel.expanded=e.currentTarget.open)},this._handleSheetClose=e=>{this.viewModel.expanded=e.currentTarget.open},this._handlePanelClose=e=>{this.viewModel.expanded=!e.currentTarget.closed},this._handleKeyDown=e=>{this.viewModel.expanded&&"Escape"===e.key&&!this._willCloseOnEsc(e)&&e.preventDefault()},this._storeToggleActionEl=e=>{this._toggleActionEl=e},this._storePopoverEl=e=>{this._popoverEl=e}}initialize(){this.addHandles(o((()=>this.viewModel?.view?.size),(()=>this._popoverEl?.reposition()),n))}loadDependencies(){return a({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel"),popover:()=>import("@esri/calcite-components/dist/components/calcite-popover"),sheet:()=>import("@esri/calcite-components/dist/components/calcite-sheet")})}get expandTitle(){const{expanded:e,messagesCommon:t,collapseTooltip:o,expandTooltip:n}=this;return(e?o||t?.collapse:n||t?.expand)??""}get _displaySheet(){switch(this.mode){case"drawer":return!0;case"auto":return"xsmall"===this.viewModel.view?.widthBreakpoint;default:return!1}}get autoCollapse(){return this.viewModel.autoCollapse}set autoCollapse(e){this.viewModel.autoCollapse=e}get collapseIcon(){return _}set collapseIcon(e){this._overrideIfSome("collapseIcon",e)}get expanded(){return this.viewModel.expanded}set expanded(e){this.viewModel.expanded=e}get expandIcon(){return"object"==typeof this.content&&"icon"in this.content&&this.content.icon?this.content.icon:v}set expandIcon(e){this._overrideIfSome("expandIcon",e)}get group(){return this.viewModel.group}set group(e){this.viewModel.group=e}get icon(){return null}get label(){return"object"==typeof this.content&&"label"in this.content&&this.content.label?this.content.label:this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}expand(){this.viewModel.expanded=!0}collapse(){this.viewModel.expanded=!1}render(){const{_displaySheet:e,_toggleActionEl:t,viewModel:{expanded:o},label:n,placement:s}=this;return u("div",{class:this.classes(g.base,c.widget)},this._renderToggle(),e?u("calcite-sheet",{class:g.sheet,heightScale:"l",label:n,onkeydown:this._handleKeyDown,open:o,position:"block-end",onCalciteSheetClose:this._handleSheetClose},u("calcite-panel",{class:g.panel,closable:!0,closed:!o,heading:n,onkeydown:this._handleKeyDown,onCalcitePanelClose:this._handlePanelClose},u("div",{class:g.panelContent},this._renderContent()))):t?u("calcite-popover",{afterCreate:this._storePopoverEl,afterUpdate:this._storePopoverEl,focusTrapDisabled:this.focusTrapDisabled,label:n,onkeydown:this._handleKeyDown,open:o,overlayPositioning:"fixed",placement:s??this._getPlacement(),referenceElement:t,onCalcitePopoverClose:this._handlePopoverClose},u("div",{class:g.popoverContent},this._renderContent())):null)}_getPlacement(){const{container:e,view:t}=this,o=e&&t?t.ui.getPosition(e):null;if(!o||"manual"===o)return"auto";const[n,s]=o.split("-");return`${"right"===s?"left":"right"}-${"bottom"===n?"end":"start"}`}_willCloseOnEsc(e){const{closeOnEsc:t}=this;return"function"==typeof t?t(e):t}_renderBadgeNumber(){const{expanded:e,iconNumber:t}=this;return t&&!e?u("span",{class:g.iconNumber,key:"expand__icon-number"},t):null}_renderToggleButton(){const{expanded:e,expandTitle:t,expandIcon:o,collapseIcon:n}=this,s=e?n:o,i=s===v||s===_;return u("calcite-action",{afterCreate:this._storeToggleActionEl,afterUpdate:this._storeToggleActionEl,class:c.widgetButton,onclick:this.toggle,scale:"s",text:t,title:t},s?u("calcite-icon",{class:this.classes(g.icon,i&&g.iconFlip),icon:s,scale:"s"}):null)}_renderToggle(){return u("div",{class:g.toggle},this._renderToggleButton(),this._renderBadgeNumber())}_renderContent(){const{content:e}=this;return"string"==typeof e?u("div",{class:g.contentContainer,innerHTML:e,key:"content__string"}):p(e)?u("div",{afterCreate:()=>{this._overwriteChildScheduleRender(e)},afterRemoved:()=>this.removeHandles(w),afterUpdate:()=>{e.scheduleRender!==this._boundScheduledRender&&(this.removeHandles(w),this._overwriteChildScheduleRender(e))},class:g.contentContainer,key:"content__widget"},e.render()):e instanceof HTMLElement?u("div",{afterCreate:this._attachToNode,bind:e,class:g.contentContainer,key:"content__html-element"}):d(e)?u("div",{afterCreate:this._attachToNode,bind:e.domNode,class:g.contentContainer,key:"content__node"}):null}_overwriteChildScheduleRender(e){const o=e.scheduleRender;e.scheduleRender=this._boundScheduledRender,this.addHandles(t((()=>e.scheduleRender=o)),w)}_attachToNode(e){const t=this;e.appendChild(t)}};e([s({readOnly:!0})],y.prototype,"expandTitle",null),e([s()],y.prototype,"_toggleActionEl",void 0),e([s()],y.prototype,"_displaySheet",null),e([s()],y.prototype,"autoCollapse",null),e([s()],y.prototype,"closeOnEsc",void 0),e([s()],y.prototype,"collapseIcon",null),e([s()],y.prototype,"collapseTooltip",void 0),e([s()],y.prototype,"content",void 0),e([s()],y.prototype,"expanded",null),e([s()],y.prototype,"expandIcon",null),e([s()],y.prototype,"expandTooltip",void 0),e([s()],y.prototype,"focusTrapDisabled",void 0),e([s()],y.prototype,"group",null),e([s()],y.prototype,"icon",null),e([s()],y.prototype,"iconNumber",void 0),e([s()],y.prototype,"label",null),e([s(),h("esri/widgets/Expand/t9n/Expand")],y.prototype,"messages",void 0),e([s(),h("esri/t9n/common")],y.prototype,"messagesCommon",void 0),e([s()],y.prototype,"mode",void 0),e([s()],y.prototype,"placement",void 0),e([s()],y.prototype,"view",null),e([s({type:r})],y.prototype,"viewModel",void 0),y=e([i("esri.widgets.Expand")],y);const C=y;export{C as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{pt2px as e}from"../../../../core/screenUtils.js";import{isWidthAndHeight as i}from"./utils.js";import{attachToNode as t}from"../../support/styleUtils.js";import"../../../support/widgetUtils.js";import{tsx as s}from"../../../support/jsxFactory.js";const n="#ddd",o=window.devicePixelRatio,a="esri-spike-ramp",p={spikeRampContainer:`${a}__container`,spikeRampPreviewContainer:`${a}__preview-container`,spikeRampPreview:`${a}__preview`,spikeRampSymbolPreview:`${a}__symbol-preview`,spikeRampLines:`${a}__lines`,spikeRampLabelsContainer:`${a}__labels-container`,spikeRampLabel:`${a}__label`};function r(e){return 5!==e.infos.length?null:s("div",{class:p.spikeRampContainer},s("div",{class:p.spikeRampPreviewContainer},l(e),m(e)),d(e))}function l(e){const[i,n,o]=h(e).map((({preview:e})=>{if(!e)return null;const i=e.cloneNode(!0);return i.classList.add(p.spikeRampSymbolPreview),i}));return i&&n&&o?s("div",{class:p.spikeRampPreview},s("div",{afterCreate:t,bind:o}),s("div",{afterCreate:t,bind:n}),s("div",{afterCreate:t,bind:i})):null}function m(a){const[{width:r,height:l},{width:m},{width:d,height:c}]=h(a).map((({size:t})=>i(t)?{width:e(t.width),height:e(t.height)}:{width:0,height:0})),v=10,b=r+m+d+3*v,u=l,w=document.createElement("canvas");w.width=(b+v)*o,w.height=u*o,w.style.width=w.width/o+"px",w.style.height=w.height/o+"px";const k=w.getContext("2d");k.beginPath();const f=b-(r/2+v),R=0,g=b,_=0;k.moveTo(f*o,R*o),k.lineTo(g*o,_*o);const y=b/2,C=(l-c)/2,L=b,x=(l-c)/2;k.moveTo(y*o,C*o),k.lineTo(L*o,x*o);const P=d/2,$=u-c,j=b,T=u-c;return k.moveTo(P*o,$*o),k.lineTo(j*o,T*o),k.strokeStyle=n,k.lineWidth=.5*o,k.stroke(),s("div",{afterCreate:t,bind:w,class:p.spikeRampLines})}function d(t){const[{label:n,height:o},{label:a},{label:r,height:l}]=h(t).map((({label:t,size:s})=>({label:t,height:i(s)?e(s.height):0}))),m=o-l,d={position:"absolute",top:"0"},c={position:"absolute",top:m/2+"px"},v={position:"absolute",top:`${m}px`};return s("div",{class:p.spikeRampLabelsContainer},s("div",{class:p.spikeRampLabel,styles:d},n),s("div",{class:p.spikeRampLabel,styles:c},a),s("div",{class:p.spikeRampLabel,styles:v},r))}function h(e){return e.infos.filter(((e,i)=>i%2==0))}export{r as renderSpikeRamp};
5
+ import{pt2px as e}from"../../../../core/screenUtils.js";import{isWidthAndHeight as i}from"./utils.js";import{attachToNode as t}from"../../support/styleUtils.js";import"../../../support/widgetUtils.js";import{tsx as s}from"../../../support/jsxFactory.js";const n="#ddd",o=window.devicePixelRatio,a="esri-spike-ramp",p={spikeRampContainer:`${a}__container`,spikeRampPreviewContainer:`${a}__preview-container`,spikeRampPreview:`${a}__preview`,spikeRampSymbolPreview:`${a}__symbol-preview`,spikeRampLines:`${a}__lines`,spikeRampLabelsContainer:`${a}__labels-container`,spikeRampLabel:`${a}__label`};function r(e){return 5!==e.infos.length?null:s("div",{class:p.spikeRampContainer},s("div",{class:p.spikeRampPreviewContainer},l(e),m(e)),d(e))}function l(e){const[i,n,o]=h(e).map((({preview:e})=>{if(!e)return null;const i=e.cloneNode(!0);return i.classList.add(p.spikeRampSymbolPreview),i}));return i&&n&&o?s("div",{class:p.spikeRampPreview},s("div",{afterCreate:t,bind:o}),s("div",{afterCreate:t,bind:n}),s("div",{afterCreate:t,bind:i})):null}function m(a){const[{width:r,height:l},{width:m},{width:d,height:c}]=h(a).map((({size:t})=>i(t)?{width:e(t.width),height:e(t.height)}:{width:0,height:0})),v=10,b=8,u=r+m+d+3*v,w=l,k=document.createElement("canvas");k.width=(u+v)*o,k.height=w*o,k.style.width=k.width/o+"px",k.style.height=k.height/o+"px";const f=k.getContext("2d");f.beginPath();const R=u-(r/2+v),g=0,_=u+b,y=0;f.moveTo(R*o,g*o),f.lineTo(_*o,y*o);const C=(u-b)/2,L=(l-c)/2,x=u+b,P=(l-c)/2;f.moveTo(C*o,L*o),f.lineTo(x*o,P*o);const $=d/2,j=w-c,T=u+b,S=w-c;return f.moveTo($*o,j*o),f.lineTo(T*o,S*o),f.strokeStyle=n,f.lineWidth=.5*o,f.stroke(),s("div",{afterCreate:t,bind:k,class:p.spikeRampLines})}function d(t){const[{label:n,height:o},{label:a},{label:r,height:l}]=h(t).map((({label:t,size:s})=>({label:t,height:i(s)?e(s.height):0}))),m=o-l,d={position:"absolute",top:"0"},c={position:"absolute",top:m/2+"px"},v={position:"absolute",top:`${m}px`};return s("div",{class:p.spikeRampLabelsContainer},s("div",{class:p.spikeRampLabel,styles:d},n),s("div",{class:p.spikeRampLabel,styles:c},a),s("div",{class:p.spikeRampLabel,styles:v},r))}function h(e){return e.infos.filter(((e,i)=>i%2==0))}export{r as renderSpikeRamp};