@arcgis/core 4.34.0-next.88 → 4.34.0-next.89

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 (227) hide show
  1. package/PopupTemplate.js +1 -1
  2. package/arcade/Dictionary.js +1 -1
  3. package/arcade/Feature.js +1 -1
  4. package/arcade/Pixel.js +1 -1
  5. package/arcade/Voxel.js +1 -1
  6. package/arcade/containerUtils.js +1 -1
  7. package/arcade/featureSetUtils.js +1 -1
  8. package/arcade/featureset/actions/GroupBy.js +1 -1
  9. package/arcade/featureset/actions/OrderBy.js +1 -1
  10. package/arcade/featureset/support/FeatureSet.js +1 -1
  11. package/arcade/functions/date.js +1 -1
  12. package/arcade/functions/feature.js +1 -1
  13. package/arcade/functions/featuresetbase.js +1 -1
  14. package/arcade/functions/featuresetstats.js +1 -1
  15. package/arcade/functions/featuresetstring.js +1 -1
  16. package/arcade/functions/fieldStats.js +1 -1
  17. package/arcade/functions/geometry.js +1 -1
  18. package/arcade/functions/maths.js +1 -1
  19. package/arcade/functions/string.js +1 -1
  20. package/arcade/languageUtils.js +1 -1
  21. package/assets/esri/core/workers/RemoteClient.js +1 -1
  22. package/assets/esri/core/workers/chunks/{ed8863c3d334f438b625.js → 0037abf0a82d1ed32e91.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{d7fc8ea2ff527a09f4b9.js → 0296ebe8e37e30af771c.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{39a1f361bb69073af765.js → 04dbdaa63c950f32b8f0.js} +1 -1
  25. package/assets/esri/core/workers/chunks/05aac984cbbadb5f6aa0.js +1 -0
  26. package/assets/esri/core/workers/chunks/0fadd1defbb6743dacdc.js +1 -0
  27. package/assets/esri/core/workers/chunks/{0f05425954578ac796ec.js → 135142f3cbfaf24949bc.js} +1 -1
  28. package/assets/esri/core/workers/chunks/2b2f1fcd50dea017d891.js +1 -0
  29. package/assets/esri/core/workers/chunks/{9ca55d33ae4bf25e8edd.js → 2e1cc11462846febb3b2.js} +1 -1
  30. package/assets/esri/core/workers/chunks/300b96f0f8e34b4a5d8b.js +1 -0
  31. package/assets/esri/core/workers/chunks/37b5007660535f1c91c6.js +1 -0
  32. package/assets/esri/core/workers/chunks/{2dc88379ee94fabdaf52.js → 39a5863355cccaabd2d6.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{f3ee035fa7bf638c8e60.js → 3d68a650a1f944ec5171.js} +1 -1
  34. package/assets/esri/core/workers/chunks/47c0c16c1e995a441ec2.js +1 -0
  35. package/assets/esri/core/workers/chunks/48913b944c28343816ac.js +1 -0
  36. package/assets/esri/core/workers/chunks/{4d4db6854aff7656f6e1.js → 4dd4b19c410026233999.js} +1 -1
  37. package/assets/esri/core/workers/chunks/52121179d4f9833008ec.js +1 -0
  38. package/assets/esri/core/workers/chunks/58e2652810143f509fe1.js +1 -0
  39. package/assets/esri/core/workers/chunks/{97489bf16a1d327992b2.js → 595593dd03bcfba795c8.js} +11 -16
  40. package/assets/esri/core/workers/chunks/59e27818cb68f0285d54.js +1 -0
  41. package/assets/esri/core/workers/chunks/620a94b54be3ed78350d.js +1 -0
  42. package/assets/esri/core/workers/chunks/6f29951f5a2da068b257.js +1 -0
  43. package/assets/esri/core/workers/chunks/71c6c0b26253c4ca1b68.js +1 -0
  44. package/assets/esri/core/workers/chunks/{1c1b0cc91fe9cb3fec61.js → 71df48968d6cdc736458.js} +1 -1
  45. package/assets/esri/core/workers/chunks/779ee975efebb838b5d6.js +1 -0
  46. package/assets/esri/core/workers/chunks/7a240ab31d9ff2d2c5af.js +1 -0
  47. package/assets/esri/core/workers/chunks/834985ec601623df34a1.js +1 -0
  48. package/assets/esri/core/workers/chunks/{5dee8c0c60ced791e57f.js → 84a556dafd583635ad5e.js} +1 -1
  49. package/assets/esri/core/workers/chunks/8be9fa12e854a83062c3.js +1 -0
  50. package/assets/esri/core/workers/chunks/8f4cfef97716c3502b0f.js +1 -0
  51. package/assets/esri/core/workers/chunks/{65ec21d29e8563fdbc55.js → 94c9d3094c93f7760433.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{177840d5f0076c0de46b.js → 96de78f9994207aa7201.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{366db86914a63e6d0c68.js → 978ffde9ebebf5c83aea.js} +1 -1
  54. package/assets/esri/core/workers/chunks/a1abe9865d66789bd5af.js +1 -0
  55. package/assets/esri/core/workers/chunks/{257fd65786feb5951b90.js → a96e58ed9a4a2329ee53.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{0074f1836d7ff69ff6ec.js → aa778e5d7db40d9b9b4a.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{c78de6dd6c10280cee69.js → baa48614d9567d5f240d.js} +1 -1
  58. package/assets/esri/core/workers/chunks/c3010d783506f8410f99.js +1 -0
  59. package/assets/esri/core/workers/chunks/c55c096669677321a227.js +1 -0
  60. package/assets/esri/core/workers/chunks/c86ca87959f04075e834.js +1 -0
  61. package/assets/esri/core/workers/chunks/c954d281038f6bf80232.js +1 -0
  62. package/assets/esri/core/workers/chunks/{a48f980c1531805db73b.js → d1fc2c6e95fe2572d297.js} +1 -1
  63. package/assets/esri/core/workers/chunks/{fc5ac54aab66562c8463.js → d51aabb9b950f49df183.js} +1 -1
  64. package/assets/esri/core/workers/chunks/{639d856cd217914dfe1f.js → de34c21d3e6913befe5a.js} +1 -1
  65. package/assets/esri/core/workers/chunks/e99fc64b67bb0c71dc34.js +1 -0
  66. package/assets/esri/core/workers/chunks/f6806780ca2aa591475a.js +1 -0
  67. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ar.json +1 -0
  68. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_bg.json +1 -0
  69. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_bs.json +1 -0
  70. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ca.json +1 -0
  71. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_cs.json +1 -0
  72. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_da.json +1 -0
  73. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_de.json +1 -0
  74. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_el.json +1 -0
  75. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_es.json +1 -0
  76. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_et.json +1 -0
  77. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_fi.json +1 -0
  78. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_fr.json +1 -0
  79. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_he.json +1 -0
  80. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_hr.json +1 -0
  81. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_hu.json +1 -0
  82. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_id.json +1 -0
  83. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_it.json +1 -0
  84. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ja.json +1 -0
  85. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ko.json +1 -0
  86. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_lt.json +1 -0
  87. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_lv.json +1 -0
  88. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_nl.json +1 -0
  89. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_no.json +1 -0
  90. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_pl.json +1 -0
  91. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_pt-BR.json +1 -0
  92. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_pt-PT.json +1 -0
  93. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ro.json +1 -0
  94. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ru.json +1 -0
  95. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_sk.json +1 -0
  96. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_sl.json +1 -0
  97. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_sr.json +1 -0
  98. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_sv.json +1 -0
  99. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_th.json +1 -0
  100. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_tr.json +1 -0
  101. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_uk.json +1 -0
  102. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_vi.json +1 -0
  103. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_zh-CN.json +1 -0
  104. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_zh-HK.json +1 -0
  105. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_zh-TW.json +1 -0
  106. package/chunks/ComponentShader.glsl.js +15 -16
  107. package/chunks/DefaultMaterial.glsl.js +15 -16
  108. package/chunks/Path.glsl.js +12 -12
  109. package/chunks/RealisticTree.glsl.js +5 -6
  110. package/chunks/aiServices.js +1 -1
  111. package/chunks/array.js +1 -1
  112. package/chunks/languageUtils.js +1 -1
  113. package/config.js +1 -1
  114. package/editing/sharedTemplates/SharedTemplate.js +1 -1
  115. package/editing/sharedTemplates/SharedTemplateMetadata.js +1 -1
  116. package/editing/sharedTemplates/SharedTemplateProvider.js +1 -1
  117. package/editing/sharedTemplates/templateDefinitions/FeatureTemplateDefinition.js +1 -1
  118. package/editing/sharedTemplates/templateDefinitions/GroupTemplateDefinition.js +1 -1
  119. package/editing/sharedTemplates/templateDefinitions/PresetTemplateDefinition.js +1 -1
  120. package/editing/sharedTemplates/templateDefinitions/TemplateDefinitionBase.js +1 -1
  121. package/editing/sharedTemplates/templateDefinitions/parts/FeatureTemplateRelationshipPart.js +1 -1
  122. package/editing/sharedTemplates/templateDefinitions/parts/PresetTemplatePart.js +1 -1
  123. package/editing/sharedTemplates/templateDefinitions/parts/TemplatePartBase.js +1 -1
  124. package/interfaces.d.ts +40 -25
  125. package/kernel.js +1 -1
  126. package/layers/CSVLayer.js +1 -1
  127. package/layers/FeatureLayer.js +1 -1
  128. package/layers/IntegratedMesh3DTilesLayer.js +1 -1
  129. package/layers/OrientedImageryLayer.js +1 -1
  130. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  131. package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
  132. package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
  133. package/layers/support/DateTimeFieldFormat.js +1 -1
  134. package/layers/support/FieldConfiguration.js +1 -1
  135. package/layers/support/FieldFormat.js +1 -1
  136. package/layers/support/NumberFieldFormat.js +1 -1
  137. package/layers/support/Sublayer.js +1 -1
  138. package/layers/support/capabilities.js +1 -1
  139. package/layers/support/fieldConfigUtils.js +1 -1
  140. package/layers/support/fieldFormatUtils.js +5 -0
  141. package/layers/support/serviceCapabilitiesUtils.js +1 -1
  142. package/layers/support/vectorTileLayerLoader.js +1 -1
  143. package/package.json +1 -1
  144. package/popup/FieldInfo.js +1 -1
  145. package/popup/content/FieldsContent.js +1 -1
  146. package/portal/Portal.js +1 -1
  147. package/portal/schemas/definitions.js +1 -1
  148. package/rest/sharedTemplates/addSharedTemplates.js +5 -0
  149. package/rest/sharedTemplates/querySharedTemplates.js +1 -1
  150. package/rest/sharedTemplates/utils.js +5 -0
  151. package/support/ArcadeExpression.js +1 -1
  152. package/support/revision.js +1 -1
  153. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  154. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementConfiguration.js +1 -1
  155. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
  156. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementShiftTool.js +1 -1
  157. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementTool.js +1 -1
  158. package/views/3d/environment/CloudsComposition.js +1 -1
  159. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
  160. package/views/3d/interactive/editingTools/reshape/ReshapeTool3D.js +1 -1
  161. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  162. package/views/3d/layers/GaussianSplatLayerViewPerformanceInfo.js +5 -0
  163. package/views/3d/layers/I3SMeshView3D.js +1 -1
  164. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  165. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  166. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  167. package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
  168. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  169. package/views/3d/layers/i3s/I3SIntersectionHandler.js +1 -1
  170. package/views/3d/layers/support/Tiles3DIntersectionHandler.js +1 -1
  171. package/views/3d/state/ViewState.js +1 -1
  172. package/views/3d/state/ViewStateManager.js +1 -1
  173. package/views/3d/support/ResourceController.js +1 -1
  174. package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
  175. package/views/3d/support/orientedBoundingBox.js +1 -1
  176. package/views/3d/terrain/TerrainRenderer.js +1 -1
  177. package/views/3d/webgl/RenderNode.js +1 -1
  178. package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
  179. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  180. package/views/3d/webgl-engine/collections/Component/{ComponentObjectElevationAgnosticComponentBVH.js → ComponentObjectElevationAgnosticBVH.js} +1 -1
  181. package/views/3d/webgl-engine/collections/Component/ComponentObjectFixedBVH.js +5 -0
  182. package/views/3d/webgl-engine/collections/Component/IntersectionGeometry.js +1 -1
  183. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  184. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  185. package/views/3d/webgl-engine/collections/Component/ObjectParameters.js +1 -1
  186. package/views/3d/webgl-engine/collections/Component/SourceGeometry.js +1 -1
  187. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js +1 -1
  188. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  189. package/views/3d/webgl-engine/effects/weather/SnowCover.glsl.js +0 -3
  190. package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
  191. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  192. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  193. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  194. package/views/3d/webgl-engine/materials/PathTechniqueConfiguration.js +1 -1
  195. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  196. package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
  197. package/views/GroundView.js +1 -1
  198. package/views/interactive/dragEventPipeline.js +1 -1
  199. package/views/interactive/editGeometry/EditGeometryOperations.js +1 -1
  200. package/views/interactive/tooltip/tooltipCommonUtils.js +1 -1
  201. package/views/support/Scheduler.js +1 -1
  202. package/widgets/ScaleRangeSlider.js +1 -1
  203. package/assets/esri/core/workers/chunks/09c2004126f4a5242b85.js +0 -1
  204. package/assets/esri/core/workers/chunks/0dfc2ca36014910457ef.js +0 -1
  205. package/assets/esri/core/workers/chunks/1c7fffb496af6f2540dd.js +0 -1
  206. package/assets/esri/core/workers/chunks/1fc6311d4f0d27e88737.js +0 -1
  207. package/assets/esri/core/workers/chunks/2fe96bf7dedef11a3b63.js +0 -1
  208. package/assets/esri/core/workers/chunks/36a006c55766f9540bfc.js +0 -1
  209. package/assets/esri/core/workers/chunks/5f0a50ebd2a08b9b9de2.js +0 -1
  210. package/assets/esri/core/workers/chunks/637a5293e36f4f7f2853.js +0 -1
  211. package/assets/esri/core/workers/chunks/7540b34e743a23e67729.js +0 -1
  212. package/assets/esri/core/workers/chunks/7be11a3ef1f49245089f.js +0 -1
  213. package/assets/esri/core/workers/chunks/819a8bc1f0a694017ee6.js +0 -1
  214. package/assets/esri/core/workers/chunks/88d8ff0140f5ea97c6b7.js +0 -1
  215. package/assets/esri/core/workers/chunks/8de11aab65d91e7f1a4d.js +0 -1
  216. package/assets/esri/core/workers/chunks/96740c75ad65d651cc43.js +0 -1
  217. package/assets/esri/core/workers/chunks/9971de3f38a55735cec9.js +0 -1
  218. package/assets/esri/core/workers/chunks/9e47f680b66320dcfd34.js +0 -1
  219. package/assets/esri/core/workers/chunks/a7fcb60d5a9d2d9560e4.js +0 -1
  220. package/assets/esri/core/workers/chunks/a9e133166e9200fe135e.js +0 -1
  221. package/assets/esri/core/workers/chunks/aa84775399420e35c6a5.js +0 -1
  222. package/assets/esri/core/workers/chunks/acb1c5dd987c801d7b31.js +0 -1
  223. package/assets/esri/core/workers/chunks/b0508c96338d7cf296c1.js +0 -1
  224. package/assets/esri/core/workers/chunks/b09b34f64a6bc2b49e0a.js +0 -1
  225. package/assets/esri/core/workers/chunks/c0ae186620b68d43b338.js +0 -1
  226. package/assets/esri/core/workers/chunks/cc579c94438f48a0dbab.js +0 -1
  227. package/assets/esri/core/workers/chunks/ce0bf0d0cd9e9a90093b.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[624,7136],{10536:(e,t,r)=>{function s(e){const t={};for(const r in e){if("declaredClass"===r)continue;const n=e[r];if(null!=n&&"function"!=typeof n)if(Array.isArray(n)){t[r]=[];for(let e=0;e<n.length;e++)t[r][e]=s(n[e])}else"object"==typeof n?n.toJSON&&(t[r]=JSON.stringify(n)):t[r]=n}return t}r.d(t,{z:()=>s})},17136:(e,t,r)=>{r.d(t,{Y_:()=>x,O7:()=>T,el:()=>F});var s=r(92602),n=r(69052),i=r(49186),o=r(53966),a=r(39829),c=r(82799),u=r(16930),l=r(80754),h=r(21325),d=r(28735),f=r(78888),g=r(65864),p=r(2272),y=r(84952),m=r(92300);const _=()=>o.A.getLogger("esri.geometry.support.normalizeUtils");function b(e){return"polygon"===e[0].type}function w(e){return"polyline"===e[0].type}function k(e,t,r){if(t){const t=function(e,t){if(!(e instanceof c.A||e instanceof a.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw _().error(e),new i.A("internal:geometry",e)}const r=(0,l.r8)(e),s=[];for(const e of r){const r=[];s.push(r),r.push([e[0][0],e[0][1]]);for(let s=0;s<e.length-1;s++){const n=e[s][0],i=e[s][1],o=e[s+1][0],a=e[s+1][1],c=Math.sqrt((o-n)*(o-n)+(a-i)*(a-i)),u=(a-i)/c,l=(o-n)/c,h=c/t;if(h>1){for(let e=1;e<=h-1;e++){const s=e*t,o=l*s+n,a=u*s+i;r.push([o,a])}const e=(c+Math.floor(h-1)*t)/2,s=l*e+n,o=u*e+i;r.push([s,o])}r.push([o,a])}}return function(e){return"polygon"===e.type}(e)?new a.A({rings:s,spatialReference:e.spatialReference}):new c.A({paths:s,spatialReference:e.spatialReference})}(e,1e6);e=(0,d.ci)(t,!0)}return r&&(e=(0,l.kS)(e,r)),e}function S(e,t,r){if(Array.isArray(e)){const s=e[0];if(s>t){const r=(0,l.kd)(s,t);e[0]=s+r*(-2*t)}else if(s<r){const t=(0,l.kd)(s,r);e[0]=s+t*(-2*r)}}else{const s=e.x;if(s>t){const r=(0,l.kd)(s,t);e=e.clone().offset(r*(-2*t),0)}else if(s<r){const t=(0,l.kd)(s,r);e=e.clone().offset(t*(-2*r),0)}}return e}function I(e,t){let r=-1;for(let s=0;s<t.cutIndexes.length;s++){const n=t.cutIndexes[s],i=t.geometries[s],o=(0,l.r8)(i);for(let e=0;e<o.length;e++){const t=o[e];t.some(r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const s=t[e][0];r=s>r?s:r}r=Number(r.toFixed(9));const s=-360*(0,l.kd)(r,180);for(let r=0;r<t.length;r++){const t=i.getPoint(e,r);i.setPoint(e,r,t.clone().offset(s,0))}return!0}})}if(n===r){if(b(e))for(const t of(0,l.r8)(i))e[n]=e[n].addRing(t);else if(w(e))for(const t of(0,l.r8)(i))e[n]=e[n].addPath(t)}else r=n,e[n]=i}return e}async function F(e,t,r){if(!Array.isArray(e))return F([e],t);t&&"string"!=typeof t&&_().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof t?t:t?.url??s.A.geometryServiceUrl;let i,o,u,b,w,T,A,x,q=0;const N=[],R=[];for(const t of e)if(null!=t)if(i||(i=t.spatialReference,o=(0,h.Vp)(i),u=i.isWebMercator,T=u?102100:4326,b=l.j7[T].maxX,w=l.j7[T].minX,A=l.j7[T].plus180Line,x=l.j7[T].minus180Line),o)if("mesh"===t.type)R.push(t);else if("point"===t.type)R.push(S(t.clone(),b,w));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map(e=>S(e,b,w)),R.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,o);R.push(e.rings?new a.A(e):e)}else if(t.extent){const e=t.extent,r=(0,l.kd)(e.xmin,w)*(2*b);let s=0===r?t.clone():(0,l.kS)(t.clone(),r);e.offset(r,0);let{xmin:n,xmax:i}=e;n=Number(n.toFixed(9)),i=Number(i.toFixed(9)),e.intersects(A)&&i!==b?(q=i>q?i:q,s=k(s,u),N.push(s),R.push("cut")):e.intersects(x)&&n!==w?(q=i*(2*b)>q?i*(2*b):q,s=k(s,u,360),N.push(s),R.push("cut")):R.push(s)}else R.push(t.clone());else R.push(t);else R.push(t);let M=(0,l.kd)(q,b),v=-90;const O=M,E=new c.A;for(;M>0;){const e=360*M-180;E.addPath([[e,v],[e,-1*v]]),v*=-1,M--}if(N.length>0&&O>0){const t=I(N,await async function(e,t,r,s){const n=(0,p.Dl)(e),i=t[0].spatialReference,o={...s,responseType:"json",query:{...n.query,f:"json",sr:(0,h.YX)(i),target:JSON.stringify({geometryType:(0,g.$B)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},a=await(0,f.A)(n.path+"/cut",o),{cutIndexes:c,geometries:u=[]}=a.data;return{cutIndexes:c,geometries:u.map(e=>{const t=(0,g.rS)(e);return t.spatialReference=i,t})}}(n,N,E,r)),s=[],i=[];for(let r=0;r<R.length;r++){const n=R[r];if("cut"!==n)i.push(n);else{const n=t.shift(),o=e[r];null!=o&&"polygon"===o.type&&o.rings&&o.rings.length>1&&n.rings.length>=o.rings.length?(s.push(n),i.push("simplify")):i.push(u?(0,d.Gh)(n):n)}}if(!s.length)return i;const o=await async function(e,t,r){const s="string"==typeof e?(0,y.An)(e):e,n=t[0].spatialReference,i=(0,g.$B)(t[0]),o={...r,query:{...s.query,f:"json",sr:(0,h.YX)(n),geometries:JSON.stringify((0,m.X)(t))}},{data:a}=await(0,f.A)(s.path+"/simplify",o);return(0,m.V)(a.geometries,i,n)}(n,s,r),a=[];for(let e=0;e<i.length;e++){const t=i[e];"simplify"!==t?a.push(t):a.push(u?(0,d.Gh)(o.shift()):o.shift())}return a}const C=[];for(let e=0;e<R.length;e++){const t=R[e];if("cut"!==t)C.push(t);else{const e=N.shift();C.push(!0===u?(0,d.Gh)(e):e)}}return C}function T(e,t,r){const s=(0,h.Vp)(r);if(null==s)return e;const[n,i]=s.valid,o=2*i;let a=0,c=0;t>i?a=Math.ceil(Math.abs(t-i)/o):t<n&&(a=-Math.ceil(Math.abs(t-n)/o)),e>i?c=Math.ceil(Math.abs(e-i)/o):e<n&&(c=-Math.ceil(Math.abs(e-n)/o));let u=e+(a-c)*o;const l=u-t;return l>i?u-=o:l<n&&(u+=o),u}function A(e){const t=(0,h.Vp)(e);if(null==t)return null;const[r,s]=t.valid;return new n.hr(r,s)}const x=A(u.A.WGS84);A(u.A.WebMercator)},27647:(e,t,r)=>{function s(e,t){return e?t?4:3:t?3:2}function n(e,t,r,n){if(!t?.lengths.length)return null;e.lengths.length&&(e.lengths.length=0),e.coords.length&&(e.coords.length=0);const a=e.coords,c=[],u=r?[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]:[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY],{lengths:l,coords:h}=t,d=s(r,n);let f=0;for(const e of l){const t=i(u,h,f,e,r,n);t&&c.push(t),f+=e*d}if(c.sort((e,t)=>{let s=e[2]-t[2];return 0===s&&r&&(s=e[4]-t[4]),s}),c.length){let e=6*c[0][2];a[0]=c[0][0]/e,a[1]=c[0][1]/e,r&&(e=6*c[0][4],a[2]=0!==e?c[0][3]/e:0),(a[0]<u[0]||a[0]>u[1]||a[1]<u[2]||a[1]>u[3]||r&&(a[2]<u[4]||a[2]>u[5]))&&(a.length=0)}if(!a.length){const e=t.lengths[0]?o(h,0,l[0],r,n):null;if(!e)return null;a[0]=e[0],a[1]=e[1],r&&e.length>2&&(a[2]=e[2])}return e}function i(e,t,r,n,i,o){const a=s(i,o);let c=r,u=r+a,l=0,h=0,d=0,f=0,g=0;for(let r=0,s=n-1;r<s;r++,c+=a,u+=a){const r=t[c],s=t[c+1],n=t[c+2],o=t[u],a=t[u+1],p=t[u+2];let y=r*a-o*s;f+=y,l+=(r+o)*y,h+=(s+a)*y,i&&(y=r*p-o*n,d+=(n+p)*y,g+=y),r<e[0]&&(e[0]=r),r>e[1]&&(e[1]=r),s<e[2]&&(e[2]=s),s>e[3]&&(e[3]=s),i&&(n<e[4]&&(e[4]=n),n>e[5]&&(e[5]=n))}if(f>0&&(f*=-1),g>0&&(g*=-1),!f)return null;const p=[l,h,.5*f];return i&&(p[3]=d,p[4]=.5*g),p}function o(e,t,r,n,i){const o=s(n,i);let h=t,d=t+o,f=0,g=0,p=0,y=0;for(let t=0,s=r-1;t<s;t++,h+=o,d+=o){const t=e[h],r=e[h+1],s=e[h+2],i=e[d],o=e[d+1],m=e[d+2],_=n?c(t,r,s,i,o,m):a(t,r,i,o);if(_)if(f+=_,n){const e=l(t,r,s,i,o,m);g+=_*e[0],p+=_*e[1],y+=_*e[2]}else{const e=u(t,r,i,o);g+=_*e[0],p+=_*e[1]}}return f>0?n?[g/f,p/f,y/f]:[g/f,p/f]:r>0?n?[e[t],e[t+1],e[t+2]]:[e[t],e[t+1]]:null}function a(e,t,r,s){const n=r-e,i=s-t;return Math.sqrt(n*n+i*i)}function c(e,t,r,s,n,i){const o=s-e,a=n-t,c=i-r;return Math.sqrt(o*o+a*a+c*c)}function u(e,t,r,s){return[e+.5*(r-e),t+.5*(s-t)]}function l(e,t,r,s,n,i){return[e+.5*(s-e),t+.5*(n-t),r+.5*(i-r)]}r.d(t,{Q:()=>n})},30624:(e,t,r)=>{r.r(t),r.d(t,{createConnection:()=>I});var s=r(31635),n=r(78888),i=r(49186),o=r(53966),a=r(74887),c=r(84952),u=(r(44208),r(87811),r(40608)),l=r(16930),h=r(65864),d=r(10107),f=r(62815),g=r(65529);let p=class extends g.nJ{destroy(){this.emit("destroy")}get connectionError(){return this.errorString?new i.A("stream-connection",this.errorString):null}onFeature(e){this.emit("data-received",e)}onMessage(e){this.emit("message-received",e)}};(0,s.Cg)([(0,d.MZ)({readOnly:!0})],p.prototype,"connectionError",null),p=(0,s.Cg)([(0,u.$)("esri.layers.support.StreamConnection")],p);let y=class extends p{constructor(e){super({}),this._outstandingMessages=[],this.errorString=null;const{geometryType:t,spatialReference:r,sourceSpatialReference:s}=e;this._config=e,this._featureZScaler=(0,f.N)(t,s,r),this._open()}normalizeCtorArgs(){return{}}async _open(){await this._tryCreateWebSocket(),this.destroyed||await this._handshake()}destroy(){super.destroy(),null!=this._websocket&&(this._websocket.onopen=null,this._websocket.onclose=null,this._websocket.onerror=null,this._websocket.onmessage=null,this._websocket.close()),this._websocket=null}get connectionStatus(){if(null==this._websocket)return"disconnected";switch(this._websocket.readyState){case 0:case 1:return"connected";case 2:case 3:return"disconnected"}}sendMessageToSocket(e){null!=this._websocket?this._websocket.send(JSON.stringify(e)):this._outstandingMessages.push(e)}sendMessageToClient(e){this._onMessage(e)}updateCustomParameters(e){this._config.customParameters=e,null!=this._websocket&&this._websocket.close()}async _tryCreateWebSocket(e=this._config.source.path,t=1e3,r=0){try{if(this.destroyed)return;const t=(0,c.a6)(e,this._config.customParameters??{});this._websocket=await this._createWebSocket(t),this.notifyChange("connectionStatus")}catch(s){const n=t/1e3;return this._config.maxReconnectionAttempts&&r>=this._config.maxReconnectionAttempts?(o.A.getLogger(this).error(new i.A("websocket-connection","Exceeded maxReconnectionAttempts attempts. No further attempts will be made")),void this.destroy()):(o.A.getLogger(this).error(new i.A("websocket-connection",`Failed to connect. Attempting to reconnect in ${n}s`,s)),await(0,a.Pl)(t),this._tryCreateWebSocket(e,Math.min(1.5*t,1e3*this._config.maxReconnectionInterval),r+1))}}_setWebSocketJSONParseHandler(e){e.onmessage=e=>{try{const t=JSON.parse(e.data);this._onMessage(t)}catch(e){return void o.A.getLogger(this).error(new i.A("websocket-connection","Failed to parse message, invalid JSON",{error:e}))}}}_createWebSocket(e){return new Promise((t,r)=>{const s=new WebSocket(e);s.onopen=()=>{if(s.onopen=null,this.destroyed)return s.onclose=null,void s.close();s.onclose=e=>this._onClose(e),s.onerror=e=>this._onError(e),this._setWebSocketJSONParseHandler(s),t(s)},s.onclose=e=>{s.onopen=s.onclose=null,r(e)}})}async _handshake(e=1e4){const t=this._websocket;if(null==t)return;const r=(0,a.Tw)(),s=t.onmessage,{filter:n,outFields:c,spatialReference:u}=this._config;return r.timeout(e),t.onmessage=e=>{let a=null;try{a=JSON.parse(e.data)}catch(e){}a&&"object"==typeof a||(o.A.getLogger(this).error(new i.A("websocket-connection","Protocol violation. Handshake failed - malformed message",e.data)),r.reject(),this.destroy()),a.spatialReference?.wkid!==u?.wkid&&(o.A.getLogger(this).error(new i.A("websocket-connection",`Protocol violation. Handshake failed - expected wkid of ${u.wkid}`,e.data)),r.reject(),this.destroy()),"json"!==a.format&&(o.A.getLogger(this).error(new i.A("websocket-connection","Protocol violation. Handshake failed - format is not set",e.data)),r.reject(),this.destroy()),n&&a.filter!==n&&o.A.getLogger(this).error(new i.A("websocket-connection","Tried to set filter, but server doesn't support it")),c&&a.outFields!==c&&o.A.getLogger(this).error(new i.A("websocket-connection","Tried to set outFields, but server doesn't support it")),t.onmessage=s;for(const e of this._outstandingMessages)t.send(JSON.stringify(e));this._outstandingMessages=[],r.resolve()},t.send(JSON.stringify({filter:n,outFields:c,format:"json",spatialReference:{wkid:u.wkid}})),r.promise}_onMessage(e){if(this.onMessage(e),"type"in e)switch(e.type){case"features":case"featureResult":for(const t of e.features)null!=this._featureZScaler&&this._featureZScaler(t.geometry),this.onFeature(t)}}_onError(e){const t="Encountered an error over WebSocket connection";this._set("errorString",t),o.A.getLogger(this).error("websocket-connection",t)}_onClose(e){this._websocket=null,this.notifyChange("connectionStatus"),1e3!==e.code&&o.A.getLogger(this).error("websocket-connection",`WebSocket closed unexpectedly with error code ${e.code}`),this.destroyed||this._open()}};(0,s.Cg)([(0,d.MZ)()],y.prototype,"connectionStatus",null),(0,s.Cg)([(0,d.MZ)()],y.prototype,"errorString",void 0),y=(0,s.Cg)([(0,u.$)("esri.layers.graphics.sources.connections.WebSocketConnection")],y);var m=r(80893),_=r(61956);const b={maxQueryDepth:5,maxRecordCountFactor:3};let w=class extends y{constructor(e){super({...b,...e}),this._buddyServicesQuery=null,this._relatedFeatures=null}async _open(){const e=await this._fetchServiceDefinition(this._config.source);e.timeInfo.trackIdField||o.A.getLogger(this).warn("GeoEvent service was configured without a TrackIdField. This may result in certain functionality being disabled. The purgeOptions.maxObservations property will have no effect.");const t=this._fetchWebSocketUrl(e.streamUrls,this._config.spatialReference);this._buddyServicesQuery||(this._buddyServicesQuery=this._queryBuddyServices()),await this._buddyServicesQuery,await this._tryCreateWebSocket(t);const{filter:r,outFields:s}=this._config;this.destroyed||this._setFilter(r,s)}_onMessage(e){if("attributes"in e){let t;try{t=this._enrich(e),null!=this._featureZScaler&&this._featureZScaler(t.geometry)}catch(e){return void o.A.getLogger(this).error(new i.A("geoevent-connection","Failed to parse message",e))}this.onFeature(t)}else this.onMessage(e)}async _fetchServiceDefinition(e){const t={f:"json",...this._config.customParameters},r=(0,n.A)(e.path,{query:t,responseType:"json"}),s=(await r).data;return this._serviceDefinition=s,s}_fetchWebSocketUrl(e,t){const r=e[0],{urls:s,token:n}=r,i=this._inferWebSocketBaseUrl(s);return(0,c.a6)(`${i}/subscribe`,{outSR:""+t.wkid,token:n})}_inferWebSocketBaseUrl(e){if(1===e.length)return e[0];for(const t of e)if(t.includes("wss"))return t;return o.A.getLogger(this).error(new i.A("geoevent-connection","Unable to infer WebSocket url",e)),null}async _setFilter(e,t){const r=this._websocket;if(null==r||null==e&&null==t)return;const s=JSON.stringify({filter:this._serializeFilter(e,t)});let n=!1;const c=(0,a.Tw)();return r.onmessage=e=>{const t=JSON.parse(e.data);t.filter&&(t.error&&(o.A.getLogger(this).error(new i.A("geoevent-connection","Failed to set service filter",t.error)),this._set("errorString",`Could not set service filter - ${t.error}`),c.reject(t.error)),this._setWebSocketJSONParseHandler(r),n=!0,c.resolve())},r.send(s),setTimeout(()=>{n||(this.destroyed||this._websocket!==r||o.A.getLogger(this).error(new i.A("geoevent-connection","Server timed out when setting filter")),c.reject())},1e4),c.promise}_serializeFilter(e,t){const r={};if(null==e&&null==t)return r;if(e?.geometry)try{const t=(0,h.rS)(e.geometry);if("extent"!==t.type)throw new i.A("geoevent-connection",`Expected extent but found type ${t.type}`);r.geometry=JSON.stringify(t.shiftCentralMeridian())}catch(e){o.A.getLogger(this).error(new i.A("geoevent-connection","Encountered an error when setting connection geometryDefinition",e))}return e?.where&&"1 = 1"!==e.where&&"1=1"!==e.where&&(r.where=e.where),null!=t&&(r.outFields=t.join(",")),r}_enrich(e){if(!this._relatedFeatures)return e;const t=this._serviceDefinition.relatedFeatures.joinField,r=e.attributes[t],s=this._relatedFeatures.get(r);if(!s)return o.A.getLogger(this).warn("geoevent-connection","Feature join failed. Is the join field configured correctly?",e),e;const{attributes:n,geometry:a}=s;for(const t in n)e.attributes[t]=n[t];return a&&(e.geometry=a),e.geometry||e.centroid||o.A.getLogger(this).error(new i.A("geoevent-connection","Found malformed feature - no geometry found",e)),e}async _queryBuddyServices(){try{const{relatedFeatures:e,keepLatestArchive:t}=this._serviceDefinition,r=this._queryRelatedFeatures(e),s=this._queryArchive(t);await r;const n=await s;if(!n)return;for(const e of n.features)this.onFeature(this._enrich(e))}catch(e){o.A.getLogger(this).error(new i.A("geoevent-connection","Encountered an error when querying buddy services",{error:e}))}}async _queryRelatedFeatures(e){if(!e)return;const t=await this._queryBuddy(e.featuresUrl);this._addRelatedFeatures(t)}async _queryArchive(e){if(e)return this._queryBuddy(e.featuresUrl)}async _queryBuddy(e){const t=new((await Promise.all([r.e(4045),r.e(6554),r.e(2869),r.e(3910),r.e(4903),r.e(1214),r.e(9953),r.e(8399),r.e(1017),r.e(957),r.e(8506),r.e(8654),r.e(812),r.e(655),r.e(2561)]).then(r.bind(r,68654))).default)({url:e}),{capabilities:s}=await t.load(),n=s.query.supportsMaxRecordCountFactor,i=s.query.supportsPagination,o=s.query.supportsCentroid,a=this._config.maxRecordCountFactor,c=t.capabilities.query.maxRecordCount,u=n?c*a:c,h=new _.A;if(h.outFields=this._config.outFields??["*"],h.where=this._config.filter?.where??"1=1",h.returnGeometry=!0,h.returnExceededLimitFeatures=!0,h.outSpatialReference=l.A.fromJSON(this._config.spatialReference),o&&(h.returnCentroid=!0),n&&(h.maxRecordCountFactor=a),i)return h.num=u,t.destroy(),this._queryPages(e,h);const d=await(0,m.eW)(e,h,this._config.sourceSpatialReference);return t.destroy(),d.data}async _queryPages(e,t,r=[],s=0){t.start=null!=t.num?s*t.num:null;const{data:n}=await(0,m.eW)(e,t,this._config.sourceSpatialReference);return n.exceededTransferLimit&&s<(this._config.maxQueryDepth??0)?(n.features.forEach(e=>r.push(e)),this._queryPages(e,t,r,s+1)):(r.forEach(e=>n.features.push(e)),n)}_addRelatedFeatures(e){const t=new Map,r=e.features,s=this._serviceDefinition.relatedFeatures.joinField;for(const e of r){const r=e.attributes[s];t.set(r,e)}this._relatedFeatures=t}};w=(0,s.Cg)([(0,u.$)("esri.layers.graphics.sources.connections.GeoEventConnection")],w);let k=class extends p{constructor(e){super({}),this.connectionStatus="connected",this.errorString=null;const{geometryType:t,spatialReference:r,sourceSpatialReference:s}=e;this._featureZScaler=(0,f.N)(t,s,r)}normalizeCtorArgs(){return{}}updateCustomParameters(e){}sendMessageToSocket(e){}sendMessageToClient(e){if("type"in e)switch(e.type){case"features":case"featureResult":for(const t of e.features)null!=this._featureZScaler&&this._featureZScaler(t.geometry),this.onFeature(t)}this.onMessage(e)}};function S(e,t){if(null==e&&null==t)return null;const r={};return null!=t&&(r.geometry=t),null!=e&&(r.where=e),r}function I(e,t,r,s,n,i,o,a,c){const u={source:e,sourceSpatialReference:t,spatialReference:r,geometryType:s,filter:S(n,i),maxReconnectionAttempts:o,maxReconnectionInterval:a,customParameters:c};return e?e.path.startsWith("wss://")||e.path.startsWith("ws://")?new y(u):new w(u):new k(u)}(0,s.Cg)([(0,d.MZ)()],k.prototype,"connectionStatus",void 0),(0,s.Cg)([(0,d.MZ)()],k.prototype,"errorString",void 0),k=(0,s.Cg)([(0,u.$)("esri.layers.support.ClientSideConnection")],k)},43334:(e,t,r)=>{r.d(t,{N3:()=>a,Om:()=>o});var s=r(69397),n=r(27647),i=r(92722);class o{constructor(e=null,t={},r,s,n=0){this.geometry=e,this.attributes=t,this.centroid=r,this.objectId=s,this.displayId=n}static fromJSON(e){const t=e.geometry?i.A.fromJSON(e.geometry):null,r=e.centroid?i.A.fromJSON(e.centroid):null,s=e.objectId;return new o(t,e.attributes,r,s)}weakClone(){const e=new o(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e}clone(){const e=this.geometry?.clone(),t=new o(e,{...this.attributes},this.centroid?.clone(),this.objectId);return t.displayId=this.displayId,t}ensureCentroid(e){return this.centroid??=(0,n.Q)(new i.A,this.geometry,e.hasZ,e.hasM),this.centroid}get usedMemory(){return 128+(0,s.lM)(this.attributes)+(this.geometry?.usedMemory??0)}}function a(e){return!!e.geometry?.coords?.length}},51624:(e,t,r)=>{r.d(t,{A:()=>u});var s=r(44208),n=r(69397),i=r(93687);const o=4294967296,a=new TextDecoder("utf-8"),c=(0,s.A)("safari")||(0,s.A)("ios")?6:(0,s.A)("ff")?12:32;class u{constructor(e,t,r=0,s=(e?e.byteLength:0)){this._tag=0,this._dataType=99,this._init(e,t,r,s)}_init(e,t,r,s){this._data=e,this._dataView=t,this._pos=r,this._end=s}get usedMemory(){return 64+(0,n.Qf)(this._data)}asUnsafe(){return this}clone(){return new u(this._data,this._dataView,this._pos,this._end)}pos(){return this._pos}move(e){this._pos=e}nextTag(e){for(;;){if(this._pos===this._end)return!1;const t=this._decodeVarint();if(this._tag=t>>3,this._dataType=7&t,!e||e===this._tag)break;this.skip()}return!0}next(){if(this._pos===this._end)return!1;const e=this._decodeVarint();return this._tag=e>>3,this._dataType=7&e,!0}empty(){return this._pos>=this._end}tag(){return this._tag}getInt32(){return this._decodeVarint()}getInt64(){return this._decodeVarint()}getUInt32(){let e=4294967295;if(e=(127&this._data[this._pos])>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<7)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<14)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<21)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(15&this._data[this._pos])<<28)>>>0,this._data[this._pos++]<128)return e;throw new Error("Varint overflow")}getUInt64(){return this._decodeVarint()}getSInt32(){const e=this.getUInt32();return e>>>1^-(1&e)}getSInt64(){return this._decodeSVarint()}getBool(){const e=0!==this._data[this._pos];return this._skip(1),e}getEnum(){return this._decodeVarint()}getFixed64(){const e=this._dataView,t=this._pos,r=e.getUint32(t,!0)+e.getUint32(t+4,!0)*o;return this._skip(8),r}getSFixed64(){const e=this._dataView,t=this._pos,r=e.getUint32(t,!0)+e.getInt32(t+4,!0)*o;return this._skip(8),r}getDouble(){const e=this._dataView.getFloat64(this._pos,!0);return this._skip(8),e}getFixed32(){const e=this._dataView.getUint32(this._pos,!0);return this._skip(4),e}getSFixed32(){const e=this._dataView.getInt32(this._pos,!0);return this._skip(4),e}getFloat(){const e=this._dataView.getFloat32(this._pos,!0);return this._skip(4),e}getString(){const e=this._getLength(),t=this._pos,r=this._toString(this._data,t,t+e);return this._skip(e),r}getBytes(){const e=this._getLength(),t=this._pos,r=this._toBytes(this._data,t,t+e);return this._skip(e),r}getLength(){return this._getLengthUnsafe()}processMessageWithArgs(e,t,r,s){const n=this.getMessage(),i=e(n,t,r,s);return n.release(),i}processMessage(e){const t=this.getMessage(),r=e(t);return t.release(),r}getMessage(){const e=this._getLength(),t=u.pool.acquire();return t._init(this._data,this._dataView,this._pos,this._pos+e),this._skip(e),t}release(){u.pool.release(this)}dataType(){return this._dataType}skip(){switch(this._dataType){case 0:this._decodeVarint();break;case 1:this._skip(8);break;case 2:this._skip(this._getLength());break;case 5:this._skip(4);break;default:throw new Error("Invalid data type!")}}skipLen(e){this._skip(e)}_skip(e){if(this._pos+e>this._end)throw new Error("Attempt to skip past the end of buffer!");this._pos+=e}_decodeVarint(){const e=this._data;let t=this._pos,r=0,s=0;if(this._end-t>=10)do{if(s=e[t++],r|=127&s,!(128&s))break;if(s=e[t++],r|=(127&s)<<7,!(128&s))break;if(s=e[t++],r|=(127&s)<<14,!(128&s))break;if(s=e[t++],r|=(127&s)<<21,!(128&s))break;if(s=e[t++],r+=268435456*(127&s),!(128&s))break;if(s=e[t++],r+=34359738368*(127&s),!(128&s))break;if(s=e[t++],r+=4398046511104*(127&s),!(128&s))break;if(s=e[t++],r+=562949953421312*(127&s),!(128&s))break;if(s=e[t++],r+=72057594037927940*(127&s),!(128&s))break;if(s=e[t++],r+=0x8000000000000000*(127&s),!(128&s))break;throw new Error("Varint too long!")}while(0);else{let n=1;for(;t!==this._end&&(s=e[t],128&s);)++t,r+=(127&s)*n,n*=128;if(t===this._end)throw new Error("Varint overrun!");++t,r+=s*n}return this._pos=t,r}_decodeSVarint(){const e=this._data;let t,r=0,s=0;const n=1&e[this._pos];if(s=e[this._pos++],r|=127&s,!(128&s))return n?-(r+1)/2:r/2;if(s=e[this._pos++],r|=(127&s)<<7,!(128&s))return n?-(r+1)/2:r/2;if(s=e[this._pos++],r|=(127&s)<<14,!(128&s))return n?-(r+1)/2:r/2;if(s=e[this._pos++],r|=(127&s)<<21,!(128&s))return n?-(r+1)/2:r/2;if(s=e[this._pos++],r+=268435456*(127&s),!(128&s))return n?-(r+1)/2:r/2;if(s=e[this._pos++],r+=34359738368*(127&s),!(128&s))return n?-(r+1)/2:r/2;if(s=e[this._pos++],r+=4398046511104*(127&s),!(128&s))return n?-(r+1)/2:r/2;if(t=BigInt(r),s=e[this._pos++],t+=0x2000000000000n*BigInt(127&s),!(128&s))return Number(n?-(t+1n)/2n:t/2n);if(s=e[this._pos++],t+=0x100000000000000n*BigInt(127&s),!(128&s))return Number(n?-(t+1n)/2n:t/2n);if(s=e[this._pos++],t+=0x8000000000000000n*BigInt(127&s),!(128&s))return Number(n?-(t+1n)/2n:t/2n);throw new Error("Varint too long!")}_getLength(){if(2!==this._dataType)throw new Error("Not a delimited data type!");return this._decodeVarint()}_getLengthUnsafe(){return this.getUInt32()}_toString(e,t,r){if((r=Math.min(this._end,r))-t>c){const s=e.subarray(t,r);return a.decode(s)}let s="",n="";for(let i=t;i<r;++i){const t=e[i];128&t?n+="%"+t.toString(16):(s+=decodeURIComponent(n)+String.fromCharCode(t),n="")}return n.length&&(s+=decodeURIComponent(n)),s}_toBytes(e,t,r){return r=Math.min(this._end,r),new Uint8Array(e.buffer,t,r-t)}static{this.pool=new i.A(()=>new u(null,null),void 0,e=>{e._data=null,e._dataView=null})}}},53655:(e,t,r)=>{r.d(t,{SH:()=>q,ae:()=>I,cn:()=>_});var s=r(49186),n=r(51624),i=r(92722),o=r(69418);const a=["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeString","esriFieldTypeDate","esriFieldTypeOID","esriFieldTypeGeometry","esriFieldTypeBlob","esriFieldTypeRaster","esriFieldTypeGUID","esriFieldTypeGlobalID","esriFieldTypeXML","esriFieldTypeBigInteger","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"],c=["sqlTypeBigInt","sqlTypeBinary","sqlTypeBit","sqlTypeChar","sqlTypeDate","sqlTypeDecimal","sqlTypeDouble","sqlTypeFloat","sqlTypeGeometry","sqlTypeGUID","sqlTypeInteger","sqlTypeLongNVarchar","sqlTypeLongVarbinary","sqlTypeLongVarchar","sqlTypeNChar","sqlTypeNVarchar","sqlTypeOther","sqlTypeReal","sqlTypeSmallInt","sqlTypeSqlXml","sqlTypeTime","sqlTypeTimestamp","sqlTypeTimestamp2","sqlTypeTinyInt","sqlTypeVarbinary","sqlTypeVarchar"],u=["upperLeft","lowerLeft"];function l(e){return e>=a.length?null:a[e]}function h(e){return e>=c.length?null:c[e]}function d(e){return e>=u.length?null:u[e]}function f(e,t){return t>=e.geometryTypes.length?null:e.geometryTypes[t]}function g(e,t,r){const s=e.asUnsafe(),n=t.createPointGeometry(r);for(;s.next();)switch(s.tag()){case 3:{const e=s.getUInt32(),r=s.pos()+e;let i=0;for(;s.pos()<r;)t.addCoordinatePoint(n,s.getSInt64(),i++);break}default:s.skip()}return n}function p(e,t,r){const s=e.asUnsafe(),n=t.createGeometry(r),i=2+(r.hasZ?1:0)+(r.hasM?1:0);for(;s.next();)switch(s.tag()){case 2:{const e=s.getUInt32(),r=s.pos()+e;let i=0;for(;s.pos()<r;)t.addLength(n,s.getUInt32(),i++);break}case 3:{const e=s.getUInt32(),r=s.pos()+e;let o=0;for(t.allocateCoordinates(n);s.pos()<r;)t.addCoordinate(n,s.getSInt64(),o),o++,o===i&&(o=0);break}default:s.skip()}return n}function y(e){const t=e.asUnsafe(),r=new i.A;let s="esriGeometryPoint";for(;t.next();)switch(t.tag()){case 2:{const e=t.getUInt32(),s=t.pos()+e;for(;t.pos()<s;)r.lengths.push(t.getUInt32());break}case 3:{const e=t.getUInt32(),s=t.pos()+e;for(;t.pos()<s;)r.coords.push(t.getSInt64());break}case 1:s=o.z[t.getEnum()];break;default:t.skip()}return{queryGeometry:r,queryGeometryType:s}}function m(e){const t=e.asUnsafe();for(;t.next();)switch(t.tag()){case 1:return t.getString();case 2:return t.getFloat();case 3:return t.getDouble();case 4:return t.getSInt32();case 5:return t.getUInt32();case 6:return t.getInt64();case 7:return t.getUInt64();case 8:return t.getSInt64();case 9:return t.getBool();default:return t.skip(),null}return null}function _(e){const t=e.asUnsafe(),r={type:l(0)};for(;t.next();)switch(t.tag()){case 1:r.name=t.getString();break;case 2:r.type=l(t.getEnum());break;case 3:r.alias=t.getString();break;case 4:r.sqlType=h(t.getEnum());break;case 5:default:t.skip();break;case 6:r.defaultValue=t.getString()}return r}function b(e){const t={},r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t.name=r.getString();break;case 2:t.isSystemMaintained=r.getBool();break;default:r.skip()}return t}function w(e,t,r,s){const n=t.createFeature(r);let i=0;for(;e.next();)switch(e.tag()){case 1:{const t=s[i++].name;n.attributes[t]=e.processMessage(m);break}case 2:n.geometry=e.processMessageWithArgs(p,t,r);break;case 4:n.centroid=e.processMessageWithArgs(g,t,r);break;default:e.skip()}return n}function k(e){const t=[1,1,1,1],r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t[0]=r.getDouble();break;case 2:t[1]=r.getDouble();break;case 4:t[2]=r.getDouble();break;case 3:t[3]=r.getDouble();break;default:r.skip()}return t}function S(e){const t=[0,0,0,0],r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t[0]=r.getDouble();break;case 2:t[1]=r.getDouble();break;case 4:t[2]=r.getDouble();break;case 3:t[3]=r.getDouble();break;default:r.skip()}return t}function I(e){const t={originPosition:d(0)},r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t.originPosition=d(r.getEnum());break;case 2:t.scale=r.processMessage(k);break;case 3:t.translate=r.processMessage(S);break;default:r.skip()}return t}function F(e){const t={},r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t.shapeAreaFieldName=r.getString();break;case 2:t.shapeLengthFieldName=r.getString();break;case 3:t.units=r.getString();break;default:r.skip()}return t}function T(e,t){const r=t.createSpatialReference();for(;e.next();)switch(e.tag()){case 1:r.wkid=e.getUInt32();break;case 5:r.wkt=e.getString();break;case 2:r.latestWkid=e.getUInt32();break;case 3:r.vcsWkid=e.getUInt32();break;case 4:r.latestVcsWkid=e.getUInt32();break;default:e.skip()}return r}function A(e,t){const r=t.createFeatureResult(),s=e.asUnsafe();r.geometryType=f(t,0);let n=!1;for(;s.next();)switch(s.tag()){case 1:r.objectIdFieldName=s.getString();break;case 3:r.globalIdFieldName=s.getString();break;case 4:r.geohashFieldName=s.getString();break;case 5:r.geometryProperties=s.processMessage(F);break;case 7:r.geometryType=f(t,s.getEnum());break;case 8:r.spatialReference=s.processMessageWithArgs(T,t);break;case 10:r.hasZ=s.getBool();break;case 11:r.hasM=s.getBool();break;case 12:r.transform=s.processMessage(I);break;case 9:r.exceededTransferLimit=s.getBool();break;case 13:t.addField(r,s.processMessage(_));break;case 15:n||(t.prepareFeatures(r),n=!0),t.addFeature(r,s.processMessageWithArgs(w,t,r,r.fields));break;case 2:r.uniqueIdField=s.processMessage(b);break;default:s.skip()}return t.finishFeatureResult(r),r}function x(e,t){const r={};let s=null;for(;e.next();)switch(e.tag()){case 4:s=e.processMessageWithArgs(y);break;case 1:r.featureResult=e.processMessageWithArgs(A,t);break;default:e.skip()}return null!=s&&r.featureResult&&t.addQueryGeometry(r,s),r}function q(e,t){try{const r=2,s=new n.A(new Uint8Array(e),new DataView(e)),i={};for(;s.next();)s.tag()===r?i.queryResult=s.processMessageWithArgs(x,t):s.skip();return i}catch(e){throw new s.A("query:parsing-pbf","Error while parsing FeatureSet PBF payload",{error:e})}}},58501:(e,t,r)=>{r.d(t,{q:()=>n});var s=r(62815);function n(e,t,r){if(!r?.features||!r.hasZ)return;const n=(0,s.N)(r.geometryType,t,e.outSpatialReference);if(null!=n)for(const e of r.features)n(e.geometry)}},58512:(e,t,r)=>{r.d(t,{A:()=>s});class s{constructor(){this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){const e=new s;return e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}},66208:(e,t,r)=>{r.d(t,{m:()=>n});var s=r(53655);function n(e,t){const r=(0,s.SH)(e,t),n=r.queryResult.featureResult,i=r.queryResult.queryGeometry,o=r.queryResult.queryGeometryType;if(n&&n.features&&n.features.length&&n.objectIdFieldName){const e=n.objectIdFieldName;for(const t of n.features)t.attributes&&(t.objectId=t.attributes[e])}return n&&(n.queryGeometry=i,n.queryGeometryType=o),n}},69052:(e,t,r)=>{r.d(t,{hr:()=>n,ie:()=>c,uC:()=>a});var s=r(34727);class n{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return i(this.range,this.min,this.max,e,t,r)}clamp(e,t=0){return(0,s.qE)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+o(this.range,e-t,r)}minimalMonotonic(e,t,r){return i(this.range,e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);const r=(t=this.normalize(t))-e,s=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(s)?r:s}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function i(e,t,r,s,n=0,i=!1){return(s-=n)<t?s+=o(e,t-s):s>r&&(s-=o(e,s-r)),i&&s===r&&(s=t),s+n}function o(e,t,r=0){return Math.ceil((t-r)/e)*e+r}const a=new n(0,2*Math.PI),c=(new n(-Math.PI,Math.PI),new n(0,360))},69397:(e,t,r)=>{r.d(t,{$B:()=>n,Qf:()=>u,Qh:()=>a,RS:()=>i,ez:()=>d,lM:()=>o,qK:()=>h});var s=r(34275);function n(e){return 32+e.length}const i=16;function o(e){if(!e)return 0;let t=h;for(const r in e)e.hasOwnProperty(r)&&(t+=c(e[r],!1));return t}function a(e){if(!e)return 0;if("number"==typeof e[0])return u(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return l(e,8);let r=d;for(let s=0;s<t;s++)r+=c(e[s]);return r}(e);let t=h;for(const r in e)e.hasOwnProperty(r)&&(t+=c(e[r]));return t}function c(e,t=!0){switch(typeof e){case"object":return t?a(e):h;case"string":return n(e);case"number":return i;case"boolean":return 4;default:return 8}}function u(...e){return e.reduce((e,t)=>e+(t?(0,s.iu)(t)?t.byteLength+f:Array.isArray(t)?l(t,i):0:0),0)}function l(e,t){return d+e.length*t}const h=32,d=16,f=145},69418:(e,t,r)=>{r.d(t,{S:()=>u,z:()=>c});var s=r(83047),n=r(21325),i=r(43334),o=r(58512),a=r(92722);const c=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"];class u{constructor(e){this._options=e,this.geometryTypes=c,this._coordinatePtr=0,this._vertexDimension=0}createFeatureResult(){return new o.A}prepareFeatures(e){this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++}finishFeatureResult(e){if(!e?.features||!e.hasZ||!this._options.sourceSpatialReference||!e.spatialReference||(0,n.aI)(e.spatialReference,this._options.sourceSpatialReference)||e.spatialReference.vcsWkid)return;const t=(0,s.G9)(this._options.sourceSpatialReference)/(0,s.G9)(e.spatialReference);if(1!==t)for(const r of e.features){if(!(0,i.N3)(r))continue;const e=r.geometry.coords;for(let r=2;r<e.length;r+=3)e[r]*=t}}addFeature(e,t){e.features.push(t)}createFeature(){return new i.Om(null,{},null,0)}createSpatialReference(){return{wkid:0}}createGeometry(){return new a.A}addField(e,t){e.fields.push(t)}allocateCoordinates(e){e.coords.length=e.lengths.reduce((e,t)=>e+t,0)*this._vertexDimension,this._coordinatePtr=0}addCoordinate(e,t){e.coords[this._coordinatePtr++]=t}addCoordinatePoint(e,t){e.coords.push(t)}addLength(e,t){e.lengths.push(t)}addQueryGeometry(e,t){e.queryGeometry=t.queryGeometry,e.queryGeometryType=t.queryGeometryType}createPointGeometry(){return new a.A}}},80754:(e,t,r)=>{r.d(t,{j7:()=>o,kS:()=>c,kd:()=>a,r8:()=>u});var s=r(82799),n=r(16930),i=r(65864);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new s.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator}),minus180Line:new s.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new s.A({paths:[[[180,-180],[180,180]]],spatialReference:n.A.WGS84}),minus180Line:new s.A({paths:[[[-180,-180],[-180,180]]],spatialReference:n.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function c(e,t){const r=u(e);for(const e of r)for(const r of e)r[0]+=t;return e}function u(e){return(0,i.Bi)(e)?e.rings:e.paths}},80893:(e,t,r)=>{r.d(t,{IJ:()=>g,Jf:()=>_,Pk:()=>y,eW:()=>f,gW:()=>m,kS:()=>p});var s=r(78888),n=r(84952),i=r(65864),o=r(17136),a=r(21325),c=r(10536),u=r(66208),l=r(58501);const h="Layer does not support extent calculation.";function d(e,t,r){const s=e.geometry,n=e.toJSON();delete n.compactGeometryEnabled,delete n.defaultSpatialReferenceEnabled;const o=n;let c,u,l;if(s&&(u=s.spatialReference,l=(0,a.YX)(u),o.geometryType=(0,i.$B)(s),o.geometry=function(e,t){if(t&&"extent"===e.type)return`${e.xmin},${e.ymin},${e.xmax},${e.ymax}`;if(t&&"point"===e.type)return`${e.x},${e.y}`;const r=e.toJSON();return delete r.spatialReference,JSON.stringify(r)}(s,e.compactGeometryEnabled),o.inSR=l),n.groupByFieldsForStatistics&&(o.groupByFieldsForStatistics=n.groupByFieldsForStatistics.join(",")),n.objectIds)switch(r?.uniqueIdFields?.length){case void 0:o.objectIds=n.objectIds.join(",");break;case 1:o.uniqueIds=JSON.stringify(n.objectIds),delete o.objectIds;break;default:o.uniqueIds=JSON.stringify(n.objectIds.map(e=>JSON.parse(e))),delete o.objectIds}if(n.orderByFields&&(o.orderByFields=n.orderByFields.join(",")),!n.outFields||!n.returnDistinctValues&&(t?.returnCountOnly||t?.returnExtentOnly||t?.returnIdsOnly)?delete o.outFields:n.outFields.includes("*")?o.outFields="*":o.outFields=n.outFields.join(","),n.outSR?(o.outSR=(0,a.YX)(n.outSR),c=e.outSpatialReference):s&&(n.returnGeometry||n.returnCentroid)&&(o.outSR=o.inSR,c=u),n.returnGeometry&&delete n.returnGeometry,n.outStatistics&&(o.outStatistics=JSON.stringify(n.outStatistics)),n.fullText&&(o.fullText=JSON.stringify(n.fullText)),n.pixelSize&&(o.pixelSize=JSON.stringify(n.pixelSize)),n.quantizationParameters&&(e.defaultSpatialReferenceEnabled&&null!=u&&null!=e.quantizationParameters?.extent&&u.equals(e.quantizationParameters.extent.spatialReference)&&delete n.quantizationParameters.extent.spatialReference,o.quantizationParameters=JSON.stringify(n.quantizationParameters)),n.parameterValues&&(o.parameterValues=JSON.stringify(n.parameterValues)),n.rangeValues&&(o.rangeValues=JSON.stringify(n.rangeValues)),n.dynamicDataSource&&(o.layer=JSON.stringify({source:n.dynamicDataSource}),delete n.dynamicDataSource),n.timeExtent){const e=n.timeExtent,{start:t,end:r}=e;null==t&&null==r||(o.time=t===r?t:`${t??"null"},${r??"null"}`),delete n.timeExtent}return e.defaultSpatialReferenceEnabled&&null!=u&&null!=c&&u.equals(c)&&(o.defaultSR=o.inSR,delete o.inSR,delete o.outSR),o}async function f(e,t,r,s,n){const i=t.timeExtent?.isEmpty?{data:{features:[]}}:await w(e,t,"json",s,void 0,n);return(0,l.q)(t,r,i.data),i}async function g(e,t,r,s,n){if(t.timeExtent?.isEmpty)return{data:r.createFeatureResult()};const i=await p(e,t,s,n),o=i;return o.data=(0,u.m)(i.data,r),o}function p(e,t,r,s){return w(e,t,"pbf",r,void 0,s)}function y(e,t,r,s){return t.timeExtent?.isEmpty?Promise.resolve({data:{objectIds:[]}}):w(e,t,"json",r,{returnIdsOnly:!0},s)}function m(e,t,r,s){return t.timeExtent?.isEmpty?Promise.resolve({data:{count:0}}):w(e,t,"json",r,{returnIdsOnly:!0,returnCountOnly:!0},s)}async function _(e,t,r){if(t.timeExtent?.isEmpty)return{data:{count:0,extent:null}};const s=await w(e,t,"json",r,{returnExtentOnly:!0,returnCountOnly:!0}),n=s.data;if(n.hasOwnProperty("extent"))return s;if(n.features)throw new Error(h);if(n.hasOwnProperty("count"))throw new Error(h);return s}function b(e,t){if(!e.returnIdsOnly||!t.uniqueIdFields)return e;const r={...e,returnUniqueIdsOnly:!0};return delete r.returnIdsOnly,r}async function w(e,t,r,i={},a={},u={}){const l="string"==typeof e?(0,n.An)(e):e,h=t.geometry?[t.geometry]:[],f=await(0,o.el)(h,null,{signal:i.signal}),g=f?.[0];null!=g&&((t=t.clone()).geometry=g);const p=(0,c.z)({...l.query,f:r,...b(a,u),...d(t,a,u)});return(0,s.A)((0,n.fj)(l.path,(y=a,null==t.formatOf3DObjects||y.returnCountOnly||y.returnExtentOnly||y.returnIdsOnly?"query":"query3d")),{...i,responseType:"pbf"===r?"array-buffer":"json",query:{...p,...i.query}});var y}},92300:(e,t,r)=>{r.d(t,{V:()=>i,X:()=>n});var s=r(65864);function n(e){return{geometryType:(0,s.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function i(e,t,r){const n=(0,s.xD)(t);return e.map(e=>{const t=n.fromJSON(e);return t.spatialReference=r,t})}},92722:(e,t,r)=>{r.d(t,{A:()=>n});var s=r(69397);class n{constructor(e=[],t=[]){this.lengths=e??[],this.coords=t??[]}static fromJSON(e){return new n(e.lengths,e.coords)}static fromRect(e){const[t,r,s,i]=e,o=s-t,a=i-r;return new n([5],[t,r,o,0,0,a,-o,0,0,-a])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.lengths.reduce((e,t)=>e+t)}get usedMemory(){return 64+(0,s.Qf)(this.lengths,this.coords)}area(){let e=0,t=0;if(!this.lengths.length)return 0;for(let r=0;r<this.lengths.length;r++){const s=this.lengths[r];if(s<3)continue;let n=this.coords[2*t],i=this.coords[2*t+1];for(let r=1;r<s;r+=1){const s=this.coords[2*(r+t)],o=this.coords[2*(r+t)+1];e+=-.5*(s-n)*(o+i),n=s,i=o}t+=s}return e}forEachVertex(e){let t=0;this.lengths.length||e(this.coords[0],this.coords[1]);for(let r=0;r<this.lengths.length;r++){const s=this.lengths[r];for(let r=0;r<s;r++)e(this.coords[2*(r+t)],this.coords[2*(r+t)+1]);t+=s}}deltaDecode(){const e=this.clone(),{coords:t,lengths:r}=e;let s=0;for(const e of r){for(let r=1;r<e;r++)t[2*(s+r)]+=t[2*(s+r)-2],t[2*(s+r)+1]+=t[2*(s+r)-1];s+=e}return e}clone(e){if(0===this.lengths.length)return new n([],[this.coords[0],this.coords[1]]);const t=2*(0===this.lengths.length?1:this.lengths.reduce((e,t)=>e+t)),r=this.coords.slice(0,t);return e?(e.set(r),new n(this.lengths,e)):new n(Array.from(this.lengths),Array.from(r))}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7048],{6797:(e,t,r)=>{r.d(t,{Ui:()=>c});var i=r(65008),s=r(7762),o=r(88620);const n=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function a(e){return e instanceof i.A}function l(e){return e instanceof s.A?Object.keys(e.items):a(e)?(0,o.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof s.A?e.items[t]:e[t]}function d(e){return e?e.declaredClass:null}function p(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const i=l(e),s=l(t);if(0===i.length&&0===s.length)return;if(!i.length||!s.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const o=s.filter(e=>!i.includes(e)),c=i.filter(e=>!s.includes(e)),y=i.filter(r=>s.includes(r)&&u(e,r)!==u(t,r)).concat(o,c).sort(),h=d(e);if(h&&n.has(h)&&y.length)return{type:"complete",oldValue:e,newValue:t};let f;const m=a(e)&&a(t);for(const i of y){const s=u(e,i),o=u(t,i);let n;if((m||"function"!=typeof s&&"function"!=typeof o)&&s!==o&&(null!=s||null!=o)){if(r&&r[i]&&"function"==typeof r[i])n=r[i]?.(s,o);else if(s instanceof Date&&o instanceof Date){if(s.getTime()===o.getTime())continue;n={type:"complete",oldValue:s,newValue:o}}else n="object"==typeof s&&"object"==typeof o&&d(s)===d(o)?p(s,o):{type:"complete",oldValue:s,newValue:o};null!=n&&(null!=f?f.diff[i]=n:f={type:"partial",diff:{[i]:n}})}}return f}function c(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&d(e)!==d(t)?{type:"complete",oldValue:e,newValue:t}:p(e,t)}},15775:(e,t,r)=>{r.d(t,{A:()=>ye});var i=r(31635),s=r(37838),o=r(78888),n=r(7762),a=r(49186),l=r(44208),u=r(4902),d=r(4718),p=r(92474),c=r(53966),y=r(92071),h=r(39516),f=r(84952),m=r(10107),g=r(79901),b=r(36005),w=r(40608),v=r(43937),S=r(56507),_=r(35666),I=r(88620),x=r(5443),C=r(16930),A=r(50498),F=r(89808),T=r(99959);const M=Symbol("isMapImageGraphicOriginSymbol");var O;class D extends T.A{get[(O=M,F.Q)](){return this.layer}constructor(e,t){super(),this[O]=!0,this.type="map-image",this.layer=e,this.sublayer=t}get id(){return`${this.layer.id}:__${this.sublayer.id}__`}}const P=Symbol("isTileGraphicOriginSymbol");var Z;class j extends T.A{get[(Z=P,F.Q)](){return this.layer}constructor(e,t){super(),this[Z]=!0,this.type="tile",this.layer=e,this.sublayer=t}get id(){return`${this.layer.id}:__${this.sublayer.id}__`}}var L,E=r(28132),R=r(32756),q=r(15426),V=r(33143),N=r(20437),k=r(95466),$=r(30524),B=r(46499),z=r(39383),Q=r(37352),G=r(91880),J=r(45067),U=r(22453),K=r(27733),Y=r(49053),H=r(41214),X=r(2272),W=r(54546),ee=r(61956),te=r(30291),re=r(33910),ie=r(43440);function se(e){return"esriSMS"===e?.type}function oe(e,t,r){const i=r.minimumWritableOrigin||r.origin;return!!i&&e.originIdOf(t)>=(0,_.aB)(i)}function ne(e,t,r){const i=oe(this,t,r);return{ignoreOrigin:!0,allowNull:i,enabled:!!r&&"map-image"===r.layer?.type&&(r.writeSublayerStructure||i)}}function ae(e,t,r){return{enabled:!!r&&"tile"===r.layer?.type&&(oe(this,t,r)||this._isOverridden(t))}}function le(e,t,r){return{ignoreOrigin:!0,enabled:r&&r.writeSublayerStructure||!1}}function ue(e,t,r){return{ignoreOrigin:!0,enabled:!!r?.writeSublayerStructure&&this.originIdOf(t)>2}}function de(e,t,r){return{ignoreOrigin:!0,enabled:!!r&&(r.writeSublayerStructure||oe(this,t,r))}}let pe=0;const ce=new Set(["layer","parent","loaded","loadStatus","loadError","loadWarnings"]);let ye=class extends((0,y.P)((0,u.sA)(p.x_))){static{L=this}constructor(e){super(e),this.attributeTableTemplate=null,this.capabilities=void 0,this.maxScaleRange={minScale:0,maxScale:0},this.fields=null,this.fullExtent=null,this.geometryType=null,this.globalIdField=null,this.isTable=!1,this.legendEnabled=!0,this.objectIdField=null,this.parent=null,this.popupEnabled=!0,this.popupTemplate=null,this.relationships=null,this.sourceJSON=null,this.spatialReference=null,this.title=null,this.typeIdField=null,this.type="sublayer",this.types=null,this._lastParsedUrl=null}async load(e){return this.addResolvingPromise(this.reload(e)),this}readCapabilities(e,t){t=t.layerDefinition||t;const{attachment:r,operations:{supportsQuery:i,supportsQueryAttachments:s},query:{supportsFormatPBF:o,supportsOrderBy:n,supportsPagination:a},data:{supportsAttachment:l},queryRelated:u}=(0,U.S)(t,this.url);return{attachment:{supportsOrderByFields:r?.supportsOrderByFields??!1,supportsResize:r?.supportsResize??!1,supportsTypeWildcard:r?.supportsTypeWildcard??!1},exportMap:{supportsModification:!!t.canModifyLayer},operations:{supportsQuery:i,supportsQueryAttachments:s},data:{supportsAttachment:l},query:{supportsFormatPBF:o,supportsOrderBy:n,supportsPagination:a},queryRelated:u}}get defaultPopupTemplate(){return this.createPopupTemplate()}set definitionExpression(e){this._setAndNotifyLayer("definitionExpression",e)}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}readMaxScaleRange(e,t){return{minScale:(t=t.layerDefinition||t).minScale??0,maxScale:t.maxScale??0}}get fieldsIndex(){return new k.A(this.fields||[])}set floorInfo(e){this._setAndNotifyLayer("floorInfo",e)}readGlobalIdFieldFromService(e,t){if((t=t.layerDefinition||t).globalIdField)return t.globalIdField;if(t.fields)for(const e of t.fields)if("esriFieldTypeGlobalID"===e.type)return e.name}get graphicOrigin(){if(!this.layer)return null;switch(this.layer.type){case"tile":return new j(this.layer,this);case"map-image":return new D(this.layer,this)}}get id(){return this._get("id")??pe++}set id(e){this._get("id")!==e&&(!1!==this.layer?.capabilities?.exportMap?.supportsDynamicLayers?this._set("id",e):this._logLockedError("id","capability not available 'layer.capabilities.exportMap.supportsDynamicLayers'"))}readIsTable(e,t){return"Table"===t.type}set labelingInfo(e){this._setAndNotifyLayer("labelingInfo",e)}writeLabelingInfo(e,t,r,i){e&&e.length&&(t.layerDefinition={drawingInfo:{labelingInfo:e.map(e=>e.write({},i))}})}set labelsVisible(e){this._setAndNotifyLayer("labelsVisible",e)}set layer(e){this._set("layer",e),this.sublayers?.forEach(t=>t.layer=e)}set listMode(e){this._set("listMode",e)}set minScale(e){this._setAndNotifyLayer("minScale",e)}readMinScale(e,t){return t.minScale||t.layerDefinition?.minScale||0}set maxScale(e){this._setAndNotifyLayer("maxScale",e)}readMaxScale(e,t){return t.maxScale||t.layerDefinition?.maxScale||0}readObjectIdFieldFromService(e,t){if((t=t.layerDefinition||t).objectIdField)return t.objectIdField;const r=t.fields?.find(e=>"esriFieldTypeOID"===e.type);return r?.name}set opacity(e){this._setAndNotifyLayer("opacity",e)}readOpacity(e,t){const{layerDefinition:r}=t;return 1-.01*(r?.transparency??r?.drawingInfo?.transparency??0)}writeOpacity(e,t,r,i){t.layerDefinition={drawingInfo:{transparency:100-100*e}}}set orderBy(e){this._setAndNotifyLayer("orderBy",e)}writeParent(e,t){this.parent&&this.parent!==this.layer?t.parentLayerId=(0,S.Vr)(this.parent.id):t.parentLayerId=-1}get queryTask(){if(!this.layer)return null;const{capabilities:e,fieldsIndex:t,layer:r,url:i}=this,{spatialReference:s}=r,o="gdbVersion"in r?r.gdbVersion:void 0,n=(0,l.A)("featurelayer-pbf")&&e?.query.supportsFormatPBF;return new E.A({fieldsIndex:t,gdbVersion:o,pbfSupported:n,queryAttachmentsSupported:e?.operations?.supportsQueryAttachments??!1,sourceSpatialReference:s,url:i})}set renderer(e){if((0,$.yp)(e,this.fieldsIndex),e)for(const t of e.symbols)if((0,re.wk)(t)){c.A.getLogger(this).warn("Sublayer renderer should use 2D symbols");break}this._setAndNotifyLayer("renderer",e)}get source(){return this._get("source")||new Y.f({mapLayerId:this.id})}set source(e){this._setAndNotifyLayer("source",e)}set sublayers(e){this._handleSublayersChange(e,this._get("sublayers")),this._set("sublayers",e)}castSublayers(e){return(0,S.dp)(n.A.ofType(L),e)}writeSublayers(e,t,r){this.sublayers?.length&&(t[r]=this.sublayers.map(e=>e.id).toArray().reverse())}readTitle(e,t){return t.layerDefinition?.name??t.name}readTypeIdField(e,t){let r=(t=t.layerDefinition||t).typeIdField;if(r&&t.fields){r=r.toLowerCase();const e=t.fields.find(e=>e.name.toLowerCase()===r);e&&(r=e.name)}return r}get url(){const e=this.layer?.parsedUrl??this._lastParsedUrl,t=this.source;if(!e)return null;if(this._lastParsedUrl=e,"map-layer"===t?.type)return`${e.path}/${t.mapLayerId}`;const r={layer:JSON.stringify({source:this.source})};return`${e.path}/dynamicLayer?${(0,f.x0)(r)}`}set url(e){this._overrideIfSome("url",e)}set visible(e){this._setAndNotifyLayer("visible",e)}writeVisible(e,t,r,i){t[r]=this.getAtOrigin("defaultVisibility","service")||e}clone(){const{store:e}=(0,I.oY)(this),t=new L;return(0,I.oY)(t).store=e.clone(ce),this.commitProperty("url"),t._lastParsedUrl=this._lastParsedUrl,t}createPopupTemplate(e){return(0,te.tn)(this,e)}createQuery(){return new ee.A({returnGeometry:!0,where:this.definitionExpression||"1=1"})}async createFeatureLayer(){if(this.hasOwnProperty("sublayers"))return null;const e=(await Promise.all([r.e(9953),r.e(1017),r.e(8506),r.e(8654),r.e(7694)]).then(r.bind(r,68654))).default,{layer:t,url:i}=this;let s;if(i&&this.originIdOf("url")>2)s=new e({url:i});else{if(!t?.parsedUrl)throw new a.A("createFeatureLayer:missing-information","Cannot create a FeatureLayer without a url or a parent layer");{const r=t.parsedUrl;s=new e({url:r.path}),r&&this.source&&("map-layer"===this.source.type?s.layerId=this.source.mapLayerId:s.dynamicDataSource=this.source)}}return null!=t?.refreshInterval&&(s.refreshInterval=t.refreshInterval),this.definitionExpression&&(s.definitionExpression=this.definitionExpression),this.floorInfo&&(s.floorInfo=(0,d.o8)(this.floorInfo)),this.originIdOf("labelingInfo")>2&&(s.labelingInfo=(0,d.o8)(this.labelingInfo)),this.originIdOf("labelsVisible")>0&&(s.labelsVisible=this.labelsVisible),this.originIdOf("legendEnabled")>0&&(s.legendEnabled=this.legendEnabled),this.originIdOf("visible")>0&&(s.visible=this.visible),this.originIdOf("minScale")>0&&(s.minScale=this.minScale),this.originIdOf("maxScale")>0&&(s.maxScale=this.maxScale),this.originIdOf("opacity")>0&&(s.opacity=this.opacity),this.originIdOf("popupTemplate")>0&&(s.popupTemplate=(0,d.o8)(this.popupTemplate)),this.originIdOf("renderer")>2&&(s.renderer=(0,d.o8)(this.renderer)),"data-layer"===this.source?.type&&(s.dynamicDataSource=this.source.clone()),this.originIdOf("title")>0&&(s.title=this.title),"map-image"===t?.type&&t.originIdOf("customParameters")>0&&(s.customParameters=t.customParameters),"tile"===t?.type&&t.originIdOf("customParameters")>0&&(s.customParameters=t.customParameters),s}getField(e){return this.fieldsIndex.get(e)}getFeatureType(e){return(0,q.xd)(this.types,this.typeIdField,e)}getFieldDomain(e,t){const r=t?.feature,i=this.getFeatureType(r);if(i){const t=i.domains&&i.domains[e];if(t&&"inherited"!==t.type)return t}return this._getLayerDomain(e)}async queryAttachments(e,t){await this.load(),e=W.A.from(e);const r=this.capabilities;if(!r?.data?.supportsAttachment)throw new a.A("queryAttachments:not-supported","this layer doesn't support attachments");const{attachmentTypes:i,objectIds:s,globalIds:o,num:n,size:l,start:u,where:d}=e;if(!r?.operations?.supportsQueryAttachments&&(i?.length>0||o?.length>0||l?.length>0||n||u||d))throw new a.A("queryAttachments:option-not-supported","when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",e);if(!(s?.length||o?.length||d))throw new a.A("queryAttachments:invalid-query","'objectIds', 'globalIds', or 'where' are required to perform attachment query",e);return!r?.attachment?.supportsOrderByFields&&e.orderByFields?.length&&((e=e.clone()).orderByFields=null),this.queryTask.executeAttachmentQuery(e,t)}async queryFeatureCount(e=this.createQuery(),t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new a.A("queryFeatureCount:not-supported","this layer doesn't support queries.");if(!this.url)throw new a.A("queryFeatureCount:not-supported","this layer has no url.");const r=this.layer?.apiKey;return await this.queryTask.executeForCount(e,{...t,query:{...this.layer?.customParameters,token:r}})}async queryFeatures(e=this.createQuery(),t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new a.A("queryFeatures:not-supported","this layer doesn't support queries.");if(!this.url)throw new a.A("queryFeatures:not-supported","this layer has no url.");const r=await this.queryTask.execute(e,{...t,query:{...this.layer?.customParameters,token:this.layer?.apiKey}});if(r?.features){const e=this.graphicOrigin;for(const t of r.features)t.sourceLayer=this,t.origin=e}return r}async queryObjectIds(e=this.createQuery(),t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new a.A("queryObjectIds:not-supported","this layer doesn't support queries.");if(!this.url)throw new a.A("queryObjectIds:not-supported","this layer has no url.");const r=this.layer?.apiKey;return await this.queryTask.executeForIds(e,{...t,query:{...this.layer?.customParameters,token:r}})}async queryRelatedFeatures(e,t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new a.A("queryRelatedFeatures:not-supported","this layer doesn't support queries.");if(!this.url)throw new a.A("queryRelatedFeatures:not-supported","this layer has no url.");const r=this.layer?.apiKey;return await this.queryTask.executeRelationshipQuery(e,{...t,query:{...this.layer?.customParameters,token:r}})}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new a.A("queryRelatedFeaturesCount:not-supported","this layer doesn't support queries.");if(!this.capabilities.queryRelated.supportsCount)throw new a.A("queryRelatedFeaturesCount:not-supported","this layer doesn't support query related counts.");if(!this.url)throw new a.A("queryRelatedFeaturesCount:not-supported","this layer has no url.");const r=this.layer?.apiKey;return await this.queryTask.executeRelationshipQueryForCount(e,{...t,query:{...this.layer?.customParameters,token:r}})}async reload(e){if("not-loaded"===this.loadStatus)return this.load(e).then(()=>{});const{layer:t,url:r}=this;if(!t&&!r)throw new a.A("sublayer:missing-layer","Sublayer can't be loaded without being part of a layer",{sublayer:this});const i=t?await t.fetchSublayerInfo(this,e):(await(0,o.A)(r,{query:{f:"json"},...e})).data;i&&(this.sourceJSON=i,this.read({layerDefinition:i},{origin:"service",layer:t,url:(0,X.Dl)(r)}))}toExportImageJSON(e){const t={id:this.id,source:this.source?.toJSON()||{mapLayerId:this.id,type:"mapLayer"}},r=(0,h.mA)(e,this.definitionExpression);null!=r&&(t.definitionExpression=r);const i=["renderer","labelingInfo","opacity","labelsVisible"].reduce((e,t)=>(e[t]=this.originIdOf(t),e),{}),s=Object.keys(i).some(e=>i[e]>2);if(s){const e=t.drawingInfo={};if(i.renderer>2&&(e.renderer=this.renderer?this.renderer.toJSON():null),i.labelsVisible>2&&(e.showLabels=this.labelsVisible),this.labelsVisible&&i.labelingInfo>2)if(this.labelingInfo){!this.loaded&&this.labelingInfo?.some(e=>!e.labelPlacement)&&c.A.getLogger(this).warnOnce(`A Sublayer (title: ${this.title}, id: ${this.id}) has an undefined 'labelPlacement' and so labels cannot be displayed. Either define a valid 'labelPlacement' or call Sublayer.load() to use a default value based on geometry type.`,{sublayer:this});let t=this.labelingInfo;null!=this.geometryType&&(t=(0,z.z)(this.labelingInfo,A.gy.toJSON(this.geometryType))),e.showLabels=!0,e.labelingInfo=t.filter(e=>e.labelPlacement).map(e=>e.toJSON({origin:"service",layer:this.layer}))}else e.showLabels=!1;i.opacity>2&&(e.transparency=100-100*this.opacity),this._assignDefaultSymbolColors(e.renderer)}return(this.layer?.capabilities?.exportMap?.supportsSublayerOrderBy??!1)&&this.originIdOf("orderBy")>2&&(t.orderBy=this.orderBy?.map(e=>e.toJSON())??null),t}_assignDefaultSymbolColors(e){this._forEachSimpleMarkerSymbols(e,e=>{e.color||"esriSMSX"!==e.style&&"esriSMSCross"!==e.style||(e.outline?.color?e.color=e.outline.color:e.color=[0,0,0,0])})}_forEachSimpleMarkerSymbols(e,t){if(e){const r=("uniqueValueInfos"in e?e.uniqueValueInfos:"classBreakInfos"in e?e.classBreakInfos:null)??[];for(const e of r)se(e.symbol)&&t(e.symbol);"symbol"in e&&se(e.symbol)&&t(e.symbol),"defaultSymbol"in e&&se(e.defaultSymbol)&&t(e.defaultSymbol)}}_setAndNotifyLayer(e,t){const r=this.layer,i=this._get(e);let s,o;switch(e){case"definitionExpression":case"floorInfo":s="supportsSublayerDefinitionExpression";break;case"minScale":case"maxScale":case"visible":s="supportsSublayerVisibility";break;case"labelingInfo":case"labelsVisible":case"opacity":case"renderer":case"source":s="supportsDynamicLayers",o="supportsModification";break;case"orderBy":s="supportsSublayerOrderBy",o="supportsModification"}const n=(0,I.oY)(this).getDefaultOrigin();if("service"!==n){if(s&&!1===this.layer?.capabilities?.exportMap?.[s])return void this._logLockedError(e,`capability not available 'layer.capabilities.exportMap.${s}'`);if(o&&!1===this.capabilities?.exportMap[o])return void this._logLockedError(e,`capability not available 'capabilities.exportMap.${o}'`)}"source"!==e||"not-loaded"===this.loadStatus?(this._set(e,t),"service"!==n&&i!==t&&r?.emit&&r.emit("sublayer-update",{propertyName:e,target:this})):this._logLockedError(e,"'source' can't be changed after calling sublayer.load()")}_handleSublayersChange(e,t){t&&(t.forEach(e=>{e.parent=null,e.layer=null}),this.removeAllHandles()),e&&(e.forEach(e=>{e.parent=this,e.layer=this.layer}),this.addHandles([e.on("after-add",({item:e})=>{e.parent=this,e.layer=this.layer}),e.on("after-remove",({item:e})=>{e.parent=null,e.layer=null}),e.on("before-changes",e=>{(this.layer?.capabilities?.exportMap?.supportsSublayersChanges??1)||(c.A.getLogger(this).error(new a.A("sublayer:sublayers-non-modifiable","Sublayer can't be added, moved, or removed from the layer's sublayers",{sublayer:this,layer:this.layer})),e.preventDefault())})]))}_logLockedError(e,t){const{layer:r,declaredClass:i}=this;c.A.getLogger(i).error(new a.A("sublayer:locked",`Property '${String(e)}' can't be changed on Sublayer from the layer '${r?.id}'`,{reason:t,sublayer:this,layer:r}))}_getLayerDomain(e){return this.fieldsIndex.get(e)?.domain??null}static{this.test={isMapImageLayerOverridePolicy:e=>e===ue||e===le||e===ne,isTileImageLayerOverridePolicy:e=>e===ae}}};(0,i.Cg)([(0,m.MZ)({type:ie.A,json:{name:"attributeTableInfo",write:{overridePolicy:ne},origins:{"web-scene":{write:!1}}}})],ye.prototype,"attributeTableTemplate",void 0),(0,i.Cg)([(0,m.MZ)({readOnly:!0})],ye.prototype,"capabilities",void 0),(0,i.Cg)([(0,b.w)("service","capabilities",["layerDefinition.canModifyLayer","layerDefinition.capabilities"])],ye.prototype,"readCapabilities",null),(0,i.Cg)([(0,m.MZ)()],ye.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,m.MZ)({type:String,value:null,json:{name:"layerDefinition.definitionExpression",write:{allowNull:!0,overridePolicy:ne}}})],ye.prototype,"definitionExpression",null),(0,i.Cg)([(0,m.MZ)({readOnly:!0})],ye.prototype,"effectiveScaleRange",null),(0,i.Cg)([(0,b.w)("service","maxScaleRange",["minScale","maxScale"])],ye.prototype,"readMaxScaleRange",null),(0,i.Cg)([(0,m.MZ)({type:[N.A],json:{origins:{service:{read:{source:"layerDefinition.fields"}}}}})],ye.prototype,"fields",void 0),(0,i.Cg)([(0,m.MZ)({readOnly:!0})],ye.prototype,"fieldsIndex",null),(0,i.Cg)([(0,m.MZ)({type:Q.A,value:null,json:{name:"layerDefinition.floorInfo",read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo",overridePolicy:ne},origins:{"web-scene":{read:!1,write:!1}}}})],ye.prototype,"floorInfo",null),(0,i.Cg)([(0,m.MZ)({type:x.A,json:{read:{source:"layerDefinition.extent"}}})],ye.prototype,"fullExtent",void 0),(0,i.Cg)([(0,m.MZ)({type:A.gy.apiValues,json:{origins:{service:{name:"layerDefinition.geometryType",read:{reader:A.gy.read}}}}})],ye.prototype,"geometryType",void 0),(0,i.Cg)([(0,m.MZ)({type:String})],ye.prototype,"globalIdField",void 0),(0,i.Cg)([(0,b.w)("service","globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"])],ye.prototype,"readGlobalIdFieldFromService",null),(0,i.Cg)([(0,m.MZ)({readOnly:!0})],ye.prototype,"graphicOrigin",null),(0,i.Cg)([(0,m.MZ)({type:S.jz,json:{write:{ignoreOrigin:!0}}})],ye.prototype,"id",null),(0,i.Cg)([(0,m.MZ)({readOnly:!0})],ye.prototype,"isTable",void 0),(0,i.Cg)([(0,b.w)("service","isTable",["type"])],ye.prototype,"readIsTable",null),(0,i.Cg)([(0,m.MZ)({value:null,type:[B.A],json:{read:{source:"layerDefinition.drawingInfo.labelingInfo"},write:{target:"layerDefinition.drawingInfo.labelingInfo",overridePolicy:ue}}})],ye.prototype,"labelingInfo",null),(0,i.Cg)([(0,v.K)("labelingInfo")],ye.prototype,"writeLabelingInfo",null),(0,i.Cg)([(0,m.MZ)({type:Boolean,value:!0,json:{read:{source:"layerDefinition.drawingInfo.showLabels"},write:{target:"layerDefinition.drawingInfo.showLabels",overridePolicy:le}}})],ye.prototype,"labelsVisible",null),(0,i.Cg)([(0,m.MZ)({value:null})],ye.prototype,"layer",null),(0,i.Cg)([(0,m.MZ)({type:String,json:{write:{overridePolicy:ae}}})],ye.prototype,"layerItemId",void 0),(0,i.Cg)([(0,m.MZ)({type:Boolean,value:!0,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend",overridePolicy:de}}})],ye.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,m.MZ)({type:["show","hide","hide-children"],value:"show",json:{read:!1,write:!1,origins:{"web-scene":{read:!0,write:!0}}}})],ye.prototype,"listMode",null),(0,i.Cg)([(0,m.MZ)({type:Number,value:0,json:{write:{overridePolicy:le}}})],ye.prototype,"minScale",null),(0,i.Cg)([(0,b.w)("minScale",["minScale","layerDefinition.minScale"])],ye.prototype,"readMinScale",null),(0,i.Cg)([(0,m.MZ)({type:Number,value:0,json:{write:{overridePolicy:le}}})],ye.prototype,"maxScale",null),(0,i.Cg)([(0,b.w)("maxScale",["maxScale","layerDefinition.maxScale"])],ye.prototype,"readMaxScale",null),(0,i.Cg)([(0,m.MZ)()],ye.prototype,"objectIdField",void 0),(0,i.Cg)([(0,b.w)("service","objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"])],ye.prototype,"readObjectIdFieldFromService",null),(0,i.Cg)([(0,m.MZ)({type:Number,value:1,json:{write:{target:"layerDefinition.drawingInfo.transparency",overridePolicy:le}}})],ye.prototype,"opacity",null),(0,i.Cg)([(0,b.w)("opacity",["layerDefinition.drawingInfo.transparency","layerDefinition.transparency"])],ye.prototype,"readOpacity",null),(0,i.Cg)([(0,v.K)("opacity")],ye.prototype,"writeOpacity",null),(0,i.Cg)([(0,m.MZ)({value:null,type:[G.A],json:{name:"layerDefinition.orderBy",read:{reader:R.Rr},write:{overridePolicy:ne},origins:{"web-scene":{read:!1,write:!1}}}})],ye.prototype,"orderBy",null),(0,i.Cg)([(0,m.MZ)({json:{type:S.jz,write:{target:"parentLayerId",writerEnsuresNonNull:!0,overridePolicy:le}}})],ye.prototype,"parent",void 0),(0,i.Cg)([(0,v.K)("parent")],ye.prototype,"writeParent",null),(0,i.Cg)([(0,m.MZ)({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,t)=>!t.disablePopup},write:{target:"disablePopup",overridePolicy:de,writer(e,t,r){t[r]=!e}}}})],ye.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,m.MZ)({type:s.A,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy:de}}})],ye.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,m.MZ)({readOnly:!0})],ye.prototype,"queryTask",null),(0,i.Cg)([(0,m.MZ)({type:[J.A],readOnly:!0,json:{origins:{service:{read:{source:"layerDefinition.relationships"}}}}})],ye.prototype,"relationships",void 0),(0,i.Cg)([(0,m.MZ)({types:H.Hg,value:null,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:ue},origins:{"web-scene":{types:H.XJ,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:ue}}}}})],ye.prototype,"renderer",null),(0,i.Cg)([(0,m.MZ)({types:{key:"type",base:null,typeMap:{"data-layer":K.L,"map-layer":Y.f}},cast(e){if(e){if("mapLayerId"in e)return(0,S.PZ)(Y.f,e);if("dataSource"in e)return(0,S.PZ)(K.L,e)}return e},json:{name:"layerDefinition.source",write:{overridePolicy:le}}})],ye.prototype,"source",null),(0,i.Cg)([(0,m.MZ)()],ye.prototype,"sourceJSON",void 0),(0,i.Cg)([(0,m.MZ)({type:C.A,json:{origins:{service:{read:{source:"layerDefinition.extent.spatialReference"}}}}})],ye.prototype,"spatialReference",void 0),(0,i.Cg)([(0,m.MZ)({value:null,json:{type:[S.jz],write:{target:"subLayerIds",allowNull:!0,overridePolicy:le}}})],ye.prototype,"sublayers",null),(0,i.Cg)([(0,g.w)("sublayers")],ye.prototype,"castSublayers",null),(0,i.Cg)([(0,v.K)("sublayers")],ye.prototype,"writeSublayers",null),(0,i.Cg)([(0,m.MZ)({type:String,json:{name:"name",write:{overridePolicy:de}}})],ye.prototype,"title",void 0),(0,i.Cg)([(0,b.w)("service","title",["name","layerDefinition.name"])],ye.prototype,"readTitle",null),(0,i.Cg)([(0,m.MZ)({type:String})],ye.prototype,"typeIdField",void 0),(0,i.Cg)([(0,m.MZ)({json:{read:!1},readOnly:!0,value:"sublayer"})],ye.prototype,"type",void 0),(0,i.Cg)([(0,b.w)("typeIdField",["layerDefinition.typeIdField"])],ye.prototype,"readTypeIdField",null),(0,i.Cg)([(0,m.MZ)({type:[V.A],json:{origins:{service:{read:{source:"layerDefinition.types"}}}}})],ye.prototype,"types",void 0),(0,i.Cg)([(0,m.MZ)({type:String,json:{name:"layerUrl",write:{overridePolicy:ae}}})],ye.prototype,"url",null),(0,i.Cg)([(0,m.MZ)({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"},write:{target:"defaultVisibility",overridePolicy:le}}})],ye.prototype,"visible",null),(0,i.Cg)([(0,v.K)("visible")],ye.prototype,"writeVisible",null),ye=L=(0,i.Cg)([(0,w.$)("esri.layers.support.Sublayer")],ye)},28132:(e,t,r)=>{r.d(t,{A:()=>P});var i=r(31635),s=r(65008),o=r(49186),n=r(44208),a=r(74887),l=r(84952),u=r(10107),d=(r(53966),r(87811),r(40608)),p=r(21325),c=r(20557),y=r(27733),h=r(2272),f=r(20615),m=r(5443),g=r(80893),b=r(61956),w=r(78286),v=r(99199),S=r(97768),_=r(62815),I=r(90708);function x(e,t){return t}function C(e,t,r,i){switch(r){case 0:return M(e,t+i,0);case 1:return"lowerLeft"===e.originPosition?M(e,t+i,1):function({translate:e,scale:t},r,i){return e[i]-r*t[i]}(e,t+i,1)}}function A(e,t,r,i){return 2===r?M(e,t,2):C(e,t,r,i)}function F(e,t,r,i){return 2===r?0===t?0:M(e,t,3):C(e,t,r,i)}function T(e,t,r,i){return 3===r?0===t?0:M(e,t,3):A(e,t,r,i)}function M({translate:e,scale:t},r,i){return e[i]+r*t[i]}class O{constructor(e){this._options=e,this.geometryTypes=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"],this._previousCoordinate=[0,0],this._transform=null,this._applyTransform=x,this._lengths=[],this._currentLengthIndex=0,this._toAddInCurrentPath=0,this._vertexDimension=0,this._mValueOffset=null,this._coordinateBuffer=null,this._coordinateBufferPtr=0,this._attributesConstructor=class{}}createFeatureResult(){return{fields:[],features:[]}}finishFeatureResult(e){if(this._options.applyTransform&&(e.transform=null),this._attributesConstructor=class{},this._coordinateBuffer=null,this._lengths.length=0,!e.hasZ)return;const t=(0,_.N)(e.geometryType,this._options.sourceSpatialReference,e.spatialReference);if(null!=t)for(const r of e.features)t(r.geometry)}createSpatialReference(){return{}}addField(e,t){const r=e.fields;(0,S.Lw)(r),r.push(t);const i=r.map(e=>e.name);this._attributesConstructor=function(){for(const e of i)this[e]=null}}addFeature(e,t){e.features.push(t)}prepareFeatures(e){switch(this._transform=e.transform,this._options.applyTransform&&e.transform&&(this._applyTransform=this._deriveApplyTransform(e)),this._mValueOffset=null,this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&(this._mValueOffset=this._vertexDimension,this._vertexDimension++),e.geometryType){case"esriGeometryPoint":this.addCoordinate=(e,t,r)=>this.addCoordinatePoint(e,t,r),this.createGeometry=e=>this.createPointGeometry(e);break;case"esriGeometryPolygon":this.addCoordinate=(e,t,r)=>this._addCoordinatePolygon(e,t,r),this.createGeometry=e=>this._createPolygonGeometry(e);break;case"esriGeometryPolyline":this.addCoordinate=(e,t,r)=>this._addCoordinatePolyline(e,t,r),this.createGeometry=e=>this._createPolylineGeometry(e);break;case"esriGeometryMultipoint":this.addCoordinate=(e,t,r)=>this._addCoordinateMultipoint(e,t,r),this.createGeometry=e=>this._createMultipointGeometry(e)}}createFeature(){return this._lengths.length=0,this._currentLengthIndex=0,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,{attributes:new this._attributesConstructor}}allocateCoordinates(){}addLength(e,t,r){0===this._lengths.length&&(this._toAddInCurrentPath=t),this._lengths.push(t)}addQueryGeometry(e,t){const{queryGeometry:r,queryGeometryType:i}=t,s=this._transform?(0,I.Ch)(r.clone(),r,!1,!1,this._transform):r.clone(),o=(0,I.zv)(s,i,!1,!1);e.queryGeometryType=i,e.queryGeometry={...o}}createPointGeometry(e){const t={x:0,y:0,spatialReference:e.spatialReference};return e.hasZ&&(t.z=0),e.hasM&&(t.m=0),t}addCoordinatePoint(e,t,r){const i=this._transform;switch(t=this._applyTransform(i,t,r,0),r){case 0:e.x=t;break;case 1:e.y=t;break;case 2:"z"in e?e.z=t:e.m=t;break;case 3:e.m=t}}_transformPathLikeValue(e,t){let r=0;t<=1&&(r=this._previousCoordinate[t],this._previousCoordinate[t]+=e);const i=this._transform;return null!==this._mValueOffset&&0===e&&t>0&&!(t%this._mValueOffset)?0:this._applyTransform(i,e,t,r)}_addCoordinatePolyline(e,t,r){this._dehydratedAddPointsCoordinate(e.paths,t,r)}_addCoordinatePolygon(e,t,r){this._dehydratedAddPointsCoordinate(e.rings,t,r)}_addCoordinateMultipoint(e,t,r){0===r&&e.points.push([]);const i=this._transformPathLikeValue(t,r);e.points[e.points.length-1].push(i)}_createPolygonGeometry(e){return{rings:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createPolylineGeometry(e){return{paths:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createMultipointGeometry(e){return{points:[],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_dehydratedAddPointsCoordinate(e,t,r){0===r&&0===this._toAddInCurrentPath--&&(e.push([]),this._toAddInCurrentPath=this._lengths[++this._currentLengthIndex]-1,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0);const i=this._transformPathLikeValue(t,r),s=e[e.length-1];0===r&&(this._coordinateBufferPtr=0,this._coordinateBuffer=new Array(this._vertexDimension),s.push(this._coordinateBuffer)),this._coordinateBuffer[this._coordinateBufferPtr++]=i}_deriveApplyTransform(e){const{hasZ:t,hasM:r}=e;return t&&r?T:t?A:r?F:C}}var D=r(22671);let P=class extends s.A{constructor(e){super(e),this.dynamicDataSource=null,this.fieldsIndex=null,this.gdbVersion=null,this.infoFor3D=null,this.pbfSupported=!1,this.queryAttachmentsSupported=!1,this.sourceSpatialReference=null,this.uniqueIdFields=null,this.url=null}get parsedUrl(){return(0,l.An)(this.url)}async execute(e,t){const r=await this.executeJSON(e,t);return this.featureSetFromJSON(e,r,t)}async executeJSON(e,t){const r=this._normalizeQuery(e),i=null!=e.outStatistics?.[0],s=(0,n.A)("featurelayer-pbf-statistics"),o=(!i||s)&&!0!==e.returnTrueCurves;let a;if(this.pbfSupported&&o)try{a=await async function(e,t,r,i){const s=(0,h.Dl)(e),o={...r},n=b.A.from(t),a=!n.quantizationParameters,{data:l}=await(0,g.IJ)(s,n,new O({sourceSpatialReference:n.sourceSpatialReference,applyTransform:a}),o,i);return l}(this.url,r,t,{uniqueIdFields:this.uniqueIdFields})}catch(e){if("query:parsing-pbf"!==e.name)throw e;this.pbfSupported=!1}return this.pbfSupported&&o||(a=await(0,v.e)(this.url,r,t,{uniqueIdFields:this.uniqueIdFields})),this._normalizeFields(a.fields),a}async featureSetFromJSON(e,t,i){if(!this._queryIs3DObjectFormat(e)||null==this.infoFor3D||!t.features)return D.A.fromJSON(t);const{meshFeatureSetFromJSON:s}=await(0,a.qr)(Promise.all([r.e(8487),r.e(36),r.e(5066)]).then(r.bind(r,40050)),i);return s(e,this.infoFor3D,t)}executeForCount(e,t){return(0,f.I)(this.url,this._normalizeQuery(e),t,{uniqueIdFields:this.uniqueIdFields})}executeForExtent(e,t){return async function(e,t,r){const i=(0,h.Dl)(e),s=await(0,g.Jf)(i,b.A.from(t),{...r}),o=s.data.extent;return!o||isNaN(o.xmin)||isNaN(o.ymin)||isNaN(o.xmax)||isNaN(o.ymax)?{count:s.data.count,extent:null}:{count:s.data.count,extent:m.A.fromJSON(o)}}(this.url,this._normalizeQuery(e),t)}executeForIds(e,t){return(0,w.V)(this.url,this._normalizeQuery(e),t,{uniqueIdFields:this.uniqueIdFields})}async executeRelationshipQuery(e,t){const[{default:i},{executeRelationshipQuery:s}]=await(0,a.qr)(Promise.all([Promise.resolve().then(r.bind(r,26591)),r.e(5257).then(r.bind(r,15257))]),t);return e=i.from(e),(this.gdbVersion||this.dynamicDataSource)&&((e=e.clone()).gdbVersion=e.gdbVersion||this.gdbVersion,e.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource),s(this.url,e,t)}async executeRelationshipQueryForCount(e,t){const[{default:i},{executeRelationshipQueryForCount:s}]=await(0,a.qr)(Promise.all([Promise.resolve().then(r.bind(r,26591)),r.e(5257).then(r.bind(r,15257))]),t);return e=i.from(e),(this.gdbVersion||this.dynamicDataSource)&&((e=e.clone()).gdbVersion=e.gdbVersion||this.gdbVersion,e.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource),s(this.url,e,t)}async executeAttachmentQuery(e,t){const{executeAttachmentQuery:i,fetchAttachments:s,processAttachmentQueryResult:o}=await(0,a.qr)(r.e(9239).then(r.bind(r,9239)),t),n=(0,h.Dl)(this.url);return o(n,await(this.queryAttachmentsSupported?i(n,e,t):s(n,e,t)))}async executeAttributeBinsQuery(e,t){const{executeAttributeBinsQuery:i}=await(0,a.qr)(Promise.all([r.e(4575),r.e(3103)]).then(r.bind(r,33103)),t);return i(this.parsedUrl,e,t)}async executeTopFeaturesQuery(e,t){const{executeTopFeaturesQuery:i}=await(0,a.qr)(r.e(1273).then(r.bind(r,11273)),t);return i(this.parsedUrl,e,this.sourceSpatialReference,t)}async executeForTopIds(e,t){const{executeForTopIds:i}=await(0,a.qr)(r.e(1277).then(r.bind(r,21277)),t);return i(this.parsedUrl,e,t)}async executeForTopExtents(e,t){const{executeForTopExtents:i}=await(0,a.qr)(r.e(8018).then(r.bind(r,8018)),t);return i(this.parsedUrl,e,t)}async executeForTopCount(e,t){const{executeForTopCount:i}=await(0,a.qr)(r.e(980).then(r.bind(r,10980)),t);return i(this.parsedUrl,e,t)}_normalizeQuery(e){let t=b.A.from(e);t.sourceSpatialReference=t.sourceSpatialReference||this.sourceSpatialReference,(this.gdbVersion||this.dynamicDataSource)&&(t=t===e?t.clone():t,t.gdbVersion=e.gdbVersion||this.gdbVersion,t.dynamicDataSource=e.dynamicDataSource?y.L.from(e.dynamicDataSource):this.dynamicDataSource);const{infoFor3D:r}=this;if(null!=r&&this._queryIs3DObjectFormat(e)){if(t=t===e?t.clone():t,t.formatOf3DObjects=(0,c.Hz)(r),!t.formatOf3DObjects)throw new o.A("query:unsupported-3d-query-formats","Could not find any supported 3D object query format. Only supported formats are 3D_glb and 3D_gltf");if(t.outSpatialReference&&!(0,p.aI)(t.outSpatialReference,this.sourceSpatialReference))throw new o.A("query:unsupported-out-spatial-reference","3D object feature services do not support projection of geometries");if(null==t.outFields||!t.outFields.includes("*")){t=t===e?t.clone():t,null==t.outFields&&(t.outFields=[]);const{originX:i,originY:s,originZ:o,translationX:n,translationY:a,translationZ:l,scaleX:u,scaleY:d,scaleZ:p,rotationX:c,rotationY:y,rotationZ:h,rotationDeg:f}=r.transformFieldRoles;t.outFields.push(i,s,o,n,a,l,u,d,p,c,y,h,f)}}return t}_normalizeFields(e){if(null!=this.fieldsIndex&&null!=e)for(const t of e){const e=this.fieldsIndex.get(t.name);e&&Object.assign(t,e.toJSON())}}_queryIs3DObjectFormat(e){return null!=this.infoFor3D&&!0===e.returnGeometry&&"xyFootprint"!==e.multipatchOption&&!e.outStatistics}};(0,i.Cg)([(0,u.MZ)({type:y.L})],P.prototype,"dynamicDataSource",void 0),(0,i.Cg)([(0,u.MZ)()],P.prototype,"fieldsIndex",void 0),(0,i.Cg)([(0,u.MZ)()],P.prototype,"gdbVersion",void 0),(0,i.Cg)([(0,u.MZ)()],P.prototype,"infoFor3D",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],P.prototype,"parsedUrl",null),(0,i.Cg)([(0,u.MZ)()],P.prototype,"pbfSupported",void 0),(0,i.Cg)([(0,u.MZ)()],P.prototype,"queryAttachmentsSupported",void 0),(0,i.Cg)([(0,u.MZ)()],P.prototype,"sourceSpatialReference",void 0),(0,i.Cg)([(0,u.MZ)()],P.prototype,"uniqueIdFields",void 0),(0,i.Cg)([(0,u.MZ)({type:String})],P.prototype,"url",void 0),P=(0,i.Cg)([(0,d.$)("esri.layers.graphics.sources.support.QueryTask")],P)},29005:(e,t,r)=>{r.d(t,{A:()=>d});var i=r(31635),s=r(69540),o=r(66552),n=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608));const u=new o.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let d=class extends((0,s.OU)(n.o)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],d.prototype,"name",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],d.prototype,"description",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:u.read,write:u.write}})],d.prototype,"drawingTool",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],d.prototype,"prototype",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],d.prototype,"thumbnail",void 0),d=(0,i.Cg)([(0,l.$)("esri.layers.support.FeatureTemplate")],d)},32730:(e,t,r)=>{r.d(t,{BI:()=>m,D3:()=>h,XJ:()=>f,lc:()=>y,mX:()=>b,rU:()=>g,tH:()=>I});var i=r(799);const s="__begin__",o="__end__",n=new RegExp(s,"ig"),a=new RegExp(o,"ig"),l=new RegExp("^"+s,"i"),u=new RegExp(o+"$","i"),d='"',p=d+" + ",c=" + "+d;function y(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function h(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function f(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=y(e.labelExpression),t.type="conventional"),t}function m(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return b(t.expression);case"arcade":return t.expression}return null}function g(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(w);return t?.[1].trim()||null}(t.expression);case"arcade":return I(t.expression)}return null}function b(e){let t;return e?(t=(0,i.HC)(e,e=>s+'$feature["'+e+'"]'+o),t=l.test(t)?t.replace(l,""):d+t,t=u.test(t)?t.replace(u,""):t+d,t=t.replaceAll(n,p).replaceAll(a,c)):t='""',t}const w=/^\s*\{([^}]+)\}\s*$/i,v=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,S=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,_=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function I(e){if(!e)return null;let t=v.exec(e)||S.exec(e);return t?t[1]||t[3]:(t=_.exec(e),t?t[2]:null)}},32756:(e,t,r)=>{r.d(t,{Rr:()=>l,fY:()=>d,ne:()=>u});var i=r(31635),s=r(93637),o=r(10107),n=(r(44208),r(53966),r(87811),r(40608)),a=r(91880);function l(e,t,r){if(!e)return null;const i=e.find(e=>!!e.field);if(!i)return null;const s=new a.A;return s.read(i,r),[s]}const u={type:[a.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:l},write:{writer:function(e,t,r,i){const o=e.find(e=>!!e.field);o&&(0,s.sM)(r,[o.toJSON()],t)}}}},d=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,i.Cg)([(0,o.MZ)(u)],r.prototype,"orderBy",void 0),r=(0,i.Cg)([(0,n.$)("esri.layers.mixins.OrderedLayer")],r),r}},33143:(e,t,r)=>{r.d(t,{A:()=>c});var i=r(31635),s=r(69540),o=r(25482),n=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),l=r(40608),u=r(43937),d=r(80451),p=r(29005);let c=class extends((0,s.OU)(o.o)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,d.rS)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i.Cg)([(0,n.MZ)({json:{write:!0}})],c.prototype,"id",void 0),(0,i.Cg)([(0,n.MZ)({json:{write:!0}})],c.prototype,"name",void 0),(0,i.Cg)([(0,n.MZ)({json:{write:!0}})],c.prototype,"domains",void 0),(0,i.Cg)([(0,a.w)("domains")],c.prototype,"readDomains",null),(0,i.Cg)([(0,u.K)("domains")],c.prototype,"writeDomains",null),(0,i.Cg)([(0,n.MZ)({type:[p.A],json:{write:!0}})],c.prototype,"templates",void 0),c=(0,i.Cg)([(0,l.$)("esri.layers.support.FeatureType")],c)},33446:(e,t,r)=>{r.d(t,{C:()=>n,m:()=>o});var i=r(49186),s=r(74887);async function o(e,t,r){let o;try{o=await createImageBitmap(e)}catch(e){throw new i.A("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,s.Te)(r),o}async function n(e,t,r,o,n){let a;try{a=await createImageBitmap(e)}catch(e){throw new i.A("request:server",`Unable to load tile ${t}/${r}/${o}`,{error:e,level:t,row:r,col:o})}return(0,s.Te)(n),a}},37352:(e,t,r)=>{r.d(t,{A:()=>u});var i,s=r(31635),o=r(7762),n=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608));let u=i=class extends n.o{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new o.A}clone(){return new i({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,s.Cg)([(0,a.MZ)({type:String,json:{write:{isRequired:!0}}})],u.prototype,"floorField",void 0),(0,s.Cg)([(0,a.MZ)({json:{read:!1,write:!1}})],u.prototype,"viewAllMode",void 0),(0,s.Cg)([(0,a.MZ)({json:{read:!1,write:!1}})],u.prototype,"viewAllLevelIds",void 0),u=i=(0,s.Cg)([(0,l.$)("esri.layers.support.LayerFloorInfo")],u)},38961:(e,t,r)=>{r.d(t,{A:()=>u});var i=r(31635),s=r(7762),o=r(36708),n=r(10107),a=r(40608),l=r(80559);let u=class extends s.A{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,l.fm)(()=>this._refresh(),o.OH))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t)}_createNewInstance(e){return new s.A(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const i of t)if(i){if(r(i)){const t=this.indexOf(i,e);t>=0?t!==e&&this.reorder(i,e):this.add(i,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(i);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,i.Cg)([(0,n.MZ)()],u.prototype,"getCollections",void 0),(0,i.Cg)([(0,n.MZ)()],u.prototype,"getChildrenFunction",void 0),(0,i.Cg)([(0,n.MZ)()],u.prototype,"itemFilterFunction",void 0),u=(0,i.Cg)([(0,a.$)("esri.core.CollectionFlattener")],u)},41366:(e,t,r)=>{r.d(t,{K:()=>c,Q:()=>u});var i=r(31635),s=r(66552),o=r(53966),n=r(10107),a=(r(44208),r(87811),r(93223)),l=r(40608);const u=(0,s.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),d="percent-of-total",p="field",c=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,r=null!=this.normalizationTotal;return t||r?(e=t&&p||r&&d||null,t&&r&&o.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==p&&e!==d||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,i.Cg)([(0,n.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],r.prototype,"normalizationField",void 0),(0,i.Cg)([(0,n.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],r.prototype,"normalizationMaxValue",void 0),(0,i.Cg)([(0,n.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],r.prototype,"normalizationMinValue",void 0),(0,i.Cg)([(0,n.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],r.prototype,"normalizationTotal",void 0),(0,i.Cg)([(0,a.e)(u,{name:"parameters.normalizationType"})],r.prototype,"normalizationType",null),r=(0,i.Cg)([(0,l.$)("esri.rest.support.NormalizationBinParametersMixin")],r),r}},45067:(e,t,r)=>{r.d(t,{A:()=>p});var i=r(31635),s=r(69540),o=r(66552),n=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608));const u=new o.J({esriRelCardinalityOneToOne:"one-to-one",esriRelCardinalityOneToMany:"one-to-many",esriRelCardinalityManyToMany:"many-to-many"}),d=new o.J({esriRelRoleOrigin:"origin",esriRelRoleDestination:"destination"});let p=class extends((0,s.OU)(n.o)){constructor(e){super(e),this.cardinality=null,this.catalogId=null,this.composite=null,this.id=null,this.keyField=null,this.keyFieldInRelationshipTable=null,this.name=null,this.relatedTableId=null,this.relationshipTableId=null,this.role=null}};(0,i.Cg)([(0,a.MZ)({json:{read:u.read,write:u.write}})],p.prototype,"cardinality",void 0),(0,i.Cg)([(0,a.MZ)({json:{name:"catalogID"}})],p.prototype,"catalogId",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],p.prototype,"composite",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],p.prototype,"id",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],p.prototype,"keyField",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],p.prototype,"keyFieldInRelationshipTable",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],p.prototype,"name",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],p.prototype,"relatedTableId",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],p.prototype,"relationshipTableId",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:d.read,write:d.write}})],p.prototype,"role",void 0),p=(0,i.Cg)([(0,l.$)("esri.layers.support.Relationship")],p)},46140:(e,t,r)=>{r.d(t,{R:()=>s});var i=r(49186);let s=class e{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new e(this.major,this.minor,this._context)}static parse(t,r=""){const[s,o]=t.split("."),n=/^\s*\d+\s*$/;if(!s?.match||!n.test(s))throw new i.A((r&&r+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!o?.match||!n.test(o))throw new i.A((r&&r+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const a=parseInt(s,10),l=parseInt(o,10);return new e(a,l,r)}}},52136:(e,t,r)=>{r.d(t,{p:()=>n});var i=r(31635),s=r(10107),o=(r(44208),r(53966),r(87811),r(40608));const n=e=>{const t=e;let r=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i.Cg)([(0,s.MZ)({type:String})],r.prototype,"apiKey",null),r=(0,i.Cg)([(0,o.$)("esri.layers.mixins.APIKeyMixin")],r),r}},55674:(e,t,r)=>{r.d(t,{Ad:()=>y,Gj:()=>m,QY:()=>c,lL:()=>g,xR:()=>h});var i=r(66131),s=r(49186),o=(r(44208),r(44729)),n=r(15032),a=r(65864),l=r(95466),u=r(43668),d=r(98623);const p=["geometry","scale","timeProperties"];function c(e,t){if(null!=t)for(const r of p)t.hasArcadeDependency(r)&&e.add(r);return e}function y(e,t){return f.create(e,t,null,["$feature","$view"])}function h(e,t,r){return f.create(e,t,r,["$feature","$view","$config"])}class f{static async create(e,t,r,i){const{arcade:o,Dictionary:n}=await(0,u.l)();let a;try{a=o.parseScript(e)}catch(t){throw new s.A("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})}const l=o.scriptUsesGeometryEngine(a);l&&await o.enableGeometrySupport(),await o.loadDependentModules(new Set,a,null,!1,l);const d={vars:i.reduce((e,t)=>({...e,[t]:null}),{}),spatialReference:t,useAsync:!1},p=o.compileScript(a,d);let c=null;null!=r&&(c=new n(r),c.immutable=!0);const y=new n;return y.immutable=!1,y.setField("scale",0),new f(e,o,a,p,t,y,c,n)}constructor(e,t,r,i,s,o,n,a){this.script=e,this._arcade=t,this._syntaxTree=r,this._compiled=i,this._spatialReference=s,this._viewDict=o,this._configDict=n,this._dictionaryCtor=a,this._dependencies=new Map,this._featureReader=new m,this._dependencies.set("geometry",t.scriptTouchesGeometry(this._syntaxTree)),this._dependencies.set("scale",this._arcade.referencesMember(this._syntaxTree,"scale")),this._dependencies.set("timeProperties",this._arcade.scriptUsesViewProperties(this._syntaxTree,["timeProperties"]))}evaluate(e,t){const r=t.$view?.timeZone;if(t.$view){let e;if(this._viewDict.setField("scale",t.$view.scale),null!=t.$view.timeProperties){const{currentStart:s,currentEnd:o}=t.$view.timeProperties;e=new this._dictionaryCtor({currentStart:null!=s?null!=r?i.lY.epochToArcadeDate(s,r):i.lY.unknownEpochToArcadeDate(s):void 0,currentEnd:null!=o?null!=r?i.lY.epochToArcadeDate(o,r):i.lY.unknownEpochToArcadeDate(o):void 0,startIncluded:!0,endIncluded:!0})}this._viewDict.setField("timeProperties",e)}return this._compiled({vars:{$view:this._viewDict,$config:this._configDict,$feature:e},spatialReference:this._spatialReference,timeZone:r})}repurposeFeature(e,t){return this._featureReader.bind(e,t,this._spatialReference),this._featureReader}references(e){return this._dependencies.get(e)??!1}}class m{constructor(){this._boundTarget=null,this._boundSchema={fields:null,fieldsIndex:null,spatialReference:null,get geometryType(){return null},get objectIdField(){return null}},this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}bind(e,t,r){const i=t??new l.A(g(e.attributes));this._boundTarget=e,this._boundSchema.fields=i.fields,this._boundSchema.fieldsIndex=i,this._boundSchema.spatialReference=r}_getField(e){return this._boundSchema.fieldsIndex.get(e)}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(e){this._contextTimeZone=e}readArcadeFeature(){return this}hasField(e){return this._boundSchema.fieldsIndex.has(e)}geometry(){if("fromJSON"in this._boundTarget)return this._boundTarget.geometry;const e=(0,a.rS)(this._boundTarget.geometry);if(e){if(!this._boundSchema.spatialReference)throw new Error("InternalError: Expected spatial reference to be defined");e.spatialReference=this._boundSchema.spatialReference}return e}_hasGeometry(){return null!=this._boundTarget.geometry}isUnknownDateTimeField(e){return this._boundSchema.fieldsIndex.getTimeZone(e)===d.L5}field(e,t=!0){const r=this._getField(e);if(r){const t=this._boundTarget.attributes[r.name];if(null==t)return null;switch(r.type){case"date-only":case"esriFieldTypeDateOnly":return o.n.fromReader(t);case"time-only":case"esriFieldTypeTimeOnly":return n.k.fromReader(t);case"esriFieldTypeTimestampOffset":case"timestamp-offset":return i.lY.fromReaderAsTimeStampOffset(t);case"date":case"esriFieldTypeDate":return this.isUnknownDateTimeField(e)?i.lY.unknownEpochToArcadeDate(t):i.lY.epochToArcadeDate(t,this.contextTimeZone??d.qU);default:return t}}if(t)throw new Error(`Field ${e} does not exist`);return null}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this._boundSchema.fieldsIndex.fields.map(e=>e.name)}isEmpty(){return this._boundSchema.fields.length<=0&&!this._hasGeometry()}castToText(e=!1){return JSON.stringify(this._boundTarget)}gdbVersion(){return null}fullSchema(){return this._boundSchema}castAsJson(e=null){return{attributes:this._boundTarget.attributes,geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null}}castAsJsonAsync(e=null,t=null){return Promise.resolve(this.castAsJson(t))}}function g(e){const t=[];for(const r in e)t.push({name:r,alias:r,type:"string"==typeof e[r]?"esriFieldTypeString":"esriFieldTypeDouble"});return t}},58501:(e,t,r)=>{r.d(t,{q:()=>s});var i=r(62815);function s(e,t,r){if(!r?.features||!r.hasZ)return;const s=(0,i.N)(r.geometryType,t,e.outSpatialReference);if(null!=s)for(const e of r.features)s(e.geometry)}},63389:(e,t,r)=>{function i(e,t,r){const i=t.flatten(({sublayers:e})=>e).length;return i!==e.length||!!e.some(e=>e.originIdOf("minScale")>r||e.originIdOf("maxScale")>r||e.originIdOf("renderer")>r||e.originIdOf("labelingInfo")>r||e.originIdOf("opacity")>r||e.originIdOf("labelsVisible")>r||e.originIdOf("source")>r)||!o(e,t)}function s(e,t,r){return!!e.some(e=>{const t=e.source,i=!t||"map-layer"===t.type&&t.mapLayerId===e.id&&(null==t.gdbVersion||t.gdbVersion===r);e.commitProperty("renderer"),e.commitProperty("labelingInfo"),e.commitProperty("opacity"),e.commitProperty("labelsVisible"),e.commitProperty("orderBy");const s=e.layer?.capabilities?.exportMap?.supportsSublayerOrderBy??!1;return!i||e.originIdOf("renderer")>2||e.originIdOf("labelingInfo")>2||e.originIdOf("opacity")>2||e.originIdOf("labelsVisible")>2||s&&e.originIdOf("orderBy")>2})||!o(e,t)}function o(e,t){if(!e?.length||null==t)return!0;const r=t.slice().reverse().flatten(({sublayers:e})=>e&&e.toArray().reverse()).map(e=>e.id).toArray();if(e.length>r.length)return!1;let i=0;const s=r.length;for(const{id:t}of e){for(;i<s&&r[i]!==t;)i++;if(i>=s)return!1}return!0}function n(e){return!!e&&e.some(e=>null!=e.minScale||null!=e.layerDefinition?.minScale)}r.d(t,{Sk:()=>s,Zx:()=>i,_X:()=>n})},73681:(e,t,r)=>{r.d(t,{n:()=>l});var i=r(49186),s=r(53966),o=r(46140),n=r(95466),a=r(55674);class l{static async from(e,t,r){const n=e.dictionary_version?o.R.parse(e.dictionary_version):null,d=new Set(e.itemsNames),p={};if(t)for(const e in t)p[e]=t[e];if(e.authoringInfo.configuration)for(const t of e.authoringInfo.configuration)p.hasOwnProperty(t.name)||(p[t.name]=t.value);const c=new Set(e.authoringInfo.symbol);for(const e of Object.keys(r))c.delete(e);c.size&&s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:c});const y=await(0,a.xR)(e.expression,null,p);if(!y)throw new i.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");const h=!n||!n.greaterEqual(4,0);h&&s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:n});const f=new u(r,h);return new l(h,d,y,f)}constructor(e,t,r,i){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=i}get itemNames(){return this._itemNames}evaluate(e,t,r,i){try{return this._reader.bind(e,r,i),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new n.A(e);const t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new n.A(t)}}class u extends a.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){const t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);const t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},81583:(e,t,r)=>{r.d(t,{L:()=>a,g:()=>n});var i=r(60999),s=r(7762),o=r(92474);async function n(e,t){return await e.load(),a(e,t)}async function a(e,t){const r=[],n=(...e)=>{for(const t of e)null!=t&&(Array.isArray(t)?n(...t):s.A.isCollection(t)?t.forEach(e=>n(e)):(0,o.Zm)(t)&&r.push(t))};t(n);let a=null;if(await(0,i.Tj)(r,async e=>{const t=await(0,i.Ke)(function(e){return"loadAll"in e&&"function"==typeof e.loadAll}(e)?e.loadAll():e.load());!1!==t.ok||a||(a=t)}),a)throw a.error;return e}},91880:(e,t,r)=>{r.d(t,{A:()=>d});var i,s=r(31635),o=r(66552),n=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608));const u=new o.J({asc:"ascending",desc:"descending"});let d=class extends n.o{static{i=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,s.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],d.prototype,"field",void 0),(0,s.Cg)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],d.prototype,"valueExpression",void 0),(0,s.Cg)([(0,a.MZ)({type:u.apiValues,json:{type:u.jsonValues,read:u.read,write:u.write}})],d.prototype,"order",void 0),d=i=(0,s.Cg)([(0,l.$)("esri.layers.support.OrderByInfo")],d)},91921:(e,t,r)=>{r.d(t,{I:()=>g});var i=r(31635),s=r(7762),o=r(38961),n=r(49186),a=r(53966),l=r(36708),u=r(10107),d=(r(44208),r(87811),r(88620)),p=r(40608),c=r(35666),y=r(15775),h=r(63389);const f=s.A.ofType(y.A);function m(e,t){e&&e.forEach(e=>{t(e),e.sublayers&&e.sublayers.length&&m(e.sublayers,t)})}const g=e=>{const t=e;let r=class extends t{constructor(...e){super(...e),this.allSublayers=new o.A({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.sublayersSourceJSON={2:{},3:{},4:{},5:{},6:{}},this.subtables=null,this.addHandles([(0,l.wB)(()=>this.sublayers,(e,t)=>this._handleSublayersChange(e,t),l.OH),(0,l.wB)(()=>this.subtables,(e,t)=>this._handleSublayersChange(e,t),l.OH)])}destroy(){this.allSublayers.destroy()}readSublayers(e,t){if(!t||!e)return;const{sublayersSourceJSON:r}=this,i=(0,c.aB)(t.origin);if(i<2)return;if(r[i]={context:t,visibleLayers:e.visibleLayers||r[i].visibleLayers,layers:e.layers||r[i].layers},i>2)return;this._set("serviceSublayers",this.createSublayersForOrigin("service").sublayers);const{sublayers:s,origin:o}=this.createSublayersForOrigin("web-document"),n=(0,d.oY)(this);n.setDefaultOrigin(o),this._set("sublayers",new f(s)),n.setDefaultOrigin("user")}findSublayerById(e){return this.allSublayers.find(t=>t.id===e)}createServiceSublayers(){return this.createSublayersForOrigin("service").sublayers}createSublayersForOrigin(e){let t;const r=(0,c.aB)("web-document"===e?"web-map":e);let i=2,s=this.sublayersSourceJSON[2].layers,o=this.sublayersSourceJSON[2].context,n=null;const a=[3,4,5].filter(e=>e<=r);for(const e of a){const t=this.sublayersSourceJSON[e];(0,h._X)(t.layers)&&(i=e,s=t.layers,o=t.context,t.visibleLayers&&(n={visibleLayers:t.visibleLayers,context:t.context}))}const l=[3,4,5].filter(e=>e>i&&e<=r);let u=null;for(const e of l){const{layers:r,visibleLayers:i,context:s}=this.sublayersSourceJSON[e];r&&(u={layers:r,context:s},t??=e),i&&(n={visibleLayers:i,context:s})}const d=function(e,t){const r=[],i={};return e?(e.forEach(e=>{const s=new y.A;if(s.read(e,t),i[s.id]=s,null!=e.parentLayerId&&-1!==e.parentLayerId){const t=i[e.parentLayerId];t.sublayers||(t.sublayers=[]),t.sublayers.unshift(s)}else r.unshift(s)}),r):r}(s,o),p=new Map,g=new Set;if(u)for(const e of u.layers)p.set(e.id,e);if(n?.visibleLayers)for(const e of n.visibleLayers)g.add(e);return m(d,e=>{u&&e.read(p.get(e.id),u.context),n&&e.read({defaultVisibility:g.has(e.id)},n.context)}),{origin:(0,c.OL)(i),originWithPartialOverrides:t?(0,c.OL)(t):null,sublayers:new f({items:d})}}read(e,t){super.read(e,t),this.readSublayers(e,t)}_handleSublayersChange(e,t){t&&(t.forEach(e=>{e.parent=null,e.layer=null}),this.removeHandles("sublayers-owner")),e&&(e.forEach(e=>{e.parent=this,e.layer=this}),this.addHandles([e.on("after-add",({item:e})=>{e.parent=this,e.layer=this}),e.on("after-remove",({item:e})=>{e.parent=null,e.layer=null})],"sublayers-owner"),"tile"===this.type&&this.addHandles(e.on("before-changes",e=>{a.A.getLogger("esri.layers.TileLayer").error(new n.A("tilelayer:sublayers-non-modifiable","Sublayer can't be added, moved, or removed from the layer's sublayers",{layer:this})),e.preventDefault()}),"sublayers-owner"))}};return(0,i.Cg)([(0,u.MZ)({readOnly:!0})],r.prototype,"allSublayers",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0,type:s.A.ofType(y.A)})],r.prototype,"serviceSublayers",void 0),(0,i.Cg)([(0,u.MZ)({value:null,type:f,json:{read:!1,write:{allowNull:!0,ignoreOrigin:!0}}})],r.prototype,"sublayers",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],r.prototype,"sublayersSourceJSON",void 0),(0,i.Cg)([(0,u.MZ)({type:f,json:{read:{source:"tables"}}})],r.prototype,"subtables",void 0),r=(0,i.Cg)([(0,p.$)("esri.layers.mixins.SublayersOwner")],r),r}},98534:(e,t,r)=>{r.d(t,{V:()=>g});var i=r(31635),s=r(78888),o=r(91869),n=r(74887),a=r(84952),l=r(46140),u=r(10107),d=(r(44208),r(53966),r(87811),r(36005)),p=r(40608),c=r(5443),y=r(16930),h=r(60694),f=r(10873),m=r(10407);const g=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.capabilities=void 0,this.copyright=null,this.fullExtent=null,this.legendEnabled=!0,this.spatialReference=null,this.version=void 0,this._allLayersAndTablesMap=null}readCapabilities(e,t){const r=t.capabilities&&t.capabilities.split(",").map(e=>e.toLowerCase().trim());if(!r)return{operations:{supportsExportMap:!1,supportsExportTiles:!1,supportsIdentify:!1,supportsQuery:!1,supportsTileMap:!1},exportMap:null,exportTiles:null};const i=this.type,s="tile"!==i&&!!t.supportsDynamicLayers,o=r.includes("query"),n=r.includes("map"),a=!!t.exportTilesAllowed,u=r.includes("tilemap"),d=r.includes("data"),p="tile"!==i&&(!t.tileInfo||s),c="tile"!==i&&(!t.tileInfo||s),y="tile"!==i,h="tile"!==i&&s&&t.currentVersion>=11.1,f=t.cimVersion?l.R.parse(t.cimVersion):null,m=f?.greaterEqual(1,4)??!1,g=f?.greaterEqual(2,0)??!1;return{operations:{supportsExportMap:n,supportsExportTiles:a,supportsIdentify:o,supportsQuery:d,supportsTileMap:u},exportMap:n?{supportsArcadeExpressionForLabeling:m,supportsCIMSymbols:g,supportsDynamicLayers:s,supportsSublayerOrderBy:h,supportsSublayerDefinitionExpression:c,supportsSublayerVisibility:p,supportsSublayersChanges:y}:null,exportTiles:a?{maxExportTilesCount:+t.maxExportTilesCount}:null}}readVersion(e,t){let r=t.currentVersion;return r||(r=t.hasOwnProperty("capabilities")||t.hasOwnProperty("tables")?10:t.hasOwnProperty("supportedImageFormatTypes")?9.31:9.3),r}async fetchRelatedService(e){const t=this.portalItem;if(!t||!(0,m.bK)(t))return null;this._relatedFeatureServicePromise||(this._relatedFeatureServicePromise=t.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},e).then(e=>e.find(e=>"Feature Service"===e.type)??null,()=>null));const r=await this._relatedFeatureServicePromise;return(0,n.Te)(e),r?{itemId:r.id,url:r.url}:null}async fetchSublayerInfo(e,t){const{source:r}=e;if(this?.portalItem&&"tile"===this.type&&"map-layer"===r?.type&&(0,m.bK)(this.portalItem)&&e.originIdOf("url")<2){const i=await this.fetchRelatedService(t);i&&(e.url=(0,a.fj)(i.url,r.mapLayerId.toString()),e.layerItemId=i.itemId)}const{url:i}=e;let o;if("data-layer"===r.type)o=(await(0,s.A)(i,{responseType:"json",query:{f:"json",...this.customParameters,token:this.apiKey},...t})).data;else if(i&&e.originIdOf("url")>2)try{const e=await this._fetchAllLayersAndTablesFromService(i),t=(0,h.qg)(i)?.sublayer??r.mapLayerId;o=e.get(t)}catch{}else{let i=e.id;"map-layer"===r?.type&&(i=r.mapLayerId);try{o=(await this.fetchAllLayersAndTables(t)).get(i)}catch{}}return o}async fetchAllLayersAndTables(e){return this._fetchAllLayersAndTablesFromService(this.parsedUrl?.path,e)}async _fetchAllLayersAndTablesFromService(e,t){await this.load(t),this._allLayersAndTablesMap||=new Map;const r=(0,h.qg)(e),i=(0,o.tE)(this._allLayersAndTablesMap,r?.url.path,()=>(0,s.A)((0,a.fj)(r?.url.path,"/layers"),{responseType:"json",query:{f:"json",...this.customParameters,token:this.apiKey}}).then(e=>{const t=new Map,{layers:r,tables:i}=e.data,s=[...r??[],...i??[]];for(const e of s)t.set(e.id,e);return{result:t}},e=>({error:e}))),l=await i;if((0,n.Te)(t),"result"in l)return l.result;throw l.error}};return(0,i.Cg)([(0,u.MZ)({readOnly:!0})],r.prototype,"capabilities",void 0),(0,i.Cg)([(0,d.w)("service","capabilities",["capabilities","cimVersion","currentVersion","exportTilesAllowed","maxExportTilesCount","supportsDynamicLayers","tileInfo"])],r.prototype,"readCapabilities",null),(0,i.Cg)([(0,u.MZ)({json:{read:{source:"copyrightText"}}})],r.prototype,"copyright",void 0),(0,i.Cg)([(0,u.MZ)({type:c.A})],r.prototype,"fullExtent",void 0),(0,i.Cg)([(0,u.MZ)(f.id)],r.prototype,"id",void 0),(0,i.Cg)([(0,u.MZ)({type:Boolean,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend"}}})],r.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,u.MZ)(f.M6)],r.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,u.MZ)({type:y.A})],r.prototype,"spatialReference",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],r.prototype,"version",void 0),(0,i.Cg)([(0,d.w)("service","version",["currentVersion","capabilities","tables","supportedImageFormatTypes"])],r.prototype,"readVersion",null),r=(0,i.Cg)([(0,p.$)("esri.layers.mixins.ArcGISMapService")],r),r}}}]);