@arcgis/core 4.27.0-next.20230516 → 4.27.0-next.20230518

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 (194) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/03dba2a2bbc363369a0f.js +1 -0
  3. package/assets/esri/core/workers/chunks/12714d64a0154688072e.js +1 -0
  4. package/assets/esri/core/workers/chunks/{a507135977d83aea4421.js → 1827a3da6b5b9272ffe1.js} +1 -1
  5. package/assets/esri/core/workers/chunks/1edc5c06874cb12c5478.js +1 -0
  6. package/assets/esri/core/workers/chunks/{395ef46b635f9e9a5643.js → 20e8e18e4bd2fd5da47c.js} +1 -1
  7. package/assets/esri/core/workers/chunks/23f73f81aea461c0c6e6.js +1 -0
  8. package/assets/esri/core/workers/chunks/{15dda462b979e90b58fe.js → 3cebdd77a8401495097f.js} +1 -1
  9. package/assets/esri/core/workers/chunks/3eb75b6c3c4b3aea2325.js +1 -0
  10. package/assets/esri/core/workers/chunks/48cb634255e39711a720.js +1 -0
  11. package/assets/esri/core/workers/chunks/4d5f71d84c85f45c97ea.js +1 -0
  12. package/assets/esri/core/workers/chunks/55ca6ba8b40921025181.js +2 -0
  13. package/assets/esri/core/workers/chunks/{ef141014ed21a7fd1ff3.js.LICENSE.txt → 55ca6ba8b40921025181.js.LICENSE.txt} +1 -1
  14. package/assets/esri/core/workers/chunks/6312783626bacf52df7a.js +1 -0
  15. package/assets/esri/core/workers/chunks/{a3822a97701890c12d63.js → 6b3b277a21de7c434717.js} +1 -1
  16. package/assets/esri/core/workers/chunks/6d80f81bf6ad97a7e69e.js +1 -0
  17. package/assets/esri/core/workers/chunks/887a630c5c980c5028e1.js +1 -0
  18. package/assets/esri/core/workers/chunks/{522660da4589739a70c3.js → c7fb48ea5d907883bcce.js} +1 -1
  19. package/assets/esri/core/workers/chunks/d0ff968e42116f592065.js +1 -0
  20. package/assets/esri/core/workers/chunks/{fdf64f23529a22c79fbd.js → d52c920acf08c95277c3.js} +19 -19
  21. package/assets/esri/core/workers/chunks/d64c271c173797d98286.js +1 -0
  22. package/assets/esri/core/workers/chunks/e1b2076d0040fcb7d864.js +1 -0
  23. package/assets/esri/core/workers/chunks/e3397036e060dac3b4d5.js +1 -0
  24. package/assets/esri/core/workers/chunks/e6836c84470fb6bd25bf.js +1 -0
  25. package/assets/esri/core/workers/chunks/f3f6035a17f7dcd19675.js +1 -0
  26. package/assets/esri/core/workers/chunks/{bff317b08e91414f6edc.js → f720967ba8c5486a26a2.js} +1 -1
  27. package/assets/esri/themes/base/widgets/_BasemapGallery.scss +20 -11
  28. package/assets/esri/themes/base/widgets/_Editor.scss +0 -9
  29. package/assets/esri/themes/base/widgets/_FeatureForm.scss +4 -2
  30. package/assets/esri/themes/base/widgets/_ItemList.scss +0 -49
  31. package/assets/esri/themes/base/widgets/_ValuePicker.scss +27 -10
  32. package/assets/esri/themes/dark/main.css +1 -1
  33. package/assets/esri/themes/light/main.css +1 -1
  34. package/assets/esri/themes/light/view.css +1 -1
  35. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ar.json +1 -1
  36. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_bg.json +1 -1
  37. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_bs.json +1 -1
  38. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ca.json +1 -1
  39. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_cs.json +1 -1
  40. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_da.json +1 -1
  41. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_de.json +1 -1
  42. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_el.json +1 -1
  43. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_es.json +1 -1
  44. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_et.json +1 -1
  45. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_fi.json +1 -1
  46. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_fr.json +1 -1
  47. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_he.json +1 -1
  48. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_hr.json +1 -1
  49. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_hu.json +1 -1
  50. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_id.json +1 -1
  51. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_it.json +1 -1
  52. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ja.json +1 -1
  53. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ko.json +1 -1
  54. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_lt.json +1 -1
  55. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_lv.json +1 -1
  56. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_nb.json +1 -1
  57. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_nl.json +1 -1
  58. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_pl.json +1 -1
  59. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_pt-BR.json +1 -1
  60. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_pt-PT.json +1 -1
  61. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ro.json +1 -1
  62. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ru.json +1 -1
  63. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sk.json +1 -1
  64. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sl.json +1 -1
  65. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sr.json +1 -1
  66. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sv.json +1 -1
  67. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_th.json +1 -1
  68. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_tr.json +1 -1
  69. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_uk.json +1 -1
  70. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_vi.json +1 -1
  71. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_zh-CN.json +1 -1
  72. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_zh-HK.json +1 -1
  73. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_zh-TW.json +1 -1
  74. package/chunks/DefaultMaterial.glsl.js +4 -4
  75. package/chunks/HUDMaterial.glsl.js +22 -22
  76. package/chunks/HeatmapDensity.glsl.js +5 -5
  77. package/chunks/LineMarker.glsl.js +35 -35
  78. package/chunks/RibbonLine.glsl.js +47 -47
  79. package/chunks/ShadowCastVisualize.glsl.js +2 -2
  80. package/core/Queue.js +1 -1
  81. package/core/a11yUtils.js +5 -0
  82. package/interfaces.d.ts +769 -25
  83. package/intl/date.js +1 -1
  84. package/layers/ImageryTileLayer.js +1 -1
  85. package/layers/WMSLayer.js +1 -1
  86. package/layers/graphics/data/QueryEngine.js +1 -1
  87. package/layers/graphics/data/attributeSupport.js +1 -1
  88. package/layers/mixins/ArcGISImageService.js +1 -1
  89. package/layers/support/RasterBandInfo.d.ts +4 -0
  90. package/layers/support/RasterSensorInfo.d.ts +4 -0
  91. package/layers/support/infoFor3D.js +1 -1
  92. package/layers/support/rasterDatasets/TIFFRaster.js +1 -1
  93. package/layers/support/rasterFormats/TiffDecoder.js +1 -1
  94. package/layers/support/rasterFunctions/rasterFunctionHelper.js +1 -1
  95. package/package.json +2 -2
  96. package/popup/FieldInfo.js +1 -1
  97. package/popup/support/FieldInfoFormat.js +1 -1
  98. package/portal/schemas/definitions.js +1 -1
  99. package/rest/support/BaseImageMeasureParameters.d.ts +4 -0
  100. package/rest/support/BaseImageMeasureParameters.js +1 -1
  101. package/rest/support/ImageHistogramParameters.js +1 -1
  102. package/rest/support/ImageIdentifyParameters.js +1 -1
  103. package/smartMapping/raster/support/adapters/ImageryLayerAdapter.js +1 -1
  104. package/smartMapping/raster/support/adapters/ImageryTileLayerAdapter.js +1 -1
  105. package/support/revision.js +1 -1
  106. package/views/2d/engine/vectorTiles/GlyphMosaic.js +1 -1
  107. package/views/2d/engine/vectorTiles/GlyphSource.js +1 -1
  108. package/views/2d/engine/vectorTiles/TextShaping.js +1 -1
  109. package/views/2d/engine/vectorTiles/buckets/SymbolBucket.js +1 -1
  110. package/views/2d/engine/webgl/GlyphSource.js +1 -1
  111. package/views/2d/layers/MediaLayerView2D.js +1 -1
  112. package/views/2d/layers/TileLayerView2D.js +1 -1
  113. package/views/2d/layers/support/cimSymbolUtils.js +1 -1
  114. package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
  115. package/views/3d/support/DisplayQualityProfile.js +1 -1
  116. package/views/3d/support/QualitySettings.js +1 -1
  117. package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
  118. package/views/3d/terrain/Overlay.js +1 -1
  119. package/views/3d/terrain/OverlayManager.js +1 -1
  120. package/views/3d/terrain/OverlayRenderer.js +1 -1
  121. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +13 -13
  122. package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +18 -18
  123. package/views/3d/webgl-engine/core/shaderLibrary/shading/MarkerSizing.glsl.js +8 -8
  124. package/views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js +1 -1
  125. package/views/3d/webgl-engine/lib/OffscreenRendering.js +1 -1
  126. package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
  127. package/views/3d/webgl-engine/lib/RenderTargetHelper.js +1 -1
  128. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  129. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  130. package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +1 -1
  131. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  132. package/views/3d/webgl-engine/lib/lodRendering/LodComponentData.js +1 -1
  133. package/views/3d/webgl-engine/materials/DefaultBufferWriter.js +1 -1
  134. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  135. package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
  136. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  137. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  138. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  139. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  140. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  141. package/views/3d/webgl-engine/materials/lineStippleUtils.js +1 -1
  142. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  143. package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
  144. package/views/3d/webgl-engine/shaders/HUDMaterialTechniqueConfiguration.js +1 -1
  145. package/views/3d/webgl-engine/shaders/HeatmapDensity.glsl.js +1 -1
  146. package/views/3d/webgl-engine/shaders/LineCalloutTechniqueConfiguration.js +1 -1
  147. package/views/3d/webgl-engine/shaders/LineMarkerTechniqueConfiguration.js +1 -1
  148. package/views/DOMContainer.js +1 -1
  149. package/views/PopupView.js +1 -1
  150. package/views/draw/DrawOperation.js +1 -1
  151. package/views/webgl/ValidatedTextureDescriptor.js +1 -1
  152. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  153. package/widgets/Editor/CreateWorkflow.js +1 -1
  154. package/widgets/Editor/EditorViewModel.js +1 -1
  155. package/widgets/Editor/UpdateWorkflow.js +1 -1
  156. package/widgets/Editor/Upload.js +1 -1
  157. package/widgets/Editor/Workflow.js +1 -1
  158. package/widgets/Editor/modelUploadUtils.js +1 -1
  159. package/widgets/Editor/workflowUtils.js +1 -1
  160. package/widgets/Editor.js +1 -1
  161. package/widgets/Feature/FeatureMedia.js +1 -1
  162. package/widgets/FeatureForm/InputField.js +5 -0
  163. package/widgets/FeatureForm/InputFieldGroup.js +5 -0
  164. package/widgets/FeatureForm/css.js +1 -1
  165. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  166. package/widgets/FeatureTable.js +1 -1
  167. package/widgets/FeatureTemplates/ItemList.js +1 -1
  168. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  169. package/widgets/Print/PrintViewModel.js +1 -1
  170. package/widgets/Search/SearchViewModel.js +1 -1
  171. package/widgets/ValuePicker/ValuePickerBaseComponent.js +1 -1
  172. package/widgets/ValuePicker/ValuePickerCollection.js +1 -1
  173. package/widgets/ValuePicker/ValuePickerCombobox.js +1 -1
  174. package/widgets/ValuePicker/ValuePickerLabel.js +1 -1
  175. package/widgets/ValuePicker/ValuePickerSlider.js +1 -1
  176. package/widgets/ValuePicker/ValuePickerViewModel.js +1 -1
  177. package/widgets/ValuePicker.js +1 -1
  178. package/assets/esri/core/workers/chunks/009026614cae60e9505c.js +0 -1
  179. package/assets/esri/core/workers/chunks/415c326d268b1a8fd03f.js +0 -1
  180. package/assets/esri/core/workers/chunks/504e929b686570ee858d.js +0 -1
  181. package/assets/esri/core/workers/chunks/5c811527898eb1c04e67.js +0 -1
  182. package/assets/esri/core/workers/chunks/6164a9c654c38f9cb64e.js +0 -1
  183. package/assets/esri/core/workers/chunks/6dd99db0adce09ac9794.js +0 -1
  184. package/assets/esri/core/workers/chunks/7cec069db0598431829e.js +0 -1
  185. package/assets/esri/core/workers/chunks/8bb3b10a777ae19f57f9.js +0 -1
  186. package/assets/esri/core/workers/chunks/91971a76a4ae0474a878.js +0 -1
  187. package/assets/esri/core/workers/chunks/9ed9e2ad50816a4f937a.js +0 -1
  188. package/assets/esri/core/workers/chunks/b3013a5a39d038b2d748.js +0 -1
  189. package/assets/esri/core/workers/chunks/b81bb096ccfcea182cc1.js +0 -1
  190. package/assets/esri/core/workers/chunks/cf3dd5aad1d60ff1b0b6.js +0 -1
  191. package/assets/esri/core/workers/chunks/d05d9ddf244bb3dcbcaa.js +0 -1
  192. package/assets/esri/core/workers/chunks/d3a6504fbaf555707c58.js +0 -1
  193. package/assets/esri/core/workers/chunks/ef141014ed21a7fd1ff3.js +0 -2
  194. package/assets/esri/core/workers/chunks/f4933025edecdc1aae76.js +0 -1
