@agrotools1/at-components 0.3.4 → 0.3.5

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 (895) hide show
  1. package/dist/AGraphicContainer-b6e32ab3.js +109 -0
  2. package/dist/APIKeyMixin-83218bd5.js +19 -0
  3. package/dist/Analysis-8c5616ab.js +31 -0
  4. package/dist/ArcGISCachedService-8da73861.js +47 -0
  5. package/dist/ArcGISService-1e7483eb.js +25 -0
  6. package/dist/AreaMeasurement2D-ee78c5ab.js +405 -0
  7. package/dist/AreaMeasurement3D-098fd9ea.js +488 -0
  8. package/dist/AttachmentInfo-1b2ece0a.js +34 -0
  9. package/dist/AttachmentQuery-470d5a03.js +18 -0
  10. package/dist/AttributeStore-f80857be.js +1707 -0
  11. package/dist/BaseDynamicLayerView2D-a5f201d7.js +63 -0
  12. package/dist/BingMapsLayer-4c95d39c.js +112 -0
  13. package/dist/Bitmap-d7c41f66.js +128 -0
  14. package/dist/BitmapContainer-af419f59.js +23 -0
  15. package/dist/BlendLayer-ced1717f.js +13 -0
  16. package/dist/BoundsStore-030e1112.js +63 -0
  17. package/dist/BufferObject-6f0ccf08.js +100 -0
  18. package/dist/BufferView-83825b1b.js +683 -0
  19. package/dist/BuildingSceneLayer-67d67dd9.js +535 -0
  20. package/dist/Button-b96d4e96.js +36 -0
  21. package/dist/CSVLayer-0d54cccb.js +208 -0
  22. package/dist/CSVSourceWorker-00c7e147.js +367 -0
  23. package/dist/CatalogDynamicGroupLayerView2D-e1b747eb.js +66 -0
  24. package/dist/CatalogFootprintLayerView2D-4d654b8c.js +76 -0
  25. package/dist/CatalogLayer-fdcebf46.js +262 -0
  26. package/dist/CatalogLayerView2D-d872dec4.js +52 -0
  27. package/dist/ClassBreaksDefinition-0f6902fe.js +18 -0
  28. package/dist/ColorMaterial.glsl-0f79d1d3.js +64 -0
  29. package/dist/ColorSet-1f170190.js +45 -0
  30. package/dist/ColorStop-81b2ebbf.js +29 -0
  31. package/dist/Container-5cca9103.js +521 -0
  32. package/dist/CustomParametersMixin-fa9fc8f5.js +12 -0
  33. package/dist/DefaultMaterial.glsl-ea170d90.js +42 -0
  34. package/dist/DefaultMaterial_COLOR_GAMMA-e9199fb6.js +653 -0
  35. package/dist/DefaultTheme-e76e0ce4.js +130 -0
  36. package/dist/DeleteForwardEditsParameters-114413db.js +18 -0
  37. package/dist/DimensionLayer-5caa9d6d.js +129 -0
  38. package/dist/DirectLineMeasurement3D-6d3a316a.js +449 -0
  39. package/dist/DistanceMeasurement2D-7090d647.js +303 -0
  40. package/dist/DoubleArray-40bc6f82.js +25 -0
  41. package/dist/Dropdown/Checklist/Dropdown.Checklist.d.ts +17 -17
  42. package/dist/Dropdown/Dropdown.core.d.ts +6 -4
  43. package/dist/Dropdown/Dropdown.types.d.ts +1 -1
  44. package/dist/EdgeProcessingWorker-94aed8c4.js +63 -0
  45. package/dist/EditBusLayer-dcf477a3.js +107 -0
  46. package/dist/ElevationInfo-a456026a.js +56 -0
  47. package/dist/ElevationLayer-6061b8f4.js +129 -0
  48. package/dist/ElevationQuery-ec17e2cc.js +598 -0
  49. package/dist/ElevationSamplerWorker-beaaeaeb.js +62 -0
  50. package/dist/ExportImageParameters-56040230.js +66 -0
  51. package/dist/ExportStrategy-7d1b4a0c.js +93 -0
  52. package/dist/ExportWMSImageParameters-0b3d33ed.js +33 -0
  53. package/dist/External-9a57bcf0.js +110 -0
  54. package/dist/FeatureCollectionSnappingSource-b589f9ce.js +130 -0
  55. package/dist/FeatureCommandQueue-d1572e0d.js +1244 -0
  56. package/dist/FeatureEffect-20d94762.js +39 -0
  57. package/dist/FeatureEffectLayer-017997f2.js +13 -0
  58. package/dist/FeatureFilter-73c8c240.js +27 -0
  59. package/dist/FeatureLayer-ecf9f4ea.js +693 -0
  60. package/dist/FeatureLayerBase-1ffc64a0.js +148 -0
  61. package/dist/FeatureLayerSource-0acdac77.js +444 -0
  62. package/dist/FeatureLayerView2D-6f0d2580.js +1967 -0
  63. package/dist/FeaturePipelineWorker-77d06d4f.js +3633 -0
  64. package/dist/FeatureReductionLayer-203415cc.js +225 -0
  65. package/dist/FeatureReductionSelection-4ba3cfda.js +22 -0
  66. package/dist/FeatureServiceSnappingSource-90c5e877.js +481 -0
  67. package/dist/FeatureServiceSnappingSourceWorker-9f33d320.js +747 -0
  68. package/dist/FeatureSet-29d82bc9.js +188 -0
  69. package/dist/FeatureStore-9d48217b.js +131 -0
  70. package/dist/FeatureTemplate-79cf9cb6.js +12 -0
  71. package/dist/FeatureType-30eece24.js +25 -0
  72. package/dist/FieldsIndex-7d8f3589.js +109 -0
  73. package/dist/Filter/components/Filter.types.d.ts +17 -0
  74. package/dist/Filter/index.d.ts +4 -0
  75. package/dist/Filter/tests/mocks.d.ts +6 -0
  76. package/dist/FormTemplate-18b193a8.js +350 -0
  77. package/dist/GeoJSONLayer-d2677013.js +236 -0
  78. package/dist/GeoJSONSourceWorker-4571c9d5.js +247 -0
  79. package/dist/GeoRSSLayer-320f17b2.js +73 -0
  80. package/dist/GeoRSSLayerView2D-4683eb47.js +140 -0
  81. package/dist/GeometryUtils-b855940e.js +403 -0
  82. package/dist/GraphicContainer-9bd07fb2.js +26 -0
  83. package/dist/GraphicManipulator-e96e9aa3.js +1499 -0
  84. package/dist/GraphicsLayer-964ed1f0.js +38 -0
  85. package/dist/GraphicsLayerView2D-83766b4b.js +114 -0
  86. package/dist/GraphicsSnappingSource-0bf5350b.js +273 -0
  87. package/dist/GraphicsView2D-3103ed12.js +620 -0
  88. package/dist/GroupLayer-2c099630.js +147 -0
  89. package/dist/GroupLayerView2D-abb8b6d5.js +98 -0
  90. package/dist/HUDMaterial.glsl-6e206016.js +65 -0
  91. package/dist/HighlightCounter-1d4774e1.js +41 -0
  92. package/dist/HighlightGraphicContainer-de26900b.js +18 -0
  93. package/dist/I3SBinaryReader-63c12e1b.js +310 -0
  94. package/dist/I3SLayerDefinitions-d0aa8265.js +55 -0
  95. package/dist/I3SUtil-277467e8.js +59 -0
  96. package/dist/IdentityManager-a1b54522.js +899 -0
  97. package/dist/ImageHistogramParameters-47cf0f1b.js +905 -0
  98. package/dist/ImageryLayer-89c92097.js +1799 -0
  99. package/dist/ImageryLayerView2D-e0c5549a.js +352 -0
  100. package/dist/ImageryTileLayer-c38364f3.js +2157 -0
  101. package/dist/ImageryTileLayerView2D-f659a87c.js +1110 -0
  102. package/dist/Indices-29975728.js +67 -0
  103. package/dist/Input/Input.core.d.ts +1 -1
  104. package/dist/Input/index.d.ts +1 -1
  105. package/dist/IntegratedMesh3DTilesLayer-8b851e87.js +112 -0
  106. package/dist/IntegratedMeshLayer-9ed738ba.js +141 -0
  107. package/dist/InteractiveAnalysisViewModel-c95e13c5.js +7397 -0
  108. package/dist/InterleavedLayout-f5e6ee23.js +163 -0
  109. package/dist/KMLLayer-3662a890.js +162 -0
  110. package/dist/KMLLayerView2D-3d172b6a.js +253 -0
  111. package/dist/KnowledgeGraphLayerView2D-086160b5.js +43 -0
  112. package/dist/LRUCache-948c7d75.js +32 -0
  113. package/dist/LabelClass-c0694878.js +135 -0
  114. package/dist/LabelMetric-39280634.js +400 -0
  115. package/dist/LaserlinePath.glsl-205f0e8a.js +64 -0
  116. package/dist/Laserlines.glsl-6f09c43e.js +65 -0
  117. package/dist/LayerFloorInfo-308449b6.js +15 -0
  118. package/dist/LayerView-2b3b1a70.js +206 -0
  119. package/dist/LercWorker-b007ee29.js +157 -0
  120. package/dist/LineOfSightLayer-99b48ebf.js +147 -0
  121. package/dist/LinkChartLayer-d69e2e36.js +1027 -0
  122. package/dist/List/components/List.d.ts +74 -0
  123. package/dist/List/components/List.types.d.ts +11 -0
  124. package/dist/List/index.d.ts +4 -0
  125. package/dist/List/tests/mocks.d.ts +7 -0
  126. package/dist/Lyr3DWorker-2fdd578b.js +82 -0
  127. package/dist/MagnifierPrograms-5042ccad.js +806 -0
  128. package/dist/MapImageLayer-f3e35db3.js +169 -0
  129. package/dist/MapImageLayerView2D-98cfaffb.js +146 -0
  130. package/dist/MapNotesLayer-6942570f.js +283 -0
  131. package/dist/MapNotesLayerView2D-b641bba4.js +161 -0
  132. package/dist/MapServiceLayerViewHelper-9111fb4f.js +288 -0
  133. package/dist/MeasurementWidgetContent-a66f382a.js +2642 -0
  134. package/dist/MediaLayer-585e1067.js +523 -0
  135. package/dist/MediaLayerView2D-74d90bf4.js +332 -0
  136. package/dist/MemCache-1532e921.js +227 -0
  137. package/dist/MemorySourceWorker-ba059303.js +222 -0
  138. package/dist/Mesh-43d631db.js +980 -0
  139. package/dist/MeshLocalVertexSpace-f9cc6881.js +19 -0
  140. package/dist/MultiOriginJSONSupport-ec8788e6.js +158 -0
  141. package/dist/OGCFeatureLayer-5e327659.js +211 -0
  142. package/dist/OGCFeatureLayerView2D-d0104fdc.js +82 -0
  143. package/dist/ObjectStack-2d389b76.js +21 -0
  144. package/dist/Octree-1dba17ba.js +495 -0
  145. package/dist/OpenStreetMapLayer-dc083119.js +30 -0
  146. package/dist/OperationalLayer-d43d80b1.js +44 -0
  147. package/dist/OrderByInfo-26301234.js +16 -0
  148. package/dist/OrderedLayer-36fe0e60.js +26 -0
  149. package/dist/OrientedImageryLayer-21689d88.js +216 -0
  150. package/dist/OverlayCompositing.glsl-f80836ca.js +65 -0
  151. package/dist/OverrideHelper-880a7e09.js +242 -0
  152. package/dist/PBFDecoderWorker-b5f6d890.js +213 -0
  153. package/dist/PointCloudLayer-899f6a49.js +197 -0
  154. package/dist/PointCloudUniqueValueRenderer-8a477087.js +115 -0
  155. package/dist/PointCloudWorker-4bea79e8.js +212 -0
  156. package/dist/PooledRBush-df73bc2a.js +272 -0
  157. package/dist/Popup-e01092b4.js +3990 -0
  158. package/dist/PortalLayer-daca6a23.js +126 -0
  159. package/dist/Program-8b1e5f48.js +694 -0
  160. package/dist/ProgramTemplate-e4360f44.js +35 -0
  161. package/dist/QueryEngine-ca1511e3.js +896 -0
  162. package/dist/QueryTask-c9fa71fa.js +119 -0
  163. package/dist/RasterSymbolizer-1644d7a7.js +3024 -0
  164. package/dist/RasterVFDisplayObject-7ec19876.js +581 -0
  165. package/dist/RasterWorker-2d320094.js +78 -0
  166. package/dist/RawBlockCache-86e6c5d3.js +185 -0
  167. package/dist/RealisticTree.glsl-65abf4e9.js +42 -0
  168. package/dist/RefreshableLayer-a0708abb.js +80 -0
  169. package/dist/RefreshableLayerView-2b6aca24.js +16 -0
  170. package/dist/Relationship-ef9ae528.js +64 -0
  171. package/dist/RelationshipQuery-8a39148b.js +22 -0
  172. package/dist/RenderingContext-e718bfed.js +889 -0
  173. package/dist/RibbonLine.glsl-e82fb3bb.js +65 -0
  174. package/dist/RouteLayer-06ecd24a.js +786 -0
  175. package/dist/RouteLayerView2D-26c96396.js +195 -0
  176. package/dist/SDFHelper-70cff23b.js +140 -0
  177. package/dist/SSAO.glsl-54f15911.js +43 -0
  178. package/dist/SSAOBlur.glsl-cbd829bc.js +42 -0
  179. package/dist/ScaleRangeLayer-dc6d9c0e.js +21 -0
  180. package/dist/SceneLayer-255b45af.js +542 -0
  181. package/dist/SceneLayerSnappingSource-8969a32e.js +218 -0
  182. package/dist/SceneLayerSnappingSourceWorker-17673240.js +112 -0
  183. package/dist/SceneLayerWorker-46a764a8.js +164 -0
  184. package/dist/SceneService-bbc3f4e5.js +215 -0
  185. package/dist/Scheduler-e3ad50f2.js +373 -0
  186. package/dist/Search/Search.d.ts +11 -0
  187. package/dist/Select/Multiple/Select.multiple.d.ts +1 -1
  188. package/dist/Select/Select.core.d.ts +1 -1
  189. package/dist/Select/index.d.ts +1 -1
  190. package/dist/ShadedColorMaterial.glsl-8e194f81.js +64 -0
  191. package/dist/SnappingOperation-d12c0cd0.js +48 -0
  192. package/dist/SourceLayerData-054d8bb6.js +116 -0
  193. package/dist/SpatialFilter-ba146c95.js +1701 -0
  194. package/dist/Stop-38c9a9d4.js +281 -0
  195. package/dist/StreamLayer-9d300b87.js +188 -0
  196. package/dist/StreamLayerView2D-d80b90e9.js +164 -0
  197. package/dist/StyleRepository-e8c44bab.js +2212 -0
  198. package/dist/SublayersOwner-469b921a.js +545 -0
  199. package/dist/SubtypeGroupLayer-e467307a.js +514 -0
  200. package/dist/SubtypeGroupLayerView2D-41ed7e6f.js +84 -0
  201. package/dist/TableConfig/TableConfig.d.ts +6 -6
  202. package/dist/Tabs/Tab/Tab.d.ts +3 -3
  203. package/dist/TechniqueInstance-9c0d4dcf.js +233 -0
  204. package/dist/TemporalLayer-011ac13a.js +23 -0
  205. package/dist/Texture-b28260ca.js +501 -0
  206. package/dist/TextureOnly.glsl-87d0e898.js +65 -0
  207. package/dist/Theme-bf54db6d.js +3426 -0
  208. package/dist/Tick-5be5a637.js +723 -0
  209. package/dist/TileContainer-09ca940a.js +31 -0
  210. package/dist/TileInfoTilemapCache-26485a76.js +38 -0
  211. package/dist/TileLayer-b0580f1d.js +194 -0
  212. package/dist/TileLayerView2D-e4561937.js +187 -0
  213. package/dist/TilemapCache-d2163c80.js +189 -0
  214. package/dist/TimeInfo-68d2df8b.js +42 -0
  215. package/dist/TimeOnly-bb600899.js +706 -0
  216. package/dist/Tooltip-927072f3.js +138 -0
  217. package/dist/TopFeaturesQuery-77f00fe7.js +32 -0
  218. package/dist/TurboLine-87dd880a.js +565 -0
  219. package/dist/UniqueValueRenderer-56a91680.js +1039 -0
  220. package/dist/UnknownLayer-6b7b3c5d.js +30 -0
  221. package/dist/UnknownTimeZone-e62caf07.js +15 -0
  222. package/dist/UnsupportedLayer-16a90c0a.js +31 -0
  223. package/dist/UpdateTracking2D-bf4e8a89.js +8566 -0
  224. package/dist/Util-6762e3c9.js +57 -0
  225. package/dist/VectorTileLayer-3c42b01b.js +544 -0
  226. package/dist/VectorTileLayerView2D-3af619aa.js +2108 -0
  227. package/dist/Version-9c75ca2b.js +33 -0
  228. package/dist/VertexArrayObject-e736d4c8.js +73 -0
  229. package/dist/VertexColor.glsl-69e78e7a.js +2683 -0
  230. package/dist/VertexSnappingCandidate-10823eb3.js +13 -0
  231. package/dist/VideoLayerView2D-68e687b0.js +124 -0
  232. package/dist/VoxelLayer-76005caf.js +631 -0
  233. package/dist/WFSLayer-398b281f.js +221 -0
  234. package/dist/WFSSourceWorker-7506acff.js +157 -0
  235. package/dist/WGLContainer-f2c4f5da.js +5426 -0
  236. package/dist/WMSLayer-6fbfc745.js +536 -0
  237. package/dist/WMSLayerView2D-63dda194.js +117 -0
  238. package/dist/WMTSLayer-6492359f.js +531 -0
  239. package/dist/WMTSLayerView2D-5daae3fe.js +142 -0
  240. package/dist/WebTileLayer-5f7595df.js +110 -0
  241. package/dist/WhereClause-a8fc45da.js +2766 -0
  242. package/dist/WorkerHandle-11931750.js +47 -0
  243. package/dist/WorkerTileHandler-b53b5efc.js +1539 -0
  244. package/dist/action-b5c3b319.js +198 -0
  245. package/dist/action-group-01e02696.js +145 -0
  246. package/dist/action-menu-e0ddae4e.js +1759 -0
  247. package/dist/apng-9d467a98.js +392 -0
  248. package/dist/arcade-71dc610e.js +229 -0
  249. package/dist/arcadeAsyncRuntime-146d9fb6.js +943 -0
  250. package/dist/arcadeUtils-f7ed3399.js +8741 -0
  251. package/dist/arcgis-knowledge-client-core-b8fef5b0.js +1218 -0
  252. package/dist/arcgis-knowledge-client-core-simd-d54c7150.js +1218 -0
  253. package/dist/arcgisLayers-8d42568b.js +152 -0
  254. package/dist/associatedFeatureServiceUtils-c50f28e9.js +92 -0
  255. package/dist/axisAngleDegrees-ea89c136.js +49 -0
  256. package/dist/basis_transcoder-39fbc6ae.js +1248 -0
  257. package/dist/calcite-action-264e28ab.js +22 -0
  258. package/dist/calcite-action-bar-6ec66445.js +303 -0
  259. package/dist/calcite-action-group-85d021dc.js +28 -0
  260. package/dist/calcite-button-8a5af2ce.js +228 -0
  261. package/dist/calcite-flow-9b5e43fd.js +128 -0
  262. package/dist/calcite-flow-item-0089f891.js +499 -0
  263. package/dist/calcite-icon-c20a8db7.js +16 -0
  264. package/dist/calcite-input-24e48df5.js +24 -0
  265. package/dist/calcite-label-9e4dcb66.js +79 -0
  266. package/dist/calcite-list-711dcec1.js +2135 -0
  267. package/dist/calcite-list-item-1a29c5f1.js +576 -0
  268. package/dist/calcite-list-item-group-b69dedb8.js +71 -0
  269. package/dist/calcite-loader-e8b209f6.js +14 -0
  270. package/dist/calcite-modal-5e518e4c.js +333 -0
  271. package/dist/calcite-notice-25463d4d.js +181 -0
  272. package/dist/calcite-option-113080c1.js +94 -0
  273. package/dist/calcite-scrim-423337f4.js +18 -0
  274. package/dist/calcite-select-cd1e7e86.js +231 -0
  275. package/dist/capabilities-e7ea2422.js +50 -0
  276. package/dist/chartCommon-beb757c5.js +256 -0
  277. package/dist/chartUtilsAm5-6eaf385e.js +2954 -0
  278. package/dist/clientSideDefaults-366deb67.js +39 -0
  279. package/dist/colorRamps-4ea8b8f7.js +38 -0
  280. package/dist/colorUtils-611a3fa1.js +164 -0
  281. package/dist/commonProperties-3f86f534.js +60 -0
  282. package/dist/computeTranslationToOriginAndRotation-db6fb1b6.js +60 -0
  283. package/dist/conditionalSlot-4bf2837a.js +27 -0
  284. package/dist/createConnection-0754c362.js +299 -0
  285. package/dist/dataUtils-ebb55aab.js +1421 -0
  286. package/dist/deduplicate-af05e046.js +89 -0
  287. package/dist/defaults-f025f8a3.js +31 -0
  288. package/dist/deleteForwardEdits-0b666266.js +13 -0
  289. package/dist/diffUtils-b887dbbc.js +90 -0
  290. package/dist/drapedUtils-82fba1a5.js +75 -0
  291. package/dist/earcut-da8e2a55.js +292 -0
  292. package/dist/edgeProcessing-d7499657.js +252 -0
  293. package/dist/editingSupport-4b7813cf.js +203 -0
  294. package/dist/editsZScale-4a6ee4aa.js +37 -0
  295. package/dist/elevationInfoUtils-c20557cb.js +126 -0
  296. package/dist/executeForIds-6a55aa95.js +14 -0
  297. package/dist/executeForTopCount-7ffc37ac.js +17 -0
  298. package/dist/executeForTopExtents-191307d3.js +17 -0
  299. package/dist/executeForTopIds-f644d448.js +17 -0
  300. package/dist/executeQueryJSON-c5616d7b.js +15 -0
  301. package/dist/executeQueryPBF-807fb886.js +152 -0
  302. package/dist/executeRelationshipQuery-d5a1463b.js +53 -0
  303. package/dist/executeTopFeaturesQuery-6bb737a8.js +18 -0
  304. package/dist/featureConversionUtils-8fd0a407.js +479 -0
  305. package/dist/featureLayerUtils-37c96c26.js +250 -0
  306. package/dist/featureLayerUtils-cd009ccc.js +142 -0
  307. package/dist/featureSetUtils-f54946cf.js +2530 -0
  308. package/dist/featuresetbase-5a262736.js +707 -0
  309. package/dist/featuresetgeom-b772f260.js +99 -0
  310. package/dist/featuresetstats-fecaae94.js +81 -0
  311. package/dist/featuresetstring-8d32b66d.js +95 -0
  312. package/dist/fetchService-41c786e9.js +33 -0
  313. package/dist/fieldProperties-0a31a020.js +33 -0
  314. package/dist/floatRGBA-bcce207e.js +20 -0
  315. package/dist/form-8bc80cb2.js +138 -0
  316. package/dist/geohashUtils-5b115834.js +85 -0
  317. package/dist/geojson-33ba4718.js +208 -0
  318. package/dist/geomasync-9ccbb40e.js +567 -0
  319. package/dist/geometryEngine-5d1edffb.js +192 -0
  320. package/dist/geometryEngineAsync-65f20167.js +217 -0
  321. package/dist/geometryEngineBase-4107554c.js +18463 -0
  322. package/dist/geometryEngineJSON-96ac95b3.js +46 -0
  323. package/dist/geometryEngineJSON-fecd2377.js +171 -0
  324. package/dist/geometryEngineWorker-3cc93f48.js +11 -0
  325. package/dist/geometryServiceUtils-99ffac76.js +28 -0
  326. package/dist/georeference-597e7b2a.js +291 -0
  327. package/dist/gif-24ef6c2c.js +323 -0
  328. package/dist/gltfexport-f5557b01.js +705 -0
  329. package/dist/groupLayerUtils-429ce1be.js +39 -0
  330. package/dist/heatmapUtils-582b52e1.js +45 -0
  331. package/dist/highlightReasons-6f0f9ef6.js +19 -0
  332. package/dist/hydrated-31a838fb.js +40 -0
  333. package/dist/i3s-3437a8f0.js +809 -0
  334. package/dist/icon-6764e79e.js +127 -0
  335. package/dist/imageBitmapUtils-d56cd963.js +23 -0
  336. package/dist/imageUtils-5fc5f2e1.js +69 -0
  337. package/dist/imageUtils-d0a1bdd3.js +89 -0
  338. package/dist/imageryUtils-31c938b0.js +43 -0
  339. package/dist/index-a8d87ec0.js +45604 -0
  340. package/dist/index.d.ts +2 -1
  341. package/dist/index.js +26 -25
  342. package/dist/input-message-067fbc56.js +92 -0
  343. package/dist/input2-d25d1697.js +575 -0
  344. package/dist/interactive-79c8f5d7.js +80 -0
  345. package/dist/jsonContext-b5489a22.js +15 -0
  346. package/dist/jsonUtils-34961e68.js +86 -0
  347. package/dist/jsonUtils-65dc6fdf.js +476 -0
  348. package/dist/jsonUtils-980c608d.js +59 -0
  349. package/dist/kmlUtils-b1b9817a.js +112 -0
  350. package/dist/knowledgeGraphService-53d3ffbb.js +739 -0
  351. package/dist/knowledgegraph-bd84abd0.js +149 -0
  352. package/dist/labelUtils-333abe25.js +61 -0
  353. package/dist/labelingInfo-6d452fa4.js +46 -0
  354. package/dist/layersCreator-2cc797a3.js +151 -0
  355. package/dist/layersLoader-028db48b.js +197 -0
  356. package/dist/lazyLayerLoader-2dd5721b.js +10 -0
  357. package/dist/lclayout-44591238.js +773 -0
  358. package/dist/lengthUtils-7339106c.js +5 -0
  359. package/dist/lerc-wasm-49e10ccb.js +325 -0
  360. package/dist/libtess-asm-ac16428b.js +3673 -0
  361. package/dist/libtess-f4e34dcf.js +269 -0
  362. package/dist/lineSegment-0e4aefd8.js +76 -0
  363. package/dist/loadGLTFMesh-4afc2514.js +181 -0
  364. package/dist/loadable-a2fd544f.js +24 -0
  365. package/dist/loader-fbae5e8f.js +79 -0
  366. package/dist/lyr3DWorker-1fc30357.js +2108 -0
  367. package/dist/mapViewDeps-59a6c6c7.js +3052 -0
  368. package/dist/mediaLayerUtils-642a4077.js +35 -0
  369. package/dist/meshFeatureSet-91312223.js +126 -0
  370. package/dist/meshVertexSpaceUtils-48eddc77.js +58 -0
  371. package/dist/multidimensionalUtils-705f0902.js +290 -0
  372. package/dist/normalizeUtilsSync-71d587bd.js +181 -0
  373. package/dist/number-063f85f4.js +128 -0
  374. package/dist/objectResourceUtils-0e881546.js +1455 -0
  375. package/dist/observers-745d564e.js +30 -0
  376. package/dist/ogcFeatureUtils-80329692.js +206 -0
  377. package/dist/openCloseComponent-1c398ac3.js +37 -0
  378. package/dist/orientedBoundingBox-a29567df.js +447 -0
  379. package/dist/parser-65ddb097.js +488 -0
  380. package/dist/pbf-b0a9807c.js +215 -0
  381. package/dist/pbfQueryUtils-3cd28b30.js +422 -0
  382. package/dist/pe-wasm-fe3a1187.js +887 -0
  383. package/dist/persistable-36a3796e.js +89 -0
  384. package/dist/perspectiveUtils-b75aeded.js +42 -0
  385. package/dist/pieChart-bc276742.js +555 -0
  386. package/dist/plane-79192909.js +160 -0
  387. package/dist/popupUtils-022834aa.js +22 -0
  388. package/dist/popupUtils-4b2bd688.js +50 -0
  389. package/dist/portalItemUtils-052627b4.js +57 -0
  390. package/dist/portalLayers-3be98e63.js +312 -0
  391. package/dist/portalUtils-b665fd61.js +7 -0
  392. package/dist/programUtils-00a4e18d.js +59 -0
  393. package/dist/project-032d84cf.js +21 -0
  394. package/dist/projectPointToVector-3a48d9a2.js +14 -0
  395. package/dist/projectVectorToVector-4c6a3902.js +13 -0
  396. package/dist/quantityUtils-a39f9287.js +33 -0
  397. package/dist/quantizationUtils-4616cce9.js +68 -0
  398. package/dist/quat-5e906b75.js +104 -0
  399. package/dist/query-2ab99d18.js +89 -0
  400. package/dist/queryAttachments-15a42419.js +39 -0
  401. package/dist/queryEngineUtils-ff4789cd.js +21 -0
  402. package/dist/queryTopFeatures-5eb3ccc9.js +50 -0
  403. package/dist/queryZScale-62422052.js +12 -0
  404. package/dist/rasterProjectionHelper-b605f2ee.js +577 -0
  405. package/dist/rasterUtils-f2036a08.js +122 -0
  406. package/dist/rasterizingUtils-0c9cf9ce.js +46 -0
  407. package/dist/request-00229175.js +46 -0
  408. package/dist/requestImageUtils-90da2619.js +8 -0
  409. package/dist/resourceExtension-eadbfa3f.js +17 -0
  410. package/dist/resourceUtils-28b3c1e8.js +42 -0
  411. package/dist/resourceUtils-4e9ccf63.js +69 -0
  412. package/dist/resourceUtils-666fad8a.js +62 -0
  413. package/dist/saveAPIKeyUtils-1a4f92e5.js +8 -0
  414. package/dist/saveUtils-5b62c0b1.js +24 -0
  415. package/dist/scaleUtils-6153583e.js +23 -0
  416. package/dist/scrim-6e0e08c4.js +114 -0
  417. package/dist/serviceCapabilitiesUtils-96f8d393.js +64 -0
  418. package/dist/sourceUtils-5aee3b16.js +71 -0
  419. package/dist/sphere-512478f6.js +199 -0
  420. package/dist/statsWorker-183f2d29.js +37 -0
  421. package/dist/streamLayerUtils-a1e8e58a.js +31 -0
  422. package/dist/style.css +1 -1
  423. package/dist/styleUtils-49a8dabd.js +14 -0
  424. package/dist/styleUtils-52e000d6.js +75 -0
  425. package/dist/sublayerUtils-65a83d58.js +37 -0
  426. package/dist/substitute-0272cab6.js +52 -0
  427. package/dist/symbolColorUtils-261cba60.js +8 -0
  428. package/dist/symbolLayerUtils-e0203fd7.js +31 -0
  429. package/dist/symbologySnappingCandidates-eeda4ddf.js +221 -0
  430. package/dist/t9n-147b4f00.js +349 -0
  431. package/dist/testSVGPremultipliedAlpha-e3c11fd6.js +94 -0
  432. package/dist/timeSupport-3ddd7e4b.js +410 -0
  433. package/dist/triangle-28fd7dff.js +98 -0
  434. package/dist/unitConversionUtils-df3ffd70.js +17 -0
  435. package/dist/unitFormatUtils-d857519e.js +40 -0
  436. package/dist/uploadAssetErrors-18a6fad7.js +70 -0
  437. package/dist/uploadAssets-f2c89175.js +330 -0
  438. package/dist/utils-214b98cc.js +91 -0
  439. package/dist/utils-283fbef1.js +34 -0
  440. package/dist/utils-333b2280.js +2746 -0
  441. package/dist/utils-7202e24d.js +232 -0
  442. package/dist/utils-a7d5b733.js +419 -0
  443. package/dist/utils-cffde1b1.js +433 -0
  444. package/dist/utils-e4309923.js +79 -0
  445. package/dist/utils-e582955c.js +73 -0
  446. package/dist/utils3-d4b9a6af.js +75 -0
  447. package/dist/vec3-d9885b29.js +81 -0
  448. package/dist/vec42-d5675dd5.js +125 -0
  449. package/dist/versionUtils-2a4f90d3.js +161 -0
  450. package/dist/visualVariableUtils-d45d2e59.js +267 -0
  451. package/dist/webStyleSymbolUtils-5d8e6604.js +48 -0
  452. package/dist/webglDeps-c5e1e661.js +23 -0
  453. package/dist/wfsUtils-a004cee1.js +343 -0
  454. package/dist/workerHelper-a0956a07.js +11 -0
  455. package/dist/xyChart-e8a9ed1d.js +3335 -0
  456. package/package.json +1 -1
  457. package/dist/AGraphicContainer-0a4e0426.js +0 -109
  458. package/dist/APIKeyMixin-83e85532.js +0 -19
  459. package/dist/Analysis-c4011253.js +0 -31
  460. package/dist/ArcGISCachedService-1c6af1c1.js +0 -47
  461. package/dist/ArcGISService-1d880889.js +0 -25
  462. package/dist/AreaMeasurement2D-86006a71.js +0 -405
  463. package/dist/AreaMeasurement3D-1825243c.js +0 -488
  464. package/dist/AttachmentInfo-fa04c641.js +0 -34
  465. package/dist/AttachmentQuery-1450c2f7.js +0 -18
  466. package/dist/AttributeStore-02f947ea.js +0 -1707
  467. package/dist/BaseDynamicLayerView2D-eb11c757.js +0 -63
  468. package/dist/BingMapsLayer-7ad7d511.js +0 -112
  469. package/dist/Bitmap-14a020d8.js +0 -128
  470. package/dist/BitmapContainer-cc71fd24.js +0 -23
  471. package/dist/BlendLayer-e2f97659.js +0 -13
  472. package/dist/BoundsStore-8612892f.js +0 -63
  473. package/dist/BufferObject-bd932c2c.js +0 -100
  474. package/dist/BufferView-97ed14c7.js +0 -683
  475. package/dist/BuildingSceneLayer-3f5380c8.js +0 -535
  476. package/dist/Button-15031955.js +0 -36
  477. package/dist/CSVLayer-a76db6f4.js +0 -208
  478. package/dist/CSVSourceWorker-afe160ed.js +0 -367
  479. package/dist/CatalogDynamicGroupLayerView2D-be946494.js +0 -66
  480. package/dist/CatalogFootprintLayerView2D-14763204.js +0 -76
  481. package/dist/CatalogLayer-7d6228dd.js +0 -262
  482. package/dist/CatalogLayerView2D-13e32a42.js +0 -52
  483. package/dist/ClassBreaksDefinition-7040a7fc.js +0 -18
  484. package/dist/ColorMaterial.glsl-e56765f1.js +0 -64
  485. package/dist/ColorSet-4ff0a7b7.js +0 -45
  486. package/dist/ColorStop-1e154045.js +0 -29
  487. package/dist/Container-6e3b610b.js +0 -521
  488. package/dist/CustomParametersMixin-c01280c0.js +0 -12
  489. package/dist/DefaultMaterial.glsl-e7e23b90.js +0 -42
  490. package/dist/DefaultMaterial_COLOR_GAMMA-7fd21704.js +0 -653
  491. package/dist/DefaultTheme-3c5b433f.js +0 -130
  492. package/dist/DeleteForwardEditsParameters-7073c5e5.js +0 -18
  493. package/dist/DimensionLayer-f921dd3d.js +0 -129
  494. package/dist/DirectLineMeasurement3D-61d14af2.js +0 -449
  495. package/dist/DistanceMeasurement2D-b023b35c.js +0 -303
  496. package/dist/DoubleArray-1186b8b8.js +0 -25
  497. package/dist/Dropdown/Filter/Filter.types.d.ts +0 -17
  498. package/dist/Dropdown/Filter/test.mocks.d.ts +0 -6
  499. package/dist/Dropdown/List/Dropdown.List.d.ts +0 -73
  500. package/dist/Dropdown/List/List.types.d.ts +0 -11
  501. package/dist/Dropdown/List/test.mocks.d.ts +0 -7
  502. package/dist/EdgeProcessingWorker-cb6277ad.js +0 -63
  503. package/dist/EditBusLayer-9d740f8f.js +0 -107
  504. package/dist/ElevationInfo-581ff99d.js +0 -56
  505. package/dist/ElevationLayer-42b57d9b.js +0 -129
  506. package/dist/ElevationQuery-f6d0cf9f.js +0 -598
  507. package/dist/ElevationSamplerWorker-50d805bb.js +0 -62
  508. package/dist/ExportImageParameters-5b047f92.js +0 -66
  509. package/dist/ExportStrategy-b6c54d77.js +0 -93
  510. package/dist/ExportWMSImageParameters-ff5a3ac8.js +0 -33
  511. package/dist/External-695a389a.js +0 -110
  512. package/dist/FeatureCollectionSnappingSource-fdaed9e0.js +0 -130
  513. package/dist/FeatureCommandQueue-c2bd1a39.js +0 -1244
  514. package/dist/FeatureEffect-9ea1b3da.js +0 -39
  515. package/dist/FeatureEffectLayer-0fa169c4.js +0 -13
  516. package/dist/FeatureFilter-638c4cae.js +0 -27
  517. package/dist/FeatureLayer-2a419d3e.js +0 -693
  518. package/dist/FeatureLayerBase-7331e738.js +0 -148
  519. package/dist/FeatureLayerSource-733186fb.js +0 -444
  520. package/dist/FeatureLayerView2D-bc4994b6.js +0 -1967
  521. package/dist/FeaturePipelineWorker-5f68488c.js +0 -3633
  522. package/dist/FeatureReductionLayer-0c152478.js +0 -225
  523. package/dist/FeatureReductionSelection-f952512d.js +0 -22
  524. package/dist/FeatureServiceSnappingSource-4c02d5a3.js +0 -481
  525. package/dist/FeatureServiceSnappingSourceWorker-c2a1dc50.js +0 -747
  526. package/dist/FeatureSet-2c6b8e00.js +0 -188
  527. package/dist/FeatureStore-a26846c0.js +0 -131
  528. package/dist/FeatureTemplate-1b6b7e2d.js +0 -12
  529. package/dist/FeatureType-9e1f1a7d.js +0 -25
  530. package/dist/FieldsIndex-91711836.js +0 -109
  531. package/dist/FormTemplate-ae0cfb6e.js +0 -350
  532. package/dist/GeoJSONLayer-b2070c34.js +0 -236
  533. package/dist/GeoJSONSourceWorker-aecb5f9b.js +0 -247
  534. package/dist/GeoRSSLayer-3743b41f.js +0 -73
  535. package/dist/GeoRSSLayerView2D-098c24bc.js +0 -140
  536. package/dist/GeometryUtils-036c7f22.js +0 -403
  537. package/dist/GraphicContainer-ece3945e.js +0 -26
  538. package/dist/GraphicManipulator-bc92899f.js +0 -1499
  539. package/dist/GraphicsLayer-764f0324.js +0 -38
  540. package/dist/GraphicsLayerView2D-36908d0c.js +0 -114
  541. package/dist/GraphicsSnappingSource-2bb681c0.js +0 -273
  542. package/dist/GraphicsView2D-e9cf5cd6.js +0 -620
  543. package/dist/GroupLayer-5ea5b71b.js +0 -147
  544. package/dist/GroupLayerView2D-22ec9eaa.js +0 -98
  545. package/dist/HUDMaterial.glsl-80ab7d22.js +0 -65
  546. package/dist/HighlightCounter-36842e52.js +0 -41
  547. package/dist/HighlightGraphicContainer-10cb9671.js +0 -18
  548. package/dist/I3SBinaryReader-9dbdc661.js +0 -310
  549. package/dist/I3SLayerDefinitions-b56e2c87.js +0 -55
  550. package/dist/I3SUtil-5461dc89.js +0 -59
  551. package/dist/IdentityManager-bb063156.js +0 -899
  552. package/dist/ImageHistogramParameters-1f8e5179.js +0 -905
  553. package/dist/ImageryLayer-a807d3b3.js +0 -1799
  554. package/dist/ImageryLayerView2D-358a3267.js +0 -352
  555. package/dist/ImageryTileLayer-0f67f262.js +0 -2157
  556. package/dist/ImageryTileLayerView2D-2bc2bb67.js +0 -1110
  557. package/dist/Indices-0c5304f2.js +0 -67
  558. package/dist/IntegratedMesh3DTilesLayer-be69dca8.js +0 -112
  559. package/dist/IntegratedMeshLayer-3c070523.js +0 -141
  560. package/dist/InteractiveAnalysisViewModel-3005a4a6.js +0 -7397
  561. package/dist/InterleavedLayout-d37b99a2.js +0 -163
  562. package/dist/KMLLayer-2011c3c6.js +0 -162
  563. package/dist/KMLLayerView2D-5d17145f.js +0 -253
  564. package/dist/KnowledgeGraphLayerView2D-7172b91b.js +0 -43
  565. package/dist/LRUCache-39211cf9.js +0 -32
  566. package/dist/LabelClass-d1080628.js +0 -135
  567. package/dist/LabelMetric-ab56c6b3.js +0 -400
  568. package/dist/LaserlinePath.glsl-df8f92cc.js +0 -64
  569. package/dist/Laserlines.glsl-f7d93e3f.js +0 -65
  570. package/dist/LayerFloorInfo-3edeb9a2.js +0 -15
  571. package/dist/LayerView-1c58c8c6.js +0 -206
  572. package/dist/LercWorker-c7a2aca1.js +0 -157
  573. package/dist/LineOfSightLayer-3028e21f.js +0 -147
  574. package/dist/LinkChartLayer-988ae660.js +0 -1027
  575. package/dist/Lyr3DWorker-4c8c758f.js +0 -82
  576. package/dist/MagnifierPrograms-123961a3.js +0 -806
  577. package/dist/MapImageLayer-9241ad63.js +0 -169
  578. package/dist/MapImageLayerView2D-726e5c66.js +0 -146
  579. package/dist/MapNotesLayer-2d2db99b.js +0 -283
  580. package/dist/MapNotesLayerView2D-41f5790c.js +0 -161
  581. package/dist/MapServiceLayerViewHelper-8f5228ec.js +0 -288
  582. package/dist/MeasurementWidgetContent-504fd868.js +0 -2642
  583. package/dist/MediaLayer-e71ce661.js +0 -523
  584. package/dist/MediaLayerView2D-33c67404.js +0 -332
  585. package/dist/MemCache-413327b3.js +0 -227
  586. package/dist/MemorySourceWorker-b0e70dd0.js +0 -222
  587. package/dist/Mesh-98c4e050.js +0 -980
  588. package/dist/MeshLocalVertexSpace-7a7e4d4e.js +0 -19
  589. package/dist/MultiOriginJSONSupport-2fca3cc5.js +0 -158
  590. package/dist/OGCFeatureLayer-451fbd45.js +0 -211
  591. package/dist/OGCFeatureLayerView2D-d23b08d2.js +0 -82
  592. package/dist/ObjectStack-742b2ff3.js +0 -21
  593. package/dist/Octree-a3c8e90e.js +0 -495
  594. package/dist/OpenStreetMapLayer-9bb91f97.js +0 -30
  595. package/dist/OperationalLayer-fbfada66.js +0 -44
  596. package/dist/OrderByInfo-335eb561.js +0 -16
  597. package/dist/OrderedLayer-29b4ac64.js +0 -26
  598. package/dist/OrientedImageryLayer-aa2498e2.js +0 -216
  599. package/dist/OverlayCompositing.glsl-4b1e83c2.js +0 -65
  600. package/dist/OverrideHelper-74cc3959.js +0 -242
  601. package/dist/PBFDecoderWorker-fd40e0f9.js +0 -213
  602. package/dist/PointCloudLayer-64cdbbb2.js +0 -197
  603. package/dist/PointCloudUniqueValueRenderer-db9b3a98.js +0 -115
  604. package/dist/PointCloudWorker-a5eb5224.js +0 -212
  605. package/dist/PooledRBush-be6fe17a.js +0 -272
  606. package/dist/Popup-db250fe6.js +0 -3990
  607. package/dist/PortalLayer-a6ce110e.js +0 -126
  608. package/dist/Program-ecabc523.js +0 -694
  609. package/dist/ProgramTemplate-e5ce3b0f.js +0 -35
  610. package/dist/QueryEngine-87b2546b.js +0 -896
  611. package/dist/QueryTask-36400ec7.js +0 -119
  612. package/dist/RasterSymbolizer-cfd47847.js +0 -3024
  613. package/dist/RasterVFDisplayObject-d4c967ea.js +0 -581
  614. package/dist/RasterWorker-068ae23a.js +0 -78
  615. package/dist/RawBlockCache-9e8d4c35.js +0 -185
  616. package/dist/RealisticTree.glsl-adab8e44.js +0 -42
  617. package/dist/RefreshableLayer-eec34ca2.js +0 -80
  618. package/dist/RefreshableLayerView-ee06f08c.js +0 -16
  619. package/dist/Relationship-a7eb5489.js +0 -64
  620. package/dist/RelationshipQuery-4551bb04.js +0 -22
  621. package/dist/RenderingContext-9e8fac0d.js +0 -889
  622. package/dist/RibbonLine.glsl-5990bf5f.js +0 -65
  623. package/dist/RouteLayer-858bc482.js +0 -786
  624. package/dist/RouteLayerView2D-a70d519f.js +0 -195
  625. package/dist/SDFHelper-efca0a53.js +0 -140
  626. package/dist/SSAO.glsl-7670c1fc.js +0 -43
  627. package/dist/SSAOBlur.glsl-3523d6af.js +0 -42
  628. package/dist/ScaleRangeLayer-7f440b85.js +0 -21
  629. package/dist/SceneLayer-999bd23f.js +0 -542
  630. package/dist/SceneLayerSnappingSource-9420aaed.js +0 -218
  631. package/dist/SceneLayerSnappingSourceWorker-be67e552.js +0 -112
  632. package/dist/SceneLayerWorker-201939c2.js +0 -164
  633. package/dist/SceneService-318eff2f.js +0 -215
  634. package/dist/Scheduler-279ea0c3.js +0 -373
  635. package/dist/ShadedColorMaterial.glsl-bd2979d8.js +0 -64
  636. package/dist/SnappingOperation-5100da71.js +0 -48
  637. package/dist/SourceLayerData-50c2b980.js +0 -116
  638. package/dist/SpatialFilter-b6c6b2fc.js +0 -1701
  639. package/dist/Stop-196981da.js +0 -281
  640. package/dist/StreamLayer-37b818b8.js +0 -188
  641. package/dist/StreamLayerView2D-7f0f45bc.js +0 -164
  642. package/dist/StyleRepository-4e8fa398.js +0 -2212
  643. package/dist/SublayersOwner-90d10612.js +0 -545
  644. package/dist/SubtypeGroupLayer-959cabf8.js +0 -514
  645. package/dist/SubtypeGroupLayerView2D-95e63b42.js +0 -84
  646. package/dist/TechniqueInstance-bd190c26.js +0 -233
  647. package/dist/TemporalLayer-aacda167.js +0 -23
  648. package/dist/Texture-3618be49.js +0 -501
  649. package/dist/TextureOnly.glsl-fcca7034.js +0 -65
  650. package/dist/Theme-85608a9a.js +0 -3426
  651. package/dist/Tick-79e96104.js +0 -723
  652. package/dist/TileContainer-f1e7edd8.js +0 -31
  653. package/dist/TileInfoTilemapCache-2f882821.js +0 -38
  654. package/dist/TileLayer-db13a237.js +0 -194
  655. package/dist/TileLayerView2D-15af6be4.js +0 -187
  656. package/dist/TilemapCache-fc4b2c6c.js +0 -189
  657. package/dist/TimeInfo-39a9d4e1.js +0 -42
  658. package/dist/TimeOnly-b759457a.js +0 -706
  659. package/dist/Tooltip-0ba72b27.js +0 -138
  660. package/dist/TopFeaturesQuery-a11ecc39.js +0 -32
  661. package/dist/TurboLine-5e62d290.js +0 -565
  662. package/dist/UniqueValueRenderer-bf2f3234.js +0 -1039
  663. package/dist/UnknownLayer-2cf71578.js +0 -30
  664. package/dist/UnknownTimeZone-aabdcf56.js +0 -15
  665. package/dist/UnsupportedLayer-36650e4a.js +0 -31
  666. package/dist/UpdateTracking2D-b6d16b0c.js +0 -8566
  667. package/dist/Util-8f54c96b.js +0 -57
  668. package/dist/VectorTileLayer-ddcca4ec.js +0 -544
  669. package/dist/VectorTileLayerView2D-8176946a.js +0 -2108
  670. package/dist/Version-9eb299cd.js +0 -33
  671. package/dist/VertexArrayObject-d1a4262b.js +0 -73
  672. package/dist/VertexColor.glsl-fd9f70e0.js +0 -2683
  673. package/dist/VertexSnappingCandidate-70513010.js +0 -13
  674. package/dist/VideoLayerView2D-e08e1d57.js +0 -124
  675. package/dist/VoxelLayer-959702aa.js +0 -631
  676. package/dist/WFSLayer-4a41b206.js +0 -221
  677. package/dist/WFSSourceWorker-53d88982.js +0 -157
  678. package/dist/WGLContainer-e9e8616e.js +0 -5426
  679. package/dist/WMSLayer-8e44f55c.js +0 -536
  680. package/dist/WMSLayerView2D-415a1793.js +0 -117
  681. package/dist/WMTSLayer-804f4bed.js +0 -531
  682. package/dist/WMTSLayerView2D-96186a90.js +0 -142
  683. package/dist/WebTileLayer-7391ea01.js +0 -110
  684. package/dist/WhereClause-1816217e.js +0 -2766
  685. package/dist/WorkerHandle-25f67c67.js +0 -47
  686. package/dist/WorkerTileHandler-a7e508bc.js +0 -1539
  687. package/dist/action-3ce81e45.js +0 -198
  688. package/dist/action-group-f2d26c2b.js +0 -145
  689. package/dist/action-menu-015d91ab.js +0 -1759
  690. package/dist/apng-e5532475.js +0 -392
  691. package/dist/arcade-dbe2ca4a.js +0 -229
  692. package/dist/arcadeAsyncRuntime-78b83b41.js +0 -943
  693. package/dist/arcadeUtils-cb1066a6.js +0 -8741
  694. package/dist/arcgis-knowledge-client-core-7379d99e.js +0 -1218
  695. package/dist/arcgis-knowledge-client-core-simd-ea8b4d20.js +0 -1218
  696. package/dist/arcgisLayers-cd3494fd.js +0 -152
  697. package/dist/associatedFeatureServiceUtils-da8d377d.js +0 -92
  698. package/dist/axisAngleDegrees-19922758.js +0 -49
  699. package/dist/basis_transcoder-bf0490cc.js +0 -1248
  700. package/dist/calcite-action-0db4f61c.js +0 -22
  701. package/dist/calcite-action-bar-1b4c89cb.js +0 -303
  702. package/dist/calcite-action-group-3c8a934c.js +0 -28
  703. package/dist/calcite-button-1079a10c.js +0 -228
  704. package/dist/calcite-flow-c1e71a12.js +0 -128
  705. package/dist/calcite-flow-item-1097b48f.js +0 -499
  706. package/dist/calcite-icon-c88b4a67.js +0 -16
  707. package/dist/calcite-input-8c33ee84.js +0 -24
  708. package/dist/calcite-label-7fbfbe36.js +0 -79
  709. package/dist/calcite-list-93af4ae2.js +0 -2135
  710. package/dist/calcite-list-item-f0a6cda3.js +0 -576
  711. package/dist/calcite-list-item-group-107a313e.js +0 -71
  712. package/dist/calcite-loader-5194bf83.js +0 -14
  713. package/dist/calcite-modal-486280cc.js +0 -333
  714. package/dist/calcite-notice-a81274a8.js +0 -181
  715. package/dist/calcite-option-0020a955.js +0 -94
  716. package/dist/calcite-scrim-27d65e7f.js +0 -18
  717. package/dist/calcite-select-05f25c2a.js +0 -231
  718. package/dist/capabilities-238bde7d.js +0 -50
  719. package/dist/chartCommon-7eda170a.js +0 -256
  720. package/dist/chartUtilsAm5-fd8aeac2.js +0 -2954
  721. package/dist/clientSideDefaults-b91506af.js +0 -39
  722. package/dist/colorRamps-6027ea73.js +0 -38
  723. package/dist/colorUtils-3dd4b884.js +0 -164
  724. package/dist/commonProperties-bf4d305f.js +0 -60
  725. package/dist/computeTranslationToOriginAndRotation-ca5a9439.js +0 -60
  726. package/dist/conditionalSlot-80a4c6ff.js +0 -27
  727. package/dist/createConnection-70dd787a.js +0 -299
  728. package/dist/dataUtils-b632d3a2.js +0 -1421
  729. package/dist/deduplicate-e13aa9e2.js +0 -89
  730. package/dist/defaults-40a1a995.js +0 -31
  731. package/dist/deleteForwardEdits-b0182a08.js +0 -13
  732. package/dist/diffUtils-5f43e52a.js +0 -90
  733. package/dist/drapedUtils-416e5304.js +0 -75
  734. package/dist/earcut-235aa57d.js +0 -292
  735. package/dist/edgeProcessing-43d45a32.js +0 -252
  736. package/dist/editingSupport-7706f838.js +0 -203
  737. package/dist/editsZScale-49d8a8cd.js +0 -37
  738. package/dist/elevationInfoUtils-3fbfcf1f.js +0 -126
  739. package/dist/executeForIds-419ba6a3.js +0 -14
  740. package/dist/executeForTopCount-8a8ba5c7.js +0 -17
  741. package/dist/executeForTopExtents-9f24d5d0.js +0 -17
  742. package/dist/executeForTopIds-0bfdb55f.js +0 -17
  743. package/dist/executeQueryJSON-2a2e9e1b.js +0 -15
  744. package/dist/executeQueryPBF-f10de9ec.js +0 -152
  745. package/dist/executeRelationshipQuery-0680cb30.js +0 -53
  746. package/dist/executeTopFeaturesQuery-c553d696.js +0 -18
  747. package/dist/featureConversionUtils-83783887.js +0 -479
  748. package/dist/featureLayerUtils-545d260a.js +0 -250
  749. package/dist/featureLayerUtils-b18e6016.js +0 -142
  750. package/dist/featureSetUtils-0c7ba073.js +0 -2530
  751. package/dist/featuresetbase-aadfabb3.js +0 -707
  752. package/dist/featuresetgeom-a405018e.js +0 -99
  753. package/dist/featuresetstats-f6602402.js +0 -81
  754. package/dist/featuresetstring-834ea865.js +0 -95
  755. package/dist/fetchService-dac740ef.js +0 -33
  756. package/dist/fieldProperties-b024e721.js +0 -33
  757. package/dist/floatRGBA-46ee3e38.js +0 -20
  758. package/dist/form-0b2f0ac9.js +0 -138
  759. package/dist/geohashUtils-418d1ca6.js +0 -85
  760. package/dist/geojson-96d3353d.js +0 -208
  761. package/dist/geomasync-ff5b3734.js +0 -567
  762. package/dist/geometryEngine-8fcb3d59.js +0 -192
  763. package/dist/geometryEngineAsync-212f4b0f.js +0 -217
  764. package/dist/geometryEngineBase-4c2ff8b9.js +0 -18463
  765. package/dist/geometryEngineJSON-131b461e.js +0 -171
  766. package/dist/geometryEngineJSON-b43cf67f.js +0 -46
  767. package/dist/geometryEngineWorker-707ca480.js +0 -11
  768. package/dist/geometryServiceUtils-af23d0b5.js +0 -28
  769. package/dist/georeference-02bc532d.js +0 -291
  770. package/dist/gif-b072aa1c.js +0 -323
  771. package/dist/gltfexport-3362ea71.js +0 -705
  772. package/dist/groupLayerUtils-81545911.js +0 -39
  773. package/dist/heatmapUtils-b25824e4.js +0 -45
  774. package/dist/highlightReasons-5b8b2665.js +0 -19
  775. package/dist/hydrated-b0c62926.js +0 -40
  776. package/dist/i3s-32edc725.js +0 -809
  777. package/dist/icon-453c7f62.js +0 -127
  778. package/dist/imageBitmapUtils-51497e26.js +0 -23
  779. package/dist/imageUtils-1d1da6e6.js +0 -89
  780. package/dist/imageUtils-8c40eba6.js +0 -69
  781. package/dist/imageryUtils-0c00fbf3.js +0 -43
  782. package/dist/index-3b4c2147.js +0 -45568
  783. package/dist/input-message-32600f49.js +0 -92
  784. package/dist/input2-1c0831ed.js +0 -575
  785. package/dist/interactive-5824e097.js +0 -80
  786. package/dist/jsonContext-ec21ce85.js +0 -15
  787. package/dist/jsonUtils-012feb40.js +0 -476
  788. package/dist/jsonUtils-3979baa3.js +0 -59
  789. package/dist/jsonUtils-3eb7c689.js +0 -86
  790. package/dist/kmlUtils-4c198ea5.js +0 -112
  791. package/dist/knowledgeGraphService-a159d815.js +0 -739
  792. package/dist/knowledgegraph-eb0d44d4.js +0 -149
  793. package/dist/labelUtils-01b646c7.js +0 -61
  794. package/dist/labelingInfo-148dcd26.js +0 -46
  795. package/dist/layersCreator-4e94f616.js +0 -151
  796. package/dist/layersLoader-f4e3ab33.js +0 -197
  797. package/dist/lazyLayerLoader-eb51910e.js +0 -10
  798. package/dist/lclayout-4d303c41.js +0 -773
  799. package/dist/lengthUtils-6abaf27a.js +0 -5
  800. package/dist/lerc-wasm-0ae912df.js +0 -325
  801. package/dist/libtess-asm-91c97dcd.js +0 -3673
  802. package/dist/libtess-cba14731.js +0 -269
  803. package/dist/lineSegment-8f04aab4.js +0 -76
  804. package/dist/loadGLTFMesh-71542570.js +0 -181
  805. package/dist/loadable-e7c40a8a.js +0 -24
  806. package/dist/loader-6272e4b3.js +0 -79
  807. package/dist/lyr3DWorker-9ee4ee8b.js +0 -2108
  808. package/dist/mapViewDeps-b17a2e04.js +0 -3052
  809. package/dist/mediaLayerUtils-f0ccfd82.js +0 -35
  810. package/dist/meshFeatureSet-304dfa08.js +0 -126
  811. package/dist/meshVertexSpaceUtils-e7f774fa.js +0 -58
  812. package/dist/multidimensionalUtils-642f26da.js +0 -290
  813. package/dist/normalizeUtilsSync-b5f617e6.js +0 -181
  814. package/dist/number-3af512e3.js +0 -128
  815. package/dist/objectResourceUtils-d45057aa.js +0 -1455
  816. package/dist/observers-700e505d.js +0 -30
  817. package/dist/ogcFeatureUtils-440ed0bf.js +0 -206
  818. package/dist/openCloseComponent-1501c620.js +0 -37
  819. package/dist/orientedBoundingBox-80988e7f.js +0 -447
  820. package/dist/parser-6e351b85.js +0 -488
  821. package/dist/pbf-a85c52b3.js +0 -215
  822. package/dist/pbfQueryUtils-5f25f81f.js +0 -422
  823. package/dist/pe-wasm-e588110b.js +0 -887
  824. package/dist/persistable-ad01d0ca.js +0 -89
  825. package/dist/perspectiveUtils-ab58ddbb.js +0 -42
  826. package/dist/pieChart-d3793e8b.js +0 -555
  827. package/dist/plane-e103e8ed.js +0 -160
  828. package/dist/popupUtils-5f7c3e79.js +0 -50
  829. package/dist/popupUtils-b95ab60a.js +0 -22
  830. package/dist/portalItemUtils-3d59513a.js +0 -57
  831. package/dist/portalLayers-16b2f807.js +0 -312
  832. package/dist/portalUtils-3789afb0.js +0 -7
  833. package/dist/programUtils-c8d96b39.js +0 -59
  834. package/dist/project-7eaa59a4.js +0 -21
  835. package/dist/projectPointToVector-19151d97.js +0 -14
  836. package/dist/projectVectorToVector-d552535c.js +0 -13
  837. package/dist/quantityUtils-258bfdb4.js +0 -33
  838. package/dist/quantizationUtils-752e4d24.js +0 -68
  839. package/dist/quat-6dc51256.js +0 -104
  840. package/dist/query-da893693.js +0 -89
  841. package/dist/queryAttachments-df86b71d.js +0 -39
  842. package/dist/queryEngineUtils-ffc50ce5.js +0 -21
  843. package/dist/queryTopFeatures-5a58a12d.js +0 -50
  844. package/dist/queryZScale-39ffaf30.js +0 -12
  845. package/dist/rasterProjectionHelper-d13bc46d.js +0 -577
  846. package/dist/rasterUtils-22b15453.js +0 -122
  847. package/dist/rasterizingUtils-3388ddbf.js +0 -46
  848. package/dist/request-82a2415a.js +0 -46
  849. package/dist/requestImageUtils-2fca27f8.js +0 -8
  850. package/dist/resourceExtension-672d03cc.js +0 -17
  851. package/dist/resourceUtils-95b9964a.js +0 -42
  852. package/dist/resourceUtils-b1e50d5e.js +0 -69
  853. package/dist/resourceUtils-e8831103.js +0 -62
  854. package/dist/saveAPIKeyUtils-ee9b0447.js +0 -8
  855. package/dist/saveUtils-1323ad64.js +0 -24
  856. package/dist/scaleUtils-1a70f716.js +0 -23
  857. package/dist/scrim-c0a641cd.js +0 -114
  858. package/dist/serviceCapabilitiesUtils-33d4e1c0.js +0 -64
  859. package/dist/sourceUtils-e8c5db4e.js +0 -71
  860. package/dist/sphere-75cef429.js +0 -199
  861. package/dist/statsWorker-1f1bc582.js +0 -37
  862. package/dist/streamLayerUtils-c85a0eed.js +0 -31
  863. package/dist/styleUtils-05bc85a5.js +0 -75
  864. package/dist/styleUtils-7bd8d0a7.js +0 -14
  865. package/dist/sublayerUtils-feb77591.js +0 -37
  866. package/dist/substitute-c31da60c.js +0 -52
  867. package/dist/symbolColorUtils-3c385668.js +0 -8
  868. package/dist/symbolLayerUtils-2d2753b7.js +0 -31
  869. package/dist/symbologySnappingCandidates-00eeca39.js +0 -221
  870. package/dist/t9n-55800455.js +0 -349
  871. package/dist/testSVGPremultipliedAlpha-ec1f73c4.js +0 -94
  872. package/dist/timeSupport-a7623294.js +0 -410
  873. package/dist/triangle-c799f11b.js +0 -98
  874. package/dist/unitConversionUtils-05050e6d.js +0 -17
  875. package/dist/unitFormatUtils-2a84c371.js +0 -40
  876. package/dist/uploadAssetErrors-601b044e.js +0 -70
  877. package/dist/uploadAssets-5a835c8a.js +0 -330
  878. package/dist/utils-2dc379da.js +0 -79
  879. package/dist/utils-34b1ea70.js +0 -2746
  880. package/dist/utils-45c14202.js +0 -232
  881. package/dist/utils-484969fb.js +0 -91
  882. package/dist/utils-5aaff624.js +0 -433
  883. package/dist/utils-a94dc35d.js +0 -419
  884. package/dist/utils-e68cfebf.js +0 -34
  885. package/dist/utils-fc14cc83.js +0 -73
  886. package/dist/utils3-5745e839.js +0 -75
  887. package/dist/vec3-12b9e1d8.js +0 -81
  888. package/dist/vec42-a1569d60.js +0 -125
  889. package/dist/versionUtils-c4f3617a.js +0 -161
  890. package/dist/visualVariableUtils-bcb95edc.js +0 -267
  891. package/dist/webStyleSymbolUtils-9db5b81c.js +0 -48
  892. package/dist/webglDeps-05e0410a.js +0 -23
  893. package/dist/wfsUtils-7caaa2cc.js +0 -343
  894. package/dist/workerHelper-86e37deb.js +0 -11
  895. package/dist/xyChart-0673158d.js +0 -3335