@@ -0,0 +1,4 @@
1
+ import "../../interfaces";
2
+
3
+ import BaseImageMeasureParameters = __esri.BaseImageMeasureParameters;
4
+ export = BaseImageMeasureParameters;
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import"../../geometry.js";import{deprecatedProperty as r}from"../../core/deprecate.js";import{JSONMap as t}from"../../core/jsonMap.js";import{JSONSupport as o}from"../../core/JSONSupport.js";import s from"../../core/Logger.js";import{property as i}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import"../../core/arrayUtils.js";import"../../core/has.js";import{subclass as n}from"../../core/accessorSupport/decorators/subclass.js";import a from"../../layers/support/MosaicRule.js";import p from"../../layers/support/RasterFunction.js";import u from"../../geometry/Point.js";const c=new t({esriMensurationPoint:"point",esriMensurationCentroid:"centroid",esriMensurationDistanceAndAngle:"distance-and-angle",esriMensurationAreaAndPerimeter:"area-and-perimeter",esriMensurationHeightFromBaseAndTop:"base-and-top",esriMensurationHeightFromBaseAndTopShadow:"base-and-top-shadow",esriMensurationHeightFromTopAndTopShadow:"top-and-top-shadow",esriMensurationPoint3D:"point-3D",esriMensurationCentroid3D:"centroid-3D",esriMensurationDistanceAndAngle3D:"distance-and-angle-3D",esriMensurationAreaAndPerimeter3D:"area-and-perimeter-3D"});let d=class extends o{constructor(){super(...arguments),this.type=null,this.measureOperation=null,this.mosaicRule=null,this.rasterFunction=null,this.pixelSize=null,this.raster=void 0}get renderingRule(){return r(s.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._get("rasterFunction")}set renderingRule(e){r(s.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._set("rasterFunction",e)}};e([i()],d.prototype,"type",void 0),e([i({type:c.apiValues,json:{read:c.read,write:c.write}})],d.prototype,"measureOperation",void 0),e([i({type:a,json:{write:!0}})],d.prototype,"mosaicRule",void 0),e([i({type:p})],d.prototype,"renderingRule",null),e([i({type:p,json:{write:!0}})],d.prototype,"rasterFunction",void 0),e([i({type:u,json:{write:!0}})],d.prototype,"pixelSize",void 0),e([i({json:{write:!0}})],d.prototype,"raster",void 0),d=e([n("esri.rest.support.BaseImageMeasureParameters")],d);export{d as BaseImageMeasureParameters,c as measureOperationJSONMap};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import"../../geometry.js";import{deprecatedProperty as r}from"../../core/deprecate.js";import{JSONMap as t}from"../../core/jsonMap.js";import{JSONSupport as o}from"../../core/JSONSupport.js";import s from"../../core/Logger.js";import{property as n}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import"../../core/arrayUtils.js";import"../../core/has.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import a from"../../layers/support/MosaicRule.js";import p from"../../layers/support/RasterFunction.js";import u from"../../geometry/Point.js";const c=new t({esriMensurationPoint:"point",esriMensurationCentroid:"centroid",esriMensurationDistanceAndAngle:"distance-and-angle",esriMensurationAreaAndPerimeter:"area-and-perimeter",esriMensurationHeightFromBaseAndTop:"base-and-top",esriMensurationHeightFromBaseAndTopShadow:"base-and-top-shadow",esriMensurationHeightFromTopAndTopShadow:"top-and-top-shadow",esriMensurationPoint3D:"point-3D",esriMensurationCentroid3D:"centroid-3D",esriMensurationDistanceAndAngle3D:"distance-and-angle-3D",esriMensurationAreaAndPerimeter3D:"area-and-perimeter-3D"});let d=class extends o{constructor(){super(...arguments),this.type=null,this.measureOperation=null,this.mosaicRule=null,this.rasterFunction=null,this.pixelSize=null,this.raster=void 0}get renderingRule(){return r(s.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._get("rasterFunction")}set renderingRule(e){r(s.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._set("rasterFunction",e)}};e([n()],d.prototype,"type",void 0),e([n({type:c.apiValues,json:{read:c.read,write:c.write}})],d.prototype,"measureOperation",void 0),e([n({type:a,json:{write:!0}})],d.prototype,"mosaicRule",void 0),e([n({type:p})],d.prototype,"renderingRule",null),e([n({type:p,json:{write:!0,name:"renderingRule"}})],d.prototype,"rasterFunction",void 0),e([n({type:u,json:{write:!0}})],d.prototype,"pixelSize",void 0),e([n({json:{write:!0}})],d.prototype,"raster",void 0),d=e([i("esri.rest.support.BaseImageMeasureParameters")],d);export{d as BaseImageMeasureParameters,c as measureOperationJSONMap};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import{geometryTypes as r}from"../../geometry.js";import t from"../../TimeExtent.js";import{deprecatedProperty as o}from"../../core/deprecate.js";import{JSONSupport as s}from"../../core/JSONSupport.js";import{clone as i}from"../../core/lang.js";import p from"../../core/Logger.js";import{property as n}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import{subclass as m}from"../../core/accessorSupport/decorators/subclass.js";import{writer as a}from"../../core/accessorSupport/decorators/writer.js";import{getJsonType as c,fromJSON as u}from"../../geometry/support/jsonUtils.js";import l from"../../layers/support/MosaicRule.js";import y from"../../layers/support/RasterFunction.js";import g from"../../geometry/Point.js";var j;let d=j=class extends s{constructor(){super(...arguments),this.geometry=null,this.mosaicRule=null,this.rasterFunction=null,this.pixelSize=null,this.raster=void 0,this.timeExtent=null}writeGeometry(e,r,t){null!=e&&(r.geometryType=c(e),r[t]=e.toJSON())}get renderingRule(){return o(p.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._get("rasterFunction")}set renderingRule(e){o(p.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._set("rasterFunction",e)}clone(){return new j(i({geometry:this.geometry,mosaicRule:this.mosaicRule,rasterFunction:this.rasterFunction,pixelSize:this.pixelSize,raster:this.raster,timeExtent:this.timeExtent}))}};e([n({types:r,json:{read:u}})],d.prototype,"geometry",void 0),e([a("geometry")],d.prototype,"writeGeometry",null),e([n({type:l,json:{write:!0}})],d.prototype,"mosaicRule",void 0),e([n({type:y})],d.prototype,"renderingRule",null),e([n({type:y,json:{write:!0}})],d.prototype,"rasterFunction",void 0),e([n({type:g,json:{write:!0}})],d.prototype,"pixelSize",void 0),e([n({json:{write:!0}})],d.prototype,"raster",void 0),e([n({type:t,json:{read:{source:"time"},write:{target:"time"}}})],d.prototype,"timeExtent",void 0),d=j=e([m("esri.rest.support.ImageHistogramParameters")],d);const h=d;export{h as default};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import{geometryTypes as r}from"../../geometry.js";import t from"../../TimeExtent.js";import{deprecatedProperty as o}from"../../core/deprecate.js";import{JSONSupport as s}from"../../core/JSONSupport.js";import{clone as i}from"../../core/lang.js";import n from"../../core/Logger.js";import{property as p}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import{subclass as m}from"../../core/accessorSupport/decorators/subclass.js";import{writer as a}from"../../core/accessorSupport/decorators/writer.js";import{getJsonType as c,fromJSON as u}from"../../geometry/support/jsonUtils.js";import l from"../../layers/support/MosaicRule.js";import y from"../../layers/support/RasterFunction.js";import g from"../../geometry/Point.js";var j;let d=j=class extends s{constructor(){super(...arguments),this.geometry=null,this.mosaicRule=null,this.rasterFunction=null,this.pixelSize=null,this.raster=void 0,this.timeExtent=null}writeGeometry(e,r,t){null!=e&&(r.geometryType=c(e),r[t]=e.toJSON())}get renderingRule(){return o(n.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._get("rasterFunction")}set renderingRule(e){o(n.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._set("rasterFunction",e)}clone(){return new j(i({geometry:this.geometry,mosaicRule:this.mosaicRule,rasterFunction:this.rasterFunction,pixelSize:this.pixelSize,raster:this.raster,timeExtent:this.timeExtent}))}};e([p({types:r,json:{read:u}})],d.prototype,"geometry",void 0),e([a("geometry")],d.prototype,"writeGeometry",null),e([p({type:l,json:{write:!0}})],d.prototype,"mosaicRule",void 0),e([p({type:y})],d.prototype,"renderingRule",null),e([p({type:y,json:{write:!0,name:"renderingRule"}})],d.prototype,"rasterFunction",void 0),e([p({type:g,json:{write:!0}})],d.prototype,"pixelSize",void 0),e([p({json:{write:!0}})],d.prototype,"raster",void 0),e([p({type:t,json:{read:{source:"time"},write:{target:"time"}}})],d.prototype,"timeExtent",void 0),d=j=e([m("esri.rest.support.ImageHistogramParameters")],d);const h=d;export{h as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../chunks/tslib.es6.js";import e from"../../TimeExtent.js";import{deprecatedProperty as r}from"../../core/deprecate.js";import{JSONSupport as o}from"../../core/JSONSupport.js";import{clone as i}from"../../core/lang.js";import s from"../../core/Logger.js";import{property as n}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import{subclass as u}from"../../core/accessorSupport/decorators/subclass.js";import{writer as l}from"../../core/accessorSupport/decorators/writer.js";import p from"../../geometry/Point.js";import{getJsonType as a}from"../../geometry/support/jsonUtils.js";import m from"../../layers/support/MosaicRule.js";import c from"../../layers/support/RasterFunction.js";var y;let g=y=class extends o{constructor(){super(...arguments),this.geometry=null,this.rasterFunctions=null,this.pixelSize=null,this.returnGeometry=!0,this.returnCatalogItems=!0,this.returnPixelValues=!0,this.maxItemCount=null,this.timeExtent=null,this.raster=void 0,this.viewId=void 0,this.processAsMultidimensional=!1}writeGeometry(t,e,r){null!=t&&(e.geometryType=a(t),e[r]=JSON.stringify(t.toJSON()))}set mosaicRule(t){let e=t;e&&e.mosaicMethod&&(e=m.fromJSON({...e.toJSON(),mosaicMethod:e.mosaicMethod,mosaicOperation:e.mosaicOperation})),this._set("mosaicRule",e)}writeMosaicRule(t,e,r){null!=t&&(e[r]=JSON.stringify(t.toJSON()))}get renderingRule(){return r(s.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._get("rasterFunction")}set renderingRule(t){r(s.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._set("rasterFunction",t)}get renderingRules(){return r(s.getLogger(this),"renderingRules",{replacement:"rasterFunctions",version:"4.27",warnOnce:!0}),this._get("rasterFunctions")}set renderingRules(t){r(s.getLogger(this),"renderingRules",{replacement:"rasterFunctions",version:"4.27",warnOnce:!0}),this._set("rasterFunctions",t)}set rasterFunction(t){let e=t;e&&e.rasterFunction&&(e=c.fromJSON({...e.toJSON(),rasterFunction:e.rasterFunction,rasterFunctionArguments:e.rasterFunctionArguments})),this._set("rasterFunction",e)}writeRasterFunction(t,e,r){null!=t&&(e[r]=JSON.stringify(t.toJSON())),t.rasterFunctionDefinition&&(e[r]=JSON.stringify(t.rasterFunctionDefinition))}writeRasterFunctions(t,e,r){null!=t&&(e[r]=JSON.stringify(t.map((t=>t.rasterFunctionDefinition||t.toJSON()))))}writePixelSize(t,e,r){null!=t&&(e[r]=JSON.stringify(t))}writeTimeExtent(t,e,r){if(null!=t){const o=null!=t.start?t.start.getTime():null,i=null!=t.end?t.end.getTime():null;e[r]=null!=o?null!=i?`${o},${i}`:`${o}`:null}}clone(){return new y(i({geometry:this.geometry,mosaicRule:this.mosaicRule,rasterFunction:this.rasterFunction,rasterFunctions:this.rasterFunctions,pixelSize:this.pixelSize,returnGeometry:this.returnGeometry,returnCatalogItems:this.returnCatalogItems,returnPixelValues:this.returnPixelValues,maxItemCount:this.maxItemCount,processAsMultidimensional:this.processAsMultidimensional,raster:this.raster,viewId:this.viewId,timeExtent:this.timeExtent}))}};t([n({json:{write:!0}})],g.prototype,"geometry",void 0),t([l("geometry")],g.prototype,"writeGeometry",null),t([n({type:m,json:{write:!0}})],g.prototype,"mosaicRule",null),t([l("mosaicRule")],g.prototype,"writeMosaicRule",null),t([n({type:c})],g.prototype,"renderingRule",null),t([n({type:[c]})],g.prototype,"renderingRules",null),t([n({type:c,json:{write:!0}})],g.prototype,"rasterFunction",null),t([l("rasterFunction")],g.prototype,"writeRasterFunction",null),t([n({type:[c],json:{write:!0}})],g.prototype,"rasterFunctions",void 0),t([l("rasterFunctions")],g.prototype,"writeRasterFunctions",null),t([n({type:p,json:{write:!0}})],g.prototype,"pixelSize",void 0),t([l("pixelSize")],g.prototype,"writePixelSize",null),t([n({type:Boolean,json:{write:!0}})],g.prototype,"returnGeometry",void 0),t([n({type:Boolean,json:{write:!0}})],g.prototype,"returnCatalogItems",void 0),t([n({type:Boolean,json:{write:!0}})],g.prototype,"returnPixelValues",void 0),t([n({type:Number,json:{write:!0}})],g.prototype,"maxItemCount",void 0),t([n({type:e,json:{write:{target:"time"}}})],g.prototype,"timeExtent",void 0),t([l("timeExtent")],g.prototype,"writeTimeExtent",null),t([n({json:{write:!0}})],g.prototype,"raster",void 0),t([n({json:{write:!0}})],g.prototype,"viewId",void 0),t([n({type:Boolean,json:{write:!0}})],g.prototype,"processAsMultidimensional",void 0),g=y=t([u("esri.rest.support.ImageIdentifyParameters")],g);const d=g;export{d as default};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../TimeExtent.js";import{deprecatedProperty as r}from"../../core/deprecate.js";import{JSONSupport as o}from"../../core/JSONSupport.js";import{clone as i}from"../../core/lang.js";import n from"../../core/Logger.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import{subclass as u}from"../../core/accessorSupport/decorators/subclass.js";import{writer as l}from"../../core/accessorSupport/decorators/writer.js";import a from"../../geometry/Point.js";import{getJsonType as p}from"../../geometry/support/jsonUtils.js";import m from"../../layers/support/MosaicRule.js";import c from"../../layers/support/RasterFunction.js";var y;let g=y=class extends o{constructor(){super(...arguments),this.geometry=null,this.rasterFunctions=null,this.pixelSize=null,this.returnGeometry=!0,this.returnCatalogItems=!0,this.returnPixelValues=!0,this.maxItemCount=null,this.timeExtent=null,this.raster=void 0,this.viewId=void 0,this.processAsMultidimensional=!1}writeGeometry(e,t,r){null!=e&&(t.geometryType=p(e),t[r]=JSON.stringify(e.toJSON()))}set mosaicRule(e){let t=e;t&&t.mosaicMethod&&(t=m.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}writeMosaicRule(e,t,r){null!=e&&(t[r]=JSON.stringify(e.toJSON()))}get renderingRule(){return r(n.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._get("rasterFunction")}set renderingRule(e){r(n.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._set("rasterFunction",e)}get renderingRules(){return r(n.getLogger(this),"renderingRules",{replacement:"rasterFunctions",version:"4.27",warnOnce:!0}),this._get("rasterFunctions")}set renderingRules(e){r(n.getLogger(this),"renderingRules",{replacement:"rasterFunctions",version:"4.27",warnOnce:!0}),this._set("rasterFunctions",e)}set rasterFunction(e){let t=e;t&&t.rasterFunction&&(t=c.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("rasterFunction",t)}writeRasterFunction(e,t,r){null!=e&&(t[r]=JSON.stringify(e.toJSON())),e.rasterFunctionDefinition&&(t[r]=JSON.stringify(e.rasterFunctionDefinition))}writeRasterFunctions(e,t,r){null!=e&&(t[r]=JSON.stringify(e.map((e=>e.rasterFunctionDefinition||e.toJSON()))))}writePixelSize(e,t,r){null!=e&&(t[r]=JSON.stringify(e))}writeTimeExtent(e,t,r){if(null!=e){const o=null!=e.start?e.start.getTime():null,i=null!=e.end?e.end.getTime():null;t[r]=null!=o?null!=i?`${o},${i}`:`${o}`:null}}clone(){return new y(i({geometry:this.geometry,mosaicRule:this.mosaicRule,rasterFunction:this.rasterFunction,rasterFunctions:this.rasterFunctions,pixelSize:this.pixelSize,returnGeometry:this.returnGeometry,returnCatalogItems:this.returnCatalogItems,returnPixelValues:this.returnPixelValues,maxItemCount:this.maxItemCount,processAsMultidimensional:this.processAsMultidimensional,raster:this.raster,viewId:this.viewId,timeExtent:this.timeExtent}))}};e([s({json:{write:!0}})],g.prototype,"geometry",void 0),e([l("geometry")],g.prototype,"writeGeometry",null),e([s({type:m,json:{write:!0}})],g.prototype,"mosaicRule",null),e([l("mosaicRule")],g.prototype,"writeMosaicRule",null),e([s({type:c})],g.prototype,"renderingRule",null),e([s({type:[c]})],g.prototype,"renderingRules",null),e([s({type:c,json:{write:!0,name:"renderingRule"}})],g.prototype,"rasterFunction",null),e([l("rasterFunction")],g.prototype,"writeRasterFunction",null),e([s({type:[c],json:{write:!0,name:"renderingRules"}})],g.prototype,"rasterFunctions",void 0),e([l("rasterFunctions")],g.prototype,"writeRasterFunctions",null),e([s({type:a,json:{write:!0}})],g.prototype,"pixelSize",void 0),e([l("pixelSize")],g.prototype,"writePixelSize",null),e([s({type:Boolean,json:{write:!0}})],g.prototype,"returnGeometry",void 0),e([s({type:Boolean,json:{write:!0}})],g.prototype,"returnCatalogItems",void 0),e([s({type:Boolean,json:{write:!0}})],g.prototype,"returnPixelValues",void 0),e([s({type:Number,json:{write:!0}})],g.prototype,"maxItemCount",void 0),e([s({type:t,json:{write:{target:"time"}}})],g.prototype,"timeExtent",void 0),e([l("timeExtent")],g.prototype,"writeTimeExtent",null),e([s({json:{write:!0}})],g.prototype,"raster",void 0),e([s({json:{write:!0}})],g.prototype,"viewId",void 0),e([s({type:Boolean,json:{write:!0}})],g.prototype,"processAsMultidimensional",void 0),g=y=e([u("esri.rest.support.ImageIdentifyParameters")],g);const d=g;export{d as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../../../chunks/tslib.es6.js";import"../../../../geometry.js";import{property as s}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{subclass as e}from"../../../../core/accessorSupport/decorators/subclass.js";import{estimateStatisticsFromHistograms as r}from"../../../../layers/support/rasterFunctions/stretchUtils.js";import a from"../../../../rest/support/ImageHistogramParameters.js";import i from"./RasterLayerAdapter.js";import o from"../../../../geometry/Point.js";let n=class extends i{constructor(){super(...arguments),this._cacheSize=20,this._statsCache=new Map}generateRasterInfo(t){const s=t?.rasterFunction;return this.layer.generateRasterInfo(s,{signal:t?.signal})}async estimateStatisticsHistograms(t){const s=t?.rasterFunction?.functionName??"default";if(this._statsCache.has(s))return this._statsCache.get(s);let{width:e,height:i,pixelSize:n}=this.layer.rasterInfo,c=1;for(;e>2e3||i>2e3;)e/=2,i/=2,c*=2;const p=t?.rasterFunction??this.layer.rasterFunction,{fullExtent:l,mosaicRule:h}=this.layer;n=new o(n.x*c,n.y*c,l.spatialReference);const m=new a({geometry:l,pixelSize:n,renderingRule:p,mosaicRule:h});let u;if(this.layer.capabilities.operations.supportsComputeStatisticsHistograms)u=await this.layer.computeStatisticsHistograms(m,t);else{const{histograms:s}=await this.layer.computeHistograms(m,t);u={statistics:r(s),histograms:s}}if(this._statsCache.set(s,u),this._statsCache.size>this._cacheSize){const t=this._statsCache.keys().next().value;this._statsCache.delete(t)}return u}supportsMultidirectionalHillshade(){return this.layer.version>=10.81}load(t){return this.addResolvingPromise(this.layer.load(t).then((()=>{this.generateRasterInfo({rasterFunction:this.rasterFunction,signal:t?.signal}).then((t=>this.rasterInfo=t))}))),Promise.resolve(this)}};t([s()],n.prototype,"layer",void 0),n=t([e("esri.smartMapping.support.adapters.ImageryLayerAdapter")],n);const c=n;export{c as default};
5
+ import{_ as t}from"../../../../chunks/tslib.es6.js";import"../../../../geometry.js";import{property as s}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{subclass as e}from"../../../../core/accessorSupport/decorators/subclass.js";import{estimateStatisticsFromHistograms as r}from"../../../../layers/support/rasterFunctions/stretchUtils.js";import a from"../../../../rest/support/ImageHistogramParameters.js";import i from"./RasterLayerAdapter.js";import o from"../../../../geometry/Point.js";let n=class extends i{constructor(){super(...arguments),this._cacheSize=20,this._statsCache=new Map}generateRasterInfo(t){const s=t?.rasterFunction;try{return this.layer.generateRasterInfo(s,{signal:t?.signal})}catch{return Promise.resolve(this.layer.serviceRasterInfo)}}async estimateStatisticsHistograms(t){const s=t?.rasterFunction?.functionName??"default";if(this._statsCache.has(s))return this._statsCache.get(s);let{width:e,height:i,pixelSize:n}=this.layer.rasterInfo,c=1;for(;e>2e3||i>2e3;)e/=2,i/=2,c*=2;const p=t?.rasterFunction??this.layer.rasterFunction,{fullExtent:l,mosaicRule:h}=this.layer;n=new o(n.x*c,n.y*c,l.spatialReference);const m=new a({geometry:l,pixelSize:n,renderingRule:p,mosaicRule:h});let u;if(this.layer.capabilities.operations.supportsComputeStatisticsHistograms)u=await this.layer.computeStatisticsHistograms(m,t);else{const{histograms:s}=await this.layer.computeHistograms(m,t);u={statistics:r(s),histograms:s}}if(this._statsCache.set(s,u),this._statsCache.size>this._cacheSize){const t=this._statsCache.keys().next().value;this._statsCache.delete(t)}return u}supportsMultidirectionalHillshade(){return this.layer.version>=10.81}load(t){return this.addResolvingPromise(this.layer.load(t).then((()=>{this.generateRasterInfo({rasterFunction:this.rasterFunction,signal:t?.signal}).then((t=>this.rasterInfo=t))}))),Promise.resolve(this)}};t([s()],n.prototype,"layer",void 0),n=t([e("esri.smartMapping.support.adapters.ImageryLayerAdapter")],n);const c=n;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.27/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../../../chunks/tslib.es6.js";import r from"../../../../core/Error.js";import{property as e}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import a from"../../../../geometry/Extent.js";import{estimateStatisticsHistograms as o}from"../../../../layers/support/rasterFunctions/stretchUtils.js";import i from"./RasterLayerAdapter.js";let n=class extends i{async generateRasterInfo(t){const{layer:r}=this;if("imagery-tile"===r.type){return await r.generateRasterInfo(r.rasterFunction,{signal:t?.signal})??r.rasterInfo}return this.rasterInfo}async estimateStatisticsHistograms(t){if(null!==this._statsCache)return this._statsCache;const{raster:e}=this.layer,{extent:s,width:a,height:i}=this._getSamplePixelBlockDescriptor(e.rasterInfo),{pixelBlock:n}=await e.fetchPixels(s,a,i,t);if(null==n)throw new r("raster-layer-adapter","Unable to estimate histograms");return this._statsCache=o(n),this._statsCache}supportsMultidirectionalHillshade(){return!0}load(t){return this.addResolvingPromise(this.layer.load(t).then((()=>this.rasterInfo=this.layer.raster.rasterInfo))),Promise.resolve(this)}_getSamplePixelBlockDescriptor(t,r=1e3){const{pyramidScalingFactor:e,maximumPyramidLevel:s}=t.storageInfo;let{extent:o,width:i,height:n,pixelSize:l}=t,m=Math.ceil(Math.log(Math.max(i,n)/r)/Math.log(e))-1,h=0,c=0;if(m<=s){const t=e**m;i=Math.floor(i/t),n=Math.floor(n/t)}else m=0,i=Math.min(i,r),n=Math.min(n,r),h=Math.max(Math.floor(i/2-500),0),c=Math.max(Math.floor(n/2-500),0),o=new a({xmin:o.xmin+h*l.x,xmax:Math.min(o.xmax,o.xmin+h*l.x*r),ymin:o.ymin+c*l.y,ymax:Math.min(o.ymax,o.ymin+c*l.y*r)});return{extent:o,width:i,height:n,origin:{x:h,y:c}}}};t([e()],n.prototype,"layer",void 0),n=t([s("esri.smartMapping.support.adapters.ImageryTileLayerAdapter")],n);const l=n;export{l as default};
5
+ import{_ as t}from"../../../../chunks/tslib.es6.js";import r from"../../../../core/Error.js";import{property as e}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import a from"../../../../geometry/Extent.js";import{estimateStatisticsHistograms as o}from"../../../../layers/support/rasterFunctions/stretchUtils.js";import i from"./RasterLayerAdapter.js";let n=class extends i{async generateRasterInfo(t){const{layer:r}=this,e=t?.rasterFunction;if("imagery-tile"===r.type&&e)try{return r.generateRasterInfo(e,{signal:t?.signal})}catch{return r.rasterInfo}return this.rasterInfo}async estimateStatisticsHistograms(t){if(null!==this._statsCache)return this._statsCache;const{raster:e}=this.layer,{extent:s,width:a,height:i}=this._getSamplePixelBlockDescriptor(e.rasterInfo),{pixelBlock:n}=await e.fetchPixels(s,a,i,t);if(null==n)throw new r("raster-layer-adapter","Unable to estimate histograms");return this._statsCache=o(n),this._statsCache}supportsMultidirectionalHillshade(){return!0}load(t){return this.addResolvingPromise(this.layer.load(t).then((()=>this.rasterInfo=this.layer.raster.rasterInfo))),Promise.resolve(this)}_getSamplePixelBlockDescriptor(t,r=1e3){const{pyramidScalingFactor:e,maximumPyramidLevel:s}=t.storageInfo;let{extent:o,width:i,height:n,pixelSize:l}=t,m=Math.ceil(Math.log(Math.max(i,n)/r)/Math.log(e))-1,h=0,c=0;if(m<=s){const t=e**m;i=Math.floor(i/t),n=Math.floor(n/t)}else m=0,i=Math.min(i,r),n=Math.min(n,r),h=Math.max(Math.floor(i/2-500),0),c=Math.max(Math.floor(n/2-500),0),o=new a({xmin:o.xmin+h*l.x,xmax:Math.min(o.xmax,o.xmin+h*l.x*r),ymin:o.ymin+c*l.y,ymax:Math.min(o.ymax,o.ymin+c*l.y*r)});return{extent:o,width:i,height:n,origin:{x:h,y:c}}}};t([e()],n.prototype,"layer",void 0),n=t([s("esri.smartMapping.support.adapters.ImageryTileLayerAdapter")],n);const l=n;export{l as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- const a="20230516",d="48b057d01a26a2a3f3b53c060b0d467d129add4a";export{a as buildDate,d as commitHash};
5
+ const d="20230518",b="dd84cb8c0614af044b8052147d4d46b83591ed44";export{d as buildDate,b as commitHash};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- import t from"./RectangleBinPack.js";import e from"../webgl/Rect.js";import{PixelFormat as i,TextureWrapMode as s}from"../../../webgl/enums.js";import{Texture as h}from"../../../webgl/Texture.js";import{TextureDescriptor as r}from"../../../webgl/TextureDescriptor.js";class n{constructor(e,i,s){this.width=0,this.height=0,this._dirties=[],this._glyphData=[],this._currentPage=0,this._glyphIndex={},this._textures=[],this._rangePromises=new Map,this.width=e,this.height=i,this._glyphSource=s,this._binPack=new t(e-4,i-4),this._glyphData.push(new Uint8Array(e*i)),this._dirties.push(!0),this._textures.push(void 0)}getGlyphItems(i,s){const h=[],r=this._glyphSource,n=new Set,o=1/256;for(const t of s){const e=Math.floor(t*o);n.add(e)}const a=[];return n.forEach((t=>{if(t<=256){const e=i+t;if(this._rangePromises.has(e))a.push(this._rangePromises.get(e));else{const s=r.getRange(i,t).then((()=>{this._rangePromises.delete(e)}),(()=>{this._rangePromises.delete(e)}));this._rangePromises.set(e,s),a.push(s)}}})),Promise.all(a).then((()=>{let n=this._glyphIndex[i];n||(n={},this._glyphIndex[i]=n);for(const o of s){const s=n[o];if(s){h[o]={sdf:!0,rect:s.rect,metrics:s.metrics,page:s.page,code:o};continue}const a=r.getGlyph(i,o);if(!a||!a.metrics)continue;const c=a.metrics;let l;if(0===c.width)l=new e(0,0,0,0);else{const e=3,i=c.width+2*e,s=c.height+2*e;let h=i%4?4-i%4:4,r=s%4?4-s%4:4;1===h&&(h=5),1===r&&(r=5),l=this._binPack.allocate(i+h,s+r),l.isEmpty&&(this._dirties[this._currentPage]||(this._glyphData[this._currentPage]=null),this._currentPage=this._glyphData.length,this._glyphData.push(new Uint8Array(this.width*this.height)),this._dirties.push(!0),this._textures.push(void 0),this._binPack=new t(this.width-4,this.height-4),l=this._binPack.allocate(i+h,s+r));const n=this._glyphData[this._currentPage],o=a.bitmap;let g,_;if(o)for(let t=0;t<s;t++){g=i*t,_=this.width*(l.y+t+1)+l.x;for(let t=0;t<i;t++)n[_+t+1]=o[g+t]}}n[o]={rect:l,metrics:c,tileIDs:null,page:this._currentPage},h[o]={sdf:!0,rect:l,metrics:c,page:this._currentPage,code:o},this._dirties[this._currentPage]=!0}return h}))}removeGlyphs(t){for(const e in this._glyphIndex){const i=this._glyphIndex[e];if(!i)continue;let s;for(const e in i)if(s=i[e],s.tileIDs.delete(t),0===s.tileIDs.size){const t=this._glyphData[s.page],h=s.rect;let r,n;for(let e=0;e<h.height;e++)for(r=this.width*(h.y+e)+h.x,n=0;n<h.width;n++)t[r+n]=0;delete i[e],this._dirties[s.page]=!0}}}bind(t,e,n,o=0){if(!this._textures[n]){const e=new r;e.pixelFormat=i.ALPHA,e.wrapMode=s.CLAMP_TO_EDGE,e.width=this.width,e.height=this.height,this._textures[n]=new h(t,e,new Uint8Array(this.width*this.height))}const a=this._textures[n];a.setSamplingMode(e),this._dirties[n]&&a.setData(this._glyphData[n]),t.bindTexture(a,o),this._dirties[n]=!1}dispose(){this._binPack=null;for(const t of this._textures)t&&t.dispose();this._textures.length=0}}export{n as default};
5
+ import t from"./RectangleBinPack.js";import e from"../webgl/Rect.js";import{PixelFormat as s,TextureWrapMode as i}from"../../../webgl/enums.js";import{Texture as h}from"../../../webgl/Texture.js";import{TextureDescriptor as r}from"../../../webgl/TextureDescriptor.js";class n{constructor(e,s,i){this.width=0,this.height=0,this._dirties=[],this._glyphData=[],this._currentPage=0,this._glyphIndex={},this._textures=[],this._rangePromises=new Map,this.width=e,this.height=s,this._glyphSource=i,this._binPack=new t(e-4,s-4),this._glyphData.push(new Uint8Array(e*s)),this._dirties.push(!0),this._textures.push(void 0)}getGlyphItems(s,i){const h=[],r=this._glyphSource,n=new Set,o=1/256;for(const t of i){const e=Math.floor(t*o);n.add(e)}const a=[];return n.forEach((t=>{const e=s+t;if(this._rangePromises.has(e))a.push(this._rangePromises.get(e));else{const i=r.getRange(s,t).then((()=>{this._rangePromises.delete(e)}),(()=>{this._rangePromises.delete(e)}));this._rangePromises.set(e,i),a.push(i)}})),Promise.all(a).then((()=>{let n=this._glyphIndex[s];n||(n={},this._glyphIndex[s]=n);for(const o of i){const i=n[o];if(i){h[o]={sdf:!0,rect:i.rect,metrics:i.metrics,page:i.page,code:o};continue}const a=r.getGlyph(s,o);if(!a||!a.metrics)continue;const c=a.metrics;let l;if(0===c.width)l=new e(0,0,0,0);else{const e=3,s=c.width+2*e,i=c.height+2*e;let h=s%4?4-s%4:4,r=i%4?4-i%4:4;1===h&&(h=5),1===r&&(r=5),l=this._binPack.allocate(s+h,i+r),l.isEmpty&&(this._dirties[this._currentPage]||(this._glyphData[this._currentPage]=null),this._currentPage=this._glyphData.length,this._glyphData.push(new Uint8Array(this.width*this.height)),this._dirties.push(!0),this._textures.push(void 0),this._binPack=new t(this.width-4,this.height-4),l=this._binPack.allocate(s+h,i+r));const n=this._glyphData[this._currentPage],o=a.bitmap;let g,_;if(o)for(let t=0;t<i;t++){g=s*t,_=this.width*(l.y+t+1)+l.x;for(let t=0;t<s;t++)n[_+t+1]=o[g+t]}}n[o]={rect:l,metrics:c,tileIDs:null,page:this._currentPage},h[o]={sdf:!0,rect:l,metrics:c,page:this._currentPage,code:o},this._dirties[this._currentPage]=!0}return h}))}removeGlyphs(t){for(const e in this._glyphIndex){const s=this._glyphIndex[e];if(!s)continue;let i;for(const e in s)if(i=s[e],i.tileIDs.delete(t),0===i.tileIDs.size){const t=this._glyphData[i.page],h=i.rect;let r,n;for(let e=0;e<h.height;e++)for(r=this.width*(h.y+e)+h.x,n=0;n<h.width;n++)t[r+n]=0;delete s[e],this._dirties[i.page]=!0}}}bind(t,e,n,o=0){if(!this._textures[n]){const e=new r;e.pixelFormat=s.ALPHA,e.wrapMode=i.CLAMP_TO_EDGE,e.width=this.width,e.height=this.height,this._textures[n]=new h(t,e,new Uint8Array(this.width*this.height))}const a=this._textures[n];a.setSamplingMode(e),this._dirties[n]&&a.setData(this._glyphData[n]),t.bindTexture(a,o),this._dirties[n]=!1}dispose(){this._binPack=null;for(const t of this._textures)t&&t.dispose();this._textures.length=0}}export{n as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../../request.js";import t from"../../../../core/pbf.js";class s{constructor(e){if(this._metrics=[],this._bitmaps=[],e)for(;e.next();)switch(e.tag()){case 1:{const t=e.getMessage();for(;t.next();)switch(t.tag()){case 3:{const e=t.getMessage();let s,a,r,n,i,c,g;for(;e.next();)switch(e.tag()){case 1:s=e.getUInt32();break;case 2:a=e.getBytes();break;case 3:r=e.getUInt32();break;case 4:n=e.getUInt32();break;case 5:i=e.getSInt32();break;case 6:c=e.getSInt32();break;case 7:g=e.getUInt32();break;default:e.skip()}e.release(),s&&(this._metrics[s]={width:r,height:n,left:i,top:c,advance:g},this._bitmaps[s]=a);break}default:t.skip()}t.release();break}default:e.skip()}}getMetrics(e){return this._metrics[e]}getBitmap(e){return this._bitmaps[e]}}class a{constructor(){this._ranges=[]}getRange(e){return this._ranges[e]}addRange(e,t){this._ranges[e]=t}}class r{constructor(e){this._glyphInfo={},this._baseURL=e}getRange(a,r){const n=this._getFontStack(a);if(n.getRange(r))return Promise.resolve();const i=256*r,c=i+255;if(this._baseURL){const g=this._baseURL.replace("{fontstack}",a).replace("{range}",i+"-"+c);return e(g,{responseType:"array-buffer"}).then((e=>{n.addRange(r,new s(new t(new Uint8Array(e.data),new DataView(e.data))))})).catch((()=>{n.addRange(r,new s)}))}return n.addRange(r,new s),Promise.resolve()}getGlyph(e,t){const s=this._getFontStack(e);if(!s)return;const a=Math.floor(t/256);if(a>256)return;const r=s.getRange(a);return r?{metrics:r.getMetrics(t),bitmap:r.getBitmap(t)}:void 0}_getFontStack(e){let t=this._glyphInfo[e];return t||(t=this._glyphInfo[e]=new a),t}}export{r as default};
5
+ import e from"../../../../request.js";import t from"../../../../core/pbf.js";class s{constructor(e){if(this._metrics=[],this._bitmaps=[],e)for(;e.next();)switch(e.tag()){case 1:{const t=e.getMessage();for(;t.next();)switch(t.tag()){case 3:{const e=t.getMessage();let s,a,r,n,i,c,g;for(;e.next();)switch(e.tag()){case 1:s=e.getUInt32();break;case 2:a=e.getBytes();break;case 3:r=e.getUInt32();break;case 4:n=e.getUInt32();break;case 5:i=e.getSInt32();break;case 6:c=e.getSInt32();break;case 7:g=e.getUInt32();break;default:e.skip()}e.release(),s&&(this._metrics[s]={width:r,height:n,left:i,top:c,advance:g},this._bitmaps[s]=a);break}default:t.skip()}t.release();break}default:e.skip()}}getMetrics(e){return this._metrics[e]}getBitmap(e){return this._bitmaps[e]}}class a{constructor(){this._ranges=[]}getRange(e){return this._ranges[e]}addRange(e,t){this._ranges[e]=t}}class r{constructor(e){this._glyphInfo={},this._baseURL=e}getRange(a,r){const n=this._getFontStack(a);if(n.getRange(r))return Promise.resolve();const i=256*r,c=i+255;if(this._baseURL){const g=this._baseURL.replace("{fontstack}",a).replace("{range}",i+"-"+c);return e(g,{responseType:"array-buffer"}).then((e=>{n.addRange(r,new s(new t(new Uint8Array(e.data),new DataView(e.data))))})).catch((()=>{n.addRange(r,new s)}))}return n.addRange(r,new s),Promise.resolve()}getGlyph(e,t){const s=this._getFontStack(e);if(!s)return;const a=Math.floor(t/256),r=s.getRange(a);return r?{metrics:r.getMetrics(t),bitmap:r.getBitmap(t)}:void 0}_getFontStack(e){let t=this._glyphInfo[e];return t||(t=this._glyphInfo[e]=new a),t}}export{r as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- import{isLineBreak as t,isWhiteSpace as e,allowsIdeographicBreak as i,hasVerticalOrientation as s}from"./ScriptUtils.js";import o from"../webgl/Rect.js";const c=24,h=17;class a{constructor(t,e,i,s,o,c,h){this._glyphItems=t,this._maxWidth=e,this._lineHeight=i,this._letterSpacing=s,this._hAnchor=o,this._vAnchor=c,this._justify=h}getShaping(o,c,h){const a=this._letterSpacing,l=this._lineHeight,r=this._justify,n=this._maxWidth,m=[];let f=0,p=0;const g=o.length;for(let t=0;t<g;t++){const e=o.charCodeAt(t),i=h&&s(e);let c;for(const t of this._glyphItems)if(c=t[e],c)break;m.push({codePoint:e,x:f,y:p,vertical:i,glyphMosaicItem:c}),c&&(f+=c.metrics.advance+a)}let y=f;if(n>0){y=f/Math.max(1,Math.ceil(f/n))}const d=o.includes("​"),x=[];for(let e=0;e<g-1;e++){const s=m[e].codePoint,o=i(s);if(t(s)||o){let t=0;if(10===s)t-=1e4;else if(o&&d)t+=150;else{40!==s&&65288!==s||(t+=50);const i=m[e+1].codePoint;41!==i&&65289!==i||(t+=50)}x.push(this._buildBreak(e+1,m[e].x,y,x,t,!1))}}const M=this._optimalBreaks(this._buildBreak(g,f,y,x,0,!0));let u=0;const _=c?-l:l;let I=0;for(let t=0;t<M.length;t++){const i=M[t];let s=I;for(;s<i&&e(m[s].codePoint);)m[s].glyphMosaicItem=null,++s;let o=i-1;for(;o>s&&e(m[o].codePoint);)m[o].glyphMosaicItem=null,--o;if(s<=o){const t=m[s].x;for(let i=s;i<=o;i++)m[i].x-=t,m[i].y=p;let e=m[o].x;m[o].glyphMosaicItem&&(e+=m[o].glyphMosaicItem.metrics.advance),u=Math.max(e,u),r&&this._applyJustification(m,s,o)}I=i,p+=_}if(m.length>0){const t=M.length-1,e=(r-this._hAnchor)*u;let i=(-this._vAnchor*(t+1)+.5)*l;c&&t&&(i+=t*l);for(const s of m)s.x+=e,s.y+=i}return m.filter((t=>t.glyphMosaicItem))}static getTextBox(t,e){if(!t.length)return null;let i=1/0,s=1/0,o=0,c=0;for(const a of t){const t=a.glyphMosaicItem.metrics.advance,l=a.x,r=a.y-h,n=l+t,m=r+e;i=Math.min(i,l),o=Math.max(o,n),s=Math.min(s,r),c=Math.max(c,m)}return{x:i,y:s,width:o-i,height:c-s}}static getBox(t){if(!t.length)return null;let e=1/0,i=1/0,s=0,o=0;for(const c of t){const{height:t,left:h,top:a,width:l}=c.glyphMosaicItem.metrics,r=c.x,n=c.y-(t-Math.abs(a)),m=r+l+h,f=n+t;e=Math.min(e,r),s=Math.max(s,m),i=Math.min(i,n),o=Math.max(o,f)}return{x:e,y:i,width:s-e,height:o-i}}static addDecoration(t,e){const i=t.length;if(0===i)return;const s=3;let c=t[0].x+t[0].glyphMosaicItem.metrics.left,h=t[0].y;for(let l=1;l<i;l++){const i=t[l];if(i.y!==h){const a=t[l-1].x+t[l-1].glyphMosaicItem.metrics.left+t[l-1].glyphMosaicItem.metrics.width;t.push({codePoint:0,x:c,y:h+e-s,vertical:!1,glyphMosaicItem:{sdf:!0,rect:new o(4,0,4,8),metrics:{width:a-c,height:2+2*s,left:0,top:0,advance:0},page:0,code:0}}),h=i.y,c=i.x+i.glyphMosaicItem.metrics.left}}const a=t[i-1].x+t[i-1].glyphMosaicItem.metrics.left+t[i-1].glyphMosaicItem.metrics.width;t.push({codePoint:0,x:c,y:h+e-s,vertical:!1,glyphMosaicItem:{sdf:!0,rect:new o(4,0,4,8),metrics:{width:a-c,height:2+2*s,left:0,top:0,advance:0},page:0,code:0}})}_breakScore(t,e,i,s){const o=(t-e)*(t-e);return s?t<e?o/2:2*o:o+Math.abs(i)*i}_buildBreak(t,e,i,s,o,c){let h=null,a=this._breakScore(e,i,o,c);for(const l of s){const t=e-l.x,s=this._breakScore(t,i,o,c)+l.score;s<=a&&(h=l,a=s)}return{index:t,x:e,score:a,previousBreak:h}}_optimalBreaks(t){return t?this._optimalBreaks(t.previousBreak).concat(t.index):[]}_applyJustification(t,e,i){const s=t[i],o=s.vertical?c:s.glyphMosaicItem?s.glyphMosaicItem.metrics.advance:0,h=(s.x+o)*this._justify;for(let c=e;c<=i;c++)t[c].x-=h}}export{h as SDF_GLYPH_BASELINE,c as SDF_GLYPH_SIZE,a as TextShaping};
5
+ import{isLineBreak as t,isWhiteSpace as e,allowsIdeographicBreak as i,hasVerticalOrientation as o}from"./ScriptUtils.js";import s from"../webgl/Rect.js";const c=24,h=17;class l{constructor(t,e,i,o,s,c,h){this._glyphItems=t,this._maxWidth=e,this._lineHeight=i,this._letterSpacing=o,this._hAnchor=s,this._vAnchor=c,this._justify=h}getShaping(s,c,h){const l=this._letterSpacing,n=this._lineHeight,a=this._justify,r=this._maxWidth,m=[];let f=0,p=0;for(const t of s){const e=t.codePointAt(0);if(null==e)continue;const i=h&&o(e);let s;for(const t of this._glyphItems)if(s=t[e],s)break;m.push({codePoint:e,x:f,y:p,vertical:i,glyphMosaicItem:s}),s&&(f+=s.metrics.advance+l)}let g=f;if(r>0){g=f/Math.max(1,Math.ceil(f/r))}const y=s.includes("​"),d=[],x=m.length;for(let e=0;e<x-1;e++){const o=m[e].codePoint,s=i(o);if(t(o)||s){let t=0;if(10===o)t-=1e4;else if(s&&y)t+=150;else{40!==o&&65288!==o||(t+=50);const i=m[e+1].codePoint;41!==i&&65289!==i||(t+=50)}d.push(this._buildBreak(e+1,m[e].x,g,d,t,!1))}}const u=this._optimalBreaks(this._buildBreak(x,f,g,d,0,!0));let M=0;const _=c?-n:n;let I=0;for(let t=0;t<u.length;t++){const i=u[t];let o=I;for(;o<i&&e(m[o].codePoint);)m[o].glyphMosaicItem=null,++o;let s=i-1;for(;s>o&&e(m[s].codePoint);)m[s].glyphMosaicItem=null,--s;if(o<=s){const t=m[o].x;for(let i=o;i<=s;i++)m[i].x-=t,m[i].y=p;let e=m[s].x;m[s].glyphMosaicItem&&(e+=m[s].glyphMosaicItem.metrics.advance),M=Math.max(e,M),a&&this._applyJustification(m,o,s)}I=i,p+=_}if(m.length>0){const t=u.length-1,e=(a-this._hAnchor)*M;let i=(-this._vAnchor*(t+1)+.5)*n;c&&t&&(i+=t*n);for(const o of m)o.x+=e,o.y+=i}return m.filter((t=>t.glyphMosaicItem))}static getTextBox(t,e){if(!t.length)return null;let i=1/0,o=1/0,s=0,c=0;for(const l of t){const t=l.glyphMosaicItem.metrics.advance,n=l.x,a=l.y-h,r=n+t,m=a+e;i=Math.min(i,n),s=Math.max(s,r),o=Math.min(o,a),c=Math.max(c,m)}return{x:i,y:o,width:s-i,height:c-o}}static getBox(t){if(!t.length)return null;let e=1/0,i=1/0,o=0,s=0;for(const c of t){const{height:t,left:h,top:l,width:n}=c.glyphMosaicItem.metrics,a=c.x,r=c.y-(t-Math.abs(l)),m=a+n+h,f=r+t;e=Math.min(e,a),o=Math.max(o,m),i=Math.min(i,r),s=Math.max(s,f)}return{x:e,y:i,width:o-e,height:s-i}}static addDecoration(t,e){const i=t.length;if(0===i)return;const o=3;let c=t[0].x+t[0].glyphMosaicItem.metrics.left,h=t[0].y;for(let n=1;n<i;n++){const i=t[n];if(i.y!==h){const l=t[n-1].x+t[n-1].glyphMosaicItem.metrics.left+t[n-1].glyphMosaicItem.metrics.width;t.push({codePoint:0,x:c,y:h+e-o,vertical:!1,glyphMosaicItem:{sdf:!0,rect:new s(4,0,4,8),metrics:{width:l-c,height:2+2*o,left:0,top:0,advance:0},page:0,code:0}}),h=i.y,c=i.x+i.glyphMosaicItem.metrics.left}}const l=t[i-1].x+t[i-1].glyphMosaicItem.metrics.left+t[i-1].glyphMosaicItem.metrics.width;t.push({codePoint:0,x:c,y:h+e-o,vertical:!1,glyphMosaicItem:{sdf:!0,rect:new s(4,0,4,8),metrics:{width:l-c,height:2+2*o,left:0,top:0,advance:0},page:0,code:0}})}_breakScore(t,e,i,o){const s=(t-e)*(t-e);return o?t<e?s/2:2*s:s+Math.abs(i)*i}_buildBreak(t,e,i,o,s,c){let h=null,l=this._breakScore(e,i,s,c);for(const n of o){const t=e-n.x,o=this._breakScore(t,i,s,c)+n.score;o<=l&&(h=n,l=o)}return{index:t,x:e,score:l,previousBreak:h}}_optimalBreaks(t){return t?this._optimalBreaks(t.previousBreak).concat(t.index):[]}_applyJustification(t,e,i){const o=t[i],s=o.vertical?c:o.glyphMosaicItem?o.glyphMosaicItem.metrics.advance:0,h=(o.x+s)*this._justify;for(let c=e;c<=i;c++)t[c].x-=h}}export{h as SDF_GLYPH_BASELINE,c as SDF_GLYPH_SIZE,l as TextShaping};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../../../core/BidiEngine.js";import{assertIsSome as t}from"../../../../../core/maybe.js";import{numericHash as n}from"../../../../../core/string.js";import{GeometryType as i,Point as s}from"../../../../../geometry/support/TileClipper.js";import{BucketType as a}from"../enums.js";import{C_DEG_TO_RAD as o,log2 as r,interpolate as l}from"../GeometryUtils.js";import{TILE_PIXEL_RATIO as h,Anchor as x,TILE_COORD_SIZE as c}from"../Placement.js";import{SDF_GLYPH_SIZE as d,TextShaping as g}from"../TextShaping.js";import f from"./BaseBucket.js";import{TextTransform as y,SymbolPlacement as m,RotationAlignment as u,TextWritingMode as p,SymbolAnchor as _,TextJustification as M}from"../style/StyleDefinition.js";import{IconLayout as P,TextLayout as I}from"../style/StyleLayer.js";const b=10;function A(e,t){return e.iconMosaicItem&&t.iconMosaicItem?e.iconMosaicItem.page===t.iconMosaicItem.page?0:e.iconMosaicItem.page-t.iconMosaicItem.page:e.iconMosaicItem&&!t.iconMosaicItem?1:!e.iconMosaicItem&&t.iconMosaicItem?-1:0}class L extends f{constructor(e,t,n,i,s,o,r,l){super(e,t,l.getSpriteItems()),this.type=a.SYMBOL,this._markerMap=new Map,this._glyphMap=new Map,this._glyphBufferDataStorage=new Map,this._isIconSDF=!1,this._iconVertexBuffer=n,this._iconIndexBuffer=i,this._textVertexBuffer=s,this._textIndexBuffer=o,this._placementEngine=r,this._workerTileHandler=l}get markerPageMap(){return this._markerMap}get glyphsPageMap(){return this._glyphMap}get symbolInstances(){return this._symbolInstances}getResources(e,t,i){const s=this.layer,a=this.zoom;e&&e.setExtent(this.layerExtent);const o=s.getLayoutProperty("icon-image"),r=s.getLayoutProperty("text-field");let l=s.getLayoutProperty("text-transform"),h=s.getLayoutProperty("text-font");const x=[];let c,d,g,f;o&&!o.isDataDriven&&(c=o.getValue(a)),r&&!r.isDataDriven&&(d=r.getValue(a)),l&&l.isDataDriven||(g=s.getLayoutValue("text-transform",a),l=null),h&&h.isDataDriven||(f=s.getLayoutValue("text-font",a),h=null);for(const m of this._features){const u=m.getGeometry(e);if(!u||0===u.length)continue;let p,_;o&&(p=o.isDataDriven?o.getValue(a,m):this._replaceKeys(c,m.values),p&&t(p));let M=!1;if(r&&(_=r.isDataDriven?r.getValue(a,m):this._replaceKeys(d,m.values),_)){switch(_=_.replaceAll("\\n","\n"),l&&(g=l.getValue(a,m)),g){case y.LOWERCASE:_=_.toLowerCase();break;case y.UPPERCASE:_=_.toUpperCase()}if(L._bidiEngine.hasBidiChar(_)){let e;e="rtl"===L._bidiEngine.checkContextual(_)?"IDNNN":"ICNNN",_=L._bidiEngine.bidiTransform(_,e,"VLYSN"),M=!0}const e=_.length;if(e>0){h&&(f=h.getValue(a,m));for(const t of f){let n=i[t];n||(n=i[t]=new Set);for(let t=0;t<e;t++){const e=_.charCodeAt(t);n.add(e)}}}}if(!p&&!_)continue;const P=s.getLayoutValue("symbol-sort-key",a,m),I={feature:m,sprite:p,label:_,rtl:M,geometry:u,hash:(_?n(_):0)^(p?n(p):0),priority:P,textFont:f};x.push(I)}this._symbolFeatures=x}processFeatures(e){e&&e.setExtent(this.layerExtent);const n=this.layer,s=this.zoom,a=n.getLayoutValue("symbol-placement",s),r=a!==m.POINT,l=n.getLayoutValue("symbol-spacing",s)*h,f=n.getLayoutProperty("icon-image"),y=n.getLayoutProperty("text-field"),b=f?new P(n,s,r):null,V=y?new I(n,s,r):null,T=this._workerTileHandler;let w;f&&(w=T.getSpriteItems()),this._iconIndexStart=3*this._iconIndexBuffer.index,this._textIndexStart=3*this._textIndexBuffer.index,this._iconIndexCount=0,this._textIndexCount=0,this._markerMap.clear(),this._glyphMap.clear();const B=[];let C=1;V&&V.size&&(C=V.size/d);const R=V?V.maxAngle*o:0,D=V?V.size*h:0;for(const o of this._symbolFeatures){let e;b&&w&&o.sprite&&(e=w[o.sprite],e&&e.sdf&&(this._isIconSDF=!0));let n;!!e&&b.update(s,o.feature);let f=0;const y=o.label;if(y){t(V),V.update(s,o.feature);const e=r&&V.rotationAlignment===u.MAP?V.keepUpright:V.writingMode&&V.writingMode.includes(p.VERTICAL);let i=.5;switch(V.anchor){case _.TOP_LEFT:case _.LEFT:case _.BOTTOM_LEFT:i=0;break;case _.TOP_RIGHT:case _.RIGHT:case _.BOTTOM_RIGHT:i=1}let a=.5;switch(V.anchor){case _.TOP_LEFT:case _.TOP:case _.TOP_RIGHT:a=0;break;case _.BOTTOM_LEFT:case _.BOTTOM:case _.BOTTOM_RIGHT:a=1}let l=.5;switch(V.justify){case M.AUTO:l=i;break;case M.LEFT:l=0;break;case M.RIGHT:l=1}const x=V.letterSpacing*d,c=r?0:V.maxWidth*d,m=V.lineHeight*d,P=o.textFont.map((e=>T.getGlyphItems(e)));if(n=new g(P,c,m,x,i,a,l).getShaping(y,o.rtl,e),n&&n.length>0){let e=1e30,t=-1e30;for(const i of n)e=Math.min(e,i.x),t=Math.max(t,i.x);f=(t-e+2*d)*C*h}}for(let t of o.geometry){const s=[];if(a===m.LINE){if(n?.length&&V?.size){const e=V.size*h*(2+Math.min(2,4*Math.abs(V.offset[1])));t=L._smoothVertices(t,e)}L._pushAnchors(s,t,l,f)}else a===m.LINE_CENTER?L._pushCenterAnchor(s,t):o.feature.type===i.Polygon?L._pushCentroid(s,t):s.push(new x(t[0].x,t[0].y));for(const i of s){if(i.x<0||i.x>c||i.y<0||i.y>c)continue;if(r&&f>0&&V?.rotationAlignment===u.MAP&&!L._honorsTextMaxAngle(t,i,f,R,D))continue;const s={shaping:n,line:t,iconMosaicItem:e,anchor:i,symbolFeature:o,textColliders:[],iconColliders:[],textVertexRanges:[],iconVertexRanges:[]};B.push(s),this._processFeature(s,b,V)}}}B.sort(A),this._addPlacedGlyphs(),this._symbolInstances=B}serialize(){let e=11;e+=this.layerUIDs.length,e+=3*this.markerPageMap.size,e+=3*this.glyphsPageMap.size,e+=L._symbolsSerializationLength(this._symbolInstances),e+=this._iconVertexBuffer.array.length,e+=this._iconIndexBuffer.array.length,e+=this._textVertexBuffer.array.length,e+=this._textIndexBuffer.array.length;const t=new Uint32Array(e),n=new Int32Array(t.buffer),i=new Float32Array(t.buffer);let s=0;t[s++]=this.type,t[s++]=this.layerUIDs.length;for(let a=0;a<this.layerUIDs.length;a++)t[s++]=this.layerUIDs[a];t[s++]=this._isIconSDF?1:0,t[s++]=this.markerPageMap.size;for(const[a,[o,r]]of this.markerPageMap)t[s++]=a,t[s++]=o,t[s++]=r;t[s++]=this.glyphsPageMap.size;for(const[a,[o,r]]of this.glyphsPageMap)t[s++]=a,t[s++]=o,t[s++]=r;t[s++]=this._iconVertexBuffer.index/4,t[s++]=this._textVertexBuffer.index/4,s=L.serializeSymbols(t,n,i,s,this._symbolInstances),t[s++]=this._iconVertexBuffer.array.length;for(let a=0;a<this._iconVertexBuffer.array.length;a++)n[s++]=this._iconVertexBuffer.array[a];t[s++]=this._iconIndexBuffer.array.length;for(let a=0;a<this._iconIndexBuffer.array.length;a++)t[s++]=this._iconIndexBuffer.array[a];t[s++]=this._textVertexBuffer.array.length;for(let a=0;a<this._textVertexBuffer.array.length;a++)n[s++]=this._textVertexBuffer.array[a];t[s++]=this._textIndexBuffer.array.length;for(let a=0;a<this._textIndexBuffer.array.length;a++)t[s++]=this._textIndexBuffer.array[a];return t.buffer}static _symbolsSerializationLength(e){let t=0;t+=1;for(const n of e||[]){t+=4,t+=1;for(const e of n.textColliders)t+=b;for(const e of n.iconColliders)t+=b;t+=1,t+=2*n.textVertexRanges.length,t+=1,t+=2*n.iconVertexRanges.length}return t}static serializeSymbols(e,t,n,i,s){s=s||[],t[i++]=s.length;for(const a of s){t[i++]=a.anchor.x,t[i++]=a.anchor.y,t[i++]=a.symbolFeature.hash,t[i++]=a.symbolFeature.priority,t[i++]=a.textColliders.length+a.iconColliders.length;for(const e of a.textColliders)t[i++]=e.xTile,t[i++]=e.yTile,t[i++]=e.dxPixels,t[i++]=e.dyPixels,t[i++]=e.hard?1:0,t[i++]=e.partIndex,n[i++]=e.minLod,n[i++]=e.maxLod,t[i++]=e.width,t[i++]=e.height;for(const e of a.iconColliders)t[i++]=e.xTile,t[i++]=e.yTile,t[i++]=e.dxPixels,t[i++]=e.dyPixels,t[i++]=e.hard?1:0,t[i++]=e.partIndex,n[i++]=e.minLod,n[i++]=e.maxLod,t[i++]=e.width,t[i++]=e.height;t[i++]=a.textVertexRanges.length;for(const[e,n]of a.textVertexRanges)t[i++]=e,t[i++]=n;t[i++]=a.iconVertexRanges.length;for(const[e,n]of a.iconVertexRanges)t[i++]=e,t[i++]=n}return i}_replaceKeys(e,t){return e.replaceAll(/{([^{}]+)}/g,((e,n)=>n in t?t[n]:""))}_processFeature(e,t,n){const{line:i,iconMosaicItem:s,shaping:a,anchor:o}=e,l=this.zoom,h=this.layer,x=!!s;let c=!0;x&&(c=t?.optional||!s);const d=a&&a.length>0,g=!d||n?.optional;let f,y;if(x&&(f=this._placementEngine.getIconPlacement(o,s,t)),(f||c)&&(d&&(y=this._placementEngine.getTextPlacement(o,a,i,n)),y||g)){if(f&&y||(g||c?g||y?c||f||(y=null):f=null:(f=null,y=null)),y){const t=h.hasDataDrivenText?h.textMaterial.encodeAttributes(e.symbolFeature.feature,l,h):null;if(this._storePlacedGlyphs(e,y.shapes,l,n.rotationAlignment,t),y.textColliders){e.textColliders=y.textColliders;for(const e of y.textColliders){e.minLod=Math.max(l+r(e.minLod),0),e.maxLod=Math.min(l+r(e.maxLod),25);const t=e.angle;if(t){const n=Math.cos(t),i=Math.sin(t),s=e.dxPixels*n-e.dyPixels*i,a=e.dxPixels*i+e.dyPixels*n,o=(e.dxPixels+e.width)*n-e.dyPixels*i,r=(e.dxPixels+e.width)*i+e.dyPixels*n,l=e.dxPixels*n-(e.dyPixels+e.height)*i,h=e.dxPixels*i+(e.dyPixels+e.height)*n,x=(e.dxPixels+e.width)*n-(e.dyPixels+e.height)*i,c=(e.dxPixels+e.width)*i+(e.dyPixels+e.height)*n,d=Math.min(s,o,l,x),g=Math.max(s,o,l,x),f=Math.min(a,r,h,c),y=Math.max(a,r,h,c);e.dxPixels=d,e.dyPixels=f,e.width=g-d,e.height=y-f}}}}if(f){const n=h.hasDataDrivenIcon?h.iconMaterial.encodeAttributes(e.symbolFeature.feature,l,h):null;if(this._addPlacedIcons(e,f.shapes,l,s.page,t.rotationAlignment===u.VIEWPORT,n),f.iconColliders){e.iconColliders=f.iconColliders;for(const e of f.iconColliders){e.minLod=Math.max(l+r(e.minLod),0),e.maxLod=Math.min(l+r(e.maxLod),25);const t=e.angle;if(t){const n=Math.cos(t),i=Math.sin(t),s=e.dxPixels*n-e.dyPixels*i,a=e.dxPixels*i+e.dyPixels*n,o=(e.dxPixels+e.width)*n-e.dyPixels*i,r=(e.dxPixels+e.width)*i+e.dyPixels*n,l=e.dxPixels*n-(e.dyPixels+e.height)*i,h=e.dxPixels*i+(e.dyPixels+e.height)*n,x=(e.dxPixels+e.width)*n-(e.dyPixels+e.height)*i,c=(e.dxPixels+e.width)*i+(e.dyPixels+e.height)*n,d=Math.min(s,o,l,x),g=Math.max(s,o,l,x),f=Math.min(a,r,h,c),y=Math.max(a,r,h,c);e.dxPixels=d,e.dyPixels=f,e.width=g-d,e.height=y-f}}}}}}_addPlacedIcons(e,t,n,i,s,a){const o=Math.max(n-1,0),l=this._iconVertexBuffer,h=this._iconIndexBuffer,x=this._markerMap;for(const c of t){const t=s?0:Math.max(n+r(c.minzoom),o),d=s?25:Math.min(n+r(c.maxzoom),25);if(d<=t)continue;const g=c.tl,f=c.tr,y=c.bl,m=c.br,u=c.mosaicRect,p=c.labelAngle,_=c.minAngle,M=c.maxAngle,P=c.anchor,I=l.index,b=u.x,A=u.y,L=b+u.width,V=A+u.height,T=l.index;l.add(P.x,P.y,g.x,g.y,b,A,p,_,M,t,d,a),l.add(P.x,P.y,f.x,f.y,L,A,p,_,M,t,d,a),l.add(P.x,P.y,y.x,y.y,b,V,p,_,M,t,d,a),l.add(P.x,P.y,m.x,m.y,L,V,p,_,M,t,d,a),e.iconVertexRanges.length>0&&e.iconVertexRanges[0][0]+e.iconVertexRanges[0][1]===T?e.iconVertexRanges[0][1]+=4:e.iconVertexRanges.push([T,4]),h.add(I,I+1,I+2),h.add(I+1,I+2,I+3),x.has(i)?x.get(i)[1]+=6:x.set(i,[this._iconIndexStart+this._iconIndexCount,6]),this._iconIndexCount+=6}}_addPlacedGlyphs(){const e=this._textVertexBuffer,t=this._textIndexBuffer,n=this._glyphMap;for(const[i,s]of this._glyphBufferDataStorage)for(const a of s){const s=e.index,o=a.symbolInstance,r=a.ddAttributes,l=e.index;e.add(a.glyphAnchor[0],a.glyphAnchor[1],a.tl[0],a.tl[1],a.xmin,a.ymin,a.labelAngle,a.minAngle,a.maxAngle,a.minLod,a.maxLod,r),e.add(a.glyphAnchor[0],a.glyphAnchor[1],a.tr[0],a.tr[1],a.xmax,a.ymin,a.labelAngle,a.minAngle,a.maxAngle,a.minLod,a.maxLod,r),e.add(a.glyphAnchor[0],a.glyphAnchor[1],a.bl[0],a.bl[1],a.xmin,a.ymax,a.labelAngle,a.minAngle,a.maxAngle,a.minLod,a.maxLod,r),e.add(a.glyphAnchor[0],a.glyphAnchor[1],a.br[0],a.br[1],a.xmax,a.ymax,a.labelAngle,a.minAngle,a.maxAngle,a.minLod,a.maxLod,r),o.textVertexRanges.length>0&&o.textVertexRanges[0][0]+o.textVertexRanges[0][1]===l?o.textVertexRanges[0][1]+=4:o.textVertexRanges.push([l,4]),t.add(s,s+1,s+2),t.add(s+1,s+2,s+3),n.has(i)?n.get(i)[1]+=6:n.set(i,[this._textIndexStart+this._textIndexCount,6]),this._textIndexCount+=6}this._glyphBufferDataStorage.clear()}_storePlacedGlyphs(e,t,n,i,s){const a=Math.max(n-1,0),o=i===u.VIEWPORT;let l,h,x,c,d,g,f,y,m,p,_;for(const u of t){if(l=o?0:Math.max(n+r(u.minzoom),a),h=o?25:Math.min(n+r(u.maxzoom),25),h<=l)continue;x=u.tl,c=u.tr,d=u.bl,g=u.br,f=u.labelAngle,y=u.minAngle,m=u.maxAngle,p=u.anchor,_=u.mosaicRect,this._glyphBufferDataStorage.has(u.page)||this._glyphBufferDataStorage.set(u.page,[]);this._glyphBufferDataStorage.get(u.page).push({glyphAnchor:[p.x,p.y],tl:[x.x,x.y],tr:[c.x,c.y],bl:[d.x,d.y],br:[g.x,g.y],xmin:_.x,ymin:_.y,xmax:_.x+_.width,ymax:_.y+_.height,labelAngle:f,minAngle:y,maxAngle:m,minLod:l,maxLod:h,placementLod:a,symbolInstance:e,ddAttributes:s})}}static _pushAnchors(e,t,n,i){n+=i;let a=0;const o=t.length-1;for(let l=0;l<o;l++)a+=s.distance(t[l],t[l+1]);let r=i||n;if(r*=.5,a<=r)return;const h=r/a;let c=0,d=-(n=a/Math.max(Math.round(a/n),1))/2;const g=t.length-1;for(let s=0;s<g;s++){const i=t[s],a=t[s+1],o=a.x-i.x,r=a.y-i.y,g=Math.sqrt(o*o+r*r);let f;for(;d+n<c+g;){d+=n;const t=(d-c)/g,y=l(i.x,a.x,t),m=l(i.y,a.y,t);void 0===f&&(f=Math.atan2(r,o)),e.push(new x(y,m,f,s,h))}c+=g}}static _pushCenterAnchor(e,t){let n=0;const i=t.length-1;for(let l=0;l<i;l++)n+=s.distance(t[l],t[l+1]);const a=n/2;let o=0;const r=t.length-1;for(let s=0;s<r;s++){const n=t[s],i=t[s+1],r=i.x-n.x,h=i.y-n.y,c=Math.sqrt(r*r+h*h);if(a<o+c){const t=(a-o)/c,d=l(n.x,i.x,t),g=l(n.y,i.y,t),f=Math.atan2(h,r);return void e.push(new x(d,g,f,s,0))}o+=c}}static _deviation(e,t,n){const i=(t.x-e.x)*(n.x-t.x)+(t.y-e.y)*(n.y-t.y),s=(t.x-e.x)*(n.y-t.y)-(t.y-e.y)*(n.x-t.x);return Math.atan2(s,i)}static _honorsTextMaxAngle(e,t,n,i,a){let o=0;const r=n/2;let l=new s(t.x,t.y),h=t.segment+1;for(;o>-r;){if(--h,h<0)return!1;o-=s.distance(e[h],l),l=e[h]}o+=s.distance(e[h],e[h+1]);const x=[];let c=0;const d=e.length;for(;o<r;){const t=e[h];let n,r=h;do{if(++r,r===d)return!1;n=e[r]}while(n.isEqual(t));let l,g=r;do{if(++g,g===d)return!1;l=e[g]}while(l.isEqual(n));const f=this._deviation(t,n,l);for(x.push({deviation:f,distToAnchor:o}),c+=f;o-x[0].distToAnchor>a;)c-=x.shift().deviation;if(Math.abs(c)>i)return!1;o+=s.distance(n,l),h=r}return!0}static _smoothVertices(e,t){if(t<=0)return e;let n=e.length;if(n<3)return e;const i=[];let a=0,o=0;i.push(0);for(let y=1;y<n;y++){const t=s.distance(e[y],e[y-1]);t>0&&(a+=t,i.push(a),o++,o!==y&&(e[o]=e[y]))}if(n=o+1,n<3)return e;t=Math.min(t,.2*a);const r=e[0].x,l=e[0].y,h=e[n-1].x,x=e[n-1].y,c=s.sub(e[0],e[1]);c.normalize(),e[0].x+=t*c.x,e[0].y+=t*c.y,c.assignSub(e[n-1],e[n-2]),c.normalize(),e[n-1].x+=t*c.x,e[n-1].y+=t*c.y,i[0]-=t,i[n-1]+=t;const d=[];d.push(new s(r,l));const g=1e-6,f=.5*t;for(let y=1;y<n-1;y++){let a=0,o=0,r=0;for(let n=y-1;n>=0;n--){const s=f+i[n+1]-i[y];if(s<0)break;const l=i[n+1]-i[n],h=i[y]-i[n]<f?1:s/l;if(h<g)break;const x=h*h,c=h*s-.5*x*l,d=h*l/t,m=e[n+1],u=e[n].x-m.x,p=e[n].y-m.y;a+=d/c*(m.x*h*s+.5*x*(s*u-l*m.x)-x*h*l*u/3),o+=d/c*(m.y*h*s+.5*x*(s*p-l*m.y)-x*h*l*p/3),r+=d}for(let s=y+1;s<n;s++){const n=f-i[s-1]+i[y];if(n<0)break;const l=i[s]-i[s-1],h=i[s]-i[y]<f?1:n/l;if(h<g)break;const x=h*h,c=h*n-.5*x*l,d=h*l/t,m=e[s-1],u=e[s].x-m.x,p=e[s].y-m.y;a+=d/c*(m.x*h*n+.5*x*(n*u-l*m.x)-x*h*l*u/3),o+=d/c*(m.y*h*n+.5*x*(n*p-l*m.y)-x*h*l*p/3),r+=d}d.push(new s(a/r,o/r))}return d.push(new s(h,x)),e[0].x=r,e[0].y=l,e[n-1].x=h,e[n-1].y=x,d}static _pushCentroid(e,t){const n=0,i=0,s=4096,a=4096,o=t.length-1;let r=0,l=0,h=0,c=t[0].x,d=t[0].y;c>s&&(c=s),c<n&&(c=n),d>a&&(d=a),d<i&&(d=i);for(let x=1;x<o;x++){let e=t[x].x,o=t[x].y,g=t[x+1].x,f=t[x+1].y;e>s&&(e=s),e<n&&(e=n),o>a&&(o=a),o<i&&(o=i),g>s&&(g=s),g<n&&(g=n),f>a&&(f=a),f<i&&(f=i);const y=(e-c)*(f-d)-(g-c)*(o-d);r+=y*(c+e+g),l+=y*(d+o+f),h+=y}r/=3*h,l/=3*h,isNaN(r)||isNaN(l)||e.push(new x(r,l))}}L._bidiEngine=new e;export{L as default};
5
+ import e from"../../../../../core/BidiEngine.js";import{assertIsSome as t}from"../../../../../core/maybe.js";import{numericHash as n}from"../../../../../core/string.js";import{GeometryType as i,Point as s}from"../../../../../geometry/support/TileClipper.js";import{BucketType as o}from"../enums.js";import{C_DEG_TO_RAD as a,log2 as r,interpolate as l}from"../GeometryUtils.js";import{TILE_PIXEL_RATIO as h,Anchor as x,TILE_COORD_SIZE as c}from"../Placement.js";import{SDF_GLYPH_SIZE as d,TextShaping as f}from"../TextShaping.js";import g from"./BaseBucket.js";import{TextTransform as y,SymbolPlacement as m,RotationAlignment as u,TextWritingMode as p,SymbolAnchor as _,TextJustification as M}from"../style/StyleDefinition.js";import{IconLayout as P,TextLayout as I}from"../style/StyleLayer.js";const b=10;function A(e,t){return e.iconMosaicItem&&t.iconMosaicItem?e.iconMosaicItem.page===t.iconMosaicItem.page?0:e.iconMosaicItem.page-t.iconMosaicItem.page:e.iconMosaicItem&&!t.iconMosaicItem?1:!e.iconMosaicItem&&t.iconMosaicItem?-1:0}class L extends g{constructor(e,t,n,i,s,a,r,l){super(e,t,l.getSpriteItems()),this.type=o.SYMBOL,this._markerMap=new Map,this._glyphMap=new Map,this._glyphBufferDataStorage=new Map,this._isIconSDF=!1,this._iconVertexBuffer=n,this._iconIndexBuffer=i,this._textVertexBuffer=s,this._textIndexBuffer=a,this._placementEngine=r,this._workerTileHandler=l}get markerPageMap(){return this._markerMap}get glyphsPageMap(){return this._glyphMap}get symbolInstances(){return this._symbolInstances}getResources(e,t,i){const s=this.layer,o=this.zoom;e&&e.setExtent(this.layerExtent);const a=s.getLayoutProperty("icon-image"),r=s.getLayoutProperty("text-field");let l=s.getLayoutProperty("text-transform"),h=s.getLayoutProperty("text-font");const x=[];let c,d,f,g;a&&!a.isDataDriven&&(c=a.getValue(o)),r&&!r.isDataDriven&&(d=r.getValue(o)),l&&l.isDataDriven||(f=s.getLayoutValue("text-transform",o),l=null),h&&h.isDataDriven||(g=s.getLayoutValue("text-font",o),h=null);for(const m of this._features){const u=m.getGeometry(e);if(!u||0===u.length)continue;let p,_;a&&(p=a.isDataDriven?a.getValue(o,m):this._replaceKeys(c,m.values),p&&t(p));let M=!1;if(r&&(_=r.isDataDriven?r.getValue(o,m):this._replaceKeys(d,m.values),_)){switch(_=_.replaceAll("\\n","\n"),l&&(f=l.getValue(o,m)),f){case y.LOWERCASE:_=_.toLowerCase();break;case y.UPPERCASE:_=_.toUpperCase()}if(L._bidiEngine.hasBidiChar(_)){let e;e="rtl"===L._bidiEngine.checkContextual(_)?"IDNNN":"ICNNN",_=L._bidiEngine.bidiTransform(_,e,"VLYSN"),M=!0}if(_.length>0){h&&(g=h.getValue(o,m));for(const e of g){let t=i[e];t||(t=i[e]=new Set);for(const e of _){const n=e.codePointAt(0);null!=n&&t.add(n)}}}}if(!p&&!_)continue;const P=s.getLayoutValue("symbol-sort-key",o,m),I={feature:m,sprite:p,label:_,rtl:M,geometry:u,hash:(_?n(_):0)^(p?n(p):0),priority:P,textFont:g};x.push(I)}this._symbolFeatures=x}processFeatures(e){e&&e.setExtent(this.layerExtent);const n=this.layer,s=this.zoom,o=n.getLayoutValue("symbol-placement",s),r=o!==m.POINT,l=n.getLayoutValue("symbol-spacing",s)*h,g=n.getLayoutProperty("icon-image"),y=n.getLayoutProperty("text-field"),b=g?new P(n,s,r):null,V=y?new I(n,s,r):null,T=this._workerTileHandler;let w;g&&(w=T.getSpriteItems()),this._iconIndexStart=3*this._iconIndexBuffer.index,this._textIndexStart=3*this._textIndexBuffer.index,this._iconIndexCount=0,this._textIndexCount=0,this._markerMap.clear(),this._glyphMap.clear();const B=[];let C=1;V&&V.size&&(C=V.size/d);const R=V?V.maxAngle*a:0,D=V?V.size*h:0;for(const a of this._symbolFeatures){let e;b&&w&&a.sprite&&(e=w[a.sprite],e&&e.sdf&&(this._isIconSDF=!0));let n;!!e&&b.update(s,a.feature);let g=0;const y=a.label;if(y){t(V),V.update(s,a.feature);const e=r&&V.rotationAlignment===u.MAP?V.keepUpright:V.writingMode&&V.writingMode.includes(p.VERTICAL);let i=.5;switch(V.anchor){case _.TOP_LEFT:case _.LEFT:case _.BOTTOM_LEFT:i=0;break;case _.TOP_RIGHT:case _.RIGHT:case _.BOTTOM_RIGHT:i=1}let o=.5;switch(V.anchor){case _.TOP_LEFT:case _.TOP:case _.TOP_RIGHT:o=0;break;case _.BOTTOM_LEFT:case _.BOTTOM:case _.BOTTOM_RIGHT:o=1}let l=.5;switch(V.justify){case M.AUTO:l=i;break;case M.LEFT:l=0;break;case M.RIGHT:l=1}const x=V.letterSpacing*d,c=r?0:V.maxWidth*d,m=V.lineHeight*d,P=a.textFont.map((e=>T.getGlyphItems(e)));if(n=new f(P,c,m,x,i,o,l).getShaping(y,a.rtl,e),n&&n.length>0){let e=1e30,t=-1e30;for(const i of n)e=Math.min(e,i.x),t=Math.max(t,i.x);g=(t-e+2*d)*C*h}}for(let t of a.geometry){const s=[];if(o===m.LINE){if(n?.length&&V?.size){const e=V.size*h*(2+Math.min(2,4*Math.abs(V.offset[1])));t=L._smoothVertices(t,e)}L._pushAnchors(s,t,l,g)}else o===m.LINE_CENTER?L._pushCenterAnchor(s,t):a.feature.type===i.Polygon?L._pushCentroid(s,t):s.push(new x(t[0].x,t[0].y));for(const i of s){if(i.x<0||i.x>c||i.y<0||i.y>c)continue;if(r&&g>0&&V?.rotationAlignment===u.MAP&&!L._honorsTextMaxAngle(t,i,g,R,D))continue;const s={shaping:n,line:t,iconMosaicItem:e,anchor:i,symbolFeature:a,textColliders:[],iconColliders:[],textVertexRanges:[],iconVertexRanges:[]};B.push(s),this._processFeature(s,b,V)}}}B.sort(A),this._addPlacedGlyphs(),this._symbolInstances=B}serialize(){let e=11;e+=this.layerUIDs.length,e+=3*this.markerPageMap.size,e+=3*this.glyphsPageMap.size,e+=L._symbolsSerializationLength(this._symbolInstances),e+=this._iconVertexBuffer.array.length,e+=this._iconIndexBuffer.array.length,e+=this._textVertexBuffer.array.length,e+=this._textIndexBuffer.array.length;const t=new Uint32Array(e),n=new Int32Array(t.buffer),i=new Float32Array(t.buffer);let s=0;t[s++]=this.type,t[s++]=this.layerUIDs.length;for(let o=0;o<this.layerUIDs.length;o++)t[s++]=this.layerUIDs[o];t[s++]=this._isIconSDF?1:0,t[s++]=this.markerPageMap.size;for(const[o,[a,r]]of this.markerPageMap)t[s++]=o,t[s++]=a,t[s++]=r;t[s++]=this.glyphsPageMap.size;for(const[o,[a,r]]of this.glyphsPageMap)t[s++]=o,t[s++]=a,t[s++]=r;t[s++]=this._iconVertexBuffer.index/4,t[s++]=this._textVertexBuffer.index/4,s=L.serializeSymbols(t,n,i,s,this._symbolInstances),t[s++]=this._iconVertexBuffer.array.length;for(let o=0;o<this._iconVertexBuffer.array.length;o++)n[s++]=this._iconVertexBuffer.array[o];t[s++]=this._iconIndexBuffer.array.length;for(let o=0;o<this._iconIndexBuffer.array.length;o++)t[s++]=this._iconIndexBuffer.array[o];t[s++]=this._textVertexBuffer.array.length;for(let o=0;o<this._textVertexBuffer.array.length;o++)n[s++]=this._textVertexBuffer.array[o];t[s++]=this._textIndexBuffer.array.length;for(let o=0;o<this._textIndexBuffer.array.length;o++)t[s++]=this._textIndexBuffer.array[o];return t.buffer}static _symbolsSerializationLength(e){let t=0;t+=1;for(const n of e||[]){t+=4,t+=1;for(const e of n.textColliders)t+=b;for(const e of n.iconColliders)t+=b;t+=1,t+=2*n.textVertexRanges.length,t+=1,t+=2*n.iconVertexRanges.length}return t}static serializeSymbols(e,t,n,i,s){s=s||[],t[i++]=s.length;for(const o of s){t[i++]=o.anchor.x,t[i++]=o.anchor.y,t[i++]=o.symbolFeature.hash,t[i++]=o.symbolFeature.priority,t[i++]=o.textColliders.length+o.iconColliders.length;for(const e of o.textColliders)t[i++]=e.xTile,t[i++]=e.yTile,t[i++]=e.dxPixels,t[i++]=e.dyPixels,t[i++]=e.hard?1:0,t[i++]=e.partIndex,n[i++]=e.minLod,n[i++]=e.maxLod,t[i++]=e.width,t[i++]=e.height;for(const e of o.iconColliders)t[i++]=e.xTile,t[i++]=e.yTile,t[i++]=e.dxPixels,t[i++]=e.dyPixels,t[i++]=e.hard?1:0,t[i++]=e.partIndex,n[i++]=e.minLod,n[i++]=e.maxLod,t[i++]=e.width,t[i++]=e.height;t[i++]=o.textVertexRanges.length;for(const[e,n]of o.textVertexRanges)t[i++]=e,t[i++]=n;t[i++]=o.iconVertexRanges.length;for(const[e,n]of o.iconVertexRanges)t[i++]=e,t[i++]=n}return i}_replaceKeys(e,t){return e.replaceAll(/{([^{}]+)}/g,((e,n)=>n in t?t[n]:""))}_processFeature(e,t,n){const{line:i,iconMosaicItem:s,shaping:o,anchor:a}=e,l=this.zoom,h=this.layer,x=!!s;let c=!0;x&&(c=t?.optional||!s);const d=o&&o.length>0,f=!d||n?.optional;let g,y;if(x&&(g=this._placementEngine.getIconPlacement(a,s,t)),(g||c)&&(d&&(y=this._placementEngine.getTextPlacement(a,o,i,n)),y||f)){if(g&&y||(f||c?f||y?c||g||(y=null):g=null:(g=null,y=null)),y){const t=h.hasDataDrivenText?h.textMaterial.encodeAttributes(e.symbolFeature.feature,l,h):null;if(this._storePlacedGlyphs(e,y.shapes,l,n.rotationAlignment,t),y.textColliders){e.textColliders=y.textColliders;for(const e of y.textColliders){e.minLod=Math.max(l+r(e.minLod),0),e.maxLod=Math.min(l+r(e.maxLod),25);const t=e.angle;if(t){const n=Math.cos(t),i=Math.sin(t),s=e.dxPixels*n-e.dyPixels*i,o=e.dxPixels*i+e.dyPixels*n,a=(e.dxPixels+e.width)*n-e.dyPixels*i,r=(e.dxPixels+e.width)*i+e.dyPixels*n,l=e.dxPixels*n-(e.dyPixels+e.height)*i,h=e.dxPixels*i+(e.dyPixels+e.height)*n,x=(e.dxPixels+e.width)*n-(e.dyPixels+e.height)*i,c=(e.dxPixels+e.width)*i+(e.dyPixels+e.height)*n,d=Math.min(s,a,l,x),f=Math.max(s,a,l,x),g=Math.min(o,r,h,c),y=Math.max(o,r,h,c);e.dxPixels=d,e.dyPixels=g,e.width=f-d,e.height=y-g}}}}if(g){const n=h.hasDataDrivenIcon?h.iconMaterial.encodeAttributes(e.symbolFeature.feature,l,h):null;if(this._addPlacedIcons(e,g.shapes,l,s.page,t.rotationAlignment===u.VIEWPORT,n),g.iconColliders){e.iconColliders=g.iconColliders;for(const e of g.iconColliders){e.minLod=Math.max(l+r(e.minLod),0),e.maxLod=Math.min(l+r(e.maxLod),25);const t=e.angle;if(t){const n=Math.cos(t),i=Math.sin(t),s=e.dxPixels*n-e.dyPixels*i,o=e.dxPixels*i+e.dyPixels*n,a=(e.dxPixels+e.width)*n-e.dyPixels*i,r=(e.dxPixels+e.width)*i+e.dyPixels*n,l=e.dxPixels*n-(e.dyPixels+e.height)*i,h=e.dxPixels*i+(e.dyPixels+e.height)*n,x=(e.dxPixels+e.width)*n-(e.dyPixels+e.height)*i,c=(e.dxPixels+e.width)*i+(e.dyPixels+e.height)*n,d=Math.min(s,a,l,x),f=Math.max(s,a,l,x),g=Math.min(o,r,h,c),y=Math.max(o,r,h,c);e.dxPixels=d,e.dyPixels=g,e.width=f-d,e.height=y-g}}}}}}_addPlacedIcons(e,t,n,i,s,o){const a=Math.max(n-1,0),l=this._iconVertexBuffer,h=this._iconIndexBuffer,x=this._markerMap;for(const c of t){const t=s?0:Math.max(n+r(c.minzoom),a),d=s?25:Math.min(n+r(c.maxzoom),25);if(d<=t)continue;const f=c.tl,g=c.tr,y=c.bl,m=c.br,u=c.mosaicRect,p=c.labelAngle,_=c.minAngle,M=c.maxAngle,P=c.anchor,I=l.index,b=u.x,A=u.y,L=b+u.width,V=A+u.height,T=l.index;l.add(P.x,P.y,f.x,f.y,b,A,p,_,M,t,d,o),l.add(P.x,P.y,g.x,g.y,L,A,p,_,M,t,d,o),l.add(P.x,P.y,y.x,y.y,b,V,p,_,M,t,d,o),l.add(P.x,P.y,m.x,m.y,L,V,p,_,M,t,d,o),e.iconVertexRanges.length>0&&e.iconVertexRanges[0][0]+e.iconVertexRanges[0][1]===T?e.iconVertexRanges[0][1]+=4:e.iconVertexRanges.push([T,4]),h.add(I,I+1,I+2),h.add(I+1,I+2,I+3),x.has(i)?x.get(i)[1]+=6:x.set(i,[this._iconIndexStart+this._iconIndexCount,6]),this._iconIndexCount+=6}}_addPlacedGlyphs(){const e=this._textVertexBuffer,t=this._textIndexBuffer,n=this._glyphMap;for(const[i,s]of this._glyphBufferDataStorage)for(const o of s){const s=e.index,a=o.symbolInstance,r=o.ddAttributes,l=e.index;e.add(o.glyphAnchor[0],o.glyphAnchor[1],o.tl[0],o.tl[1],o.xmin,o.ymin,o.labelAngle,o.minAngle,o.maxAngle,o.minLod,o.maxLod,r),e.add(o.glyphAnchor[0],o.glyphAnchor[1],o.tr[0],o.tr[1],o.xmax,o.ymin,o.labelAngle,o.minAngle,o.maxAngle,o.minLod,o.maxLod,r),e.add(o.glyphAnchor[0],o.glyphAnchor[1],o.bl[0],o.bl[1],o.xmin,o.ymax,o.labelAngle,o.minAngle,o.maxAngle,o.minLod,o.maxLod,r),e.add(o.glyphAnchor[0],o.glyphAnchor[1],o.br[0],o.br[1],o.xmax,o.ymax,o.labelAngle,o.minAngle,o.maxAngle,o.minLod,o.maxLod,r),a.textVertexRanges.length>0&&a.textVertexRanges[0][0]+a.textVertexRanges[0][1]===l?a.textVertexRanges[0][1]+=4:a.textVertexRanges.push([l,4]),t.add(s,s+1,s+2),t.add(s+1,s+2,s+3),n.has(i)?n.get(i)[1]+=6:n.set(i,[this._textIndexStart+this._textIndexCount,6]),this._textIndexCount+=6}this._glyphBufferDataStorage.clear()}_storePlacedGlyphs(e,t,n,i,s){const o=Math.max(n-1,0),a=i===u.VIEWPORT;let l,h,x,c,d,f,g,y,m,p,_;for(const u of t){if(l=a?0:Math.max(n+r(u.minzoom),o),h=a?25:Math.min(n+r(u.maxzoom),25),h<=l)continue;x=u.tl,c=u.tr,d=u.bl,f=u.br,g=u.labelAngle,y=u.minAngle,m=u.maxAngle,p=u.anchor,_=u.mosaicRect,this._glyphBufferDataStorage.has(u.page)||this._glyphBufferDataStorage.set(u.page,[]);this._glyphBufferDataStorage.get(u.page).push({glyphAnchor:[p.x,p.y],tl:[x.x,x.y],tr:[c.x,c.y],bl:[d.x,d.y],br:[f.x,f.y],xmin:_.x,ymin:_.y,xmax:_.x+_.width,ymax:_.y+_.height,labelAngle:g,minAngle:y,maxAngle:m,minLod:l,maxLod:h,placementLod:o,symbolInstance:e,ddAttributes:s})}}static _pushAnchors(e,t,n,i){n+=i;let o=0;const a=t.length-1;for(let l=0;l<a;l++)o+=s.distance(t[l],t[l+1]);let r=i||n;if(r*=.5,o<=r)return;const h=r/o;let c=0,d=-(n=o/Math.max(Math.round(o/n),1))/2;const f=t.length-1;for(let s=0;s<f;s++){const i=t[s],o=t[s+1],a=o.x-i.x,r=o.y-i.y,f=Math.sqrt(a*a+r*r);let g;for(;d+n<c+f;){d+=n;const t=(d-c)/f,y=l(i.x,o.x,t),m=l(i.y,o.y,t);void 0===g&&(g=Math.atan2(r,a)),e.push(new x(y,m,g,s,h))}c+=f}}static _pushCenterAnchor(e,t){let n=0;const i=t.length-1;for(let l=0;l<i;l++)n+=s.distance(t[l],t[l+1]);const o=n/2;let a=0;const r=t.length-1;for(let s=0;s<r;s++){const n=t[s],i=t[s+1],r=i.x-n.x,h=i.y-n.y,c=Math.sqrt(r*r+h*h);if(o<a+c){const t=(o-a)/c,d=l(n.x,i.x,t),f=l(n.y,i.y,t),g=Math.atan2(h,r);return void e.push(new x(d,f,g,s,0))}a+=c}}static _deviation(e,t,n){const i=(t.x-e.x)*(n.x-t.x)+(t.y-e.y)*(n.y-t.y),s=(t.x-e.x)*(n.y-t.y)-(t.y-e.y)*(n.x-t.x);return Math.atan2(s,i)}static _honorsTextMaxAngle(e,t,n,i,o){let a=0;const r=n/2;let l=new s(t.x,t.y),h=t.segment+1;for(;a>-r;){if(--h,h<0)return!1;a-=s.distance(e[h],l),l=e[h]}a+=s.distance(e[h],e[h+1]);const x=[];let c=0;const d=e.length;for(;a<r;){const t=e[h];let n,r=h;do{if(++r,r===d)return!1;n=e[r]}while(n.isEqual(t));let l,f=r;do{if(++f,f===d)return!1;l=e[f]}while(l.isEqual(n));const g=this._deviation(t,n,l);for(x.push({deviation:g,distToAnchor:a}),c+=g;a-x[0].distToAnchor>o;)c-=x.shift().deviation;if(Math.abs(c)>i)return!1;a+=s.distance(n,l),h=r}return!0}static _smoothVertices(e,t){if(t<=0)return e;let n=e.length;if(n<3)return e;const i=[];let o=0,a=0;i.push(0);for(let y=1;y<n;y++){const t=s.distance(e[y],e[y-1]);t>0&&(o+=t,i.push(o),a++,a!==y&&(e[a]=e[y]))}if(n=a+1,n<3)return e;t=Math.min(t,.2*o);const r=e[0].x,l=e[0].y,h=e[n-1].x,x=e[n-1].y,c=s.sub(e[0],e[1]);c.normalize(),e[0].x+=t*c.x,e[0].y+=t*c.y,c.assignSub(e[n-1],e[n-2]),c.normalize(),e[n-1].x+=t*c.x,e[n-1].y+=t*c.y,i[0]-=t,i[n-1]+=t;const d=[];d.push(new s(r,l));const f=1e-6,g=.5*t;for(let y=1;y<n-1;y++){let o=0,a=0,r=0;for(let n=y-1;n>=0;n--){const s=g+i[n+1]-i[y];if(s<0)break;const l=i[n+1]-i[n],h=i[y]-i[n]<g?1:s/l;if(h<f)break;const x=h*h,c=h*s-.5*x*l,d=h*l/t,m=e[n+1],u=e[n].x-m.x,p=e[n].y-m.y;o+=d/c*(m.x*h*s+.5*x*(s*u-l*m.x)-x*h*l*u/3),a+=d/c*(m.y*h*s+.5*x*(s*p-l*m.y)-x*h*l*p/3),r+=d}for(let s=y+1;s<n;s++){const n=g-i[s-1]+i[y];if(n<0)break;const l=i[s]-i[s-1],h=i[s]-i[y]<g?1:n/l;if(h<f)break;const x=h*h,c=h*n-.5*x*l,d=h*l/t,m=e[s-1],u=e[s].x-m.x,p=e[s].y-m.y;o+=d/c*(m.x*h*n+.5*x*(n*u-l*m.x)-x*h*l*u/3),a+=d/c*(m.y*h*n+.5*x*(n*p-l*m.y)-x*h*l*p/3),r+=d}d.push(new s(o/r,a/r))}return d.push(new s(h,x)),e[0].x=r,e[0].y=l,e[n-1].x=h,e[n-1].y=x,d}static _pushCentroid(e,t){const n=0,i=0,s=4096,o=4096,a=t.length-1;let r=0,l=0,h=0,c=t[0].x,d=t[0].y;c>s&&(c=s),c<n&&(c=n),d>o&&(d=o),d<i&&(d=i);for(let x=1;x<a;x++){let e=t[x].x,a=t[x].y,f=t[x+1].x,g=t[x+1].y;e>s&&(e=s),e<n&&(e=n),a>o&&(a=o),a<i&&(a=i),f>s&&(f=s),f<n&&(f=n),g>o&&(g=o),g<i&&(g=i);const y=(e-c)*(g-d)-(f-c)*(a-d);r+=y*(c+e+f),l+=y*(d+a+g),h+=y}r/=3*h,l/=3*h,isNaN(r)||isNaN(l)||e.push(new x(r,l))}}L._bidiEngine=new e;export{L as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../../request.js";import t from"../../../../core/pbf.js";class a{constructor(e){for(this._metrics=[],this._bitmaps=[];e.next();)switch(e.tag()){case 1:{const t=e.getMessage();for(;t.next();)switch(t.tag()){case 3:{const e=t.getMessage();let a,s,r,n,i,c,g;for(;e.next();)switch(e.tag()){case 1:a=e.getUInt32();break;case 2:s=e.getBytes();break;case 3:r=e.getUInt32();break;case 4:n=e.getUInt32();break;case 5:i=e.getSInt32();break;case 6:c=e.getSInt32();break;case 7:g=e.getUInt32();break;default:e.skip()}e.release(),a&&(this._metrics[a]={width:r,height:n,left:i,top:c,advance:g},this._bitmaps[a]=s);break}default:t.skip()}t.release();break}default:e.skip()}}getMetrics(e){return this._metrics[e]}getBitmap(e){return this._bitmaps[e]}}class s{constructor(){this._ranges=[]}getRange(e){return this._ranges[e]}addRange(e,t){this._ranges[e]=t}}class r{constructor(e){this._glyphInfo={},this._baseURL=e}getRange(s,r,n){const i=this._getFontStack(s);if(i.getRange(r))return Promise.resolve();const c=256*r,g=c+255,o=this._baseURL.replace("{fontstack}",s).replace("{range}",c+"-"+g);return e(o,{responseType:"array-buffer",...n}).then((e=>{i.addRange(r,new a(new t(new Uint8Array(e.data),new DataView(e.data))))}))}async preloadASCIIRange(s){const r=this._getFontStack(s),n=0,i=255,c=this._baseURL.replace("{fontstack}",s).replace("{range}",n+"-"+i),g=await e(c,{responseType:"array-buffer"}),o=new a(new t(new Uint8Array(g.data),new DataView(g.data)));for(let e=n;e<=i;e++)r.getRange(e)||r.addRange(e,o)}getGlyph(e,t){const a=this._getFontStack(e);if(!a)return;const s=Math.floor(t/256);if(s>256)return;const r=a.getRange(s);return r?{metrics:r.getMetrics(t),bitmap:r.getBitmap(t)}:void 0}_getFontStack(e){let t=this._glyphInfo[e];return t||(t=this._glyphInfo[e]=new s),t}}export{r as default};
5
+ import e from"../../../../request.js";import t from"../../../../core/pbf.js";class a{constructor(e){for(this._metrics=[],this._bitmaps=[];e.next();)switch(e.tag()){case 1:{const t=e.getMessage();for(;t.next();)switch(t.tag()){case 3:{const e=t.getMessage();let a,s,r,n,i,c,g;for(;e.next();)switch(e.tag()){case 1:a=e.getUInt32();break;case 2:s=e.getBytes();break;case 3:r=e.getUInt32();break;case 4:n=e.getUInt32();break;case 5:i=e.getSInt32();break;case 6:c=e.getSInt32();break;case 7:g=e.getUInt32();break;default:e.skip()}e.release(),a&&(this._metrics[a]={width:r,height:n,left:i,top:c,advance:g},this._bitmaps[a]=s);break}default:t.skip()}t.release();break}default:e.skip()}}getMetrics(e){return this._metrics[e]}getBitmap(e){return this._bitmaps[e]}}class s{constructor(){this._ranges=[]}getRange(e){return this._ranges[e]}addRange(e,t){this._ranges[e]=t}}class r{constructor(e){this._glyphInfo={},this._baseURL=e}getRange(s,r,n){const i=this._getFontStack(s);if(i.getRange(r))return Promise.resolve();const c=256*r,g=c+255,o=this._baseURL.replace("{fontstack}",s).replace("{range}",c+"-"+g);return e(o,{responseType:"array-buffer",...n}).then((e=>{i.addRange(r,new a(new t(new Uint8Array(e.data),new DataView(e.data))))}))}async preloadASCIIRange(s){const r=this._getFontStack(s),n=0,i=255,c=this._baseURL.replace("{fontstack}",s).replace("{range}",n+"-"+i),g=await e(c,{responseType:"array-buffer"}),o=new a(new t(new Uint8Array(g.data),new DataView(g.data)));for(let e=n;e<=i;e++)r.getRange(e)||r.addRange(e,o)}getGlyph(e,t){const a=this._getFontStack(e);if(!a)return;const s=Math.floor(t/256),r=a.getRange(s);return r?{metrics:r.getMetrics(t),bitmap:r.getBitmap(t)}:void 0}_getFontStack(e){let t=this._glyphInfo[e];return t||(t=this._glyphInfo[e]=new s),t}}export{r as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import"../../../geometry.js";import"../../../Graphic.js";import"../../../renderers/ClassBreaksRenderer.js";import"../../../renderers/DictionaryRenderer.js";import"../../../renderers/DotDensityRenderer.js";import"../../../renderers/HeatmapRenderer.js";import"../../../renderers/PieChartRenderer.js";import"../../../renderers/Renderer.js";import"../../../renderers/SimpleRenderer.js";import"../../../renderers/UniqueValueRenderer.js";import"../../../renderers/support/jsonUtils.js";import"../../../symbols.js";import t from"../../../core/Collection.js";import"../../../core/has.js";import r from"../../../core/Logger.js";import{getOrCreateMapValue as i}from"../../../core/MapUtils.js";import{isAbortError as s}from"../../../core/promiseUtils.js";import{on as n}from"../../../core/reactiveUtils.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import"../../../core/arrayUtils.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";import{create as a}from"../../../geometry/support/aaBoundingRect.js";import{ringsContainsCoords as m}from"../../../geometry/support/contains.js";import{extentIntersectsPolygon as p}from"../../../geometry/support/intersectsBase.js";import{MediaElementView as c}from"../../../layers/support/MediaElementView.js";import"../../../core/Error.js";import"../../../core/scheduling.js";import"../../../request.js";import"../../../chunks/index2.js";import"../../../core/urlUtils.js";import"../../../chunks/index3.js";import"../../../layers/effects/EffectView.js";import"../engine/DisplayObject.js";import"../engine/webgl/effects/highlight/HighlightGradient.js";import"../engine/webgl/BufferPool.js";import"../engine/webgl/enums.js";import"../engine/webgl/brushes/BrushBitmap.js";import"../../../chunks/vec4f32.js";import"../engine/webgl/Utils.js";import"../engine/webgl/shaders/BackgroundPrograms.js";import"../../webgl/enums.js";import"../../webgl/checkWebGLError.js";import"../../webgl/contextUtils.js";import"../../../chunks/builtins.js";import"../engine/webgl/definitions.js";import"../../../core/RandomLCG.js";import"../engine/webgl/materialKey/MaterialKey.js";import"../engine/webgl/techniques/Technique.js";import"../engine/webgl/techniques/dotDensity/TechniqueDotDensity.js";import"../engine/webgl/techniques/heatmap/TechniqueHeatmap.js";import"../engine/webgl/techniques/pieChart/TechniquePieChart.js";import"../../webgl/BufferObject.js";import"../../webgl/FramebufferObject.js";import"../../webgl/GLObjectType.js";import"../../webgl/Texture.js";import"../../webgl/VertexArrayObject.js";import"../engine/webgl/brushes/WGLBrushHeatmap.js";import"../engine/webgl/DefaultVertexAttributeLayouts.js";import"../engine/webgl/shaders/TileInfoPrograms.js";import"../engine/webgl/brushes/WGLGeometryBrushMarker.js";import"../../../core/mathUtils.js";import"../engine/webgl/number.js";import"../engine/vectorTiles/style/StyleDefinition.js";import"../../../chunks/vec2f32.js";import"../engine/vectorTiles/enums.js";import"../engine/vectorTiles/shaders/sources/resolver.js";import"../engine/webgl/shaders/BitBlitPrograms.js";import"../engine/webgl/shaders/sources/resolver.js";import"../engine/webgl/TextureManager.js";import"../engine/webgl/shaders/StencilPrograms.js";import"../engine/webgl/effects/BlendEffect.js";import"../engine/webgl/shaders/HighlightPrograms.js";import"../engine/webgl/Profiler.js";import"../../webgl/renderState.js";import"../../3d/webgl-engine/core/shaderModules/interfaces.js";import"../../../core/floatRGBA.js";import"../../3d/webgl-engine/lib/OrderIndependentTransparency.js";import"../LabelManager.js";import"./graphics/GraphicsView2D.js";import"../engine/webgl/AttributeStoreView.js";import"../../../chunks/earcut.js";import"../../../layers/graphics/featureConversionUtils.js";import"../../../core/unitUtils.js";import"../../../renderers/support/lengthUtils.js";import"../../../chunks/vec3f32.js";import"../../../geometry/support/normalizeUtils.js";import"../navigation/MapViewNavigation.js";import"../../../core/asyncUtils.js";import"../engine/webgl/shaders/MagnifierPrograms.js";import"../tiling/PagedTileQueue.js";import"../tiling/TileInfoView.js";import"../tiling/TileKey.js";import h from"../tiling/TileQueue.js";import u from"../tiling/TileStrategy.js";import d from"../engine/webgl/Overlay.js";import g from"../engine/webgl/OverlayContainer.js";import{LayerView2DMixin as f}from"./LayerView2D.js";import j from"../../layers/LayerView.js";import y from"../../../geometry/Extent.js";let w=class extends(f(j)){constructor(){super(...arguments),this._overlayContainer=null,this._fetchQueue=null,this._tileStrategy=null,this._elementReferences=new Map,this._debugGraphicsView=null,this.layer=null,this.elements=new t}attach(){this.addAttachHandles([n((()=>this.layer.effectiveSource),"refresh",(()=>{for(const e of this._tileStrategy.tiles)this._updateTile(e);this.requestUpdate()})),n((()=>this.layer.effectiveSource),"change",(({element:e})=>this._elementUpdateHandler(e)))]),this._overlayContainer=new g,this.container.addChild(this._overlayContainer),this._fetchQueue=new h({tileInfoView:this.view.featuresTilingScheme,concurrency:10,process:(e,t)=>this._queryElements(e,t)}),this._tileStrategy=new u({cachePolicy:"purge",resampling:!0,acquireTile:e=>this._acquireTile(e),releaseTile:e=>this._releaseTile(e),tileInfoView:this.view.featuresTilingScheme}),this.requestUpdate()}detach(){this.elements.removeAll(),this._tileStrategy.destroy(),this._fetchQueue.destroy(),this._overlayContainer.removeAllChildren(),this.container.removeAllChildren(),this._elementReferences.clear(),this._debugGraphicsView?.destroy()}supportsSpatialReference(e){return!0}moveStart(){this.requestUpdate()}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}update(e){this._tileStrategy.update(e),this._debugGraphicsView?.update(e)}async hitTest(e,t){const r=[],i=e.normalize(),s=[i.x,i.y];for(const{projectedElement:{normalizedCoords:n,element:o}}of this._elementReferences.values())null!=n&&m(n.rings,s)&&r.push({type:"media",element:o,layer:this.layer,mapPoint:e});return r.reverse()}canResume(){return null!=this.layer.source&&super.canResume()}async doRefresh(){this._fetchQueue.reset(),this._tileStrategy.tiles.forEach((e=>this._updateTile(e)))}_acquireTile(e){const t=new T(e.clone());return this._updateTile(t),t}_updateTile(e){this.updatingHandles.addPromise(this._fetchQueue.push(e.key).then((t=>{const[r,i]=e.setElements(t);this._referenceElements(e,r),this._dereferenceElements(e,i),this.requestUpdate()}),(e=>{s(e)||r.getLogger(this).error(e)})))}_releaseTile(e){this._fetchQueue.abort(e.key.id),e.elements&&this._dereferenceElements(e,e.elements),this.requestUpdate()}async _queryElements(e,t){const r=this.layer.effectiveSource;if(null==r)return[];this.view.featuresTilingScheme.getTileBounds(b,e,!0);const i=new y({xmin:b[0],ymin:b[1],xmax:b[2],ymax:b[3],spatialReference:this.view.spatialReference});return r.queryElements(i,t)}_referenceElements(e,t){if(null!=this.layer.source)for(const r of t)this._referenceElement(e,r)}_referenceElement(e,t){i(this._elementReferences,t.uid,(()=>{const e=new c({element:t,spatialReference:this.view.spatialReference}),r=new d(e);this._overlayContainer.addChild(r),this.elements.add(t);let i=null;return{tiles:new Set,projectedElement:e,overlay:r,debugGraphic:i}})).tiles.add(e)}_dereferenceElements(e,t){for(const r of t)this._dereferenceElement(e,r)}_dereferenceElement(e,t){const r=this._elementReferences.get(t.uid);r.tiles.delete(e),r.tiles.size||(this._overlayContainer.removeChild(r.overlay),r.overlay.destroy(),r.projectedElement.destroy(),this._elementReferences.delete(t.uid),this.elements.remove(t),this._debugGraphicsView?.graphics.remove(r.debugGraphic))}_elementUpdateHandler(e){let t=this._elementReferences.get(e.uid);if(t){const r=t.projectedElement.normalizedCoords;if(null==r)return this._overlayContainer.removeChild(t.overlay),t.overlay.destroy(),t.projectedElement.destroy(),this._elementReferences.delete(e.uid),this.elements.remove(e),void this._debugGraphicsView?.graphics.remove(t.debugGraphic);const i=[],s=[];for(const e of this._tileStrategy.tiles){const n=v(this.view.featuresTilingScheme,e,r);t.tiles.has(e)?n||s.push(e):n&&i.push(e)}for(const t of i)this._referenceElement(t,e);for(const t of s)this._dereferenceElement(t,e);return t=this._elementReferences.get(e.uid),void(t?.debugGraphic&&(t.debugGraphic.geometry=t.projectedElement.normalizedCoords,this._debugGraphicsView.graphicUpdateHandler({graphic:t.debugGraphic,property:"geometry"})))}const r=new c({element:e,spatialReference:this.view.spatialReference}).normalizedCoords;if(null!=r)for(const i of this._tileStrategy.tiles){v(this.view.featuresTilingScheme,i,r)&&this._referenceElement(i,e)}}};e([o()],w.prototype,"_fetchQueue",void 0),e([o()],w.prototype,"layer",void 0),e([o({readOnly:!0})],w.prototype,"elements",void 0),w=e([l("esri.views.2d.layers.MediaLayerView2D")],w);const b=a(),_={xmin:0,ymin:0,xmax:0,ymax:0};function v(e,t,r){return e.getTileBounds(b,t.key,!0),_.xmin=b[0],_.ymin=b[1],_.xmax=b[2],_.ymax=b[3],p(_,r)}class T{constructor(e){this.key=e,this.elements=null,this.isReady=!1,this.visible=!0}setElements(e){const t=[],r=new Set(this.elements);this.elements=e;for(const i of e)r.has(i)?r.delete(i):t.push(i);return this.isReady=!0,[t,Array.from(r)]}destroy(){}}const R=w;export{R as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import"../../../geometry.js";import"../../../Graphic.js";import"../../../renderers/ClassBreaksRenderer.js";import"../../../renderers/DictionaryRenderer.js";import"../../../renderers/DotDensityRenderer.js";import"../../../renderers/HeatmapRenderer.js";import"../../../renderers/PieChartRenderer.js";import"../../../renderers/Renderer.js";import"../../../renderers/SimpleRenderer.js";import"../../../renderers/UniqueValueRenderer.js";import"../../../renderers/support/jsonUtils.js";import"../../../symbols.js";import t from"../../../core/Collection.js";import"../../../core/has.js";import r from"../../../core/Logger.js";import{getOrCreateMapValue as s}from"../../../core/MapUtils.js";import{isAbortError as i}from"../../../core/promiseUtils.js";import{on as n}from"../../../core/reactiveUtils.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import"../../../core/arrayUtils.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";import{create as a}from"../../../geometry/support/aaBoundingRect.js";import{ringsContainsCoords as m}from"../../../geometry/support/contains.js";import{extentIntersectsPolygon as p}from"../../../geometry/support/intersectsBase.js";import{MediaElementView as c}from"../../../layers/support/MediaElementView.js";import"../../../core/Error.js";import"../../../core/scheduling.js";import"../../../request.js";import"../../../chunks/index2.js";import"../../../core/urlUtils.js";import"../../../chunks/index3.js";import"../../../layers/effects/EffectView.js";import"../engine/DisplayObject.js";import"../engine/webgl/effects/highlight/HighlightGradient.js";import"../engine/webgl/BufferPool.js";import"../engine/webgl/enums.js";import"../engine/webgl/brushes/BrushBitmap.js";import"../../../chunks/vec4f32.js";import"../engine/webgl/Utils.js";import"../engine/webgl/shaders/BackgroundPrograms.js";import"../../webgl/enums.js";import"../../webgl/checkWebGLError.js";import"../../webgl/contextUtils.js";import"../../../chunks/builtins.js";import"../engine/webgl/definitions.js";import"../../../core/RandomLCG.js";import"../engine/webgl/materialKey/MaterialKey.js";import"../engine/webgl/techniques/Technique.js";import"../engine/webgl/techniques/dotDensity/TechniqueDotDensity.js";import"../engine/webgl/techniques/heatmap/TechniqueHeatmap.js";import"../engine/webgl/techniques/pieChart/TechniquePieChart.js";import"../../webgl/BufferObject.js";import"../../webgl/FramebufferObject.js";import"../../webgl/GLObjectType.js";import"../../webgl/Texture.js";import"../../webgl/VertexArrayObject.js";import"../engine/webgl/brushes/WGLBrushHeatmap.js";import"../engine/webgl/DefaultVertexAttributeLayouts.js";import"../engine/webgl/shaders/TileInfoPrograms.js";import"../engine/webgl/brushes/WGLGeometryBrushMarker.js";import"../../../core/mathUtils.js";import"../engine/webgl/number.js";import"../engine/vectorTiles/style/StyleDefinition.js";import"../../../chunks/vec2f32.js";import"../engine/vectorTiles/enums.js";import"../engine/vectorTiles/shaders/sources/resolver.js";import"../engine/webgl/shaders/BitBlitPrograms.js";import"../engine/webgl/shaders/sources/resolver.js";import"../engine/webgl/TextureManager.js";import"../engine/webgl/shaders/StencilPrograms.js";import"../engine/webgl/effects/BlendEffect.js";import"../engine/webgl/shaders/HighlightPrograms.js";import"../engine/webgl/Profiler.js";import"../../webgl/renderState.js";import"../../3d/webgl-engine/core/shaderModules/interfaces.js";import"../../../core/floatRGBA.js";import"../../3d/webgl-engine/lib/OrderIndependentTransparency.js";import"../LabelManager.js";import"./graphics/GraphicsView2D.js";import"../../../core/accessorSupport/tracking/Flags.js";import"../engine/webgl/AttributeStoreView.js";import"../../../chunks/earcut.js";import"../../../layers/graphics/featureConversionUtils.js";import"../../../core/unitUtils.js";import"../../../renderers/support/lengthUtils.js";import"../../../chunks/vec3f32.js";import"../../../geometry/support/normalizeUtils.js";import"../navigation/MapViewNavigation.js";import"../../../core/asyncUtils.js";import"../engine/webgl/shaders/MagnifierPrograms.js";import"../tiling/PagedTileQueue.js";import"../tiling/TileInfoView.js";import"../tiling/TileKey.js";import h from"../tiling/TileQueue.js";import u from"../tiling/TileStrategy.js";import d from"../engine/webgl/Overlay.js";import g from"../engine/webgl/OverlayContainer.js";import{LayerView2DMixin as f}from"./LayerView2D.js";import j from"../../layers/LayerView.js";import y from"../../../geometry/Extent.js";let w=class extends(f(j)){constructor(){super(...arguments),this._overlayContainer=null,this._fetchQueue=null,this._tileStrategy=null,this._elementReferences=new Map,this._debugGraphicsView=null,this.layer=null,this.elements=new t}attach(){this.addAttachHandles([n((()=>this.layer.effectiveSource),"refresh",(()=>{for(const e of this._tileStrategy.tiles)this._updateTile(e);this.requestUpdate()})),n((()=>this.layer.effectiveSource),"change",(({element:e})=>this._elementUpdateHandler(e)))]),this._overlayContainer=new g,this.container.addChild(this._overlayContainer),this._fetchQueue=new h({tileInfoView:this.view.featuresTilingScheme,concurrency:10,process:(e,t)=>this._queryElements(e,t)}),this._tileStrategy=new u({cachePolicy:"purge",resampling:!0,acquireTile:e=>this._acquireTile(e),releaseTile:e=>this._releaseTile(e),tileInfoView:this.view.featuresTilingScheme}),this.requestUpdate()}detach(){this.elements.removeAll(),this._tileStrategy.destroy(),this._fetchQueue.destroy(),this._overlayContainer.removeAllChildren(),this.container.removeAllChildren(),this._elementReferences.clear(),this._debugGraphicsView?.destroy()}supportsSpatialReference(e){return!0}moveStart(){this.requestUpdate()}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}update(e){this._tileStrategy.update(e),this._debugGraphicsView?.update(e)}async hitTest(e,t){const r=[],s=e.normalize(),i=[s.x,s.y];for(const{projectedElement:{normalizedCoords:n,element:o}}of this._elementReferences.values())null!=n&&m(n.rings,i)&&r.push({type:"media",element:o,layer:this.layer,mapPoint:e});return r.reverse()}canResume(){return null!=this.layer.source&&super.canResume()}async doRefresh(){this._fetchQueue.reset(),this._tileStrategy.tiles.forEach((e=>this._updateTile(e)))}_acquireTile(e){const t=new T(e.clone());return this._updateTile(t),t}_updateTile(e){this.updatingHandles.addPromise(this._fetchQueue.push(e.key).then((t=>{const[r,s]=e.setElements(t);this._referenceElements(e,r),this._dereferenceElements(e,s),this.requestUpdate()}),(e=>{i(e)||r.getLogger(this).error(e)})))}_releaseTile(e){this._fetchQueue.abort(e.key.id),e.elements&&this._dereferenceElements(e,e.elements),this.requestUpdate()}async _queryElements(e,t){const r=this.layer.effectiveSource;if(null==r)return[];this.view.featuresTilingScheme.getTileBounds(b,e,!0);const s=new y({xmin:b[0],ymin:b[1],xmax:b[2],ymax:b[3],spatialReference:this.view.spatialReference});return r.queryElements(s,t)}_referenceElements(e,t){if(null!=this.layer.source)for(const r of t)this._referenceElement(e,r)}_referenceElement(e,t){s(this._elementReferences,t.uid,(()=>{const e=new c({element:t,spatialReference:this.view.spatialReference}),r=new d(e);this._overlayContainer.addChild(r),this.elements.add(t);let s=null;return{tiles:new Set,projectedElement:e,overlay:r,debugGraphic:s}})).tiles.add(e)}_dereferenceElements(e,t){for(const r of t)this._dereferenceElement(e,r)}_dereferenceElement(e,t){const r=this._elementReferences.get(t.uid);r.tiles.delete(e),r.tiles.size||(this._overlayContainer.removeChild(r.overlay),r.overlay.destroy(),r.projectedElement.destroy(),this._elementReferences.delete(t.uid),this.elements.remove(t),this._debugGraphicsView?.graphics.remove(r.debugGraphic))}_elementUpdateHandler(e){let t=this._elementReferences.get(e.uid);if(t){const r=t.projectedElement.normalizedCoords;if(null==r)return this._overlayContainer.removeChild(t.overlay),t.overlay.destroy(),t.projectedElement.destroy(),this._elementReferences.delete(e.uid),this.elements.remove(e),void this._debugGraphicsView?.graphics.remove(t.debugGraphic);const s=[],i=[];for(const e of this._tileStrategy.tiles){const n=v(this.view.featuresTilingScheme,e,r);t.tiles.has(e)?n||i.push(e):n&&s.push(e)}for(const t of s)this._referenceElement(t,e);for(const t of i)this._dereferenceElement(t,e);return t=this._elementReferences.get(e.uid),void(t?.debugGraphic&&(t.debugGraphic.geometry=t.projectedElement.normalizedCoords,this._debugGraphicsView.graphicUpdateHandler({graphic:t.debugGraphic,property:"geometry"})))}const r=new c({element:e,spatialReference:this.view.spatialReference}).normalizedCoords;if(null!=r)for(const s of this._tileStrategy.tiles){v(this.view.featuresTilingScheme,s,r)&&this._referenceElement(s,e)}}};e([o()],w.prototype,"_fetchQueue",void 0),e([o()],w.prototype,"layer",void 0),e([o({readOnly:!0})],w.prototype,"elements",void 0),w=e([l("esri.views.2d.layers.MediaLayerView2D")],w);const b=a(),_={xmin:0,ymin:0,xmax:0,ymax:0};function v(e,t,r){return e.getTileBounds(b,t.key,!0),_.xmin=b[0],_.ymin=b[1],_.xmax=b[2],_.ymax=b[3],p(_,r)}class T{constructor(e){this.key=e,this.elements=null,this.isReady=!1,this.visible=!0}setElements(e){const t=[],r=new Set(this.elements);this.elements=e;for(const s of e)r.has(s)?r.delete(s):t.push(s);return this.isReady=!0,[t,Array.from(r)]}destroy(){}}const R=w;export{R as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import i from"../../../core/Logger.js";import{isAbortError as t}from"../../../core/promiseUtils.js";import{watch as r}from"../../../core/reactiveUtils.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{equals as l}from"../../../geometry/support/spatialReferenceUtils.js";import{GraphicsCollection as h}from"../../../support/GraphicsCollection.js";import"../../../core/Error.js";import"../../../core/scheduling.js";import"../../../request.js";import"../../../chunks/index2.js";import"../../../core/urlUtils.js";import"../../../chunks/index3.js";import"../../../layers/effects/EffectView.js";import"../engine/DisplayObject.js";import"../engine/webgl/effects/highlight/HighlightGradient.js";import"../engine/webgl/BufferPool.js";import"../engine/webgl/enums.js";import"../engine/webgl/brushes/BrushBitmap.js";import"../../../chunks/vec4f32.js";import"../engine/webgl/Utils.js";import"../engine/webgl/shaders/BackgroundPrograms.js";import"../../webgl/enums.js";import"../../webgl/checkWebGLError.js";import"../../webgl/contextUtils.js";import"../../../chunks/builtins.js";import"../engine/webgl/definitions.js";import"../../../core/RandomLCG.js";import"../engine/webgl/materialKey/MaterialKey.js";import"../engine/webgl/techniques/Technique.js";import"../engine/webgl/techniques/dotDensity/TechniqueDotDensity.js";import"../engine/webgl/techniques/heatmap/TechniqueHeatmap.js";import"../engine/webgl/techniques/pieChart/TechniquePieChart.js";import"../../webgl/BufferObject.js";import"../../webgl/FramebufferObject.js";import"../../webgl/GLObjectType.js";import"../../webgl/Texture.js";import"../../webgl/VertexArrayObject.js";import"../engine/webgl/brushes/WGLBrushHeatmap.js";import"../engine/webgl/DefaultVertexAttributeLayouts.js";import"../engine/webgl/shaders/TileInfoPrograms.js";import"../engine/webgl/brushes/WGLGeometryBrushMarker.js";import"../../../core/mathUtils.js";import"../engine/webgl/number.js";import"../engine/vectorTiles/style/StyleDefinition.js";import"../../../chunks/vec2f32.js";import"../engine/vectorTiles/enums.js";import"../engine/vectorTiles/shaders/sources/resolver.js";import"../engine/webgl/shaders/BitBlitPrograms.js";import"../engine/webgl/shaders/sources/resolver.js";import"../engine/webgl/TextureManager.js";import"../engine/webgl/shaders/StencilPrograms.js";import"../engine/webgl/effects/BlendEffect.js";import"../engine/webgl/shaders/HighlightPrograms.js";import"../engine/webgl/Profiler.js";import"../../webgl/renderState.js";import"../../3d/webgl-engine/core/shaderModules/interfaces.js";import"../../../core/floatRGBA.js";import"../../3d/webgl-engine/lib/OrderIndependentTransparency.js";import"../LabelManager.js";import a from"./graphics/GraphicsView2D.js";import"../engine/webgl/AttributeStoreView.js";import"../../../chunks/earcut.js";import"../../../layers/graphics/featureConversionUtils.js";import"../../../core/unitUtils.js";import"../../../renderers/support/lengthUtils.js";import"../../../chunks/vec3f32.js";import"../../../geometry/support/normalizeUtils.js";import"../navigation/MapViewNavigation.js";import"../../../core/asyncUtils.js";import"../engine/webgl/shaders/MagnifierPrograms.js";import{BitmapTileLayerView2D as n}from"./BitmapTileLayerView2D.js";import{LayerView2DMixin as p}from"./LayerView2D.js";import g from"./graphics/HighlightGraphicContainer.js";import{createBlankImage as c,resampleImage as m}from"./support/imageUtils.js";import u from"../tiling/TileInfoView.js";import f from"../tiling/TileKey.js";import w from"../tiling/TileQueue.js";import j from"../tiling/TileStrategy.js";import d from"../../layers/LayerView.js";import y from"../../layers/RefreshableLayerView.js";import{isMapServiceLayerView as b,MapServiceLayerViewHelper as _}from"../../layers/support/MapServiceLayerViewHelper.js";import{createQueryGeometry as T}from"../../support/drapedUtils.js";const V=[0,0];let v=class extends(y(n(p(d)))){constructor(){super(...arguments),this._fetchQueue=null,this._highlightGraphics=new h,this._highlightView=null,this._popupHighlightHelper=null,this._tileStrategy=null,this.layer=null}get resampling(){return!("resampling"in this.layer)||!1!==this.layer.resampling}get tilemapCache(){return"tilemapCache"in this.layer?this.layer.tilemapCache:null}update(e){this._fetchQueue.pause(),this._fetchQueue.state=e.state,this._tileStrategy.update(e),this._fetchQueue.resume(),this._highlightView?.processUpdate(e)}attach(){const e="tileServers"in this.layer?this.layer.tileServers:null,i=this.tilemapCache;if(this._tileInfoView=new u(this.layer.tileInfo,this.layer.fullExtent,i?.effectiveMinLOD,i?.effectiveMaxLOD),this._fetchQueue=new w({tileInfoView:this._tileInfoView,concurrency:e&&10*e.length||10,process:(e,i)=>this.fetchTile(e,i)}),this._tileStrategy=new j({cachePolicy:"keep",resampling:this.resampling,acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),tileInfoView:this._tileInfoView}),b(this,this.layer)){const e=this._highlightView=new a({view:this.view,graphics:this._highlightGraphics,requestUpdateCallback:()=>this.requestUpdate(),container:new g(this.view.featuresTilingScheme),defaultPointSymbolEnabled:!1});this.container.addChild(this._highlightView.container),this._popupHighlightHelper=new _({createFetchPopupFeaturesQueryGeometry:(e,i)=>T(e,i,this.view),highlightGraphics:this._highlightGraphics,highlightGraphicUpdated:(i,t)=>{e.graphicUpdateHandler({graphic:i,property:t})},layerView:this,updatingHandles:this.updatingHandles})}this.requestUpdate(),this.addAttachHandles(r((()=>this.resampling),(()=>{this.doRefresh()}))),super.attach()}detach(){super.detach(),this._tileStrategy.destroy(),this._fetchQueue.clear(),this.container.removeAllChildren(),this._popupHighlightHelper?.destroy(),this._fetchQueue=this._tileStrategy=this._tileInfoView=this._popupHighlightHelper=null}async fetchPopupFeatures(e,i){return this._popupHighlightHelper?this._popupHighlightHelper.fetchPopupFeatures(e,i):[]}highlight(e){return this._popupHighlightHelper?this._popupHighlightHelper.highlight(e):{remove(){}}}moveStart(){this.requestUpdate()}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}supportsSpatialReference(e){return l(this.layer.tileInfo?.spatialReference,e)}async doRefresh(){!this.attached||this.updateRequested||this.suspended||(this._fetchQueue.reset(),this._tileStrategy.tiles.forEach((e=>this._enqueueTileFetch(e))))}isUpdating(){return this._fetchQueue?.updating??!1}acquireTile(e){const i=this._bitmapView.createTile(e),t=i.bitmap;return[t.x,t.y]=this._tileInfoView.getTileCoords(V,i.key),t.resolution=this._tileInfoView.getTileResolution(i.key),[t.width,t.height]=this._tileInfoView.tileInfo.size,this._enqueueTileFetch(i),this._bitmapView.addChild(i),this.requestUpdate(),i}releaseTile(e){this._fetchQueue.abort(e.key.id),this._bitmapView.removeChild(e),e.once("detach",(()=>e.destroy())),this.requestUpdate()}async fetchTile(e,i={}){const r=this.tilemapCache,{signal:s,resamplingLevel:o=0}=i;if(!r)try{return await this._fetchImage(e,s)}catch(a){if(!t(a)&&!this.resampling)return c(this._tileInfoView.tileInfo.size);if(o<3){const t=this._tileInfoView.getTileParentId(e.id);if(t){const r=new f(t),s=await this.fetchTile(r,{...i,resamplingLevel:o+1});return m(this._tileInfoView,s,r,e)}}throw a}const l=new f(0,0,0,0);let h;try{if(await r.fetchAvailabilityUpsample(e.level,e.row,e.col,l,{signal:s}),l.level!==e.level&&!this.resampling)return c(this._tileInfoView.tileInfo.size);h=await this._fetchImage(l,s)}catch(a){if(t(a))throw a;h=await this._fetchImage(e,s)}return this.resampling?m(this._tileInfoView,h,l,e):h}async _enqueueTileFetch(e){if(!this._fetchQueue.has(e.key.id)){try{const i=await this._fetchQueue.push(e.key);e.bitmap.source=i,e.bitmap.width=this._tileInfoView.tileInfo.size[0],e.bitmap.height=this._tileInfoView.tileInfo.size[1],e.once("attach",(()=>this.requestUpdate()))}catch(r){t(r)||i.getLogger(this).error(r)}this.requestUpdate()}}async _fetchImage(e,i){return this.layer.fetchImageBitmapTile(e.level,e.row,e.col,{signal:i})}};e([s()],v.prototype,"_fetchQueue",void 0),e([s()],v.prototype,"resampling",null),e([s()],v.prototype,"tilemapCache",null),v=e([o("esri.views.2d.layers.TileLayerView2D")],v);const I=v;export{I as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Logger.js";import{isAbortError as i}from"../../../core/promiseUtils.js";import{watch as r}from"../../../core/reactiveUtils.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{equals as l}from"../../../geometry/support/spatialReferenceUtils.js";import{GraphicsCollection as h}from"../../../support/GraphicsCollection.js";import"../../../core/Error.js";import"../../../core/scheduling.js";import"../../../request.js";import"../../../chunks/index2.js";import"../../../core/urlUtils.js";import"../../../chunks/index3.js";import"../../../layers/effects/EffectView.js";import"../engine/DisplayObject.js";import"../engine/webgl/effects/highlight/HighlightGradient.js";import"../engine/webgl/BufferPool.js";import"../engine/webgl/enums.js";import"../engine/webgl/brushes/BrushBitmap.js";import"../../../chunks/vec4f32.js";import"../engine/webgl/Utils.js";import"../engine/webgl/shaders/BackgroundPrograms.js";import"../../webgl/enums.js";import"../../webgl/checkWebGLError.js";import"../../webgl/contextUtils.js";import"../../../chunks/builtins.js";import"../engine/webgl/definitions.js";import"../../../core/RandomLCG.js";import"../engine/webgl/materialKey/MaterialKey.js";import"../engine/webgl/techniques/Technique.js";import"../engine/webgl/techniques/dotDensity/TechniqueDotDensity.js";import"../engine/webgl/techniques/heatmap/TechniqueHeatmap.js";import"../engine/webgl/techniques/pieChart/TechniquePieChart.js";import"../../webgl/BufferObject.js";import"../../webgl/FramebufferObject.js";import"../../webgl/GLObjectType.js";import"../../webgl/Texture.js";import"../../webgl/VertexArrayObject.js";import"../engine/webgl/brushes/WGLBrushHeatmap.js";import"../engine/webgl/DefaultVertexAttributeLayouts.js";import"../engine/webgl/shaders/TileInfoPrograms.js";import"../engine/webgl/brushes/WGLGeometryBrushMarker.js";import"../../../core/mathUtils.js";import"../engine/webgl/number.js";import"../engine/vectorTiles/style/StyleDefinition.js";import"../../../chunks/vec2f32.js";import"../engine/vectorTiles/enums.js";import"../engine/vectorTiles/shaders/sources/resolver.js";import"../engine/webgl/shaders/BitBlitPrograms.js";import"../engine/webgl/shaders/sources/resolver.js";import"../engine/webgl/TextureManager.js";import"../engine/webgl/shaders/StencilPrograms.js";import"../engine/webgl/effects/BlendEffect.js";import"../engine/webgl/shaders/HighlightPrograms.js";import"../engine/webgl/Profiler.js";import"../../webgl/renderState.js";import"../../3d/webgl-engine/core/shaderModules/interfaces.js";import"../../../core/floatRGBA.js";import"../../3d/webgl-engine/lib/OrderIndependentTransparency.js";import"../LabelManager.js";import a from"./graphics/GraphicsView2D.js";import"../../../core/accessorSupport/tracking/Flags.js";import"../engine/webgl/AttributeStoreView.js";import"../../../chunks/earcut.js";import"../../../layers/graphics/featureConversionUtils.js";import"../../../core/unitUtils.js";import"../../../renderers/support/lengthUtils.js";import"../../../chunks/vec3f32.js";import"../../../geometry/support/normalizeUtils.js";import"../navigation/MapViewNavigation.js";import"../../../core/asyncUtils.js";import"../engine/webgl/shaders/MagnifierPrograms.js";import{BitmapTileLayerView2D as n}from"./BitmapTileLayerView2D.js";import{LayerView2DMixin as p}from"./LayerView2D.js";import g from"./graphics/HighlightGraphicContainer.js";import{createBlankImage as c,resampleImage as m}from"./support/imageUtils.js";import u from"../tiling/TileInfoView.js";import f from"../tiling/TileKey.js";import w from"../tiling/TileQueue.js";import j from"../tiling/TileStrategy.js";import d from"../../layers/LayerView.js";import y from"../../layers/RefreshableLayerView.js";import{isMapServiceLayerView as b,MapServiceLayerViewHelper as _}from"../../layers/support/MapServiceLayerViewHelper.js";import{createQueryGeometry as T}from"../../support/drapedUtils.js";const V=[0,0];let v=class extends(y(n(p(d)))){constructor(){super(...arguments),this._fetchQueue=null,this._highlightGraphics=new h,this._highlightView=null,this._popupHighlightHelper=null,this._tileStrategy=null,this.layer=null}get resampling(){return!("resampling"in this.layer)||!1!==this.layer.resampling}get tilemapCache(){return"tilemapCache"in this.layer?this.layer.tilemapCache:null}update(e){this._fetchQueue.pause(),this._fetchQueue.state=e.state,this._tileStrategy.update(e),this._fetchQueue.resume(),this._highlightView?.processUpdate(e)}attach(){const e="tileServers"in this.layer?this.layer.tileServers:null,t=this.tilemapCache;if(this._tileInfoView=new u(this.layer.tileInfo,this.layer.fullExtent,t?.effectiveMinLOD,t?.effectiveMaxLOD),this._fetchQueue=new w({tileInfoView:this._tileInfoView,concurrency:e&&10*e.length||10,process:(e,t)=>this.fetchTile(e,t)}),this._tileStrategy=new j({cachePolicy:"keep",resampling:this.resampling,acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),tileInfoView:this._tileInfoView}),b(this,this.layer)){const e=this._highlightView=new a({view:this.view,graphics:this._highlightGraphics,requestUpdateCallback:()=>this.requestUpdate(),container:new g(this.view.featuresTilingScheme),defaultPointSymbolEnabled:!1});this.container.addChild(this._highlightView.container),this._popupHighlightHelper=new _({createFetchPopupFeaturesQueryGeometry:(e,t)=>T(e,t,this.view),highlightGraphics:this._highlightGraphics,highlightGraphicUpdated:(t,i)=>{e.graphicUpdateHandler({graphic:t,property:i})},layerView:this,updatingHandles:this.updatingHandles})}this.requestUpdate(),this.addAttachHandles(r((()=>this.resampling),(()=>{this.doRefresh()}))),super.attach()}detach(){super.detach(),this._tileStrategy.destroy(),this._fetchQueue.clear(),this.container.removeAllChildren(),this._popupHighlightHelper?.destroy(),this._fetchQueue=this._tileStrategy=this._tileInfoView=this._popupHighlightHelper=null}async fetchPopupFeatures(e,t){return this._popupHighlightHelper?this._popupHighlightHelper.fetchPopupFeatures(e,t):[]}highlight(e){return this._popupHighlightHelper?this._popupHighlightHelper.highlight(e):{remove(){}}}moveStart(){this.requestUpdate()}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}supportsSpatialReference(e){return l(this.layer.tileInfo?.spatialReference,e)}async doRefresh(){!this.attached||this.updateRequested||this.suspended||(this._fetchQueue.reset(),this._tileStrategy.tiles.forEach((e=>this._enqueueTileFetch(e))))}isUpdating(){return this._fetchQueue?.updating??!1}acquireTile(e){const t=this._bitmapView.createTile(e),i=t.bitmap;return[i.x,i.y]=this._tileInfoView.getTileCoords(V,t.key),i.resolution=this._tileInfoView.getTileResolution(t.key),[i.width,i.height]=this._tileInfoView.tileInfo.size,this._enqueueTileFetch(t),this._bitmapView.addChild(t),this.requestUpdate(),t}releaseTile(e){this._fetchQueue.abort(e.key.id),this._bitmapView.removeChild(e),e.once("detach",(()=>e.destroy())),this.requestUpdate()}async fetchTile(e,t={}){const r=this.tilemapCache,{signal:s,resamplingLevel:o=0}=t;if(!r)try{return await this._fetchImage(e,s)}catch(a){if(!i(a)&&!this.resampling)return c(this._tileInfoView.tileInfo.size);if(o<3){const i=this._tileInfoView.getTileParentId(e.id);if(i){const r=new f(i),s=await this.fetchTile(r,{...t,resamplingLevel:o+1});return m(this._tileInfoView,s,r,e)}}throw a}const l=new f(0,0,0,0);let h;try{if(await r.fetchAvailabilityUpsample(e.level,e.row,e.col,l,{signal:s}),l.level!==e.level&&!this.resampling)return c(this._tileInfoView.tileInfo.size);h=await this._fetchImage(l,s)}catch(a){if(i(a))throw a;h=await this._fetchImage(e,s)}return this.resampling?m(this._tileInfoView,h,l,e):h}async _enqueueTileFetch(e){if(!this._fetchQueue.has(e.key.id)){try{const t=await this._fetchQueue.push(e.key);e.bitmap.source=t,e.bitmap.width=this._tileInfoView.tileInfo.size[0],e.bitmap.height=this._tileInfoView.tileInfo.size[1],e.once("attach",(()=>this.requestUpdate()))}catch(r){i(r)||t.getLogger(this).error(r)}this.requestUpdate()}}async _fetchImage(e,t){return this.layer.fetchImageBitmapTile(e.level,e.row,e.col,{signal:t})}};e([s()],v.prototype,"_fetchQueue",void 0),e([s()],v.prototype,"resampling",null),e([s()],v.prototype,"tilemapCache",null),v=e([o("esri.views.2d.layers.TileLayerView2D")],v);const I=v;export{I as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- import{CIMAnalyzer as e}from"../../../../symbols/cim/cimAnalyzer.js";import{ExpandedCIM as t}from"../../../../symbols/cim/ExpandedCIM.js";import{fetchCIMSymbolReference as a}from"./webStyleUtils.js";const r=async(a,r,n)=>{const i=new e(n,r);return new t(await i.analyzeSymbolReference(a.data,!1),a.data,a.rendererKey,a.maxVVSize)};async function n(e,t,n,i){if(!e)return null;if("cim"===e.type)return r(e,t,n);if("web-style"===e.type){const l={type:"cim",data:await a(e,null,i)??void 0,rendererKey:e.rendererKey,maxVVSize:e.maxVVSize};return r(l,t,n)}return e}function i(e){if(!e)return null;const{avoidSDFRasterization:t,type:a,cim:r,url:n,materialHash:i}=e,l={cim:r,type:a,mosaicHash:i,url:n,size:null,dashTemplate:null,path:null,text:null,fontName:null,animatedSymbolProperties:null,avoidSDFRasterization:t};switch(a){case"marker":l.size=e.size,l.path=e.path,l.animatedSymbolProperties=e.animatedSymbolProperties;break;case"line":l.dashTemplate=e.dashTemplate;break;case"text":l.text=e.text,l.fontName=e.fontName}return l}export{i as cimLayerToRasterizationInfo,n as expandSymbol};
5
+ import{CIMAnalyzer as e}from"../../../../symbols/cim/cimAnalyzer.js";import{ExpandedCIM as t}from"../../../../symbols/cim/ExpandedCIM.js";import{fetchCIMSymbolReference as a}from"./webStyleUtils.js";const i=async(a,i,r)=>{const n=new e(r,i);return new t(await n.analyzeSymbolReference(a.data,!1),a.data,a.rendererKey,a.maxVVSize)};async function r(e,t,r,n){if(!e)return null;if("cim"===e.type)return i(e,t,r);if("web-style"===e.type){const l={type:"cim",data:await a(e,null,n)??void 0,rendererKey:e.rendererKey,maxVVSize:e.maxVVSize};return i(l,t,r)}return e}function n(e){if(!e)return null;const{avoidSDFRasterization:t,type:a,cim:i,url:r,materialHash:n,maxVVSize:l}=e,m={cim:i,type:a,mosaicHash:n,url:r,size:null,dashTemplate:null,path:null,text:null,fontName:null,animatedSymbolProperties:null,avoidSDFRasterization:t};switch(a){case"marker":l&&"size"in i&&(i.size=Math.max(l,i.size)),m.size=e.size,m.path=e.path,m.animatedSymbolProperties=e.animatedSymbolProperties;break;case"line":m.dashTemplate=e.dashTemplate;break;case"text":m.text=e.text,m.fontName=e.fontName}return m}export{n as cimLayerToRasterizationInfo,r as expandSymbol};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../../chunks/tslib.es6.js";import{handlesGroup as t,makeHandle as i}from"../../../../../core/handleUtils.js";import{applySome as s,destroyMaybe as r}from"../../../../../core/maybe.js";import{watch as n,when as a,syncAndInitial as o,initial as l}from"../../../../../core/reactiveUtils.js";import{property as c}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/accessorSupport/ensureType.js";import"../../../../../core/arrayUtils.js";import"../../../../../core/has.js";import{subclass as p}from"../../../../../core/accessorSupport/decorators/subclass.js";import{s as h}from"../../../../../chunks/vec3.js";import{c as m}from"../../../../../chunks/vec3f64.js";import{getEffectiveElevationInfo as u,getEffectiveElevationMode as d}from"../../../../../support/elevationInfoUtils.js";import v from"../../../../../symbols/support/ElevationInfo.js";import{SegmentLabels3D as f}from"../../SegmentLabels3D.js";import{SnappingVisualizer3D as V}from"../../SnappingVisualizer3D.js";import{tryEnableMeshTransformFastUpdates as y,tryDisableMeshTransformFastUpdates as E}from"../meshFastUpdateUtils.js";import{getSettings as w}from"../settings.js";import{ExtendedLineVisualElement as _}from"../../visualElements/ExtendedLineVisualElement.js";import{OutlineVisualElement as g}from"../../visualElements/OutlineVisualElement.js";import{VerticesVisualElement as j}from"../../visualElements/VerticesVisualElement.js";import{evaluateElevationAlignmentAtPoint as G}from"../../../layers/graphics/elevationAlignmentUtils.js";import{ElevationContext as S}from"../../../layers/graphics/ElevationContext.js";import{GraphicState as I}from"../../../layers/graphics/GraphicState.js";import{RenderOccludedFlag as L}from"../../../webgl-engine/lib/Material.js";import{DrawGraphicTool as D,geometryTypeToDrawOperationGeometryType as O}from"../../../../draw/DrawGraphicTool.js";import{DrawOperation as x}from"../../../../draw/DrawOperation.js";import{SceneDrawSurface as T,ElevationDrawSurface as z}from"../../../../draw/drawSurfaces.js";import{unitRGBAFromColor as b}from"../../../../support/colorUtils.js";let C=class extends D{constructor(e){super(e),this._activeVertexVisualElement=null,this._createGraphicState=null,this._outlineVisualElement=null,this._verticesVisualElement=null,this._verticalLineVisualElement=null,this.geometryType=null,this.type="draw-3d"}initialize(){const{mode:e,offset:t}=this.elevationInfo;this.internalGraphicsLayer.elevationInfo=new v({mode:e,offset:t})}normalizeCtorArgs(e){if(!e.elevationInfo){const t=e.hasZ??!0;return{...e,elevationInfo:u(t)}}return e}initializeGraphic(e){const r=this._createGraphicState=new I({graphic:e});return t([this.view.maskOccludee(e),this.view.trackGraphicState(r),n((()=>({element:this._outlineVisualElement,isDraped:r.isDraped})),(({element:e,isDraped:t})=>{s(e,(e=>e.isDraped=t))}),l),a((()=>r.displaying),(()=>{y(e),this.addHandles(i((()=>E(e))))}),{...o,once:!0})])}makeDrawOperation(){const{geometryType:e}=this,t="circle"!==e&&"rectangle"!==e;return new x({view:this.view,manipulators:this.manipulators,geometryType:O(e),drawingMode:this.mode,hasZ:this.hasZ,defaultZ:this.defaultZ,snapToSceneEnabled:this.snapToScene,drawSurface:new T(this.view,this.elevationInfo,[this.internalGraphicsLayer]),elevationDrawSurface:new z(this.elevationInfo,this.defaultZ,this.view,this.internalGraphicsLayer),hasM:!1,elevationInfo:this.elevationInfo,snappingManager:this.snappingManager,snappingVisualizer:new V,segmentLabels:t?new f:null,labelOptions:this.labelOptions,tooltipOptions:this.tooltipOptions,isDraped:this._createGraphicState?this._createGraphicState.isDraped:"on-the-ground"===d(this.hasZ,this.elevationInfo)})}onActiveVertexChanged(e){const{view:t}=this,s=w(t);if(this._activeVertexVisualElement)return this._activeVertexVisualElement.vertices=[e],this._updateVerticalLineVisualElement(e),null;const n=s.manipulators,a=n.vertex;this._activeVertexVisualElement=new j({view:t,spatialReference:t.spatialReference,vertices:[e],elevationInfo:this.internalGraphicsLayer.elevationInfo,color:b(a.color),size:a.size,outlineColor:b(a.outlineColor),outlineSize:a.outlineSize,renderOccluded:a.renderOccluded,attached:!1}),this._activeVertexVisualElement.color=b(n.selected.color),this._activeVertexVisualElement.attached=!0;const o=s.visualElements.zVerticalLine;return this._verticalLineVisualElement=new _({view:t,extensionType:o.extensionType,innerWidth:1,attached:!1,writeDepthEnabled:!1,renderOccluded:L.OccludeAndTransparent}),o.apply(this._verticalLineVisualElement),i((()=>{this._activeVertexVisualElement=r(this._activeVertexVisualElement),this._verticalLineVisualElement=r(this._verticalLineVisualElement)}))}_updateVerticalLineVisualElement(e){const t=this._verticalLineVisualElement;if(!t)return;const{renderCoordsHelper:i,elevationProvider:s}=this.view;h(Z,e[0],e[1],e[2]),U.setFromElevationInfo(this.elevationInfo),Z[2]=G(Z,s,U,i);i.toRenderCoords(Z,this.view.spatialReference,Z)?(t.setStartEndFromWorldDownAtLocation(Z),t.attached=!0):t.attached=!1}onOutlineChanged(e){if(this._outlineVisualElement)return this._outlineVisualElement.geometry=e,null;const t=this.internalGraphicsLayer.elevationInfo,{view:s}=this,n=w(s);return this._outlineVisualElement=new g({view:s,geometry:e,elevationInfo:t,isDraped:this._createGraphicState?this._createGraphicState.isDraped:"on-the-ground"===d(this.hasZ,t),attached:!1}),n.visualElements.lineGraphics.outline.apply(this._outlineVisualElement),n.visualElements.lineGraphics.shadowStyle.apply(this._outlineVisualElement),this._outlineVisualElement.attached=!0,this._outlineVisualElement.laserlineEnabled=!0,i((()=>{this._outlineVisualElement=r(this._outlineVisualElement)}))}onRegularVerticesChanged(e){if(this._verticesVisualElement)return this._verticesVisualElement.vertices=e,null;const{view:t}=this,s=w(t).manipulators.vertex;return this._verticesVisualElement=new j({view:t,spatialReference:t.spatialReference,vertices:e,elevationInfo:this.internalGraphicsLayer.elevationInfo,color:b(s.color),size:s.size,outlineColor:b(s.outlineColor),outlineSize:s.outlineSize,renderOccluded:s.renderOccluded,attached:!1}),this._verticesVisualElement.attached=!0,i((()=>{this._verticesVisualElement=r(this._verticesVisualElement)}))}_updateGraphicGeometry(e,t){if("mesh"===this.geometryType&&"point"===t?.type){const i=this.geometryToPlace;return i&&i.centerAt(t),void(i&&e.geometry===i?i.transform?.geographic?e.notifyMeshTransformChanged():e.notifyGeometryChanged():e.geometry=i)}super._updateGraphicGeometry(e,t)}};e([c({constructOnly:!0})],C.prototype,"elevationInfo",void 0),e([c({constructOnly:!0})],C.prototype,"geometryType",void 0),e([c()],C.prototype,"type",void 0),e([c({constructOnly:!0})],C.prototype,"view",void 0),C=e([p("esri.views.3d.interactive.editingTools.draw.DrawGraphicTool3D")],C);const U=new S,Z=m();export{C as DrawGraphicTool3D};
5
+ import{_ as e}from"../../../../../chunks/tslib.es6.js";import{handlesGroup as t,makeHandle as i}from"../../../../../core/handleUtils.js";import{destroyMaybe as s}from"../../../../../core/maybe.js";import{watch as r,when as n,syncAndInitial as a,initial as o}from"../../../../../core/reactiveUtils.js";import{property as l}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/accessorSupport/ensureType.js";import"../../../../../core/arrayUtils.js";import"../../../../../core/has.js";import{subclass as c}from"../../../../../core/accessorSupport/decorators/subclass.js";import{s as p}from"../../../../../chunks/vec3.js";import{c as h}from"../../../../../chunks/vec3f64.js";import{getEffectiveElevationInfo as m,getEffectiveElevationMode as u}from"../../../../../support/elevationInfoUtils.js";import d from"../../../../../symbols/support/ElevationInfo.js";import{SegmentLabels3D as v}from"../../SegmentLabels3D.js";import{SnappingVisualizer3D as f}from"../../SnappingVisualizer3D.js";import{tryEnableMeshTransformFastUpdates as y,tryDisableMeshTransformFastUpdates as V}from"../meshFastUpdateUtils.js";import{getSettings as E}from"../settings.js";import{ExtendedLineVisualElement as w}from"../../visualElements/ExtendedLineVisualElement.js";import{OutlineVisualElement as g}from"../../visualElements/OutlineVisualElement.js";import{VerticesVisualElement as _}from"../../visualElements/VerticesVisualElement.js";import{evaluateElevationAlignmentAtPoint as j}from"../../../layers/graphics/elevationAlignmentUtils.js";import{ElevationContext as G}from"../../../layers/graphics/ElevationContext.js";import{GraphicState as S}from"../../../layers/graphics/GraphicState.js";import{RenderOccludedFlag as I}from"../../../webgl-engine/lib/Material.js";import{DrawGraphicTool as L,geometryTypeToDrawOperationGeometryType as O}from"../../../../draw/DrawGraphicTool.js";import{DrawOperation as D}from"../../../../draw/DrawOperation.js";import{SceneDrawSurface as x,ElevationDrawSurface as T}from"../../../../draw/drawSurfaces.js";import{unitRGBAFromColor as z}from"../../../../support/colorUtils.js";let b=class extends L{constructor(e){super(e),this._activeVertexVisualElement=null,this._createGraphicState=null,this._outlineVisualElement=null,this._verticesVisualElement=null,this._verticalLineVisualElement=null,this.geometryType=null,this.type="draw-3d"}initialize(){const{mode:e,offset:t}=this.elevationInfo;this.internalGraphicsLayer.elevationInfo=new d({mode:e,offset:t})}normalizeCtorArgs(e){if(!e.elevationInfo){const t=e.hasZ??!0;return{...e,elevationInfo:m(t)}}return e}initializeGraphic(e){const s=this._createGraphicState=new S({graphic:e});return t([this.view.maskOccludee(e),this.view.trackGraphicState(s),r((()=>({element:this._outlineVisualElement,isDraped:s.isDraped,displaying:s.displaying})),(({element:e,isDraped:t,displaying:i})=>{e&&(e.isDraped=t),this.drawOperation.cursor=i?null:"progress"}),o),n((()=>s.displaying),(()=>{y(e),this.addHandles(i((()=>V(e))))}),{...a,once:!0})])}makeDrawOperation(){const{geometryType:e}=this,t="circle"!==e&&"rectangle"!==e;return new D({view:this.view,manipulators:this.manipulators,geometryType:O(e),drawingMode:this.mode,hasZ:this.hasZ,defaultZ:this.defaultZ,snapToSceneEnabled:this.snapToScene,drawSurface:new x(this.view,this.elevationInfo,[this.internalGraphicsLayer]),elevationDrawSurface:new T(this.elevationInfo,this.defaultZ,this.view,this.internalGraphicsLayer),hasM:!1,elevationInfo:this.elevationInfo,snappingManager:this.snappingManager,snappingVisualizer:new f,segmentLabels:t?new v:null,labelOptions:this.labelOptions,tooltipOptions:this.tooltipOptions,isDraped:this._createGraphicState?this._createGraphicState.isDraped:"on-the-ground"===u(this.hasZ,this.elevationInfo)})}onActiveVertexChanged(e){const{view:t}=this,r=E(t);if(this._activeVertexVisualElement)return this._activeVertexVisualElement.vertices=[e],this._updateVerticalLineVisualElement(e),null;const n=r.manipulators,a=n.vertex;this._activeVertexVisualElement=new _({view:t,spatialReference:t.spatialReference,vertices:[e],elevationInfo:this.internalGraphicsLayer.elevationInfo,color:z(a.color),size:a.size,outlineColor:z(a.outlineColor),outlineSize:a.outlineSize,renderOccluded:a.renderOccluded,attached:!1}),this._activeVertexVisualElement.color=z(n.selected.color),this._activeVertexVisualElement.attached=!0;const o=r.visualElements.zVerticalLine;return this._verticalLineVisualElement=new w({view:t,extensionType:o.extensionType,innerWidth:1,attached:!1,writeDepthEnabled:!1,renderOccluded:I.OccludeAndTransparent}),o.apply(this._verticalLineVisualElement),i((()=>{this._activeVertexVisualElement=s(this._activeVertexVisualElement),this._verticalLineVisualElement=s(this._verticalLineVisualElement)}))}_updateVerticalLineVisualElement(e){const t=this._verticalLineVisualElement;if(!t)return;const{renderCoordsHelper:i,elevationProvider:s}=this.view;p(U,e[0],e[1],e[2]),C.setFromElevationInfo(this.elevationInfo),U[2]=j(U,s,C,i);i.toRenderCoords(U,this.view.spatialReference,U)?(t.setStartEndFromWorldDownAtLocation(U),t.attached=!0):t.attached=!1}onOutlineChanged(e){if(this._outlineVisualElement)return this._outlineVisualElement.geometry=e,null;const t=this.internalGraphicsLayer.elevationInfo,{view:r}=this,n=E(r);return this._outlineVisualElement=new g({view:r,geometry:e,elevationInfo:t,isDraped:this._createGraphicState?this._createGraphicState.isDraped:"on-the-ground"===u(this.hasZ,t),attached:!1}),n.visualElements.lineGraphics.outline.apply(this._outlineVisualElement),n.visualElements.lineGraphics.shadowStyle.apply(this._outlineVisualElement),this._outlineVisualElement.attached=!0,this._outlineVisualElement.laserlineEnabled=!0,i((()=>{this._outlineVisualElement=s(this._outlineVisualElement)}))}onRegularVerticesChanged(e){if(this._verticesVisualElement)return this._verticesVisualElement.vertices=e,null;const{view:t}=this,r=E(t).manipulators.vertex;return this._verticesVisualElement=new _({view:t,spatialReference:t.spatialReference,vertices:e,elevationInfo:this.internalGraphicsLayer.elevationInfo,color:z(r.color),size:r.size,outlineColor:z(r.outlineColor),outlineSize:r.outlineSize,renderOccluded:r.renderOccluded,attached:!1}),this._verticesVisualElement.attached=!0,i((()=>{this._verticesVisualElement=s(this._verticesVisualElement)}))}_updateGraphicGeometry(e,t){if("mesh"===this.geometryType&&"point"===t?.type){const i=this.geometryToPlace;return i&&i.centerAt(t),void(i&&e.geometry===i?i.transform?.geographic?e.notifyMeshTransformChanged():e.notifyGeometryChanged():e.geometry=i)}super._updateGraphicGeometry(e,t)}};e([l({constructOnly:!0})],b.prototype,"elevationInfo",void 0),e([l({constructOnly:!0})],b.prototype,"geometryType",void 0),e([l()],b.prototype,"type",void 0),e([l({constructOnly:!0})],b.prototype,"view",void 0),b=e([c("esri.views.3d.interactive.editingTools.draw.DrawGraphicTool3D")],b);const C=new G,U=h();export{b as DrawGraphicTool3D};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- import has from"../../../core/has.js";import{Milliseconds as e}from"../../../core/time.js";class a{static isValidProfile(e){return e in a.profiles}static getDefaultProfile(){return has("esri-iPhone")?"low":"medium"}static apply(e,i){const o=a.profiles[e];i.graphics3D.maxTotalNumberOfFeatures=o.graphics3D.maxTotalNumberOfFeatures,i.graphics3D.maxTotalNumberOfPrimitives=o.graphics3D.maxTotalNumberOfPrimitives,i.graphics3D.polygonLodFactor=o.graphics3D.polygonLodFactor,i.graphics3D.polylineLodFactor=o.graphics3D.polylineLodFactor,i.graphics3D.snapshotAvailable=o.graphics3D.snapshotAvailable,i.graphics3D.skipHighSymbolLods=o.graphics3D.skipHighSymbolLods;const t=i.sceneService.object,r=o.sceneService.object;t.lodFactor=r.lodFactor,t.lodCrossfadeinDuration=r.lodCrossfadeinDuration,t.lodCrossfadeoutDuration=r.lodCrossfadeoutDuration,t.lodCrossfadeUncoveredDuration=r.lodCrossfadeUncoveredDuration,i.sceneService.point.lodFactor=o.sceneService.point.lodFactor,i.sceneService.integratedMesh.lodFactor=o.sceneService.integratedMesh.lodFactor,i.sceneService.pointCloud.lodFactor=o.sceneService.pointCloud.lodFactor,i.sceneService.uncompressedTextureDownsamplingEnabled=o.sceneService.uncompressedTextureDownsamplingEnabled,i.tiledSurface.lodBias=o.tiledSurface.lodBias,i.tiledSurface.angledSplitBias=o.tiledSurface.angledSplitBias,i.tiledSurface.reduceTileLevelDifferences=o.tiledSurface.reduceTileLevelDifferences,i.tiledSurface.textureFadeDuration=o.tiledSurface.textureFadeDuration,i.heatmap.pixelRatio=o.heatmap.pixelRatio,i.heatmap.maxTotalNumberOfFeatures=o.heatmap.maxTotalNumberOfFeatures,i.fadeDuration=o.fadeDuration,i.antialiasingEnabled=o.antialiasingEnabled,i.physicallyBasedRenderingEnabled=o.physicalBasedRenderingEnabled,i.highQualityShadows=o.highQualityShadows,i.highQualityTransparency=o.highQualityTransparency,i.highQualityAtmosphere=o.highQualityAtmosphere,i.reflections=o.reflections,i.ambientOcclusion=o.ambientOcclusion,i.memoryLimit=o.memoryLimit,i.additionalCacheMemory=o.additionalCacheMemory,i.frameRate=o.frameRate,i.maximumPixelRatio=o.maximumPixelRatio}}function i(){const a=!!has("esri-mobile"),i=!!has("ios"),o=e(400);return{low:{graphics3D:{maxTotalNumberOfFeatures:25e3,maxTotalNumberOfPrimitives:85e4,polygonLodFactor:.5,polylineLodFactor:1,snapshotAvailable:!1,skipHighSymbolLods:!0},heatmap:{pixelRatio:.125,maxTotalNumberOfFeatures:25e3},sceneService:{object:{lodFactor:.2,lodCrossfadeinDuration:e(0),lodCrossfadeoutDuration:e(0),lodCrossfadeUncoveredDuration:e(0)},point:{lodFactor:1},integratedMesh:{lodFactor:.6},pointCloud:{lodFactor:.5},uncompressedTextureDownsamplingEnabled:!0},tiledSurface:{lodBias:-1,angledSplitBias:.5,reduceTileLevelDifferences:!1,textureFadeDuration:e(0)},fadeDuration:e(0),antialiasingEnabled:!1,physicalBasedRenderingEnabled:!1,highQualityShadows:!1,highQualityTransparency:!1,highQualityAtmosphere:!1,reflections:!1,ambientOcclusion:!1,memoryLimit:200,additionalCacheMemory:0,frameRate:0,maximumPixelRatio:1},medium:{graphics3D:{maxTotalNumberOfFeatures:5e4,maxTotalNumberOfPrimitives:17e5,polygonLodFactor:a?.8:1,polylineLodFactor:a?1.2:1.5,snapshotAvailable:!i,skipHighSymbolLods:!1},heatmap:{pixelRatio:.25,maxTotalNumberOfFeatures:5e4},sceneService:{object:{lodFactor:1,lodCrossfadeinDuration:e(0),lodCrossfadeoutDuration:e(0),lodCrossfadeUncoveredDuration:o},point:{lodFactor:1},integratedMesh:{lodFactor:1},pointCloud:{lodFactor:1},uncompressedTextureDownsamplingEnabled:a},tiledSurface:{lodBias:0,angledSplitBias:1,reduceTileLevelDifferences:!has("disable-feature:reduce-map-tile-levels"),textureFadeDuration:o},fadeDuration:o,antialiasingEnabled:!0,physicalBasedRenderingEnabled:!0,highQualityShadows:!1,highQualityTransparency:!0,highQualityAtmosphere:!1,reflections:!1,ambientOcclusion:!1,memoryLimit:a?600:750,additionalCacheMemory:a?0:150,frameRate:0,maximumPixelRatio:1},high:{graphics3D:{maxTotalNumberOfFeatures:5e4,maxTotalNumberOfPrimitives:17e5,polygonLodFactor:a?1.2:2,polylineLodFactor:a?1.2:2,snapshotAvailable:!i,skipHighSymbolLods:!1},heatmap:{pixelRatio:.5,maxTotalNumberOfFeatures:5e4},sceneService:{object:{lodFactor:1,lodCrossfadeinDuration:e(0),lodCrossfadeoutDuration:e(0),lodCrossfadeUncoveredDuration:o},point:{lodFactor:1},integratedMesh:{lodFactor:1},pointCloud:{lodFactor:1},uncompressedTextureDownsamplingEnabled:!1},tiledSurface:{lodBias:0,angledSplitBias:1,reduceTileLevelDifferences:!has("disable-feature:reduce-map-tile-levels"),textureFadeDuration:o},fadeDuration:o,antialiasingEnabled:!0,physicalBasedRenderingEnabled:!0,highQualityShadows:!0,highQualityTransparency:!0,highQualityAtmosphere:!0,reflections:!0,ambientOcclusion:!0,memoryLimit:a?900:1500,additionalCacheMemory:0,frameRate:0,maximumPixelRatio:a?1:1/0}}}a.test={reset(){const e=i();for(const i of Object.keys(e))a.profiles[i]=e[i]}},function(e){e.profiles=i()}(a||(a={}));const o=a;export{o as default};
5
+ import has from"../../../core/has.js";import{Milliseconds as e}from"../../../core/time.js";class a{static isValidProfile(e){return e in a.profiles}static getDefaultProfile(){return has("esri-iPhone")?"low":"medium"}static apply(e,i){const o=a.profiles[e];i.graphics3D.maxTotalNumberOfFeatures=o.graphics3D.maxTotalNumberOfFeatures,i.graphics3D.maxTotalNumberOfPrimitives=o.graphics3D.maxTotalNumberOfPrimitives,i.graphics3D.polygonLodFactor=o.graphics3D.polygonLodFactor,i.graphics3D.polylineLodFactor=o.graphics3D.polylineLodFactor,i.graphics3D.snapshotAvailable=o.graphics3D.snapshotAvailable,i.graphics3D.skipHighSymbolLods=o.graphics3D.skipHighSymbolLods;const t=i.sceneService.object,r=o.sceneService.object;t.lodFactor=r.lodFactor,t.lodCrossfadeinDuration=r.lodCrossfadeinDuration,t.lodCrossfadeoutDuration=r.lodCrossfadeoutDuration,t.lodCrossfadeUncoveredDuration=r.lodCrossfadeUncoveredDuration,i.sceneService.point.lodFactor=o.sceneService.point.lodFactor,i.sceneService.integratedMesh.lodFactor=o.sceneService.integratedMesh.lodFactor,i.sceneService.pointCloud.lodFactor=o.sceneService.pointCloud.lodFactor,i.sceneService.uncompressedTextureDownsamplingEnabled=o.sceneService.uncompressedTextureDownsamplingEnabled,i.tiledSurface.lodBias=o.tiledSurface.lodBias,i.tiledSurface.angledSplitBias=o.tiledSurface.angledSplitBias,i.tiledSurface.reduceTileLevelDifferences=o.tiledSurface.reduceTileLevelDifferences,i.tiledSurface.textureFadeDuration=o.tiledSurface.textureFadeDuration,i.heatmap.pixelRatio=o.heatmap.pixelRatio,i.heatmap.maxTotalNumberOfFeatures=o.heatmap.maxTotalNumberOfFeatures,i.fadeDuration=o.fadeDuration,i.antialiasingEnabled=o.antialiasingEnabled,i.physicallyBasedRenderingEnabled=o.physicalBasedRenderingEnabled,i.highQualityTransparency=o.highQualityTransparency,i.highQualityAtmosphere=o.highQualityAtmosphere,i.reflections=o.reflections,i.ambientOcclusion=o.ambientOcclusion,i.memoryLimit=o.memoryLimit,i.additionalCacheMemory=o.additionalCacheMemory,i.frameRate=o.frameRate,i.maximumPixelRatio=o.maximumPixelRatio}}function i(){const a=!!has("esri-mobile"),i=!!has("ios"),o=e(400);return{low:{graphics3D:{maxTotalNumberOfFeatures:25e3,maxTotalNumberOfPrimitives:85e4,polygonLodFactor:.5,polylineLodFactor:1,snapshotAvailable:!1,skipHighSymbolLods:!0},heatmap:{pixelRatio:.125,maxTotalNumberOfFeatures:25e3},sceneService:{object:{lodFactor:.2,lodCrossfadeinDuration:e(0),lodCrossfadeoutDuration:e(0),lodCrossfadeUncoveredDuration:e(0)},point:{lodFactor:1},integratedMesh:{lodFactor:.6},pointCloud:{lodFactor:.5},uncompressedTextureDownsamplingEnabled:!0},tiledSurface:{lodBias:-1,angledSplitBias:.5,reduceTileLevelDifferences:!1,textureFadeDuration:e(0)},fadeDuration:e(0),antialiasingEnabled:!1,physicalBasedRenderingEnabled:!1,highQualityTransparency:!1,highQualityAtmosphere:!1,reflections:!1,ambientOcclusion:!1,memoryLimit:200,additionalCacheMemory:0,frameRate:0,maximumPixelRatio:1},medium:{graphics3D:{maxTotalNumberOfFeatures:5e4,maxTotalNumberOfPrimitives:17e5,polygonLodFactor:a?.8:1,polylineLodFactor:a?1.2:1.5,snapshotAvailable:!i,skipHighSymbolLods:!1},heatmap:{pixelRatio:.25,maxTotalNumberOfFeatures:5e4},sceneService:{object:{lodFactor:1,lodCrossfadeinDuration:e(0),lodCrossfadeoutDuration:e(0),lodCrossfadeUncoveredDuration:o},point:{lodFactor:1},integratedMesh:{lodFactor:1},pointCloud:{lodFactor:1},uncompressedTextureDownsamplingEnabled:a},tiledSurface:{lodBias:0,angledSplitBias:1,reduceTileLevelDifferences:!has("disable-feature:reduce-map-tile-levels"),textureFadeDuration:o},fadeDuration:o,antialiasingEnabled:!0,physicalBasedRenderingEnabled:!0,highQualityTransparency:!0,highQualityAtmosphere:!1,reflections:!1,ambientOcclusion:!1,memoryLimit:a?600:750,additionalCacheMemory:a?0:150,frameRate:0,maximumPixelRatio:1},high:{graphics3D:{maxTotalNumberOfFeatures:5e4,maxTotalNumberOfPrimitives:17e5,polygonLodFactor:a?1.2:2,polylineLodFactor:a?1.2:2,snapshotAvailable:!i,skipHighSymbolLods:!1},heatmap:{pixelRatio:.5,maxTotalNumberOfFeatures:5e4},sceneService:{object:{lodFactor:1,lodCrossfadeinDuration:e(0),lodCrossfadeoutDuration:e(0),lodCrossfadeUncoveredDuration:o},point:{lodFactor:1},integratedMesh:{lodFactor:1},pointCloud:{lodFactor:1},uncompressedTextureDownsamplingEnabled:!1},tiledSurface:{lodBias:0,angledSplitBias:1,reduceTileLevelDifferences:!has("disable-feature:reduce-map-tile-levels"),textureFadeDuration:o},fadeDuration:o,antialiasingEnabled:!0,physicalBasedRenderingEnabled:!0,highQualityTransparency:!0,highQualityAtmosphere:!0,reflections:!0,ambientOcclusion:!0,memoryLimit:a?900:1500,additionalCacheMemory:0,frameRate:0,maximumPixelRatio:a?1:1/0}}}a.test={reset(){const e=i();for(const i of Object.keys(e))a.profiles[i]=e[i]}},function(e){e.profiles=i()}(a||(a={}));const o=a;export{o as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../../chunks/tslib.es6.js";import e from"../../../core/Accessor.js";import{Milliseconds as o}from"../../../core/time.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";let r=class extends e{constructor(){super(...arguments),this.minTotalNumberOfFeatures=2e3,this.maxTotalNumberOfFeatures=5e4,this.maxTotalNumberOfPrimitives=17e5,this.snapshotAvailable=!0,this.polygonLodFactor=1,this.polylineLodFactor=1,this.skipHighSymbolLods=!1}};t([i()],r.prototype,"minTotalNumberOfFeatures",void 0),t([i()],r.prototype,"maxTotalNumberOfFeatures",void 0),t([i()],r.prototype,"maxTotalNumberOfPrimitives",void 0),t([i()],r.prototype,"snapshotAvailable",void 0),t([i()],r.prototype,"polygonLodFactor",void 0),t([i()],r.prototype,"polylineLodFactor",void 0),t([i()],r.prototype,"skipHighSymbolLods",void 0),r=t([s("esri.views.3d.support.QualitySettings.Graphics3DSettings")],r);let p=class extends e{constructor(){super(...arguments),this.lodFactor=1}};t([i()],p.prototype,"lodFactor",void 0),p=t([s("esri.views.3d.support.QualitySettings.LoDFactorSettings")],p);let a=class extends p{constructor(){super(...arguments),this.lodCrossfadeinDuration=o(0),this.lodCrossfadeoutDuration=o(0),this.lodCrossfadeUncoveredDuration=o(0)}};a=t([s("esri.views.3d.support.QualitySettings.LoDFactor3DObjectSettings")],a);let d=class extends e{constructor(){super(...arguments),this.object=new a,this.point=new p,this.integratedMesh=new p,this.pointCloud=new p,this.uncompressedTextureDownsamplingEnabled=!1}};t([i({type:a})],d.prototype,"object",void 0),t([i({type:p})],d.prototype,"point",void 0),t([i({type:p})],d.prototype,"integratedMesh",void 0),t([i({type:p})],d.prototype,"pointCloud",void 0),t([i()],d.prototype,"uncompressedTextureDownsamplingEnabled",void 0),d=t([s("esri.views.3d.support.QualitySettings.SceneServiceSettings")],d);let n=class extends e{constructor(){super(...arguments),this.lodBias=0,this.angledSplitBias=1,this.reduceTileLevelDifferences=!0,this.textureFadeDuration=o(400)}};t([i()],n.prototype,"lodBias",void 0),t([i()],n.prototype,"angledSplitBias",void 0),t([i()],n.prototype,"reduceTileLevelDifferences",void 0),t([i()],n.prototype,"textureFadeDuration",void 0),n=t([s("esri.views.3d.support.QualitySettings.TiledSurfaceSettings")],n);let l=class extends e{constructor(){super(...arguments),this.pixelRatio=1,this.maxTotalNumberOfFeatures=5e4}};t([i()],l.prototype,"pixelRatio",void 0),t([i()],l.prototype,"maxTotalNumberOfFeatures",void 0),l=t([s("esri.views.3d.support.QualitySettings.HeatmapSettings")],l);let c=class extends e{constructor(){super(...arguments),this.graphics3D=new r,this.sceneService=new d,this.tiledSurface=new n,this.heatmap=new l,this.fadeDuration=o(400),this.antialiasingEnabled=!0,this.physicallyBasedRenderingEnabled=!1,this.highQualityTransparency=!0,this.highQualityAtmosphere=!1,this.reflections=!1,this.ambientOcclusion=!1,this.highQualityShadows=!1,this.memoryLimit=750,this.additionalCacheMemory=0,this.frameRate=void 0,this.maximumPixelRatio=1/0}};t([i({type:r})],c.prototype,"graphics3D",void 0),t([i({type:d})],c.prototype,"sceneService",void 0),t([i({type:n})],c.prototype,"tiledSurface",void 0),t([i({type:l})],c.prototype,"heatmap",void 0),t([i()],c.prototype,"fadeDuration",void 0),t([i()],c.prototype,"antialiasingEnabled",void 0),t([i()],c.prototype,"physicallyBasedRenderingEnabled",void 0),t([i()],c.prototype,"highQualityTransparency",void 0),t([i()],c.prototype,"highQualityAtmosphere",void 0),t([i()],c.prototype,"reflections",void 0),t([i()],c.prototype,"ambientOcclusion",void 0),t([i()],c.prototype,"highQualityShadows",void 0),t([i()],c.prototype,"memoryLimit",void 0),t([i()],c.prototype,"additionalCacheMemory",void 0),t([i()],c.prototype,"frameRate",void 0),t([i()],c.prototype,"maximumPixelRatio",void 0),c=t([s("esri.views.3d.support.QualitySettings.QualitySettings")],c);const u=c;export{u as default};
5
+ import{_ as t}from"../../../chunks/tslib.es6.js";import e from"../../../core/Accessor.js";import{Milliseconds as o}from"../../../core/time.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";let r=class extends e{constructor(){super(...arguments),this.minTotalNumberOfFeatures=2e3,this.maxTotalNumberOfFeatures=5e4,this.maxTotalNumberOfPrimitives=17e5,this.snapshotAvailable=!0,this.polygonLodFactor=1,this.polylineLodFactor=1,this.skipHighSymbolLods=!1}};t([i()],r.prototype,"minTotalNumberOfFeatures",void 0),t([i()],r.prototype,"maxTotalNumberOfFeatures",void 0),t([i()],r.prototype,"maxTotalNumberOfPrimitives",void 0),t([i()],r.prototype,"snapshotAvailable",void 0),t([i()],r.prototype,"polygonLodFactor",void 0),t([i()],r.prototype,"polylineLodFactor",void 0),t([i()],r.prototype,"skipHighSymbolLods",void 0),r=t([s("esri.views.3d.support.QualitySettings.Graphics3DSettings")],r);let p=class extends e{constructor(){super(...arguments),this.lodFactor=1}};t([i()],p.prototype,"lodFactor",void 0),p=t([s("esri.views.3d.support.QualitySettings.LoDFactorSettings")],p);let a=class extends p{constructor(){super(...arguments),this.lodCrossfadeinDuration=o(0),this.lodCrossfadeoutDuration=o(0),this.lodCrossfadeUncoveredDuration=o(0)}};a=t([s("esri.views.3d.support.QualitySettings.LoDFactor3DObjectSettings")],a);let n=class extends e{constructor(){super(...arguments),this.object=new a,this.point=new p,this.integratedMesh=new p,this.pointCloud=new p,this.uncompressedTextureDownsamplingEnabled=!1}};t([i({type:a})],n.prototype,"object",void 0),t([i({type:p})],n.prototype,"point",void 0),t([i({type:p})],n.prototype,"integratedMesh",void 0),t([i({type:p})],n.prototype,"pointCloud",void 0),t([i()],n.prototype,"uncompressedTextureDownsamplingEnabled",void 0),n=t([s("esri.views.3d.support.QualitySettings.SceneServiceSettings")],n);let d=class extends e{constructor(){super(...arguments),this.lodBias=0,this.angledSplitBias=1,this.reduceTileLevelDifferences=!0,this.textureFadeDuration=o(400)}};t([i()],d.prototype,"lodBias",void 0),t([i()],d.prototype,"angledSplitBias",void 0),t([i()],d.prototype,"reduceTileLevelDifferences",void 0),t([i()],d.prototype,"textureFadeDuration",void 0),d=t([s("esri.views.3d.support.QualitySettings.TiledSurfaceSettings")],d);let l=class extends e{constructor(){super(...arguments),this.pixelRatio=1,this.maxTotalNumberOfFeatures=5e4}};t([i()],l.prototype,"pixelRatio",void 0),t([i()],l.prototype,"maxTotalNumberOfFeatures",void 0),l=t([s("esri.views.3d.support.QualitySettings.HeatmapSettings")],l);let c=class extends e{constructor(){super(...arguments),this.graphics3D=new r,this.sceneService=new n,this.tiledSurface=new d,this.heatmap=new l,this.fadeDuration=o(400),this.antialiasingEnabled=!0,this.physicallyBasedRenderingEnabled=!1,this.highQualityTransparency=!0,this.highQualityAtmosphere=!1,this.reflections=!1,this.ambientOcclusion=!1,this.memoryLimit=750,this.additionalCacheMemory=0,this.frameRate=void 0,this.maximumPixelRatio=1/0}};t([i({type:r})],c.prototype,"graphics3D",void 0),t([i({type:n})],c.prototype,"sceneService",void 0),t([i({type:d})],c.prototype,"tiledSurface",void 0),t([i({type:l})],c.prototype,"heatmap",void 0),t([i()],c.prototype,"fadeDuration",void 0),t([i()],c.prototype,"antialiasingEnabled",void 0),t([i()],c.prototype,"physicallyBasedRenderingEnabled",void 0),t([i()],c.prototype,"highQualityTransparency",void 0),t([i()],c.prototype,"highQualityAtmosphere",void 0),t([i()],c.prototype,"reflections",void 0),t([i()],c.prototype,"ambientOcclusion",void 0),t([i()],c.prototype,"memoryLimit",void 0),t([i()],c.prototype,"additionalCacheMemory",void 0),t([i()],c.prototype,"frameRate",void 0),t([i()],c.prototype,"maximumPixelRatio",void 0),c=t([s("esri.views.3d.support.QualitySettings.QualitySettings")],c);const u=c;export{u as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import r from"../../../../core/Handles.js";import{watch as s,sync as n,when as i,on as o,initial as a}from"../../../../core/reactiveUtils.js";import{property as c}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{subclass as u}from"../../../../core/accessorSupport/decorators/subclass.js";import{a as h,k as d,c as f}from"../../../../chunks/vec3.js";import{c as p}from"../../../../chunks/vec3f64.js";import{create as l}from"../../../../geometry/support/ray.js";import _ from"../debugFlags.js";import{PointGraphics as m}from"../debugUtils.js";import{PropertiesPool as C}from"../PropertiesPool.js";import{fromRenderAtEye as y}from"../geometryUtils/ray.js";import{CameraOnSurface as O}from"./CameraOnSurface.js";import{CenterOnSurface as A}from"./CenterOnSurface.js";import{ContentGeometryUpdates as g}from"./ContentGeometryUpdates.js";import{Focus as w}from"./Focus.js";import{StableSurfaceCenter as I}from"./StableSurfaceCenter.js";import{SurfaceGeometryUpdates as S}from"./SurfaceGeometryUpdates.js";import{newIntersector as v}from"../../webgl-engine/lib/Intersector.js";import{StoreResults as b}from"../../webgl-engine/lib/IntersectorInterfaces.js";import{TERRAIN_ID as R}from"../../webgl-engine/lib/verticalOffsetUtils.js";import{TaskPriority as T}from"../../../support/Scheduler.js";let P=class extends t{constructor(e){super(e),this._handles=new r,this._tmpRay=l(),this._centerRayDirty=!0,this._surfaceAltitudeAtCenter=0,this._surfaceAltitudeAtCenterDirty=!0,this._contentAltitudeAtCenter=0,this._contentAltitudeAtCenterDirty=!0,this._propertiesPool=new C({renderPointOfView:j},this),this.renderPointOfView=p(),this._pois=new Array,this._debugCenters=new Map}initialize(){const{state:e,basemapTerrain:t,renderCoordsHelper:r,map:c}=this.view;this._surfaceIntersector=v(e.viewingMode),e.isGlobal?this._surfaceIntersector.options.backfacesTerrain=!1:this._surfaceIntersector.options.backfacesTerrain=!0,this._surfaceIntersector.options.invisibleTerrain=!1,this._surfaceIntersector.options.store=b.MIN,this._contentIntersector=v(e.viewingMode);const u=()=>this._estimateSurfaceAltitudeAtCenter(),h=this.view.resourceController.scheduler,d=this.view.basemapTerrain?.elevationQueryCache,f={state:e,scheduler:h,surface:t,renderCoordsHelper:r};this._set("centerOnSurfaceInfrequent",new A({...f,task:T.POINT_OF_INTEREST_INFREQUENT,estimateSurfaceAltitudeAtCenter:u})),this._set("centerOnSurfaceFrequent",new A({...f,task:T.POINT_OF_INTEREST_FREQUENT,estimateSurfaceAltitudeAtCenter:u})),this._set("centerOnContent",new A({...f,task:T.POINT_OF_INTEREST_FREQUENT,estimateSurfaceAltitudeAtCenter:()=>this._estimateContentAltitudeAtCenter()})),this._set("cameraOnSurface",new O({...f,cache:d,task:T.POINT_OF_INTEREST_INFREQUENT,map:c})),this._set("surfaceGeometryUpdates",new S({...f,centerOnSurfaces:[this.centerOnSurfaceFrequent,this.centerOnContent,this.centerOnSurfaceInfrequent]})),this._set("contentGeometryUpdates",new g({contentLayerViews:this.view.allLayerViews,renderCoordsHelper:r})),this._set("surfaceOrigin",new I({cache:d,view:this.view})),this._set("focus",new w({state:e,scheduler:h,surface:t,renderCoordsHelper:r,centerOnSurface:this.centerOnSurfaceInfrequent,estimateSurfaceIntersectionAtRenderPoint:(e,t)=>this._estimateSurfaceIntersectionAtRenderPoint(e,this.view.state.contentCamera,t)})),this._pois.push(this.centerOnContent,this.centerOnSurfaceFrequent,this.centerOnSurfaceInfrequent,this.cameraOnSurface,this.focus);const p=this.view.graphics;this._debugCenters.set(this.centerOnContent,new m(p,"red","CenterOnContent")),this._debugCenters.set(this.centerOnSurfaceFrequent,new m(p,"red","CenterOnSurface")),this._debugCenters.set(this.centerOnSurfaceInfrequent,new m(p,"red","CenterOnSurface")),this._debugCenters.set(this.cameraOnSurface,new m(p,"blue","CameraOnSurface")),this._debugCenters.set(this.focus,new m(p,"green","Focus")),this._handles.add([s((()=>e.contentCamera),(e=>this._cameraChanged(e)),n),s((()=>t.extent),(()=>this._updateCenterPointsOfInterest())),i((()=>!t.updating),(()=>this._updateCenterPointsOfInterest()),n),o((()=>this.surfaceGeometryUpdates.events),"request-update",(()=>this._updateCenterPointsOfInterest())),o((()=>this.contentGeometryUpdates.events),"request-update",(()=>this._updateCenterOnContent())),i((()=>_.SHOW_POI),(e=>this._setDebug(e)),a)]),this._cameraChanged(this.view.state.contentCamera);for(const s of this._pois)s.runTask()}destroy(){this._setDebug(!1),this._handles.destroy(),this._propertiesPool.destroy();for(const e of this._pois)e.destroy();this.surfaceOrigin.destroy()}get updating(){return!(!this.surfaceGeometryUpdates?.updating&&!this._pois.some((e=>e.updating)))}get _centerRay(){return this._centerRayDirty&&(this._centerRayCached=this.view.sceneIntersectionHelper.getCenterRayWithSubpixelOffset(this.view.state.contentCamera,this._tmpRay),this._centerRayDirty=!1),this._centerRayCached}_estimateContentAltitudeAtCenter(){if(!this._contentAltitudeAtCenterDirty)return this._contentAltitudeAtCenter;this._contentAltitudeAtCenterDirty=!1;const e=this._centerRay;return null==e||(this.view.sceneIntersectionHelper.intersectRay(e,this._contentIntersector,U,D)?this._contentAltitudeAtCenter=this.view.renderCoordsHelper.getAltitude(U):this._contentAltitudeAtCenter=this._estimateSurfaceAltitudeAtCenter()),this._contentAltitudeAtCenter}_estimateSurfaceAltitudeAtCenter(){if(!this.view.basemapTerrain)return 0;if(!this._surfaceAltitudeAtCenterDirty)return this._surfaceAltitudeAtCenter;this._surfaceAltitudeAtCenterDirty=!1;const e=this._centerRay;if(null==e)return this._surfaceAltitudeAtCenter;const t=e.origin,r=h(U,e.origin,e.direction);return this._surfaceIntersector.resetWithRay(e,this.view.state.contentCamera),this.view.basemapTerrain.intersect(this._surfaceIntersector,null,t,r),this._surfaceIntersector.results.min.getIntersectionPoint(U)&&(this._surfaceAltitudeAtCenter=this.view.renderCoordsHelper.getAltitude(U)),this._surfaceAltitudeAtCenter}_estimateSurfaceIntersectionAtRenderPoint(e,t,r){const s=y(t,e,E);if(null==s)return null;const n=s.origin,i=h(U,s.origin,s.direction);return this._surfaceIntersector.resetWithRay(s,t),this.view.basemapTerrain.intersect(this._surfaceIntersector,null,n,i),this._surfaceIntersector.results.min.getIntersectionPoint(r)?r:null}_cameraChanged(e){this._updateCenterPointsOfInterest();const t=e.eye;d(this.renderPointOfView,t)||this._set("renderPointOfView",f(this._propertiesPool.get("renderPointOfView"),t))}_updateCenterPointsOfInterest(){this._centerRayDirty=!0,this._surfaceAltitudeAtCenterDirty=!0,this._contentAltitudeAtCenterDirty=!0;for(const e of this._pois)e.updateRenderLocation()}_updateCenterOnContent(){this._contentAltitudeAtCenterDirty=!0,this.centerOnContent.updateRenderLocation()}_setDebug(e){if(!e)return this._debugCenters.forEach((e=>e.hide())),void this._handles.remove("debug");for(const t of this._pois)this._handles.add(s((()=>t.renderLocation),(e=>this._debugCenters.get(t)?.show(e,t.renderCoordsHelper.spatialReference)),a),"debug")}get test(){return{update:()=>{this.surfaceGeometryUpdates.runTask();for(const e of this._pois)e.runTask()},surfaceGeometryUpdates:this.surfaceGeometryUpdates}}};e([c({readOnly:!0})],P.prototype,"centerOnContent",void 0),e([c({readOnly:!0})],P.prototype,"centerOnSurfaceFrequent",void 0),e([c({readOnly:!0})],P.prototype,"centerOnSurfaceInfrequent",void 0),e([c({readOnly:!0})],P.prototype,"cameraOnSurface",void 0),e([c({readOnly:!0})],P.prototype,"focus",void 0),e([c({readOnly:!0})],P.prototype,"renderPointOfView",void 0),e([c({readOnly:!0})],P.prototype,"surfaceOrigin",void 0),e([c({readOnly:!0})],P.prototype,"contentGeometryUpdates",void 0),e([c({readOnly:!0})],P.prototype,"surfaceGeometryUpdates",void 0),e([c({constructOnly:!0})],P.prototype,"view",void 0),e([c({readOnly:!0})],P.prototype,"updating",null),P=e([u("esri.views.3d.support.PointsOfInterest")],P);const j=Array,U=p(),E=l(),D={exclude:new Set([R])};export{P as PointsOfInterest};
5
+ import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import r from"../../../../core/Handles.js";import{watch as s,sync as n,when as i,on as o,initial as a}from"../../../../core/reactiveUtils.js";import{property as c}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{subclass as u}from"../../../../core/accessorSupport/decorators/subclass.js";import{a as h,k as d,c as p}from"../../../../chunks/vec3.js";import{c as f}from"../../../../chunks/vec3f64.js";import{create as l}from"../../../../geometry/support/ray.js";import _ from"../debugFlags.js";import{PointGraphics as m}from"../debugUtils.js";import{PropertiesPool as C}from"../PropertiesPool.js";import{fromRenderAtEye as y}from"../geometryUtils/ray.js";import{CameraOnSurface as O}from"./CameraOnSurface.js";import{CenterOnSurface as A}from"./CenterOnSurface.js";import{ContentGeometryUpdates as g}from"./ContentGeometryUpdates.js";import{Focus as w}from"./Focus.js";import{StableSurfaceCenter as I}from"./StableSurfaceCenter.js";import{SurfaceGeometryUpdates as S}from"./SurfaceGeometryUpdates.js";import{newIntersector as v}from"../../webgl-engine/lib/Intersector.js";import{StoreResults as b}from"../../webgl-engine/lib/IntersectorInterfaces.js";import{TERRAIN_ID as R}from"../../webgl-engine/lib/verticalOffsetUtils.js";import{TaskPriority as T}from"../../../support/Scheduler.js";let P=class extends t{constructor(e){super(e),this._handles=new r,this._tmpRay=l(),this._centerRayDirty=!0,this._surfaceAltitudeAtCenter=0,this._surfaceAltitudeAtCenterDirty=!0,this._contentAltitudeAtCenter=0,this._contentAltitudeAtCenterDirty=!0,this._propertiesPool=new C({renderPointOfView:j},this),this.renderPointOfView=f(),this._pois=new Array,this._debugCenters=new Map}initialize(){const{state:e,basemapTerrain:t,renderCoordsHelper:r,map:c}=this.view;this._surfaceIntersector=v(e.viewingMode),e.isGlobal?this._surfaceIntersector.options.backfacesTerrain=!1:this._surfaceIntersector.options.backfacesTerrain=!0,this._surfaceIntersector.options.invisibleTerrain=!1,this._surfaceIntersector.options.store=b.MIN,this._contentIntersector=v(e.viewingMode);const u=()=>this._estimateSurfaceAltitudeAtCenter(),h=this.view.resourceController.scheduler,d=this.view.basemapTerrain?.elevationQueryCache,p={state:e,scheduler:h,surface:t,renderCoordsHelper:r};this._set("centerOnSurfaceInfrequent",new A({...p,task:T.POINT_OF_INTEREST_INFREQUENT,estimateSurfaceAltitudeAtCenter:u})),this._set("centerOnSurfaceFrequent",new A({...p,task:T.POINT_OF_INTEREST_FREQUENT,estimateSurfaceAltitudeAtCenter:u})),this._set("centerOnContent",new A({...p,task:T.POINT_OF_INTEREST_FREQUENT,estimateSurfaceAltitudeAtCenter:()=>this._estimateContentAltitudeAtCenter()})),this._set("cameraOnSurface",new O({...p,cache:d,task:T.POINT_OF_INTEREST_INFREQUENT,map:c})),this._set("surfaceGeometryUpdates",new S({...p,centerOnSurfaces:[this.centerOnSurfaceFrequent,this.centerOnContent,this.centerOnSurfaceInfrequent]})),this._set("contentGeometryUpdates",new g({contentLayerViews:this.view.allLayerViews,renderCoordsHelper:r})),this._set("surfaceOrigin",new I({cache:d,view:this.view})),this._set("focus",new w({state:e,scheduler:h,surface:t,renderCoordsHelper:r,centerOnSurface:this.centerOnSurfaceFrequent,estimateSurfaceIntersectionAtRenderPoint:(e,t)=>this._estimateSurfaceIntersectionAtRenderPoint(e,this.view.state.contentCamera,t)})),this._pois.push(this.centerOnContent,this.centerOnSurfaceFrequent,this.centerOnSurfaceInfrequent,this.cameraOnSurface,this.focus);const f=this.view.graphics;this._debugCenters.set(this.centerOnContent,new m(f,"red","CenterOnContent")),this._debugCenters.set(this.centerOnSurfaceFrequent,new m(f,"red","CenterOnSurface")),this._debugCenters.set(this.centerOnSurfaceInfrequent,new m(f,"red","CenterOnSurface")),this._debugCenters.set(this.cameraOnSurface,new m(f,"blue","CameraOnSurface")),this._debugCenters.set(this.focus,new m(f,"green","Focus")),this._handles.add([s((()=>e.contentCamera),(e=>this._cameraChanged(e)),n),s((()=>t.extent),(()=>this._updateCenterPointsOfInterest())),i((()=>!t.updating),(()=>this._updateCenterPointsOfInterest()),n),o((()=>this.surfaceGeometryUpdates.events),"request-update",(()=>this._updateCenterPointsOfInterest())),o((()=>this.contentGeometryUpdates.events),"request-update",(()=>this._updateCenterOnContent())),i((()=>_.SHOW_POI),(e=>this._setDebug(e)),a)]),this._cameraChanged(this.view.state.contentCamera);for(const s of this._pois)s.runTask()}destroy(){this._setDebug(!1),this._handles.destroy(),this._propertiesPool.destroy();for(const e of this._pois)e.destroy();this.surfaceOrigin.destroy()}get updating(){return!(!this.surfaceGeometryUpdates?.updating&&!this._pois.some((e=>e.updating)))}get _centerRay(){return this._centerRayDirty&&(this._centerRayCached=this.view.sceneIntersectionHelper.getCenterRayWithSubpixelOffset(this.view.state.contentCamera,this._tmpRay),this._centerRayDirty=!1),this._centerRayCached}_estimateContentAltitudeAtCenter(){if(!this._contentAltitudeAtCenterDirty)return this._contentAltitudeAtCenter;this._contentAltitudeAtCenterDirty=!1;const e=this._centerRay;return null==e||(this.view.sceneIntersectionHelper.intersectRay(e,this._contentIntersector,U,F)?this._contentAltitudeAtCenter=this.view.renderCoordsHelper.getAltitude(U):this._contentAltitudeAtCenter=this._estimateSurfaceAltitudeAtCenter()),this._contentAltitudeAtCenter}_estimateSurfaceAltitudeAtCenter(){if(!this.view.basemapTerrain)return 0;if(!this._surfaceAltitudeAtCenterDirty)return this._surfaceAltitudeAtCenter;this._surfaceAltitudeAtCenterDirty=!1;const e=this._centerRay;if(null==e)return this._surfaceAltitudeAtCenter;const t=e.origin,r=h(U,e.origin,e.direction);return this._surfaceIntersector.resetWithRay(e,this.view.state.contentCamera),this.view.basemapTerrain.intersect(this._surfaceIntersector,null,t,r),this._surfaceIntersector.results.min.getIntersectionPoint(U)&&(this._surfaceAltitudeAtCenter=this.view.renderCoordsHelper.getAltitude(U)),this._surfaceAltitudeAtCenter}_estimateSurfaceIntersectionAtRenderPoint(e,t,r){const s=y(t,e,E);if(null==s)return null;const n=s.origin,i=h(U,s.origin,s.direction);return this._surfaceIntersector.resetWithRay(s,t),this.view.basemapTerrain.intersect(this._surfaceIntersector,null,n,i),this._surfaceIntersector.results.min.getIntersectionPoint(r)?r:null}_cameraChanged(e){this._updateCenterPointsOfInterest();const t=e.eye;d(this.renderPointOfView,t)||this._set("renderPointOfView",p(this._propertiesPool.get("renderPointOfView"),t))}_updateCenterPointsOfInterest(){this._centerRayDirty=!0,this._surfaceAltitudeAtCenterDirty=!0,this._contentAltitudeAtCenterDirty=!0;for(const e of this._pois)e.updateRenderLocation()}_updateCenterOnContent(){this._contentAltitudeAtCenterDirty=!0,this.centerOnContent.updateRenderLocation()}_setDebug(e){if(!e)return this._debugCenters.forEach((e=>e.hide())),void this._handles.remove("debug");for(const t of this._pois)this._handles.add(s((()=>t.renderLocation),(e=>this._debugCenters.get(t)?.show(e,t.renderCoordsHelper.spatialReference)),a),"debug")}get test(){return{update:()=>{this.surfaceGeometryUpdates.runTask();for(const e of this._pois)e.runTask()},surfaceGeometryUpdates:this.surfaceGeometryUpdates}}};e([c({readOnly:!0})],P.prototype,"centerOnContent",void 0),e([c({readOnly:!0})],P.prototype,"centerOnSurfaceFrequent",void 0),e([c({readOnly:!0})],P.prototype,"centerOnSurfaceInfrequent",void 0),e([c({readOnly:!0})],P.prototype,"cameraOnSurface",void 0),e([c({readOnly:!0})],P.prototype,"focus",void 0),e([c({readOnly:!0})],P.prototype,"renderPointOfView",void 0),e([c({readOnly:!0})],P.prototype,"surfaceOrigin",void 0),e([c({readOnly:!0})],P.prototype,"contentGeometryUpdates",void 0),e([c({readOnly:!0})],P.prototype,"surfaceGeometryUpdates",void 0),e([c({constructOnly:!0})],P.prototype,"view",void 0),e([c({readOnly:!0})],P.prototype,"updating",null),P=e([u("esri.views.3d.support.PointsOfInterest")],P);const j=Array,U=f(),E=l(),F={exclude:new Set([R])};export{P as PointsOfInterest};