@@ -0,0 +1,2157 @@
1
+ import { hg as vt, j7 as Tt, cZ as te, c8 as ut, s as le, W as O, ex as Le, a$ as A, b3 as z, U as ht, eg as ft, bR as L, gU as _t, e as I, y as v, c as K, bx as Ft, cw as Xe, b0 as kt, c5 as Mt, fS as Ct, aH as Pt, ad as Ot, j8 as $t, dL as mt, j9 as Dt, B as Be, aO as Nt, gX as Bt, ap as Et, cT as Jt, bj as At, k as zt, bO as Lt, c6 as he, o as Ht, ea as Wt, db as Gt, w as jt, a_ as qt } from "./index-a8d87ec0.js";
2
+ import { m as Ut } from "./MultiOriginJSONSupport-ec8788e6.js";
3
+ import { l as Vt } from "./ArcGISService-1e7483eb.js";
4
+ import { n as Xt } from "./BlendLayer-ced1717f.js";
5
+ import { e as Yt } from "./CustomParametersMixin-fa9fc8f5.js";
6
+ import { c as Kt, N as Ee, l as Qt, d as Zt, a as ei, h as ti, K as Ye, B as Ke, S as ii, E as si, V as Qe, t as ni, p as ri, m as ai, b as oi } from "./ImageHistogramParameters-47cf0f1b.js";
7
+ import { d as pt, c as li } from "./commonProperties-3f86f534.js";
8
+ import { h as dt, D as yt, i as ci, a as ui, p as He, d as Ze, o as hi, f as et, g as fi } from "./multidimensionalUtils-705f0902.js";
9
+ import { S as mi, n as ge, m as We, L as pi, r as tt, a as xe, h as di, g as Ge, P as yi, b as gi, F as xi, U as wi, N as Ii, R as bi, c as we, B as Si, d as Ri, D as vi } from "./RasterSymbolizer-1644d7a7.js";
10
+ import { i as it, m as st, x as nt, h as Ti, s as _i } from "./RawBlockCache-86e6c5d3.js";
11
+ import { U as ke, D as gt, R as Fi, a as ki, l as Mi, c as Ci, u as Y, f as Pi, s as Oi, d as $i, E as Di, W as Ni, T as Bi } from "./dataUtils-ebb55aab.js";
12
+ import { T as Je, D as Ie, j as rt, r as at, o as Ei, V as Me, J as ve, e as Ji, Z as Ai, C as zi, U as Ae } from "./rasterProjectionHelper-b605f2ee.js";
13
+ import { d as _e } from "./FeatureSet-29d82bc9.js";
14
+ import { R as xt, f as Li, i as Hi, y as je, c as Wi, N as Gi } from "./utils-333b2280.js";
15
+ import { u as ji } from "./OperationalLayer-d43d80b1.js";
16
+ import { j as qi } from "./PortalLayer-daca6a23.js";
17
+ import { f as Ui } from "./RefreshableLayer-a0708abb.js";
18
+ import { t as Vi } from "./ScaleRangeLayer-dc6d9c0e.js";
19
+ import { f as Xi } from "./TemporalLayer-011ac13a.js";
20
+ import { T as Yi } from "./TilemapCache-d2163c80.js";
21
+ import { p as Ki } from "./popupUtils-4b2bd688.js";
22
+ import { A as be } from "./interfaces-fac3cfda.js";
23
+ import "vue";
24
+ import "./jsonUtils-34961e68.js";
25
+ import "./parser-65ddb097.js";
26
+ import "./UniqueValueRenderer-56a91680.js";
27
+ import "./ColorStop-81b2ebbf.js";
28
+ import "./diffUtils-b887dbbc.js";
29
+ import "./colorRamps-4ea8b8f7.js";
30
+ import "./sizeVariableUtils-a1b694d8.js";
31
+ import "./visualVariableUtils-d45d2e59.js";
32
+ import "./lengthUtils-7339106c.js";
33
+ import "./jsonUtils-980c608d.js";
34
+ import "./styleUtils-52e000d6.js";
35
+ import "./utils-7202e24d.js";
36
+ import "./utils-a7d5b733.js";
37
+ import "./LRUCache-948c7d75.js";
38
+ import "./MemCache-1532e921.js";
39
+ import "./ClassBreaksDefinition-0f6902fe.js";
40
+ import "./ElevationInfo-a456026a.js";
41
+ import "./unitConversionUtils-df3ffd70.js";
42
+ import "./colorUtils-611a3fa1.js";
43
+ import "./vec42-d5675dd5.js";
44
+ import "./vec4f64-043e974c.js";
45
+ import "./portalItemUtils-052627b4.js";
46
+ import "./TimeInfo-68d2df8b.js";
47
+ import "./ByteSizeUnit-90df2840.js";
48
+ const ot = 8, Qi = 256;
49
+ let Zi = 0, G = class extends vt(Ft) {
50
+ constructor() {
51
+ super(...arguments), this._tileFetchQueue = new Tt({ concurrency: 32, process: (i, e) => this._fetchRawTile(i.pyramidLevel, i.row, i.col, { ...i.options, signal: e }) }), this.datasetName = null, this.datasetFormat = null, this.hasUniqueSourceStorageInfo = !0, this.rasterInfo = null, this.ioConfig = { sampling: "closest" };
52
+ }
53
+ async init() {
54
+ const i = Je();
55
+ this.addResolvingPromise(i), await this.when();
56
+ }
57
+ normalizeCtorArgs(i) {
58
+ return i != null && i.ioConfig && (i = { ...i, ioConfig: { resolution: null, bandIds: null, sampling: "closest", tileInfo: te.create(), ...i.ioConfig } }), i;
59
+ }
60
+ get _isGlobalWrappableSource() {
61
+ const { rasterInfo: i } = this, e = Ie(i.spatialReference);
62
+ return e != null && i.extent.width >= e / 2;
63
+ }
64
+ get _hasNoneOrGCSShiftTransform() {
65
+ const { transform: i } = this.rasterInfo;
66
+ return i == null || i.type === "gcs-shift";
67
+ }
68
+ set rasterJobHandler(i) {
69
+ var e, n;
70
+ this._set("rasterJobHandler", i), this.datasetFormat === "Function" && ((n = (e = this.primaryRasters) == null ? void 0 : e.rasters) == null || n.forEach((t) => t.rasterJobHandler = i));
71
+ }
72
+ get rasterId() {
73
+ return this.url || "rasterId-" + Zi++;
74
+ }
75
+ set url(i) {
76
+ this._set("url", ut(i, le.getLogger(this)));
77
+ }
78
+ async open(i) {
79
+ throw new O("BaseRaster:open-not-implemented", "open() is not implemented");
80
+ }
81
+ async fetchTile(i, e, n, t = {}) {
82
+ const s = t.tileInfo || this.rasterInfo.storageInfo.tileInfo, a = this.getTileExtentFromTileInfo(i, e, n, s);
83
+ return t = { noClip: !0, ...t }, this.fetchPixels(a, s.size[0], s.size[1], t);
84
+ }
85
+ async identify(i, e = {}) {
86
+ var M;
87
+ i = Le(A, i).clone().normalize();
88
+ const { multidimensionalDefinition: n, timeExtent: t } = e, { rasterInfo: s } = this, { hasMultidimensionalTranspose: a, multidimensionalInfo: r } = s;
89
+ let { transposedVariableName: o } = e;
90
+ const l = r != null && a && (t != null || dt(n));
91
+ l && !o && (o = n != null && n.length > 0 ? n[0].variableName ?? void 0 : r.variables[0].name, e = { ...e, transposedVariableName: o }), e = this._getRequestOptionsWithSliceId(e);
92
+ const { spatialReference: c, extent: h } = s, { datumTransformation: u } = e;
93
+ let m = rt(i, c, u);
94
+ if (!h.intersects(m))
95
+ return { location: m, value: null };
96
+ if (s.transform != null) {
97
+ const P = s.transform.inverseTransform(m);
98
+ if (!s.nativeExtent.intersects(P))
99
+ return { location: P, value: null };
100
+ m = P;
101
+ }
102
+ let f = 0;
103
+ const d = o != null && r != null && s.hasMultidimensionalTranspose;
104
+ if (this.datasetFormat === "Function") {
105
+ const P = this.primaryRasters.rasters[0];
106
+ if (d)
107
+ return P.identify(m, e);
108
+ const { pixelSize: B } = s, C = 3, $ = B.x * C / 2, D = B.y * C / 2, E = new z({ xmin: m.x - $, xmax: m.x + $, ymin: m.y - D, ymax: m.y + D, spatialReference: c }), X = { interpolation: "nearest", multidimensionalDefinition: n, sliceId: e.sliceId }, { pixelBlock: H } = await P.fetchPixels(E, C, C, X), { pixelBlock: W } = await this.fetchPixels(E, C, C, X);
109
+ if (H == null)
110
+ return { location: m, value: null };
111
+ const q = Math.floor(C * C * 0.5), ee = !H.mask || H.mask[q] ? H.pixels.map((N) => N[q]) : null;
112
+ let U;
113
+ return W != null && (U = !W.mask || W.mask[q] ? W.pixels.map((N) => N[q]) : void 0), { location: m, value: ee, processedValue: U, pyramidLevel: 0 };
114
+ }
115
+ if (!d) {
116
+ if (e.srcResolution)
117
+ f = at(e.srcResolution, s, this.ioConfig.sampling).pyramidLevel;
118
+ else if (f = await this.computeBestPyramidLevelForLocation(i, e), f == null)
119
+ return { location: m, value: null };
120
+ }
121
+ const g = this.identifyPixelLocation(m, f, null, d);
122
+ if (g === null)
123
+ return { location: m, value: null };
124
+ const { row: p, col: y, rowOffset: x, colOffset: w, blockWidth: S } = g, T = o ?? e.sliceId, b = it(this.rasterId, T), _ = `${f}/${p}/${y}`;
125
+ let F = st(b, null, _);
126
+ F == null && (F = this.fetchRawTile(f, p, y, e), nt(b, null, _, F));
127
+ const R = await F;
128
+ if (!((M = R == null ? void 0 : R.pixels) != null && M.length))
129
+ return { location: m, value: null };
130
+ const k = x * S + w;
131
+ return this._processIdentifyResult(R, { srcLocation: m, position: k, pyramidLevel: f, useTransposedTile: !!d, requestSomeSlices: l, identifyOptions: e });
132
+ }
133
+ async fetchPixels(i, e, n, t = {}) {
134
+ i = Ei(i), t = this._getRequestOptionsWithSliceId(t);
135
+ const { _hasNoneOrGCSShiftTransform: s } = this;
136
+ if (t.requestRawData && s)
137
+ return this._fetchPixels(i, e, n, t);
138
+ const a = Ie(i.spatialReference), r = Me(i);
139
+ if (a == null || r === 0 || r === 1 && this._isGlobalWrappableSource && s)
140
+ return this._fetchPixels(i, e, n, t);
141
+ if (r >= 3)
142
+ return { extent: i, pixelBlock: null };
143
+ const o = [], { xmin: l, xmax: c } = i, h = Math.round(a / (c - l) * e), u = h - Math.round((a / 2 - l) / (c - l) * e);
144
+ let m = 0;
145
+ const f = [];
146
+ for (let y = 0; y <= r; y++) {
147
+ const x = new z({ xmin: y === 0 ? l : -a / 2, xmax: y === r ? c - a * y : a / 2, ymin: i.ymin, ymax: i.ymax, spatialReference: i.spatialReference }), w = y === 0 ? h - u : y === r ? e - m : h;
148
+ m += w, f.push(w);
149
+ const S = t.disableWrapAround && y > 0 ? null : this._fetchPixels(x, w, n, t);
150
+ o.push(S);
151
+ }
152
+ const d = (await Promise.all(o)).map((y) => y == null ? void 0 : y.pixelBlock);
153
+ let g = null;
154
+ const p = { width: e, height: n };
155
+ return this.rasterJobHandler ? g = (await this.rasterJobHandler.mosaicAndTransform({ srcPixelBlocks: d, srcMosaicSize: p, destDimension: null, coefs: null, sampleSpacing: null, interpolation: "nearest", alignmentInfo: null, blockWidths: f }, t)).pixelBlock : g = ke(d, p, { blockWidths: f }), { extent: i, srcExtent: ve(i, this.rasterInfo.spatialReference, t.datumTransformation), pixelBlock: g };
156
+ }
157
+ async fetchRawPixels(i, e, n, t = {}) {
158
+ e = { x: Math.floor(e.x), y: Math.floor(e.y) };
159
+ const s = await this._fetchRawTiles(i, e, n, t), { nativeExtent: a, nativePixelSize: r, storageInfo: o } = this.rasterInfo, l = 2 ** i, c = r.x * l, h = r.y * l, u = new z({ xmin: a.xmin + c * e.x, xmax: a.xmin + c * (e.x + n.width - 1), ymin: a.ymax - h * (e.y + n.height - 1), ymax: a.ymax - h * e.y, spatialReference: a.spatialReference });
160
+ if (!s)
161
+ return { extent: u, srcExtent: u, pixelBlock: null };
162
+ const { pixelBlocks: m, mosaicSize: f } = s;
163
+ if (m.length === 1 && m[0] != null && m[0].width === n.width && m[0].height === n.height)
164
+ return { extent: u, srcExtent: u, pixelBlock: s.pixelBlocks[0] };
165
+ const d = i > 0 ? o.pyramidBlockWidth : o.blockWidth, g = i > 0 ? o.pyramidBlockHeight : o.blockHeight, p = { x: e.x % d, y: e.y % g };
166
+ let y;
167
+ return this.rasterJobHandler ? y = (await this.rasterJobHandler.mosaicAndTransform({ srcPixelBlocks: m, srcMosaicSize: f, destDimension: n, clipOffset: p, clipSize: n, coefs: null, sampleSpacing: null, interpolation: t.interpolation, alignmentInfo: null, blockWidths: null }, t)).pixelBlock : y = ke(m, f, { clipOffset: p, clipSize: n }), { extent: u, srcExtent: u, pixelBlock: y };
168
+ }
169
+ fetchRawTile(i, e, n, t) {
170
+ throw new O("BaseRaster:read-not-implemented", "fetchRawTile() is not implemented");
171
+ }
172
+ computeExtent(i) {
173
+ return ve(this.rasterInfo.extent, i);
174
+ }
175
+ decodePixelBlock(i, e) {
176
+ return !this.rasterJobHandler || e.useCanvas ? mi(i, e) : this.rasterJobHandler.decode({ data: i, options: e });
177
+ }
178
+ async request(i, e, n = 0) {
179
+ const { customFetchParameters: t } = this.ioConfig, { range: s, query: a, headers: r } = e;
180
+ n = n ?? e.retryCount ?? this.ioConfig.retryCount;
181
+ const o = s ? { Range: `bytes=${s.from}-${s.to}` } : null;
182
+ try {
183
+ return await ht(i, { ...e, query: { ...a, ...t }, headers: { ...r, ...o } });
184
+ } catch (l) {
185
+ if (n > 0)
186
+ return n--, this.request(i, e, n);
187
+ throw l;
188
+ }
189
+ }
190
+ getSliceIndex(i) {
191
+ const { multidimensionalInfo: e } = this.rasterInfo;
192
+ return e == null || i == null || i.length === 0 ? null : yt(i, e);
193
+ }
194
+ getTileExtentFromTileInfo(i, e, n, t) {
195
+ const s = t.lodAt(i);
196
+ return this.getTileExtent({ x: s.resolution, y: s.resolution }, e, n, t.origin, t.spatialReference, t.size);
197
+ }
198
+ updateTileInfo() {
199
+ const { storageInfo: i, spatialReference: e, extent: n, pixelSize: t } = this.rasterInfo;
200
+ if (!i.tileInfo) {
201
+ const s = [], a = i.maximumPyramidLevel || 0;
202
+ let r = Math.max(t.x, t.y), o = 1 / 0.0254 * 96 * r;
203
+ for (let c = 0; c <= a; c++)
204
+ s.unshift(new ft({ level: a - c, resolution: r, scale: o })), r *= 2, o *= 2;
205
+ const l = new A({ x: n.xmin, y: n.ymax, spatialReference: e });
206
+ i.tileInfo = new te({ origin: l, size: [i.blockWidth, i.blockHeight], spatialReference: e, lods: s }), i.isVirtualTileInfo = !0;
207
+ }
208
+ }
209
+ createRemoteDatasetStorageInfo(i, e = 512, n = 512, t) {
210
+ const { width: s, height: a, nativeExtent: r, pixelSize: o, spatialReference: l } = i, c = new A({ x: r.xmin, y: r.ymax, spatialReference: l });
211
+ t == null && (t = Math.max(0, Math.round(Math.log(Math.max(s, a)) / Math.LN2 - 8)));
212
+ const h = this.computeBlockBoundary(r, 512, 512, { x: r.xmin, y: r.ymax }, [o], t);
213
+ i.storageInfo = new ge({ blockWidth: e, blockHeight: n, pyramidBlockWidth: e, pyramidBlockHeight: n, origin: c, firstPyramidLevel: 1, maximumPyramidLevel: t, blockBoundary: h });
214
+ }
215
+ async computeBestPyramidLevelForLocation(i, e = {}) {
216
+ return 0;
217
+ }
218
+ computeBlockBoundary(i, e, n, t, s, a = 0, r = 2) {
219
+ if (s.length === 1 && a > 0) {
220
+ s = [...s];
221
+ let { x: h, y: u } = s[0];
222
+ for (let m = 0; m < a; m++)
223
+ h *= r, u *= r, s.push({ x: h, y: u });
224
+ }
225
+ const o = [], { x: l, y: c } = t;
226
+ for (let h = 0; h < s.length; h++) {
227
+ const { x: u, y: m } = s[h];
228
+ o.push({ minCol: Math.floor((i.xmin - l + 0.1 * u) / e / u), maxCol: Math.floor((i.xmax - l - 0.1 * u) / e / u), minRow: Math.floor((c - i.ymax + 0.1 * m) / n / m), maxRow: Math.floor((c - i.ymin - 0.1 * m) / n / m) });
229
+ }
230
+ return o;
231
+ }
232
+ getPyramidPixelSize(i) {
233
+ const { nativePixelSize: e } = this.rasterInfo, { pyramidResolutions: n, pyramidScalingFactor: t } = this.rasterInfo.storageInfo;
234
+ if (i === 0)
235
+ return e;
236
+ if (n != null && n.length)
237
+ return n[i - 1];
238
+ const s = t ** i;
239
+ return { x: e.x * s, y: e.y * s };
240
+ }
241
+ identifyPixelLocation(i, e, n, t) {
242
+ const { spatialReference: s, nativeExtent: a, storageInfo: r } = this.rasterInfo, { maximumPyramidLevel: o, origin: l, transposeInfo: c } = r, h = t && c != null ? c.tileSize[0] : r.blockWidth, u = t && c != null ? c.tileSize[1] : r.blockHeight, m = rt(i, s, n);
243
+ if (!a.intersects(m) || e < 0 || e > o)
244
+ return null;
245
+ const f = this.getPyramidPixelSize(e), { x: d, y: g } = f, p = (l.y - m.y) / g / u, y = (m.x - l.x) / d / h, x = Math.min(u - 1, Math.floor((p - Math.floor(p)) * u)), w = Math.min(h - 1, Math.floor((y - Math.floor(y)) * h));
246
+ return { pyramidLevel: e, row: Math.floor(p), col: Math.floor(y), rowOffset: x, colOffset: w, blockWidth: h, srcLocation: m };
247
+ }
248
+ getTileExtent(i, e, n, t, s, a) {
249
+ const [r, o] = a, l = t.x + n * r * i.x, c = l + r * i.x, h = t.y - e * o * i.y, u = h - o * i.y;
250
+ return new z({ xmin: l, xmax: c, ymin: u, ymax: h, spatialReference: s });
251
+ }
252
+ getBlockWidthHeight(i) {
253
+ return { blockWidth: i > 0 ? this.rasterInfo.storageInfo.pyramidBlockWidth : this.rasterInfo.storageInfo.blockWidth, blockHeight: i > 0 ? this.rasterInfo.storageInfo.pyramidBlockHeight : this.rasterInfo.storageInfo.blockHeight };
254
+ }
255
+ isBlockOutside(i, e, n) {
256
+ const t = this.rasterInfo.storageInfo.blockBoundary[i];
257
+ return !t || t.maxRow < e || t.maxCol < n || t.minRow > e || t.minCol > n;
258
+ }
259
+ updateImageSpaceRasterInfo(i) {
260
+ const { extent: e, pixelSize: n } = i;
261
+ if (e.xmin === -0.5 && e.ymax === 0.5 && n.x === 1 && n.y === 1 && i.transform == null)
262
+ return;
263
+ const { width: t, height: s } = i, a = L.WebMercator;
264
+ i.spatialReference = a, i.extent = i.nativeExtent = new z({ xmin: -0.5, ymax: 0.5, xmax: t - 0.5, ymin: 0.5 - s, spatialReference: a }), i.isPseudoSpatialReference = !0, i.transform = null, i.pixelSize = new A({ x: 1, y: 1, spatialReference: a });
265
+ const { extent: r, storageInfo: o } = i;
266
+ if (o) {
267
+ o.origin = new A({ x: r.xmin, y: r.ymax, spatialReference: a });
268
+ const { tileInfo: l } = o;
269
+ if (l) {
270
+ l.origin = o.origin;
271
+ const c = (i.nativePixelSize.x + i.nativePixelSize.y) / 2;
272
+ l.lods.forEach((h, u) => {
273
+ h.resolution = c * 2 ** u, h.scale = 96 * h.resolution / 0.0254;
274
+ });
275
+ }
276
+ }
277
+ }
278
+ async _fetchPixels(i, e, n, t = {}) {
279
+ let s = Me(i);
280
+ if (s >= 2)
281
+ return { extent: i, pixelBlock: null };
282
+ const a = this._getSourceDataInfo(i, e, n, t), { pyramidLevel: r, srcResolution: o, srcExtent: l, srcWidth: c, srcHeight: h, ul: u } = a;
283
+ if (c === 0 || h === 0)
284
+ return { extent: i, srcExtent: l, pixelBlock: null };
285
+ const { rasterInfo: m } = this, f = m.transform, d = (f == null ? void 0 : f.type) === "gcs-shift", g = Ie(i.spatialReference) != null;
286
+ !d && g || (s = Me(a.srcExtent, d));
287
+ const p = await this._fetchRawTiles(r, u, { width: c, height: h, wrapCount: s }, t);
288
+ if (!p)
289
+ return { extent: i, srcExtent: l, pixelBlock: null };
290
+ const y = m.storageInfo, x = r > 0 ? y.pyramidBlockWidth : y.blockWidth, w = r > 0 ? y.pyramidBlockHeight : y.blockHeight;
291
+ let { x: S, y: T } = m.pixelSize;
292
+ if (r > 0) {
293
+ const { pyramidResolutions: N, pyramidScalingFactor: Rt } = y;
294
+ if (N != null && N[r - 1])
295
+ ({ x: S, y: T } = N[r - 1]);
296
+ else {
297
+ const Ve = Rt ** r;
298
+ S *= Ve, T *= Ve;
299
+ }
300
+ }
301
+ const b = m.spatialReference, _ = new A({ x: S, y: T, spatialReference: b }), F = x === c && w === h && u.x % x == 0 && u.y % w == 0, R = new A({ x: (i.xmax - i.xmin) / e, y: (i.ymax - i.ymin) / n, spatialReference: i.spatialReference }), k = !i.spatialReference.equals(b), M = b.isGeographic ? 1e-9 : 1e-4, { datumTransformation: P } = t;
302
+ if (!k && F && p.pixelBlocks.length === 1 && x === e && w === n && this._isSameResolution(o, R, M))
303
+ return { extent: i, srcExtent: l, srcTilePixelSize: _, pixelBlock: p.pixelBlocks[0] };
304
+ const B = g && Ie(l.spatialReference) != null && this._hasNoneOrGCSShiftTransform, C = t.requestProjectedLocalDirections && this.rasterInfo.dataType.startsWith("vector");
305
+ C && !this.rasterJobHandler && await Je();
306
+ const $ = this.rasterJobHandler ? await this.rasterJobHandler.getProjectionOffsetGrid({ projectedExtent: i, srcBufferExtent: p.extent, pixelSize: R.toJSON(), datumTransformation: P, rasterTransform: f, hasWrapAround: s > 0 || B, isAdaptive: this.ioConfig.optimizeProjectionAccuracy !== !1, includeGCSGrid: C }, t) : Ji({ projectedExtent: i, srcBufferExtent: p.extent, pixelSize: R, datumTransformation: P, rasterTransform: f, hasWrapAround: s > 0 || B, isAdaptive: !1, includeGCSGrid: C });
307
+ let D;
308
+ const E = !t.requestRawData, X = { rows: $.spacing[0], cols: $.spacing[1] }, H = this._hasNoneOrGCSShiftTransform ? this._getRasterTileAlignmentInfo(r, p.extent.xmin) : void 0, { pixelBlocks: W, mosaicSize: q, isPartiallyFilled: ee } = p;
309
+ let U = null;
310
+ if (this.rasterJobHandler)
311
+ ({ pixelBlock: D, localNorthDirections: U } = await this.rasterJobHandler.mosaicAndTransform({ srcPixelBlocks: W, srcMosaicSize: q, destDimension: E ? { width: e, height: n } : null, coefs: E ? $.coefficients : null, sampleSpacing: E ? X : null, projectDirections: C, gcsGrid: C ? $.gcsGrid : null, isUV: this.rasterInfo.dataType === "vector-uv", interpolation: t.interpolation, alignmentInfo: H, blockWidths: null }, t));
312
+ else {
313
+ const N = ke(W, q, { alignmentInfo: H });
314
+ D = E ? gt(N, { width: e, height: n }, $.coefficients, X, t.interpolation) : N, C && $.gcsGrid && (U = Fi({ width: e, height: n }, $.gcsGrid), D = ki(D, this.rasterInfo.dataType, U));
315
+ }
316
+ return t.requestRawData || C ? { extent: i, srcExtent: l, srcTilePixelSize: _, pixelBlock: D, transformGrid: $, localNorthDirections: U, isPartiallyFilled: ee } : { extent: i, srcExtent: l, srcTilePixelSize: _, pixelBlock: D };
317
+ }
318
+ async _fetchRawTiles(i, e, n, t) {
319
+ const { origin: s, blockBoundary: a } = this.rasterInfo.storageInfo, { blockWidth: r, blockHeight: o } = this.getBlockWidthHeight(i);
320
+ let { x: l, y: c } = e, { width: h, height: u, wrapCount: m } = n;
321
+ const f = this._getRasterTileAlignmentInfo(i, 0);
322
+ t.buffer && (l -= t.buffer.cols, c -= t.buffer.rows, h += 2 * t.buffer.cols, u += 2 * t.buffer.rows);
323
+ let d = 0, g = 0, p = 0;
324
+ m && f != null && ({ worldColumnCountFromOrigin: g, originColumnOffset: p, rightPadding: d } = f, g * f.blockWidth - d >= l + h && (d = 0));
325
+ const y = Math.floor(l / r), x = Math.floor(c / o), w = Math.floor((l + h + d - 1) / r), S = Math.floor((c + u + d - 1) / o), T = a[i];
326
+ if (!T)
327
+ return null;
328
+ const { minRow: b, minCol: _, maxCol: F, maxRow: R } = T;
329
+ if (m === 0 && (S < b || w < _ || x > R || y > F))
330
+ return null;
331
+ const k = new Array();
332
+ let M = !1;
333
+ const P = this.ioConfig.allowPartialFill == null ? t.allowPartialFill : this.ioConfig.allowPartialFill;
334
+ for (let H = x; H <= S; H++)
335
+ for (let W = y; W <= w; W++) {
336
+ let q = W;
337
+ if (!t.disableWrapAround && m && f != null && g <= W && (q = W - g - p), H >= b && q >= _ && R >= H && F >= q) {
338
+ const ee = this._tileFetchQueue.push({ pyramidLevel: i, row: H, col: q, options: t }, { signal: t.signal });
339
+ P ? k.push(new Promise((U) => {
340
+ ee.then((N) => U(N)).catch(() => {
341
+ M = !0, U(null);
342
+ });
343
+ })) : k.push(ee);
344
+ } else
345
+ k.push(Promise.resolve(null));
346
+ }
347
+ if (k.length === 0)
348
+ return null;
349
+ const B = await Promise.all(k), C = { height: (S - x + 1) * o, width: (w - y + 1) * r }, { spatialReference: $ } = this.rasterInfo, D = this.getPyramidPixelSize(i), { x: E, y: X } = D;
350
+ return { extent: new z({ xmin: s.x + y * r * E, xmax: s.x + (w + 1) * r * E, ymin: s.y - (S + 1) * o * X, ymax: s.y - x * o * X, spatialReference: $ }), pixelBlocks: B, mosaicSize: C, isPartiallyFilled: M };
351
+ }
352
+ _isSameResolution(i, e, n) {
353
+ return Math.abs(i.x - e.x) < n && Math.abs(i.y - e.y) < n;
354
+ }
355
+ _fetchRawTile(i, e, n, t) {
356
+ const s = this.rasterInfo.storageInfo.blockBoundary[i];
357
+ if (!s)
358
+ return Promise.resolve(null);
359
+ const { minRow: a, minCol: r, maxCol: o, maxRow: l } = s;
360
+ if (e < a || n < r || e > l || n > o)
361
+ return Promise.resolve(null);
362
+ const c = it(this.rasterId, t.sliceId), h = `${i}/${e}/${n}`;
363
+ let u = st(c, t.registryId, h);
364
+ if (u == null) {
365
+ const m = new AbortController();
366
+ u = this.fetchRawTile(i, e, n, { ...t, signal: m.signal }), nt(c, t.registryId, h, u, m), u.catch(() => Ti(c, t.registryId, h));
367
+ }
368
+ return t.signal && _t(t, () => {
369
+ _i(c, t.registryId, h);
370
+ }), u;
371
+ }
372
+ _computeMagDirValues(i) {
373
+ var l;
374
+ const { bandCount: e, dataType: n } = this.rasterInfo;
375
+ if (!(e === 2 && n === "vector-magdir" || n === "vector-uv") || (i == null ? void 0 : i.length) !== 2 || !((l = i[0]) != null && l.length))
376
+ return null;
377
+ const t = i[0].length;
378
+ if (n === "vector-magdir") {
379
+ const c = i[1].map((h) => (h + 360) % 360);
380
+ return [i[0], c];
381
+ }
382
+ const [s, a] = i, r = [], o = [];
383
+ for (let c = 0; c < t; c++) {
384
+ const [h, u] = Mi([s[c], a[c]]);
385
+ r.push(h), o.push(u);
386
+ }
387
+ return [r, o];
388
+ }
389
+ _getRasterTileAlignmentInfo(i, e) {
390
+ return this._rasterTileAlignmentInfo == null && (this._rasterTileAlignmentInfo = Ai(this.rasterInfo)), this._rasterTileAlignmentInfo.pyramidsInfo == null ? null : { startX: e, halfWorldWidth: this._rasterTileAlignmentInfo.halfWorldWidth, hasGCSSShiftTransform: this._rasterTileAlignmentInfo.hasGCSSShiftTransform, ...this._rasterTileAlignmentInfo.pyramidsInfo[i] };
391
+ }
392
+ _getSourceDataInfo(i, e, n, t = {}) {
393
+ const s = { datumTransformation: t.datumTransformation, pyramidLevel: 0, pyramidResolution: null, srcExtent: null, srcHeight: 0, srcResolution: null, srcWidth: 0, ul: { x: 0, y: 0 } };
394
+ t.srcResolution && (s.srcResolution = t.srcResolution, this._updateSourceDataInfo(i, s));
395
+ const a = this.rasterInfo.storageInfo.maximumPyramidLevel || 0, { srcWidth: r, srcHeight: o, pyramidLevel: l } = s, c = r / e, h = o / n, u = l < a && c * h >= 16, m = l === a && this._requireTooManySrcTiles(r, o, e, n);
396
+ if (u || m || r === 0 || o === 0) {
397
+ const f = new A({ x: (i.xmax - i.xmin) / e, y: (i.ymax - i.ymin) / n, spatialReference: i.spatialReference });
398
+ let d = zi(f, this.rasterInfo.spatialReference, i, s.datumTransformation);
399
+ const g = !d || t.srcResolution && d.x + d.y < t.srcResolution.x + t.srcResolution.y;
400
+ if (u && t.srcResolution && g) {
401
+ const p = Math.round(Math.log(Math.max(c, h)) / Math.LN2) - 1;
402
+ if (a - l + 3 >= p) {
403
+ const y = 2 ** p;
404
+ d = { x: t.srcResolution.x * y, y: t.srcResolution.y * y };
405
+ }
406
+ }
407
+ d && (s.srcResolution = d, this._updateSourceDataInfo(i, s));
408
+ }
409
+ return this._requireTooManySrcTiles(s.srcWidth, s.srcHeight, e, n) && (s.srcWidth = 0, s.srcHeight = 0), s;
410
+ }
411
+ _requireTooManySrcTiles(i, e, n, t) {
412
+ const { tileInfo: s } = this.rasterInfo.storageInfo, a = Math.ceil(i / s.size[0]) * Math.ceil(e / s.size[1]), r = i / n, o = e / t, l = Math.max(1, (n + t) / 1024);
413
+ return a >= Qi * l || r > ot || o > ot;
414
+ }
415
+ _updateSourceDataInfo(i, e) {
416
+ e.srcWidth = 0, e.srcHeight = 0;
417
+ const { rasterInfo: n } = this, t = n.spatialReference, { srcResolution: s, datumTransformation: a } = e, { pyramidLevel: r, pyramidResolution: o, excessiveReading: l } = at(s, n, this.ioConfig.sampling);
418
+ if (l)
419
+ return;
420
+ let c = e.srcExtent || ve(i, t, a);
421
+ if (c == null)
422
+ return;
423
+ const h = n.transform;
424
+ h && (c = h.inverseTransform(c)), e.srcExtent = c;
425
+ const { x: u, y: m } = n.storageInfo.origin, f = Math.floor((c.xmin - u) / o.x + 0.1), d = Math.floor((m - c.ymax) / o.y + 0.1), g = Math.floor((c.xmax - u) / o.x - 0.1), p = Math.floor((m - c.ymin) / o.y - 0.1), y = c.width < 0.1 * o.x ? 0 : g - f + 1, x = c.height < 0.1 * o.y ? 0 : p - d + 1;
426
+ e.pyramidLevel = r, e.pyramidResolution = o, e.srcWidth = y, e.srcHeight = x, e.ul = { x: f, y: d };
427
+ }
428
+ _getRequestOptionsWithSliceId(i) {
429
+ return this.rasterInfo.multidimensionalInfo != null && i.sliceId == null && (i = { ...i, sliceId: this.getSliceIndex(i.multidimensionalDefinition) }), i;
430
+ }
431
+ _processIdentifyResult(i, e) {
432
+ const { srcLocation: n, position: t, pyramidLevel: s, useTransposedTile: a } = e, r = i.pixels[0].length / i.width / i.height;
433
+ if (!(!i.mask || i.mask[t]))
434
+ return { location: n, value: null };
435
+ const { multidimensionalInfo: o } = this.rasterInfo;
436
+ if (o == null || !a) {
437
+ const p = i.pixels.map((w) => w[t]), y = { location: n, value: p, pyramidLevel: s }, x = this._computeMagDirValues(p.map((w) => [w]));
438
+ return x != null && x.length && (y.magdirValue = x.map((w) => w[0])), y;
439
+ }
440
+ let l = i.pixels.map((p) => p.slice(t * r, t * r + r)), c = this._computeMagDirValues(l);
441
+ const { requestSomeSlices: h, identifyOptions: u } = e;
442
+ let m = ci(o, u.transposedVariableName);
443
+ if (h) {
444
+ const p = ui(m, u.multidimensionalDefinition, u.timeExtent);
445
+ l = l.map((y) => p.map((x) => y[x])), c = c == null ? void 0 : c.map((y) => p.map((x) => y[x])), m = p.map((y) => m[y]);
446
+ }
447
+ const f = i.noDataValues || this.rasterInfo.noDataValue, d = { pixels: l, pixelType: i.pixelType };
448
+ let g;
449
+ return f != null && (Ci(d, f), g = d.mask), { location: n, value: null, dataSeries: m.map((p, y) => {
450
+ const x = { value: (g == null ? void 0 : g[y]) === 0 ? null : l.map((w) => w[y]), multidimensionalDefinition: p.multidimensionalDefinition.map((w) => new He({ ...w, isSlice: !0 })) };
451
+ return c != null && c.length && (x.magdirValue = [c[0][y], c[1][y]]), x;
452
+ }), pyramidLevel: s };
453
+ }
454
+ };
455
+ I([v()], G.prototype, "_rasterTileAlignmentInfo", void 0), I([v()], G.prototype, "_tileFetchQueue", void 0), I([v({ readOnly: !0 })], G.prototype, "_isGlobalWrappableSource", null), I([v({ readOnly: !0 })], G.prototype, "_hasNoneOrGCSShiftTransform", null), I([v()], G.prototype, "rasterJobHandler", null), I([v({ readOnly: !0 })], G.prototype, "rasterId", null), I([v(pt)], G.prototype, "url", null), I([v({ type: String, json: { write: !0 } })], G.prototype, "datasetName", void 0), I([v({ type: String, json: { write: !0 } })], G.prototype, "datasetFormat", void 0), I([v()], G.prototype, "hasUniqueSourceStorageInfo", void 0), I([v()], G.prototype, "rasterInfo", void 0), I([v()], G.prototype, "ioConfig", void 0), I([v()], G.prototype, "sourceJSON", void 0), G = I([K("esri.layers.support.rasterDatasets.BaseRaster")], G);
456
+ const se = G;
457
+ function es(i, e) {
458
+ if (i.spatialReference.equals(e))
459
+ return i;
460
+ const n = Xe(i.spatialReference), t = Xe(e);
461
+ if (n === t)
462
+ return i;
463
+ const s = n / t;
464
+ return { x: i.x * s, y: i.y * s };
465
+ }
466
+ async function ze(i, e, n) {
467
+ if (n.type === "extent")
468
+ return is(i, e, n);
469
+ const { width: t, height: s } = i, a = new Uint8Array(t * s), { contains: r, intersects: o } = await import("./geometryEngine-5d1edffb.js");
470
+ return o(e, n) ? n.type === "polyline" ? ss(i, e, n) : r(n, e) ? i : ts(i, e, n) : new Y({ pixelType: i.pixelType, width: t, height: s, mask: a, maskIsAlpha: !1, pixels: [...i.pixels] });
471
+ }
472
+ function ts(i, e, n) {
473
+ if (!i)
474
+ return i;
475
+ const { width: t, height: s } = i, a = e.width / t, r = e.height / s, { xmin: o, ymax: l } = e;
476
+ let c;
477
+ if (n.type === "extent") {
478
+ const p = (n.xmin - o) / a, y = (n.xmax - o) / a, x = (l - n.ymax) / r, w = (l - n.ymin) / r;
479
+ c = [[[p, x], [p, w], [y, w], [y, x], [p, x]]];
480
+ } else
481
+ c = n.rings.map((p) => p.map(([y, x]) => [(y - o) / a, (l - x) / r]));
482
+ const h = document.createElement("canvas");
483
+ h.width = t, h.height = s;
484
+ const u = h.getContext("2d");
485
+ u.fillStyle = "#f00", u.beginPath(), c.forEach((p) => {
486
+ u.moveTo(p[0][0], p[0][1]);
487
+ for (let y = 0; y < p.length; y++)
488
+ u.lineTo(p[y][0], p[y][1]);
489
+ u.closePath();
490
+ }), u.fill();
491
+ const m = u.getImageData(0, 0, t, s).data, f = i.mask, d = t * s, g = new Uint8Array(d);
492
+ for (let p = 0; p < d; p++)
493
+ f && !f[p] || (g[p] = m[4 * p + 3] > 127 ? 255 : 0);
494
+ return new Y({ pixelType: i.pixelType, width: t, height: s, mask: g, maskIsAlpha: !1, pixels: [...i.pixels] });
495
+ }
496
+ function is(i, e, n) {
497
+ const { width: t, height: s } = i, a = new Uint8Array(t * s), r = e.width / t, o = e.height / s;
498
+ if (n.width / r < 0.5 || n.height / o < 0.5)
499
+ return new Y({ pixelType: i.pixelType, width: t, height: s, mask: a, pixels: [...i.pixels] });
500
+ const { xmin: l, xmax: c, ymin: h, ymax: u } = e, { xmin: m, xmax: f, ymin: d, ymax: g } = n, p = Math.max(l, m), y = Math.min(c, f), x = Math.max(h, d), w = Math.min(u, g), S = 0.5 * r, T = 0.5 * o;
501
+ if (y - p < S || w - x < T || y < l + S || p > c - S || x > u - T || w < h + T)
502
+ return new Y({ pixelType: i.pixelType, width: t, height: s, mask: a, pixels: [...i.pixels] });
503
+ const b = Math.max(0, (p - l) / r), _ = Math.min(t, Math.max(0, (y - l) / r)), F = Math.max(0, (u - w) / o), R = Math.min(s, Math.max(0, (u - x) / o)), k = Math.round(b), M = Math.round(_) - 1, P = Math.round(F), B = Math.round(R) - 1;
504
+ if (k === M && b % 1 > 0.5 && _ % 1 < 0.5 || P === B && F % 1 > 0.5 && R % 1 < 0.5)
505
+ return new Y({ pixelType: i.pixelType, width: t, height: s, mask: a, pixels: [...i.pixels] });
506
+ if (k === 0 && P === 0 && M === t && B === s)
507
+ return i;
508
+ const C = i.mask;
509
+ for (let $ = P; $ <= B; $++)
510
+ for (let D = k; D <= M; D++) {
511
+ const E = $ * t + D;
512
+ a[E] = C ? C[E] : 255;
513
+ }
514
+ return new Y({ pixelType: i.pixelType, width: t, height: s, mask: a, pixels: [...i.pixels] });
515
+ }
516
+ function ss(i, e, n) {
517
+ const { width: t, height: s } = i, a = new Uint8Array(t * s), r = e.width / t, o = e.height / s, { xmin: l, ymax: c } = e, { paths: h } = n, u = i.mask;
518
+ for (let m = 0; m < h.length; m++) {
519
+ const f = h[m];
520
+ for (let d = 0; d < f.length - 1; d++) {
521
+ const [g, p] = f[d], [y, x] = f[d + 1];
522
+ let w = Math.floor((c - p) / o), S = Math.floor((c - x) / o);
523
+ if (S < w) {
524
+ const b = w;
525
+ w = S, S = b;
526
+ }
527
+ w = Math.max(0, w), S = Math.min(s - 1, S);
528
+ const T = (y - g) / (x - p);
529
+ for (let b = w; b <= S; b++) {
530
+ const _ = b === w ? Math.max(p, x) : (s + 1 - b) * o, F = b === S ? Math.min(p, x) : _ - o;
531
+ let R = Math.floor(x === p ? (g - l) / r : (T * (_ - p) + g - l) / r), k = Math.floor(x === p ? (y - l) / r : (T * (F - p) + g - l) / r);
532
+ if (k < R) {
533
+ const P = R;
534
+ R = k, k = P;
535
+ }
536
+ const M = b * t;
537
+ R = Math.max(0, R), k = Math.min(t - 1, k);
538
+ for (let P = M + R; P <= M + k; P++)
539
+ a[P] = u ? u[P] : 255;
540
+ }
541
+ }
542
+ }
543
+ return new Y({ pixelType: i.pixelType, width: t, height: s, mask: a, pixels: [...i.pixels] });
544
+ }
545
+ function ns(i, e, n, t = !0) {
546
+ const { spatialReference: s } = i, { x: a, y: r } = es(n, s);
547
+ let o, l, c;
548
+ const h = e.type === "extent" ? e : e.extent;
549
+ let { xmin: u, xmax: m, ymax: f, ymin: d } = h;
550
+ const { xmin: g, ymax: p } = i.extent;
551
+ return t ? (u = g + (u > g ? a * Math.round((u - g) / a) : 0), f = p - (f < p ? r * Math.round((p - f) / r) : 0), m = g + (m > g ? a * Math.round((m - g) / a) : 0), d = p - (d < p ? r * Math.round((p - d) / r) : 0), o = new z({ xmin: u, ymax: f, xmax: m, ymin: d, spatialReference: s }), l = Math.round(o.width / a), c = Math.round(o.height / r)) : (l = Math.floor((m - u) / a + 0.8), c = Math.floor((f - d) / r + 0.8), u = g + (u > g ? a * Math.floor((u - g) / a + 0.1) : 0), f = p - (f < p ? r * Math.floor((p - f) / r + 0.1) : 0), m = u + l * a, d = f - c * r, o = new z({ xmin: u, ymax: f, xmax: m, ymin: d, spatialReference: s })), { extent: o, width: l, height: c };
552
+ }
553
+ const rs = 40;
554
+ let ne = class extends se {
555
+ constructor() {
556
+ super(...arguments), this.datasetFormat = "Function", this.tileType = "Raster", this.rasterFunction = null, this._clippingGeometry = /* @__PURE__ */ new Map();
557
+ }
558
+ async open(e) {
559
+ var h, u, m, f;
560
+ await this.init();
561
+ const { rasterFunction: n } = this;
562
+ (u = (h = this.primaryRasters) == null ? void 0 : h.rasters) != null && u.length ? n.sourceRasters = this.primaryRasters.rasters : (this.primaryRasters = n.getPrimaryRasters(), this.rasterJobHandler && ((m = this.primaryRasters.rasters) == null || m.forEach((d) => d.rasterJobHandler = this.rasterJobHandler)));
563
+ const { rasters: t, rasterIds: s } = this.primaryRasters, a = t.map((d) => d.rasterInfo ? void 0 : d.open(e));
564
+ await Promise.all(a);
565
+ const r = t.map(({ rasterInfo: d }) => d), o = n.bind({ rasterInfos: r, rasterIds: s });
566
+ if (n.rawSourceRasterInfos = r, !o.success || r.length === 0)
567
+ throw new O("raster-function:open", `cannot bind the function: ${o.error ?? ""}`);
568
+ const l = n.functionName === "Table" ? n : (f = n.functionArguments) == null ? void 0 : f.raster;
569
+ (l == null ? void 0 : l.functionName) === "Table" && (n.rasterInfo.attributeTable = _e.fromJSON(l.functionArguments.attributeTableAsRecordSet)), await this.syncJobHandler();
570
+ const c = r[0];
571
+ this.hasUniqueSourceStorageInfo = r.length === 1 || r.slice(1).every((d) => this._hasSameStorageInfo(d, c)), this.set("sourceJSON", t[0].sourceJSON), this.set("rasterInfo", n.rasterInfo), await this._updateClipGeometry();
572
+ }
573
+ async syncJobHandler() {
574
+ var e;
575
+ return (e = this.rasterJobHandler) == null ? void 0 : e.updateRasterFunction(this.rasterFunction);
576
+ }
577
+ async fetchPixels(e, n, t, s = {}) {
578
+ var S, T;
579
+ const { rasters: a, rasterIds: r } = this.primaryRasters;
580
+ let o = !1;
581
+ const { interpolation: l } = s, c = (S = this.rasterFunction.flatWebGLFunctionChain) == null ? void 0 : S.hasFocalFunction;
582
+ !s.requestRawData && c && (o = a.length === 1 && !s.skipRasterFunction, s = { ...s, interpolation: "bilinear", requestRawData: o });
583
+ const h = a.map((b) => b.fetchPixels(e, n, t, s)), u = await Promise.all(h), m = u.map((b) => b.pixelBlock), f = o || s.requestRawData ? u.map((b) => b.srcTilePixelSize) : null;
584
+ if (s.skipRasterFunction || m.every((b) => b == null))
585
+ return u[0];
586
+ const d = ((T = u.find((b) => b.pixelBlock != null)) == null ? void 0 : T.extent) ?? e;
587
+ let g = this.rasterJobHandler ? await this.rasterJobHandler.process({ extent: d, primaryPixelBlocks: m, primaryPixelSizes: f, primaryRasterIds: r }) : this.rasterFunction.process({ extent: d, primaryPixelBlocks: m, primaryPixelSizes: f, primaryRasterIds: r });
588
+ const { transformGrid: p } = u[0];
589
+ if (!o || g == null || p == null) {
590
+ const b = s.noClip ? null : this.getClippingGeometry(d.spatialReference);
591
+ return s.noClip || s.requestRawData || g == null || !b || (g = await ze(g, d, b)), { ...u[0], pixelBlock: g };
592
+ }
593
+ const y = { rows: p.spacing[0], cols: p.spacing[1] };
594
+ let x;
595
+ this.rasterJobHandler ? x = (await this.rasterJobHandler.mosaicAndTransform({ srcPixelBlocks: [g], srcMosaicSize: { width: g.width, height: g.height }, destDimension: { width: n, height: t }, coefs: p.coefficients, sampleSpacing: y, projectDirections: !1, gcsGrid: null, isUV: !1, interpolation: l, alignmentInfo: void 0, blockWidths: null }, s)).pixelBlock : x = gt(g, { width: n, height: t }, p.coefficients, y, l);
596
+ const w = s.noClip ? null : this.getClippingGeometry(e.spatialReference);
597
+ return s.noClip || s.requestRawData || x == null || w == null || (x = await ze(x, e, w)), { extent: e, srcExtent: u[0].srcExtent, pixelBlock: x };
598
+ }
599
+ getClippingGeometry(e) {
600
+ const n = this._clippingGeometry.get("0");
601
+ if (!e || !n)
602
+ return n;
603
+ const t = this._getSRKey(e);
604
+ let s = this._clippingGeometry.get(t);
605
+ return s != null || (s = e.equals(n.spatialReference) ? n : Ae(n, e), this._clippingGeometry.set(t, s)), s;
606
+ }
607
+ _hasSameStorageInfo(e, n) {
608
+ const { storageInfo: t, pixelSize: s, spatialReference: a, extent: r } = e, { storageInfo: o, pixelSize: l, spatialReference: c, extent: h } = n;
609
+ return s.x === l.x && s.y === l.y && a.equals(c) && r.equals(h) && t.blockHeight === o.blockHeight && t.blockWidth === o.blockWidth && t.maximumPyramidLevel === o.maximumPyramidLevel;
610
+ }
611
+ async _updateClipGeometry() {
612
+ const e = this.rasterFunction.getClippingGeometries()[0];
613
+ let n = e == null ? void 0 : e.clippingGeometry;
614
+ if (n && e.clippingType === "inside") {
615
+ const { extent: t } = this.rasterInfo, { difference: s, densify: a } = await import("./geometryEngine-5d1edffb.js");
616
+ let r = a(kt.fromExtent(t), 2 * (t.width + t.height) / rs);
617
+ r = Ae(r, n.spatialReference), n = s(r, n);
618
+ }
619
+ this._clippingGeometry.clear(), n && this._clippingGeometry.set("0", n);
620
+ }
621
+ _getSRKey(e) {
622
+ return String(e.wkid ?? e.wkt ?? e.wkt2);
623
+ }
624
+ };
625
+ I([v({ type: String, json: { write: !0 } })], ne.prototype, "datasetFormat", void 0), I([v()], ne.prototype, "tileType", void 0), I([v()], ne.prototype, "rasterFunction", void 0), I([v()], ne.prototype, "primaryRasters", void 0), ne = I([K("esri.layers.support.rasterDatasets.FunctionRaster")], ne);
626
+ const wt = ne, as = (i) => {
627
+ let e = class extends i {
628
+ constructor(...t) {
629
+ var s, a;
630
+ super(...t), this._isConstructedFromFunctionRaster = !1, this._rasterJobHandler = { instance: null, refCount: 0, connectionPromise: null }, this.bandIds = null, this.copyright = null, this.interpolation = "nearest", this.multidimensionalSubset = null, this.raster = null, this.serviceRasterInfo = null, this.sourceJSON = null, this.spatialReference = null, this.symbolizer = null, this._isConstructedFromFunctionRaster = ((a = (s = t[0]) == null ? void 0 : s.raster) == null ? void 0 : a.datasetFormat) === "Function";
631
+ }
632
+ get fullExtent() {
633
+ var t;
634
+ return (t = this.serviceRasterInfo) == null ? void 0 : t.extent;
635
+ }
636
+ set multidimensionalDefinition(t) {
637
+ this._set("multidimensionalDefinition", t), this.updateRenderer();
638
+ }
639
+ set rasterFunction(t) {
640
+ var s;
641
+ ((s = t == null ? void 0 : t.functionName) == null ? void 0 : s.toLowerCase()) === "none" && (t = void 0), this._set("rasterFunction", t), this.updateRasterFunction();
642
+ }
643
+ get rasterInfo() {
644
+ return Ct(le.getLogger(this), "rasterInfo", { replacement: "serviceRasterInfo", version: "4.29", warnOnce: !0 }), this._get("serviceRasterInfo");
645
+ }
646
+ set url(t) {
647
+ this._set("url", ut(t, le.getLogger(this)));
648
+ }
649
+ set renderer(t) {
650
+ t == null && this.rasterFunction == null ? this._configDefaultRenderer("override") : (this._set("renderer", t), this.updateRenderer());
651
+ }
652
+ readRenderer(t, s, a) {
653
+ var o, l;
654
+ const r = (l = (o = s == null ? void 0 : s.layerDefinition) == null ? void 0 : o.drawingInfo) == null ? void 0 : l.renderer;
655
+ return ei(r, a) || void 0;
656
+ }
657
+ async convertVectorFieldData(t, s) {
658
+ const { serviceRasterInfo: a } = this;
659
+ if (t == null || !a)
660
+ return null;
661
+ const r = this._rasterJobHandler.instance, o = a.dataType;
662
+ return r ? r.convertVectorFieldData({ pixelBlock: t, dataType: o }, s) : Pi(t, o);
663
+ }
664
+ async computeStatisticsHistograms(t, s) {
665
+ t = Le(ti, t).clone();
666
+ const { serviceRasterInfo: a } = this, { geometry: r } = t;
667
+ if (r == null)
668
+ throw new O("imagery-tile-mixin:compute-statistics-histograms", "geometry must be specified");
669
+ let o = r;
670
+ const { spatialReference: l } = a;
671
+ r.spatialReference.equals(l) || (await Je(), o = r.type === "extent" ? ve(r, l) : Ae(r, l));
672
+ const c = t.pixelSize ?? new A({ x: a.pixelSize.x, y: a.pixelSize.y, spatialReference: l }), { extent: h, width: u, height: m } = ns(a, o, c), f = await this.fetchPixels(h, u, m, { ...s, interpolation: "nearest" });
673
+ if (f.pixelBlock == null)
674
+ throw new O("imagery-tile-mixin:compute-statistics-histograms", "failed to fetch pixels");
675
+ const d = await ze(f.pixelBlock, h, o), g = this._rasterJobHandler.instance;
676
+ return g ? g.computeStatisticsHistograms({ pixelBlock: d }, s) : We(d);
677
+ }
678
+ async createFlowMesh(t, s) {
679
+ const a = this._rasterJobHandler.instance;
680
+ return a ? a.createFlowMesh(t, s) : Oi(t.meshType, t.simulationSettings, t.flowData, s.signal != null ? s.signal : new AbortController().signal);
681
+ }
682
+ normalizeRasterFetchOptions(t) {
683
+ var o, l;
684
+ const { multidimensionalInfo: s } = this.serviceRasterInfo ?? {};
685
+ if (s == null)
686
+ return t;
687
+ let a = t.multidimensionalDefinition || this.multidimensionalDefinition;
688
+ a != null && a.length || (a = Ze(this.raster.rasterInfo, { multidimensionalSubset: this.multidimensionalSubset }));
689
+ const r = t.timeExtent || this.timeExtent;
690
+ if (a != null && r != null && (r.start != null || r.end != null)) {
691
+ a = a.map((y) => y.clone());
692
+ const c = (l = (o = s.variables.find(({ name: y }) => y === a[0].variableName)) == null ? void 0 : o.dimensions) == null ? void 0 : l.find(({ name: y }) => y === "StdTime"), h = a.find(({ dimensionName: y }) => y === "StdTime");
693
+ if (!c || !h)
694
+ return { ...t, multidimensionalDefinition: null };
695
+ const { start: u, end: m } = r, f = u == null ? null : u.getTime(), d = m == null ? null : m.getTime(), g = f ?? d, p = d ?? f;
696
+ if (c.values != null) {
697
+ const y = c.values.filter((x) => {
698
+ if (Array.isArray(x)) {
699
+ if (g === p)
700
+ return x[0] <= g && x[1] >= g;
701
+ const w = x[0] <= g && x[1] > g || x[0] < p && x[1] >= p, S = x[0] >= g && x[1] <= p || x[0] < g && x[1] > p;
702
+ return w || S;
703
+ }
704
+ return g === p ? x === g : x >= g && x <= p;
705
+ });
706
+ if (y.length) {
707
+ const x = y.sort((w, S) => {
708
+ const T = Array.isArray(w) ? w[0] : w, b = Array.isArray(w) ? w[1] : w, _ = Array.isArray(S) ? S[0] : S, F = Array.isArray(S) ? S[1] : S;
709
+ return g === p ? T - _ : Math.abs(b - p) - Math.abs(F - p);
710
+ })[0];
711
+ h.values = [x];
712
+ } else
713
+ a = null;
714
+ } else if (c.hasRegularIntervals && c.extent) {
715
+ const [y, x] = c.extent;
716
+ g > x || p < y ? a = null : h.values = g === p ? [g] : [Math.max(y, g), Math.min(x, p)];
717
+ }
718
+ }
719
+ return a != null && hi(a, this.multidimensionalSubset) ? { ...t, multidimensionalDefinition: null } : { ...t, multidimensionalDefinition: a };
720
+ }
721
+ async updateRasterFunction() {
722
+ var h, u, m;
723
+ if (!this.loaded || this.type !== "imagery-tile" || !this.rasterFunction && !this._cachedRasterFunctionJson || JSON.stringify(this.rasterFunction) === JSON.stringify(this._cachedRasterFunctionJson))
724
+ return;
725
+ if (this._isConstructedFromFunctionRaster && this.raster.datasetFormat === "Function") {
726
+ const f = this.raster.rasterFunction.toJSON();
727
+ return !this.rasterFunction && f && this._set("rasterFunction", Ee.fromJSON(f)), void (this._cachedRasterFunctionJson = (h = this.rasterFunction) == null ? void 0 : h.toJSON());
728
+ }
729
+ let t, s = this.raster, a = !1;
730
+ s.datasetFormat === "Function" ? (t = s.primaryRasters.rasters, s = t[0], a = !0) : t = [s];
731
+ const { rasterFunction: r } = this;
732
+ if (r) {
733
+ const f = { raster: s };
734
+ t.length > 1 && t.forEach((p) => f[p.url] = p);
735
+ const d = xt(((u = r.functionDefinition) == null ? void 0 : u.toJSON()) ?? r.toJSON(), f), g = new wt({ rasterFunction: d });
736
+ g.rasterJobHandler = this._rasterJobHandler.instance, await g.open(), this._cachedRasterFunctionJson = (m = this.rasterFunction) == null ? void 0 : m.toJSON(), this.raster = g;
737
+ } else
738
+ this.raster = s, this._cachedRasterFunctionJson = null, await s.when();
739
+ if (this._cachedRendererJson = null, !a && !r)
740
+ return;
741
+ const { bandIds: o } = this, { bandCount: l } = this.raster.rasterInfo, c = o != null && o.length ? o.some((f) => f >= l) : l >= 3;
742
+ o && (c || this.renderer && this.renderer.type !== "raster-stretch") && this._set("bandIds", null), this._configDefaultRenderer("auto");
743
+ }
744
+ async updateRenderer() {
745
+ const { loaded: t, symbolizer: s } = this;
746
+ if (!t || !s || !this.renderer)
747
+ return;
748
+ const { rasterInfo: a } = this.raster, r = et(a, { multidimensionalDefinition: this.multidimensionalDefinition, multidimensionalSubset: this.multidimensionalSubset }), o = r == null ? void 0 : r.name, l = Ye({ ...this.renderer.toJSON(), variableName: o });
749
+ if (JSON.stringify(this._cachedRendererJson) === JSON.stringify(l))
750
+ return;
751
+ const c = this._rasterJobHandler.instance;
752
+ c && (s.rasterInfo = Ke(a, o), s.rendererJSON = l, s.bind(), await c.updateSymbolizer(s), this._cachedRendererJson = l);
753
+ }
754
+ async applyRenderer(t, s) {
755
+ const a = t == null ? void 0 : t.pixelBlock;
756
+ if (!(a != null && a.pixels && a.pixels.length > 0))
757
+ return null;
758
+ let r;
759
+ await this.updateRenderer();
760
+ const o = this._rasterJobHandler.instance, l = this.bandIds ?? [];
761
+ return r = o ? await o.symbolize({ ...t, simpleStretchParams: s, bandIds: l }) : this.symbolizer.symbolize({ ...t, simpleStretchParams: s, bandIds: l }), r;
762
+ }
763
+ getTileUrl(t, s, a) {
764
+ return this.raster.datasetFormat === "RasterTileServer" ? `${this.url}/tile/${t}/${s}/${a}` : "";
765
+ }
766
+ getCompatibleTileInfo(t, s, a = !1) {
767
+ if (!this.loaded || s == null)
768
+ return null;
769
+ if (a && t.equals(this.spatialReference))
770
+ return this.tileInfo;
771
+ const r = Pt(t);
772
+ return te.create({ size: 256, spatialReference: t, origin: r ? { x: r.origin[0], y: r.origin[1] } : { x: s.xmin, y: s.ymax } });
773
+ }
774
+ getCompatibleFullExtent(t) {
775
+ return this.loaded ? (this._compatibleFullExtent && this._compatibleFullExtent.spatialReference.equals(t) || (this._compatibleFullExtent = this.raster.computeExtent(t)), this._compatibleFullExtent) : null;
776
+ }
777
+ async fetchTile(t, s, a, r = {}) {
778
+ var l;
779
+ if (n(this), r.requestAsImageElement) {
780
+ const c = this.getTileUrl(t, s, a);
781
+ return ht(c, { responseType: "image", query: { ...this.refreshParameters, ...this.raster.ioConfig.customFetchParameters }, signal: r.signal }).then((h) => h.data);
782
+ }
783
+ const { serviceRasterInfo: o } = this;
784
+ if (o.multidimensionalInfo != null && (r = this.normalizeRasterFetchOptions(r)).multidimensionalDefinition == null) {
785
+ const c = r.tileInfo || o.storageInfo.tileInfo;
786
+ return { extent: this.raster.getTileExtentFromTileInfo(t, s, a, c), pixelBlock: null };
787
+ }
788
+ return await this._initJobHandler(), await this.updateRasterFunction(), ((l = this.renderer) == null ? void 0 : l.type) === "raster-shaded-relief" && (r = { ...r, buffer: { cols: 1, rows: 1 } }), this.raster.fetchTile(t, s, a, r);
789
+ }
790
+ async fetchPixels(t, s, a, r = {}) {
791
+ return this.serviceRasterInfo.multidimensionalInfo != null && (r = this.normalizeRasterFetchOptions(r)).multidimensionalDefinition == null ? { extent: t, pixelBlock: null } : (await this._initJobHandler(), await this.updateRasterFunction(), s = Math.round(s), a = Math.round(a), this.raster.fetchPixels(t, s, a, r));
792
+ }
793
+ async identify(t, s = {}) {
794
+ var l;
795
+ const { raster: a, serviceRasterInfo: r } = this;
796
+ if (r.multidimensionalInfo != null && !(r.hasMultidimensionalTranspose && (dt(s.multidimensionalDefinition) || s.transposedVariableName || s.timeExtent)) && (s = this.normalizeRasterFetchOptions(s)).multidimensionalDefinition == null)
797
+ return { location: t, value: null };
798
+ const o = (l = this.multidimensionalSubset) == null ? void 0 : l.areaOfInterest;
799
+ if (o && !o.contains(t))
800
+ throw new O("imagery-tile-mixin:identify", "the request cannot be fulfilled when falling outside of the multidimensional subset");
801
+ return a.identify(t, s);
802
+ }
803
+ increaseRasterJobHandlerUsage() {
804
+ this._rasterJobHandler.refCount++;
805
+ }
806
+ decreaseRasterJobHandlerUsage() {
807
+ this._rasterJobHandler.refCount--, this._rasterJobHandler.refCount <= 0 && this._shutdownJobHandler();
808
+ }
809
+ hasStandardTime() {
810
+ var r, o, l;
811
+ const t = (r = this.serviceRasterInfo) == null ? void 0 : r.multidimensionalInfo;
812
+ if (t == null || ((o = this.serviceRasterInfo) == null ? void 0 : o.dataType) !== "standard-time")
813
+ return !1;
814
+ const s = this.multidimensionalDefinition, a = (l = s == null ? void 0 : s[0]) == null ? void 0 : l.variableName;
815
+ return t.variables.some((c) => c.name === a && (!(s != null && s[0].dimensionName) || c.dimensions.some((h) => h.name === "StdTime")));
816
+ }
817
+ getStandardTimeValue(t) {
818
+ return new Date(24 * (t - 25569) * 3600 * 1e3).toString();
819
+ }
820
+ getMultidimensionalSubsetVariables(t) {
821
+ var a;
822
+ const s = t ?? ((a = this.serviceRasterInfo) == null ? void 0 : a.multidimensionalInfo);
823
+ return fi(this.multidimensionalSubset, s);
824
+ }
825
+ _configDefaultSettings() {
826
+ this._configDefaultInterpolation(), this.multidimensionalDefinition || (this.multidimensionalDefinition = Ze(this.raster.rasterInfo, { multidimensionalSubset: this.multidimensionalSubset })), this.rasterFunction && this.raster.datasetFormat === "Function" && (this._cachedRasterFunctionJson = this.rasterFunction.toJSON()), this._configDefaultRenderer();
827
+ }
828
+ _initJobHandler() {
829
+ if (this._rasterJobHandler.connectionPromise != null)
830
+ return this._rasterJobHandler.connectionPromise;
831
+ const t = new ni();
832
+ return this._rasterJobHandler.connectionPromise = t.initialize().then(async () => {
833
+ n(this), this._rasterJobHandler.instance = t, this.raster.rasterJobHandler = t, this.raster.datasetFormat === "Function" && this.raster.syncJobHandler(), this.rasterFunction && await this.updateRasterFunction().catch(() => {
834
+ }), this.renderer && this.updateRenderer();
835
+ }).catch(() => {
836
+ }), this._rasterJobHandler.connectionPromise;
837
+ }
838
+ _shutdownJobHandler() {
839
+ this._rasterJobHandler.instance && this._rasterJobHandler.instance.destroy(), this._rasterJobHandler.instance = null, this._rasterJobHandler.connectionPromise = null, this._rasterJobHandler.refCount = 0, this._cachedRendererJson = null, this.raster && (this.raster.rasterJobHandler = null);
840
+ }
841
+ _configDefaultInterpolation() {
842
+ var t;
843
+ if (this.interpolation == null) {
844
+ n(this);
845
+ const { raster: s } = this, a = ii(s.rasterInfo, s.tileType, (t = this.sourceJSON) == null ? void 0 : t.defaultResamplingMethod);
846
+ this._set("interpolation", a);
847
+ }
848
+ }
849
+ _configDefaultRenderer(t = "no") {
850
+ var h, u;
851
+ n(this);
852
+ const { rasterInfo: s } = this.raster;
853
+ !this.bandIds && s.bandCount > 1 && (this.bandIds = si(s));
854
+ const a = et(s, { multidimensionalDefinition: this.multidimensionalDefinition, multidimensionalSubset: this.multidimensionalSubset }), r = a == null ? void 0 : a.name;
855
+ if (!this.renderer || t === "override") {
856
+ const m = Qe(s, { bandIds: this.bandIds, variableName: r }), f = s.statistics, d = f && f.length > 0 ? f[0] : null, g = (d == null ? void 0 : d.max) ?? 0, p = (d == null ? void 0 : d.min) ?? 0;
857
+ this.raster.datasetFormat === "WCSServer" && m.type === "raster-stretch" && (g > 1e24 || p < -1e24) && (m.dynamicRangeAdjustment = !0, m.statistics = null, m.stretchType === "none" && (m.stretchType = "min-max")), this.renderer = m;
858
+ }
859
+ const o = Ye({ ...this.renderer.toJSON(), variableName: r }), l = Ke(s, r);
860
+ this.symbolizer ? (this.symbolizer.rendererJSON = o, this.symbolizer.rasterInfo = l) : this.symbolizer = new pi({ rendererJSON: o, rasterInfo: l });
861
+ const c = this.symbolizer.bind();
862
+ if (c.success) {
863
+ if (t === "auto") {
864
+ const { colormap: m } = this.raster.rasterInfo, f = this.renderer;
865
+ if (m != null && f.type === "raster-colormap") {
866
+ const d = Qe(this.raster.rasterInfo);
867
+ JSON.stringify(d) !== JSON.stringify(f) && this._configDefaultRenderer("override");
868
+ } else if (f.type === "raster-stretch") {
869
+ const d = (h = this.bandIds) == null ? void 0 : h.length, g = (u = f.statistics) == null ? void 0 : u.length;
870
+ !f.dynamicRangeAdjustment && g && d && g !== d && this._configDefaultRenderer("override");
871
+ }
872
+ }
873
+ } else
874
+ le.getLogger(this).warn("imagery-tile-mixin", c.error || "The given renderer is not supported by the layer."), t === "auto" && this._configDefaultRenderer("override");
875
+ }
876
+ };
877
+ function n(t) {
878
+ if (!t.raster || !t.serviceRasterInfo)
879
+ throw new O("imagery-tile", "no raster");
880
+ }
881
+ return I([v({ clonable: !1 })], e.prototype, "_cachedRendererJson", void 0), I([v({ clonable: !1 })], e.prototype, "_cachedRasterFunctionJson", void 0), I([v({ clonable: !1 })], e.prototype, "_compatibleFullExtent", void 0), I([v({ clonable: !1 })], e.prototype, "_isConstructedFromFunctionRaster", void 0), I([v({ clonable: !1 })], e.prototype, "_rasterJobHandler", void 0), I([v()], e.prototype, "bandIds", void 0), I([v({ json: { origins: { service: { read: { source: "copyrightText" } } } } })], e.prototype, "copyright", void 0), I([v({ json: { read: !1 } })], e.prototype, "fullExtent", null), I([v()], e.prototype, "interpolation", void 0), I([v()], e.prototype, "ioConfig", void 0), I([v({ type: [He], json: { write: !0 } })], e.prototype, "multidimensionalDefinition", null), I([v({ type: Kt, json: { write: !0 } })], e.prototype, "multidimensionalSubset", void 0), I([v()], e.prototype, "raster", void 0), I([v({ type: Ee, json: { name: "renderingRule", write: !0 } })], e.prototype, "rasterFunction", null), I([v({ readOnly: !0 })], e.prototype, "rasterInfo", null), I([v()], e.prototype, "serviceRasterInfo", void 0), I([v()], e.prototype, "sourceJSON", void 0), I([v({ readOnly: !0, type: L, json: { read: !1 } })], e.prototype, "spatialReference", void 0), I([v({ type: te })], e.prototype, "tileInfo", void 0), I([v(pt)], e.prototype, "url", null), I([v({ types: Qt, json: { name: "layerDefinition.drawingInfo.renderer", write: { overridePolicy() {
882
+ var s;
883
+ const t = ((s = this.renderer) == null ? void 0 : s.type) === "raster-stretch" && this.renderer.stretchType === "none" && !this.renderer.useGamma;
884
+ return { enabled: !this.loaded || this.raster.tileType === "Raster" || !t };
885
+ } }, origins: { "web-scene": { types: Zt, name: "layerDefinition.drawingInfo.renderer", write: { overridePolicy: (t) => ({ enabled: t && t.type !== "vector-field" && t.type !== "flow" }) } } } } })], e.prototype, "renderer", null), I([Mt("renderer")], e.prototype, "readRenderer", null), I([v({ clonable: !1 })], e.prototype, "symbolizer", void 0), e = I([K("esri.layers.ImageryTileMixin")], e), e;
886
+ };
887
+ function os(i) {
888
+ const e = i.fields, n = i.records, t = e.some((c) => c.name.toLowerCase() === "oid") ? "OBJECTID" : "OID", s = [{ name: t, type: "esriFieldTypeOID", alias: "OID" }].concat(e.map((c) => ({ name: c.name, type: "esriFieldType" + c.typeName, alias: c.name }))), a = s.map((c) => c.name), r = [];
889
+ let o = 0, l = 0;
890
+ return n.forEach((c) => {
891
+ const h = {};
892
+ for (h[t] = o++, l = 1; l < a.length; l++)
893
+ h[a[l]] = c[l - 1];
894
+ r.push({ attributes: h });
895
+ }), { displayFieldName: "", fields: s, features: r };
896
+ }
897
+ let It = class {
898
+ static get supportedVersions() {
899
+ return [5];
900
+ }
901
+ static parse(e) {
902
+ const n = new DataView(e), t = 3 & n.getUint8(0);
903
+ if (t !== 3)
904
+ return { header: { version: t }, recordSet: null };
905
+ const s = n.getUint32(4, !0), a = n.getUint16(8, !0), r = n.getUint16(10, !0), o = { version: t, recordCount: s, headerByteCount: a, recordByteCount: r };
906
+ let l = 32;
907
+ const c = [], h = [];
908
+ let u;
909
+ if (t === 3) {
910
+ for (; n.getUint8(l) !== 13; )
911
+ u = String.fromCharCode(n.getUint8(l + 11)).trim(), c.push({ name: tt(new Uint8Array(e, l, 11)), type: u, typeName: ["String", "Date", "Double", "Boolean", "String", "Integer"][["C", "D", "F", "L", "M", "N"].indexOf(u)], length: n.getUint8(l + 16) }), l += 32;
912
+ if (l += 1, c.length > 0)
913
+ for (; h.length < s && e.byteLength - l > r; ) {
914
+ const m = [];
915
+ n.getUint8(l) === 32 ? (l += 1, c.forEach((f) => {
916
+ if (f.type === "C")
917
+ m.push(tt(new Uint8Array(e, l, f.length)).trim());
918
+ else if (f.type === "N")
919
+ m.push(parseInt(String.fromCharCode.apply(null, new Uint8Array(e, l, f.length)).trim(), 10));
920
+ else if (f.type === "F")
921
+ m.push(parseFloat(String.fromCharCode.apply(null, new Uint8Array(e, l, f.length)).trim()));
922
+ else if (f.type === "D") {
923
+ const d = String.fromCharCode.apply(null, new Uint8Array(e, l, f.length)).trim();
924
+ m.push(new Date(parseInt(d.substring(0, 4), 10), parseInt(d.substring(4, 6), 10) - 1, parseInt(d.substring(6, 8), 10)));
925
+ }
926
+ l += f.length;
927
+ }), h.push(m)) : l += r;
928
+ }
929
+ }
930
+ return { header: o, fields: c, records: h, recordSet: os({ fields: c, records: h }) };
931
+ }
932
+ };
933
+ const re = /* @__PURE__ */ new Map();
934
+ re.set("int16", "esriFieldTypeSmallInteger"), re.set("int32", "esriFieldTypeInteger"), re.set("int64", "esriFieldTypeInteger"), re.set("float32", "esriFieldTypeSingle"), re.set("float64", "esriFieldTypeDouble"), re.set("text", "esriFieldTypeString");
935
+ const lt = 8;
936
+ let pe = class extends se {
937
+ constructor() {
938
+ super(...arguments), this.storageInfo = null, this.datasetFormat = "CRF";
939
+ }
940
+ async open(e) {
941
+ await this.init();
942
+ const { data: n } = await this.request(this.url + "/conf.json", { signal: e == null ? void 0 : e.signal });
943
+ if (!this._validateHeader(n))
944
+ throw new O("cloudraster:open", "Invalid or unsupported conf.json.");
945
+ this.datasetName = this.url.slice(this.url.lastIndexOf("/") + 1);
946
+ const { storageInfo: t, rasterInfo: s } = this._parseHeader(n);
947
+ if (s.dataType === "thematic") {
948
+ const a = await this._fetchAuxiliaryInformation();
949
+ s.attributeTable = a;
950
+ }
951
+ this._set("storageInfo", t), this._set("rasterInfo", s), this.ioConfig.retryCount = this.ioConfig.retryCount || 0;
952
+ }
953
+ async fetchRawTile(e, n, t, s = {}) {
954
+ const { transposeInfo: a } = this.rasterInfo.storageInfo, { transposedVariableName: r } = s, o = !(!a || !r), l = o ? 0 : this.rasterInfo.storageInfo.maximumPyramidLevel - e;
955
+ if (l < 0)
956
+ return null;
957
+ const c = this._buildCacheFilePath(l, n, t, s.multidimensionalDefinition, r), h = this._getIndexRecordFromBundle(n, t, o), u = await this.request(c, { range: { from: 0, to: this.storageInfo.headerSize - 1 }, responseType: "array-buffer", signal: s.signal });
958
+ if (!u)
959
+ return null;
960
+ const m = new Uint8Array(u.data), f = this._getTileEndAndContentType(m, h);
961
+ if (f.recordSize === 0)
962
+ return null;
963
+ const d = await this.request(c, { range: { from: f.position, to: f.position + f.recordSize }, responseType: "array-buffer", signal: s.signal });
964
+ if (!d)
965
+ return null;
966
+ const [g, p] = this._getTileSize(o);
967
+ return this.decodePixelBlock(d.data, { width: g, height: p, planes: null, pixelType: null, returnInterleaved: o });
968
+ }
969
+ _validateHeader(e) {
970
+ const n = ["origin", "extent", "geodataXform", "LODInfos", "blockWidth", "blockHeight", "bandCount", "pixelType", "pixelSizeX", "pixelSizeY", "format", "packetSize"];
971
+ return e && e.type === "RasterInfo" && !n.some((t) => !e[t]);
972
+ }
973
+ _parseHeader(e) {
974
+ var H, W, q, ee, U;
975
+ const n = ["u1", "u2", "u4", "u8", "s8", "u16", "s16", "u32", "s32", "f32", "f64"][e.pixelType], { bandCount: t, colormap: s, blockWidth: a, blockHeight: r, firstPyramidLevel: o, maximumPyramidLevel: l } = e, c = (H = e.statistics) == null ? void 0 : H.map((N) => ({ min: N.min, max: N.max, avg: N.mean, stddev: N.standardDeviation, median: N.median, mode: N.mode })), h = (ee = (q = (W = e.histograms) == null ? void 0 : W[0]) == null ? void 0 : q.counts) != null && ee.length ? e.histograms : null, u = e.extent.spatialReference, m = (U = e.geodataXform) == null ? void 0 : U.spatialReference, f = new L(u != null && u.wkid || u != null && u.wkt || u != null && u.wkt2 ? u : m);
976
+ let d = new z({ xmin: e.extent.xmin, ymin: e.extent.ymin, xmax: e.extent.xmax, ymax: e.extent.ymax, spatialReference: f });
977
+ const g = new A({ x: e.pixelSizeX, y: e.pixelSizeY, spatialReference: f }), p = Math.round((d.xmax - d.xmin) / g.x), y = Math.round((d.ymax - d.ymin) / g.y), x = this._parseTransform(e.geodataXform), w = x ? d : null;
978
+ x && (d = x.forwardTransform(d), g.x = (d.xmax - d.xmin) / p, g.y = (d.ymax - d.ymin) / y);
979
+ const S = e.properties ?? {}, T = e.format.toLowerCase().replace("cache/", ""), b = new A(e.origin.x, e.origin.y, f);
980
+ let _, F, R, k;
981
+ if (s != null && s.colors)
982
+ for (_ = [], F = 0; F < s.colors.length; F++)
983
+ R = s.colors[F], k = s.values ? s.values[F] : F, _.push([k, 255 & R, R << 16 >>> 24, R << 8 >>> 24, R >>> 24]);
984
+ const M = e.LODInfos, P = [];
985
+ for (F = 0; F < M.levels.length; F++)
986
+ P.push(new ft({ level: M.levels[F], resolution: M.resolutions[F], scale: 96 / 0.0254 * M.resolutions[F] }));
987
+ const B = new te({ dpi: 96, lods: P, format: T, origin: b, size: [a, r], spatialReference: f }), C = { recordSize: lt, packetSize: e.packetSize, headerSize: e.packetSize * e.packetSize * lt + 64 }, $ = [{ maxCol: Math.ceil(p / a) - 1, maxRow: Math.ceil(y / r) - 1, minCol: 0, minRow: 0 }];
988
+ let D = 2;
989
+ if (l > 0)
990
+ for (F = 0; F < l; F++)
991
+ $.push({ maxCol: Math.ceil(p / D / a) - 1, maxRow: Math.ceil(y / D / r) - 1, minCol: 0, minRow: 0 }), D *= 2;
992
+ const E = e.mdInfo;
993
+ let X = null;
994
+ if (E && S._yxs) {
995
+ const N = S._yxs;
996
+ X = { packetSize: N.PacketSize, tileSize: [N.TileXSize, N.TileYSize] };
997
+ }
998
+ return { storageInfo: C, rasterInfo: new xe({ width: p, height: y, pixelType: n, bandCount: t, extent: d, nativeExtent: w, transform: x, spatialReference: f, pixelSize: g, keyProperties: S, statistics: c, histograms: h, multidimensionalInfo: E, colormap: _, storageInfo: new ge({ blockWidth: a, blockHeight: r, pyramidBlockWidth: a, pyramidBlockHeight: r, origin: b, tileInfo: B, transposeInfo: X, firstPyramidLevel: o, maximumPyramidLevel: l, blockBoundary: $ }) }) };
999
+ }
1000
+ _parseTransform(e) {
1001
+ var t, s;
1002
+ if (!Li(e))
1003
+ throw new O("cloudraster:open", "the data contains unsupported geodata transform types");
1004
+ const n = Hi(e);
1005
+ if (n.type === "identity")
1006
+ return null;
1007
+ if (n.type !== "polynomial" || !((t = n.forwardCoefficients) != null && t.length) || !((s = n.inverseCoefficients) != null && s.length))
1008
+ throw new O("cloudraster:open", "the data contains unsupported geodata transforms - both forward and inverse coefficients are required currently");
1009
+ return n;
1010
+ }
1011
+ async _fetchAuxiliaryInformation(e) {
1012
+ const n = this.request(this.url + "/conf.vat.json", { signal: e }).then((r) => r.data).catch(() => null), t = this.request(this.url + "/conf.vat.dbf", { responseType: "array-buffer", signal: e }).then((r) => r.data).catch(() => null), s = await Promise.all([n, t]);
1013
+ let a;
1014
+ if (s[0]) {
1015
+ let r = s[0].fields;
1016
+ const o = s[0].values;
1017
+ if (r && o) {
1018
+ r = r.map((c) => ({ type: c.name === "OID" ? "esriFieldTypeOID" : re.get(c.type), name: c.name, alias: c.alias || c.name }));
1019
+ const l = o.map((c) => ({ attributes: c }));
1020
+ r && o && (a = { fields: r, features: l });
1021
+ }
1022
+ }
1023
+ return !a && s[1] && (a = It.parse(s[1]).recordSet), _e.fromJSON(a);
1024
+ }
1025
+ _buildCacheFilePath(e, n, t, s, a) {
1026
+ const r = this._getPackageSize(!!a), o = Math.floor(n / r) * r, l = Math.floor(t / r) * r, c = "R" + this._toHexString4(o) + "C" + this._toHexString4(l);
1027
+ let h = "L";
1028
+ h += e >= 10 ? e.toString() : "0" + e.toString();
1029
+ const { multidimensionalInfo: u } = this.rasterInfo, m = s == null ? void 0 : s[0];
1030
+ if (u == null || !m)
1031
+ return `${this.url}/_alllayers/${h}/${c}.bundle`;
1032
+ let f = "_yxs";
1033
+ if (!a) {
1034
+ f = u.variables.find((p) => p.name === m.variableName).dimensions[0].values.indexOf(m.values[0]).toString(16);
1035
+ const g = 4 - f.length;
1036
+ for (let p = 0; p < g; p++)
1037
+ f = "0" + f;
1038
+ f = "S" + f;
1039
+ }
1040
+ const d = this._getVariableFolderName(a || m.variableName);
1041
+ return `${this.url}/_alllayers/${d}/${f}/${h}/${c}.bundle`;
1042
+ }
1043
+ _getPackageSize(e = !1) {
1044
+ const { transposeInfo: n } = this.rasterInfo.storageInfo;
1045
+ return e && n != null ? n.packetSize ?? 0 : this.storageInfo.packetSize;
1046
+ }
1047
+ _getTileSize(e = !1) {
1048
+ const { storageInfo: n } = this.rasterInfo, { transposeInfo: t } = n;
1049
+ return e && t != null ? t.tileSize : n.tileInfo.size;
1050
+ }
1051
+ _getVariableFolderName(e) {
1052
+ return (e = e.trim()) === "" ? "_v" : e.replaceAll(/[\{|\}\-]/g, "_").replace("\\*", "_v");
1053
+ }
1054
+ _getIndexRecordFromBundle(e, n, t = !1) {
1055
+ const s = this._getPackageSize(t), a = s * (e % s) + n % s;
1056
+ if (a < 0)
1057
+ throw new Error("Invalid level / row / col");
1058
+ return 20 + a * this.storageInfo.recordSize + 44;
1059
+ }
1060
+ _getTileEndAndContentType(e, n) {
1061
+ const t = e.subarray(n, n + 8);
1062
+ let s, a = 0;
1063
+ for (s = 0; s < 5; s++)
1064
+ a |= (255 & t[s]) << 8 * s;
1065
+ const r = 1099511627775 & a;
1066
+ for (a = 0, s = 5; s < 8; s++)
1067
+ a |= (255 & t[s]) << 8 * (s - 5);
1068
+ return { position: r, recordSize: 1099511627775 & a };
1069
+ }
1070
+ _toHexString4(e) {
1071
+ let n = e.toString(16);
1072
+ if (n.length !== 4) {
1073
+ let t = 4 - n.length;
1074
+ for (; t-- > 0; )
1075
+ n = "0" + n;
1076
+ }
1077
+ return n;
1078
+ }
1079
+ };
1080
+ I([v({ readOnly: !0 })], pe.prototype, "storageInfo", void 0), I([v({ type: String, json: { write: !0 } })], pe.prototype, "datasetFormat", void 0), pe = I([K("esri.layers.support.rasterDatasets.CloudRaster")], pe);
1081
+ const ls = pe;
1082
+ function bt(i) {
1083
+ return ["x", "e", "east", "long", "longitude"].includes(i.toLowerCase());
1084
+ }
1085
+ function St(i) {
1086
+ return ["y", "n", "west", "lat", "latitude"].includes(i.toLowerCase());
1087
+ }
1088
+ function cs(i) {
1089
+ const { axes: e } = i.domain, n = Object.keys(e), t = [], s = [];
1090
+ let a = -1, r = -1, o = [];
1091
+ for (let x = 0; x < n.length; x++) {
1092
+ const w = n[x];
1093
+ bt(w) ? a = x : St(w) && (r = x);
1094
+ const S = e[w], T = [];
1095
+ if ("values" in S) {
1096
+ S.values.forEach((_) => T.push(typeof _ == "string" ? new Date(_).getTime() : _));
1097
+ const b = T[1] - T[0];
1098
+ t.push([T[0] - 0.5 * b, T[T.length - 1] + 0.5 * b]), s.push(b);
1099
+ } else {
1100
+ const { start: b, stop: _, num: F } = S, R = (_ - b) / (F - 1);
1101
+ t.push([b - 0.5 * R, _ + 0.5 * R]), s.push(R);
1102
+ for (let k = 0; k < F; k++)
1103
+ T.push(b + R * k);
1104
+ }
1105
+ o.push({ name: w, values: T, extent: [T[0], T[T.length - 1]] });
1106
+ }
1107
+ a > -1 && r === -1 ? r = a === 0 ? 1 : 0 : r > -1 && a === -1 ? a = r === 0 ? 1 : 0 : r === -1 && a === -1 && (a = 0, r = 1), o = o.filter((x, w) => !(w === a || w === r));
1108
+ const { referencing: l } = i.domain, c = l.find((x) => x.coordinates.includes(n[a])).system.id, h = c == null ? void 0 : c.slice(c.lastIndexOf("/") + 1), u = h == null || h === "CRS84" ? 4326 : Number(h), m = new L({ wkid: u }), [f, d] = t[a], [g, p] = t[r], y = new z({ xmin: f, xmax: d, ymin: g, ymax: p, spatialReference: m });
1109
+ return { width: Math.round(y.width / s[a]), height: Math.round(y.height / s[r]), extent: y, dimensions: o };
1110
+ }
1111
+ function Ce(i) {
1112
+ const e = $t();
1113
+ return e ? i[e] ?? Object.values(i)[0] : Object.values(i)[0];
1114
+ }
1115
+ function Pe() {
1116
+ return Math.round(255 * Math.random());
1117
+ }
1118
+ function us(i) {
1119
+ var t, s;
1120
+ const e = {}, { parameters: n } = i;
1121
+ if (!n)
1122
+ return e;
1123
+ for (const [a, r] of Object.entries(n)) {
1124
+ const { type: o, description: l, unit: c, categoryEncoding: h, observedProperty: u } = r;
1125
+ if (o === "Parameter" && (e[a] = {}, l && (e[a].description = Ce(l)), c && (e[a].unit = c.label ? Ce(c.label) : null, e[a].symbol = (t = c.symbol) == null ? void 0 : t.value), h)) {
1126
+ const m = Object.entries(h).map((g, p) => ({ OID: p, Value: Number(g[1]), ClassName: g[0].slice(g[0].lastIndexOf("/") + 1), Count: 1 }));
1127
+ let f = !1;
1128
+ (s = u == null ? void 0 : u.categories) != null && s.length && (u.categories.forEach((g) => {
1129
+ if (!g.id)
1130
+ return;
1131
+ const p = g.id.slice(g.id.lastIndexOf("/") + 1), y = m.find((w) => w.ClassName === p);
1132
+ if (!y)
1133
+ return;
1134
+ const x = g.label ? Ce(g.label) : null;
1135
+ if (y.Label = x, g.preferredColor) {
1136
+ const w = Ot.fromHex(g.preferredColor);
1137
+ w && (f = !0, y.Red = w.r, y.Green = w.g, y.Blue = w.b);
1138
+ }
1139
+ }), f && m.forEach((g) => {
1140
+ g.Red == null && (g.Red = Pe(), g.Green = Pe(), g.Blue = Pe());
1141
+ }));
1142
+ const d = { objectIdFieldName: "", fields: [{ name: "OID", type: "esriFieldTypeOID", alias: "OID", domain: null }, { name: "Value", type: "esriFieldTypeInteger", alias: "Value", domain: null }, { name: "Count", type: "esriFieldTypeDouble", alias: "Count", domain: null }, { name: "ClassName", type: "esriFieldTypeString", alias: "ClassName", domain: null, length: 50 }, { name: "Label", type: "esriFieldTypeString", alias: "Label", domain: null, length: 50 }], features: m.map((g) => ({ attributes: g })) };
1143
+ f && d.fields.push({ name: "Red", type: "esriFieldTypeInteger", alias: "Red", domain: null }, { name: "Green", type: "esriFieldTypeInteger", alias: "Green", domain: null }, { name: "Blue", type: "esriFieldTypeInteger", alias: "Blue", domain: null }), e[a].attributeTable = d;
1144
+ }
1145
+ }
1146
+ return e;
1147
+ }
1148
+ function hs(i) {
1149
+ let e = Number.MAX_VALUE, n = -Number.MAX_VALUE;
1150
+ for (let t = 0; t < i.length; t++) {
1151
+ const s = i[t];
1152
+ s != null && (s < e && (e = s), s > n && (n = s));
1153
+ }
1154
+ return $i(e, n);
1155
+ }
1156
+ function fs(i, e, n) {
1157
+ const t = i.map((l, c) => ({ name: l, count: e[c] })).sort((l, c) => l.name > c.name ? -1 : 1), s = (a = 1, (l) => a *= l.count);
1158
+ var a;
1159
+ const r = [...t.slice(1), { name: "", count: 1 }].reverse().map(s).reverse();
1160
+ let o = 0;
1161
+ for (let l = i.length - 1; l >= 0; l--)
1162
+ o += r[t.findIndex(({ name: c }) => c === i[l])] * (n % e[l]), n = Math.floor(n / e[l]);
1163
+ return o;
1164
+ }
1165
+ function ms(i) {
1166
+ var m;
1167
+ const { width: e, height: n, extent: t, dimensions: s } = cs(i), { ranges: a } = i, r = Object.keys(a).sort((f, d) => f < d ? -1 : 1), o = [];
1168
+ for (let f = 0; f < r.length; f++) {
1169
+ const d = r[f];
1170
+ s != null && s.length && o.push({ name: d, dimensions: s });
1171
+ }
1172
+ const l = us(i);
1173
+ o.forEach((f) => l[f.name] && Object.assign(f, l[f.name]));
1174
+ const c = o.length ? { variables: o } : void 0, h = [];
1175
+ for (let f = 0; f < r.length; f++) {
1176
+ const d = r[f], { values: g, dataType: p, axisNames: y, shape: x } = a[d], w = x.length > 2 ? f * x.slice(0, -2).reduce((R, k) => R * k) : 0, S = y.slice(0, -2), T = x.slice(0, -2), b = p === "float" ? "f32" : hs(g), _ = e * n, F = g.length / _;
1177
+ for (let R = 0; R < F; R++) {
1178
+ const k = Y.createEmptyBand(b, _), M = new Uint8Array(_).fill(255);
1179
+ let P = !1;
1180
+ const B = R * _;
1181
+ for (let C = 0; C < _; C++) {
1182
+ const $ = g[B + C];
1183
+ $ == null ? (M[C] = 0, P = !0) : k[C] = $;
1184
+ }
1185
+ if (f === 0 || s != null && s.length) {
1186
+ const C = new Y({ width: e, height: n, mask: P ? M : null, pixels: [k], pixelType: b });
1187
+ C.updateStatistics(), (s == null ? void 0 : s.length) ? h[fs(S, T, R) + w] = C : h.push(C);
1188
+ } else {
1189
+ const C = h[R];
1190
+ C.pixels.push(k), P ? C.mask && (C.mask = Y.combineBandMasks([C.mask, M])) : C.mask = P ? M : null;
1191
+ }
1192
+ }
1193
+ }
1194
+ const u = (m = Object.values(l).find((f) => f.attributeTable)) == null ? void 0 : m.attributeTable;
1195
+ return { extent: t, pixelBlocks: h, multidimensionalInfo: c, attributeTable: u, bandNames: c ? void 0 : r };
1196
+ }
1197
+ let ce = class extends se {
1198
+ constructor() {
1199
+ super(...arguments), this.datasetFormat = "MEMORY", this.source = null;
1200
+ }
1201
+ get url() {
1202
+ return "";
1203
+ }
1204
+ async open(i) {
1205
+ await this.init();
1206
+ const e = this.source, { pixelBlocks: n, attributeTable: t, statistics: s, histograms: a, name: r, nativeExtent: o, transform: l } = e, c = n[0], { width: h, height: u, pixelType: m } = c, f = e.extent ?? new z({ xmin: -0.5, ymin: 0.5, xmax: h - 0.5, ymax: u - 0.5, spatialReference: new L({ wkid: 3857 }) }), d = e.isPseudoSpatialReference ?? !e.extent, g = { x: f.width / h, y: f.height / u }, p = { ...e.keyProperties };
1207
+ t && (p.DataType = "Thematic");
1208
+ const y = new xe({ width: h, height: u, pixelType: m, extent: f, nativeExtent: o, attributeTable: t, transform: l, pixelSize: g, spatialReference: f.spatialReference, bandCount: c.pixels.length, keyProperties: p, multidimensionalInfo: e.multidimensionalInfo, statistics: s, isPseudoSpatialReference: d, histograms: a });
1209
+ this.ioConfig.skipMapInfo && this.updateImageSpaceRasterInfo(y), this.createRemoteDatasetStorageInfo(y, 512, 512), this._set("rasterInfo", y), this.updateTileInfo(), y.multidimensionalInfo ? await this._buildMDimStats(e.pixelBlocks, y.multidimensionalInfo) : await this._buildInMemoryRaster(c, { width: 512, height: 512 }, i), y.multidimensionalInfo || (this.source = null), this.datasetName = r;
1210
+ }
1211
+ fetchRawTile(i, e, n, t = {}) {
1212
+ if (!this._pixelBlockTiles) {
1213
+ const { rasterInfo: a } = this, [r, o] = a.storageInfo.tileInfo.size, { sliceId: l } = t, { pixelBlocks: c } = this.source, h = { pixelBlock: l == null ? c[0] : c[l], useBilinear: a.dataType !== "thematic", tileSize: { width: r, height: o }, level: i, row: e, col: n }, u = this.rasterJobHandler ? this.rasterJobHandler.clipTile(h, t) : Di(h);
1214
+ return Promise.resolve(u);
1215
+ }
1216
+ const s = this._pixelBlockTiles.get(`${i}/${e}/${n}`);
1217
+ return Promise.resolve(s);
1218
+ }
1219
+ async _buildInMemoryRaster(i, e, n) {
1220
+ var u, m;
1221
+ const { rasterInfo: t } = this, s = t.storageInfo.maximumPyramidLevel ?? 0, a = t.dataType !== "thematic", r = this.rasterJobHandler ? this.rasterJobHandler.split({ pixelBlock: i, tileSize: e, maximumPyramidLevel: s, useBilinear: a }, n) : Promise.resolve(Ni(i, e, s, a)), o = t.statistics != null, l = t.histograms != null, c = this.ioConfig.skipStatistics || o ? Promise.resolve({ statistics: null, histograms: null }) : this.rasterJobHandler ? this.rasterJobHandler.estimateStatisticsHistograms({ pixelBlock: i }, n) : Promise.resolve(di(i)), h = await mt([r, c]);
1222
+ if (!h[0].value && h[1].value)
1223
+ throw new O("inmemory-raster:open", "failed to build in memory raster");
1224
+ this._pixelBlockTiles = h[0].value, o || (t.statistics = (u = h[1].value) == null ? void 0 : u.statistics), l || (t.histograms = (m = h[1].value) == null ? void 0 : m.histograms);
1225
+ }
1226
+ async _buildMDimStats(i, e, n) {
1227
+ for (let t = 0; t < e.variables.length; t++) {
1228
+ const s = e.variables[t];
1229
+ if (s.statistics)
1230
+ continue;
1231
+ const a = s.dimensions.map((c) => {
1232
+ var h, u;
1233
+ return new He({ variableName: s.name, dimensionName: c.name, values: [((h = c.values) == null ? void 0 : h[0]) ?? ((u = c.extent) == null ? void 0 : u[0])], isSlice: !0 });
1234
+ }), r = yt(a, e), o = r == null ? null : i[r];
1235
+ if (o == null)
1236
+ continue;
1237
+ const l = this.rasterJobHandler ? await this.rasterJobHandler.computeStatisticsHistograms({ pixelBlock: o }, n) : We(o);
1238
+ s.statistics = l.statistics, s.histograms || (s.histograms = l.histograms);
1239
+ }
1240
+ }
1241
+ };
1242
+ I([v({ type: String, json: { write: !0 } })], ce.prototype, "datasetFormat", void 0), I([v()], ce.prototype, "source", void 0), I([v()], ce.prototype, "url", null), ce = I([K("esri.layers.support.rasterDatasets.InMemoryRaster")], ce);
1243
+ const qe = ce;
1244
+ let de = class extends se {
1245
+ constructor() {
1246
+ super(...arguments), this.datasetFormat = "CovJSON";
1247
+ }
1248
+ async open(e) {
1249
+ await this.init();
1250
+ const { extent: n, pixelBlocks: t, multidimensionalInfo: s, attributeTable: a, bandNames: r } = await this._fetchData(e), { statistics: o, histograms: l } = We(t[0]), c = r == null ? void 0 : r.map((f) => ({ BandName: f })), h = { DataType: a ? "Thematic" : s ? "Scientific" : "Generic", BandProperties: c }, u = new qe({ source: { extent: n, pixelBlocks: t, attributeTable: a ? _e.fromJSON(a) : null, multidimensionalInfo: s, statistics: o, histograms: l, keyProperties: h, isPseudoSpatialReference: !1 } });
1251
+ await u.open(), this._inMemoryRaster = u;
1252
+ const m = this.source ? "" : this.url.slice(this.url.lastIndexOf("/") + 1);
1253
+ this._set("datasetName", m.slice(0, m.indexOf("."))), this._set("rasterInfo", u.rasterInfo);
1254
+ }
1255
+ fetchRawTile(e, n, t, s = {}) {
1256
+ return this._inMemoryRaster.fetchRawTile(e, n, t, s);
1257
+ }
1258
+ async _fetchData(e) {
1259
+ var a, r, o, l;
1260
+ const n = this.source ?? (await this.request(this.url, { signal: e == null ? void 0 : e.signal })).data, t = "imagery-tile-layer:open-coverage-json";
1261
+ if (((a = n.type) == null ? void 0 : a.toLowerCase()) !== "coverage" || ((o = (r = n.domain) == null ? void 0 : r.domainType) == null ? void 0 : o.toLowerCase()) !== "grid")
1262
+ throw new O(t, "Only coverage with Grid domain type is supported");
1263
+ if (!n.ranges)
1264
+ throw new O(t, "Missing ranges in the grid coverage data");
1265
+ if (!((l = n.domain.referencing) != null && l.length))
1266
+ throw new O(t, "Missing domain referencing in the grid coverage data");
1267
+ const s = Object.values(n.ranges);
1268
+ for (let c = 0; c < s.length; c++) {
1269
+ const { axisNames: h, shape: u, type: m, values: f } = s[c];
1270
+ if (!(m.toLowerCase() === "ndarray" && (f != null && f.length) && (h != null && h.length) && (u != null && u.length)))
1271
+ throw new O(t, "Only ranges with valid NdArray, axisNames, shape, and inline values are supported");
1272
+ if (!(bt(h[h.length - 1]) && St(h[h.length - 2])))
1273
+ throw new O(t, "Only row-major ordered pixel values are supported. X axis must be the last axis.");
1274
+ }
1275
+ return ms(n);
1276
+ }
1277
+ };
1278
+ I([v({ type: String, json: { write: !0 } })], de.prototype, "datasetFormat", void 0), I([v({ constructOnly: !0 })], de.prototype, "source", void 0), de = I([K("esri.layers.support.rasterDatasets.CovJSONRaster")], de);
1279
+ const ps = de;
1280
+ function fe(i, e) {
1281
+ if (!i || !e)
1282
+ return [];
1283
+ let n = e;
1284
+ e.includes("/") ? (n = e.slice(0, e.indexOf("/")), e = e.slice(e.indexOf("/") + 1)) : e = "";
1285
+ const t = [];
1286
+ if (e) {
1287
+ const a = fe(i, n);
1288
+ for (let r = 0; r < a.length; r++)
1289
+ fe(a[r], e).forEach((o) => t.push(o));
1290
+ return t;
1291
+ }
1292
+ const s = i.getElementsByTagNameNS("*", n);
1293
+ if (!s || s.length === 0)
1294
+ return [];
1295
+ for (let a = 0; a < s.length; a++)
1296
+ t.push(s[a] || s.item(a));
1297
+ return t;
1298
+ }
1299
+ function V(i, e) {
1300
+ if (!i || !e)
1301
+ return null;
1302
+ let n = e;
1303
+ e.includes("/") ? (n = e.slice(0, e.indexOf("/")), e = e.slice(e.indexOf("/") + 1)) : e = "";
1304
+ const t = fe(i, n);
1305
+ return t.length > 0 ? e ? V(t[0], e) : t[0] : null;
1306
+ }
1307
+ function Z(i, e = null) {
1308
+ const n = e ? V(i, e) : i;
1309
+ let t;
1310
+ return n ? (t = n.textContent || n.nodeValue, t ? t.trim() : null) : null;
1311
+ }
1312
+ function ds(i, e) {
1313
+ const n = fe(i, e), t = [];
1314
+ let s;
1315
+ for (let a = 0; a < n.length; a++)
1316
+ s = n[a].textContent || n[a].nodeValue, s && (s = s.trim(), s !== "" && t.push(s));
1317
+ return t;
1318
+ }
1319
+ function Se(i, e) {
1320
+ return ds(i, e).map((n) => Number(n));
1321
+ }
1322
+ function oe(i, e) {
1323
+ const n = Z(i, e);
1324
+ return Number(n);
1325
+ }
1326
+ function Oe(i, e) {
1327
+ var s;
1328
+ const n = (s = i == null ? void 0 : i.nodeName) == null ? void 0 : s.toLowerCase(), t = e.toLowerCase();
1329
+ return n.slice(n.lastIndexOf(":") + 1) === t;
1330
+ }
1331
+ function ct(i, e) {
1332
+ if (!i || !e)
1333
+ return null;
1334
+ const n = [];
1335
+ for (let t = 0; t < i.length; t++)
1336
+ n.push(i[t]), n.push(e[t]);
1337
+ return n;
1338
+ }
1339
+ function ys(i) {
1340
+ const e = V(i, "GeodataXform"), n = Fe(oe(e, "SpatialReference/WKID") || Z(e, "SpatialReference/WKT"));
1341
+ if (e.getAttribute("xsi:type") !== "typens:PolynomialXform")
1342
+ return { spatialReference: n, transform: null };
1343
+ const t = oe(e, "PolynomialOrder") ?? 1, s = Se(e, "CoeffX/Double"), a = Se(e, "CoeffY/Double"), r = Se(e, "InverseCoeffX/Double"), o = Se(e, "InverseCoeffY/Double"), l = ct(s, a), c = ct(r, o);
1344
+ return { spatialReference: n, transform: l && c && l.length && c.length ? new je({ spatialReference: n, polynomialOrder: t, forwardCoefficients: l, inverseCoefficients: c }) : null };
1345
+ }
1346
+ function gs(i) {
1347
+ var m;
1348
+ const e = oe(i, "NoDataValue"), n = V(i, "Histograms/HistItem"), t = oe(n, "HistMin"), s = oe(n, "HistMax"), a = oe(n, "BucketCount"), r = (m = Z(n, "HistCounts")) == null ? void 0 : m.split("|").map((f) => Number(f));
1349
+ let o, l, c, h;
1350
+ fe(i, "Metadata/MDI").forEach((f) => {
1351
+ const d = Number(f.textContent ?? f.nodeValue);
1352
+ switch (f.getAttribute("key").toUpperCase()) {
1353
+ case "STATISTICS_MINIMUM":
1354
+ o = d;
1355
+ break;
1356
+ case "STATISTICS_MAXIMUM":
1357
+ l = d;
1358
+ break;
1359
+ case "STATISTICS_MEAN":
1360
+ c = d;
1361
+ break;
1362
+ case "STATISTICS_STDDEV":
1363
+ h = d;
1364
+ }
1365
+ });
1366
+ const u = oe(i, "Metadata/SourceBandIndex");
1367
+ return { noDataValue: e, histogram: r != null && r.length && t != null && s != null ? { min: t, max: s, size: a || r.length, counts: r } : null, sourceBandIndex: u, statistics: o != null && l != null ? { min: o, max: l, avg: c, stddev: h } : null };
1368
+ }
1369
+ function Fe(i) {
1370
+ if (!i)
1371
+ return null;
1372
+ let e = Number(i);
1373
+ if (!isNaN(e) && e !== 0)
1374
+ return new L({ wkid: e });
1375
+ if (i = String(i).trim(), Dt(i))
1376
+ return new L({ wkt2: i });
1377
+ const n = i.toUpperCase();
1378
+ if (n.startsWith("COMPD_CS")) {
1379
+ if (!n.includes("VERTCS") || !n.includes("GEOGCS") && !n.startsWith("PROJCS"))
1380
+ return null;
1381
+ const t = n.indexOf("VERTCS"), s = n.indexOf("PROJCS"), a = s > -1 ? s : n.indexOf("GEOGCS");
1382
+ if (a === -1)
1383
+ return null;
1384
+ const r = i.slice(a, i.lastIndexOf("]", t) + 1).trim(), o = i.slice(t, i.lastIndexOf("]")).trim();
1385
+ e = $e(r);
1386
+ const l = new L(e ? { wkid: e } : { wkt: r }), c = $e(o);
1387
+ return c && (l.vcsWkid = c), l;
1388
+ }
1389
+ return n.startsWith("GEOGCS") || n.startsWith("PROJCS") ? (e = $e(i), new L(e !== 0 ? { wkid: e } : { wkt: i })) : null;
1390
+ }
1391
+ function $e(i) {
1392
+ var s;
1393
+ const e = i.replaceAll("]", "[").replaceAll('"', "").split("[").map((a) => a.trim()).filter((a) => a !== ""), n = e[e.length - 1].split(","), t = (s = n[0]) == null ? void 0 : s.toLowerCase();
1394
+ if ((t === "epsg" || t === "esri") && i.endsWith('"]]')) {
1395
+ const a = Number(n[1]);
1396
+ if (!isNaN(a) && a !== 0)
1397
+ return a;
1398
+ }
1399
+ return 0;
1400
+ }
1401
+ function Ue(i) {
1402
+ var t;
1403
+ if (((t = i == null ? void 0 : i.documentElement.tagName) == null ? void 0 : t.toLowerCase()) !== "pamdataset")
1404
+ return {};
1405
+ const e = { spatialReference: null, transform: null, metadata: {}, rasterBands: [], statistics: null, histograms: null };
1406
+ i.documentElement.childNodes.forEach((s) => {
1407
+ if (s.nodeType === 1) {
1408
+ if (Oe(s, "SRS")) {
1409
+ if (!e.spatialReference) {
1410
+ const a = Z(s);
1411
+ e.spatialReference = Fe(a);
1412
+ }
1413
+ } else if (Oe(s, "Metadata"))
1414
+ if (s.getAttribute("domain") === "xml:ESRI") {
1415
+ const { spatialReference: a, transform: r } = ys(s);
1416
+ e.transform = r, e.spatialReference || (e.spatialReference = a);
1417
+ } else
1418
+ fe(s, "MDI").forEach((a) => e.metadata[a.getAttribute("key")] = Z(a));
1419
+ else if (Oe(s, "PAMRasterBand")) {
1420
+ const a = gs(s);
1421
+ a.sourceBandIndex != null && e.rasterBands[a.sourceBandIndex] == null ? e.rasterBands[a.sourceBandIndex] = a : e.rasterBands.push(a);
1422
+ }
1423
+ }
1424
+ });
1425
+ const n = e.rasterBands;
1426
+ if (n.length) {
1427
+ const s = !!n[0].statistics;
1428
+ e.statistics = s ? n.map((r) => r.statistics).filter(Be) : null;
1429
+ const a = !!n[0].histogram;
1430
+ e.histograms = a ? n.map((r) => r.histogram).filter(Be) : null;
1431
+ }
1432
+ return e;
1433
+ }
1434
+ let Te = class extends se {
1435
+ async open(i) {
1436
+ await this.init();
1437
+ const e = await this._fetchData(i);
1438
+ let { spatialReference: n, statistics: t, histograms: s, transform: a } = await this._fetchAuxiliaryData(i);
1439
+ const r = !n;
1440
+ r && (n = new L({ wkid: 3857 })), s != null && s.length && t == null && (t = Ge(s));
1441
+ const { width: o, height: l } = e;
1442
+ let c = new z({ xmin: -0.5, ymin: 0.5 - l, xmax: o - 0.5, ymax: 0.5, spatialReference: n });
1443
+ const h = a ? a.forwardTransform(c) : c;
1444
+ let u = !0;
1445
+ if (a) {
1446
+ const f = a.forwardCoefficients;
1447
+ u = f && f[1] === 0 && f[2] === 0, u && (a = null, c = h);
1448
+ }
1449
+ const m = new qe({ source: { extent: h, nativeExtent: c, transform: a, pixelBlocks: [e], statistics: t, histograms: s, keyProperties: { DateType: "Processed" }, isPseudoSpatialReference: r }, ioConfig: { sampling: "closest", skipStatistics: !0 } });
1450
+ this.ioConfig.skipMapInfo && (m.ioConfig.skipMapInfo = !0), await m.open(), m.source = null, this._set("rasterInfo", m.rasterInfo), this._inMemoryRaster = m;
1451
+ }
1452
+ fetchRawTile(i, e, n, t = {}) {
1453
+ return this._inMemoryRaster.fetchRawTile(i, e, n, t);
1454
+ }
1455
+ async _fetchData(i) {
1456
+ const { data: e } = await this.request(this.url, { responseType: "array-buffer", signal: i == null ? void 0 : i.signal }), n = yi(e).toUpperCase();
1457
+ if (n !== "JPG" && n !== "PNG" && n !== "GIF" && n !== "BMP")
1458
+ throw new O("image-aux-raster:open", "the data is not a supported format");
1459
+ this._set("datasetFormat", n);
1460
+ const t = n.toLowerCase(), s = t === "gif" || t === "bmp" || !Nt("ios"), a = await this.decodePixelBlock(e, { format: t, useCanvas: s, hasNoZlibMask: !0 });
1461
+ if (a == null)
1462
+ throw new O("image-aux-raster:open", "the data cannot be decoded");
1463
+ return a;
1464
+ }
1465
+ async _fetchAuxiliaryData(i) {
1466
+ var h;
1467
+ const e = i == null ? void 0 : i.signal, { skipExtensions: n = [], skipMapInfo: t } = this.ioConfig, s = t || n.includes("aux.xml") ? null : this.request(this.url + ".aux.xml", { responseType: "xml", signal: e }), a = this.datasetFormat, r = a === "JPG" ? "jgw" : a === "PNG" ? "pgw" : a === "BMP" ? "bpw" : null, o = r && n.includes(r) ? null : this.request(this.url.slice(0, this.url.lastIndexOf(".")) + "." + r, { responseType: "text", signal: e }), l = await mt([s, o]);
1468
+ if (e != null && e.aborted)
1469
+ throw Bt();
1470
+ const c = Ue((h = l[0].value) == null ? void 0 : h.data);
1471
+ if (!c.transform) {
1472
+ const u = l[1].value ? l[1].value.data.split(`
1473
+ `).slice(0, 6).map((m) => Number(m)) : null;
1474
+ c.transform = (u == null ? void 0 : u.length) === 6 ? new je({ forwardCoefficients: [u[4], u[5], u[0], -u[1], u[2], -u[3]] }) : null;
1475
+ }
1476
+ return c;
1477
+ }
1478
+ };
1479
+ I([v({ type: String, json: { write: !0 } })], Te.prototype, "datasetFormat", void 0), Te = I([K("esri.layers.support.rasterDatasets.ImageAuxRaster")], Te);
1480
+ const Re = Te;
1481
+ let ye = class extends se {
1482
+ constructor() {
1483
+ super(...arguments), this._levelOffset = 0, this._tilemapCache = null, this._slices = null, this.datasetFormat = "RasterTileServer", this.tileType = null;
1484
+ }
1485
+ async open(i) {
1486
+ var _, F;
1487
+ await this.init();
1488
+ const e = i == null ? void 0 : i.signal, n = this.sourceJSON ? { data: this.sourceJSON } : await this.request(this.url, { query: { f: "json" }, signal: e });
1489
+ n.ssl && (this.url = this.url.replace(/^http:/i, "https:"));
1490
+ const t = n.data;
1491
+ if (this.sourceJSON = t, !t)
1492
+ throw new O("imageserverraster:open", "cannot initialize tiled image service, missing service info");
1493
+ if (!t.tileInfo)
1494
+ throw new O("imageserverraster:open", "use ImageryLayer to open non-tiled image services");
1495
+ this._fixScaleInServiceInfo();
1496
+ const s = ["jpg", "jpeg", "png", "png8", "png24", "png32", "mixed"];
1497
+ this.tileType = t.cacheType, this.tileType == null && (s.includes(t.tileInfo.format.toLowerCase()) ? this.tileType = "Map" : t.tileInfo.format.toLowerCase() === "lerc" ? this.tileType = "Elevation" : this.tileType = "Raster"), this.datasetName = ((_ = t.name) == null ? void 0 : _.slice(t.name.indexOf("/") + 1)) ?? "";
1498
+ const a = await this._fetchRasterInfo({ signal: e });
1499
+ if (a == null)
1500
+ throw new O("image-server-raster:open", "cannot initialize image service");
1501
+ ri(a, t);
1502
+ const r = this.tileType === "Map" ? xs(t.tileInfo, t) : te.fromJSON(t.tileInfo);
1503
+ Et(r);
1504
+ const [o, l] = this._computeMinMaxLOD(a, r), { extent: c, pixelSize: h } = a, u = 0.5 / a.width * h.x, m = Math.max(h.x, h.y), { lods: f } = r;
1505
+ (this.tileType !== "Map" && t.maxScale !== 0 || Math.abs(h.x - h.y) > u || !f.some((R) => Math.abs(R.resolution - m) < u)) && (h.x = h.y = o.resolution, a.width = Math.ceil((c.xmax - c.xmin) / h.x - 0.1), a.height = Math.ceil((c.ymax - c.ymin) / h.y - 0.1));
1506
+ const d = o.level - l.level, [g, p] = r.size, y = [], x = [];
1507
+ f.forEach((R, k) => {
1508
+ R.level >= l.level && R.level <= o.level && y.push({ x: R.resolution, y: R.resolution }), k < f.length - 1 && x.push(Math.round(10 * R.resolution / f[k + 1].resolution) / 10);
1509
+ }), y.sort((R, k) => R.x - k.x);
1510
+ const w = this.computeBlockBoundary(c, g, p, r.origin, y, d), S = y.length > 1 ? y.slice(1) : null;
1511
+ let T;
1512
+ t.transposeInfo && (T = { tileSize: [t.transposeInfo.rows, t.transposeInfo.cols], packetSize: ((F = a.keyProperties) == null ? void 0 : F._yxs.PacketSize) ?? 0 });
1513
+ const b = x.length <= 1 || x.length >= 3 && x.slice(0, -1).every((R) => R === x[0]) ? x[0] ?? 2 : Math.round(10 / (l.resolution / o.resolution) ** (-1 / d)) / 10;
1514
+ if (a.storageInfo = new ge({ blockWidth: r.size[0], blockHeight: r.size[1], pyramidBlockWidth: r.size[0], pyramidBlockHeight: r.size[1], pyramidResolutions: S, pyramidScalingFactor: b, compression: r.format, origin: r.origin, firstPyramidLevel: 1, maximumPyramidLevel: d, tileInfo: r, transposeInfo: T, blockBoundary: w }), this._fixGCSShift(a), this._set("rasterInfo", a), t.capabilities.toLowerCase().includes("tilemap")) {
1515
+ const R = { tileInfo: a.storageInfo.tileInfo, parsedUrl: Jt(this.url), url: this.url, tileServers: [] };
1516
+ this._tilemapCache = new Yi({ layer: R });
1517
+ }
1518
+ }
1519
+ async fetchRawTile(i, e, n, t = {}) {
1520
+ const { storageInfo: s, extent: a } = this.rasterInfo, { transposeInfo: r } = s, o = r != null && !!t.transposedVariableName;
1521
+ if (this._slices && !o && t.sliceId == null)
1522
+ return null;
1523
+ const l = o ? 0 : s.maximumPyramidLevel - i + this._levelOffset, c = `${this.url}/tile/${l}/${e}/${n}`, h = this._slices ? o ? { variable: t.transposedVariableName } : { sliceId: t.sliceId || 0 } : null, { data: u } = await this.request(c, { query: h, responseType: "array-buffer", signal: t.signal });
1524
+ if (!u)
1525
+ return null;
1526
+ const m = o ? r.tileSize : s.tileInfo.size, f = await this.decodePixelBlock(u, { width: m[0], height: m[1], planes: null, pixelType: null, isPoint: this.tileType === "Elevation", returnInterleaved: o, noDataValue: this.rasterInfo.noDataValue });
1527
+ if (f == null)
1528
+ return null;
1529
+ const d = s.blockBoundary[i];
1530
+ if (s.compression !== "jpg" || n > d.minCol && n < d.maxCol && e > d.minRow && e < d.maxRow)
1531
+ return f;
1532
+ const { origin: g, blockWidth: p, blockHeight: y } = s, { x, y: w } = this.getPyramidPixelSize(i), S = Math.round((a.xmin - g.x) / x) % p, T = Math.round((a.xmax - g.x) / x) % p || p, b = Math.round((g.y - a.ymax) / w) % y, _ = Math.round((g.y - a.ymin) / w) % y || y, F = n === d.minCol ? S : 0, R = e === d.minRow ? b : 0, k = n === d.maxCol ? T : p, M = e === d.maxRow ? _ : y;
1533
+ return Bi(f, { x: F, y: R }, { width: k - F, height: M - R }), f;
1534
+ }
1535
+ getSliceIndex(i) {
1536
+ if (!this._slices || i == null || i.length === 0)
1537
+ return null;
1538
+ const e = i;
1539
+ for (let n = 0; n < this._slices.length; n++) {
1540
+ const t = this._slices[n].multidimensionalDefinition;
1541
+ if (t.length === e.length && !t.some((s) => {
1542
+ const a = e.find((r) => s.variableName === r.variableName && r.dimensionName === s.dimensionName);
1543
+ return a ? (Array.isArray(s.values[0]) ? `${s.values[0][0]}-${s.values[0][1]}` : s.values[0]) !== (Array.isArray(a.values[0]) ? `${a.values[0][0]}-${a.values[0][1]}` : a.values[0]) : !0;
1544
+ }))
1545
+ return n;
1546
+ }
1547
+ return null;
1548
+ }
1549
+ async fetchVariableStatisticsHistograms(i, e) {
1550
+ var a, r, o;
1551
+ const n = this.request(this.url + "/statistics", { query: { variable: i, f: "json" }, signal: e }).then((l) => {
1552
+ var c;
1553
+ return (c = l.data) == null ? void 0 : c.statistics;
1554
+ }), t = this.request(this.url + "/histograms", { query: { variable: i, f: "json" }, signal: e }).then((l) => {
1555
+ var c;
1556
+ return (c = l.data) == null ? void 0 : c.histograms;
1557
+ }), s = await Promise.all([n, t]);
1558
+ return s[0] && s[0].forEach((l) => {
1559
+ l.avg = l.mean, l.stddev = l.standardDeviation;
1560
+ }), (o = (r = (a = s[1]) == null ? void 0 : a[0]) == null ? void 0 : r.counts) != null && o.length || (s[1] = null), { statistics: s[0] || null, histograms: s[1] || null };
1561
+ }
1562
+ async computeBestPyramidLevelForLocation(i, e = {}) {
1563
+ if (!this._tilemapCache)
1564
+ return 0;
1565
+ let n = this.identifyPixelLocation(i, 0, e.datumTransformation);
1566
+ if (n === null)
1567
+ return null;
1568
+ let t = 0;
1569
+ const { maximumPyramidLevel: s } = this.rasterInfo.storageInfo;
1570
+ let a = s - t + this._levelOffset;
1571
+ const r = n.srcLocation;
1572
+ for (; a >= 0; ) {
1573
+ try {
1574
+ if (await this._tilemapCache.fetchAvailability(a, n.row, n.col, e) === "available")
1575
+ break;
1576
+ } catch {
1577
+ }
1578
+ if (a--, t++, n = this.identifyPixelLocation(r, t, e.datumTransformation), n === null)
1579
+ return null;
1580
+ }
1581
+ return a === -1 || n == null ? null : t;
1582
+ }
1583
+ async _fetchRasterInfo(i) {
1584
+ const e = this.sourceJSON;
1585
+ if (this.tileType === "Map") {
1586
+ const r = e.fullExtent || e.extent, o = Math.ceil((r.xmax - r.xmin) / e.pixelSizeX - 0.1), l = Math.ceil((r.ymax - r.ymin) / e.pixelSizeY - 0.1), c = L.fromJSON(e.spatialReference || r.spatialReference), h = new A({ x: e.pixelSizeX, y: e.pixelSizeY, spatialReference: c });
1587
+ return new xe({ width: o, height: l, bandCount: 3, extent: z.fromJSON(r), spatialReference: c, pixelSize: h, pixelType: "u8", statistics: null, keyProperties: { DataType: "processed" } });
1588
+ }
1589
+ const { signal: n } = i, t = ai(this.url, this.sourceJSON, { signal: n, query: this.ioConfig.customFetchParameters }), s = e.hasMultidimensions ? this.request(`${this.url}/slices`, { query: { f: "json" }, signal: n }).then((r) => {
1590
+ var o;
1591
+ return (o = r.data) == null ? void 0 : o.slices;
1592
+ }).catch(() => null) : null, a = await Promise.all([t, s]);
1593
+ return this._slices = a[1], a[0];
1594
+ }
1595
+ _fixScaleInServiceInfo() {
1596
+ const { sourceJSON: i } = this;
1597
+ i.minScale && i.minScale < 0 && (i.minScale = 0), i.maxScale && i.maxScale < 0 && (i.maxScale = 0);
1598
+ }
1599
+ _fixGCSShift(i) {
1600
+ const { extent: e, spatialReference: n } = i;
1601
+ e.xmin > -1 && e.xmax > 181 && (n != null && n.wkid) && n.isGeographic && (i.nativeExtent = i.extent, i.transform = new Wi(), i.extent = i.transform.forwardTransform(e));
1602
+ }
1603
+ _computeMinMaxLOD(i, e) {
1604
+ const { pixelSize: n } = i, t = 0.5 / i.width * n.x, { lods: s } = e, a = e.lodAt(Math.max.apply(null, s.map((m) => m.level))), r = e.lodAt(Math.min.apply(null, s.map((m) => m.level))), { tileType: o } = this;
1605
+ if (o === "Map")
1606
+ return this._levelOffset = s[0].level, [a, r];
1607
+ if (o === "Raster")
1608
+ return [s.find((m) => m.resolution === n.x) ?? a, r];
1609
+ const { minScale: l, maxScale: c } = this.sourceJSON;
1610
+ let h = a;
1611
+ c > 0 && (h = s.find((m) => Math.abs(m.scale - c) < t), h || (h = s.filter((m) => m.scale > c).sort((m, f) => m.scale > f.scale ? 1 : -1)[0] ?? a));
1612
+ let u = r;
1613
+ return l > 0 && (u = s.find((m) => Math.abs(m.scale - l) < t) ?? r, this._levelOffset = u.level - r.level), [h, u];
1614
+ }
1615
+ };
1616
+ function xs(i, e) {
1617
+ if (!i)
1618
+ return null;
1619
+ const { minScale: n, maxScale: t, minLOD: s, maxLOD: a } = e;
1620
+ if (s != null && a != null)
1621
+ return te.fromJSON({ ...i, lods: i.lods.filter(({ level: r }) => r != null && r >= s && r <= a) });
1622
+ if (n !== 0 && t !== 0) {
1623
+ const r = (c) => Math.round(1e4 * c) / 1e4, o = n ? r(n) : 1 / 0, l = t ? r(t) : -1 / 0;
1624
+ return te.fromJSON({ ...i, lods: i.lods.filter((c) => {
1625
+ const h = r(c.scale);
1626
+ return h <= o && h >= l;
1627
+ }) });
1628
+ }
1629
+ return te.fromJSON(i);
1630
+ }
1631
+ I([v({ type: String, json: { write: !0 } })], ye.prototype, "datasetFormat", void 0), I([v()], ye.prototype, "tileType", void 0), ye = I([K("esri.layers.support.rasterDatasets.ImageServerRaster")], ye);
1632
+ const ws = ye, Q = /* @__PURE__ */ new Map();
1633
+ Q.set("Int8", "s8"), Q.set("UInt8", "u8"), Q.set("Int16", "s16"), Q.set("UInt16", "u16"), Q.set("Int32", "s32"), Q.set("UInt32", "u32"), Q.set("Float32", "f32"), Q.set("Float64", "f32"), Q.set("Double64", "f32");
1634
+ const ie = /* @__PURE__ */ new Map();
1635
+ ie.set("none", { blobExtension: ".til", isOneSegment: !0, decoderFormat: "bip" }), ie.set("lerc", { blobExtension: ".lrc", isOneSegment: !1, decoderFormat: "lerc" }), ie.set("deflate", { blobExtension: ".pzp", isOneSegment: !0, decoderFormat: "deflate" }), ie.set("jpeg", { blobExtension: ".pjg", isOneSegment: !0, decoderFormat: "jpg" });
1636
+ let ue = class extends se {
1637
+ constructor() {
1638
+ super(...arguments), this._files = null, this._storageIndex = null, this.datasetFormat = "MRF";
1639
+ }
1640
+ async open(i) {
1641
+ await this.init(), this.datasetName = this.url.slice(this.url.lastIndexOf("/") + 1);
1642
+ const e = i ? i.signal : null, n = await this.request(this.url, { responseType: "xml", signal: e }), { rasterInfo: t, files: s } = this._parseHeader(n.data), { skipMapInfo: a, skipExtensions: r = [] } = this.ioConfig;
1643
+ if (!r.includes("aux.xml") && !a) {
1644
+ const y = await this._fetchAuxiliaryData(i);
1645
+ y != null && (t.statistics = y.statistics ?? t.statistics, t.histograms = y.histograms, y.histograms && t.statistics == null && (t.statistics = Ge(y.histograms)));
1646
+ }
1647
+ a && this.updateImageSpaceRasterInfo(t), this._set("rasterInfo", t), this._files = s;
1648
+ const o = await this.request(s.index, { responseType: "array-buffer", signal: e });
1649
+ this._storageIndex = this._parseIndex(o.data);
1650
+ const { blockWidth: l, blockHeight: c } = this.rasterInfo.storageInfo, h = this.rasterInfo.storageInfo.pyramidScalingFactor, { width: u, height: m } = this.rasterInfo, f = [], d = this._getBandSegmentCount();
1651
+ let g = 0, p = -1;
1652
+ for (; g < this._storageIndex.length; ) {
1653
+ p++;
1654
+ const y = Math.ceil(u / l / h ** p) - 1, x = Math.ceil(m / c / h ** p) - 1;
1655
+ g += (y + 1) * (x + 1) * d * 4, f.push({ maxRow: x, maxCol: y, minCol: 0, minRow: 0 });
1656
+ }
1657
+ this.rasterInfo.storageInfo.blockBoundary = f, p > 0 && (this.rasterInfo.storageInfo.firstPyramidLevel = 1, this.rasterInfo.storageInfo.maximumPyramidLevel = p), this.updateTileInfo();
1658
+ }
1659
+ async fetchRawTile(i, e, n, t = {}) {
1660
+ const { blockWidth: s, blockHeight: a, blockBoundary: r } = this.rasterInfo.storageInfo, o = r[i];
1661
+ if (!o || o.maxRow < e || o.maxCol < n || o.minRow > e || o.minCol > n)
1662
+ return null;
1663
+ const { bandCount: l, pixelType: c } = this.rasterInfo, { ranges: h, actualTileWidth: u, actualTileHeight: m } = this._getTileLocation(i, e, n);
1664
+ if (!h || h.length === 0)
1665
+ return null;
1666
+ if (h[0].from === 0 && h[0].to === 0) {
1667
+ const M = new Uint8Array(s * a);
1668
+ return new Y({ width: s, height: a, pixels: null, mask: M, validPixelCount: 0 });
1669
+ }
1670
+ const { bandIds: f } = this.ioConfig, d = this._getBandSegmentCount(), g = [];
1671
+ let p = 0;
1672
+ for (p = 0; p < d; p++)
1673
+ f && !f.includes(p) || g.push(this.request(this._files.data, { range: { from: h[p].from, to: h[p].to }, responseType: "array-buffer", signal: t.signal }));
1674
+ const y = await Promise.all(g), x = y.map((M) => M.data.byteLength).reduce((M, P) => M + P), w = new Uint8Array(x), S = [];
1675
+ let T = 0;
1676
+ for (p = 0; p < d; p++)
1677
+ S.push(T), w.set(new Uint8Array(y[p].data), T), T += y[p].data.byteLength;
1678
+ const b = ie.get(this.rasterInfo.storageInfo.compression).decoderFormat, _ = await this.decodePixelBlock(w.buffer, { width: s, height: a, format: b, planes: (f == null ? void 0 : f.length) || l, offsets: S, pixelType: c });
1679
+ if (_ == null)
1680
+ return null;
1681
+ let { noDataValue: F } = this.rasterInfo;
1682
+ if (F != null && b !== "lerc" && !_.mask && (F = F[0], F != null)) {
1683
+ const M = _.width * _.height, P = new Uint8Array(M);
1684
+ if (Math.abs(F) > 1e24)
1685
+ for (p = 0; p < M; p++)
1686
+ Math.abs((_.pixels[0][p] - F) / F) > 1e-6 && (P[p] = 1);
1687
+ else
1688
+ for (p = 0; p < M; p++)
1689
+ _.pixels[0][p] !== F && (P[p] = 1);
1690
+ _.mask = P;
1691
+ }
1692
+ let R = 0, k = 0;
1693
+ if (u !== s || m !== a) {
1694
+ let M = _.mask;
1695
+ if (M)
1696
+ for (p = 0; p < a; p++)
1697
+ if (k = p * s, p < m)
1698
+ for (R = u; R < s; R++)
1699
+ M[k + R] = 0;
1700
+ else
1701
+ for (R = 0; R < s; R++)
1702
+ M[k + R] = 0;
1703
+ else
1704
+ for (M = new Uint8Array(s * a), _.mask = M, p = 0; p < m; p++)
1705
+ for (k = p * s, R = 0; R < u; R++)
1706
+ M[k + R] = 1;
1707
+ }
1708
+ return _;
1709
+ }
1710
+ _parseIndex(i) {
1711
+ if (i.byteLength % 16 > 0)
1712
+ throw new Error("invalid array buffer must be multiples of 16");
1713
+ let e, n, t, s, a, r;
1714
+ if (gi) {
1715
+ for (n = new Uint8Array(i), s = new ArrayBuffer(i.byteLength), t = new Uint8Array(s), a = 0; a < i.byteLength / 4; a++)
1716
+ for (r = 0; r < 4; r++)
1717
+ t[4 * a + r] = n[4 * a + 3 - r];
1718
+ e = new Uint32Array(s);
1719
+ } else
1720
+ e = new Uint32Array(i);
1721
+ return e;
1722
+ }
1723
+ _getBandSegmentCount() {
1724
+ return ie.get(this.rasterInfo.storageInfo.compression).isOneSegment ? 1 : this.rasterInfo.bandCount;
1725
+ }
1726
+ _getTileLocation(i, e, n) {
1727
+ const { blockWidth: t, blockHeight: s, pyramidScalingFactor: a } = this.rasterInfo.storageInfo, { width: r, height: o } = this.rasterInfo, l = this._getBandSegmentCount();
1728
+ let c, h, u, m = 0, f = 0;
1729
+ for (u = 0; u < i; u++)
1730
+ f = a ** u, c = Math.ceil(r / t / f), h = Math.ceil(o / s / f), m += c * h;
1731
+ f = a ** i, c = Math.ceil(r / t / f), h = Math.ceil(o / s / f), m += e * c + n, m *= 4 * l;
1732
+ const d = this._storageIndex.subarray(m, m + 4 * l);
1733
+ let g = 0, p = 0;
1734
+ const y = [];
1735
+ for (let x = 0; x < l; x++)
1736
+ g = d[4 * x] * 2 ** 32 + d[4 * x + 1], p = g + d[4 * x + 2] * 2 ** 32 + d[4 * x + 3], y.push({ from: g, to: p });
1737
+ return { ranges: y, actualTileWidth: n < c - 1 ? t : Math.ceil(r / f) - t * (c - 1), actualTileHeight: e < h - 1 ? s : Math.ceil(o / f) - s * (h - 1) };
1738
+ }
1739
+ _parseHeader(i) {
1740
+ const e = V(i, "MRF_META/Raster");
1741
+ if (!e)
1742
+ throw new O("mrf:open", "not a valid MRF format");
1743
+ const n = V(e, "Size"), t = parseInt(n.getAttribute("x"), 10), s = parseInt(n.getAttribute("y"), 10), a = parseInt(n.getAttribute("c"), 10), r = (Z(e, "Compression") || "none").toLowerCase();
1744
+ if (!ie.has(r))
1745
+ throw new O("mrf:open", "currently does not support compression " + r);
1746
+ const o = Z(e, "DataType") || "UInt8", l = Q.get(o);
1747
+ if (l == null)
1748
+ throw new O("mrf:open", "currently does not support pixel type " + o);
1749
+ const c = V(e, "PageSize"), h = parseInt(c.getAttribute("x"), 10), u = parseInt(c.getAttribute("y"), 10), m = V(e, "DataValues");
1750
+ let f, d;
1751
+ if (m && (d = m.getAttribute("NoData"), d != null && (f = d.trim().split(" ").map((M) => parseFloat(M)))), V(i, "MRF_META/CachedSource"))
1752
+ throw new O("mrf:open", "currently does not support MRF referencing other data files");
1753
+ const g = V(i, "MRF_META/GeoTags"), p = V(g, "BoundingBox");
1754
+ let y, x = !1;
1755
+ if (p != null) {
1756
+ const M = parseFloat(p.getAttribute("minx")), P = parseFloat(p.getAttribute("miny")), B = parseFloat(p.getAttribute("maxx")), C = parseFloat(p.getAttribute("maxy")), $ = Z(g, "Projection") || "";
1757
+ let D = L.WGS84;
1758
+ if ($ !== "LOCAL_CS[]")
1759
+ if ($.toLowerCase().startsWith("epsg:")) {
1760
+ const E = Number($.slice(5));
1761
+ isNaN(E) || E === 0 || (D = new L({ wkid: E }));
1762
+ } else
1763
+ D = Fe($) ?? L.WGS84;
1764
+ else
1765
+ x = !0, D = new L({ wkid: 3857 });
1766
+ y = new z(M, P, B, C), y.spatialReference = D;
1767
+ } else
1768
+ x = !0, y = new z({ xmin: -0.5, ymin: 0.5 - s, xmax: t - 0.5, ymax: 0.5, spatialReference: new L({ wkid: 3857 }) });
1769
+ const w = V(i, "MRF_META/Rsets"), S = parseInt((w == null ? void 0 : w.getAttribute("scale")) || "2", 10), T = y.spatialReference, b = new ge({ origin: new A({ x: y.xmin, y: y.ymax, spatialReference: T }), blockWidth: h, blockHeight: u, pyramidBlockWidth: h, pyramidBlockHeight: u, compression: r, pyramidScalingFactor: S }), _ = new A({ x: y.width / t, y: y.height / s, spatialReference: T }), F = new xe({ width: t, height: s, extent: y, isPseudoSpatialReference: x, spatialReference: T, bandCount: a, pixelType: l, pixelSize: _, noDataValue: f, storageInfo: b }), R = Z(i, "datafile"), k = Z(i, "IndexFile");
1770
+ return { rasterInfo: F, files: { mrf: this.url, index: k || this.url.replace(".mrf", ".idx"), data: R || this.url.replace(".mrf", ie.get(r).blobExtension) } };
1771
+ }
1772
+ async _fetchAuxiliaryData(i) {
1773
+ try {
1774
+ const { data: e } = await this.request(this.url + ".aux.xml", { responseType: "xml", signal: i == null ? void 0 : i.signal });
1775
+ return Ue(e);
1776
+ } catch {
1777
+ return null;
1778
+ }
1779
+ }
1780
+ };
1781
+ I([v()], ue.prototype, "_files", void 0), I([v()], ue.prototype, "_storageIndex", void 0), I([v({ type: String, json: { write: !0 } })], ue.prototype, "datasetFormat", void 0), ue = I([K("esri.layers.support.rasterIO.MRFRaster")], ue);
1782
+ const Is = ue, De = (i, e) => {
1783
+ var n;
1784
+ return (n = i.get(e)) == null ? void 0 : n.values;
1785
+ }, me = (i, e) => {
1786
+ var n, t;
1787
+ return (t = (n = i.get(e)) == null ? void 0 : n.values) == null ? void 0 : t[0];
1788
+ };
1789
+ let ae = class extends se {
1790
+ constructor() {
1791
+ super(...arguments), this._files = null, this._headerInfo = null, this._bufferSize = 1048576, this.datasetFormat = "TIFF";
1792
+ }
1793
+ async open(i) {
1794
+ var g, p, y, x;
1795
+ await this.init();
1796
+ const e = i ? i.signal : null, { data: n } = await this.request(this.url, { range: { from: 0, to: this._bufferSize }, responseType: "array-buffer", signal: e });
1797
+ if (!n)
1798
+ throw new O("tiffraster:open", "failed to open url " + this.url);
1799
+ this.datasetName = this.url.slice(this.url.lastIndexOf("/") + 1, this.url.lastIndexOf("."));
1800
+ const { littleEndian: t, firstIFDPos: s, isBigTiff: a } = xi(n), r = [];
1801
+ await this._readIFDs(r, n, t, s, 0, a ? 8 : 4, e);
1802
+ const { imageInfo: o, rasterInfo: l } = this._parseIFDs(r), c = wi(r), h = Ii(r);
1803
+ if (this._headerInfo = { littleEndian: t, isBigTiff: a, ifds: r, pyramidIFDs: c, maskIFDs: h, ...o }, this._set("rasterInfo", l), !o.isSupported)
1804
+ throw new O("tiffraster:open", "this tiff is not supported: " + o.message);
1805
+ if (!o.tileWidth)
1806
+ throw new O("tiffraster:open", "none-tiled tiff is not optimized for access, convert to COG and retry.");
1807
+ l.isPseudoSpatialReference && le.getLogger(this).warn("The spatial reference for this tiff is unsupported. Only EPSG spatial reference codes and Esri WKTs are supported.");
1808
+ const u = (p = (g = r[0].get("PREDICTOR")) == null ? void 0 : g.values) == null ? void 0 : p[0];
1809
+ if (((x = (y = r[0].get("SAMPLEFORMAT")) == null ? void 0 : y.values) == null ? void 0 : x[0]) === 3 && u === 2)
1810
+ throw new O("tiffraster:open", "unsupported horizontal difference encoding. Predictor=3 is supported for floating point data");
1811
+ const { skipMapInfo: f, skipExtensions: d = [] } = this.ioConfig;
1812
+ if (!d.includes("aux.xml") && !f) {
1813
+ const w = await this._fetchAuxiliaryMetaData(i);
1814
+ w != null && this._processPAMInfo(w, l);
1815
+ }
1816
+ d.includes("vat.dbf") || l.bandCount !== 1 || l.pixelType !== "u8" || f || (l.attributeTable = await this._fetchAuxiliaryTable(i), l.attributeTable != null && (l.keyProperties.DataType = "thematic")), f && this.updateImageSpaceRasterInfo(l), this.updateTileInfo();
1817
+ }
1818
+ async fetchRawTile(i, e, n, t = {}) {
1819
+ var a;
1820
+ if (!((a = this._headerInfo) != null && a.isSupported) || this.isBlockOutside(i, e, n))
1821
+ return null;
1822
+ const s = await this._fetchRawTiffTile(i, e, n, !1, t);
1823
+ if (s != null && this._headerInfo.hasMaskBand) {
1824
+ const r = await this._fetchRawTiffTile(i, e, n, !0, t);
1825
+ r != null && r.pixels[0] instanceof Uint8Array && (s.mask = r.pixels[0]);
1826
+ }
1827
+ return s;
1828
+ }
1829
+ _parseIFDs(i) {
1830
+ var P, B;
1831
+ const e = bi(i), { width: n, height: t, tileWidth: s, tileHeight: a, planes: r, pixelType: o, compression: l, firstPyramidLevel: c, maximumPyramidLevel: h, pyramidBlockWidth: u, pyramidBlockHeight: m, tileBoundary: f, affine: d, metadata: g } = e, p = ((P = e.extent.spatialReference) == null ? void 0 : P.wkt) || ((B = e.extent.spatialReference) == null ? void 0 : B.wkid);
1832
+ let y = Fe(p), x = !!e.isPseudoGeographic;
1833
+ y == null && (x = !0, y = new L({ wkid: 3857 }));
1834
+ const w = new z({ ...e.extent, spatialReference: y }), S = new A(w ? { x: w.xmin, y: w.ymax, spatialReference: y } : { x: 0, y: 0 }), T = new ge({ blockWidth: s, blockHeight: a, pyramidBlockWidth: u, pyramidBlockHeight: m, compression: l, origin: S, firstPyramidLevel: c, maximumPyramidLevel: h, blockBoundary: f }), b = new A({ x: (w.xmax - w.xmin) / n, y: (w.ymax - w.ymin) / t, spatialReference: y }), _ = g ? { BandProperties: g.bandProperties, DataType: g.dataType } : {};
1835
+ let F = null;
1836
+ const R = me(i[0], "PHOTOMETRICINTERPRETATION"), k = De(i[0], "COLORMAP");
1837
+ if (R <= 3 && (k == null ? void 0 : k.length) > 3 && k.length % 3 == 0) {
1838
+ F = [];
1839
+ const C = k.length / 3;
1840
+ for (let $ = 0; $ < C; $++)
1841
+ F.push([$, k[$] >>> 8, k[$ + C] >>> 8, k[$ + 2 * C] >>> 8]);
1842
+ }
1843
+ const M = new xe({ width: n, height: t, bandCount: r, pixelType: o, pixelSize: b, storageInfo: T, spatialReference: y, isPseudoSpatialReference: x, keyProperties: _, extent: w, colormap: F, statistics: g ? g.statistics : null });
1844
+ return d != null && d.length && (M.nativeExtent = new z({ xmin: -0.5, ymin: 0.5 - t, xmax: n - 0.5, ymax: 0.5, spatialReference: y }), M.transform = new je({ polynomialOrder: 1, forwardCoefficients: [d[2] + d[0] / 2, d[5] - d[3] / 2, d[0], d[3], -d[1], -d[4]] }), M.extent = M.transform.forwardTransform(M.nativeExtent), M.pixelSize = new A({ x: (w.xmax - w.xmin) / n, y: (w.ymax - w.ymin) / t, spatialReference: y }), T.origin.x = -0.5, T.origin.y = 0.5), { imageInfo: e, rasterInfo: M };
1845
+ }
1846
+ _processPAMInfo(i, e) {
1847
+ if (e.statistics = i.statistics ?? e.statistics, e.histograms = i.histograms, i.histograms && e.statistics == null && (e.statistics = Ge(i.histograms)), i.transform && e.transform == null) {
1848
+ e.transform = i.transform, e.nativeExtent = e.extent;
1849
+ const n = e.transform.forwardTransform(e.nativeExtent);
1850
+ e.pixelSize = new A({ x: (n.xmax - n.xmin) / e.width, y: (n.ymax - n.ymin) / e.height, spatialReference: e.spatialReference }), e.extent = n;
1851
+ }
1852
+ e.isPseudoSpatialReference && i.spatialReference && (e.spatialReference = i.spatialReference, e.extent.spatialReference = e.nativeExtent.spatialReference = e.storageInfo.origin.spatialReference = e.spatialReference);
1853
+ }
1854
+ async _readIFDs(i, e, n, t, s, a = 4, r) {
1855
+ if (!t)
1856
+ return null;
1857
+ (t >= e.byteLength || t < 0) && (e = (await this.request(this.url, { range: { from: t + s, to: t + s + this._bufferSize }, responseType: "array-buffer", signal: r })).data, s = t + s, t = 0);
1858
+ const o = await this._readIFD(e, n, t, s, we.tiffTags, a, r);
1859
+ if (i.push(o.ifd), !o.nextIFD)
1860
+ return null;
1861
+ await this._readIFDs(i, e, n, o.nextIFD - s, s, a, r);
1862
+ }
1863
+ async _readIFD(i, e, n, t, s = we.tiffTags, a = 4, r) {
1864
+ var l, c;
1865
+ if (!i)
1866
+ return null;
1867
+ const o = Si(i, e, n, t, s, a);
1868
+ if (o.success) {
1869
+ const h = [];
1870
+ if ((l = o.ifd) == null || l.forEach((u) => {
1871
+ u.values || h.push(u);
1872
+ }), h.length > 0) {
1873
+ const u = h.map((f) => f.offlineOffsetSize).filter(Be), m = Math.min.apply(null, u.map((f) => f[0]));
1874
+ if (Math.min.apply(null, u.map((f) => f[0] + f[1])) - m <= this._bufferSize) {
1875
+ const { data: f } = await this.request(this.url, { range: { from: m, to: m + this._bufferSize }, responseType: "array-buffer", signal: r });
1876
+ i = f, t = m, h.forEach((d) => Ri(i, e, d, t));
1877
+ }
1878
+ }
1879
+ if ((c = o.ifd) != null && c.has("GEOKEYDIRECTORY")) {
1880
+ const u = o.ifd.get("GEOKEYDIRECTORY"), m = u == null ? void 0 : u.values;
1881
+ if (m && m.length > 4) {
1882
+ const f = m[0] + "." + m[1] + "." + m[2], d = await this._readIFD(i, e, u.valueOffset + 6 - t, t, we.geoKeys, 2, r);
1883
+ u.data = d.ifd, u.data && u.data.set("GEOTIFFVersion", { id: 0, type: 2, valueCount: 1, valueOffset: null, values: [f] });
1884
+ }
1885
+ }
1886
+ return o;
1887
+ }
1888
+ if (o.requiredBufferSize && o.requiredBufferSize !== i.byteLength)
1889
+ return (i = (await this.request(this.url, { range: { from: t, to: t + o.requiredBufferSize + 4 }, responseType: "array-buffer", signal: r })).data).byteLength < o.requiredBufferSize ? null : this._readIFD(i, e, 0, t, we.tiffTags, 4, r);
1890
+ }
1891
+ async _fetchRawTiffTile(i, e, n, t, s = {}) {
1892
+ const a = this._getTileLocation(i, e, n, t);
1893
+ if (!a)
1894
+ return null;
1895
+ const { ranges: r, actualTileWidth: o, actualTileHeight: l, ifd: c } = a, h = r.map((b) => this.request(this.url, { range: b, responseType: "array-buffer", signal: s.signal })), u = await Promise.all(h), m = u.map((b) => b.data.byteLength).reduce((b, _) => b + _), f = u.length === 1 ? u[0].data : new ArrayBuffer(m), d = [0], g = [0];
1896
+ if (u.length > 1) {
1897
+ const b = new Uint8Array(f);
1898
+ for (let _ = 0, F = 0; _ < u.length; _++) {
1899
+ const R = u[_].data;
1900
+ b.set(new Uint8Array(R), F), d[_] = F, F += R.byteLength, g[_] = R.byteLength;
1901
+ }
1902
+ }
1903
+ const { blockWidth: p, blockHeight: y } = this.getBlockWidthHeight(i), x = await this.decodePixelBlock(f, { format: "tiff", customOptions: { headerInfo: this._headerInfo, ifd: c, offsets: d, sizes: g }, width: p, height: y, planes: null, pixelType: null });
1904
+ if (x == null)
1905
+ return null;
1906
+ let w, S, T;
1907
+ if (o !== p || l !== y) {
1908
+ let b = x.mask;
1909
+ if (b)
1910
+ for (w = 0; w < y; w++)
1911
+ if (T = w * p, w < l)
1912
+ for (S = o; S < p; S++)
1913
+ b[T + S] = 0;
1914
+ else
1915
+ for (S = 0; S < p; S++)
1916
+ b[T + S] = 0;
1917
+ else
1918
+ for (b = new Uint8Array(p * y), x.mask = b, w = 0; w < l; w++)
1919
+ for (T = w * p, S = 0; S < o; S++)
1920
+ b[T + S] = 1;
1921
+ }
1922
+ return x;
1923
+ }
1924
+ _getTileLocation(i, e, n, t = !1) {
1925
+ const { firstPyramidLevel: s, blockBoundary: a } = this.rasterInfo.storageInfo, r = i === 0 ? 0 : i - (s - 1), { _headerInfo: o } = this;
1926
+ if (!o)
1927
+ return null;
1928
+ const l = t ? o.maskIFDs[r] : r === 0 ? o == null ? void 0 : o.ifds[0] : o == null ? void 0 : o.pyramidIFDs[r - 1];
1929
+ if (!l)
1930
+ return null;
1931
+ const c = vi(l, o), h = De(l, "TILEOFFSETS");
1932
+ if (h === void 0)
1933
+ return null;
1934
+ const u = De(l, "TILEBYTECOUNTS"), { minRow: m, minCol: f, maxRow: d, maxCol: g } = a[r];
1935
+ if (e > d || n > g || e < m || n < f)
1936
+ return null;
1937
+ const p = me(l, "IMAGEWIDTH"), y = me(l, "IMAGELENGTH"), x = me(l, "TILEWIDTH"), w = me(l, "TILELENGTH"), S = [];
1938
+ if (c) {
1939
+ const { bandCount: T } = this.rasterInfo;
1940
+ for (let b = 0; b < T; b++) {
1941
+ const _ = b * (d + 1) * (g + 1) + e * (g + 1) + n;
1942
+ S[b] = { from: h[_], to: h[_] + u[_] - 1 };
1943
+ }
1944
+ } else {
1945
+ const T = e * (g + 1) + n;
1946
+ S.push({ from: h[T], to: h[T] + u[T] - 1 });
1947
+ }
1948
+ for (let T = 0; T < S.length; T++)
1949
+ if (S[T].from == null || !S[T].to || S[T].to < 0)
1950
+ return null;
1951
+ return { ranges: S, ifd: l, actualTileWidth: n === g && p % x || x, actualTileHeight: e === d && y % w || w };
1952
+ }
1953
+ async _fetchAuxiliaryMetaData(i) {
1954
+ try {
1955
+ const { data: e } = await this.request(this.url + ".aux.xml", { responseType: "xml", signal: i == null ? void 0 : i.signal });
1956
+ return Ue(e);
1957
+ } catch {
1958
+ return null;
1959
+ }
1960
+ }
1961
+ async _fetchAuxiliaryTable(i) {
1962
+ try {
1963
+ const { data: e } = await this.request(this.url + ".vat.dbf", { responseType: "array-buffer", signal: i == null ? void 0 : i.signal }), n = It.parse(e);
1964
+ return n != null && n.recordSet ? _e.fromJSON(n.recordSet) : null;
1965
+ } catch {
1966
+ return null;
1967
+ }
1968
+ }
1969
+ };
1970
+ I([v()], ae.prototype, "_files", void 0), I([v()], ae.prototype, "_headerInfo", void 0), I([v()], ae.prototype, "_bufferSize", void 0), I([v({ type: String, json: { write: !0 } })], ae.prototype, "datasetFormat", void 0), ae = I([K("esri.layers.support.rasterDatasets.TIFFRaster")], ae);
1971
+ const bs = ae, j = /* @__PURE__ */ new Map();
1972
+ j.set("CRF", { desc: "Cloud Raster Format", constructor: ls }), j.set("MRF", { desc: "Meta Raster Format", constructor: Is }), j.set("TIFF", { desc: "GeoTIFF", constructor: bs }), j.set("RasterTileServer", { desc: "Raster Tile Server", constructor: ws }), j.set("JPG", { desc: "JPG Raster Format", constructor: Re }), j.set("PNG", { desc: "PNG Raster Format", constructor: Re }), j.set("GIF", { desc: "GIF Raster Format", constructor: Re }), j.set("BMP", { desc: "BMP Raster Format", constructor: Re }), j.set("CovJSON", { desc: "COVJSON Raster Format", constructor: ps }), j.set("MEMORY", { desc: "In Memory Raster Format", constructor: qe });
1973
+ class Ne {
1974
+ static get supportedFormats() {
1975
+ const e = /* @__PURE__ */ new Set();
1976
+ return j.forEach((n, t) => e.add(t)), e;
1977
+ }
1978
+ static async open(e) {
1979
+ var u;
1980
+ const { url: n, ioConfig: t, source: s, sourceJSON: a } = e;
1981
+ let r = e.datasetFormat ?? (t == null ? void 0 : t.datasetFormat);
1982
+ r == null && (n.includes(".") ? r = n.slice(n.lastIndexOf(".") + 1).toUpperCase() : ((u = s == null ? void 0 : s.type) == null ? void 0 : u.toLowerCase()) === "coverage" ? r = "CovJSON" : s != null && s.extent && s.pixelblocks && (r = "MEMORY")), r === "OVR" || r === "TIF" ? r = "TIFF" : r === "JPG" || r === "JPEG" || r === "JFIF" ? r = "JPG" : r === "COVJSON" && (r = "CovJSON"), n.toLowerCase().includes("/imageserver") && !n.toLowerCase().includes("/wcsserver") && (r = "RasterTileServer");
1983
+ const o = { url: n, source: s, sourceJSON: a, datasetFormat: r, ioConfig: t ?? { bandIds: null, sampling: null } };
1984
+ if (Object.keys(o).forEach((m) => {
1985
+ o[m] == null && delete o[m];
1986
+ }), r) {
1987
+ if (!this.supportedFormats.has(r))
1988
+ throw new O("rasterfactory:open", "not a supported format " + r);
1989
+ if (r === "CRF" && !(t != null && t.enableCRF))
1990
+ throw new O("rasterfactory:open", `cannot open raster: ${n}`);
1991
+ const m = new (j.get(r)).constructor(o);
1992
+ return await m.open({ signal: e.signal }), m;
1993
+ }
1994
+ const l = Array.from(j.keys()).filter((m) => m !== "CovJSON" && m !== "Memory");
1995
+ let c = 0;
1996
+ const h = () => {
1997
+ if (r = l[c++], !r || r === "CRF" && !(t != null && t.enableCRF))
1998
+ return null;
1999
+ const m = new (j.get(r)).constructor(o);
2000
+ return m.open({ signal: e.signal }).then(() => m).catch(() => h());
2001
+ };
2002
+ return h();
2003
+ }
2004
+ static register(e, n, t) {
2005
+ j.has(e.toUpperCase()) || j.set(e.toUpperCase(), { desc: n, constructor: t });
2006
+ }
2007
+ }
2008
+ let J = class extends Xt(Vi(ji(qi(Yt(as(Xi(Vt(Ui(Ut(At(qt))))))))))) {
2009
+ constructor(...i) {
2010
+ super(...i), this._primaryRasters = [], this.bandIds = null, this.interpolation = null, this.legendEnabled = !0, this.isReference = null, this.listMode = "show", this.sourceJSON = null, this.version = null, this.type = "imagery-tile", this.operationalLayerType = "ArcGISTiledImageServiceLayer", this.popupEnabled = !0, this.popupTemplate = null, this.fields = null, this.source = void 0, this._debouncedSaveOperations = zt(async (e, n, t) => {
2011
+ const { save: s, saveAs: a } = await import("./imageryUtils-31c938b0.js");
2012
+ switch (e) {
2013
+ case be.SAVE:
2014
+ return s(this, n);
2015
+ case be.SAVE_AS:
2016
+ return a(this, t, n);
2017
+ }
2018
+ });
2019
+ }
2020
+ normalizeCtorArgs(i, e) {
2021
+ return typeof i == "string" ? { url: i, ...e } : i;
2022
+ }
2023
+ load(i) {
2024
+ const e = i != null ? i.signal : null;
2025
+ return this.addResolvingPromise(this.loadFromPortal({ supportedTypes: ["Image Service"] }, i).catch(Lt).then(() => this._openRaster(e))), Promise.resolve(this);
2026
+ }
2027
+ get defaultPopupTemplate() {
2028
+ return this.createPopupTemplate();
2029
+ }
2030
+ get rasterFields() {
2031
+ var o;
2032
+ const i = [new he({ name: "Raster.ServicePixelValue", alias: "Pixel Value", domain: null, editable: !1, length: 50, type: "string" }), new he({ name: "Raster.ServicePixelValue.Raw", alias: "Raw Pixel Value", domain: null, editable: !1, length: 50, type: "string" })], { serviceRasterInfo: e } = this, n = e == null ? void 0 : e.attributeTable, t = n != null ? n.fields : null, s = "Raster.";
2033
+ if (t) {
2034
+ const l = t.filter((c) => c.type !== "oid" && c.name.toLowerCase() !== "value").map((c) => {
2035
+ const h = c.clone();
2036
+ return h.name = s + c.name, h;
2037
+ });
2038
+ i.push(...l);
2039
+ }
2040
+ const a = e == null ? void 0 : e.dataType, r = e == null ? void 0 : e.multidimensionalInfo;
2041
+ if ((a === "vector-magdir" || a === "vector-uv") && r != null) {
2042
+ const l = (o = r.variables[0].unit) == null ? void 0 : o.trim(), c = "Magnitude" + (l ? ` (${l})` : "");
2043
+ i.push(new he({ name: "Raster.Magnitude", alias: c, domain: null, editable: !1, type: "double" })), i.push(new he({ name: "Raster.Direction", alias: "Direction (°)", domain: null, editable: !1, type: "double" }));
2044
+ }
2045
+ return i;
2046
+ }
2047
+ createPopupTemplate(i) {
2048
+ const { rasterFields: e } = this, n = new Set(e.map(({ name: t }) => t).filter((t) => t.toLowerCase() !== "raster.servicepixelvalue.raw"));
2049
+ return Ki({ fields: e, title: this.title }, { ...i, visibleFieldNames: n });
2050
+ }
2051
+ async generateRasterInfo(i, e) {
2052
+ if (!(i = Le(Ee, i)))
2053
+ return this.serviceRasterInfo;
2054
+ try {
2055
+ const { rasterInfo: n } = await this._openFunctionRaster(i, e);
2056
+ return n;
2057
+ } catch (n) {
2058
+ throw n instanceof O ? n : new O("imagery-tile-layer", "the given raster function is not supported");
2059
+ }
2060
+ }
2061
+ async save(i) {
2062
+ return this._debouncedSaveOperations(be.SAVE, i);
2063
+ }
2064
+ async saveAs(i, e) {
2065
+ return this._debouncedSaveOperations(be.SAVE_AS, e, i);
2066
+ }
2067
+ write(i, e) {
2068
+ const n = this._primaryRasters[0] ?? this.raster;
2069
+ if (this.loaded ? n.datasetFormat === "RasterTileServer" && (n.tileType === "Raster" || n.tileType === "Map") : this.url && /\/ImageServer(\/|\/?$)/i.test(this.url))
2070
+ return super.write(i, e);
2071
+ if (e != null && e.messages) {
2072
+ const t = `${e.origin}/${e.layerContainerType || "operational-layers"}`;
2073
+ e.messages.push(new O("layer:unsupported", `Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${t}'`, { layer: this }));
2074
+ }
2075
+ return null;
2076
+ }
2077
+ async _openRaster(i) {
2078
+ let e = !1;
2079
+ if (this.raster)
2080
+ await this._openFromRaster(this.raster, i), e = this.raster.datasetFormat === "Function";
2081
+ else {
2082
+ const { url: t, rasterFunction: s, source: a } = this;
2083
+ if (!t && !a)
2084
+ throw new O("imagery-tile-layer:open", "missing url or source parameter");
2085
+ a ? await this._openFromSource(a, i) : s ? await this._openFromUrlWithRasterFunction(t, s, i) : await this._openFromUrl(t, i);
2086
+ }
2087
+ const n = this.raster.rasterInfo;
2088
+ if (!n)
2089
+ throw new O("imagery-tile-layer:load", "cannot load resources on " + this.url);
2090
+ if (this._set("serviceRasterInfo", e ? n : this._primaryRasters[0].rasterInfo), this._set("spatialReference", n.spatialReference), this.sourceJSON = this.sourceJSON || this.raster.sourceJSON, this.sourceJSON != null) {
2091
+ const t = this.raster.tileType === "Map" && this.sourceJSON.minLOD != null && this.sourceJSON.maxLOD != null ? this.sourceJSON : { ...this.sourceJSON, minScale: 0, maxScale: 0 };
2092
+ this.read(t, { origin: "service" });
2093
+ } else
2094
+ this.read({ tileInfo: this.serviceRasterInfo.storageInfo.tileInfo.toJSON() }, { origin: "service" });
2095
+ this.title || (this.title = this.raster.datasetName), this.raster.tileType === "Map" && (this.popupEnabled = !1), this._configDefaultSettings(), this.addHandles(Ht(() => this.customParameters, (t) => {
2096
+ this.raster && (this.raster.ioConfig.customFetchParameters = t);
2097
+ }));
2098
+ }
2099
+ async _openFromRaster(i, e) {
2100
+ i.rasterInfo || await i.open({ signal: e }), this._primaryRasters = i.datasetFormat === "Function" ? i.primaryRasters.rasters : [i], this.url || (this.url = this._primaryRasters[0].url);
2101
+ }
2102
+ async _openFromUrlWithRasterFunction(i, e, n) {
2103
+ const t = [i];
2104
+ e && Gi(e.toJSON(), t);
2105
+ const s = await Promise.all(t.map((r) => Ne.open({ url: r, sourceJSON: this.sourceJSON, ioConfig: { sampling: "closest", ...this.ioConfig, customFetchParameters: this.customParameters }, signal: n }))), a = s.findIndex((r) => r == null);
2106
+ if (a > -1)
2107
+ throw new O("imagery-tile-layer:open", `cannot open raster: ${t[a]}`);
2108
+ return this._primaryRasters = s, this._initializeWithFunctionRaster(e);
2109
+ }
2110
+ async _openFromUrl(i, e) {
2111
+ const n = await Ne.open({ url: i, sourceJSON: this.sourceJSON, ioConfig: { sampling: "closest", ...this.ioConfig, customFetchParameters: this.customParameters }, signal: e });
2112
+ if (n == null)
2113
+ throw new O("imagery-tile-layer:open", `cannot open raster: ${i}`);
2114
+ this._primaryRasters = [n], this.raster = n;
2115
+ }
2116
+ async _openFromSource(i, e) {
2117
+ var a;
2118
+ const n = "the tiled imagery data source is not supported", t = ((a = i.type) == null ? void 0 : a.toLowerCase()) === "coverage" ? "CovJSON" : i.extent && i.pixelBlock ? "MEMORY" : null;
2119
+ if (!t)
2120
+ throw new O("imagery-tile-layer:open", n);
2121
+ t === "MEMORY" && (i = { extent: i.extent, pixelBlocks: [i.pixelBlock] });
2122
+ const s = await Ne.open({ url: "", source: i, datasetFormat: t, ioConfig: { sampling: "closest", ...this.ioConfig, customFetchParameters: this.customParameters }, signal: e });
2123
+ if (s == null)
2124
+ throw new O("imagery-tile-layer:open", n);
2125
+ this._primaryRasters = [s], this.rasterFunction ? await this._initializeWithFunctionRaster(this.rasterFunction) : this.raster = s;
2126
+ }
2127
+ async _openFunctionRaster(i, e) {
2128
+ var a;
2129
+ const n = { raster: this._primaryRasters[0] };
2130
+ this._primaryRasters.length > 1 && this._primaryRasters.forEach((r) => n[r.url] = r);
2131
+ const t = xt(((a = i.functionDefinition) == null ? void 0 : a.toJSON()) ?? i.toJSON(), n), s = new wt({ rasterFunction: t });
2132
+ return await s.open(e), s;
2133
+ }
2134
+ async _initializeWithFunctionRaster(i, e) {
2135
+ try {
2136
+ this.raster = await this._openFunctionRaster(i, e);
2137
+ } catch (n) {
2138
+ n instanceof O && le.getLogger(this).error("imagery-tile-layer:open", n.message), le.getLogger(this).warn("imagery-tile-layer:open", "the raster function cannot be applied and is removed"), this._set("rasterFunction", null), this.raster = this._primaryRasters[0];
2139
+ }
2140
+ }
2141
+ };
2142
+ I([v({ clonable: !1 })], J.prototype, "_primaryRasters", void 0), I([v({ type: [Wt], json: { write: { overridePolicy() {
2143
+ var i;
2144
+ return { enabled: !this.loaded || this.raster.tileType === "Raster" || ((i = this.bandIds) == null ? void 0 : i.join(",")) !== "0,1,2" };
2145
+ } } } })], J.prototype, "bandIds", void 0), I([v({ json: { write: { overridePolicy() {
2146
+ return { enabled: !this.loaded || this.raster.tileType === "Raster" || this.interpolation !== "bilinear" };
2147
+ } } } }), Gt(oi)], J.prototype, "interpolation", void 0), I([v(li)], J.prototype, "legendEnabled", void 0), I([v({ type: Boolean, json: { read: !1, write: { enabled: !0, overridePolicy: () => ({ enabled: !1 }) } } })], J.prototype, "isReference", void 0), I([v({ type: ["show", "hide"] })], J.prototype, "listMode", void 0), I([v({ json: { read: !0, write: !0 } })], J.prototype, "blendMode", void 0), I([v()], J.prototype, "sourceJSON", void 0), I([v({ readOnly: !0, json: { origins: { service: { read: { source: "currentVersion" } } } } })], J.prototype, "version", void 0), I([v({ readOnly: !0, json: { read: !1 } })], J.prototype, "type", void 0), I([v({ type: ["ArcGISTiledImageServiceLayer"] })], J.prototype, "operationalLayerType", void 0), I([v({ type: Boolean, value: !0, json: { read: { source: "disablePopup", reader: (i, e) => !e.disablePopup }, write: { target: "disablePopup", overridePolicy() {
2148
+ return { enabled: !this.loaded || this.raster.tileType === "Raster" };
2149
+ }, writer(i, e, n) {
2150
+ e[n] = !i;
2151
+ } } } })], J.prototype, "popupEnabled", void 0), I([v({ type: jt, json: { read: { source: "popupInfo" }, write: { target: "popupInfo", overridePolicy() {
2152
+ return { enabled: !this.loaded || this.raster.tileType === "Raster" };
2153
+ } } } })], J.prototype, "popupTemplate", void 0), I([v({ readOnly: !0 })], J.prototype, "defaultPopupTemplate", null), I([v({ readOnly: !0, type: [he] })], J.prototype, "fields", void 0), I([v({ readOnly: !0, type: [he] })], J.prototype, "rasterFields", null), I([v({ constructOnly: !0 })], J.prototype, "source", void 0), J = I([K("esri.layers.ImageryTileLayer")], J);
2154
+ const In = J;
2155
+ export {
2156
+ In as default
2157
+ };