@arcgis/core 4.28.0-next.20230921 → 4.28.0-next.20230923

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 (415) hide show
  1. package/Graphic.js +1 -1
  2. package/PopupTemplate.js +1 -1
  3. package/TimeExtent.js +1 -1
  4. package/arcade/ArcadeDate.js +1 -1
  5. package/arcade/Feature.js +1 -1
  6. package/arcade/featureSetUtils.js +1 -1
  7. package/arcade/featureset/actions/Adapted.js +1 -1
  8. package/arcade/featureset/actions/GroupBy.js +1 -1
  9. package/arcade/featureset/support/FeatureSet.js +1 -1
  10. package/arcade/featureset/support/FeatureSetIterator.js +1 -1
  11. package/arcade/featureset/support/StatsField.js +1 -1
  12. package/arcade/featureset/support/sqlUtils.js +1 -1
  13. package/arcade/functions/convertdirection.js +1 -1
  14. package/arcade/functions/date.js +1 -1
  15. package/arcade/functions/featuresetbase.js +1 -1
  16. package/arcade/functions/featuresetstats.js +1 -1
  17. package/arcade/treeAnalysis.js +1 -1
  18. package/arcade.js +1 -1
  19. package/assets/esri/core/workers/RemoteClient.js +1 -1
  20. package/assets/esri/core/workers/chunks/02156fd04279f4d0fd3f.js +1 -0
  21. package/assets/esri/core/workers/chunks/07f6175b52366b2c28bd.js +1 -0
  22. package/assets/esri/core/workers/chunks/098073c3b2849f56dad8.js +1 -0
  23. package/assets/esri/core/workers/chunks/1186ba1947bd0c32f148.js +1 -0
  24. package/assets/esri/core/workers/chunks/186445b9fbedd261f684.js +1 -0
  25. package/assets/esri/core/workers/chunks/{580039dd491854ca325c.js → 21fc02f0d5716c4a7acd.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{dff1c3c38dda2bd1a9d6.js → 246a954347fe9318190e.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{c9dfb145f0c1d93e0fbd.js → 250bb6ae6f1992b5b4f9.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{314c307e30f308a40a28.js → 25b09e9c0511c8e1cf8a.js} +1 -1
  29. package/assets/esri/core/workers/chunks/2a0b3b52ecd787a613bc.js +1 -0
  30. package/assets/esri/core/workers/chunks/2bc9b55e655968229ef4.js +1 -0
  31. package/assets/esri/core/workers/chunks/2f0924e7aa89e689da4a.js +1 -0
  32. package/assets/esri/core/workers/chunks/3f218d65ec451b2a1027.js +1 -0
  33. package/assets/esri/core/workers/chunks/425b5733bb88e6efe242.js +1 -0
  34. package/assets/esri/core/workers/chunks/45d6b942cdccca2ce44a.js +1 -0
  35. package/assets/esri/core/workers/chunks/4bf1a7e82a68ccee0ee1.js +1 -0
  36. package/assets/esri/core/workers/chunks/4c110c7f4f940ec58010.js +1 -0
  37. package/assets/esri/core/workers/chunks/{bde89b2684b6185992ef.js → 4ed77097e69fa3096ce4.js} +1 -1
  38. package/assets/esri/core/workers/chunks/4fe5bac782a742d5b1c0.js +1 -0
  39. package/assets/esri/core/workers/chunks/{1cbaba30f55f00f7498b.js → 51324d042f469f3b8914.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{3f4e9b1663ec521bfe00.js → 542ce10e1872399790b4.js} +1 -1
  41. package/assets/esri/core/workers/chunks/54d2b7e2ac4ba883bee8.js +1 -0
  42. package/assets/esri/core/workers/chunks/54ecb6cae310818d1aa2.js +1 -0
  43. package/assets/esri/core/workers/chunks/57c932e289d89d97da4b.js +1 -0
  44. package/assets/esri/core/workers/chunks/{6403de6fc067cf8f7436.js → 592c1fb531f2be928e8a.js} +1 -1
  45. package/assets/esri/core/workers/chunks/59a807220d6f0dd18776.js +1 -0
  46. package/assets/esri/core/workers/chunks/59dff10d7ad2b1bf469e.js +1 -0
  47. package/assets/esri/core/workers/chunks/609a475ab395f2ce63e2.js +1 -0
  48. package/assets/esri/core/workers/chunks/612c485c5aad1548d708.js +1 -0
  49. package/assets/esri/core/workers/chunks/{2bb69d76a13564e8e455.js → 645ba2d5c10184632d23.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{332689bf60d246485993.js → 65186e168dd112ac6221.js} +1 -1
  51. package/assets/esri/core/workers/chunks/6b9248fb2d6aadbce7bb.js +1 -0
  52. package/assets/esri/core/workers/chunks/709465832d306e02df52.js +1 -0
  53. package/assets/esri/core/workers/chunks/72c5bd6f7b8541b8d69e.js +1 -0
  54. package/assets/esri/core/workers/chunks/{bbc0dcd316c5598bc9ad.js → 74368a5213def6c200a2.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{94188fe381239d48a975.js → 76483c9a8848f3106126.js} +1 -1
  56. package/assets/esri/core/workers/chunks/7aa58c96798447ce5907.js +1 -0
  57. package/assets/esri/core/workers/chunks/7d078b8b9997b5300c0a.js +1 -0
  58. package/assets/esri/core/workers/chunks/7fe641cf1467496e670a.js +1 -0
  59. package/assets/esri/core/workers/chunks/{df8f62beb36fb9d2ac81.js → 810c8d6ff19976fd1366.js} +1 -1
  60. package/assets/esri/core/workers/chunks/8458ed96f3e72814cef2.js +1 -0
  61. package/assets/esri/core/workers/chunks/{243a4eed107d363dfad8.js → 887652bbdb3b71d0a089.js} +1 -1
  62. package/assets/esri/core/workers/chunks/896bfda379cf620b63ec.js +1 -0
  63. package/assets/esri/core/workers/chunks/91c9f0d59eaed7a735ce.js +1 -0
  64. package/assets/esri/core/workers/chunks/{1f7e041140088f8ac489.js → 97073a60f0ea2a397165.js} +1 -1
  65. package/assets/esri/core/workers/chunks/97658ac749664a07c92d.js +1 -0
  66. package/assets/esri/core/workers/chunks/{1da74a306aa5b4eacaae.js → 9866bbaeaf885c2dcca9.js} +1 -1
  67. package/assets/esri/core/workers/chunks/a39ae87298ac674f129d.js +1 -0
  68. package/assets/esri/core/workers/chunks/a7b3048c19348540e004.js +1 -0
  69. package/assets/esri/core/workers/chunks/a8ca4b116909e47722f9.js +1 -0
  70. package/assets/esri/core/workers/chunks/{101f776316a85b708927.js → a99070ec4c06c435b744.js} +1 -1
  71. package/assets/esri/core/workers/chunks/ab145d13932d87dd7bf9.js +1 -0
  72. package/assets/esri/core/workers/chunks/{77c15b1c2729c780f75a.js → aeeeb386134b341d7ad2.js} +1 -1
  73. package/assets/esri/core/workers/chunks/{3ca759f72d3bb29e9ea9.js → af54b233f6d6ad70b4a3.js} +2 -2
  74. package/assets/esri/core/workers/chunks/b9146daae8457224fd08.js +1 -0
  75. package/assets/esri/core/workers/chunks/bcdd2e8841abcb4df6da.js +1 -0
  76. package/assets/esri/core/workers/chunks/be05cc0cdabd5e051045.js +1 -0
  77. package/assets/esri/core/workers/chunks/c5f5f37bef11c6fbdc40.js +1 -0
  78. package/assets/esri/core/workers/chunks/d414dba3179bcf75bc6b.js +1 -0
  79. package/assets/esri/core/workers/chunks/{b449d6bd5851187d419f.js → d6e5408f9fa6b4bcd118.js} +1 -1
  80. package/assets/esri/core/workers/chunks/d9fb500cbd0f04d219a3.js +1 -0
  81. package/assets/esri/core/workers/chunks/e0dd6789fb797e9b7206.js +1 -0
  82. package/assets/esri/core/workers/chunks/{6f271249e042086d5a16.js → e4e49deae8da74f629db.js} +1 -1
  83. package/assets/esri/core/workers/chunks/e5dcff7a4fa84ba09670.js +1 -0
  84. package/assets/esri/core/workers/chunks/{f508ccfde6425dabe9ac.js → ee0bf611d191103a7046.js} +1 -1
  85. package/assets/esri/core/workers/chunks/{ed1fbc1bc8d50453e2f5.js → f793cd41fcd022baeea2.js} +1 -1
  86. package/assets/esri/core/workers/chunks/fad6a7bb82a0a2df726f.js +1 -0
  87. package/assets/esri/themes/base/widgets/_FeatureForm.scss +2 -84
  88. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +2 -0
  89. package/assets/esri/themes/dark/main.css +1 -1
  90. package/assets/esri/themes/light/main.css +1 -1
  91. package/assets/esri/themes/light/view.css +1 -1
  92. package/chunks/arcade.js +1 -1
  93. package/config.js +1 -1
  94. package/core/Accessor.js +1 -1
  95. package/core/accessorSupport/diffUtils.js +1 -1
  96. package/core/has.js +1 -1
  97. package/core/number.js +1 -1
  98. package/core/reactiveUtils.js +1 -1
  99. package/core/sql/DateOnly.js +1 -1
  100. package/core/sql/WhereClause.js +1 -1
  101. package/core/sql.js +1 -1
  102. package/core/timeUtils.js +1 -1
  103. package/identity/IdentityForm.js +1 -1
  104. package/identity/IdentityModal.js +1 -1
  105. package/interfaces.d.ts +48 -203
  106. package/layers/LinkChartLayer.js +1 -1
  107. package/layers/OrientedImageryLayer.js +1 -1
  108. package/layers/SceneLayer.js +1 -1
  109. package/layers/graphics/applyEditsUtils.js +5 -0
  110. package/layers/graphics/editingSupport.js +1 -1
  111. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  112. package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
  113. package/layers/mixins/ArcGISImageService.js +1 -1
  114. package/layers/mixins/EditBusLayer.js +1 -1
  115. package/layers/orientedImagery/core/CameraOrientationLTP.js +1 -1
  116. package/layers/orientedImagery/core/ElevationSourceDefinitions.js +5 -0
  117. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  118. package/layers/orientedImagery/core/cameraOrientationFactory.js +1 -1
  119. package/layers/orientedImagery/core/utils.js +5 -0
  120. package/layers/orientedImagery/transformations/groundToImageUtils.js +1 -1
  121. package/layers/support/fieldProperties.js +1 -1
  122. package/layers/support/fieldUtils.js +1 -1
  123. package/layers/support/imageryRendererUtils.js +1 -1
  124. package/layers/support/kmlUtils.js +1 -1
  125. package/layers/support/rasterFunctions/BaseRasterFunction.js +1 -1
  126. package/layers/support/rasterFunctions/creators/createDataManagementFunctions.js +1 -1
  127. package/networks/Network.js +1 -1
  128. package/package.json +1 -1
  129. package/request.js +1 -1
  130. package/rest/featureService/FeatureService.js +1 -1
  131. package/rest/support/DirectionsFeatureSet.js +1 -1
  132. package/smartMapping/renderers/pieChart.js +1 -1
  133. package/smartMapping/renderers/relationship.js +1 -1
  134. package/smartMapping/renderers/support/utils.js +1 -1
  135. package/smartMapping/statistics/support/ageUtils.js +1 -1
  136. package/smartMapping/support/adapters/support/utils.js +1 -1
  137. package/smartMapping/support/utils.js +1 -1
  138. package/support/apiKeyUtils.js +1 -1
  139. package/support/arcadeUtils.js +1 -1
  140. package/support/revision.js +1 -1
  141. package/symbols/cim/cimAnalyzer.js +1 -1
  142. package/symbols/support/svgUtils.js +1 -1
  143. package/time/TimeReference.js +1 -1
  144. package/time/timeReferenceUtils.js +1 -1
  145. package/versionManagement/VersionManagementService.js +1 -1
  146. package/versionManagement/support/EditMomentStack.js +5 -0
  147. package/versionManagement/support/versionManagementUtils.js +1 -1
  148. package/views/2d/engine/Container.js +1 -1
  149. package/views/2d/engine/DisplayObject.js +1 -1
  150. package/views/2d/engine/ManagedCanvas.js +5 -0
  151. package/views/2d/engine/Stage.js +1 -1
  152. package/views/2d/engine/webgl/GroupContainer.js +1 -1
  153. package/views/2d/engine/webgl/Painter.js +1 -1
  154. package/views/2d/engine/webgl/WGLContainer.js +1 -1
  155. package/views/2d/engine/webgl/WorldExtentClipRenderer.js +1 -1
  156. package/views/2d/engine/webgl/effects/FeatureEffect.js +1 -1
  157. package/views/2d/engine/webgl/effects/HighlightEffect.js +1 -1
  158. package/views/2d/engine/webgl/effects/HittestEffectVTL.js +1 -1
  159. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  160. package/views/2d/interactive/editingTools/TransformTool.js +1 -1
  161. package/views/2d/layers/GeoRSSLayerView2D.js +1 -1
  162. package/views/2d/layers/MediaLayerView2D.js +1 -1
  163. package/views/2d/layers/TileLayerView2D.js +1 -1
  164. package/views/2d/layers/WMTSLayerView2D.js +1 -1
  165. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  166. package/views/2d/layers/features/tileRenderers/support/WGLFeatureView.js +1 -1
  167. package/views/2d/layers/graphics/BaseGraphicContainer.js +1 -1
  168. package/views/2d/layers/graphics/GraphicContainer.js +1 -1
  169. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  170. package/views/2d/layers/graphics/HighlightGraphicContainer.js +1 -1
  171. package/views/2d/layers/imagery/VectorFieldView2D.js +1 -1
  172. package/views/2d/layers/support/DisplayGL.js +1 -1
  173. package/views/2d/webglDeps.js +1 -1
  174. package/views/3d/glTF/loader.js +1 -1
  175. package/views/3d/interactive/editingTools/manipulations/MoveManipulation.js +1 -1
  176. package/views/3d/interactive/editingTools/transformGraphic/isSupportedGraphic.js +1 -1
  177. package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
  178. package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
  179. package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
  180. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  181. package/views/3d/layers/SceneLayerView3D.js +1 -1
  182. package/views/3d/layers/graphics/ElevationAligners.js +1 -1
  183. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  184. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  185. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  186. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  187. package/views/3d/layers/graphics/Labeler.js +1 -1
  188. package/views/3d/layers/graphics/graphicUtils.js +1 -1
  189. package/views/3d/layers/i3s/featureEditing.js +1 -1
  190. package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
  191. package/views/3d/state/ViewStateManager.js +1 -1
  192. package/views/3d/support/buffer/glUtil.js +1 -1
  193. package/views/3d/support/engineContent/line.js +1 -1
  194. package/views/3d/support/viewpointUtils.js +1 -1
  195. package/views/3d/webgl-engine/Stage.js +1 -1
  196. package/views/3d/webgl-engine/effects/RenderPluginInput.js +1 -1
  197. package/views/3d/webgl-engine/effects/blit/Blit.js +5 -0
  198. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  199. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
  200. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  201. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  202. package/views/3d/webgl-engine/lib/Geometry.js +1 -1
  203. package/views/3d/webgl-engine/lib/ModelDirtySet.js +1 -1
  204. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  205. package/views/3d/webgl-engine/lib/RenderSlot.js +1 -1
  206. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  207. package/views/3d/webgl-engine/lib/TextRenderer.js +1 -1
  208. package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
  209. package/views/3d/webgl-engine/lib/TextTextureFactory.js +1 -1
  210. package/views/3d/webgl-engine/lib/VertexAttribute.js +1 -1
  211. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  212. package/views/3d/webgl-engine/lib/edgeRendering/bufferLayouts.js +1 -1
  213. package/views/3d/webgl-engine/lib/edgeRendering/edgeProcessing.js +1 -1
  214. package/views/View.js +1 -1
  215. package/views/interactive/tooltip/TooltipContentWithHelpMessage.js +1 -1
  216. package/views/interactive/tooltip/TooltipEditableField.js +1 -1
  217. package/views/interactive/tooltip/constraintUtils.js +1 -1
  218. package/views/interactive/tooltip/content/Fields.js +1 -1
  219. package/views/interactive/tooltip/content/TooltipContentDrawCircle.js +1 -1
  220. package/views/interactive/tooltip/content/TooltipContentDrawMesh.js +1 -1
  221. package/views/interactive/tooltip/content/TooltipContentDrawPoint.js +1 -1
  222. package/views/interactive/tooltip/content/TooltipContentDrawPolygon.js +1 -1
  223. package/views/interactive/tooltip/content/TooltipContentDrawPolyline.js +1 -1
  224. package/views/interactive/tooltip/content/TooltipContentDrawRectangle.js +1 -1
  225. package/views/interactive/tooltip/content/TooltipContentExtentRotate.js +1 -1
  226. package/views/interactive/tooltip/content/TooltipContentExtentScale.js +1 -1
  227. package/views/interactive/tooltip/content/TooltipContentReshapeEdgeOffset.js +1 -1
  228. package/views/interactive/tooltip/content/TooltipContentTransformAbsolute.js +1 -1
  229. package/views/interactive/tooltip/content/TooltipContentTransformRotate.js +1 -1
  230. package/views/interactive/tooltip/content/TooltipContentTransformScale.js +1 -1
  231. package/views/interactive/tooltip/content/TooltipContentTranslateGraphic.js +1 -1
  232. package/views/interactive/tooltip/content/TooltipContentTranslateGraphicXY.js +1 -1
  233. package/views/interactive/tooltip/content/TooltipContentTranslateGraphicZ.js +1 -1
  234. package/views/interactive/tooltip/content/TooltipContentTranslateVertex.js +1 -1
  235. package/views/interactive/tooltip/content/TooltipContentTranslateVertexXY.js +1 -1
  236. package/views/interactive/tooltip/content/TooltipContentTranslateVertexZ.js +1 -1
  237. package/views/support/angularMeasurementUtils.js +1 -1
  238. package/views/ui/UI.js +1 -1
  239. package/views/webgl/ShaderTranspiler.js +1 -1
  240. package/views/webgl/Texture.js +1 -1
  241. package/views/webgl/contextUtils.js +1 -1
  242. package/webmap/InitialViewProperties.js +1 -1
  243. package/widgets/AreaMeasurement2D.js +1 -1
  244. package/widgets/AreaMeasurement3D.js +1 -1
  245. package/widgets/Attachments/AttachmentsViewModel.js +1 -1
  246. package/widgets/Attachments.js +1 -1
  247. package/widgets/Attribution.js +1 -1
  248. package/widgets/BasemapGallery.js +1 -1
  249. package/widgets/BasemapLayerList.js +1 -1
  250. package/widgets/BasemapToggle.js +1 -1
  251. package/widgets/Bookmarks.js +1 -1
  252. package/widgets/BuildingExplorer/BuildingDisciplinesTree/BuildingDisciplinesNode.js +1 -1
  253. package/widgets/BuildingExplorer/BuildingDisciplinesTree/BuildingDisciplinesTree.js +1 -1
  254. package/widgets/BuildingExplorer/BuildingLevelPicker/BuildingLevelPicker.js +1 -1
  255. package/widgets/BuildingExplorer/BuildingLevelPicker/Label.js +1 -1
  256. package/widgets/BuildingExplorer/BuildingLevelPicker/LevelItem.js +1 -1
  257. package/widgets/BuildingExplorer/BuildingPhasePicker/BuildingPhasePicker.js +1 -1
  258. package/widgets/BuildingExplorer.js +1 -1
  259. package/widgets/Compass.js +1 -1
  260. package/widgets/CoordinateConversion.js +1 -1
  261. package/widgets/Daylight/support/SliderWithDropdown.js +1 -1
  262. package/widgets/Daylight.js +1 -1
  263. package/widgets/DirectLineMeasurement3D.js +1 -1
  264. package/widgets/DirectionalPad.js +1 -1
  265. package/widgets/Directions/components/SaveLayer.js +1 -1
  266. package/widgets/Directions.js +1 -1
  267. package/widgets/DistanceMeasurement2D.js +1 -1
  268. package/widgets/Editor/components/FooterActions.js +1 -1
  269. package/widgets/Editor/components/Notices.js +1 -1
  270. package/widgets/Editor/components/PanelContent.js +1 -1
  271. package/widgets/Editor/components/PanelToolbar.js +1 -1
  272. package/widgets/Editor/components/Prompt.js +1 -1
  273. package/widgets/Editor/components/Settings.js +1 -1
  274. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  275. package/widgets/Editor/components/UploadDetails.js +1 -1
  276. package/widgets/Editor.js +1 -1
  277. package/widgets/ElevationProfile/components/LegendItem.js +1 -1
  278. package/widgets/ElevationProfile/components/SettingsButton.js +1 -1
  279. package/widgets/ElevationProfile/components/Statistics.js +1 -1
  280. package/widgets/ElevationProfile.js +1 -1
  281. package/widgets/Expand.js +1 -1
  282. package/widgets/Feature/FeatureContent.js +1 -1
  283. package/widgets/Feature/FeatureExpression.js +1 -1
  284. package/widgets/Feature/FeatureFields.js +1 -1
  285. package/widgets/Feature/FeatureMedia.js +1 -1
  286. package/widgets/Feature/FeatureRelationship.js +1 -1
  287. package/widgets/Feature/FeatureViewModel.js +1 -1
  288. package/widgets/Feature/support/FeatureContentMixin.js +1 -1
  289. package/widgets/Feature/support/FeatureElementInfo.js +1 -1
  290. package/widgets/Feature.js +1 -1
  291. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  292. package/widgets/FeatureForm/GroupInput.js +1 -1
  293. package/widgets/FeatureForm/css.js +1 -1
  294. package/widgets/FeatureForm.js +1 -1
  295. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  296. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  297. package/widgets/FeatureTable/Grid/support/ButtonMenu.js +1 -1
  298. package/widgets/FeatureTable.js +1 -1
  299. package/widgets/FeatureTemplates/ItemList.js +1 -1
  300. package/widgets/FeatureTemplates.js +1 -1
  301. package/widgets/Features/FeaturesRelatedRecords.js +1 -1
  302. package/widgets/Features.js +1 -1
  303. package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
  304. package/widgets/FloorFilter.js +1 -1
  305. package/widgets/Fullscreen.js +1 -1
  306. package/widgets/Histogram.js +1 -1
  307. package/widgets/HistogramRangeSlider.js +1 -1
  308. package/widgets/Home.js +1 -1
  309. package/widgets/LayerList/ListItemPanel.js +1 -1
  310. package/widgets/LayerList.js +1 -1
  311. package/widgets/Legend/LegendViewModel.js +1 -1
  312. package/widgets/Legend/styles/Card.js +1 -1
  313. package/widgets/Legend/styles/Classic.js +1 -1
  314. package/widgets/Legend/styles/support/relationshipUtils.js +1 -1
  315. package/widgets/Legend/styles/support/univariateUtils.js +1 -1
  316. package/widgets/LineOfSight.js +1 -1
  317. package/widgets/Locate.js +1 -1
  318. package/widgets/NavigationToggle.js +1 -1
  319. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  320. package/widgets/OrientedImageryViewer.js +1 -1
  321. package/widgets/Popup.js +1 -1
  322. package/widgets/Print.js +1 -1
  323. package/widgets/ScaleRangeSlider/scalePreviewUtils.js +1 -1
  324. package/widgets/ScaleRangeSlider.js +1 -1
  325. package/widgets/Search/SearchResultRenderer.js +1 -1
  326. package/widgets/Search.js +1 -1
  327. package/widgets/ShadowCast/components/DiscreteConfigurator.js +1 -1
  328. package/widgets/ShadowCast/components/DurationConfigurator.js +1 -1
  329. package/widgets/ShadowCast/components/ShadowTooltipContent.js +1 -1
  330. package/widgets/ShadowCast/components/ThresholdConfigurator.js +1 -1
  331. package/widgets/ShadowCast.js +1 -1
  332. package/widgets/Sketch.js +1 -1
  333. package/widgets/Slice.js +1 -1
  334. package/widgets/Slider.js +1 -1
  335. package/widgets/Swipe.js +1 -1
  336. package/widgets/TableList.js +1 -1
  337. package/widgets/TimeSlider.js +1 -1
  338. package/widgets/Track.js +1 -1
  339. package/widgets/UtilityNetworkAssociations/UtilityNetworkAssociationsLineSymbolPicker.js +1 -1
  340. package/widgets/UtilityNetworkAssociations.js +1 -1
  341. package/widgets/UtilityNetworkTrace.js +1 -1
  342. package/widgets/UtilityNetworkValidateTopology.js +1 -1
  343. package/widgets/ValuePicker.js +1 -1
  344. package/widgets/VideoPlayer/components/PlayerControlsGroup.js +1 -1
  345. package/widgets/VideoPlayer/components/SettingsButton.js +1 -1
  346. package/widgets/VideoPlayer.js +1 -1
  347. package/widgets/Weather/LabeledSlider.js +1 -1
  348. package/widgets/Weather.js +1 -1
  349. package/widgets/Zoom/IconButton.js +1 -1
  350. package/widgets/smartMapping/BinaryColorSizeSlider.js +1 -1
  351. package/widgets/smartMapping/ClassedColorSlider.js +1 -1
  352. package/widgets/smartMapping/ClassedSizeSlider.js +1 -1
  353. package/widgets/smartMapping/ColorSizeSlider.js +1 -1
  354. package/widgets/smartMapping/ColorSlider.js +1 -1
  355. package/widgets/smartMapping/HeatmapSlider.js +1 -1
  356. package/widgets/smartMapping/OpacitySlider.js +1 -1
  357. package/widgets/smartMapping/SizeSlider.js +1 -1
  358. package/widgets/smartMapping/SmartMappingSliderBase.js +1 -1
  359. package/widgets/support/ColorPicker.js +1 -1
  360. package/widgets/support/DatePicker.js +1 -1
  361. package/widgets/support/Heading.js +1 -1
  362. package/widgets/support/LabeledSwitch.js +1 -1
  363. package/widgets/support/MeasurementWidgetContent.js +1 -1
  364. package/widgets/support/Popover.js +1 -1
  365. package/widgets/support/SelectionToolbar.js +1 -1
  366. package/widgets/support/SketchTooltipControls.js +1 -1
  367. package/widgets/support/SnappingControls.js +1 -1
  368. package/widgets/support/TimePicker.js +1 -1
  369. package/widgets/support/TimezonePicker.js +1 -1
  370. package/widgets/support/UnitSelect.js +1 -1
  371. package/widgets/support/dateUtils.js +1 -1
  372. package/assets/esri/core/workers/chunks/072b4e041b8630c513a0.js +0 -1
  373. package/assets/esri/core/workers/chunks/092920c25cac89c038ee.js +0 -1
  374. package/assets/esri/core/workers/chunks/114269dda1d296893908.js +0 -1
  375. package/assets/esri/core/workers/chunks/126df6237fc80608344e.js +0 -1
  376. package/assets/esri/core/workers/chunks/1b3655f5bf5d90fa8730.js +0 -1
  377. package/assets/esri/core/workers/chunks/1c83f47d446f2bca1721.js +0 -1
  378. package/assets/esri/core/workers/chunks/1cf7bb514e7eefc3e9c6.js +0 -1
  379. package/assets/esri/core/workers/chunks/21a9c8aa2a9e9990df41.js +0 -1
  380. package/assets/esri/core/workers/chunks/24629402c647ef6b5f6b.js +0 -1
  381. package/assets/esri/core/workers/chunks/2a1c1be9c202462cf54d.js +0 -1
  382. package/assets/esri/core/workers/chunks/2cb36f9686693234991a.js +0 -1
  383. package/assets/esri/core/workers/chunks/2d0d03cbea83c868edba.js +0 -1
  384. package/assets/esri/core/workers/chunks/2e130cb2f1038055c07b.js +0 -1
  385. package/assets/esri/core/workers/chunks/3619e04cbb6691549014.js +0 -1
  386. package/assets/esri/core/workers/chunks/3dbfb4f370a874393822.js +0 -1
  387. package/assets/esri/core/workers/chunks/406db5c90271a3a203d4.js +0 -1
  388. package/assets/esri/core/workers/chunks/4369a6c1e0a82ab4db6a.js +0 -1
  389. package/assets/esri/core/workers/chunks/4f4a424d1747d04501df.js +0 -1
  390. package/assets/esri/core/workers/chunks/59c00d6fba0fd1c03d01.js +0 -1
  391. package/assets/esri/core/workers/chunks/5a5720caa64a46daadf9.js +0 -1
  392. package/assets/esri/core/workers/chunks/5edb99b58549cd66b394.js +0 -1
  393. package/assets/esri/core/workers/chunks/6203ddf6caad3d356327.js +0 -1
  394. package/assets/esri/core/workers/chunks/650a317b6dc245a7060f.js +0 -1
  395. package/assets/esri/core/workers/chunks/7a358b1fd0c0cce59e9b.js +0 -1
  396. package/assets/esri/core/workers/chunks/83d1a1b3d371c991cc4c.js +0 -1
  397. package/assets/esri/core/workers/chunks/846b7a81b870c8b238a1.js +0 -1
  398. package/assets/esri/core/workers/chunks/8ab832468300cc4feb5a.js +0 -1
  399. package/assets/esri/core/workers/chunks/bc1dc6383e60e7e61d50.js +0 -1
  400. package/assets/esri/core/workers/chunks/bc6323bdc98013da6fe5.js +0 -1
  401. package/assets/esri/core/workers/chunks/c4bb67150ccd01ea6014.js +0 -1
  402. package/assets/esri/core/workers/chunks/c60cf62f374e71e562fc.js +0 -1
  403. package/assets/esri/core/workers/chunks/c6ea5aac232d1eca04dd.js +0 -1
  404. package/assets/esri/core/workers/chunks/c8438c2d9ac48afe4033.js +0 -1
  405. package/assets/esri/core/workers/chunks/c8f239c25fe864f0e47a.js +0 -1
  406. package/assets/esri/core/workers/chunks/cad260881653567bc8f9.js +0 -1
  407. package/assets/esri/core/workers/chunks/d824f4b405a72cd2fa74.js +0 -1
  408. package/assets/esri/core/workers/chunks/dd7508d4016715371e0c.js +0 -1
  409. package/assets/esri/core/workers/chunks/e55f7fc7eff0074ce0fc.js +0 -1
  410. package/assets/esri/core/workers/chunks/eef27d305023034084a4.js +0 -1
  411. package/assets/esri/core/workers/chunks/f38c54ada9e7012a2960.js +0 -1
  412. package/assets/esri/core/workers/chunks/f5e0ff5292b9fd18fc92.js +0 -1
  413. package/assets/esri/core/workers/chunks/f5eb8b5021620be7538e.js +0 -1
  414. package/core/watchUtils.d.ts +0 -4
  415. package/core/watchUtils.js +0 -5
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4140,6030,3376],{48853:(e,t,n)=>{n.d(t,{Qn:()=>h,iG:()=>d});var r,i=n(19153),a=n(17126);class s{}s.instance=new a.vF("Etc/UTC"),(r||(r={})).TimeZoneNotRecognized="TimeZoneNotRecognized";const o={[r.TimeZoneNotRecognized]:"Timezone identifier has not been recognized."};class u extends Error{constructor(e,t){super((0,i.gx)(o[e],t)),this.declaredRootClass="esri.arcade.arcadedate.dateerror",Error.captureStackTrace&&Error.captureStackTrace(this,u)}}function l(e,t,n){return e<t?e-t:e>n?e-n:0}function c(e,t,n){return e<t?t:e>n?n:e}class d{constructor(e){this._date=e,this.declaredRootClass="esri.arcade.arcadedate"}static fromParts(e=0,t=1,n=1,r=0,i=0,s=0,o=0,u){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||isNaN(i)||isNaN(s)||isNaN(o))return null;const f=a.ou.local(e,t).daysInMonth;let m=a.ou.fromObject({day:c(n,1,f),year:e,month:c(t,1,12),hour:c(r,0,23),minute:c(i,0,59),second:c(s,0,59),millisecond:c(o,0,999)},{zone:h(u)});return m=m.plus({months:l(t,1,12),days:l(n,1,f),hours:l(r,0,23),minutes:l(i,0,59),seconds:l(s,0,59),milliseconds:l(o,0,999)}),new d(m)}static get systemTimeZoneCanonicalName(){return Intl.DateTimeFormat().resolvedOptions().timeZone??"system"}static arcadeDateAndZoneToArcadeDate(e,t){const n=h(t);return e.isUnknownTimeZone||n===s.instance?d.fromParts(e.year,e.monthJS+1,e.day,e.hour,e.minute,e.second,e.millisecond,n):new d(e._date.setZone(n))}static dateJSToArcadeDate(e){return new d(a.ou.fromJSDate(e,{zone:"system"}))}static dateJSAndZoneToArcadeDate(e,t="system"){const n=h(t);return new d(a.ou.fromJSDate(e,{zone:n}))}static unknownEpochToArcadeDate(e){return new d(a.ou.fromMillis(e,{zone:s.instance}))}static unknownDateJSToArcadeDate(e){return new d(a.ou.fromMillis(e.getTime(),{zone:s.instance}))}static epochToArcadeDate(e,t="system"){const n=h(t);return new d(a.ou.fromMillis(e,{zone:n}))}static dateTimeToArcadeDate(e){return new d(e)}clone(){return new d(this._date)}changeTimeZone(e){const t=h(e);return d.dateTimeToArcadeDate(this._date.setZone(t))}static dateTimeAndZoneToArcadeDate(e,t){const n=h(t);return e.zone===s.instance||n===s.instance?d.fromParts(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond,n):new d(e.setZone(n))}static nowToArcadeDate(e){const t=h(e);return new d(a.ou.fromJSDate(new Date,{zone:t}))}static nowUTCToArcadeDate(){return new d(a.ou.utc())}get isSystem(){return"system"===this.timeZone||this.timeZone===d.systemTimeZoneCanonicalName}equals(e){return this.isSystem&&e.isSystem?this.toNumber()===e.toNumber():this.isUnknownTimeZone===e.isUnknownTimeZone&&this._date.equals(e._date)}get isUnknownTimeZone(){return this._date.zone===s.instance}get isValid(){return this._date.isValid}get hour(){return this._date.hour}get second(){return this._date.second}get day(){return this._date.day}get dayOfWeekISO(){return this._date.weekday}get dayOfWeekJS(){let e=this._date.weekday;return e>6&&(e=0),e}get millisecond(){return this._date.millisecond}get monthISO(){return this._date.month}get weekISO(){return this._date.weekNumber}get yearISO(){return this._date.weekYear}get monthJS(){return this._date.month-1}get year(){return this._date.year}get minute(){return this._date.minute}get zone(){return this._date.zone}get timeZoneOffset(){return this.isUnknownTimeZone?0:this._date.offset}get timeZone(){if(this.isUnknownTimeZone)return"unknown";if("system"===this._date.zone.type)return"system";const e=this.zone;return"fixed"===e.type?0===e.fixed?"UTC":e.formatOffset(0,"short"):e.name}stringify(){return JSON.stringify(this.toJSDate())}plus(e){return new d(this._date.plus(e))}diff(e,t="milliseconds"){return this._date.diff(e._date,t)[t]}toISOString(e){return e?this._date.toISO({suppressMilliseconds:!0,includeOffset:!this.isUnknownTimeZone}):this._date.toISO({includeOffset:!this.isUnknownTimeZone})}toFormat(e,t){return this.isUnknownTimeZone&&(e=e.replaceAll("Z","")),this._date.toFormat(e,t)}toJSDate(){return this._date.toJSDate()}toSQLValue(){return this._date.toFormat("yyyy-LL-dd HH:mm:ss")}toSQLWithKeyword(){return`timestamp '${this.toSQLValue()}'`}toDateTime(){return this._date}toNumber(){return this._date.toMillis()}getTime(){return this._date.toMillis()}toUTC(){return new d(this._date.toUTC())}toLocal(){return new d(this._date.toLocal())}toString(){return this.toISOString(!0)}static fromReaderAsTimeStampOffset(e){if(!e)return null;const t=a.ou.fromISO(e,{setZone:!0});return new d(t)}}function h(e,t=!0){if(e instanceof a.ld)return e;if("system"===e.toLowerCase())return"system";if("utc"===e.toLowerCase())return"UTC";if("unknown"===e.toLowerCase())return s.instance;if(/^[\+\-]?[0-9]{1,2}([:][0-9]{2})?$/.test(e)){const t=a.Qf.parseSpecifier("UTC"+(e.startsWith("+")||e.startsWith("-")?"":"+")+e);if(t)return t}const n=a.vF.create(e);if(!n.isValid){if(t)throw new u(r.TimeZoneNotRecognized);return null}return n}},17057:(e,t,n)=>{n.d(t,{P:()=>r});class r{constructor(e){this.source=e}}},92089:(e,t,n)=>{n.d(t,{s:()=>r});class r{constructor(e,t){this._moduleSingletons=e,this._syntaxModules=t}loadLibrary(e){if(null==this._syntaxModules)return null;const t=this._syntaxModules[e.toLowerCase()];return t?{syntax:t.script,uri:t.uri}:null}}},28228:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(33586);class i extends r.Z{constructor(e){super(),this.declaredClass="esri.arcade.Portal",this.immutable=!1,this.setField("url",e),this.immutable=!0}}},80692:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(33586);class i extends r.Z{constructor(e,t,n,r,i,a,s){super(),this.attachmentUrl=i,this.declaredClass="esri.arcade.Attachment",this.immutable=!1,this.setField("id",e),this.setField("name",t),this.setField("contenttype",n),this.setField("size",r),this.setField("exifinfo",a),this.setField("keywords",s),this.immutable=!0}deepClone(){return new i(this.field("id"),this.field("name"),this.field("contenttype"),this.field("size"),this.attachmentUrl,this.field("exifinfo")?.deepClone()??null,this.field("keywords"))}}},33586:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(48853),i=n(6899),a=n(27535),s=n(12384),o=n(61363),u=n(9361);function l(e,t,n=!1,r=!1){if(null==e)return null;if((0,o.b)(e))return(0,o.g)(e);if((0,o.a)(e))return(0,o.h)(e);if((0,o.c)(e))return(0,o.j)(e);if((0,o.k)(e))return(0,o.l)(e,t);if((0,o.m)(e))return e;if((0,o.n)(e))return e;if((0,o.o)(e)){const i=[];for(const a of e)i.push(l(a,t,n,r));return i}if(r&&(0,o.p)(e))return e;const i=new c;i.immutable=!1;for(const a of Object.keys(e)){const s=e[a];void 0!==s&&i.setField(a,l(s,t,n,r))}return i.immutable=n,i}class c{constructor(e){this.declaredClass="esri.arcade.Dictionary",this.attributes=null,this.plain=!1,this.immutable=!0,this.attributes=e instanceof c?e.attributes:e??{}}field(e){const t=e.toLowerCase(),n=this.attributes[e];if(void 0!==n)return n;for(const e in this.attributes)if(e.toLowerCase()===t)return this.attributes[e];throw new a.aV(null,a.rH.FieldNotFound,null,{key:e})}setField(e,t){if(this.immutable)throw new a.aV(null,a.rH.Immutable,null);if((0,o.i)(t))throw new a.aV(null,a.rH.NoFunctionInDictionary,null);const n=e.toLowerCase();if(t instanceof Date&&(t=r.iG.dateJSToArcadeDate(t)),void 0===this.attributes[e]){for(const e in this.attributes)if(e.toLowerCase()===n)return void(this.attributes[e]=t);this.attributes[e]=t}else this.attributes[e]=t}hasField(e){const t=e.toLowerCase();if(void 0!==this.attributes[e])return!0;for(const e in this.attributes)if(e.toLowerCase()===t)return!0;return!1}keys(){let e=[];for(const t in this.attributes)e.push(t);return e=e.sort(),e}castToText(e=!1){let t="";for(const n in this.attributes){""!==t&&(t+=",");const i=this.attributes[n];null==i?t+=JSON.stringify(n)+":null":(0,o.a)(i)||(0,o.b)(i)||(0,o.c)(i)?t+=JSON.stringify(n)+":"+JSON.stringify(i):i instanceof u.Z?t+=JSON.stringify(n)+":"+(0,o.t)(i):i instanceof s.Z||i instanceof Array?t+=JSON.stringify(n)+":"+(0,o.t)(i,null,e):i instanceof r.iG?t+=e?JSON.stringify(n)+":"+JSON.stringify(i.getTime()):JSON.stringify(n)+":"+i.stringify():null!==i&&"object"==typeof i&&void 0!==i.castToText&&(t+=JSON.stringify(n)+":"+i.castToText(e))}return"{"+t+"}"}static convertObjectToArcadeDictionary(e,t,n=!0,r=!1){const i=new c;i.immutable=!1;for(const a in e){const s=e[a];void 0!==s&&i.setField(a.toString(),l(s,t,n,r))}return i.immutable=n,i}static convertJsonToArcade(e,t,n=!1){return l(e,t,n)}castAsJson(e=null){const t={};for(let n in this.attributes){const r=this.attributes[n];void 0!==r&&(e?.keyTranslate&&(n=e.keyTranslate(n)),t[n]=(0,o.d)(r,e))}return t}async castDictionaryValueAsJsonAsync(e,t,n,r=null,i){const a=await(0,o.e)(n,r,i);return e[t]=a,a}async castAsJsonAsync(e=null,t=null){const n={},i=[];for(let a in this.attributes){const s=this.attributes[a];t?.keyTranslate&&(a=t.keyTranslate(a)),void 0!==s&&((0,o.f)(s)||s instanceof u.Z||s instanceof r.iG?n[a]=(0,o.d)(s,t):i.push(this.castDictionaryValueAsJsonAsync(n,a,s,e,t)))}return i.length>0&&await Promise.all(i),n}deepClone(){const e=new c;e.immutable=!1;for(const t of this.keys())e.setField(t,(0,i.I)(this.field(t)));return e}}},15274:(e,t,n)=>{n.d(t,{Z:()=>g});var r=n(48853),i=n(85839),a=n(6899),s=n(33586),o=n(27535),u=n(12384),l=n(61363),c=n(22641),d=n(53970),h=n(9361),f=n(94139),m=n(33955),p=n(98732);class g{constructor(){this.arcadeDeclaredClass="esri.arcade.Feature",this._optimizedGeomDefinition=null,this._geometry=null,this.attributes=null,this._layer=null,this._fieldTypesFixed=!0,this.dateTimeReferenceFieldIndex=null,this.contextTimeReference=null,this.immutable=!0,this._fieldsToFixDataTypes=null,this.immutable=!0}static createFromGraphic(e,t){const n=new g;return n.contextTimeReference=t??null,n._geometry=null!=e.geometry?e.geometry:null,void 0===e.attributes||null===e.attributes?n.attributes={}:n.attributes=e.attributes,e._sourceLayer?(n._layer=e._sourceLayer,n._fieldTypesFixed=!1):e._layer?(n._layer=e._layer,n._fieldTypesFixed=!1):e.layer&&"fields"in e.layer?(n._layer=e.layer,n._fieldTypesFixed=!1):e.sourceLayer&&"fields"in e.sourceLayer&&(n._layer=e.sourceLayer,n._fieldTypesFixed=!1),n._layer&&!n._fieldTypesFixed&&(void 0!==n._layer.dateTimeReferenceFieldIndex?n.dateTimeReferenceFieldIndex=n._layer.dateTimeReferenceFieldIndex:n.dateTimeReferenceFieldIndex=i.nu.createFromLayer(n._layer)),n}static createFromArcadeFeature(e){if(e instanceof g){const t=new g;return t._fieldTypesFixed=e._fieldTypesFixed,t.attributes=e.attributes,t._geometry=e._geometry,t._optimizedGeomDefinition=e._optimizedGeomDefinition,e._layer&&(t._layer=e._layer),t.dateTimeReferenceFieldIndex=e.dateTimeReferenceFieldIndex,t.contextTimeReference=e.contextTimeReference,t}const t={};for(const n of e.keys())t[n]=e.field(n);return g.createFromGraphicLikeObject(e.geometry(),t,e.fullSchema(),e.contextTimeReference)}static createFromOptimisedFeature(e,t,n){const r=new g;return r._geometry=e.geometry?{geometry:e.geometry}:null,r._optimizedGeomDefinition=n,r.attributes=e.attributes||{},r._layer=t,r._fieldTypesFixed=!1,r}static createFromArcadeDictionary(e){const t=new g;return t.attributes=e.field("attributes"),null!==t.attributes&&t.attributes instanceof s.Z?(t.attributes=t.attributes.attributes,null===t.attributes&&(t.attributes={})):t.attributes={},t._geometry=e.field("geometry"),null!==t._geometry&&(t._geometry instanceof s.Z?t._geometry=g.parseGeometryFromDictionary(t._geometry):t._geometry instanceof h.Z||(t._geometry=null)),t}static createFromGraphicLikeObject(e,t,n=null,r){const a=new g;return a.contextTimeReference=r??null,null===t&&(t={}),a.attributes=t,a._geometry=null!=e?e:null,a._layer=n,a._layer&&(a._fieldTypesFixed=!1,void 0!==a._layer.dateTimeReferenceFieldIndex?a.dateTimeReferenceFieldIndex=a._layer.dateTimeReferenceFieldIndex:a.dateTimeReferenceFieldIndex=i.nu.createFromLayer(a._layer)),a}repurposeFromGraphicLikeObject(e,t,n=null){null===t&&(t={}),this.attributes=t,this._geometry=e??null,this._layer=n,this._layer?this._fieldTypesFixed=!1:this._fieldTypesFixed=!0}get layerPreferredTimeZone(){return this.dateTimeReferenceFieldIndex?.layerPreferredTimeZone??""}fieldSourceTimeZone(e){return this.dateTimeReferenceFieldIndex?.fieldTimeZone(e)??""}castToText(e=!1){let t="";!1===this._fieldTypesFixed&&this._fixFieldTypes();for(const n in this.attributes){""!==t&&(t+=",");const i=this.attributes[n];null==i?t+=JSON.stringify(n)+":null":(0,l.a)(i)||(0,l.b)(i)||(0,l.c)(i)?t+=JSON.stringify(n)+":"+JSON.stringify(i):i instanceof h.Z?t+=JSON.stringify(n)+":"+(0,l.t)(i):i instanceof d.n||i instanceof c.u?t+=`${JSON.stringify(n)}:${JSON.stringify(i.toString())}`:i instanceof u.Z||i instanceof Array?t+=JSON.stringify(n)+":"+(0,l.t)(i,null,e):i instanceof r.iG?t+=e?JSON.stringify(n)+":"+JSON.stringify(i.getTime()):JSON.stringify(n)+":"+i.stringify():null!==i&&"object"==typeof i&&void 0!==i.castToText&&(t+=JSON.stringify(n)+":"+i.castToText(e))}return'{"geometry":'+(null===this.geometry()?"null":(0,l.t)(this.geometry()))+',"attributes":{'+t+"}}"}_fixFieldTypes(){if(this._fieldsToFixDataTypes&&this._fieldsToFixDataTypes?.length>0)return this._fixAllFields(this._fieldsToFixDataTypes),void(this._fieldTypesFixed=!0);const e=[],t=this._layer.fields;for(let n=0;n<t.length;n++){const r=t[n],{name:i,type:a}=r;switch(a){case"date":case"esriFieldTypeDate":e.push({field:i,dataType:"date"});break;case"date-only":case"esriFieldTypeDateOnly":e.push({field:i,dataType:"date-only"});break;case"time-only":case"esriFieldTypeTimeOnly":e.push({field:i,dataType:"time-only"});break;case"timestamp-offset":case"esriFieldTypeTimestampOffset":e.push({field:i,dataType:"timestamp-offset"})}}this._fieldsToFixDataTypes=e,e.length>0&&this._fixAllFields(e),this._fieldTypesFixed=!0}isUnknownDateTimeField(e){return"unknown"===this.dateTimeReferenceFieldIndex?.fieldTimeZone(e)?.toLowerCase()}_fixAllFields(e){this.attributes={...this.attributes};const t=this.contextTimeReference?.timeZone??"system";for(let n=0;n<e.length;n++){const i=e[n].field,a=e[n].dataType;let s=this.attributes[i];if(void 0===s){for(const e in this.attributes)if(e.toLowerCase()===i.toLowerCase()){if(s=this.attributes[e],null!==s){if("time-only"===a){(0,l.n)(s)||(this.attributes[e]=d.n.fromReader(s.toString()));break}if("date-only"===a){(0,l.m)(s)||(this.attributes[e]=c.u.fromReader(s.toString()));break}if("timestamp-offset"===a){(0,l.k)(s)||(this.attributes[e]=r.iG.fromReaderAsTimeStampOffset(s.toString()));break}const n=this.isUnknownDateTimeField(e);s instanceof Date?this.attributes[e]=n?r.iG.unknownDateJSToArcadeDate(s):r.iG.dateJSAndZoneToArcadeDate(s,t):(0,l.k)(s)||(this.attributes[e]=n?r.iG.unknownEpochToArcadeDate(s):r.iG.epochToArcadeDate(s,t))}break}}else if(null!==s){if("time-only"===a){(0,l.n)(s)?this.attributes[i]=s:this.attributes[i]=d.n.fromReader(s.toString());continue}if("date-only"===a){(0,l.m)(s)?this.attributes[i]=s:this.attributes[i]=c.u.fromReader(s.toString());continue}if("timestamp-offset"===a){(0,l.k)(s)?this.attributes[i]=s:this.attributes[i]=r.iG.fromReaderAsTimeStampOffset(s.toString());continue}const e=this.isUnknownDateTimeField(i);(0,l.k)(s)?this.attributes[i]=s:s instanceof Date?this.attributes[i]=e?r.iG.unknownDateJSToArcadeDate(s):r.iG.dateJSAndZoneToArcadeDate(s,t):this.attributes[i]=e?r.iG.unknownEpochToArcadeDate(s):r.iG.epochToArcadeDate(s,t)}}}geometry(){return null===this._geometry||this._geometry instanceof h.Z||(this._optimizedGeomDefinition?(this._geometry=(0,m.im)((0,p.di)(this._geometry,this._optimizedGeomDefinition.geometryType,this._optimizedGeomDefinition.hasZ,this._optimizedGeomDefinition.hasM)),this._geometry.spatialReference=this._optimizedGeomDefinition.spatialReference):this._geometry=(0,m.im)(this._geometry)),this._geometry}field(e){this._fieldTypesFixed||this._fixFieldTypes();const t=this.attributes[e];if(void 0!==t)return t;const n=e.toLowerCase();for(const e in this.attributes)if(e.toLowerCase()===n)return this.attributes[e];if(this._hasFieldDefinition(n))return null;throw new o.aV(null,o.rH.FieldNotFound,null,{key:e})}_hasFieldDefinition(e){if(null===this._layer)return!1;for(let t=0;t<this._layer.fields.length;t++)if(this._layer.fields[t].name.toLowerCase()===e)return!0;return!1}setField(e,t){if(this.immutable)throw new o.aV(null,o.rH.Immutable,null);if(t instanceof Date&&(t=this.isUnknownDateTimeField(e)?r.iG.unknownDateJSToArcadeDate(t):r.iG.dateJSToArcadeDate(t)),!1===(0,l.f)(t))throw new o.aV(null,o.rH.TypeNotAllowedInFeature,null);const n=e.toLowerCase();if(void 0===this.attributes[e]){for(const e in this.attributes)if(e.toLowerCase()===n)return void(this.attributes[e]=t);this.attributes[e]=t}else this.attributes[e]=t}hasField(e){const t=e.toLowerCase();if(void 0!==this.attributes[e])return!0;for(const e in this.attributes)if(e.toLowerCase()===t)return!0;return!!this._hasFieldDefinition(t)}keys(){let e=[];const t={};for(const n in this.attributes)e.push(n),t[n.toLowerCase()]=1;if(null!==this._layer)for(let n=0;n<this._layer.fields.length;n++){const r=this._layer.fields[n];1!==t[r.name.toLowerCase()]&&e.push(r.name)}return e=e.sort(),e}static parseGeometryFromDictionary(e){const t=g._convertDictionaryToJson(e,!0);return void 0!==t.hasm&&(t.hasM=t.hasm,delete t.hasm),void 0!==t.hasz&&(t.hasZ=t.hasz,delete t.hasz),void 0!==t.spatialreference&&(t.spatialReference=t.spatialreference,delete t.spatialreference),void 0!==t.rings&&(t.rings=this._fixPathArrays(t.rings,!0===t.hasZ,!0===t.hasZ)),void 0!==t.paths&&(t.paths=this._fixPathArrays(t.paths,!0===t.hasZ,!0===t.hasM)),void 0!==t.points&&(t.points=this._fixPointArrays(t.points,!0===t.hasZ,!0===t.hasM)),(0,m.im)(t)}static _fixPathArrays(e,t,n){const r=[];if(e instanceof Array)for(let i=0;i<e.length;i++)r.push(this._fixPointArrays(e[i],t,n));else if(e instanceof u.Z)for(let i=0;i<e.length();i++)r.push(this._fixPointArrays(e.get(i),t,n));return r}static _fixPointArrays(e,t,n){const r=[];if(e instanceof Array)for(let i=0;i<e.length;i++){const a=e[i];a instanceof f.Z?t&&n?r.push([a.x,a.y,a.z,a.m]):t?r.push([a.x,a.y,a.z]):n?r.push([a.x,a.y,a.m]):r.push([a.x,a.y]):a instanceof u.Z?r.push(a.toArray()):r.push(a)}else if(e instanceof u.Z)for(let i=0;i<e.length();i++){const a=e.get(i);a instanceof f.Z?t&&n?r.push([a.x,a.y,a.z,a.m]):t?r.push([a.x,a.y,a.z]):n?r.push([a.x,a.y,a.m]):r.push([a.x,a.y]):a instanceof u.Z?r.push(a.toArray()):r.push(a)}return r}static _convertDictionaryToJson(e,t=!1){const n={};for(const r in e.attributes){let i=e.attributes[r];i instanceof s.Z&&(i=g._convertDictionaryToJson(i)),t?n[r.toLowerCase()]=i:n[r]=i}return n}static parseAttributesFromDictionary(e){const t={};for(const n in e.attributes){const r=e.attributes[n];if(!(0,l.f)(r))throw new o.aV(null,o.rH.InvalidParameter,null);t[n]=r}return t}static fromJson(e,t){let n=null;null!==e.geometry&&void 0!==e.geometry&&(n=(0,m.im)(e.geometry));const r={};if(null!==e.attributes&&void 0!==e.attributes)for(const t in e.attributes){const n=e.attributes[t];if(null===n)r[t]=n;else{if(!((0,l.c)(n)||(0,l.b)(n)||(0,l.a)(n)||(0,l.k)(n)||(0,l.n)(n)||(0,l.m)(n)))throw new o.aV(null,o.rH.InvalidParameter,null);r[t]=n}}return g.createFromGraphicLikeObject(n,r,null,t??null)}fullSchema(){return this._layer}gdbVersion(){if(null===this._layer)return"";const e=this._layer.gdbVersion;return void 0===e?"":""===e&&this._layer.capabilities&&this._layer.capabilities.isVersioned?"SDE.DEFAULT":e}castAsJson(e){const t={attributes:{},geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null};for(const n in this.attributes){const r=this.attributes[n];void 0!==r&&(t.attributes[n]=(0,l.d)(r,e))}return t}async castAsJsonAsync(e=null,t){return this.castAsJson(t)}}(0,a.T)(g)},9609:(e,t,n)=>{n.d(t,{Bx:()=>s,Rm:()=>i,Vg:()=>o,aq:()=>a});var r=n(95330);class i{constructor(){}}function a(e,t,n){if(e instanceof i&&!(e instanceof o)){const r=new o;return r.fn=e,r.parameterEvaluator=n,r.context=t,r}return e}class s extends i{constructor(e){super(),this.fn=e}createFunction(e){return(...t)=>this.fn(e,{preparsed:!0,arguments:t})}call(e,t){return this.fn(e,t)}marshalledCall(e,t,n,s){return s(e,t,((t,u,l)=>{l=l.map((t=>t instanceof i&&!(t instanceof o)?a(t,e,s):t));const c=this.call(n,{args:l});return(0,r.y8)(c)?c.then((e=>a(e,n,s))):c}))}}class o extends i{constructor(){super(...arguments),this.fn=null,this.context=null}createFunction(e){return this.fn.createFunction(this.context)}call(e,t){return this.fn.marshalledCall(e,t,this.context,this.parameterEvaluator)}marshalledCall(e,t,n){return this.fn.marshalledCall(e,t,this.context,this.parameterEvaluator)}}},12384:(e,t,n)=>{n.d(t,{Z:()=>r});class r{constructor(e=[]){this._elements=e}length(){return this._elements.length}get(e){return this._elements[e]}toArray(){const e=[];for(let t=0;t<this.length();t++)e.push(this.get(t));return e}}},50728:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(12384),i=n(25785);class a extends r.Z{constructor(e,t,n,r,i){super(e),this._lazyPath=[],this._hasZ=!1,this._hasM=!1,this._hasZ=n,this._hasM=r,this._spRef=t,this._cacheId=i}get(e){if(void 0===this._lazyPath[e]){const t=this._elements[e];if(void 0===t)return;this._lazyPath[e]=new i.Z(t,this._spRef,this._hasZ,this._hasM,this._cacheId,e)}return this._lazyPath[e]}equalityTest(e){return e===this||null!==e&&e instanceof a!=0&&e.getUniqueHash()===this.getUniqueHash()}getUniqueHash(){return this._cacheId.toString()}}},25785:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(12384),i=n(94139);class a extends r.Z{constructor(e,t,n,r,i,a){super(e),this._lazyPt=[],this._hasZ=!1,this._hasM=!1,this._spRef=t,this._hasZ=n,this._hasM=r,this._cacheId=i,this._partId=a}get(e){if(void 0===this._lazyPt[e]){const t=this._elements[e];if(void 0===t)return;const n=this._hasZ,r=this._hasM;let a=null;a=n&&!r?new i.Z(t[0],t[1],t[2],void 0,this._spRef):r&&!n?new i.Z(t[0],t[1],void 0,t[2],this._spRef):n&&r?new i.Z(t[0],t[1],t[2],t[3],this._spRef):new i.Z(t[0],t[1],this._spRef),a.cache._arcadeCacheId=this._cacheId.toString()+"-"+this._partId.toString()+"-"+e.toString(),this._lazyPt[e]=a}return this._lazyPt[e]}equalityTest(e){return e===this||null!==e&&e instanceof a!=0&&e.getUniqueHash()===this.getUniqueHash()}getUniqueHash(){return this._cacheId.toString()+"-"+this._partId.toString()}}},85839:(e,t,n)=>{n.d(t,{nu:()=>a}),n(48853);var r=n(99514),i=(n(80216),n(42799));n(17126);class a{constructor(){this.dateTimeReferenceMetaData=null,this._fieldTimeZoneIndex={},this._fieldIndex=null,this._ianaPreferred=null,this._ianaTimeInfo=null,this._ianaEditFields=null,this._ianaLayerDateFields=null}static create(e,t){const n=new a;return n.dateTimeReferenceMetaData=t,n._fieldIndex=e instanceof r.Z?e:new r.Z(e),n}static createFromLayer(e){if(!e)return null;if(!e.fieldsIndex)return!e.declaredClass&&e.fields?a.create(e.fields,e):null;const t=new a;return t._fieldIndex=e.fieldsIndex,t.dateTimeReferenceMetaData={timeInfo:e?.timeInfo?.toJSON()??null,editFieldsInfo:e?.editFieldsInfo?.toJSON()??null,dateFieldsTimeReference:e?.dateFieldsTimeReference?.toJSON()??null,preferredTimeReference:e?.preferredTimeReference?.toJSON()??null,datesInUnknownTimezone:!0===e?.datesInUnknownTimezone},t}fieldTimeZone(e){const t=this._fieldIndex?.get(e);if(!t)return null;if("esriFieldTypeTimestampOffset"===t.type||"esriFieldTypeDateOnly"===t.type||"esriFieldTypeTimeOnly"===t.type||"timestamp-offset"===t.type||"date-only"===t.type||"time-only"===t.type)return"unknown";if("date"!==t.type&&"esriFieldTypeDate"!==t.type)return null;const n=this._fieldTimeZoneIndex[t.name];if(void 0!==n)return n;const r=[{field:this.dateTimeReferenceMetaData?.editFieldsInfo?.creationDateField,timeReference:this.dateTimeReferenceMetaData?.editFieldsInfo?.dateFieldsTimeReference,isunknown:!0===this.dateTimeReferenceMetaData?.datesInUnknownTimezone},{field:this.dateTimeReferenceMetaData?.editFieldsInfo?.editDateField,timeReference:this.dateTimeReferenceMetaData?.editFieldsInfo?.dateFieldsTimeReference,isunknown:!0===this.dateTimeReferenceMetaData?.datesInUnknownTimezone},{field:this.dateTimeReferenceMetaData?.timeInfo?.startTimeField,timeReference:this.dateTimeReferenceMetaData?.timeInfo?.timeReference,isunknown:!0===this.dateTimeReferenceMetaData?.datesInUnknownTimezone},{field:this.dateTimeReferenceMetaData?.timeInfo?.endTimeField,timeReference:this.dateTimeReferenceMetaData?.timeInfo?.timeReference,isunknown:!0===this.dateTimeReferenceMetaData?.datesInUnknownTimezone}];for(const e of r)if(e.field===t.name){const n=this.convertToIANA(e.timeReference,e.isunknown);return this._fieldTimeZoneIndex[t.name]=n,n}const i=this.convertToIANA(this.dateTimeReferenceMetaData?.dateFieldsTimeReference,this.dateTimeReferenceMetaData?.datesInUnknownTimezone);return this._fieldTimeZoneIndex[t.name]=i,i}convertToIANA(e,t){return t?"unknown":function(e){return e?.timeZoneIANA?e?.timeZoneIANA:e?.timeZone?(0,i.G)(e,""):""}(e)}get layerPreferredTimeZone(){if(null!==this._ianaPreferred)return this._ianaPreferred;this._ianaPreferred="";const e=this.dateTimeReferenceMetaData?.preferredTimeReference;return this._ianaPreferred=this.convertToIANA(e,!0===this.dateTimeReferenceMetaData?.datesInUnknownTimezone),this._ianaPreferred}get layerTimeInfoTimeZone(){if(null!==this._ianaTimeInfo)return this._ianaTimeInfo;this._ianaTimeInfo="";const e=this.dateTimeReferenceMetaData?.timeInfo?.timeReference;return this._ianaTimeInfo=this.convertToIANA(e,!1),this._ianaTimeInfo}get layerDateFieldsTimeZoneDefaultUTC(){const e=this.layerDateFieldsTimeZone;return""===e?"UTC":e}get layerEditFieldsTimeZone(){if(null!==this._ianaEditFields)return this._ianaEditFields;this._ianaEditFields="";const e=this.dateTimeReferenceMetaData?.editFieldsInfo?.dateFieldsTimeReference;return this._ianaEditFields=this.convertToIANA(e,this.dateTimeReferenceMetaData?.datesInUnknownTimezone),this._ianaEditFields}get layerDateFieldsTimeZone(){if(null!==this._ianaLayerDateFields)return this._ianaLayerDateFields;this._ianaLayerDateFields="";const e=this.dateTimeReferenceMetaData?.dateFieldsTimeReference;return this._ianaLayerDateFields=this.convertToIANA(e,!0===this.dateTimeReferenceMetaData?.datesInUnknownTimezone),this._ianaLayerDateFields}}},6899:(e,t,n)=>{n.d(t,{I:()=>o,T:()=>a});var r=n(17057),i=n(61363);function a(e){s=e}let s;function o(e){return null===e?null:(0,i.k)(e)?e.clone():(0,i.f)(e)?e:(0,i.p)(e)?e.clone():(0,i.q)(e)?e.toArray().map((e=>o(e))):(0,i.o)(e)?e.map((e=>o(e))):(0,i.r)(e)?s.createFromArcadeFeature(e):(0,i.s)(e)||(0,i.u)(e)?e:(0,i.v)(e)||"esri.arcade.Attachment"===e?.declaredClass?e.deepClone():("esri.arcade.Portal"===e?.declaredClass||e instanceof r.P||(0,i.i)(e),e)}},27535:(e,t,n)=>{n.d(t,{OF:()=>d,TD:()=>m,Tu:()=>g,VO:()=>f,aV:()=>l,kq:()=>h,rH:()=>r});var r,i,a=n(19153);(i=r||(r={})).AsyncNotEnabled="AsyncNotEnabled",i.ModulesNotSupported="ModulesNotSupported",i.CircularModules="CircularModules",i.CannotCompareDateAndTime="CannotCompareDateAndTime",i.NeverReach="NeverReach",i.UnsupportedHashType="UnsupportedHashType",i.InvalidParameter="InvalidParameter",i.UnexpectedToken="UnexpectedToken",i.Unrecognized="Unrecognized",i.UnrecognizedType="UnrecognizedType",i.MaximumCallDepth="MaximumCallDepth",i.BooleanConditionRequired="BooleanConditionRequired",i.TypeNotAllowedInFeature="TypeNotAllowedInFeature",i.KeyMustBeString="KeyMustBeString",i.WrongNumberOfParameters="WrongNumberOfParameters",i.CallNonFunction="CallNonFunction",i.NoFunctionInTemplateLiteral="NoFunctionInTemplateLiteral",i.NoFunctionInDictionary="NoFunctionInDictionary",i.NoFunctionInArray="NoFunctionInArray",i.AssignModuleFunction="AssignModuleFunction",i.LogicExpressionOrAnd="LogicExpressionOrAnd",i.LogicalExpressionOnlyBoolean="LogicalExpressionOnlyBoolean",i.FunctionNotFound="FunctionNotFound",i.InvalidMemberAccessKey="InvalidMemberAccessKey",i.UnsupportedUnaryOperator="UnsupportUnaryOperator",i.InvalidIdentifier="InvalidIdentifier",i.MemberOfNull="MemberOfNull",i.UnsupportedOperator="UnsupportedOperator",i.Cancelled="Cancelled",i.ModuleAccessorMustBeString="ModuleAccessorMustBeString",i.ModuleExportNotFound="ModuleExportNotFound",i.Immutable="Immutable",i.OutOfBounds="OutOfBounds",i.IllegalResult="IllegalResult",i.FieldNotFound="FieldNotFound",i.PortalRequired="PortalRequired",i.LogicError="LogicError",i.ArrayAccessorMustBeNumber="ArrayAccessMustBeNumber",i.KeyAccessorMustBeString="KeyAccessorMustBeString",i.WrongSpatialReference="WrongSpatialReference",i.CannotChangeTimeZoneTime="CannotChangeTimeZoneTime",i.CannotChangeTimeZoneDateOnly="CannotChangeTimeZoneDateOnly";const s={[r.TypeNotAllowedInFeature]:"Feature attributes only support dates, numbers, strings, guids.",[r.LogicError]:"Logic error - {reason}",[r.CannotCompareDateAndTime]:"Cannot compare date or dateonly with timeonly types",[r.NeverReach]:"Encountered unreachable logic",[r.AsyncNotEnabled]:"Async Arcade must be enabled for this script",[r.ModuleAccessorMustBeString]:"Module accessor must be a string",[r.ModuleExportNotFound]:"Module has no export with provided identifier",[r.ModulesNotSupported]:"Current profile does not support modules",[r.ArrayAccessorMustBeNumber]:"Array accessor must be a number",[r.FunctionNotFound]:"Function not found",[r.FieldNotFound]:"Key not found - {key}",[r.CircularModules]:"Circular module dependencies are not allowed",[r.Cancelled]:"Execution cancelled",[r.UnsupportedHashType]:"Type not supported in hash function",[r.IllegalResult]:"Value is not a supported return type",[r.PortalRequired]:"Portal is required",[r.InvalidParameter]:"Invalid parameter",[r.WrongNumberOfParameters]:"Call with wrong number of parameters",[r.Unrecognized]:"Unrecognized code structure",[r.UnrecognizedType]:"Unrecognized type",[r.WrongSpatialReference]:"Cannot work with geometry in this spatial reference. It is different to the execution spatial reference",[r.BooleanConditionRequired]:"Conditions must use booleans",[r.NoFunctionInDictionary]:"Dictionaries cannot contain functions.",[r.NoFunctionInArray]:"Arrays cannot contain functions.",[r.NoFunctionInTemplateLiteral]:"Template Literals do not expect functions by value.",[r.KeyAccessorMustBeString]:"Accessor must be a string",[r.KeyMustBeString]:"Object keys must be a string",[r.Immutable]:"Object is immutable",[r.UnexpectedToken]:"Unexpected token",[r.MemberOfNull]:"Cannot access property of null object",[r.MaximumCallDepth]:"Exceeded maximum function depth",[r.OutOfBounds]:"Out of bounds",[r.InvalidIdentifier]:"Identifier not recognized",[r.CallNonFunction]:"Expression is not a function",[r.InvalidMemberAccessKey]:"Cannot access value using a key of this type",[r.AssignModuleFunction]:"Cannot assign function to module variable",[r.UnsupportedUnaryOperator]:"Unsupported unary operator",[r.UnsupportedOperator]:"Unsupported operator",[r.LogicalExpressionOnlyBoolean]:"Logical expressions must be boolean",[r.LogicExpressionOrAnd]:"Logical expression can only be combined with || or &&",[r.CannotChangeTimeZoneTime]:"Cannot change the timezone of a Time",[r.CannotChangeTimeZoneDateOnly]:"Cannot change the timezone of a DateOnly"};class o extends Error{constructor(...e){super(...e)}}class u extends o{constructor(e,t){super(c(t)+e.message,{cause:e}),this.loc=null,Error.captureStackTrace&&Error.captureStackTrace(this,u),t&&t.loc&&(this.loc=t.loc)}}class l extends Error{constructor(e,t,n,r){super("Execution error - "+c(n)+(0,a.gx)(s[t],r)),this.loc=null,this.declaredRootClass="esri.arcade.arcadeexecutionerror",Error.captureStackTrace&&Error.captureStackTrace(this,l),n&&n.loc&&(this.loc=n.loc)}}function c(e){return e&&e.loc?`Line : ${e.loc.start?.line}, ${e.loc.start?.column}: `:""}class d extends Error{constructor(e,t,n,r){super("Compilation error - "+c(n)+(0,a.gx)(s[t],r)),this.loc=null,this.declaredRootClass="esri.arcade.arcadecompilationerror",Error.captureStackTrace&&Error.captureStackTrace(this,d),n&&n.loc&&(this.loc=n.loc)}}class h extends Error{constructor(){super("Uncompilable code structures"),this.declaredRootClass="esri.arcade.arcadeuncompilableerror",Error.captureStackTrace&&Error.captureStackTrace(this,h)}}function f(e,t,n){return"esri.arcade.arcadeexecutionerror"===n.declaredRootClass||"esri.arcade.arcadecompilationerror"===n.declaredRootClass?null===n.loc&&t&&t.loc?new u(n,{cause:n}):n:("esri.arcade.featureset.support.featureseterror"===n.declaredRootClass||"esri.arcade.featureset.support.sqlerror"===n.declaredRootClass||n.declaredRootClass,t&&t.loc?new u(n,{cause:n}):n)}var m;!function(e){e.UnrecognizedUri="UnrecognizedUri",e.UnsupportedUriProtocol="UnsupportedUriProtocol"}(m||(m={}));const p={[m.UnrecognizedUri]:"Unrecognized uri - {uri}",[m.UnsupportedUriProtocol]:"Unrecognized uri protocol"};class g extends Error{constructor(e,t){super((0,a.gx)(p[e],t)),this.declaredRootClass="esri.arcade.arcademoduleerror",Error.captureStackTrace&&Error.captureStackTrace(this,g)}}},90658:(e,t,n)=>{n.d(t,{$A:()=>D,Bj:()=>r,EI:()=>x,HD:()=>f,JW:()=>d,J_:()=>p,Lz:()=>A,NP:()=>g,Qk:()=>E,SV:()=>F,Sh:()=>h,US:()=>T,_U:()=>y,dj:()=>i,hd:()=>v,hj:()=>m,q2:()=>S,tI:()=>C,tt:()=>w,yE:()=>b});var r,i,a,s=n(48853),o=n(22641),u=n(53970),l=n(6570),c=n(1231);function d(e){return c.Z.fromJSON(e.toJSON())}function h(e){return e.toJSON?e.toJSON():e}function f(e){return"string"==typeof e||e instanceof String}function m(e){return"number"==typeof e}function p(e){return e instanceof Date}function g(e){return e instanceof s.iG}function D(e){return e instanceof o.u}function y(e){return e instanceof u.n}function w(e,t){return e===t||!(!p(e)&&!g(e)||!p(t)&&!g(t))&&e.getTime()===t.getTime()}function x(e){if(null==e)return null;if("number"==typeof e)return e;switch(e.toLowerCase()){case"meters":case"meter":return 109404;case"miles":case"mile":return 109439;case"kilometers":case"kilometer":case"km":return 109414}return null}function F(e){if(null==e)return null;switch(e.type){case"polygon":case"multipoint":case"polyline":return e.extent;case"point":return new l.Z({xmin:e.x,ymin:e.y,xmax:e.x,ymax:e.y,spatialReference:e.spatialReference});case"extent":return e}return null}function A(e){if(null==e)return null;if("number"==typeof e)return e;if("number"==typeof e)return e;switch(e.toLowerCase()){case"meters":case"meter":return 9001;case"miles":case"mile":return 9093;case"kilometers":case"kilometer":case"km":return 9036}return null}(a=r||(r={}))[a.Standardised=0]="Standardised",a[a.StandardisedNoInterval=1]="StandardisedNoInterval",a[a.SqlServer=2]="SqlServer",a[a.Oracle=3]="Oracle",a[a.Postgres=4]="Postgres",a[a.PGDB=5]="PGDB",a[a.FILEGDB=6]="FILEGDB",a[a.NotEvaluated=7]="NotEvaluated",function(e){e[e.InFeatureSet=0]="InFeatureSet",e[e.NotInFeatureSet=1]="NotInFeatureSet",e[e.Unknown=2]="Unknown"}(i||(i={}));const C=1e3,E={point:"point",polygon:"polygon",polyline:"polyline",multipoint:"multipoint",extent:"extent",esriGeometryPoint:"point",esriGeometryPolygon:"polygon",esriGeometryPolyline:"polyline",esriGeometryMultipoint:"multipoint",esriGeometryEnvelope:"extent",envelope:"extent"},S={point:"esriGeometryPoint",polygon:"esriGeometryPolygon",polyline:"esriGeometryPolyline",multipoint:"esriGeometryMultipoint",extent:"esriGeometryEnvelope",esriGeometryPoint:"esriGeometryPoint",esriGeometryPolygon:"esriGeometryPolygon",esriGeometryPolyline:"esriGeometryPolyline",esriGeometryMultipoint:"esriGeometryMultipoint",esriGeometryEnvelope:"esriGeometryEnvelope",envelope:"esriGeometryEnvelope"},b={"small-integer":"esriFieldTypeSmallInteger",integer:"esriFieldTypeInteger",long:"esriFieldTypeLong",single:"esriFieldTypeSingle",double:"esriFieldTypeDouble",string:"esriFieldTypeString",date:"esriFieldTypeDate","date-only":"esriFieldTypeDateOnly","time-only":"esriFieldTypeTimeOnly","timestamp-offset":"esriFieldTypeTimestampOffset",oid:"esriFieldTypeOID",geometry:"esriFieldTypeGeometry",blob:"esriFieldTypeBlob",raster:"esriFieldTypeRaster",guid:"esriFieldTypeGUID","global-id":"esriFieldTypeGlobalID",xml:"esriFieldTypeXML","big-integer":"esriFieldTypeBigInteger",esriFieldTypeSmallInteger:"esriFieldTypeSmallInteger",esriFieldTypeInteger:"esriFieldTypeInteger",esriFieldTypeLong:"esriFieldTypeLong",esriFieldTypeSingle:"esriFieldTypeSingle",esriFieldTypeDouble:"esriFieldTypeDouble",esriFieldTypeString:"esriFieldTypeString",esriFieldTypeDate:"esriFieldTypeDate",esriFieldTypeDateOnly:"esriFieldTypeDateOnly",esriFieldTypeTimeOnly:"esriFieldTypeTimeOnly",esriFieldTypeTimestampOffset:"esriFieldTypeTimestampOffset",esriFieldTypeOID:"esriFieldTypeOID",esriFieldTypeGeometry:"esriFieldTypeGeometry",esriFieldTypeBlob:"esriFieldTypeBlob",esriFieldTypeRaster:"esriFieldTypeRaster",esriFieldTypeGUID:"esriFieldTypeGUID",esriFieldTypeGlobalID:"esriFieldTypeGlobalID",esriFieldTypeXML:"esriFieldTypeXML",esriFieldTypeBigInteger:"esriFieldTypeBigInteger"};function T(e){return void 0===e?"":e=(e=(e=e.replace(/\/featureserver\/[0-9]*/i,"/FeatureServer")).replace(/\/mapserver\/[0-9]*/i,"/MapServer")).split("?")[0]}function v(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});const n="boolean"==typeof t.cycles&&t.cycles,r=t.cmp&&(i=t.cmp,function(e){return function(t,n){const r={key:t,value:e[t]},a={key:n,value:e[n]};return i(r,a)}});var i;const a=[];return function e(t){if(t&&t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0===t)return;if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);let i,s;if(Array.isArray(t)){for(s="[",i=0;i<t.length;i++)i&&(s+=","),s+=e(t[i])||"null";return s+"]"}if(null===t)return"null";if(a.includes(t)){if(n)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}const o=a.push(t)-1,u=Object.keys(t).sort(r&&r(t));for(s="",i=0;i<u.length;i++){const n=u[i],r=e(t[n]);r&&(s&&(s+=","),s+=JSON.stringify(n)+":"+r)}return a.splice(o,1),"{"+s+"}"}(e)}},71201:(e,t,n)=>{n.d(t,{AW:()=>s,Ay:()=>g,B9:()=>x,Es:()=>C,RI:()=>w,_R:()=>l,nB:()=>S,s9:()=>p,ws:()=>A});var r=n(22021),i=n(94139),a=n(87416);function s(e,t,n){return Math.sqrt((e[0]-t[0])**2+(e[1]-t[1])**2+(void 0!==e[2]&&void 0!==t[2]?(e[2]*n-t[2]*n)**2:0))}const o=[];for(const e of[[9002,56146130,6131,6132,8050,8051,8228],[9003,5702,6358,6359,6360,8052,8053],[9095,5754]]){const t=e[0];for(let n=1;n<e.length;n++)o[e[n]]=t}const u=[];function l(e){return e.vcsWkid&&void 0!==o[e.vcsWkid]?u[o[e.vcsWkid]]:e.latestVcsWkid&&void 0!==o[e.latestVcsWkid]?u[o[e.latestVcsWkid]]:1}function c(e,t,n){const r={x:0,y:0};t&&(r.z=0),n&&(r.m=0);let i=0,a=e[0];for(let s=0;s<e.length;s++){const o=e[s];if(!1===m(o,a)){const e=f(a,o,t),s=d(a,o,t,n);s.x*=e,s.y*=e,r.x+=s.x,r.y+=s.y,t&&(s.z*=e,r.z+=s.z),n&&(s.m*=e,r.m+=s.m),i+=e,a=o}}return i>0?(r.x/=i,r.y/=i,t&&(r.z/=i),n&&(r.m/=i)):(r.x=e[0][0],r.y=e[0][1],t&&(r.z=e[0][2]),n&&t?r.m=e[0][3]:n&&(r.m=e[0][2])),r}function d(e,t,n,r){const i={x:(e[0]+t[0])/2,y:(e[1]+t[1])/2};return n&&(i.z=(e[2]+t[2])/2),n&&r?i.m=(e[3]+t[3])/2:r&&(i.m=(e[2]+t[2])/2),i}function h(e,t){if(e.length<=1)return 0;let n=0;for(let r=1;r<e.length;r++)n+=f(e[r-1],e[r],t);return n}function f(e,t,n){const r=t[0]-e[0],i=t[1]-e[1];if(n){const e=t[2]-t[2];return Math.sqrt(r*r+i*i+e*e)}return Math.sqrt(r*r+i*i)}function m(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function p(e){const t={x:0,y:0,spatialReference:e.spatialReference.toJSON()},n={x:0,y:0,spatialReference:e.spatialReference.toJSON()};let r=0,a=0;for(let i=0;i<e.paths.length;i++){if(0===e.paths[i].length)continue;const s=h(e.paths[i],!0===e.hasZ);if(0===s){const n=c(e.paths[i],!0===e.hasZ,!0===e.hasM);t.x+=n.x,t.y+=n.y,!0===e.hasZ&&(t.z+=n.z),!0===e.hasM&&(t.m+=n.m),++r}else{const t=c(e.paths[i],!0===e.hasZ,!0===e.hasM);n.x+=t.x*s,n.y+=t.y*s,!0===e.hasZ&&(n.z+=t.z*s),!0===e.hasM&&(n.m+=t.m*s),a+=s}}return a>0?(n.x/=a,n.y/=a,!0===e.hasZ&&(n.z/=a),!0===e.hasM&&(n.m/=a),new i.Z(n)):r>0?(t.x/=r,t.y/=r,!0===e.hasZ&&(n.z/=r),!0===e.hasM&&(t.m/=r),new i.Z(t)):null}function g(e){if(0===e.points.length)return null;let t=0,n=0,r=0,a=0;for(let i=0;i<e.points.length;i++){const s=e.getPoint(i);!0===s.hasZ&&(r+=s.z),!0===s.hasM&&(a+=s.m),t+=s.x,n+=s.y,a+=s.m}const s={x:t/e.points.length,y:n/e.points.length,spatialReference:null};return s.spatialReference=e.spatialReference.toJSON(),!0===e.hasZ&&(s.z=r/e.points.length),!0===e.hasM&&(s.m=a/e.points.length),new i.Z(s)}function D(e,t,n=0){for(;e<n;)e+=t;const r=n+t;for(;e>=r;)e-=t;return e}function y(e,t){return Math.atan2(t.y-e.y,t.x-e.x)}function w(e,t){return D(y(e,t),2*Math.PI)*(180/Math.PI)}function x(e,t){return D(Math.PI/2-y(e,t),2*Math.PI)*(180/Math.PI)}function F(e,t,n){const r={x:e.x-t.x,y:e.y-t.y},i={x:n.x-t.x,y:n.y-t.y};return Math.atan2(function(e,t){return e.x*t.y-t.x*e.y}(r,i),function(e,t){return e.x*t.x+e.y*t.y}(r,i))}function A(e,t,n){return(0,r.BV)(D(F(e,t,n),2*Math.PI))}function C(e,t,n){return(0,r.BV)(D(-1*F(e,t,n),2*Math.PI))}u[9002]=.3048,u[9003]=.3048006096012192,u[9095]=.3048007491;const E=[0,0];function S(e){for(let t=0;t<e.length;t++){const n=e[t];for(let r=0;r<n.length-1;r++){const i=n[r],s=n[r+1];for(let n=t+1;n<e.length;n++)for(let t=0;t<e[n].length-1;t++){const r=e[n][t],o=e[n][t+1];if((0,a.UT)(i,s,r,o,E)&&!(E[0]===i[0]&&E[1]===i[1]||E[0]===r[0]&&E[1]===r[1]||E[0]===s[0]&&E[1]===s[1]||E[0]===o[0]&&E[1]===o[1]))return!0}}const r=n.length;if(!(r<3))for(let e=0;e<=r-2;e++){const t=n[e],i=n[e+1];for(let s=e+2;s<=r-2;s++){const e=n[s],r=n[s+1];if((0,a.UT)(t,i,e,r,E)&&!(E[0]===t[0]&&E[1]===t[1]||E[0]===e[0]&&E[1]===e[1]||E[0]===i[0]&&E[1]===i[1]||E[0]===r[0]&&E[1]===r[1]))return!0}}}return!1}},13976:(e,t,n)=>{n.d(t,{r:()=>g});var r=n(48853),i=n(27535),a=n(61363),s=n(22641),o=n(53970),u=n(70171),l=n(17126);function c(e,t,n){return e+(function(e){return e%4==0&&(e%100!=0||e%400==0)}(n)?h:d)[t]}const d=[0,31,59,90,120,151,181,212,243,273,304,334],h=[0,31,60,91,121,152,182,213,244,274,305,335];function f(e){return null===e?e:!1===e.isValid?null:e}function m(e,t){return""===e||"default"===e.toLowerCase().trim()?(0,a.L)(t):"z"===e||"Z"===e?"UTC":e}function p(e,t){return(0,a.m)(e)?e.toArcadeDate():(0,a.l)(e,(0,a.L)(t))}function g(e,t){e.today=function(e,n){return t(e,n,((t,i,s)=>{(0,a.E)(s,0,0,e,n);const o=new Date;return o.setHours(0,0,0,0),r.iG.dateJSAndZoneToArcadeDate(o,(0,a.L)(e))}))},e.time=function(e,n){return t(e,n,((t,s,u)=>{switch((0,a.E)(u,0,4,e,n),u.length){case 0:{const t=r.iG.nowToArcadeDate((0,a.L)(e));return new o.n(t.hour,t.minute,t.second,t.millisecond)}case 1:{if((0,a.n)(u[0]))return u[0].clone();if((0,a.k)(u[0]))return new o.n(u[0].hour,u[0].minute,u[0].second,u[0].millisecond);if((0,a.m)(u[0]))return new o.n(0,0,0,0);if((0,a.c)(u[0]))return o.n.fromString(u[0]);const e=(0,a.g)(u[0]);return!1===isNaN(e)?o.n.fromMilliseconds(e):null}case 2:return(0,a.c)(u[0])&&(0,a.c)(u[1])?o.n.fromString(u[0],u[1]):o.n.fromParts((0,a.g)(u[0]),(0,a.g)(u[1]),0,0);case 3:return o.n.fromParts((0,a.g)(u[0]),(0,a.g)(u[1]),(0,a.g)(u[2]),0);case 4:return o.n.fromParts((0,a.g)(u[0]),(0,a.g)(u[1]),(0,a.g)(u[2]),(0,a.g)(u[3]))}throw new i.aV(e,i.rH.InvalidParameter,n)}))},e.dateonly=function(e,n){return t(e,n,((t,i,o)=>{if((0,a.E)(o,0,3,e,n),3===o.length)return s.u.fromParts((0,a.g)(o[0]),(0,a.g)(o[1])+1,(0,a.g)(o[2]));if(2===o.length){const e=(0,a.j)(o[1]);return""===e?null:"X"===e?s.u.fromSeconds((0,a.g)(o[0])):"x"===e?s.u.fromMilliseconds((0,a.g)(o[0])):s.u.fromString((0,a.j)(o[0]),e)}if(1===o.length){if((0,a.c)(o[0])){if(""===o[0].replaceAll(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""))return null;if(!0===/^[0-9][0-9][0-9][0-9]$/.test(o[0]))return s.u.fromString(o[0]+"-01-01")}if((0,a.m)(o[0]))return o[0].clone();if((0,a.k)(o[0]))return s.u.fromParts(o[0].year,o[0].monthJS+1,o[0].day);const e=(0,a.g)(o[0]);return!1===isNaN(e)?s.u.fromMilliseconds(e):(0,a.c)(o[0])?s.u.fromString(o[0]):null}if(0===o.length){const t=r.iG.nowToArcadeDate((0,a.L)(e));return!1===t.isValid?null:s.u.fromParts(t.year,t.monthJS+1,t.day)}return null}))},e.changetimezone=function(e,n){return t(e,n,((t,s,o)=>{if((0,a.E)(o,2,2,e,n),null===o[0])return null;if((0,a.m)(o[0]))throw new i.aV(e,i.rH.CannotChangeTimeZoneDateOnly,n);if((0,a.m)(o[0]))throw new i.aV(e,i.rH.CannotChangeTimeZoneTime,n);const u=(0,a.l)(o[0],(0,a.L)(e));if(null===u)throw new i.aV(e,i.rH.InvalidParameter,n);const l=(0,r.Qn)(m((0,a.j)(o[1]),e),!1);if(null===l)return null;const c=r.iG.arcadeDateAndZoneToArcadeDate(u,l);return!1===c.isValid?null:c}))},e.timezone=function(e,n){return t(e,n,((t,i,s)=>{if((0,a.E)(s,1,2,e,n),(0,a.n)(s[0]))return"Unknown";if((0,a.m)(s[0]))return"Unknown";const o=(0,a.l)(s[0],(0,a.L)(e));if(null===o)return null;const u=o.timeZone;return"system"===u?r.iG.systemTimeZoneCanonicalName:"utc"===u.toLowerCase()?"UTC":"unknown"===u.toLowerCase()?"Unknown":u}))},e.timezoneoffset=function(e,n){return t(e,n,((t,r,i)=>{(0,a.E)(i,1,1,e,n);const s=(0,a.l)(i[0],(0,a.L)(e));return null===s?null:60*s.timeZoneOffset*1e3}))},e.now=function(e,n){return t(e,n,((t,i,s)=>{(0,a.E)(s,0,0,e,n);const o=r.iG.nowToArcadeDate((0,a.L)(e));return!1===o.isValid?null:o}))},e.timestamp=function(e,n){return t(e,n,((t,i,s)=>{(0,a.E)(s,0,0,e,n);const o=r.iG.nowUTCToArcadeDate();return!1===o.isValid?null:o}))},e.toutc=function(e,n){return t(e,n,((t,r,i)=>{(0,a.E)(i,1,1,e,n);const s=(0,a.l)(i[0],(0,a.L)(e));return null===s?null:s.toUTC()}))},e.tolocal=function(e,n){return t(e,n,((t,r,i)=>{(0,a.E)(i,1,1,e,n);const s=(0,a.l)(i[0],(0,a.L)(e));return null===s?null:s.toLocal()}))},e.day=function(e,n){return t(e,n,((t,r,i)=>{(0,a.E)(i,1,1,e,n);const s=p(i[0],(0,a.L)(e));return null===s?NaN:s.day}))},e.month=function(e,n){return t(e,n,((t,r,i)=>{(0,a.E)(i,1,1,e,n);const s=p(i[0],(0,a.L)(e));return null===s?NaN:s.monthJS}))},e.year=function(e,n){return t(e,n,((t,r,i)=>{(0,a.E)(i,1,1,e,n);const s=p(i[0],(0,a.L)(e));return null===s?NaN:s.year}))},e.hour=function(e,n){return t(e,n,((t,r,i)=>{if((0,a.E)(i,1,1,e,n),(0,a.n)(i[0]))return i[0].hour;const s=(0,a.l)(i[0],(0,a.L)(e));return null===s?NaN:s.hour}))},e.second=function(e,n){return t(e,n,((t,r,i)=>{if((0,a.E)(i,1,1,e,n),(0,a.n)(i[0]))return i[0].second;const s=(0,a.l)(i[0],(0,a.L)(e));return null===s?NaN:s.second}))},e.millisecond=function(e,n){return t(e,n,((t,r,i)=>{if((0,a.E)(i,1,1,e,n),(0,a.n)(i[0]))return i[0].millisecond;const s=(0,a.l)(i[0],(0,a.L)(e));return null===s?NaN:s.millisecond}))},e.minute=function(e,n){return t(e,n,((t,r,i)=>{if((0,a.E)(i,1,1,e,n),(0,a.n)(i[0]))return i[0].minute;const s=(0,a.l)(i[0],(0,a.L)(e));return null===s?NaN:s.minute}))},e.week=function(e,n){return t(e,n,((t,r,s)=>{(0,a.E)(s,1,2,e,n);const o=p(s[0],(0,a.L)(e));if(null===o)return NaN;const u=(0,a.g)((0,a.H)(s[1],0));if(u<0||u>6)throw new i.aV(e,i.rH.InvalidParameter,n);const l=o.day,d=o.monthJS,h=o.year,f=o.dayOfWeekJS,m=c(l,d,h)-1,g=Math.floor(m/7);return f-u+(f-u<0?7:0)<m-7*g?g+1:g}))},e.weekday=function(e,n){return t(e,n,((t,r,i)=>{(0,a.E)(i,1,1,e,n);const s=p(i[0],(0,a.L)(e));return null===s?NaN:s.dayOfWeekJS}))},e.isoweekday=function(e,n){return t(e,n,((t,r,i)=>{(0,a.E)(i,1,1,e,n);const s=p(i[0],(0,a.L)(e));return null===s?NaN:s.dayOfWeekISO}))},e.isomonth=function(e,n){return t(e,n,((t,r,i)=>{(0,a.E)(i,1,1,e,n);const s=p(i[0],(0,a.L)(e));return null===s?NaN:s.monthISO}))},e.isoweek=function(e,n){return t(e,n,((t,r,i)=>{(0,a.E)(i,1,1,e,n);const s=p(i[0],(0,a.L)(e));return null===s?NaN:s.weekISO}))},e.isoyear=function(e,n){return t(e,n,((t,r,i)=>{(0,a.E)(i,1,1,e,n);const s=p(i[0],(0,a.L)(e));return null===s?NaN:s.yearISO}))},e.date=function(e,n){return t(e,n,((t,i,s)=>{if((0,a.E)(s,0,8,e,n),3===s.length){if((0,a.m)(s[0])&&(0,a.n)(s[1])&&(0,a.c)(s[2])){const t=(0,r.Qn)(m((0,a.j)(s[2])??"unknown",e),!1);return null===t?null:f(r.iG.fromParts(s[0].year,s[0].month,s[0].day,s[1].hour,s[1].minute,s[1].second,s[1].millisecond,t))}return f(r.iG.fromParts((0,a.g)(s[0]),(0,a.g)(s[1])+1,(0,a.g)(s[2]),0,0,0,0,(0,a.L)(e)))}if(4===s.length)return f(r.iG.fromParts((0,a.g)(s[0]),(0,a.g)(s[1])+1,(0,a.g)(s[2]),(0,a.g)(s[3]),0,0,0,(0,a.L)(e)));if(5===s.length)return f(r.iG.fromParts((0,a.g)(s[0]),(0,a.g)(s[1])+1,(0,a.g)(s[2]),(0,a.g)(s[3]),(0,a.g)(s[4]),0,0,(0,a.L)(e)));if(6===s.length)return f(r.iG.fromParts((0,a.g)(s[0]),(0,a.g)(s[1])+1,(0,a.g)(s[2]),(0,a.g)(s[3]),(0,a.g)(s[4]),(0,a.g)(s[5]),0,(0,a.L)(e)));if(7===s.length)return f(r.iG.fromParts((0,a.g)(s[0]),(0,a.g)(s[1])+1,(0,a.g)(s[2]),(0,a.g)(s[3]),(0,a.g)(s[4]),(0,a.g)(s[5]),(0,a.g)(s[6]),(0,a.L)(e)));if(8===s.length){const t=(0,r.Qn)(m((0,a.j)(s[7])??"unknown",e),!1);return null===t?null:f(r.iG.fromParts((0,a.g)(s[0]),(0,a.g)(s[1])+1,(0,a.g)(s[2]),(0,a.g)(s[3]),(0,a.g)(s[4]),(0,a.g)(s[5]),(0,a.g)(s[6]),t))}if(2===s.length){if((0,a.m)(s[0])&&(0,a.c)(s[1])){const t=(0,r.Qn)(m((0,a.j)(s[1])??"unknown",e),!1);return null===t?null:f(r.iG.fromParts(s[0].year,s[0].month,s[0].day,0,0,0,0,t))}if((0,a.m)(s[0])&&(0,a.n)(s[1]))return f(r.iG.fromParts(s[0].year,s[0].month,s[0].day,s[1].hour,s[1].minute,s[1].second,s[1].millisecond,"unknown"));let t,n=(0,a.j)(s[1]);return""===n?null:(n=(0,a.O)(n,!0),t="X"===n?l.ou.fromSeconds((0,a.g)(s[0])):"x"===n?l.ou.fromMillis((0,a.g)(s[0])):l.ou.fromFormat((0,a.j)(s[0]),n,{locale:(0,u.Kd)(),numberingSystem:"latn"}),t.isValid?r.iG.dateTimeToArcadeDate(t):null)}if(1===s.length){if((0,a.m)(s[0]))return f(r.iG.fromParts(s[0].year,s[0].month,s[0].day,0,0,0,0,"unknown"));if((0,a.c)(s[0])){if(""===s[0].replaceAll(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""))return null;if(!0===/^[0-9][0-9][0-9][0-9]$/.test(s[0]))return(0,a.l)(s[0]+"-01-01",(0,a.L)(e))}const t=(0,a.g)(s[0]);if(!1===isNaN(t)){const n=l.ou.fromMillis(t);return n.isValid?r.iG.dateTimeAndZoneToArcadeDate(n,(0,a.L)(e)):null}return(0,a.l)(s[0],(0,a.L)(e))}return 0===s.length?r.iG.nowToArcadeDate((0,a.L)(e)):null}))},e.datediff=function(e,n){return t(e,n,((t,i,s)=>{if((0,a.E)(s,2,4,e,n),(0,a.n)(s[0]))return(0,a.n)(s[1])?s[0].difference(s[1],(0,a.j)(s[2])):NaN;if((0,a.n)(s[1]))return NaN;if((0,a.m)(s[0]))return(0,a.m)(s[1])?s[0].difference(s[1],(0,a.j)(s[2])):NaN;if((0,a.m)(s[1]))return NaN;let o=(0,a.l)(s[0],(0,a.L)(e)),u=(0,a.l)(s[1],(0,a.L)(e));if(null===o||null===u)return NaN;let l=(0,a.H)(s[3],"");switch(""!==l&&null!==l?(l=m((0,a.j)(l),e),o=r.iG.arcadeDateAndZoneToArcadeDate(o,l),u=r.iG.arcadeDateAndZoneToArcadeDate(u,l)):o.timeZone!==u.timeZone&&(o.isUnknownTimeZone?o=r.iG.arcadeDateAndZoneToArcadeDate(o,u.timeZone):(u.isUnknownTimeZone,u=r.iG.arcadeDateAndZoneToArcadeDate(u,o.timeZone))),(0,a.j)(s[2]).toLowerCase()){case"days":case"day":case"d":return o.diff(u,"days");case"months":case"month":return o.diff(u,"months");case"minutes":case"minute":case"m":return"M"===s[2]?o.diff(u,"months"):o.diff(u,"minutes");case"seconds":case"second":case"s":return o.diff(u,"seconds");case"milliseconds":case"millisecond":case"ms":default:return o.diff(u);case"hours":case"hour":case"h":return o.diff(u,"hours");case"years":case"year":case"y":return o.diff(u,"years")}}))},e.dateadd=function(e,n){return t(e,n,((t,r,i)=>{(0,a.E)(i,2,3,e,n);let s=(0,a.g)(i[1]);if(isNaN(s)||s===1/0||s===-1/0)return(0,a.n)(i[0])||(0,a.m)(i[0])?i[0].clone():(0,a.l)(i[0],(0,a.L)(e));let o="milliseconds";switch((0,a.j)(i[2]).toLowerCase()){case"days":case"day":case"d":o="days",s=(0,a.m)(i[0])?s:(0,a.P)(s);break;case"months":case"month":o="months",s=(0,a.m)(i[0])?s:(0,a.P)(s);break;case"minutes":case"minute":case"m":o="M"===i[2]?"months":"minutes";break;case"seconds":case"second":case"s":o="seconds";break;case"milliseconds":case"millisecond":case"ms":o="milliseconds";break;case"hours":case"hour":case"h":o="hours";break;case"years":case"year":case"y":o="years"}if((0,a.n)(i[0]))return i[0].plus(o,s);if((0,a.m)(i[0]))return i[0].plus(o,s);const u=(0,a.l)(i[0],(0,a.L)(e));return null===u?null:u.plus({[o]:s})}))}}},24240:(e,t,n)=>{n.d(t,{t:()=>s});var r=n(61363);function i(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n];return t/e.length}function a(e){const t=i(e);let n=0;for(let r=0;r<e.length;r++)n+=(t-e[r])**2;return n/e.length}function s(e,t,n=1e3){switch(e.toLowerCase()){case"distinct":return function(e,t){const n=[],i={},a=[];for(let s=0;s<e.length;s++){if(void 0!==e[s]&&null!==e[s]&&e[s]!==r.x){const t=e[s];if((0,r.b)(t)||(0,r.c)(t))void 0===i[t]&&(n.push(t),i[t]=1);else{let e=!1;for(let n=0;n<a.length;n++)!0===(0,r.C)(a[n],t)&&(e=!0);!1===e&&(a.push(t),n.push(t))}}if(n.length>=t&&-1!==t)return n}return n}(t,n);case"avg":case"mean":return i((0,r._)(t));case"min":return Math.min.apply(Math,(0,r._)(t));case"sum":return function(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n];return t}((0,r._)(t));case"max":return Math.max.apply(Math,(0,r._)(t));case"stdev":case"stddev":return Math.sqrt(a((0,r._)(t)));case"var":case"variance":return a((0,r._)(t));case"count":return t.length}return 0}},12834:(e,t,n)=>{n.d(t,{Z:()=>F,r:()=>w});var r=n(33586),i=n(27535),a=n(15274),s=n(50728),o=n(25785),u=n(61363),l=n(71201),c=n(6570),d=n(9361),h=n(65091),f=n(94139),m=n(38913),p=n(58901),g=n(86662),D=n(33955);function y(e){return e&&"esri.arcade.Feature"===e.arcadeDeclaredClass}function w(e,t){e.ringisclockwise=function(e,n){return t(e,n,((t,r,a)=>{(0,u.E)(a,1,1,e,n);let s=[];if(null===a[0])return!1;if((0,u.o)(a[0]))for(const t of a[0]){if(!(t instanceof f.Z))throw new i.aV(e,i.rH.InvalidParameter,n);s.push(t.hasZ?t.hasM?[t.x,t.y,t.z,t.m]:[t.x,t.y,t.z]:[t.x,t.y])}else if(a[0]instanceof o.Z)s=a[0]._elements;else{if(!(0,u.q)(a[0]))throw new i.aV(e,i.rH.InvalidParameter,n);for(const t of a[0].toArray()){if(!(t instanceof f.Z))throw new i.aV(e,i.rH.InvalidParameter,n);s.push(t.hasZ?t.hasM?[t.x,t.y,t.z,t.m]:[t.x,t.y,t.z]:[t.x,t.y])}}return!(s.length<3)&&(0,g.bu)(s)}))},e.polygon=function(e,n){return t(e,n,((t,s,o)=>{(0,u.E)(o,1,1,e,n);let l=null;if(o[0]instanceof r.Z){if(l=(0,u.A)(a.Z.parseGeometryFromDictionary(o[0]),e.spatialReference),l instanceof m.Z==0)throw new i.aV(e,i.rH.InvalidParameter,n)}else l=o[0]instanceof m.Z?(0,D.im)(o[0].toJSON()):(0,u.A)(new m.Z(JSON.parse(o[0])),e.spatialReference);if(null!==l&&!1===l.spatialReference.equals(e.spatialReference))throw new i.aV(e,i.rH.WrongSpatialReference,n);return(0,u.Q)(l)}))},e.polyline=function(e,n){return t(e,n,((t,s,o)=>{(0,u.E)(o,1,1,e,n);let l=null;if(o[0]instanceof r.Z){if(l=(0,u.A)(a.Z.parseGeometryFromDictionary(o[0]),e.spatialReference),l instanceof p.Z==0)throw new i.aV(e,i.rH.InvalidParameter,n)}else l=o[0]instanceof p.Z?(0,D.im)(o[0].toJSON()):(0,u.A)(new p.Z(JSON.parse(o[0])),e.spatialReference);if(null!==l&&!1===l.spatialReference.equals(e.spatialReference))throw new i.aV(e,i.rH.WrongSpatialReference,n);return(0,u.Q)(l)}))},e.point=function(e,n){return t(e,n,((t,s,o)=>{(0,u.E)(o,1,1,e,n);let l=null;if(o[0]instanceof r.Z){if(l=(0,u.A)(a.Z.parseGeometryFromDictionary(o[0]),e.spatialReference),l instanceof f.Z==0)throw new i.aV(e,i.rH.InvalidParameter,n)}else l=o[0]instanceof f.Z?(0,D.im)(o[0].toJSON()):(0,u.A)(new f.Z(JSON.parse(o[0])),e.spatialReference);if(null!==l&&!1===l.spatialReference.equals(e.spatialReference))throw new i.aV(e,i.rH.WrongSpatialReference,n);return(0,u.Q)(l)}))},e.multipoint=function(e,n){return t(e,n,((t,s,o)=>{(0,u.E)(o,1,1,e,n);let l=null;if(o[0]instanceof r.Z){if(l=(0,u.A)(a.Z.parseGeometryFromDictionary(o[0]),e.spatialReference),l instanceof h.Z==0)throw new i.aV(e,i.rH.InvalidParameter,n)}else l=o[0]instanceof h.Z?(0,D.im)(o[0].toJSON()):(0,u.A)(new h.Z(JSON.parse(o[0])),e.spatialReference);if(null!==l&&!1===l.spatialReference.equals(e.spatialReference))throw new i.aV(e,i.rH.WrongSpatialReference,n);return(0,u.Q)(l)}))},e.extent=function(e,n){return t(e,n,((t,s,o)=>{o=(0,u.F)(o),(0,u.E)(o,1,1,e,n);let l=null;if(o[0]instanceof r.Z)l=(0,u.A)(a.Z.parseGeometryFromDictionary(o[0]),e.spatialReference);else if(o[0]instanceof f.Z){const e={xmin:o[0].x,ymin:o[0].y,xmax:o[0].x,ymax:o[0].y,spatialReference:o[0].spatialReference.toJSON()},t=o[0];t.hasZ?(e.zmin=t.z,e.zmax=t.z):t.hasM&&(e.mmin=t.m,e.mmax=t.m),l=(0,D.im)(e)}else l=o[0]instanceof m.Z||o[0]instanceof p.Z||o[0]instanceof h.Z?(0,D.im)(o[0].extent?.toJSON()):o[0]instanceof c.Z?(0,D.im)(o[0].toJSON()):(0,u.A)(new c.Z(JSON.parse(o[0])),e.spatialReference);if(null!==l&&!1===l.spatialReference.equals(e.spatialReference))throw new i.aV(e,i.rH.WrongSpatialReference,n);return(0,u.Q)(l)}))},e.geometry=function(e,n){return t(e,n,((t,s,o)=>{(0,u.E)(o,1,1,e,n);let l=null;if(null===o[0])return null;if(l=y(o[0])?(0,u.A)(o[0].geometry(),e.spatialReference):o[0]instanceof r.Z?(0,u.A)(a.Z.parseGeometryFromDictionary(o[0]),e.spatialReference):(0,u.A)((0,D.im)(JSON.parse(o[0])),e.spatialReference),null!==l&&!1===l.spatialReference.equals(e.spatialReference))throw new i.aV(e,i.rH.WrongSpatialReference,n);return(0,u.Q)(l)}))},e.setgeometry=function(e,n){return t(e,n,((t,r,a)=>{if((0,u.E)(a,2,2,e,n),!y(a[0]))throw new i.aV(e,i.rH.InvalidParameter,n);if(!0===a[0].immutable)throw new i.aV(e,i.rH.Immutable,n);if(!(a[1]instanceof d.Z||null===a[1]))throw new i.aV(e,i.rH.InvalidParameter,n);return a[0]._geometry=a[1],u.x}))},e.feature=function(e,n){return t(e,n,((t,s,o)=>{if(0===o.length)throw new i.aV(e,i.rH.WrongNumberOfParameters,n);let l=null;if(1===o.length)if((0,u.c)(o[0]))l=a.Z.fromJson(JSON.parse(o[0]),e.timeReference);else if(y(o[0]))l=a.Z.createFromArcadeFeature(o[0]);else if(o[0]instanceof d.Z)l=a.Z.createFromGraphicLikeObject(o[0],null,null,e.timeReference);else{if(!(o[0]instanceof r.Z))throw new i.aV(e,i.rH.InvalidParameter,n);{let t=o[0].hasField("geometry")?o[0].field("geometry"):null,n=o[0].hasField("attributes")?o[0].field("attributes"):null;null!==t&&t instanceof r.Z&&(t=a.Z.parseGeometryFromDictionary(t)),null!==n&&(n=a.Z.parseAttributesFromDictionary(n)),l=a.Z.createFromGraphicLikeObject(t,n,null,e.timeReference)}}else if(2===o.length){let t=null,s=null;if(null!==o[0])if(o[0]instanceof d.Z)t=o[0];else{if(!(t instanceof r.Z))throw new i.aV(e,i.rH.InvalidParameter,n);t=a.Z.parseGeometryFromDictionary(o[0])}if(null!==o[1]){if(!(o[1]instanceof r.Z))throw new i.aV(e,i.rH.InvalidParameter,n);s=a.Z.parseAttributesFromDictionary(o[1])}l=a.Z.createFromGraphicLikeObject(t,s,null,e.timeReference)}else{let t=null;const s={};if(null!==o[0])if(o[0]instanceof d.Z)t=o[0];else{if(!(t instanceof r.Z))throw new i.aV(e,i.rH.InvalidParameter,n);t=a.Z.parseGeometryFromDictionary(o[0])}for(let t=1;t<o.length;t+=2){const r=(0,u.j)(o[t]),a=o[t+1];if(!(null==a||(0,u.c)(a)||isNaN(a)||(0,u.k)(a)||(0,u.b)(a)||(0,u.n)(a)||(0,u.m)(a)||(0,u.a)(a)))throw new i.aV(e,i.rH.InvalidParameter,n);if((0,u.i)(a)||!1===(0,u.f)(a))throw new i.aV(e,i.rH.InvalidParameter,n);s[r]=a===u.x?null:a}l=a.Z.createFromGraphicLikeObject(t,s,null,e.timeReference)}return l._geometry=(0,u.A)(l.geometry(),e.spatialReference),l.immutable=!1,l}))},e.dictionary=function(e,n){return t(e,n,((t,a,s)=>{if(0===s.length||1===s.length&&null===s[0]){const e=new r.Z;return e.immutable=!1,e}if(1===s.length&&(0,u.c)(s[0]))try{const t=JSON.parse(s[0]),n=r.Z.convertObjectToArcadeDictionary(t,(0,u.L)(e),!1);return n.immutable=!1,n}catch(t){throw new i.aV(e,i.rH.InvalidParameter,n)}if(1===s.length&&s[0]instanceof d.Z)try{const t=s[0].toJSON();t.hasZ=!0===s[0].hasZ,t.hasM=!0===s[0].hasM;const n=r.Z.convertObjectToArcadeDictionary(t,(0,u.L)(e),!1);return n.immutable=!1,n}catch(t){throw new i.aV(e,i.rH.InvalidParameter,n)}if(1===s.length&&(0,u.r)(s[0]))try{const e=new r.Z;e.immutable=!1,e.setField("geometry",s[0].geometry());const t=new r.Z;t.immutable=!1,e.setField("attributes",t);for(const e of s[0].keys())t.setField(e,s[0].field(e));return e}catch(t){throw new i.aV(e,i.rH.InvalidParameter,n)}if(1===s.length&&s[0]instanceof r.Z)try{const e=new r.Z;e.immutable=!1;for(const t of s[0].keys())e.setField(t,s[0].field(t));return e}catch(t){throw new i.aV(e,i.rH.InvalidParameter,n)}if(2===s.length&&s[0]instanceof r.Z&&(0,u.a)(s[1]))try{if(!0!==s[1]){const e=new r.Z;e.immutable=!1;for(const t of s[0].keys())e.setField(t,s[0].field(t));return e}return s[0].deepClone()}catch(t){throw new i.aV(e,i.rH.InvalidParameter,n)}if(s.length%2!=0)throw new i.aV(e,i.rH.WrongNumberOfParameters,n);const o={};for(let t=0;t<s.length;t+=2){const r=(0,u.j)(s[t]),a=s[t+1];if(!(null==a||(0,u.c)(a)||isNaN(a)||(0,u.k)(a)||(0,u.b)(a)||(0,u.a)(a)||(0,u.m)(a)||(0,u.n)(a)||(0,u.o)(a)||(0,u.q)(a)))throw new i.aV(e,i.rH.InvalidParameter,n);if((0,u.i)(a))throw new i.aV(e,i.rH.InvalidParameter,n);o[r]=a===u.x?null:a}const l=new r.Z(o);return l.immutable=!1,l}))},e.haskey=function(e,n){return t(e,n,((t,a,s)=>{(0,u.E)(s,2,2,e,n);const o=(0,u.j)(s[1]);if(y(s[0]))return s[0].hasField(o);if(s[0]instanceof r.Z)return s[0].hasField(o);if(s[0]instanceof d.Z){const e=F(s[0],o,null,null,2);return!e||"notfound"!==e.keystate}throw new i.aV(e,i.rH.InvalidParameter,n)}))},e.hasvalue=function(e,n){return t(e,n,((t,i,a)=>{if((0,u.E)(a,2,2,e,n),null===a[0]||null===a[1])return!1;const s=(0,u.j)(a[1]);return(0,u.r)(a[0])||a[0]instanceof r.Z?!!a[0].hasField(s)&&null!==a[0].field(s):a[0]instanceof d.Z&&null!==F(a[0],s,null,null,0)}))},e.indexof=function(e,n){return t(e,n,((t,r,a)=>{(0,u.E)(a,2,2,e,n);const s=a[1];if((0,u.o)(a[0])){for(let e=0;e<a[0].length;e++)if((0,u.C)(s,a[0][e]))return e;return-1}if((0,u.q)(a[0])){const e=a[0].length();for(let t=0;t<e;t++)if((0,u.C)(s,a[0].get(t)))return t;return-1}throw new i.aV(e,i.rH.InvalidParameter,n)}))},e.angle=function(e,n){return t(e,n,((t,r,a)=>{if(a=(0,u.F)(a),(0,u.E)(a,2,3,e,n),!(a[0]instanceof f.Z))throw new i.aV(e,i.rH.InvalidParameter,n);if(!(a[1]instanceof f.Z))throw new i.aV(e,i.rH.InvalidParameter,n);if(a.length>2&&!(a[2]instanceof f.Z))throw new i.aV(e,i.rH.InvalidParameter,n);return 2===a.length?(0,l.RI)(a[0],a[1]):(0,l.ws)(a[0],a[1],a[2])}))},e.bearing=function(e,n){return t(e,n,((t,r,a)=>{if(a=(0,u.F)(a),(0,u.E)(a,2,3,e,n),!(a[0]instanceof f.Z))throw new i.aV(e,i.rH.InvalidParameter,n);if(!(a[1]instanceof f.Z))throw new i.aV(e,i.rH.InvalidParameter,n);if(a.length>2&&!(a[2]instanceof f.Z))throw new i.aV(e,i.rH.InvalidParameter,n);return 2===a.length?(0,l.B9)(a[0],a[1]):(0,l.Es)(a[0],a[1],a[2])}))},e.isselfintersecting=function(e,n){return t(e,n,((t,r,i)=>{i=(0,u.F)(i),(0,u.E)(i,1,1,e,n);let a=i[0];if(a instanceof m.Z)return a.isSelfIntersecting;if(a instanceof p.Z)return a=a.paths,(0,l.nB)(a);if(a instanceof h.Z){const e=a.points;for(let t=0;t<e.length;t++)for(let n=0;n<e.length;n++)if(n!==t){let r=!0;for(let i=0;i<e[t].length;i++)if(e[t][i]!==e[n][i]){r=!1;break}if(!0===r)return!0}}return!(!(0,u.o)(a)&&!(0,u.q)(a))&&(a=(0,u.J)(a,e.spatialReference),null!==a&&(a=a.paths),(0,l.nB)(a))}))}}let x=0;function F(e,t,n,a,u=1){let l;switch(t=t.toLowerCase()){case"hasz":{const t=e.hasZ;return void 0!==t&&t}case"hasm":{const t=e.hasM;return void 0!==t&&t}case"spatialreference":{let t=e.spatialReference._arcadeCacheId;if(void 0===t){let n=!0;Object.freeze&&Object.isFrozen(e.spatialReference)&&(n=!1),n&&(x++,e.spatialReference._arcadeCacheId=x,t=x)}const n=new r.Z({wkt:e.spatialReference.wkt,wkid:e.spatialReference.wkid});return void 0!==t&&(n._arcadeCacheId="SPREF"+t.toString()),n}}switch(e.type){case"extent":switch(t){case"xmin":case"xmax":case"ymin":case"ymax":case"zmin":case"zmax":case"mmin":case"mmax":{const n=e[t];return void 0!==n?n:null}case"type":return"Extent"}break;case"polygon":switch(t){case"rings":return l=e.cache._arcadeCacheId,void 0===l&&(x++,l=x,e.cache._arcadeCacheId=l),new s.Z(e.rings,e.spatialReference,!0===e.hasZ,!0===e.hasM,l);case"type":return"Polygon"}break;case"point":switch(t){case"x":case"y":case"z":case"m":return void 0!==e[t]?e[t]:null;case"type":return"Point"}break;case"polyline":switch(t){case"paths":return l=e.cache._arcadeCacheId,void 0===l&&(x++,l=x,e.cache._arcadeCacheId=l),new s.Z(e.paths,e.spatialReference,!0===e.hasZ,!0===e.hasM,l);case"type":return"Polyline"}break;case"multipoint":switch(t){case"points":return l=e.cache._arcadeCacheId,void 0===l&&(x++,l=x,e.cache._arcadeCacheId=l),new o.Z(e.points,e.spatialReference,!0===e.hasZ,!0===e.hasM,l,1);case"type":return"Multipoint"}}if(1===u)throw new i.aV(n,i.rH.InvalidIdentifier,a);return 2===u?{keystate:"notfound"}:null}},38176:(e,t,n)=>{n.d(t,{r:()=>s});var r=n(61363),i=n(14808);function a(e,t,n){return void 0===n||0==+n?Math[e](t):(t=+t,n=+n,isNaN(t)||"number"!=typeof n||n%1!=0?NaN:(t=t.toString().split("e"),+((t=(t=Math[e](+(t[0]+"e"+(t[1]?+t[1]-n:-n)))).toString().split("e"))[0]+"e"+(t[1]?+t[1]+n:n))))}function s(e,t){function n(e,t,n){const i=(0,r.g)(e);return isNaN(i)?i:isNaN(t)||isNaN(n)||t>n?NaN:i<t?t:i>n?n:i}e.number=function(e,n){return t(e,n,((t,a,s)=>{(0,r.E)(s,1,2,e,n);const o=s[0];if((0,r.b)(o))return o;if(null===o)return 0;if((0,r.k)(o)||(0,r.n)(o)||(0,r.m)(o))return o.toNumber();if((0,r.a)(o))return Number(o);if((0,r.o)(o))return NaN;if(""===o)return Number(o);if(void 0===o)return Number(o);if((0,r.c)(o)){if(void 0!==s[1]){let e=(0,r.S)(s[1],"‰","");return e=(0,r.S)(e,"¤",""),(0,i.Qc)(o,{pattern:e})}return Number(o.trim())}return Number(o)}))},e.abs=function(e,n){return t(e,n,((t,i,a)=>((0,r.E)(a,1,1,e,n),Math.abs((0,r.g)(a[0])))))},e.acos=function(e,n){return t(e,n,((t,i,a)=>((0,r.E)(a,1,1,e,n),Math.acos((0,r.g)(a[0])))))},e.asin=function(e,n){return t(e,n,((t,i,a)=>((0,r.E)(a,1,1,e,n),Math.asin((0,r.g)(a[0])))))},e.atan=function(e,n){return t(e,n,((t,i,a)=>((0,r.E)(a,1,1,e,n),Math.atan((0,r.g)(a[0])))))},e.atan2=function(e,n){return t(e,n,((t,i,a)=>((0,r.E)(a,2,2,e,n),Math.atan2((0,r.g)(a[0]),(0,r.g)(a[1])))))},e.ceil=function(e,n){return t(e,n,((t,i,s)=>{if((0,r.E)(s,1,2,e,n),2===s.length){let e=(0,r.g)(s[1]);return isNaN(e)&&(e=0),a("ceil",(0,r.g)(s[0]),-1*e)}return Math.ceil((0,r.g)(s[0]))}))},e.round=function(e,n){return t(e,n,((t,i,s)=>{if((0,r.E)(s,1,2,e,n),2===s.length){let e=(0,r.g)(s[1]);return isNaN(e)&&(e=0),a("round",(0,r.g)(s[0]),-1*e)}return Math.round((0,r.g)(s[0]))}))},e.floor=function(e,n){return t(e,n,((t,i,s)=>{if((0,r.E)(s,1,2,e,n),2===s.length){let e=(0,r.g)(s[1]);return isNaN(e)&&(e=0),a("floor",(0,r.g)(s[0]),-1*e)}return Math.floor((0,r.g)(s[0]))}))},e.cos=function(e,n){return t(e,n,((t,i,a)=>((0,r.E)(a,1,1,e,n),Math.cos((0,r.g)(a[0])))))},e.isnan=function(e,n){return t(e,n,((t,i,a)=>((0,r.E)(a,1,1,e,n),"number"==typeof a[0]&&isNaN(a[0]))))},e.exp=function(e,n){return t(e,n,((t,i,a)=>((0,r.E)(a,1,1,e,n),Math.exp((0,r.g)(a[0])))))},e.log=function(e,n){return t(e,n,((t,i,a)=>((0,r.E)(a,1,1,e,n),Math.log((0,r.g)(a[0])))))},e.pow=function(e,n){return t(e,n,((t,i,a)=>((0,r.E)(a,2,2,e,n),(0,r.g)(a[0])**(0,r.g)(a[1]))))},e.random=function(e,n){return t(e,n,((t,i,a)=>((0,r.E)(a,0,0,e,n),Math.random())))},e.sin=function(e,n){return t(e,n,((t,i,a)=>((0,r.E)(a,1,1,e,n),Math.sin((0,r.g)(a[0])))))},e.sqrt=function(e,n){return t(e,n,((t,i,a)=>((0,r.E)(a,1,1,e,n),Math.sqrt((0,r.g)(a[0])))))},e.tan=function(e,n){return t(e,n,((t,i,a)=>((0,r.E)(a,1,1,e,n),Math.tan((0,r.g)(a[0])))))},e.defaultvalue=function(e,n){return t(e,n,((t,i,a)=>((0,r.E)(a,2,2,e,n),null===a[0]||""===a[0]||void 0===a[0]?a[1]:a[0])))},e.isempty=function(e,n){return t(e,n,((t,i,a)=>((0,r.E)(a,1,1,e,n),null===a[0]||""===a[0]||void 0===a[0])))},e.boolean=function(e,n){return t(e,n,((t,i,a)=>{(0,r.E)(a,1,1,e,n);const s=a[0];return(0,r.h)(s)}))},e.constrain=function(e,i){return t(e,i,((t,a,s)=>{(0,r.E)(s,3,3,e,i);const o=(0,r.g)(s[1]),u=(0,r.g)(s[2]);if((0,r.o)(s[0])){const e=[];for(const t of s[0])e.push(n(t,o,u));return e}if((0,r.q)(s[0])){const e=[];for(let t=0;t<s[0].length();t++)e.push(n(s[0].get(t),o,u));return e}return n(s[0],o,u)}))}}},58130:(e,t,n)=>{n.d(t,{r:()=>o});var r=n(27535),i=n(61363),a=n(24240);function s(e,t,n,r){if(1===r.length){if((0,i.o)(r[0]))return(0,a.t)(e,r[0],-1);if((0,i.q)(r[0]))return(0,a.t)(e,r[0].toArray(),-1)}return(0,a.t)(e,r,-1)}function o(e,t){e.stdev=function(e,n){return t(e,n,((e,t,n)=>s("stdev",0,0,n)))},e.variance=function(e,n){return t(e,n,((e,t,n)=>s("variance",0,0,n)))},e.average=function(e,n){return t(e,n,((e,t,n)=>s("mean",0,0,n)))},e.mean=function(e,n){return t(e,n,((e,t,n)=>s("mean",0,0,n)))},e.sum=function(e,n){return t(e,n,((e,t,n)=>s("sum",0,0,n)))},e.min=function(e,n){return t(e,n,((e,t,n)=>s("min",0,0,n)))},e.max=function(e,n){return t(e,n,((e,t,n)=>s("max",0,0,n)))},e.distinct=function(e,n){return t(e,n,((e,t,n)=>s("distinct",0,0,n)))},e.count=function(e,n){return t(e,n,((t,a,s)=>{if((0,i.E)(s,1,1,e,n),(0,i.o)(s[0])||(0,i.c)(s[0]))return s[0].length;if((0,i.q)(s[0]))return s[0].length();throw new r.aV(e,r.rH.InvalidParameter,n)}))}}},27360:(e,t,n)=>{n.d(t,{r:()=>ye});var r=n(28228),i=n(80692),a=n(33586),s=n(27535),o=n(61363),u=n(90658),l=n(70586);const c=e=>(t,n,r)=>(r=r||14,+e(t,n).toFixed(r)),d=(e,t)=>e+t,h=(e,t)=>e*t,f=(e,t)=>e/t,m=(e,t,n)=>c(d)(e,t,n),p=(e,t,n)=>c(h)(e,t,n),g=(e,t,n)=>c(f)(e,t,n),D=360,y=400,w=2*Math.PI,x=3600,F=60,A=60,C=180*x/Math.PI,E=D*F*A,S=90*x,b=180*x,T=String.fromCharCode(7501),v="°";function k(e){if(!1===(0,o.c)(e))throw new s.aV(null,s.rH.InvalidParameter,null);return e}function I(e,t){const n=10**t;return Math.round(e*n)/n}function _(e){const t=parseFloat(e.toString().replace(Math.trunc(e).toString(),"0"))*Math.sign(e);return e<0?{fraction:t,integer:Math.ceil(e)}:{fraction:t,integer:Math.floor(e)}}var M,N,B,L;function H(e,t){switch(e){case M.north:return"SHORT"===t?"N":"North";case M.east:return"SHORT"===t?"E":"East";case M.south:return"SHORT"===t?"S":"South";case M.west:return"SHORT"===t?"W":"West"}}function V(e,t){return e-Math.floor(e/t)*t}function Z(e){switch(e){case N.truncated_degrees:case N.decimal_degrees:return D;case N.radians:return w;case N.gradians:return y;case N.seconds:return E;case N.fractional_degree_minutes:return F;case N.fractional_minute_seconds:return A;default:throw new s.aV(null,s.rH.LogicError,null,{reason:"unsupported evaluations"})}}function R(e){switch(e.toUpperCase().trim()){case"NORTH":case"NORTHAZIMUTH":case"NORTH AZIMUTH":return B.north_azimuth;case"POLAR":return B.polar;case"QUADRANT":return B.quadrant;case"SOUTH":case"SOUTHAZIMUTH":case"SOUTH AZIMUTH":return B.south_azimuth}throw new s.aV(null,s.rH.LogicError,null,{reason:"unsupported directionType"})}function O(e){switch(e.toUpperCase().trim()){case"D":case"DD":case"DECIMALDEGREE":case"DECIMAL DEGREE":case"DEGREE":case"DECIMALDEGREES":case"DECIMAL DEGREES":case"DEGREES":return N.decimal_degrees;case"DMS":case"DEGREESMINUTESSECONDS":case"DEGREES MINUTES SECONDS":return N.degrees_minutes_seconds;case"R":case"RAD":case"RADS":case"RADIAN":case"RADIANS":return N.radians;case"G":case"GON":case"GONS":case"GRAD":case"GRADS":case"GRADIAN":case"GRADIANS":return N.gradians}throw new s.aV(null,s.rH.LogicError,null,{reason:"unsupported units"})}!function(e){e[e.north=0]="north",e[e.east=1]="east",e[e.south=2]="south",e[e.west=3]="west"}(M||(M={})),function(e){e[e.decimal_degrees=1]="decimal_degrees",e[e.seconds=2]="seconds",e[e.degrees_minutes_seconds=3]="degrees_minutes_seconds",e[e.radians=4]="radians",e[e.gradians=5]="gradians",e[e.truncated_degrees=6]="truncated_degrees",e[e.fractional_degree_minutes=7]="fractional_degree_minutes",e[e.fractional_minute_seconds=8]="fractional_minute_seconds"}(N||(N={})),function(e){e[e.north_azimuth=1]="north_azimuth",e[e.polar=2]="polar",e[e.quadrant=3]="quadrant",e[e.south_azimuth=4]="south_azimuth"}(B||(B={})),function(e){e[e.meridian=0]="meridian",e[e.direction=1]="direction"}(L||(L={}));class P{constructor(e,t,n){this.m_degrees=e,this.m_minutes=t,this.m_seconds=n}getField(e){switch(e){case N.decimal_degrees:case N.truncated_degrees:return this.m_degrees;case N.fractional_degree_minutes:return this.m_minutes;case N.seconds:case N.fractional_minute_seconds:return this.m_seconds;default:throw new s.aV(null,s.rH.LogicError,null,{reason:"unexpected evaluation"})}}static secondsToDMS(e){const t=_(e).fraction;let n=_(e).integer;const r=Math.floor(n/x);n-=r*x;const i=Math.floor(n/A);return n-=i*A,new P(r,i,n+t)}static numberToDms(e){const t=_(e).fraction,n=_(e).integer,r=p(_(100*t).fraction,100),i=_(100*t).integer;return new P(n,i,r)}format(e,t){let n=I(this.m_seconds,t),r=this.m_minutes,i=this.m_degrees;if(e===N.seconds||e===N.fractional_minute_seconds)A<=n&&(n-=A,++r),F<=r&&(r=0,++i),D<=i&&(i=0);else if(e===N.fractional_degree_minutes)n=0,r=30<=this.m_seconds?this.m_minutes+1:this.m_minutes,i=this.m_degrees,F<=r&&(r=0,++i),D<=i&&(i=0);else if(e===N.decimal_degrees||e===N.truncated_degrees){const e=g(this.m_seconds,x),t=g(this.m_minutes,F);i=Math.round(this.m_degrees+t+e),r=0,n=0}return new P(i,r,n)}static dmsToSeconds(e,t,n){return e*x+t*A+n}}class U{constructor(e,t,n){this.meridian=e,this.angle=t,this.direction=n}fetchAzimuth(e){return e===L.meridian?this.meridian:this.direction}}class G{constructor(e){this._angle=e}static createFromAngleAndDirection(e,t){return new G(new j(G._convertDirectionFormat(e.extractAngularUnits(N.seconds),t,B.north_azimuth)))}getAngle(e){const t=this._angle.extractAngularUnits(N.seconds);switch(e){case B.north_azimuth:case B.south_azimuth:case B.polar:return new j(G._convertDirectionFormat(t,B.north_azimuth,e));case B.quadrant:{const e=G.secondsNorthAzimuthToQuadrant(t);return new j(e.angle)}}}getMeridian(e){const t=this._angle.extractAngularUnits(N.seconds);switch(e){case B.north_azimuth:return M.north;case B.south_azimuth:return M.south;case B.polar:return M.east;case B.quadrant:return G.secondsNorthAzimuthToQuadrant(t).meridian}}getDirection(e){const t=this._angle.extractAngularUnits(N.seconds);switch(e){case B.north_azimuth:return M.east;case B.south_azimuth:return M.west;case B.polar:return M.north;case B.quadrant:return G.secondsNorthAzimuthToQuadrant(t).direction}}static secondsNorthAzimuthToQuadrant(e){const t=e<=S||e>=972e3?M.north:M.south,n=t===M.north?Math.min(E-e,e):Math.abs(e-b),r=e>b?M.west:M.east;return new U(t,n,r)}static createFromAngleMeridianAndDirection(e,t,n){return new G(new j(G.secondsQuadrantToNorthAzimuth(e.extractAngularUnits(N.seconds),t,n)))}static secondsQuadrantToNorthAzimuth(e,t,n){return t===M.north?n===M.east?e:E-e:n===M.east?b-e:b+e}static _convertDirectionFormat(e,t,n){let r=0;switch(t){case B.north_azimuth:r=e;break;case B.polar:r=S-e;break;case B.quadrant:throw new s.aV(null,s.rH.LogicError,null,{reason:"unexpected evaluation"});case B.south_azimuth:r=e+b}let i=0;switch(n){case B.north_azimuth:i=r;break;case B.polar:i=S-r;break;case B.quadrant:throw new s.aV(null,s.rH.LogicError,null,{reason:"unexpected evaluation"});case B.south_azimuth:i=r-b}return i=function(e,t){return e%t}(i,E),i<0?E+i:i}}function z(e,t,n){let r=null;switch(t){case N.decimal_degrees:r=p(e,x);break;case N.seconds:r=e;break;case N.gradians:r=p(e,3240);break;case N.radians:r=p(e,C);break;default:throw new s.aV(null,s.rH.LogicError,null,{reason:"unexpected evaluation"})}switch(n){case N.decimal_degrees:return g(r,x);case N.seconds:return r;case N.gradians:return g(r,3240);case N.radians:return r/C;default:throw new s.aV(null,s.rH.LogicError,null,{reason:"unexpected evaluation"})}}class j{constructor(e){this._seconds=e}static createFromAngleAndUnits(e,t){return new j(z(e,t,N.seconds))}extractAngularUnits(e){return z(this._seconds,N.seconds,q(e))}static createFromDegreesMinutesSeconds(e,t,n){return new j(m(m(p(e,x),p(t,A)),n))}}function q(e){switch((0,l.O3)(e),e){case N.decimal_degrees:case N.truncated_degrees:case N.degrees_minutes_seconds:return N.decimal_degrees;case N.gradians:return N.gradians;case N.fractional_degree_minutes:return N.fractional_degree_minutes;case N.radians:return N.radians;case N.seconds:case N.fractional_minute_seconds:return N.seconds}}class J{constructor(e,t,n,r){this.view=e,this.angle=t,this.merdian=n,this.direction=r,this._dms=null,this._formattedDms=null}static createFromStringAndBearing(e,t,n){return new J(e,t.getAngle(n),t.getMeridian(n),t.getDirection(n))}fetchAngle(){return this.angle}fetchMeridian(){return this.merdian}fetchDirection(){return this.direction}fetchView(){return this.view}fetchDms(){return null===this._dms&&this._calculateDms(),this._dms}fetchFormattedDms(){return null===this._formattedDms&&this._calculateDms(),this._formattedDms}_calculateDms(){let e=null,t=N.truncated_degrees,n=0;for(let r=0;r<this.view.length;r++){const i=this.view[r];switch(i){case"m":e=Q(this.view,r,i),t=t===N.truncated_degrees?N.fractional_degree_minutes:t,r=e.newpos;continue;case"s":e=Q(this.view,r,i),t=N.fractional_minute_seconds,n=n<e.rounding?e.rounding:n,r=e.newpos;continue;default:continue}}this._dms=P.secondsToDMS(this.angle.extractAngularUnits(N.seconds)),this._formattedDms=P.secondsToDMS(this.angle.extractAngularUnits(N.seconds)).format(t,n)}}function W(e,t,n,r,i){let a=null;switch(t){case N.decimal_degrees:case N.radians:case N.gradians:return a=V(I(e.extractAngularUnits(t),r),Z(t)),a.toFixed(r).padStart(n+r+(r>0?1:0),"0");case N.truncated_degrees:case N.fractional_degree_minutes:return a=V(i.fetchFormattedDms().getField(t),Z(t)),a.toFixed(r).padStart(n+r+(r>0?1:0),"0");case N.fractional_minute_seconds:return a=V(I(i.fetchDms().getField(t),r),Z(t)),a.toFixed(r).padStart(n+r+(r>0?1:0),"0");default:throw new s.aV(null,s.rH.LogicError,null,{reason:"unexpected evaluation"})}}function K(e){switch(e.toUpperCase().trim()){case"N":case"NORTH":return M.north;case"E":case"EAST":return M.east;case"S":case"SOUTH":return M.south;case"W":case"WEST":return M.west}return null}function $(e){const t=parseFloat(e);if((0,o.b)(t)){if(isNaN(t))throw new s.aV(null,s.rH.LogicError,null,{reason:"invalid conversion"});return t}throw new s.aV(null,s.rH.LogicError,null,{reason:"invalid conversion"})}function Y(e,t,n){const r=n===B.quadrant;let i=null,a=null,u=0,l=0,c=0;if(r){if(e.length<2)throw new s.aV(null,s.rH.LogicError,null,{reason:"conversion error"});c=1;const t=function(e){switch((0,o.g)(e)){case 1:return{first:M.north,second:M.east};case 2:return{first:M.south,second:M.east};case 3:return{first:M.south,second:M.west};case 4:return{first:M.north,second:M.west}}return null}((0,o.j)(e[e.length-1]));if(t?(i=t.first,a=t.second):(u=1,i=K((0,o.j)(e[0])),a=K((0,o.j)(e[e.length-1]))),null===i||null===a)throw new s.aV(null,s.rH.LogicError,null,{reason:"invalid conversion"})}switch(t){case N.decimal_degrees:case N.radians:case N.gradians:if(0===e.length)throw new s.aV(null,s.rH.LogicError,null,{reason:"invalid conversion"});return r?G.createFromAngleMeridianAndDirection(j.createFromAngleAndUnits($(e[u]),q(t)),i,a):G.createFromAngleAndDirection(j.createFromAngleAndUnits($(e[u]),q(t)),n);case N.degrees_minutes_seconds:if(l=e.length-c-u,3===l){const t=j.createFromDegreesMinutesSeconds($(e[u]),$(e[u+1]),$(e[u+2]));return r?G.createFromAngleMeridianAndDirection(t,i,a):G.createFromAngleAndDirection(t,n)}if(1===l){const t=$(e[u]),s=P.numberToDms(t),o=j.createFromDegreesMinutesSeconds(s.m_degrees,s.m_minutes,s.m_seconds);return r?G.createFromAngleMeridianAndDirection(o,i,a):G.createFromAngleAndDirection(o,n)}}throw new s.aV(null,s.rH.LogicError,null,{reason:"invalid conversion"})}function Q(e,t,n){const r={padding:0,rounding:0,newpos:t};let i=!1;for(;t<e.length;){const a=e[t];if(a===n)i?r.rounding++:r.padding++,t++;else{if("."!==a)break;i=!0,t++}}return r.newpos=t-1,r}function X(e,t,n){const r={escaped:"",newpos:t};for(t++;t<e.length;){const n=e[t];if(t++,"]"===n)break;r.escaped+=n}return r.newpos=t-1,r}function ee(e,t,n){if(!(t instanceof a.Z))throw new s.aV(null,s.rH.InvalidParameter,null);if(!1===t.hasField("directionType"))throw new s.aV(null,s.rH.LogicError,null,{reason:"missing directionType"});if(!1===t.hasField("angleType"))throw new s.aV(null,s.rH.LogicError,null,{reason:"missing angleType"});const r=R(k(t.field("directiontype"))),i=function(e,t,n){if((0,o.b)(e))return function(e,t,n){if(n===B.quadrant)throw new s.aV(null,s.rH.LogicError,null,{reason:"conversion error"});if(t===N.degrees_minutes_seconds){const t=P.numberToDms(e);return G.createFromAngleAndDirection(j.createFromDegreesMinutesSeconds(t.m_degrees,t.m_minutes,t.m_seconds),n)}return G.createFromAngleAndDirection(j.createFromAngleAndUnits(e,q(t)),n)}((0,o.g)(e),t,n);if((0,o.c)(e))return Y(function(e){const t=new Set([" ","-","/","'",'"',"\\","^",v,T,"\t","\r","\n","*"]);let n="";for(let r=0;r<e.length;r++){const i=e.charAt(r);t.has(i)?n+="RRSPLITRRSPLITRR":n+=i}return n.split("RRSPLITRRSPLITRR").filter((e=>""!==e))}(e),t,n);if((0,o.o)(e))return Y(e,t,n);if((0,o.q)(e))return Y(e.toArray(),t,n);throw new s.aV(null,s.rH.LogicError,null,{reason:"conversion error"})}(e,O(k(t.field("angletype"))),r);if(!(n instanceof a.Z))throw new s.aV(null,s.rH.InvalidParameter,null);if(!1===n.hasField("directionType"))throw new s.aV(null,s.rH.LogicError,null,{reason:"missing directionType"});if(!1===n.hasField("outputType"))throw new s.aV(null,s.rH.LogicError,null,{reason:"missing angleType"});const u=R(k(n.field("directiontype"))),l=n.hasField("angleType")?O(k(n.field("angletype"))):null,c=k(n.field("outputType")).toUpperCase().trim();if(!u||!c)throw new s.aV(null,s.rH.LogicError,null,{reason:"conversion error"});if(!(l||"TEXT"===c&&n.hasField("format")))throw new s.aV(null,s.rH.LogicError,null,{reason:"invalid unit"});switch(c){case"VALUE":return u===B.quadrant||l===N.degrees_minutes_seconds?function(e,t,n){const r=e.getAngle(t);if(t===B.quadrant&&n===N.degrees_minutes_seconds){const n=P.secondsToDMS(r.extractAngularUnits(N.seconds));return[H(e.getMeridian(t),"SHORT"),n.m_degrees,n.m_minutes,n.m_seconds,H(e.getDirection(t),"SHORT")]}if(n===N.degrees_minutes_seconds){const e=P.secondsToDMS(r.extractAngularUnits(N.seconds));return[e.m_degrees,e.m_minutes,e.m_seconds]}return t===B.quadrant?[H(e.getMeridian(t),"SHORT"),r.extractAngularUnits(n),H(e.getDirection(t),"SHORT")]:[r.extractAngularUnits(n)]}(i,u,l):function(e,t,n){const r=q(n);if(r&&n!==N.degrees_minutes_seconds)return e.getAngle(t).extractAngularUnits(r);throw new s.aV(null,s.rH.LogicError,null,{reason:"conversion error"})}(i,u,l);case"TEXT":{let e="";return n.hasField("format")&&(e=(0,o.j)(n.field("format"))),null!==e&&""!==e||(e=function(e,t){let n="";switch(e){case N.decimal_degrees:n=t===B.quadrant?"DD.DD"+v:"DDD.DD"+v;break;case N.degrees_minutes_seconds:n=t===B.quadrant?"dd"+v+" mm' ss\"":"ddd"+v+" mm' ss.ss\"";break;case N.radians:n="R.RR";break;case N.gradians:n="GGG.GG"+T;break;default:throw new s.aV(null,s.rH.LogicError,null,{reason:"conversion error"})}return t===B.quadrant&&(n="p "+n+" b"),n}(l,u)),function(e,t,n){let r="",i=null,a=null;const s=J.createFromStringAndBearing(t,e,n),o={D:N.decimal_degrees,d:N.truncated_degrees,m:N.fractional_degree_minutes,s:N.fractional_minute_seconds,R:N.radians,G:N.gradians};for(let u=0;u<t.length;u++){const l=t[u];switch(l){case"[":i=X(t,u),r+=i.escaped,u=i.newpos;continue;case"D":case"d":case"m":case"s":case"R":case"G":i=Q(t,u,l),a=e.getAngle(n),r+=W(a,o[l],i.padding,i.rounding,s),u=i.newpos;continue;case"P":case"p":r+=H(s.fetchMeridian(),"p"===l?"SHORT":"LONG");continue;case"B":case"b":r+=H(s.fetchDirection(),"b"===l?"SHORT":"LONG");continue;default:r+=l}}return r}(i,e,u)}default:throw new s.aV(null,s.rH.InvalidParameter,null)}}const te=2654435761,ne=2246822519,re=3266489917,ie=668265263,ae=374761393;function se(e){const t=[];for(let n=0,r=e.length;n<r;n++){let r=e.charCodeAt(n);r<128?t.push(r):r<2048?t.push(192|r>>6,128|63&r):r<55296||r>=57344?t.push(224|r>>12,128|r>>6&63,128|63&r):(n++,r=65536+((1023&r)<<10|1023&e.charCodeAt(n)),t.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|63&r))}return new Uint8Array(t)}class oe{constructor(e){this._seed=e,this._totallen=0,this._bufs=[],this.init()}init(){return this._bufs=[],this._totallen=0,this}updateFloatArray(e){const t=[];for(const n of e)isNaN(n)?t.push("NaN"):n===1/0?t.push("Infinity"):n===-1/0?t.push("-Infinity"):0===n?t.push("0"):t.push(n.toString(16));this.update(se(t.join("")))}updateIntArray(e){const t=Int32Array.from(e);this.update(new Uint8Array(t.buffer))}updateUint8Array(e){this.update(Uint8Array.from(e))}updateWithString(e){return this.update(se(e))}update(e){return this._bufs.push(e),this._totallen+=e.length,this}digest(){const e=new Uint8Array(this._totallen);let t=0;for(const n of this._bufs)e.set(n,t),t+=n.length;return this.init(),this._xxHash32(e,this._seed)}_xxHash32(e,t=0){const n=e;let r=t+ae&4294967295,i=0;if(n.length>=16){const n=[t+te+ne&4294967295,t+ne&4294967295,t+0&4294967295,t-te&4294967295],a=e,s=a.length-16;let o=0;for(i=0;(4294967280&i)<=s;i+=4){const e=i,t=a[e]+(a[e+1]<<8),r=a[e+2]+(a[e+3]<<8),s=t*ne+(r*ne<<16);let u=n[o]+s&4294967295;u=u<<13|u>>>19;const l=65535&u,c=u>>>16;n[o]=l*te+(c*te<<16)&4294967295,o=o+1&3}r=(n[0]<<1|n[0]>>>31)+(n[1]<<7|n[1]>>>25)+(n[2]<<12|n[2]>>>20)+(n[3]<<18|n[3]>>>14)&4294967295}r=r+e.length&4294967295;const a=e.length-4;for(;i<=a;i+=4){const e=i,t=n[e]+(n[e+1]<<8),a=n[e+2]+(n[e+3]<<8);r=r+(t*re+(a*re<<16))&4294967295,r=r<<17|r>>>15,r=(65535&r)*ie+((r>>>16)*ie<<16)&4294967295}for(;i<n.length;++i)r+=n[i]*ae,r=r<<11|r>>>21,r=(65535&r)*te+((r>>>16)*te<<16)&4294967295;return r^=r>>>15,r=((65535&r)*ne&4294967295)+((r>>>16)*ne<<16),r^=r>>>13,r=((65535&r)*re&4294967295)+((r>>>16)*re<<16),r^=r>>>16,r<0?r+4294967296:r}}var ue=n(17452),le=n(6570),ce=n(65091),de=n(94139),he=n(38913),fe=n(58901),me=n(82971),pe=n(48522);function ge(e,t){if(!e||!t)return e===t;if(e.x===t.x&&e.y===t.y){if(e.hasZ){if(e.z!==t.z)return!1}else if(t.hasZ)return!1;if(e.hasM){if(e.m!==t.m)return!1}else if(t.hasM)return!1;return!0}return!1}function De(e,t,n){if(null!==e)if((0,o.o)(e)){if(t.updateUint8Array([61]),n.map.has(e)){const r=n.map.get(e);t.updateIntArray([61237541^r])}else{n.map.set(e,n.currentLength++);for(const r of e)De(r,t,n);n.map.delete(e),n.currentLength--}t.updateUint8Array([199])}else if((0,o.q)(e)){if(t.updateUint8Array([61]),n.map.has(e)){const r=n.map.get(e);t.updateIntArray([61237541^r])}else{n.map.set(e,n.currentLength++);for(const r of e.toArray())De(r,t,n);n.map.delete(e),n.currentLength--}t.updateUint8Array([199])}else{if((0,o.k)(e))return t.updateIntArray([e.toNumber()]),void t.updateUint8Array([241]);if((0,o.m)(e))return t.updateIntArray([e.toNumber()]),void t.updateIntArray([257]);if((0,o.n)(e))return t.updateIntArray([e.toNumber()]),void t.updateIntArray([263]);if((0,o.c)(e))return t.updateIntArray([e.length]),t.updateWithString(e),void t.updateUint8Array([41]);if((0,o.a)(e))t.updateUint8Array([!0===e?1:0,113]);else{if((0,o.b)(e))return t.updateFloatArray([e]),void t.updateUint8Array([173]);if(e instanceof i.Z)throw new s.aV(n.context,s.rH.UnsupportedHashType,n.node);if(e instanceof r.Z)throw new s.aV(n.context,s.rH.UnsupportedHashType,n.node);if(!(e instanceof a.Z)){if((0,o.r)(e))throw new s.aV(n.context,s.rH.UnsupportedHashType,n.node);if(e instanceof de.Z)return t.updateIntArray([3833836621]),t.updateIntArray([0]),t.updateFloatArray([e.x]),t.updateIntArray([1]),t.updateFloatArray([e.y]),e.hasZ&&(t.updateIntArray([2]),t.updateFloatArray([e.z])),e.hasM&&(t.updateIntArray([3]),t.updateFloatArray([e.m])),t.updateIntArray([3765347959]),void De(e.spatialReference.wkid,t,n);if(e instanceof he.Z){t.updateIntArray([1266616829]);for(let r=0;r<e.rings.length;r++){const i=e.rings[r],a=[];let s=null,o=null;for(let t=0;t<i.length;t++){const n=e.getPoint(r,t);if(0===t)s=n;else if(ge(o,n))continue;o=n,t===i.length-1&&ge(s,n)||a.push(n)}t.updateIntArray([1397116793,a.length]);for(let e=0;e<a.length;e++){const r=a[e];t.updateIntArray([3962308117,e]),De(r,t,n),t.updateIntArray([2716288009])}t.updateIntArray([2278822459])}return t.updateIntArray([3878477243]),void De(e.spatialReference.wkid,t,n)}if(e instanceof fe.Z){t.updateIntArray([4106883559]);for(let r=0;r<e.paths.length;r++){const i=e.paths[r];t.updateIntArray([1397116793,i.length]);for(let a=0;a<i.length;a++)t.updateIntArray([3962308117,a]),De(e.getPoint(r,a),t,n),t.updateIntArray([2716288009]);t.updateIntArray([2278822459])}return t.updateIntArray([2568784753]),void De(e.spatialReference.wkid,t,n)}if(e instanceof ce.Z){t.updateIntArray([588535921,e.points.length]);for(let r=0;r<e.points.length;r++){const i=e.getPoint(r);t.updateIntArray([r]),De(i,t,n)}return t.updateIntArray([1700171621]),void De(e.spatialReference.wkid,t,n)}if(e instanceof le.Z)return t.updateIntArray([3483648373]),t.updateIntArray([0]),t.updateFloatArray([e.xmax]),t.updateIntArray([1]),t.updateFloatArray([e.xmin]),t.updateIntArray([2]),t.updateFloatArray([e.ymax]),t.updateIntArray([3]),t.updateFloatArray([e.ymin]),e.hasZ&&(t.updateIntArray([4]),t.updateFloatArray([e.zmax]),t.updateIntArray([5]),t.updateFloatArray([e.zmin])),e.hasM&&(t.updateIntArray([6]),t.updateFloatArray([e.mmax]),t.updateIntArray([7]),t.updateFloatArray([e.mmin])),t.updateIntArray([3622027469]),void De(e.spatialReference.wkid,t,n);if(e instanceof me.Z)return t.updateIntArray([14]),void 0!==e.wkid&&null!==e.wkid&&t.updateIntArray([e.wkid]),e.wkt&&t.updateWithString(e.wkt),void(e.wkt2&&t.updateWithString(e.wkt2));if((0,o.i)(e))throw new s.aV(n.context,s.rH.UnsupportedHashType,n.node);if((0,o.u)(e))throw new s.aV(n.context,s.rH.UnsupportedHashType,n.node);if((0,o.s)(e))throw new s.aV(n.context,s.rH.UnsupportedHashType,n.node);if(e===o.x)throw new s.aV(n.context,s.rH.UnsupportedHashType,n.node);throw new s.aV(n.context,s.rH.UnsupportedHashType,n.node)}if(t.updateUint8Array([223]),n.map.has(e)){const r=n.map.get(e);t.updateIntArray([61237541^r])}else{n.map.set(e,n.currentLength++);for(const r of e.keys())t.updateIntArray([r.length]),t.updateWithString(r),t.updateUint8Array([251]),De(e.field(r),t,n),t.updateUint8Array([239]);n.map.delete(e),n.currentLength--}t.updateUint8Array([73])}}else t.updateUint8Array([0,139])}function ye(e,t){e.portal=function(e,n){return t(e,n,((t,i,a)=>((0,o.E)(a,1,1,e,n),new r.Z((0,o.j)(a[0])))))},e.typeof=function(e,n){return t(e,n,((t,r,i)=>{(0,o.E)(i,1,1,e,n);const a=(0,o.N)(i[0]);if("Unrecognized Type"===a)throw new s.aV(e,s.rH.UnrecognizedType,n);return a}))},e.trim=function(e,n){return t(e,n,((t,r,i)=>((0,o.E)(i,1,1,e,n),(0,o.j)(i[0]).trim())))},e.tohex=function(e,n){return t(e,n,((t,r,i)=>{(0,o.E)(i,1,1,e,n);const a=(0,o.g)(i[0]);return isNaN(a)?a:a.toString(16)}))},e.upper=function(e,n){return t(e,n,((t,r,i)=>((0,o.E)(i,1,1,e,n),(0,o.j)(i[0]).toUpperCase())))},e.proper=function(e,n){return t(e,n,((t,r,i)=>{(0,o.E)(i,1,2,e,n);let a=1;2===i.length&&"firstword"===(0,o.j)(i[1]).toLowerCase()&&(a=2);const s=/\s/,u=(0,o.j)(i[0]);let l="",c=!0;for(let e=0;e<u.length;e++){let t=u[e];s.test(t)?1===a&&(c=!0):t.toUpperCase()!==t.toLowerCase()&&(c?(t=t.toUpperCase(),c=!1):t=t.toLowerCase()),l+=t}return l}))},e.lower=function(e,n){return t(e,n,((t,r,i)=>((0,o.E)(i,1,1,e,n),(0,o.j)(i[0]).toLowerCase())))},e.guid=function(e,n){return t(e,n,((t,r,i)=>{if((0,o.E)(i,0,1,e,n),i.length>0)switch((0,o.j)(i[0]).toLowerCase()){case"digits":return(0,o.T)().replace("-","").replace("-","").replace("-","").replace("-","");case"digits-hyphen":return(0,o.T)();case"digits-hyphen-braces":return"{"+(0,o.T)()+"}";case"digits-hyphen-parentheses":return"("+(0,o.T)()+")"}return"{"+(0,o.T)()+"}"}))},e.standardizeguid=function(e,n){return t(e,n,((t,r,i)=>{(0,o.E)(i,2,2,e,n);let a=(0,o.j)(i[0]);if(""===a||null===a)return"";const s=/^(\{|\()?(?<partA>[0-9a-z]{8})(\-?)(?<partB>[0-9a-z]{4})(\-?)(?<partC>[0-9a-z]{4})(\-?)(?<partD>[0-9a-z]{4})(\-?)(?<partE>[0-9a-z]{12})(\}|\))?$/gim.exec(a);if(!s)return"";const u=s.groups;switch(a=u.partA+"-"+u.partB+"-"+u.partC+"-"+u.partD+"-"+u.partE,(0,o.j)(i[1]).toLowerCase()){case"digits":return a.replace("-","").replace("-","").replace("-","").replace("-","");case"digits-hyphen":return a;case"digits-hyphen-braces":return"{"+a+"}";case"digits-hyphen-parentheses":return"("+a+")"}return"{"+a+"}"}))},e.console=function(e,n){return t(e,n,((t,n,r)=>(0===r.length||(1===r.length?e.console((0,o.j)(r[0])):e.console((0,o.j)(r))),o.x)))},e.mid=function(e,n){return t(e,n,((t,r,i)=>{(0,o.E)(i,2,3,e,n);let a=(0,o.g)(i[1]);if(isNaN(a))return"";if(a<0&&(a=0),2===i.length)return(0,o.j)(i[0]).substr(a);let s=(0,o.g)(i[2]);return isNaN(s)?"":(s<0&&(s=0),(0,o.j)(i[0]).substr(a,s))}))},e.find=function(e,n){return t(e,n,((t,r,i)=>{(0,o.E)(i,2,3,e,n);let a=0;if(i.length>2){if(a=(0,o.g)((0,o.H)(i[2],0)),isNaN(a))return-1;a<0&&(a=0)}return(0,o.j)(i[1]).indexOf((0,o.j)(i[0]),a)}))},e.left=function(e,n){return t(e,n,((t,r,i)=>{(0,o.E)(i,2,2,e,n);let a=(0,o.g)(i[1]);return isNaN(a)?"":(a<0&&(a=0),(0,o.j)(i[0]).substr(0,a))}))},e.right=function(e,n){return t(e,n,((t,r,i)=>{(0,o.E)(i,2,2,e,n);let a=(0,o.g)(i[1]);return isNaN(a)?"":(a<0&&(a=0),(0,o.j)(i[0]).substr(-1*a,a))}))},e.split=function(e,n){return t(e,n,((t,r,i)=>{let a;(0,o.E)(i,2,4,e,n);let s=(0,o.g)((0,o.H)(i[2],-1));const u=(0,o.h)((0,o.H)(i[3],!1));if(-1===s||null===s||!0===u?a=(0,o.j)(i[0]).split((0,o.j)(i[1])):(isNaN(s)&&(s=-1),s<-1&&(s=-1),a=(0,o.j)(i[0]).split((0,o.j)(i[1]),s)),!1===u)return a;const l=[];for(let e=0;e<a.length&&!(-1!==s&&l.length>=s);e++)""!==a[e]&&void 0!==a[e]&&l.push(a[e]);return l}))},e.text=function(e,n){return t(e,n,((t,r,i)=>((0,o.E)(i,1,2,e,n),(0,o.t)(i[0],i[1]))))},e.concatenate=function(e,n){return t(e,n,((e,t,n)=>{const r=[];if(n.length<1)return"";if((0,o.o)(n[0])){const e=(0,o.H)(n[2],"");for(let t=0;t<n[0].length;t++)r[t]=(0,o.t)(n[0][t],e);return n.length>1?r.join(n[1]):r.join("")}if((0,o.q)(n[0])){const e=(0,o.H)(n[2],"");for(let t=0;t<n[0].length();t++)r[t]=(0,o.t)(n[0].get(t),e);return n.length>1?r.join(n[1]):r.join("")}for(let e=0;e<n.length;e++)r[e]=(0,o.t)(n[e]);return r.join("")}))},e.reverse=function(e,n){return t(e,n,((t,r,i)=>{if((0,o.E)(i,1,1,e,n),(0,o.o)(i[0])){const e=i[0].slice(0);return e.reverse(),e}if((0,o.q)(i[0])){const e=i[0].toArray().slice(0);return e.reverse(),e}throw new s.aV(e,s.rH.InvalidParameter,n)}))},e.replace=function(e,n){return t(e,n,((t,r,i)=>{(0,o.E)(i,3,4,e,n);const a=(0,o.j)(i[0]),s=(0,o.j)(i[1]),u=(0,o.j)(i[2]);return 4!==i.length||(0,o.h)(i[3])?(0,o.S)(a,s,u):a.replace(s,u)}))},e.schema=function(e,n){return t(e,n,((t,r,i)=>{if((0,o.r)(i[0])){const t=(0,o.U)(i[0]);return t?a.Z.convertObjectToArcadeDictionary(t,(0,o.L)(e)):null}throw new s.aV(e,s.rH.InvalidParameter,n)}))},e.subtypes=function(e,n){return t(e,n,((t,r,i)=>{if((0,o.E)(i,1,1,e,n),(0,o.r)(i[0])){const t=(0,o.V)(i[0]);return t?a.Z.convertObjectToArcadeDictionary(t,(0,o.L)(e)):null}throw new s.aV(e,s.rH.InvalidParameter,n)}))},e.subtypecode=function(e,n){return t(e,n,((t,r,i)=>{if((0,o.E)(i,1,1,e,n),(0,o.r)(i[0])){const e=(0,o.V)(i[0]);if(!e)return null;if(e.subtypeField&&i[0].hasField(e.subtypeField)){const t=i[0].field(e.subtypeField);for(const n of e.subtypes)if(n.code===t)return n.code;return null}return null}throw new s.aV(e,s.rH.InvalidParameter,n)}))},e.subtypename=function(e,n){return t(e,n,((t,r,i)=>{if((0,o.E)(i,1,1,e,n),(0,o.r)(i[0])){const e=(0,o.V)(i[0]);if(!e)return"";if(e.subtypeField&&i[0].hasField(e.subtypeField)){const t=i[0].field(e.subtypeField);for(const n of e.subtypes)if(n.code===t)return n.name;return""}return""}throw new s.aV(e,s.rH.InvalidParameter,n)}))},e.gdbversion=function(e,n){return t(e,n,((t,r,i)=>{if((0,o.E)(i,1,1,e,n),(0,o.r)(i[0]))return i[0].gdbVersion();throw new s.aV(e,s.rH.InvalidParameter,n)}))},e.domain=function(e,n){return t(e,n,((t,r,i)=>{if((0,o.E)(i,2,3,e,n),(0,o.r)(i[0])){const t=(0,o.W)(i[0],(0,o.j)(i[1]),void 0===i[2]?void 0:i[2]);return t&&t.domain?"coded-value"===t.domain.type||"codedValue"===t.domain.type?a.Z.convertObjectToArcadeDictionary({type:"codedValue",name:t.domain.name,dataType:u.yE[t.field.type],codedValues:t.domain.codedValues.map((e=>({name:e.name,code:e.code})))},(0,o.L)(e)):a.Z.convertObjectToArcadeDictionary({type:"range",name:t.domain.name,dataType:u.yE[t.field.type],min:t.domain.min,max:t.domain.max},(0,o.L)(e)):null}throw new s.aV(e,s.rH.InvalidParameter,n)}))},e.domainname=function(e,n){return t(e,n,((t,r,i)=>{if((0,o.E)(i,2,4,e,n),(0,o.r)(i[0]))return(0,o.X)(i[0],(0,o.j)(i[1]),i[2],void 0===i[3]?void 0:i[3]);throw new s.aV(e,s.rH.InvalidParameter,n)}))},e.domaincode=function(e,n){return t(e,n,((t,r,i)=>{if((0,o.E)(i,2,4,e,n),(0,o.r)(i[0]))return(0,o.Y)(i[0],(0,o.j)(i[1]),i[2],void 0===i[3]?void 0:i[3]);throw new s.aV(e,s.rH.InvalidParameter,n)}))},e.urlencode=function(e,n){return t(e,n,((t,r,i)=>{if((0,o.E)(i,1,1,e,n),null===i[0])return"";if(i[0]instanceof a.Z){let e="";for(const t of i[0].keys()){const n=i[0].field(t);""!==e&&(e+="&"),e+=null===n?encodeURIComponent(t)+"=":encodeURIComponent(t)+"="+encodeURIComponent(n)}return e}return encodeURIComponent((0,o.j)(i[0]))}))},e.hash=function(e,n){return t(e,n,((t,r,i)=>{(0,o.E)(i,1,1,e,n);const a=new oe(0);return De(i[0],a,{context:e,node:n,map:new Map,currentLength:0}),a.digest()}))},e.convertdirection=function(e,n){return t(e,n,((t,r,i)=>((0,o.E)(i,3,3,e,n),ee(i[0],i[1],i[2]))))},e.fromjson=function(e,n){return t(e,n,((t,r,i)=>{if((0,o.E)(i,1,1,e,n),!1===(0,o.c)(i[0]))throw new s.aV(e,s.rH.InvalidParameter,n);return a.Z.convertJsonToArcade(JSON.parse((0,o.j)(i[0])),(0,o.L)(e))}))},e.expects=function(e,n){return t(e,n,((t,r,i)=>{if(i.length<1)throw new s.aV(e,s.rH.WrongNumberOfParameters,n);return o.x}))},e.tocharcode=function(e,n){return t(e,n,((t,r,i)=>{(0,o.E)(i,1,2,e,n);const a=(0,o.g)((0,o.H)(i[1],0)),u=(0,o.j)(i[0]);if(0===u.length&&1===i.length)return null;if(u.length<=a||a<0)throw new s.aV(e,s.rH.OutOfBounds,n);return u.charCodeAt(a)}))},e.tocodepoint=function(e,n){return t(e,n,((t,r,i)=>{(0,o.E)(i,1,2,e,n);const a=(0,o.g)((0,o.H)(i[1],0)),u=(0,o.j)(i[0]);if(0===u.length&&1===i.length)return null;if(u.length<=a||a<0)throw new s.aV(e,s.rH.OutOfBounds,n);return u.codePointAt(a)}))},e.fromcharcode=function(e,n){return t(e,n,((t,r,i)=>{if(i.length<1)throw new s.aV(e,s.rH.WrongNumberOfParameters,n);const a=i.map((e=>Math.trunc((0,o.g)(e)))).filter((e=>e>=0&&e<=65535));return 0===a.length?null:String.fromCharCode.apply(null,a)}))},e.fromcodepoint=function(e,n){return t(e,n,((t,r,i)=>{if(i.length<1)throw new s.aV(e,s.rH.WrongNumberOfParameters,n);let a;try{a=i.map((e=>Math.trunc((0,o.g)(e)))).filter((e=>e<=1114111&&e>>>0===e))}catch(e){return null}return 0===a.length?null:String.fromCodePoint.apply(null,a)}))},e.getuser=function(e,n){return t(e,n,((t,i,u)=>{(0,o.E)(u,0,2,e,n);let l=(0,o.H)(u[1],"");if(l=!0===l||!1===l?"":(0,o.j)(l),null!==l&&""!==l)return null;if(0===u.length||u[0]instanceof r.Z){let t=null;if(t=e.services&&e.services.portal?e.services.portal:pe.Z.getDefault(),u.length>0&&!function(e,t){return!!e&&(0,ue.tm)(e,t?.restUrl||"")}(u[0].field("url"),t))return null;if(!t)return null;if(""===l){const n=function(e){return"loaded"===e.loadStatus&&e.user&&e.user.sourceJSON?e.user.sourceJSON:null}(t);if(n){const t=JSON.parse(JSON.stringify(n));for(const e of["lastLogin","created","modified"])void 0!==t[e]&&null!==t[e]&&(t[e]=new Date(t[e]));return a.Z.convertObjectToArcadeDictionary(t,(0,o.L)(e))}}return null}throw new s.aV(e,s.rH.InvalidParameter,n)}))},e.getenvironment=function(e,n){return t(e,n,((t,r,i)=>((0,o.E)(i,0,0,e,n),a.Z.convertObjectToArcadeDictionary((0,o.Z)((0,o.L)(e),e.spatialReference),(0,o.L)(e),!0))))}}},77286:(e,t,n)=>{n.d(t,{EI:()=>i,Lz:()=>s,SV:()=>a,U:()=>u,r1:()=>o});var r=n(6570);function i(e){if(null==e)return null;if("number"==typeof e)return e;let t=e.toLowerCase();switch(t=t.replaceAll(/\s/g,""),t=t.replaceAll("-",""),t){case"meters":case"meter":case"m":case"squaremeters":case"squaremeter":return 109404;case"miles":case"mile":case"squaremile":case"squaremiles":return 109439;case"kilometers":case"kilometer":case"squarekilometers":case"squarekilometer":case"km":return 109414;case"acres":case"acre":case"ac":return 109402;case"hectares":case"hectare":case"ha":return 109401;case"yard":case"yd":case"yards":case"squareyards":case"squareyard":return 109442;case"feet":case"ft":case"foot":case"squarefeet":case"squarefoot":return 109405;case"nmi":case"nauticalmile":case"nauticalmiles":case"squarenauticalmile":case"squarenauticalmiles":return 109409}return null}function a(e){if(null==e)return null;switch(e.type){case"polygon":case"multipoint":case"polyline":return e.extent;case"point":return new r.Z({xmin:e.x,ymin:e.y,xmax:e.x,ymax:e.y,spatialReference:e.spatialReference});case"extent":return e}return null}function s(e){if(null==e)return null;if("number"==typeof e)return e;let t=e.toLowerCase();switch(t=t.replaceAll(/\s/g,""),t=t.replaceAll("-",""),t){case"meters":case"meter":case"m":case"squaremeters":case"squaremeter":return 9001;case"miles":case"mile":case"squaremile":case"squaremiles":return 9093;case"kilometers":case"kilometer":case"squarekilometers":case"squarekilometer":case"km":return 9036;case"yard":case"yd":case"yards":case"squareyards":case"squareyard":return 9096;case"feet":case"ft":case"foot":case"squarefeet":case"squarefoot":return 9002;case"nmi":case"nauticalmile":case"nauticalmiles":case"squarenauticalmile":case"squarenauticalmiles":return 9030}return null}function o(e){if(null==e)return null;const t=e.clone();return void 0!==e.cache._geVersion&&(t.cache._geVersion=e.cache._geVersion),t}function u(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}},90077:(e,t,n)=>{n.d(t,{Kq:()=>g,Vf:()=>D,bV:()=>h,dN:()=>y,gW:()=>l,mb:()=>p,w8:()=>m,x5:()=>f});const r={all:{min:2,max:2},time:{min:0,max:4},dateonly:{min:0,max:3},getenvironment:{min:0,max:0},none:{min:2,max:2},any:{min:2,max:2},reduce:{min:2,max:3},map:{min:2,max:2},filter:{min:2,max:2},fromcodepoint:{min:1,max:-1},fromcharcode:{min:1,max:-1},tocodepoint:{min:1,max:2},tocharcode:{min:1,max:2},concatenate:{min:0,max:-1},expects:{min:1,max:-1},getfeatureset:{min:1,max:2},week:{min:1,max:2},fromjson:{min:1,max:1},length3d:{min:1,max:2},tohex:{min:1,max:1},hash:{min:1,max:1},timezone:{min:1,max:1},timezoneoffset:{min:1,max:1},changetimezone:{min:2,max:2},isoweek:{min:1,max:1},isoweekday:{min:1,max:1},hasvalue:{min:2,max:2},isomonth:{min:1,max:1},isoyear:{min:1,max:1},resize:{min:2,max:3},slice:{min:0,max:-1},splice:{min:0,max:-1},push:{min:2,max:2},pop:{min:1,max:1},includes:{min:2,max:2},array:{min:0,max:2},front:{min:1,max:1},back:{min:1,max:1},insert:{min:3,max:3},erase:{min:2,max:2},split:{min:2,max:4},guid:{min:0,max:1},standardizeguid:{min:2,max:2},today:{min:0,max:0},angle:{min:2,max:3},bearing:{min:2,max:3},urlencode:{min:1,max:1},now:{min:0,max:0},timestamp:{min:0,max:0},day:{min:1,max:1},month:{min:1,max:1},year:{min:1,max:1},hour:{min:1,max:1},second:{min:1,max:1},millisecond:{min:1,max:1},minute:{min:1,max:1},weekday:{min:1,max:1},toutc:{min:1,max:1},tolocal:{min:1,max:1},date:{min:0,max:8},datediff:{min:2,max:4},dateadd:{min:2,max:3},trim:{min:1,max:1},text:{min:1,max:2},left:{min:2,max:2},right:{min:2,max:2},mid:{min:2,max:3},upper:{min:1,max:1},proper:{min:1,max:2},lower:{min:1,max:1},find:{min:2,max:3},iif:{min:3,max:3},decode:{min:2,max:-1},when:{min:2,max:-1},defaultvalue:{min:2,max:2},isempty:{min:1,max:1},domaincode:{min:2,max:4},domainname:{min:2,max:4},polygon:{min:1,max:1},point:{min:1,max:1},polyline:{min:1,max:1},extent:{min:1,max:1},multipoint:{min:1,max:1},ringisclockwise:{min:1,max:1},geometry:{min:1,max:1},count:{min:0,max:-1},number:{min:1,max:2},acos:{min:1,max:1},asin:{min:1,max:1},atan:{min:1,max:1},atan2:{min:2,max:2},ceil:{min:1,max:2},floor:{min:1,max:2},round:{min:1,max:2},cos:{min:1,max:1},exp:{min:1,max:1},log:{min:1,max:1},min:{min:0,max:-1},constrain:{min:3,max:3},console:{min:0,max:-1},max:{min:0,max:-1},pow:{min:2,max:2},random:{min:0,max:0},sqrt:{min:1,max:1},sin:{min:1,max:1},tan:{min:1,max:1},abs:{min:1,max:1},isnan:{min:1,max:1},stdev:{min:0,max:-1},average:{min:0,max:-1},mean:{min:0,max:-1},sum:{min:0,max:-1},variance:{min:0,max:-1},distinct:{min:0,max:-1},first:{min:1,max:1},top:{min:2,max:2},boolean:{min:1,max:1},dictionary:{min:0,max:-1},typeof:{min:1,max:1},reverse:{min:1,max:1},replace:{min:3,max:4},sort:{min:1,max:2},feature:{min:1,max:-1},haskey:{min:2,max:2},indexof:{min:2,max:2},disjoint:{min:2,max:2},intersects:{min:2,max:2},touches:{min:2,max:2},crosses:{min:2,max:2},within:{min:2,max:2},contains:{min:2,max:2},overlaps:{min:2,max:2},equals:{min:2,max:2},relate:{min:3,max:3},intersection:{min:2,max:2},union:{min:1,max:2},difference:{min:2,max:2},symmetricdifference:{min:2,max:2},clip:{min:2,max:2},cut:{min:2,max:2},area:{min:1,max:2},areageodetic:{min:1,max:2},length:{min:1,max:2},lengthgeodetic:{min:1,max:2},distancegeodetic:{min:2,max:3},distance:{min:2,max:3},densify:{min:2,max:3},densifygeodetic:{min:2,max:3},generalize:{min:2,max:4},buffer:{min:2,max:3},buffergeodetic:{min:2,max:3},offset:{min:2,max:6},rotate:{min:2,max:3},issimple:{min:1,max:1},simplify:{min:1,max:1},convexhull:{min:1,max:1},centroid:{min:1,max:1},nearestcoordinate:{min:2,max:2},nearestvertex:{min:2,max:2},isselfintersecting:{min:1,max:1},multiparttosinglepart:{min:1,max:1},setgeometry:{min:2,max:2},portal:{min:1,max:1},getuser:{min:0,max:2},subtypes:{min:1,max:1},subtypecode:{min:1,max:1},subtypename:{min:1,max:1},domain:{min:2,max:3},convertdirection:{min:3,max:3},sqltimestamp:{min:1,max:3},schema:{min:1,max:1}},i={functionDefinitions:new Map,constantDefinitions:new Map},a={functionDefinitions:new Map,constantDefinitions:new Map};for(const e of["pi","infinity"])a.constantDefinitions.set(e,{type:"constant"}),i.constantDefinitions.set(e,{type:"constant"});a.constantDefinitions.set("textformatting",{type:"namespace",key:"textformatting",members:[{key:"backwardslash",type:"constant"},{key:"doublequote",type:"constant"},{key:"forwardslash",type:"constant"},{key:"tab",type:"constant"},{key:"singlequote",type:"constant"},{key:"newline",type:"constant"}]}),i.constantDefinitions.set("textformatting",{type:"namespace",key:"textformatting",members:[{key:"backwardslash",type:"constant"},{key:"tab",type:"constant"},{key:"singlequote",type:"constant"},{key:"doublequote",type:"constant"},{key:"forwardslash",type:"constant"},{key:"newline",type:"constant"}]});for(const e in r){const t=r[e];a.functionDefinitions.set(e,{overloads:[{type:"function",parametersInfo:{min:t.min,max:t.max}}]}),i.functionDefinitions.set(e,{overloads:[{type:"function",parametersInfo:{min:t.min,max:t.max}}]})}const s=new Set(["featureset","featuresetbyid","featuresetbyname","featuresetbyassociation","featuresetbyrelationshipname","featuresetbyurl","getfeatureset","getuser","attachments","featuresetbyportalitem"]),o=new Set(["disjoint","intersects","touches","crosses","within","contains","overlaps","equals","relate","intersection","nearestvertex","nearestcoordinate","union","difference","symmetricdifference","clip","cut","area","areageodetic","length","length3d","lengthgeodetic","distance","distancegeodetic","densify","densifygeodetic","generalize","buffer","buffergeodetic","offset","rotate","issimple","convexhull","simplify","multiparttosinglepart"]);function u(e){return"string"==typeof e||e instanceof String}function l(e,t){const n="sync"===t?i:a;n.functionDefinitions.has(e.name.toLowerCase())?n.functionDefinitions.get(e.name.toLowerCase())?.overloads.push({type:"function",parametersInfo:{min:e.min,max:e.max}}):n.functionDefinitions.set(e.name.toLowerCase(),{overloads:[{type:"function",parametersInfo:{min:e.min,max:e.max}}]})}function c(e,t){if(e)for(const n of e)d(n,t)}function d(e,t){if(e&&!1!==t(e))switch(e.type){case"ImportDeclaration":c(e.specifiers,t),d(e.source,t);break;case"ExportNamedDeclaration":d(e.declaration,t);break;case"ArrayExpression":c(e.elements,t);break;case"AssignmentExpression":case"BinaryExpression":case"LogicalExpression":d(e.left,t),d(e.right,t);break;case"BlockStatement":case"Program":c(e.body,t);break;case"BreakStatement":case"ContinueStatement":case"EmptyStatement":case"Identifier":case"Literal":break;case"CallExpression":d(e.callee,t),c(e.arguments,t);break;case"ExpressionStatement":d(e.expression,t);break;case"ForInStatement":d(e.left,t),d(e.right,t),d(e.body,t);break;case"ForStatement":d(e.init,t),d(e.test,t),d(e.update,t),d(e.body,t);break;case"WhileStatement":d(e.test,t),d(e.body,t);break;case"FunctionDeclaration":d(e.id,t),c(e.params,t),d(e.body,t);break;case"IfStatement":d(e.test,t),d(e.consequent,t),d(e.alternate,t);break;case"MemberExpression":d(e.object,t),d(e.property,t);break;case"ObjectExpression":c(e.properties,t);break;case"Property":d(e.key,t),d(e.value,t);break;case"ReturnStatement":case"UnaryExpression":case"UpdateExpression":d(e.argument,t);break;case"VariableDeclaration":c(e.declarations,t);break;case"VariableDeclarator":d(e.id,t),d(e.init,t);break;case"TemplateLiteral":c(e.expressions,t),c(e.quasis,t)}}function h(e,t){let n=!1;const r=t.toLowerCase();return d(e,(e=>!n&&("Identifier"===e.type&&e.name&&e.name.toLowerCase()===r&&(n=!0),!0))),n}function f(e){const t=[];return d(e,(e=>("ImportDeclaration"===e.type&&e.source&&e.source.value&&t.push({libname:e.specifiers[0].local.name.toLowerCase(),source:e.source.value}),!0))),t}function m(e,t){let n=!1;const r=t.toLowerCase();return d(e,(e=>!(n||"CallExpression"===e.type&&"Identifier"===e.callee.type&&e.callee.name&&e.callee.name.toLowerCase()===r&&(n=!0,1)))),n}function p(e){const t=[];return d(e,(e=>"MemberExpression"!==e.type||"Identifier"!==e.object.type||(!1===e.computed&&e.object&&e.object.name&&e.property&&"Identifier"===e.property.type&&e.property.name?t.push(e.object.name.toLowerCase()+"."+e.property.name.toLowerCase()):e.object&&e.object.name&&e.property&&"Literal"===e.property.type&&"string"==typeof e.property.value&&t.push(e.object.name.toLowerCase()+"."+e.property.value?.toString().toLowerCase()),!1))),t}function g(e){const t=[];return d(e,(e=>{if("CallExpression"===e.type){if("Identifier"===e.callee.type&&"expects"===e.callee.name.toLowerCase()){let n="";for(let r=0;r<(e.arguments||[]).length;r++)0===r?"Identifier"===e.arguments[r].type&&(n=e.arguments[r].name.toLowerCase()):n&&"Literal"===e.arguments[r].type&&u(e.arguments[r].value)&&t.push(n+"."+e.arguments[r].value.toLowerCase());return!1}if("Identifier"===e.callee.type&&["domainname","domaincode","domain","haskey"].includes(e.callee.name.toLowerCase())&&e.arguments.length>=2){let n="";return"Identifier"===e.arguments[0].type&&(n=e.arguments[0].name.toLowerCase()),n&&"Literal"===e.arguments[1].type&&u(e.arguments[1].value)&&t.push(n+"."+e.arguments[1].value.toLowerCase()),!1}}return"MemberExpression"!==e.type||"Identifier"!==e.object.type||(!1===e.computed&&e.object&&e.object.name&&e.property&&"Identifier"===e.property.type&&e.property.name?t.push(e.object.name.toLowerCase()+"."+e.property.name.toLowerCase()):e.object&&e.object.name&&e.property&&"Literal"===e.property.type&&"string"==typeof e.property.value&&t.push(e.object.name.toLowerCase()+"."+e.property.value?.toString().toLowerCase()),!1)})),t}function D(e){const t=[];return d(e,(e=>("CallExpression"===e.type&&"Identifier"===e.callee.type&&t.push(e.callee.name.toLowerCase()),!0))),t}function y(e,t=[]){let n=null;if(void 0===e.usesFeatureSet){null===n&&(n=D(e)),e.usesFeatureSet=!1;for(let t=0;t<n.length;t++)s.has(n[t])&&(e.usesFeatureSet=!0,e.isAsync=!0);if(!1===e.usesFeatureSet&&t&&t.length>0)for(const n of t)if(h(e,n)){e.usesFeatureSet=!0,e.isAsync=!0;break}}if(void 0===e.usesModules&&(e.usesModules=!1,f(e).length>0&&(e.usesModules=!0)),void 0===e.usesGeometry){e.usesGeometry=!1,null===n&&(n=D(e));for(let t=0;t<n.length;t++)o.has(n[t])&&(e.usesGeometry=!0)}}},84211:(e,t,n)=>{n.d(t,{A:()=>u});var r=n(6899),i=n(27535),a=n(12384),s=n(61363),o=n(95330);const u=Object.freeze(Object.defineProperty({__proto__:null,registerFunctions:function(e){function t(e,t,n){if(e instanceof a.Z)return e.toArray();if((0,s.o)(e))return e;throw new i.aV(t,i.rH.InvalidParameter,n)}function n(e,t){const r=e.length,i=Math.floor(r/2);return 0===r?[]:1===r?[e[0]]:function(e,t,n){const r=[];for(;e.length>0||t.length>0;)if(e.length>0&&t.length>0){let i=n(e[0],t[0]);isNaN(i)&&(i=0),i<=0?(r.push(e[0]),e=e.slice(1)):(r.push(t[0]),t=t.slice(1))}else e.length>0?(r.push(e[0]),e=e.slice(1)):t.length>0&&(r.push(t[0]),t=t.slice(1));return r}(n(e.slice(0,i),t),n(e.slice(i,r),t),t)}async function u(e,t){const n=e.length,r=Math.floor(n/2);if(0===n)return[];if(1===n)return[e[0]];const i=[await u(e.slice(0,r),t),await u(e.slice(r,n),t)];return l(i[0],i[1],t,[])}async function l(e,t,n,r){const i=r;if(!(e.length>0||t.length>0))return r;if(e.length>0&&t.length>0){let a=await n(e[0],t[0]);return isNaN(a)&&(a=1),a<=0?(i.push(e[0]),e=e.slice(1)):(i.push(t[0]),t=t.slice(1)),l(e,t,n,r)}return e.length>0?(i.push(e[0]),l(e=e.slice(1),t,n,r)):t.length>0?(i.push(t[0]),l(e,t=t.slice(1),n,r)):void 0}function c(e,t,r,a){(0,s.E)(r,1,2,e,t);let o=r[0];if((0,s.q)(o)&&(o=o.toArray()),!1===(0,s.o)(o))throw new i.aV(e,i.rH.InvalidParameter,t);if(r.length>1){if(!1===(0,s.i)(r[1]))throw new i.aV(e,i.rH.InvalidParameter,t);let l=o;const c=r[1].createFunction(e);return a?u(l,c):(l=n(l,((e,t)=>c(e,t))),l)}let l=o;if(0===l.length)return[];const c={};for(let e=0;e<l.length;e++){const t=(0,s.N)(l[e]);""!==t&&(c[t]=!0)}if(!0===c.Array||!0===c.Dictionary||!0===c.Feature||!0===c.Point||!0===c.Polygon||!0===c.Polyline||!0===c.Multipoint||!0===c.Extent||!0===c.Function)return l.slice(0);let d=0,h="";for(const e in c)d++,h=e;return l=d>1||"String"===h?n(l,((e,t)=>{if(null==e||e===s.x)return null==t||t===s.x?0:1;if(null==t||t===s.x)return-1;const n=(0,s.j)(e),r=(0,s.j)(t);return n<r?-1:n===r?0:1})):"Number"===h?n(l,((e,t)=>e-t)):"Boolean"===h?n(l,((e,t)=>e===t?0:t?-1:1)):"Date"===h?n(l,((e,t)=>t-e)):l.slice(0),l}e.functions.array=function(t,n){return e.standardFunction(t,n,((e,a,o)=>{if((0,s.E)(o,0,2,t,n),0===o.length)return new Array;if(1===o.length&&null===o[0])return new Array;if((0,s.o)(o[0])){if(2===o.length&&!1===(0,s.a)(o[1]))throw new i.aV(t,i.rH.InvalidParameter,n);return!0===(0,s.H)(o[1],!1)?(0,r.I)(o[0]):o[0].slice(0)}if((0,s.q)(o[0])){if(2===o.length&&!1===(0,s.a)(o[1]))throw new i.aV(t,i.rH.InvalidParameter,n);return!0===(0,s.H)(o[1],!1)?(0,r.I)(o[0]):o[0].toArray().slice(0)}const u=(0,s.g)(o[0]);if(isNaN(u)||!1===(0,s.M)(u))throw new i.aV(t,i.rH.InvalidParameter,n);const l=(0,s.H)(o[1],null),c=new Array(u);return c.fill(l),c}))},e.functions.front=function(t,n){return e.standardFunction(t,n,((e,r,a)=>{if((0,s.E)(a,1,1,t,n),(0,s.q)(a[0])){if(a[0].length()<=0)throw new i.aV(t,i.rH.OutOfBounds,n);return a[0].get(0)}if((0,s.o)(a[0])){if(a[0].length<=0)throw new i.aV(t,i.rH.OutOfBounds,n);return a[0][0]}throw new i.aV(t,i.rH.InvalidParameter,n)}))},e.functions.back=function(t,n){return e.standardFunction(t,n,((e,r,a)=>{if((0,s.E)(a,1,1,t,n),(0,s.q)(a[0])){if(a[0].length()<=0)throw new i.aV(t,i.rH.OutOfBounds,n);return a[0].get(a[0].length()-1)}if((0,s.o)(a[0])){if(a[0].length<=0)throw new i.aV(t,i.rH.OutOfBounds,n);return a[0][a[0].length-1]}throw new i.aV(t,i.rH.InvalidParameter,n)}))},e.functions.push=function(t,n){return e.standardFunction(t,n,((e,r,a)=>{if((0,s.E)(a,1,2,t,n),(0,s.o)(a[0]))return a[0][a[0].length]=a[1],a[0].length;throw new i.aV(t,i.rH.InvalidParameter,n)}))},e.functions.pop=function(t,n){return e.standardFunction(t,n,((e,r,a)=>{if((0,s.E)(a,1,1,t,n),(0,s.o)(a[0])){if(a[0].length<=0)throw new i.aV(t,i.rH.OutOfBounds,n);const e=a[0][a[0].length-1];return a[0].length=a[0].length-1,e}throw new i.aV(t,i.rH.InvalidParameter,n)}))},e.functions.erase=function(t,n){return e.standardFunction(t,n,((e,r,a)=>{if((0,s.E)(a,2,2,t,n),(0,s.o)(a[0])){let e=(0,s.g)(a[1]);if(isNaN(e)||!1===(0,s.M)(e))throw new i.aV(t,i.rH.InvalidParameter,n);const r=a[0];if(r.length<=0)throw new i.aV(t,i.rH.OutOfBounds,n);if(e<0&&(e=r.length+e),e<0)throw new i.aV(t,i.rH.OutOfBounds,n);if(e>=r.length)throw new i.aV(t,i.rH.OutOfBounds,n);return r.splice(e,1),s.x}throw new i.aV(t,i.rH.InvalidParameter,n)}))},e.functions.insert=function(t,n){return e.standardFunction(t,n,((e,r,a)=>{if((0,s.E)(a,3,3,t,n),(0,s.o)(a[0])){const e=(0,s.g)(a[1]);if(isNaN(e)||!1===(0,s.M)(e))throw new i.aV(t,i.rH.InvalidParameter,n);const r=a[2],o=a[0];if(e>o.length)throw new i.aV(t,i.rH.OutOfBounds,n);if(e<0&&e<-1*o.length)throw new i.aV(t,i.rH.OutOfBounds,n);return e===o.length?(o[e]=r,s.x):(o.splice(e,0,r),s.x)}throw new i.aV(t,i.rH.InvalidParameter,n)}))},e.functions.resize=function(t,n){return e.standardFunction(t,n,((e,r,a)=>{if((0,s.E)(a,2,3,t,n),(0,s.o)(a[0])){const e=(0,s.g)(a[1]);if(isNaN(e)||!1===(0,s.M)(e))throw new i.aV(t,i.rH.InvalidParameter,n);if(e<0)throw new i.aV(t,i.rH.InvalidParameter,n);const r=(0,s.H)(a[2],null),o=a[0];if(o.length>=e)return o.length=e,s.x;const u=o.length;o.length=e;for(let e=u;e<o.length;e++)o[e]=r;return s.x}throw new i.aV(t,i.rH.InvalidParameter,n)}))},e.functions.includes=function(t,n){return e.standardFunction(t,n,((e,r,a)=>{if((0,s.E)(a,2,2,t,n),(0,s.o)(a[0])){const e=a[1];return a[0].findIndex((t=>(0,s.C)(t,e)))>-1}if((0,s.q)(a[0])){const e=a[1];return a[0].toArray().findIndex((t=>(0,s.C)(t,e)))>-1}throw new i.aV(t,i.rH.InvalidParameter,n)}))},e.functions.slice=function(t,n){return e.standardFunction(t,n,((e,r,a)=>{if((0,s.E)(a,1,3,t,n),(0,s.o)(a[0])){const e=(0,s.g)((0,s.H)(a[1],0)),r=(0,s.g)((0,s.H)(a[2],a[0].length));if(isNaN(e)||!1===(0,s.M)(e))throw new i.aV(t,i.rH.InvalidParameter,n);if(isNaN(r)||!1===(0,s.M)(r))throw new i.aV(t,i.rH.InvalidParameter,n);return a[0].slice(e,r)}if((0,s.q)(a[0])){const e=a[0],r=(0,s.g)((0,s.H)(a[1],0)),o=(0,s.g)((0,s.H)(a[2],e.length()));if(isNaN(r)||!1===(0,s.M)(r))throw new i.aV(t,i.rH.InvalidParameter,n);if(isNaN(o)||!1===(0,s.M)(o))throw new i.aV(t,i.rH.InvalidParameter,n);return e.toArray().slice(r,o)}throw new i.aV(t,i.rH.InvalidParameter,n)}))},e.functions.splice=function(t,n){return e.standardFunction(t,n,((e,t,n)=>{const r=[];for(let e=0;e<n.length;e++)(0,s.o)(n[e])?r.push(...n[e]):(0,s.q)(n[e])?r.push(...n[e].toArray()):r.push(n[e]);return r}))},e.functions.top=function(t,n){return e.standardFunction(t,n,((e,r,a)=>{if((0,s.E)(a,2,2,t,n),(0,s.o)(a[0]))return(0,s.g)(a[1])>=a[0].length?a[0].slice(0):a[0].slice(0,(0,s.g)(a[1]));if((0,s.q)(a[0]))return(0,s.g)(a[1])>=a[0].length()?a[0].slice(0):a[0].slice(0,(0,s.g)(a[1]));throw new i.aV(t,i.rH.InvalidParameter,n)}))},e.functions.first=function(t,n){return e.standardFunction(t,n,((e,r,i)=>((0,s.E)(i,1,1,t,n),(0,s.o)(i[0])?0===i[0].length?null:i[0][0]:(0,s.q)(i[0])?0===i[0].length()?null:i[0].get(0):null)))},"sync"===e.mode&&(e.functions.sort=function(t,n){return e.standardFunction(t,n,((e,r,i)=>c(t,n,i,!1)))},e.functions.any=function(n,r){return e.standardFunction(n,r,((e,i,a)=>{(0,s.E)(a,2,2,n,r);const o=a[1].createFunction(n),u=t(a[0],n,r);for(const e of u){const t=o(e);if((0,s.a)(t)&&!0===t)return!0}return!1}))},e.functions.all=function(n,r){return e.standardFunction(n,r,((e,i,a)=>{(0,s.E)(a,2,2,n,r);const o=a[1].createFunction(n),u=t(a[0],n,r);for(const e of u)if(!0!==o(e))return!1;return!0}))},e.functions.none=function(n,r){return e.standardFunction(n,r,((e,i,a)=>{(0,s.E)(a,2,2,n,r);const o=a[1].createFunction(n),u=t(a[0],n,r);for(const e of u)if(!0===o(e))return!1;return!0}))},e.functions.reduce=function(n,r){return e.standardFunction(n,r,((e,i,a)=>{(0,s.E)(a,2,3,n,r);const o=a[1].createFunction(n),u=t(a[0],n,r);return 2===a.length?0===u.length?null:u.reduce(((e,t)=>{const n=o(e,t);return void 0!==n&&n!==s.x?n:null})):u.reduce(((e,t)=>{const n=o(e,t);return void 0!==n&&n!==s.x?n:null}),a[2])}))},e.functions.map=function(n,r){return e.standardFunction(n,r,((e,i,a)=>{(0,s.E)(a,2,2,n,r);const o=a[1].createFunction(n),u=t(a[0],n,r),l=[];for(const e of u){const t=o(e);void 0!==t&&t!==s.x?l.push(t):l.push(null)}return l}))},e.functions.filter=function(n,r){return e.standardFunction(n,r,((e,i,a)=>{(0,s.E)(a,2,2,n,r);const o=a[1].createFunction(n),u=t(a[0],n,r),l=[];for(const e of u)!0===o(e)&&l.push(e);return l}))}),"async"===e.mode&&(e.functions.sort=function(t,n){return e.standardFunctionAsync(t,n,((e,r,i)=>c(t,n,i,!0)))},e.functions.any=function(n,r){return e.standardFunctionAsync(n,r,(async(e,i,a)=>{(0,s.E)(a,2,2,n,r);const u=a[1].createFunction(n),l=t(a[0],n,r);for(const e of l){const t=await u(e);let n=null;if(n=(0,o.y8)(n)?await t:t,(0,s.a)(n)&&!0===n)return!0}return!1}))},e.functions.all=function(n,r){return e.standardFunctionAsync(n,r,(async(e,i,a)=>{(0,s.E)(a,2,2,n,r);const u=a[1].createFunction(n),l=t(a[0],n,r);for(const e of l){const t=await u(e);let n=null;if(n=(0,o.y8)(n)?await t:t,!0!==n)return!1}return!0}))},e.functions.none=function(n,r){return e.standardFunctionAsync(n,r,(async(e,i,a)=>{(0,s.E)(a,2,2,n,r);const u=a[1].createFunction(n),l=t(a[0],n,r);for(const e of l){const t=await u(e);let n=null;if(n=(0,o.y8)(n)?await t:t,!0===n)return!1}return!0}))},e.functions.filter=function(n,r){return e.standardFunctionAsync(n,r,(async(e,i,a)=>{(0,s.E)(a,2,2,n,r);const u=a[1].createFunction(n),l=t(a[0],n,r),c=[];for(const e of l){const t=await u(e);let n=null;n=(0,o.y8)(n)?await t:t,!0===n&&c.push(e)}return c}))},e.functions.reduce=function(n,r){return e.standardFunctionAsync(n,r,((e,i,a)=>{(0,s.E)(a,2,3,n,r);const o=a[1].createFunction(n),u=t(a[0],n,r);let l=null;if(a.length>2){const e=(0,s.H)(a[2],null);l=u.reduce((async(e,t)=>{let n=await e;return void 0!==n&&n!==s.x||(n=null),o(n,t)}),Promise.resolve(e))}else{if(0===u.length)return null;l=u.reduce((async(e,t,n)=>{if(n<=1)return o(e,t);let r=await e;return void 0!==r&&r!==s.x||(r=null),o(r,t)}))}return l.then((e=>void 0!==e&&e!==s.x?e:null))}))},e.functions.map=function(n,r){return e.standardFunctionAsync(n,r,(async(e,i,a)=>{(0,s.E)(a,2,2,n,r);const u=a[1].createFunction(n),l=t(a[0],n,r),c=[];for(const e of l){const t=await u(e);let n=null;n=(0,o.y8)(n)?await t:t,void 0!==n&&n!==s.x?c.push(n):c.push(null)}return c}))})}},Symbol.toStringTag,{value:"Module"}))},61363:(e,t,n)=>{n.d(t,{$:()=>Ze,A:()=>De,B:()=>ue,C:()=>le,D:()=>Me,E:()=>te,F:()=>Ee,G:()=>be,H:()=>V,I:()=>v,J:()=>Te,K:()=>ve,L:()=>Ge,M:()=>U,N:()=>Z,O:()=>se,P:()=>ne,Q:()=>ye,R:()=>k,S:()=>N,T:()=>re,U:()=>ze,V:()=>Oe,W:()=>Re,X:()=>Pe,Y:()=>Ue,Z:()=>je,_:()=>de,a:()=>O,a0:()=>Ve,a1:()=>_e,a2:()=>ke,a3:()=>Fe,a4:()=>we,a5:()=>xe,b:()=>P,c:()=>R,d:()=>Ne,e:()=>Le,f:()=>H,g:()=>me,h:()=>ge,i:()=>B,j:()=>ce,k:()=>$,l:()=>pe,m:()=>Y,n:()=>Q,o:()=>z,p:()=>G,q:()=>K,r:()=>j,s:()=>W,t:()=>he,u:()=>q,v:()=>J,w:()=>Je,x:()=>I,y:()=>_,z:()=>M});var r=n(68773),i=n(40330),a=n(48853),s=n(17057),o=n(27535),u=n(9609),l=n(12384),c=n(50728),d=n(25785),h=n(90658),f=n(14808),m=n(22641),p=n(53970),g=n(6570),D=n(9361),y=n(65091),w=n(94139),x=n(38913),F=n(58901),A=n(82971),C=n(86662),E=n(70171),S=n(17126);class b{constructor(e){this.value=e}}class T{constructor(e){this.value=e}}const v=T,k=b,I={type:"VOID"},_={type:"BREAK"},M={type:"CONTINUE"};function N(e,t,n){return""===t||null==t||t===n||t===n?e:e=e.split(t).join(n)}function B(e){return e instanceof u.Rm}function L(e){return e instanceof s.P}function H(e){return!!(R(e)||P(e)||$(e)||Y(e)||Q(e)||O(e)||null===e||e===I||"number"==typeof e)}function V(e,t){return void 0===e?t:e}function Z(e){return null==e?"":z(e)||K(e)?"Array":$(e)?"Date":Q(e)?"Time":Y(e)?"DateOnly":R(e)?"String":O(e)?"Boolean":P(e)?"Number":"esri.arcade.Attachment"===e?.declaredClass?"Attachment":"esri.arcade.Portal"===e?.declaredClass?"Portal":"esri.arcade.Dictionary"===e?.declaredClass?"Dictionary":e instanceof s.P?"Module":j(e)?"Feature":e instanceof w.Z?"Point":e instanceof x.Z?"Polygon":e instanceof F.Z?"Polyline":e instanceof y.Z?"Multipoint":e instanceof g.Z?"Extent":B(e)?"Function":q(e)?"FeatureSet":W(e)?"FeatureSetCollection":e===I?"":"number"==typeof e&&isNaN(e)?"Number":"Unrecognized Type"}function R(e){return"string"==typeof e||e instanceof String}function O(e){return"boolean"==typeof e}function P(e){return"number"==typeof e}function U(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}function G(e){return e instanceof D.Z}function z(e){return e instanceof Array}function j(e){return"esri.arcade.Feature"===e?.arcadeDeclaredClass}function q(e){return"esri.arcade.featureset.support.FeatureSet"===e?.declaredRootClass}function J(e){return"esri.arcade.Dictionary"===e?.declaredClass}function W(e){return"esri.arcade.featureSetCollection"===e?.declaredRootClass}function K(e){return e instanceof l.Z}function $(e){return e instanceof a.iG}function Y(e){return e instanceof m.u}function Q(e){return e instanceof p.n}function X(e){return null!=e&&"object"==typeof e}function ee(e){return e instanceof Date}function te(e,t,n,r,i){if(e.length<t||e.length>n)throw new o.aV(r,o.rH.WrongNumberOfParameters,i)}function ne(e){return e<0?-Math.round(-e):Math.round(e)}function re(){let e=Date.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replaceAll(/[xy]/g,(t=>{const n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?n:3&n|8).toString(16)}))}function ie(e,t){return isNaN(e)||null==t||""===t?e.toString():(t=N(t,"‰",""),t=N(t,"¤",""),(0,f.WU)(e,{pattern:t}))}function ae(e,t){return null==t||""===t?e.toISOString(!0):e.toFormat(se(t),{locale:(0,E.Kd)(),numberingSystem:"latn"})}function se(e,t=!1){e=e.replaceAll(/LTS|LT|LL?L?L?|l{1,4}/g,"[$&]");let n="";const r=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|Z{1,5}|.)/g;for(const i of e.match(r)||[])switch(i){case"D":n+="d";break;case"DD":n+="dd";break;case"DDD":n+="o";break;case"d":n+="c";break;case"ddd":n+="ccc";break;case"dddd":n+="cccc";break;case"M":n+="L";break;case"MM":n+="LL";break;case"MMM":n+="LLL";break;case"MMMM":n+="LLLL";break;case"YY":n+="yy";break;case"Y":case"YYYY":n+="yyyy";break;case"Q":n+="q";break;case"Z":n+="Z";break;case"ZZ":n+="ZZ";break;case"ZZZ":n+="ZZZ";break;case"ZZZZ":n+=t?"[ZZZZ]":"ZZZZ";break;case"ZZZZZ":n+=t?"[ZZZZZ]":"ZZZZZ";break;case"S":n+="'S'";break;case"SS":n+="'SS'";break;case"SSS":n+="u";break;case"A":case"a":n+="a";break;case"m":case"mm":case"h":case"hh":case"H":case"HH":case"s":case"ss":case"X":case"x":n+=i;break;default:i.length>=2&&"["===i.slice(0,1)&&"]"===i.slice(-1)?n+=`'${i.slice(1,-1)}'`:n+=`'${i}'`}return n}function oe(e,t,n){switch(n){case">":return e>t;case"<":return e<t;case">=":return e>=t;case"<=":return e<=t}return!1}function ue(e,t,n){if(null===e){if(null===t||t===I)return oe(null,null,n);if(P(t))return oe(0,t,n);if(R(t))return oe(0,me(t),n);if(O(t))return oe(0,me(t),n);if($(t))return oe(0,t.toNumber(),n);if(Q(t))return oe(e,t.toNumber(),n);if(Y(t))return oe(e,t.toNumber(),n)}if(e===I){if(null===t||t===I)return oe(null,null,n);if(P(t))return oe(0,t,n);if(R(t))return oe(0,me(t),n);if(O(t))return oe(0,me(t),n);if($(t))return oe(0,t.toNumber(),n);if(Q(t))return oe(e,t.toNumber(),n);if(Y(t))return oe(e,t.toNumber(),n)}else if(P(e)){if(P(t))return oe(e,t,n);if(O(t))return oe(e,me(t),n);if(null===t||t===I)return oe(e,0,n);if(R(t))return oe(e,me(t),n);if($(t))return oe(e,t.toNumber(),n);if(Q(t))return oe(e,t.toNumber(),n);if(Y(t))return oe(e,t.toNumber(),n)}else if(R(e)){if(R(t))return oe(ce(e),ce(t),n);if($(t))return oe(me(e),t.toNumber(),n);if(Q(t))return oe(me(e),t.toNumber(),n);if(Y(t))return oe(me(e),t.toNumber(),n);if(P(t))return oe(me(e),t,n);if(null===t||t===I)return oe(me(e),0,n);if(O(t))return oe(me(e),me(t),n)}else if($(e)){if($(t))return oe(e.toNumber(),t.toNumber(),n);if(null===t||t===I)return oe(e.toNumber(),0,n);if(P(t))return oe(e.toNumber(),t,n);if(O(t))return oe(e.toNumber(),me(t),n);if(R(t))return oe(e.toNumber(),me(t),n);if(Q(t))throw new o.aV(null,o.rH.CannotCompareDateAndTime,null);if(Y(t))return oe(e.toNumber(),t.toNumber(),n)}else if(O(e)){if(O(t))return oe(e,t,n);if(P(t))return oe(me(e),me(t),n);if($(t))return oe(me(e),t.toNumber(),n);if(Q(t))return oe(me(e),t.toNumber(),n);if(Y(t))return oe(me(e),t.toNumber(),n);if(null===t||t===I)return oe(me(e),0,n);if(R(t))return oe(me(e),me(t),n)}else if(Y(e)){if($(t))return oe(e.toNumber(),t.toNumber(),n);if(null===t||t===I)return oe(e.toNumber(),0,n);if(P(t))return oe(e.toNumber(),t,n);if(O(t))return oe(e.toNumber(),me(t),n);if(R(t))return oe(e.toNumber(),me(t),n);if(Q(t))throw new o.aV(null,o.rH.CannotCompareDateAndTime,null);if(Y(t))return oe(e.toNumber(),t.toNumber(),n)}else if(Q(e)){if($(t))throw new o.aV(null,o.rH.CannotCompareDateAndTime,null);if(null===t||t===I)return oe(e.toNumber(),0,n);if(P(t))return oe(e.toNumber(),t,n);if(O(t))return oe(e.toNumber(),me(t),n);if(R(t))return oe(e.toNumber(),me(t),n);if(Q(t))return oe(e.toNumber(),t.toNumber(),n);if(Y(t))throw new o.aV(null,o.rH.CannotCompareDateAndTime,null)}return!!le(e,t)&&("<="===n||">="===n)}function le(e,t){if(e===t)return!0;if(null===e&&t===I||null===t&&e===I)return!0;if($(e)&&$(t))return e.equals(t);if(Q(e)&&Q(t))return e.equals(t);if(Y(e)&&Y(t))return e.equals(t);if(e instanceof c.Z)return e.equalityTest(t);if(e instanceof d.Z)return e.equalityTest(t);if(e instanceof w.Z&&t instanceof w.Z){const n=e.cache._arcadeCacheId,r=t.cache._arcadeCacheId;if(null!=n)return n===r}if(X(e)&&X(t)){if(e._arcadeCacheId===t._arcadeCacheId&&void 0!==e._arcadeCacheId&&null!==e._arcadeCacheId)return!0;if(e._underlyingGraphic===t._underlyingGraphic&&void 0!==e._underlyingGraphic&&null!==e._underlyingGraphic)return!0}return!1}function ce(e,t){if(R(e))return e;if(null===e)return"";if(P(e))return ie(e,t);if(O(e))return e.toString();if($(e))return ae(e,t);if(Q(e))return e.toFormat(t);if(Y(e))return e.toFormat(t);if(e instanceof D.Z)return JSON.stringify(e.toJSON());if(z(e)){const t=[];for(let n=0;n<e.length;n++)t[n]=fe(e[n]);return"["+t.join(",")+"]"}if(e instanceof l.Z){const t=[];for(let n=0;n<e.length();n++)t[n]=fe(e.get(n));return"["+t.join(",")+"]"}return null!==e&&"object"==typeof e&&void 0!==e.castToText?e.castToText():B(e)?"object, Function":e===I?"":L(e)?"object, Module":""}function de(e){const t=[];if(!z(e))return null;if(e instanceof l.Z){for(let n=0;n<e.length();n++)t[n]=me(e.get(n));return t}for(let n=0;n<e.length;n++)t[n]=me(e[n]);return t}function he(e,t,n=!1){if(R(e))return e;if(null===e)return"";if(P(e))return ie(e,t);if(O(e))return e.toString();if($(e))return ae(e,t);if(Q(e))return e.toFormat(t);if(Y(e))return e.toFormat(t);if(e instanceof D.Z)return e instanceof g.Z?'{"xmin":'+e.xmin.toString()+',"ymin":'+e.ymin.toString()+","+(e.hasZ?'"zmin":'+e.zmin.toString()+",":"")+(e.hasM?'"mmin":'+e.mmin.toString()+",":"")+'"xmax":'+e.xmax.toString()+',"ymax":'+e.ymax.toString()+","+(e.hasZ?'"zmax":'+e.zmax.toString()+",":"")+(e.hasM?'"mmax":'+e.mmax.toString()+",":"")+'"spatialReference":'+Ce(e.spatialReference)+"}":Ce(e.toJSON(),((e,t)=>e.key===t.key?0:"spatialReference"===e.key?1:"spatialReference"===t.key||e.key<t.key?-1:e.key>t.key?1:0));if(z(e)){const t=[];for(let r=0;r<e.length;r++)t[r]=fe(e[r],n);return"["+t.join(",")+"]"}if(e instanceof l.Z){const t=[];for(let r=0;r<e.length();r++)t[r]=fe(e.get(r),n);return"["+t.join(",")+"]"}return null!==e&&"object"==typeof e&&void 0!==e.castToText?e.castToText(n):B(e)?"object, Function":e===I?"":L(e)?"object, Module":""}function fe(e,t=!1){if(null===e)return"null";if(O(e)||P(e)||R(e))return JSON.stringify(e);if(e instanceof D.Z)return he(e,null,t);if(e instanceof l.Z)return he(e,null,t);if(e instanceof Array)return he(e,null,t);if($(e))return t?JSON.stringify(e.getTime()):JSON.stringify(ae(e,""));if(Q(e))return JSON.stringify(e.toString());if(Y(e))return JSON.stringify(e.toString());if(null!==e&&"object"==typeof e){if(void 0!==e.castToText)return e.castToText(t)}else if(e===I)return"null";return"null"}function me(e,t){return P(e)?e:null===e||""===e?0:$(e)||Y(e)||Q(e)?NaN:O(e)?e?1:0:z(e)||""===e||void 0===e?NaN:void 0!==t&&R(e)?(t=N(t,"‰",""),t=N(t,"¤",""),(0,f.Qc)(e,{pattern:t})):e===I?0:Number(e)}function pe(e,t){if($(e))return e;if(R(e)){const n=function(e,t){const n=/ (\d\d)/,r=(0,a.Qn)(t);let i=S.ou.fromISO(e,{zone:r});return i.isValid||n.test(e)&&(e=e.replace(n,"T$1"),i=S.ou.fromISO(e,{zone:t}),i.isValid)?i:null}(e,t);if(n)return a.iG.dateTimeToArcadeDate(n)}return null}function ge(e){return O(e)?e:R(e)?"true"===(e=e.toLowerCase()):!!P(e)&&0!==e&&!isNaN(e)}function De(e,t){return null==e?null:(null!==e.spatialReference&&void 0!==e.spatialReference||(e.spatialReference=t),e)}function ye(e){if(null===e)return null;if(e instanceof w.Z)return"NaN"===e.x||null===e.x||isNaN(e.x)?null:e;if(e instanceof x.Z){if(0===e.rings.length)return null;for(const t of e.rings)if(t.length>0)return e;return null}if(e instanceof F.Z){if(0===e.paths.length)return null;for(const t of e.paths)if(t.length>0)return e;return null}return e instanceof y.Z?0===e.points.length?null:e:e instanceof g.Z?"NaN"===e.xmin||null===e.xmin||isNaN(e.xmin)?null:e:null}function we(e,t){if(!e)return t;if(!e.domain)return t;let n=null,r=null;if("string"===e.field.type||"esriFieldTypeString"===e.field.type)n=ce(t);else{if(null==t)return null;if(""===t)return t;n=me(t)}for(let t=0;t<e.domain.codedValues.length;t++){const i=e.domain.codedValues[t];i.code===n&&(r=i)}return null===r?ce(t):r.name}function xe(e,t){if(!e)return t;if(!e.domain)return t;let n=null;const r=ce(t);for(let t=0;t<e.domain.codedValues.length;t++){const i=e.domain.codedValues[t];i.name===r&&(n=i)}return null===n?t:n.code}function Fe(e,t,n=null,r=null){if(!t)return null;if(!t.fields)return null;let i,a,s=null;for(let n=0;n<t.fields.length;n++){const r=t.fields[n];r.name.toLowerCase()===e.toString().toLowerCase()&&(s=r)}if(null===s)throw new o.aV(null,o.rH.FieldNotFound,null,{key:e});if(null===r&&n&&t.typeIdField)r=n.hasField(t.typeIdField)?n.field(t.typeIdField):null;else if(t.typeIdField&&null!==r){let e=!1;for(const n of t.types||[])if(r===n.id){e=!0;break}if(!e)for(const n of t.types||[])if(r===n.name){r=n.id,e=!0;break}e||(r=null,n&&t.typeIdField&&(r=n.hasField(t.typeIdField)?n.field(t.typeIdField):null))}return null!=r&&t.types.some((e=>e.id===r&&(i=e.domains&&e.domains[s.name],i&&"inherited"===i.type&&(i=Ae(s.name,t),a=!0),!0))),a||i||(i=Ae(e,t)),{field:s,domain:i}}function Ae(e,t){let n;return t.fields.some((t=>(t.name.toLowerCase()===e.toLowerCase()&&(n=t.domain),!!n))),n}function Ce(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});const n="boolean"==typeof t.cycles&&t.cycles,r=t.cmp&&(i=t.cmp,function(e){return function(t,n){const r={key:t,value:e[t]},a={key:n,value:e[n]};return i(r,a)}});var i;const a=[];return function e(t){if(t&&t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0===t)return;if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);let i,s;if(Array.isArray(t)){for(s="[",i=0;i<t.length;i++)i&&(s+=","),s+=e(t[i])||"null";return s+"]"}if(null===t)return"null";if(a.includes(t)){if(n)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}const o=a.push(t)-1,u=Object.keys(t).sort(r&&r(t));for(s="",i=0;i<u.length;i++){const n=u[i],r=e(t[n]);r&&(s&&(s+=","),s+=JSON.stringify(n)+":"+r)}return a.splice(o,1),"{"+s+"}"}(e)}function Ee(e){if(null===e)return null;const t=[];for(const n of e)n&&n.arcadeDeclaredClass&&"esri.arcade.Feature"===n.arcadeDeclaredClass?t.push(n.geometry()):t.push(n);return t}function Se(e,t){if(!(t instanceof w.Z))throw new o.aV(null,o.rH.InvalidParameter,null);e.push(t.hasZ?t.hasM?[t.x,t.y,t.z,t.m]:[t.x,t.y,t.z]:[t.x,t.y])}function be(e,t){if(z(e)||K(e)){let n=!1,r=!1,i=[],a=t;if(z(e)){for(const t of e)Se(i,t);i.length>0&&(a=e[0].spatialReference,n=e[0].hasZ,r=e[0].hasM)}else if(e instanceof d.Z)i=e._elements,i.length>0&&(n=e._hasZ,r=e._hasM,a=e.get(0).spatialReference);else{if(!K(e))throw new o.aV(null,o.rH.InvalidParameter,null);for(const t of e.toArray())Se(i,t);i.length>0&&(a=e.get(0).spatialReference,n=!0===e.get(0).hasZ,r=!0===e.get(0).hasM)}return 0===i.length?null:((0,C.bu)(i)||(i=i.slice(0).reverse()),new x.Z({rings:[i],spatialReference:a,hasZ:n,hasM:r}))}return e}function Te(e,t){if(z(e)||K(e)){let n=!1,r=!1,i=[],a=t;if(z(e)){for(const t of e)Se(i,t);i.length>0&&(a=e[0].spatialReference,n=!0===e[0].hasZ,r=!0===e[0].hasM)}else if(e instanceof d.Z)i=e._elements,i.length>0&&(n=e._hasZ,r=e._hasM,a=e.get(0).spatialReference);else if(K(e)){for(const t of e.toArray())Se(i,t);i.length>0&&(a=e.get(0).spatialReference,n=!0===e.get(0).hasZ,r=!0===e.get(0).hasM)}return 0===i.length?null:new F.Z({paths:[i],spatialReference:a,hasZ:n,hasM:r})}return e}function ve(e,t){if(z(e)||K(e)){let n=!1,r=!1,i=[],a=t;if(z(e)){for(const t of e)Se(i,t);i.length>0&&(a=e[0].spatialReference,n=!0===e[0].hasZ,r=!0===e[0].hasM)}else if(e instanceof d.Z)i=e._elements,i.length>0&&(n=e._hasZ,r=e._hasM,a=e.get(0).spatialReference);else if(K(e)){for(const t of e.toArray())Se(i,t);i.length>0&&(a=e.get(0).spatialReference,n=!0===e.get(0).hasZ,r=!0===e.get(0).hasM)}return 0===i.length?null:new y.Z({points:i,spatialReference:a,hasZ:n,hasM:r})}return e}function ke(e,t=!1){const n=[];if(null===e)return n;if(!0===z(e)){for(let r=0;r<e.length;r++){const i=ce(e[r]);""===i&&!0!==t||n.push(i)}return n}if(e instanceof l.Z){for(let r=0;r<e.length();r++){const i=ce(e.get(r));""===i&&!0!==t||n.push(i)}return n}if(H(e)){const r=ce(e);return""===r&&!0!==t||n.push(r),n}return[]}let Ie=0;function _e(e){return Ie++,Ie%100==0?(Ie=0,new Promise((t=>{setTimeout((()=>{t(e)}),0)}))):e}function Me(e,t,n){switch(n){case"&":return e&t;case"|":return e|t;case"^":return e^t;case"<<":return e<<t;case">>":return e>>t;case">>>":return e>>>t}}function Ne(e,t=null){return null==e?null:O(e)||P(e)||R(e)?e:e instanceof D.Z?!0===t?.keepGeometryType?e:e.toJSON():e instanceof l.Z?e.toArray().map((e=>Ne(e,t))):e instanceof Array?e.map((e=>Ne(e,t))):ee(e)?e:$(e)?e.toJSDate():Q(e)?e.toString():Y(e)?e.toJSDate():null!==e&&"object"==typeof e&&void 0!==e.castAsJson?e.castAsJson(t):null}async function Be(e,t,n,r,i){const a=await Le(e,t,n);i[r]=a}async function Le(e,t=null,n=null){if(e instanceof l.Z&&(e=e.toArray()),null==e)return null;if(H(e)||e instanceof D.Z||ee(e)||$(e))return Ne(e,n);if(e instanceof Array){const r=[],i=[];for(const a of e)null===a||H(a)||a instanceof D.Z||ee(a)||$(a)?i.push(Ne(a,n)):(i.push(null),r.push(Be(a,t,n,i.length-1,i)));return r.length>0&&await Promise.all(r),i}return null!==e&&"object"==typeof e&&void 0!==e.castAsJsonAsync?e.castAsJsonAsync(t,n):null}function He(e){return Ve(e)?e.parent:e}function Ve(e){return e&&"declaredClass"in e&&"esri.layers.support.SubtypeSublayer"===e.declaredClass}function Ze(e){return e&&"declaredClass"in e&&"esri.layers.SubtypeGroupLayer"===e.declaredClass}function Re(e,t,n){const r=He(e.fullSchema());return null===r?null:r.fields?Fe(t,r,e,n):null}function Oe(e){const t=He(e.fullSchema());return null===t?null:t.fields&&t.typeIdField?{subtypeField:t.typeIdField,subtypes:t.types?t.types.map((e=>({name:e.name,code:e.id}))):[]}:null}function Pe(e,t,n,r){const i=He(e.fullSchema());if(null===i)return null;if(!i.fields)return null;const a=Fe(t,i,e,r);if(void 0===n)try{n=e.field(t)}catch(e){return null}return we(a,n)}function Ue(e,t,n,r){const i=He(e.fullSchema());if(null===i)return null;if(!i.fields)return null;if(void 0===n){try{n=e.field(t)}catch(e){return null}return n}return xe(Fe(t,i,e,r),n)}function Ge(e){return e?.timeReference?.timeZone??"system"}function ze(e){const t=He(e.fullSchema());if(null===t)return null;if(!t.fields)return null;const n=[];for(const e of t.fields)n.push((0,h.Sh)(e));return{objectIdField:t.objectIdField,globalIdField:t.globalIdField??"",geometryType:void 0===h.q2[t.geometryType]?"":h.q2[t.geometryType],fields:n}}function je(e,t){return"system"===e&&(e=a.iG.systemTimeZoneCanonicalName),{version:qe,engineVersion:i.i8,timeZone:e,spatialReference:t instanceof A.Z?t.toJSON():t,application:r.default.applicationName??"",engine:"web",locale:(0,E.Kd)()}}const qe="1.23",Je=Object.freeze(Object.defineProperty({__proto__:null,ImplicitResult:v,ImplicitResultE:T,ReturnResult:k,ReturnResultE:b,absRound:ne,arcadeVersion:qe,autoCastArrayOfPointsToMultiPoint:ve,autoCastArrayOfPointsToPolygon:be,autoCastArrayOfPointsToPolyline:Te,autoCastFeatureToGeometry:Ee,binaryOperator:Me,breakResult:_,castAsJson:Ne,castAsJsonAsync:Le,continueResult:M,defaultExecutingContext:je,defaultTimeZone:Ge,defaultUndefined:V,equalityTest:le,featureDomainCodeLookup:Ue,featureDomainValueLookup:Pe,featureFullDomain:Re,featureSchema:ze,featureSubtypes:Oe,fixNullGeometry:ye,fixSpatialReference:De,formatDate:ae,formatNumber:ie,generateUUID:re,getDomain:Fe,getDomainCode:xe,getDomainValue:we,getType:Z,greaterThanLessThan:ue,isArray:z,isBoolean:O,isDate:$,isDateOnly:Y,isDictionary:J,isFeature:j,isFeatureSet:q,isFeatureSetCollection:W,isFunctionParameter:B,isGeometry:G,isImmutableArray:K,isInteger:U,isJsDate:ee,isModule:L,isNumber:P,isObject:X,isSimpleType:H,isString:R,isSubtypeGrouplayer:Ze,isSubtypeSublayer:Ve,isTime:Q,multiReplace:N,pcCheck:te,stableStringify:Ce,standardiseDateFormat:se,tick:_e,toBoolean:ge,toDate:pe,toNumber:me,toNumberArray:de,toString:ce,toStringArray:ke,toStringExplicit:he,voidOperation:I},Symbol.toStringTag,{value:"Module"}))},2368:(e,t,n)=>{n.d(t,{J:()=>c,j:()=>d});var r=n(43697),i=n(92036),a=(n(80442),n(22974)),s=(n(92604),n(70586)),o=n(31263),u=n(1153),l=n(52011);const c=e=>{let t=class extends e{clone(){const e=(0,u.vw)(this);(0,s.O3)(e,"unable to clone instance of non-accessor class");const t=e.metadatas,n=e.store,r={},i=new Map;for(const e in t){const s=t[e],u=n?.originOf(e),l=s.clonable;if(s.readOnly||!1===l||u!==o.s3.USER&&u!==o.s3.DEFAULTS&&u!==o.s3.WEB_MAP&&u!==o.s3.WEB_SCENE)continue;const c=this[e];let d=null;d="function"==typeof l?l(c):"reference"===l?c:(0,a.Vo)(c),null!=c&&null==d||(u===o.s3.DEFAULTS?i.set(e,d):r[e]=d)}const l=new(0,Object.getPrototypeOf(this).constructor)(r);if(i.size){const e=(0,u.vw)(l)?.store;if(e)for(const[t,n]of i)e.set(t,n,o.s3.DEFAULTS)}return l}};return t=(0,r._)([(0,l.j)("esri.core.Clonable")],t),t};let d=class extends(c(i.Z)){};d=(0,r._)([(0,l.j)("esri.core.Clonable")],d)},36030:(e,t,n)=>{n.d(t,{J:()=>a});var r=n(35454),i=n(5600);function a(e,t={}){const n=e instanceof r.X?e:new r.X(e,t),a={type:t?.ignoreUnknown??1?n.apiValues:String,json:{type:n.jsonValues,read:!t?.readOnly&&{reader:n.read},write:{writer:n.write}}};return void 0!==t?.readOnly&&(a.readOnly=!!t.readOnly),void 0!==t?.default&&(a.json.default=t.default),void 0!==t?.name&&(a.json.name=t.name),void 0!==t?.nonNullable&&(a.nonNullable=t.nonNullable),(0,i.Cb)(a)}},14808:(e,t,n)=>{n.d(t,{Qc:()=>c,WU:()=>o,lt:()=>l});var r=n(19153),i=n(70171);const a={ar:[".",","],bg:[","," "],bs:[",","."],ca:[",","."],cs:[","," "],da:[",","."],de:[",","."],"de-ch":[".","’"],el:[",","."],en:[".",","],"en-au":[".",","],es:[",","."],"es-mx":[".",","],et:[","," "],fi:[","," "],fr:[","," "],"fr-ch":[","," "],he:[".",","],hi:[".",",","#,##,##0.###"],hr:[",","."],hu:[","," "],id:[",","."],it:[",","."],"it-ch":[".","’"],ja:[".",","],ko:[".",","],lt:[","," "],lv:[","," "],mk:[",","."],nb:[","," "],nl:[",","."],pl:[","," "],pt:[",","."],"pt-pt":[","," "],ro:[",","."],ru:[","," "],sk:[","," "],sl:[",","."],sr:[",","."],sv:[","," "],th:[".",","],tr:[",","."],uk:[","," "],vi:[",","."],zh:[".",","]};function s(e=(0,i.Kd)()){let t=(e=e.toLowerCase())in a;if(!t){const n=e.split("-");n.length>1&&n[0]in a&&(e=n[0],t=!0),t||(e="en")}const[n,r,s="#,##0.###"]=a[e];return{decimal:n,group:r,pattern:s}}function o(e,t){const n=s((t={...t}).locale);t.customs=n;const r=t.pattern||n.pattern;return isNaN(e)||Math.abs(e)===1/0?null:function(e,t,n){const r=(n=n||{}).customs.group,i=n.customs.decimal,a=t.split(";"),s=a[0];if((t=a[e<0?1:0]||"-"+s).includes("%"))e*=100;else if(t.includes("‰"))e*=1e3;else{if(t.includes("¤"))throw new Error("currency notation not supported");if(t.includes("E"))throw new Error("exponential notation not supported")}const o=u,l=s.match(o);if(!l)throw new Error("unable to find a number expression in pattern: "+t);return!1===n.fractional&&(n.places=0),t.replace(o,function(e,t,n){!0===(n=n||{}).places&&(n.places=0),n.places===1/0&&(n.places=6);const r=t.split("."),i="string"==typeof n.places&&n.places.indexOf(",");let a=n.places;i?a=n.places.substring(i+1):+a>=0||(a=(r[1]||[]).length),n.round<0||(e=Number(e.toFixed(Number(a))));const s=String(Math.abs(e)).split("."),o=s[1]||"";if(r[1]||n.places){i&&(n.places=n.places.substring(0,i));const e=void 0!==n.places?n.places:r[1]&&r[1].lastIndexOf("0")+1;+e>o.length&&(s[1]=o.padEnd(Number(e),"0")),+a<o.length&&(s[1]=o.substr(0,Number(a)))}else s[1]&&s.pop();const u=r[0].replace(",","");let l=u.indexOf("0");-1!==l&&(l=u.length-l,l>s[0].length&&(s[0]=s[0].padStart(l,"0")),u.includes("#")||(s[0]=s[0].substr(s[0].length-l)));let c,d,h=r[0].lastIndexOf(",");if(-1!==h){c=r[0].length-h-1;const e=r[0].substr(0,h);h=e.lastIndexOf(","),-1!==h&&(d=e.length-h-1)}const f=[];for(let e=s[0];e;){const t=e.length-c;f.push(t>0?e.substr(t):e),e=t>0?e.slice(0,t):"",d&&(c=d,d=void 0)}return s[0]=f.reverse().join(n.group||","),s.join(n.decimal||".")}(e,l[0],{decimal:i,group:r,places:n.places,round:n.round}))}(e,r,t)}const u=/[#0,]*[#0](?:\.0*#*)?/;function l(e){const t=s((e=e||{}).locale),n=e.pattern||t.pattern,i=t.group,a=t.decimal;let o=1;if(n.includes("%"))o/=100;else if(n.includes("‰"))o/=1e3;else if(n.includes("¤"))throw new Error("currency notation not supported");const l=n.split(";");1===l.length&&l.push("-"+l[0]);const c=h(l,(t=>(t="(?:"+(0,r.Qs)(t,".")+")").replace(u,(t=>{const n={signed:!1,separator:e.strict?i:[i,""],fractional:e.fractional,decimal:a,exponent:!1},r=t.split(".");let s=e.places;1===r.length&&1!==o&&(r[1]="###"),1===r.length||0===s?n.fractional=!1:(void 0===s&&(s=e.pattern?r[1].lastIndexOf("0")+1:1/0),s&&null==e.fractional&&(n.fractional=!0),!e.places&&+s<r[1].length&&(s+=","+r[1].length),n.places=s);const u=r[0].split(",");return u.length>1&&(n.groupSize=u.pop().length,u.length>1&&(n.groupSize2=u.pop().length)),"("+function(e){"places"in(e=e||{})||(e.places=1/0),"string"!=typeof e.decimal&&(e.decimal="."),"fractional"in e&&!String(e.places).startsWith("0")||(e.fractional=[!0,!1]),"exponent"in e||(e.exponent=[!0,!1]),"eSigned"in e||(e.eSigned=[!0,!1]);const t=d(e),n=h(e.fractional,(t=>{let n="";return t&&0!==e.places&&(n="\\"+e.decimal,e.places===1/0?n="(?:"+n+"\\d+)?":n+="\\d{"+e.places+"}"),n}),!0);let r=t+n;return n&&(r="(?:(?:"+r+")|(?:"+n+"))"),r+h(e.exponent,(t=>t?"([eE]"+d({signed:e.eSigned})+")":""))}(n)+")"}))),!0);return{regexp:c.replaceAll(/[\xa0 ]/g,"[\\s\\xa0]"),group:i,decimal:a,factor:o}}function c(e,t){const n=l(t),r=new RegExp("^"+n.regexp+"$").exec(e);if(!r)return NaN;let i=r[1];if(!r[1]){if(!r[2])return NaN;i=r[2],n.factor*=-1}return i=i.replaceAll(new RegExp("["+n.group+"\\s\\xa0]","g"),"").replace(n.decimal,"."),Number(i)*n.factor}function d(e){return"signed"in(e=e||{})||(e.signed=[!0,!1]),"separator"in e?"groupSize"in e||(e.groupSize=3):e.separator="",h(e.signed,(e=>e?"[-+]":""),!0)+h(e.separator,(t=>{if(!t)return"(?:\\d+)";" "===(t=(0,r.Qs)(t))?t="\\s":" "===t&&(t="\\s\\xa0");const n=e.groupSize,i=e.groupSize2;if(i){const e="(?:0|[1-9]\\d{0,"+(i-1)+"}(?:["+t+"]\\d{"+i+"})*["+t+"]\\d{"+n+"})";return n-i>0?"(?:"+e+"|(?:0|[1-9]\\d{0,"+(n-1)+"}))":e}return"(?:0|[1-9]\\d{0,"+(n-1)+"}(?:["+t+"]\\d{"+n+"})*)"}),!0)}const h=(e,t,n)=>{if(!(e instanceof Array))return t(e);const r=[];for(let n=0;n<e.length;n++)r.push(t(e[n]));return f(r.join("|"),Boolean(n))},f=(e,t)=>"("+(t?"?:":"")+e+")"},22641:(e,t,n)=>{n.d(t,{u:()=>o});var r=n(48853),i=n(70171),a=n(17126);function s(e){e=e.replaceAll(/LTS|LT|LL?L?L?|l{1,4}/g,"[$&]");let t="";const n=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;for(const r of e.match(n)||[])switch(r){case"D":t+="d";break;case"DD":t+="dd";break;case"DDD":t+="o";break;case"d":t+="c";break;case"ddd":t+="ccc";break;case"dddd":t+="cccc";break;case"M":t+="L";break;case"MM":t+="LL";break;case"MMM":t+="LLL";break;case"MMMM":t+="LLLL";break;case"YY":t+="yy";break;case"Y":case"YYYY":t+="yyyy";break;case"Q":t+="q";break;case"X":case"x":t+=r;break;default:r.length>=2&&"["===r.slice(0,1)&&"]"===r.slice(-1)?t+=`'${r.slice(1,-1)}'`:t+=`'${r}'`}return t}class o{constructor(e,t,n){this._year=e,this._month=t,this._day=n,this.declaredRootClass="esri.core.sql.dateonly"}get month(){return this._month}get monthJS(){return this._month-1}get year(){return this._year}get day(){return this._day}get isValid(){return this.toDateTime("unknown").isValid}equals(e){return e instanceof o&&e.day===this.day&&e.month===this.month&&e.year===this.year}clone(){return new o(this._year,this._month,this._day)}toDateTime(e){return a.ou.fromObject({day:this.day,month:this.month,year:this.year},{zone:(0,r.Qn)(e)})}toDateTimeLuxon(e){return a.ou.fromObject({day:this.day,month:this.month,year:this.year},{zone:(0,r.Qn)(e)})}toString(){return`${this.year.toString().padStart(4,"0")}-${this.month.toString().padStart(2,"0")}-${this.day.toString().padStart(2,"0")}`}toFormat(e=null){if(null===e||""===e)return this.toString();if(!(e=s(e)))return"";const t=this.toDateTime("unknown");return r.iG.dateTimeToArcadeDate(t).toFormat(e,{locale:(0,i.Kd)(),numberingSystem:"latn"})}toArcadeDate(){const e=this.toDateTime("unknown");return r.iG.dateTimeToArcadeDate(e)}toNumber(){return this.toDateTime("unknown").toMillis()}toJSDate(){return this.toDateTime("unknown").toJSDate()}toStorageFormat(){return this.toFormat("yyyy-LL-dd")}toSQLValue(){return this.toFormat("yyyy-LL-dd")}toSQLWithKeyword(){return"date '"+this.toFormat("yyyy-LL-dd")+"'"}plus(e,t){return o.fromDateTime(this.toUTCDateTime().plus({[e]:t}))}toUTCDateTime(){return a.ou.utc(this.year,this.month,this.day,0,0,0,0)}difference(e,t){switch(t.toLowerCase()){case"days":case"day":case"d":return this.toUTCDateTime().diff(e.toUTCDateTime(),"days").days;case"months":case"month":return this.toUTCDateTime().diff(e.toUTCDateTime(),"months").months;case"minutes":case"minute":case"m":return"M"===t?this.toUTCDateTime().diff(e.toUTCDateTime(),"months").months:this.toUTCDateTime().diff(e.toUTCDateTime(),"minutes").minutes;case"seconds":case"second":case"s":return this.toUTCDateTime().diff(e.toUTCDateTime(),"seconds").seconds;case"milliseconds":case"millisecond":case"ms":default:return this.toUTCDateTime().diff(e.toUTCDateTime(),"milliseconds").milliseconds;case"hours":case"hour":case"h":return this.toUTCDateTime().diff(e.toUTCDateTime(),"hours").hours;case"years":case"year":case"y":return this.toUTCDateTime().diff(e.toUTCDateTime(),"years").years}}static fromMilliseconds(e){const t=a.ou.fromMillis(e,{zone:a.Qf.utcInstance});return t.isValid?o.fromParts(t.year,t.month,t.day):null}static fromSeconds(e){const t=a.ou.fromSeconds(e,{zone:a.Qf.utcInstance});return t.isValid?o.fromParts(t.year,t.month,t.day):null}static fromReader(e){if(!e)return null;const t=e.split("-");return 3!==t.length?null:new o(parseInt(t[0],10),parseInt(t[1],10),parseInt(t[2],10))}static fromParts(e,t,n){const r=new o(e,t,n);return!1===r.isValid?null:r}static fromDateJS(e){return o.fromParts(e.getFullYear(),e.getMonth()+1,e.getDay())}static fromDateTime(e){return o.fromParts(e.year,e.month,e.day)}static fromSqlTimeStampOffset(e){return this.fromDateTime(e.toDateTime())}static fromString(e,t=null){if(""===e)return null;if(null===e)return null;const n=[];if(t)(t=s(t))&&n.push(t);else if(null===t||""===t){const t=a.ou.fromISO(e,{setZone:!0});return t.isValid?o.fromParts(t.year,t.month,t.day):null}for(const r of n){const n=a.ou.fromFormat(e,t??r);if(n.isValid)return new o(n.year,n.month,n.day)}return null}static fromNow(e="system"){const t=a.ou.fromJSDate(new Date).setZone((0,r.Qn)(e));return new o(t.year,t.month,t.day)}}},53970:(e,t,n)=>{n.d(t,{n:()=>o});var r=n(77286),i=n(70171),a=n(17126);function s(e){if(!e)return"";const t=/(a|A|hh?|HH?|mm?|ss?|SSS|S|.)/g;let n="";for(const r of e.match(t)||[])switch(r){case"SSS":case"m":case"mm":case"h":case"hh":case"H":case"HH":case"s":case"ss":n+=r;break;case"A":case"a":n+="a";break;default:n+=`'${r}'`}return n}class o{constructor(e,t,n,r){this._hour=e,this._minute=t,this._second=n,this._millisecond=r,this.declaredRootClass="esri.core.sql.timeonly"}get hour(){return this._hour}get minute(){return this._minute}get second(){return this._second}get millisecond(){return this._millisecond}equals(e){return e instanceof o&&e.hour===this.hour&&e.minute===this.minute&&e.second===this.second&&e.millisecond===this.millisecond}clone(){return new o(this.hour,this.minute,this.second,this.millisecond)}isValid(){return(0,r.U)(this.hour)&&(0,r.U)(this.minute)&&(0,r.U)(this.second)&&(0,r.U)(this.millisecond)&&this.hour>=0&&this.hour<24&&this.minute>=0&&this.minute<60&&this.second>=0&&this.second<60&&this.millisecond>=0&&this.millisecond<1e3}toString(){return`${this.hour.toString().padStart(2,"0")}:${this.minute.toString().padStart(2,"0")}:${this.second.toString().padStart(2,"0")}`+(this.millisecond>0?"."+this.millisecond.toString().padStart(3,"0"):"")}toSQLValue(){return this.toString()}toSQLWithKeyword(){return`time '${this.hour.toString().padStart(2,"0")}:${this.minute.toString().padStart(2,"0")}:${this.second.toString().padStart(2,"0")}${this.millisecond>0?"."+this.millisecond.toString().padStart(3,"0"):""}'`}toStorageString(){return`${this.hour.toString().padStart(2,"0")}:${this.minute.toString().padStart(2,"0")}:${this.second.toString().padStart(2,"0")}`}toFormat(e=null){return null===e||""===e?this.toString():(e=s(e))?a.ou.local(1970,1,1,this._hour,this._minute,this._second,this._millisecond).toFormat(e,{locale:(0,i.Kd)(),numberingSystem:"latn"}):""}toNumber(){return this.millisecond+1e3*this.second+1e3*this.minute*60+60*this.hour*60*1e3}static fromParts(e,t,n,r){const i=new o(e,t,n,r);return i.isValid()?i:null}static fromReader(e){if(!e)return null;const t=e.split(":");return 3!==t.length?null:new o(parseInt(t[0],10),parseInt(t[1],10),parseInt(t[2],10),0)}static fromMilliseconds(e){if(e>864e5||e<0)return null;const t=Math.floor(e/1e3%60),n=Math.floor(e/6e4%60),r=Math.floor(e/36e5%24),i=Math.floor(e%1e3);return new o(r,n,t,i)}static fromDateJS(e){return new o(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}static fromDateTime(e){return new o(e.hour,e.minute,e.second,e.millisecond)}static fromSqlTimeStampOffset(e){return this.fromDateTime(e.toDateTime())}static fromString(e,t=null){if(""===e)return null;if(null===e)return null;const n=[];t?(t=s(t))&&n.push(t):null!==t&&""!==t||(n.push("HH:mm:ss"),n.push("HH:mm:ss.SSS"),n.push("hh:mm:ss a"),n.push("hh:mm:ss.SSS a"),n.push("HH:mm"),n.push("hh:mm a"),n.push("H:mm"),n.push("h:mm a"),n.push("H:mm:ss"),n.push("h:mm:ss a"),n.push("H:mm:ss.SSS"),n.push("h:mm:ss.SSS a"));for(const t of n){const n=a.ou.fromFormat(e,t);if(n.isValid)return new o(n.hour,n.minute,n.second,n.millisecond)}return null}plus(e,t){switch(e){case"days":case"years":case"months":return this.clone();case"hours":case"minutes":case"seconds":case"milliseconds":return o.fromDateTime(this.toUTCDateTime().plus({[e]:t}))}return null}toUTCDateTime(){return a.ou.utc(1970,1,1,this.hour,this.minute,this.second,this.millisecond)}difference(e,t){switch(t.toLowerCase()){case"days":case"day":case"d":return this.toUTCDateTime().diff(e.toUTCDateTime(),"days").days;case"months":case"month":return this.toUTCDateTime().diff(e.toUTCDateTime(),"months").months;case"minutes":case"minute":case"m":return"M"===t?this.toUTCDateTime().diff(e.toUTCDateTime(),"months").months:this.toUTCDateTime().diff(e.toUTCDateTime(),"minutes").minutes;case"seconds":case"second":case"s":return this.toUTCDateTime().diff(e.toUTCDateTime(),"seconds").seconds;case"milliseconds":case"millisecond":case"ms":default:return this.toUTCDateTime().diff(e.toUTCDateTime(),"milliseconds").milliseconds;case"hours":case"hour":case"h":return this.toUTCDateTime().diff(e.toUTCDateTime(),"hours").hours;case"years":case"year":case"y":return this.toUTCDateTime().diff(e.toUTCDateTime(),"years").years}}}},70171:(e,t,n)=>{n.d(t,{G3:()=>u,Kd:()=>o,Ze:()=>h,qe:()=>c});var r=n(50758);let i;const a=globalThis.esriConfig?.locale??globalThis.dojoConfig?.locale;function s(){return a??globalThis.navigator?.language??"en"}function o(){return void 0===i&&(i=s()),i}function u(e=o()){const t=/^([a-zA-Z]{2,3})(?:[_\-]\w+)*$/.exec(e);return t?.[1].toLowerCase()}const l=[];function c(e){return l.push(e),(0,r.kB)((()=>l.splice(l.indexOf(e),1)))}const d=[];function h(e){return d.push(e),(0,r.kB)((()=>l.splice(d.indexOf(e),1)))}globalThis.addEventListener?.("languagechange",(function(){const e=s();i!==e&&(i=e,[...d].forEach((t=>{t.call(null,e)})),[...l].forEach((t=>{t.call(null,e)})))}))},70272:(e,t,n)=>{n.d(t,{S6:()=>i,nd:()=>a,u_:()=>r});class r{constructor(e=null,t={},n,r){this.geometry=e,this.attributes=t,this.centroid=n,this.objectId=r,this.displayId=0,this.geohashX=0,this.geohashY=0}weakClone(){const e=new r(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e.geohashX=this.geohashX,e.geohashY=this.geohashY,e}}function i(e){return!(null==e.geometry||!e.geometry.coords||!e.geometry.coords.length)}class a extends r{}},5428:(e,t,n)=>{n.d(t,{Z:()=>r});class r{constructor(e=[],t=[],n=!1){this.lengths=e??[],this.coords=t??[],this.hasIndeterminateRingOrder=n}static fromRect(e){const[t,n,i,a]=e,s=i-t,o=a-n;return new r([5],[t,n,s,0,0,o,-s,0,0,-o])}get isPoint(){return 0===this.lengths.length}get maxLength(){return Math.max(...this.lengths)}get size(){return this.lengths.reduce(((e,t)=>e+t))}forEachVertex(e){let t=0;this.lengths.length||e(this.coords[0],this.coords[1]);for(let n=0;n<this.lengths.length;n++){const r=this.lengths[n];for(let n=0;n<r;n++)e(this.coords[2*(n+t)],this.coords[2*(n+t)+1]);t+=r}}clone(e){return e?(e.set(this.coords),new r(this.lengths.slice(),e,this.hasIndeterminateRingOrder)):new r(this.lengths.slice(),this.coords.slice(),this.hasIndeterminateRingOrder)}}},1231:(e,t,n)=>{n.d(t,{Z:()=>g});var r,i=n(43697),a=n(35454),s=n(96674),o=n(5600),u=n(75215),l=(n(67676),n(80442),n(36030)),c=n(71715),d=n(52011),h=n(72729),f=n(86719);const m=new a.X({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let p=r=class extends s.wq{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=-1,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let n=null;try{n=t?JSON.parse(t):null}catch(e){}return n?.value??null}readValueType(e,{description:t}){let n=null;try{n=t?JSON.parse(t):null}catch(e){}return n?m.fromJSON(n.fieldValueType):null}clone(){return new r({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,i._)([(0,o.Cb)({type:String,json:{write:!0}})],p.prototype,"alias",void 0),(0,i._)([(0,o.Cb)({type:[String,Number],json:{write:{allowNull:!0}}})],p.prototype,"defaultValue",void 0),(0,i._)([(0,o.Cb)()],p.prototype,"description",void 0),(0,i._)([(0,c.r)("description")],p.prototype,"readDescription",null),(0,i._)([(0,o.Cb)({types:h.V5,json:{read:{reader:h.im},write:!0}})],p.prototype,"domain",void 0),(0,i._)([(0,o.Cb)({type:Boolean,json:{write:!0}})],p.prototype,"editable",void 0),(0,i._)([(0,o.Cb)({type:u.z8,json:{write:!0}})],p.prototype,"length",void 0),(0,i._)([(0,o.Cb)({type:String,json:{write:!0}})],p.prototype,"name",void 0),(0,i._)([(0,o.Cb)({type:Boolean,json:{write:!0}})],p.prototype,"nullable",void 0),(0,i._)([(0,l.J)(f.v)],p.prototype,"type",void 0),(0,i._)([(0,o.Cb)()],p.prototype,"valueType",void 0),(0,i._)([(0,c.r)("valueType",["description"])],p.prototype,"readValueType",null),(0,i._)([(0,o.Cb)({type:Boolean,json:{read:!1}})],p.prototype,"visible",void 0),p=r=(0,i._)([(0,d.j)("esri.layers.support.Field")],p);const g=p},99514:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(35671);function i(e){return"oid"===e.type||"esriFieldTypeOID"===e.type}function a(e){return"global-id"===e.type||"esriFieldTypeGlobalID"===e.type}class s{constructor(e=[]){if(this.fields=[],this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this.dateFields=[],this.numericFields=[],this._requiredFields=null,!e)return;this.fields=e;const t=[];for(const s of e){const e=s?.name,l=u(s?.name);if(e&&l){const u=o(e);this._fieldsMap.set(e,s),this._fieldsMap.set(u,s),this._normalizedFieldsMap.set(l,s),t.push(u),"date"===(n=s).type||"esriFieldTypeDate"===n.type||"date-only"===n.type||"esriFieldTypeDateOnly"===n.type||"timestamp-offset"===n.type||"esriFieldTypeTimestampOffset"===n.type?(this.dateFields.push(s),this._dateFieldsSet.add(s)):(0,r.H7)(s)&&(this._numericFieldsSet.add(s),this.numericFields.push(s)),i(s)||a(s)||(s.editable=null==s.editable||!!s.editable,s.nullable=null==s.nullable||!!s.nullable)}}var n;t.sort(),this.uid=t.join(",")}destroy(){this._fieldsMap.clear()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)i(e)||a(e)||e.nullable||void 0!==(0,r.os)(e)||this._requiredFields.push(e)}return this._requiredFields}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(o(e))??this._normalizedFieldsMap.get(u(e)),t&&this._fieldsMap.set(e,t),t)}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){const t=this.get(e);return"time-only"===t?.type||"esriFieldTypeTimeOnly"===t?.type}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}}function o(e){return e.trim().toLowerCase()}function u(e){return(0,r.q6)(e)?.toLowerCase()??""}},72729:(e,t,n)=>{n.d(t,{im:()=>E,V5:()=>C}),n(80442);var r,i=n(43697),a=n(22974),s=n(5600),o=(n(75215),n(36030)),u=n(52011),l=n(96674);n(67676);let c=r=class extends l.wq{constructor(e){super(e),this.name=null,this.code=null}clone(){return new r({name:this.name,code:this.code})}};(0,i._)([(0,s.Cb)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,i._)([(0,s.Cb)({type:[String,Number],json:{write:!0}})],c.prototype,"code",void 0),c=r=(0,i._)([(0,u.j)("esri.layers.support.CodedValue")],c);const d=new(n(35454).X)({inherited:"inherited",codedValue:"coded-value",range:"range"});let h=class extends l.wq{constructor(e){super(e),this.name=null,this.type=null}};(0,i._)([(0,s.Cb)({type:String,json:{write:!0}})],h.prototype,"name",void 0),(0,i._)([(0,o.J)(d)],h.prototype,"type",void 0),h=(0,i._)([(0,u.j)("esri.layers.support.Domain")],h);const f=h;var m;let p=m=class extends f{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const n=String(e);this.codedValues.some((e=>(String(e.code)===n&&(t=e.name),!!t)))}return t}clone(){return new m({codedValues:(0,a.d9)(this.codedValues),name:this.name})}};(0,i._)([(0,s.Cb)({type:[c],json:{write:!0}})],p.prototype,"codedValues",void 0),(0,i._)([(0,o.J)({codedValue:"coded-value"})],p.prototype,"type",void 0),p=m=(0,i._)([(0,u.j)("esri.layers.support.CodedValueDomain")],p);const g=p;var D;n(92604),n(20102);let y=D=class extends f{constructor(e){super(e),this.type="inherited"}clone(){return new D}};(0,i._)([(0,o.J)({inherited:"inherited"})],y.prototype,"type",void 0),y=D=(0,i._)([(0,u.j)("esri.layers.support.InheritedDomain")],y);const w=y;var x;let F=x=class extends f{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new x({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,i._)([(0,s.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range&&t.range[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,n){t[n]=[this.minValue||0,e]}}}})],F.prototype,"maxValue",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range&&t.range[0]},write:{target:"range",writer(e,t,n){t[n]=[e,this.maxValue||0]}}}})],F.prototype,"minValue",void 0),(0,i._)([(0,o.J)({range:"range"})],F.prototype,"type",void 0),F=x=(0,i._)([(0,u.j)("esri.layers.support.RangeDomain")],F);const A=F,C={key:"type",base:f,typeMap:{range:F,"coded-value":g,inherited:w}};function E(e){if(!e||!e.type)return null;switch(e.type){case"range":return A.fromJSON(e);case"codedValue":return g.fromJSON(e);case"inherited":return w.fromJSON(e)}return null}},86719:(e,t,n)=>{n.d(t,{v:()=>r});const r=new(n(35454).X)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},20304:(e,t,n)=>{n.r(t),n.d(t,{Dictionary:()=>a.Z,arcade:()=>Rt,arcadeFeature:()=>o.Z,convertFeatureLayerToFeatureSet:()=>on,convertJsonToArcade:()=>ln,convertMapToFeatureSetCollection:()=>un,convertServiceUrlToWorkspace:()=>sn,createExecContext:()=>Kt,createFeature:()=>$t,createFunction:()=>Wt,createSyntaxTree:()=>Jt,dependsOnView:()=>nn,enableFeatureSetOperations:()=>hn,enableGeometryOperations:()=>dn,evalSyntaxTree:()=>Qt,executeAsyncFunction:()=>en,executeFunction:()=>Xt,extractFieldNames:()=>tn,getArcadeType:()=>qt,getViewInfo:()=>an,hasGeometryFunctions:()=>pn,hasGeometryOperations:()=>Dn,hasVariable:()=>rn,loadScriptDependencies:()=>cn,updateExecContext:()=>Yt}),n(66577);var r=n(17057),i=n(92089),a=n(33586),s=n(27535),o=n(15274),u=n(9609),l=n(61363),c=n(90077),d=n(84211),h=n(13976),f=n(12834),m=n(40330),p=n(77286),g=n(71201),D=n(67900),y=n(6570),w=n(9361),x=n(65091),F=n(94139),A=n(38913),C=n(58901),E=n(33955);let S=null;function b(e){return 0===m.i8.indexOf("4.")?A.Z.fromExtent(e):new A.Z({spatialReference:e.spatialReference,rings:[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]})}function T(e,t){if("polygon"!==e.type&&"polyline"!==e.type&&"extent"!==e.type)return 0;let n=1;(e.spatialReference.vcsWkid||e.spatialReference.latestVcsWkid)&&(n=(0,g._R)(e.spatialReference)/(0,D.c9)(e.spatialReference));let r=0;if("polyline"===e.type)for(const t of e.paths)for(let e=1;e<t.length;e++)r+=(0,g.AW)(t[e],t[e-1],n);else if("polygon"===e.type)for(const t of e.rings){for(let e=1;e<t.length;e++)r+=(0,g.AW)(t[e],t[e-1],n);(t[0][0]!==t[t.length-1][0]||t[0][1]!==t[t.length-1][1]||void 0!==t[0][2]&&t[0][2]!==t[t.length-1][2])&&(r+=(0,g.AW)(t[0],t[t.length-1],n))}else"extent"===e.type&&(r+=2*(0,g.AW)([e.xmin,e.ymin,0],[e.xmax,e.ymin,0],n),r+=2*(0,g.AW)([e.xmin,e.ymin,0],[e.xmin,e.ymax,0],n),r*=2,r+=4*Math.abs((0,l.H)(e.zmax,0)*n-(0,l.H)(e.zmin,0)*n));const i=new C.Z({hasZ:!1,hasM:!1,spatialReference:e.spatialReference,paths:[[0,0],[0,r]]});return S.planarLength(i,t)}function v(e,t){function n(e,t,n){if((0,l.E)(n,2,2,e,t),n[0]instanceof w.Z&&n[1]instanceof w.Z);else if(n[0]instanceof w.Z&&null===n[1]);else if(n[1]instanceof w.Z&&null===n[0]);else if(null!==n[0]||null!==n[1])throw new s.aV(e,s.rH.InvalidParameter,t)}e.disjoint=function(e,r){return t(e,r,((t,i,a)=>(a=(0,l.F)(a),n(e,r,a),null===a[0]||null===a[1]||S.disjoint(a[0],a[1]))))},e.intersects=function(e,r){return t(e,r,((t,i,a)=>(a=(0,l.F)(a),n(e,r,a),null!==a[0]&&null!==a[1]&&S.intersects(a[0],a[1]))))},e.touches=function(e,r){return t(e,r,((t,i,a)=>(a=(0,l.F)(a),n(e,r,a),null!==a[0]&&null!==a[1]&&S.touches(a[0],a[1]))))},e.crosses=function(e,r){return t(e,r,((t,i,a)=>(a=(0,l.F)(a),n(e,r,a),null!==a[0]&&null!==a[1]&&S.crosses(a[0],a[1]))))},e.within=function(e,r){return t(e,r,((t,i,a)=>(a=(0,l.F)(a),n(e,r,a),null!==a[0]&&null!==a[1]&&S.within(a[0],a[1]))))},e.contains=function(e,r){return t(e,r,((t,i,a)=>(a=(0,l.F)(a),n(e,r,a),null!==a[0]&&null!==a[1]&&S.contains(a[0],a[1]))))},e.overlaps=function(e,r){return t(e,r,((t,i,a)=>(a=(0,l.F)(a),n(e,r,a),null!==a[0]&&null!==a[1]&&S.overlaps(a[0],a[1]))))},e.equals=function(e,n){return t(e,n,((t,r,i)=>((0,l.E)(i,2,2,e,n),i[0]===i[1]||(i[0]instanceof w.Z&&i[1]instanceof w.Z?S.equals(i[0],i[1]):((0,l.k)(i[0])&&(0,l.k)(i[1])||(0,l.n)(i[0])&&(0,l.n)(i[1])||!(!(0,l.m)(i[0])||!(0,l.m)(i[1])))&&i[0].equals(i[1])))))},e.relate=function(e,n){return t(e,n,((t,r,i)=>{if(i=(0,l.F)(i),(0,l.E)(i,3,3,e,n),i[0]instanceof w.Z&&i[1]instanceof w.Z)return S.relate(i[0],i[1],(0,l.j)(i[2]));if(i[0]instanceof w.Z&&null===i[1])return!1;if(i[1]instanceof w.Z&&null===i[0])return!1;if(null===i[0]&&null===i[1])return!1;throw new s.aV(e,s.rH.InvalidParameter,n)}))},e.intersection=function(e,r){return t(e,r,((t,i,a)=>(a=(0,l.F)(a),n(e,r,a),null===a[0]||null===a[1]?null:S.intersect(a[0],a[1]))))},e.union=function(e,n){return t(e,n,((t,r,i)=>{const a=[];if(0===(i=(0,l.F)(i)).length)throw new s.aV(e,s.rH.WrongNumberOfParameters,n);if(1===i.length)if((0,l.o)(i[0])){const t=(0,l.F)(i[0]);for(let r=0;r<t.length;r++)if(null!==t[r]){if(!(t[r]instanceof w.Z))throw new s.aV(e,s.rH.InvalidParameter,n);a.push(t[r])}}else{if(!(0,l.q)(i[0])){if(i[0]instanceof w.Z)return(0,l.A)((0,p.r1)(i[0]),e.spatialReference);if(null===i[0])return null;throw new s.aV(e,s.rH.InvalidParameter,n)}{const t=(0,l.F)(i[0].toArray());for(let r=0;r<t.length;r++)if(null!==t[r]){if(!(t[r]instanceof w.Z))throw new s.aV(e,s.rH.InvalidParameter,n);a.push(t[r])}}}else for(let t=0;t<i.length;t++)if(null!==i[t]){if(!(i[t]instanceof w.Z))throw new s.aV(e,s.rH.InvalidParameter,n);a.push(i[t])}return 0===a.length?null:S.union(a)}))},e.difference=function(e,r){return t(e,r,((t,i,a)=>(a=(0,l.F)(a),n(e,r,a),null!==a[0]&&null===a[1]?(0,p.r1)(a[0]):null===a[0]?null:S.difference(a[0],a[1]))))},e.symmetricdifference=function(e,r){return t(e,r,((t,i,a)=>(a=(0,l.F)(a),n(e,r,a),null===a[0]&&null===a[1]?null:null===a[0]?(0,p.r1)(a[1]):null===a[1]?(0,p.r1)(a[0]):S.symmetricDifference(a[0],a[1]))))},e.clip=function(e,n){return t(e,n,((t,r,i)=>{if(i=(0,l.F)(i),(0,l.E)(i,2,2,e,n),!(i[1]instanceof y.Z)&&null!==i[1])throw new s.aV(e,s.rH.InvalidParameter,n);if(null===i[0])return null;if(!(i[0]instanceof w.Z))throw new s.aV(e,s.rH.InvalidParameter,n);return null===i[1]?null:S.clip(i[0],i[1])}))},e.cut=function(e,n){return t(e,n,((t,r,i)=>{if(i=(0,l.F)(i),(0,l.E)(i,2,2,e,n),!(i[1]instanceof C.Z)&&null!==i[1])throw new s.aV(e,s.rH.InvalidParameter,n);if(null===i[0])return[];if(!(i[0]instanceof w.Z))throw new s.aV(e,s.rH.InvalidParameter,n);return null===i[1]?[(0,p.r1)(i[0])]:S.cut(i[0],i[1])}))},e.area=function(e,n){return t(e,n,((t,r,i)=>{if((0,l.E)(i,1,2,e,n),null===(i=(0,l.F)(i))[0])return 0;if((0,l.o)(i[0])||(0,l.q)(i[0])){const t=(0,l.G)(i[0],e.spatialReference);return null===t?0:S.planarArea(t,(0,p.EI)((0,l.H)(i[1],-1)))}if(!(i[0]instanceof w.Z))throw new s.aV(e,s.rH.InvalidParameter,n);return S.planarArea(i[0],(0,p.EI)((0,l.H)(i[1],-1)))}))},e.areageodetic=function(e,n){return t(e,n,((t,r,i)=>{if((0,l.E)(i,1,2,e,n),null===(i=(0,l.F)(i))[0])return 0;if((0,l.o)(i[0])||(0,l.q)(i[0])){const t=(0,l.G)(i[0],e.spatialReference);return null===t?0:S.geodesicArea(t,(0,p.EI)((0,l.H)(i[1],-1)))}if(!(i[0]instanceof w.Z))throw new s.aV(e,s.rH.InvalidParameter,n);return S.geodesicArea(i[0],(0,p.EI)((0,l.H)(i[1],-1)))}))},e.length=function(e,n){return t(e,n,((t,r,i)=>{if((0,l.E)(i,1,2,e,n),null===(i=(0,l.F)(i))[0])return 0;if((0,l.o)(i[0])||(0,l.q)(i[0])){const t=(0,l.J)(i[0],e.spatialReference);return null===t?0:S.planarLength(t,(0,p.Lz)((0,l.H)(i[1],-1)))}if(!(i[0]instanceof w.Z))throw new s.aV(e,s.rH.InvalidParameter,n);return S.planarLength(i[0],(0,p.Lz)((0,l.H)(i[1],-1)))}))},e.length3d=function(e,n){return t(e,n,((t,r,i)=>{if((0,l.E)(i,1,2,e,n),null===(i=(0,l.F)(i))[0])return 0;if((0,l.o)(i[0])||(0,l.q)(i[0])){const t=(0,l.J)(i[0],e.spatialReference);return null===t?0:!0===t.hasZ?T(t,(0,p.Lz)((0,l.H)(i[1],-1))):S.planarLength(t,(0,p.Lz)((0,l.H)(i[1],-1)))}if(!(i[0]instanceof w.Z))throw new s.aV(e,s.rH.InvalidParameter,n);return!0===i[0].hasZ?T(i[0],(0,p.Lz)((0,l.H)(i[1],-1))):S.planarLength(i[0],(0,p.Lz)((0,l.H)(i[1],-1)))}))},e.lengthgeodetic=function(e,n){return t(e,n,((t,r,i)=>{if((0,l.E)(i,1,2,e,n),null===(i=(0,l.F)(i))[0])return 0;if((0,l.o)(i[0])||(0,l.q)(i[0])){const t=(0,l.J)(i[0],e.spatialReference);return null===t?0:S.geodesicLength(t,(0,p.Lz)((0,l.H)(i[1],-1)))}if(!(i[0]instanceof w.Z))throw new s.aV(e,s.rH.InvalidParameter,n);return S.geodesicLength(i[0],(0,p.Lz)((0,l.H)(i[1],-1)))}))},e.distance=function(e,n){return t(e,n,((t,r,i)=>{i=(0,l.F)(i),(0,l.E)(i,2,3,e,n);let a=i[0];((0,l.o)(i[0])||(0,l.q)(i[0]))&&(a=(0,l.K)(i[0],e.spatialReference));let o=i[1];if(((0,l.o)(i[1])||(0,l.q)(i[1]))&&(o=(0,l.K)(i[1],e.spatialReference)),!(a instanceof w.Z))throw new s.aV(e,s.rH.InvalidParameter,n);if(!(o instanceof w.Z))throw new s.aV(e,s.rH.InvalidParameter,n);return S.distance(a,o,(0,p.Lz)((0,l.H)(i[2],-1)))}))},e.distancegeodetic=function(e,n){return t(e,n,((t,r,i)=>{i=(0,l.F)(i),(0,l.E)(i,2,3,e,n);const a=i[0],o=i[1];if(!(a instanceof F.Z))throw new s.aV(e,s.rH.InvalidParameter,n);if(!(o instanceof F.Z))throw new s.aV(e,s.rH.InvalidParameter,n);const u=new C.Z({paths:[],spatialReference:a.spatialReference});return u.addPath([a,o]),S.geodesicLength(u,(0,p.Lz)((0,l.H)(i[2],-1)))}))},e.densify=function(e,n){return t(e,n,((t,r,i)=>{if(i=(0,l.F)(i),(0,l.E)(i,2,3,e,n),null===i[0])return null;if(!(i[0]instanceof w.Z))throw new s.aV(e,s.rH.InvalidParameter,n);const a=(0,l.g)(i[1]);if(isNaN(a))throw new s.aV(e,s.rH.InvalidParameter,n);if(a<=0)throw new s.aV(e,s.rH.InvalidParameter,n);return i[0]instanceof A.Z||i[0]instanceof C.Z?S.densify(i[0],a,(0,p.Lz)((0,l.H)(i[2],-1))):i[0]instanceof y.Z?S.densify(b(i[0]),a,(0,p.Lz)((0,l.H)(i[2],-1))):i[0]}))},e.densifygeodetic=function(e,n){return t(e,n,((t,r,i)=>{if(i=(0,l.F)(i),(0,l.E)(i,2,3,e,n),null===i[0])return null;if(!(i[0]instanceof w.Z))throw new s.aV(e,s.rH.InvalidParameter,n);const a=(0,l.g)(i[1]);if(isNaN(a))throw new s.aV(e,s.rH.InvalidParameter,n);if(a<=0)throw new s.aV(e,s.rH.InvalidParameter,n);return i[0]instanceof A.Z||i[0]instanceof C.Z?S.geodesicDensify(i[0],a,(0,p.Lz)((0,l.H)(i[2],-1))):i[0]instanceof y.Z?S.geodesicDensify(b(i[0]),a,(0,p.Lz)((0,l.H)(i[2],-1))):i[0]}))},e.generalize=function(e,n){return t(e,n,((t,r,i)=>{if(i=(0,l.F)(i),(0,l.E)(i,2,4,e,n),null===i[0])return null;if(!(i[0]instanceof w.Z))throw new s.aV(e,s.rH.InvalidParameter,n);const a=(0,l.g)(i[1]);if(isNaN(a))throw new s.aV(e,s.rH.InvalidParameter,n);return S.generalize(i[0],a,(0,l.h)((0,l.H)(i[2],!0)),(0,p.Lz)((0,l.H)(i[3],-1)))}))},e.buffer=function(e,n){return t(e,n,((t,r,i)=>{if(i=(0,l.F)(i),(0,l.E)(i,2,3,e,n),null===i[0])return null;if(!(i[0]instanceof w.Z))throw new s.aV(e,s.rH.InvalidParameter,n);const a=(0,l.g)(i[1]);if(isNaN(a))throw new s.aV(e,s.rH.InvalidParameter,n);return 0===a?(0,p.r1)(i[0]):S.buffer(i[0],a,(0,p.Lz)((0,l.H)(i[2],-1)))}))},e.buffergeodetic=function(e,n){return t(e,n,((t,r,i)=>{if(i=(0,l.F)(i),(0,l.E)(i,2,3,e,n),null===i[0])return null;if(!(i[0]instanceof w.Z))throw new s.aV(e,s.rH.InvalidParameter,n);const a=(0,l.g)(i[1]);if(isNaN(a))throw new s.aV(e,s.rH.InvalidParameter,n);return 0===a?(0,p.r1)(i[0]):S.geodesicBuffer(i[0],a,(0,p.Lz)((0,l.H)(i[2],-1)))}))},e.offset=function(e,n){return t(e,n,((t,r,i)=>{if(i=(0,l.F)(i),(0,l.E)(i,2,6,e,n),null===i[0])return null;if(!(i[0]instanceof A.Z||i[0]instanceof C.Z))throw new s.aV(e,s.rH.InvalidParameter,n);const a=(0,l.g)(i[1]);if(isNaN(a))throw new s.aV(e,s.rH.InvalidParameter,n);const o=(0,l.g)((0,l.H)(i[4],10));if(isNaN(o))throw new s.aV(e,s.rH.InvalidParameter,n);const u=(0,l.g)((0,l.H)(i[5],0));if(isNaN(u))throw new s.aV(e,s.rH.InvalidParameter,n);return S.offset(i[0],a,(0,p.Lz)((0,l.H)(i[2],-1)),(0,l.j)((0,l.H)(i[3],"round")).toLowerCase(),o,u)}))},e.rotate=function(e,n){return t(e,n,((t,r,i)=>{i=(0,l.F)(i),(0,l.E)(i,2,3,e,n);let a=i[0];if(null===a)return null;if(!(a instanceof w.Z))throw new s.aV(e,s.rH.InvalidParameter,n);a instanceof y.Z&&(a=A.Z.fromExtent(a));const o=(0,l.g)(i[1]);if(isNaN(o))throw new s.aV(e,s.rH.InvalidParameter,n);const u=(0,l.H)(i[2],null);if(null===u)return S.rotate(a,o);if(u instanceof F.Z)return S.rotate(a,o,u);throw new s.aV(e,s.rH.InvalidParameter,n)}))},e.centroid=function(e,n){return t(e,n,((t,r,i)=>{if(i=(0,l.F)(i),(0,l.E)(i,1,1,e,n),null===i[0])return null;let a=i[0];if(((0,l.o)(i[0])||(0,l.q)(i[0]))&&(a=(0,l.K)(i[0],e.spatialReference)),null===a)return null;if(!(a instanceof w.Z))throw new s.aV(e,s.rH.InvalidParameter,n);return a instanceof F.Z?(0,l.A)((0,p.r1)(i[0]),e.spatialReference):a instanceof A.Z?a.centroid:a instanceof C.Z?(0,g.s9)(a):a instanceof x.Z?(0,g.Ay)(a):a instanceof y.Z?a.center:null}))},e.multiparttosinglepart=function(e,n){return t(e,n,((t,r,i)=>{i=(0,l.F)(i),(0,l.E)(i,1,1,e,n);const a=[];if(null===i[0])return null;if(!(i[0]instanceof w.Z))throw new s.aV(e,s.rH.InvalidParameter,n);if(i[0]instanceof F.Z)return[(0,l.A)((0,p.r1)(i[0]),e.spatialReference)];if(i[0]instanceof y.Z)return[(0,l.A)((0,p.r1)(i[0]),e.spatialReference)];const o=S.simplify(i[0]);if(o instanceof A.Z){const e=[],t=[];for(let n=0;n<o.rings.length;n++)if(o.isClockwise(o.rings[n])){const t=(0,E.im)({rings:[o.rings[n]],hasZ:!0===o.hasZ,hasM:!0===o.hasM,spatialReference:o.spatialReference.toJSON()});e.push(t)}else t.push({ring:o.rings[n],pt:o.getPoint(n,0)});for(let n=0;n<t.length;n++)for(let r=0;r<e.length;r++)if(e[r].contains(t[n].pt)){e[r].addRing(t[n].ring);break}return e}if(o instanceof C.Z){const e=[];for(let t=0;t<o.paths.length;t++){const n=(0,E.im)({paths:[o.paths[t]],hasZ:!0===o.hasZ,hasM:!0===o.hasM,spatialReference:o.spatialReference.toJSON()});e.push(n)}return e}if(i[0]instanceof x.Z){const t=(0,l.A)((0,p.r1)(i[0]),e.spatialReference);for(let e=0;e<t.points.length;e++)a.push(t.getPoint(e));return a}return null}))},e.issimple=function(e,n){return t(e,n,((t,r,i)=>{if(i=(0,l.F)(i),(0,l.E)(i,1,1,e,n),null===i[0])return!0;if(!(i[0]instanceof w.Z))throw new s.aV(e,s.rH.InvalidParameter,n);return S.isSimple(i[0])}))},e.simplify=function(e,n){return t(e,n,((t,r,i)=>{if(i=(0,l.F)(i),(0,l.E)(i,1,1,e,n),null===i[0])return null;if(!(i[0]instanceof w.Z))throw new s.aV(e,s.rH.InvalidParameter,n);return S.simplify(i[0])}))},e.convexhull=function(e,n){return t(e,n,((t,r,i)=>{if(i=(0,l.F)(i),(0,l.E)(i,1,1,e,n),null===i[0])return null;if(!(i[0]instanceof w.Z))throw new s.aV(e,s.rH.InvalidParameter,n);return S.convexHull(i[0])}))},e.nearestcoordinate=function(e,n){return t(e,n,((t,r,i)=>{if(i=(0,l.F)(i),(0,l.E)(i,2,2,e,n),!(i[0]instanceof w.Z||null===i[0]))throw new s.aV(e,s.rH.InvalidParameter,n);if(!(i[1]instanceof F.Z||null===i[1]))throw new s.aV(e,s.rH.InvalidParameter,n);if(null===i[0]||null===i[1])return null;const o=S.nearestCoordinate(i[0],i[1]);return null===o||o.isEmpty?null:a.Z.convertObjectToArcadeDictionary({coordinate:o.coordinate,distance:o.distance},(0,l.L)(e),!1,!0)}))},e.nearestvertex=function(e,n){return t(e,n,((t,r,i)=>{if(i=(0,l.F)(i),(0,l.E)(i,2,2,e,n),!(i[0]instanceof w.Z||null===i[0]))throw new s.aV(e,s.rH.InvalidParameter,n);if(!(i[1]instanceof F.Z||null===i[1]))throw new s.aV(e,s.rH.InvalidParameter,n);if(null===i[0]||null===i[1])return null;const o=S.nearestVertex(i[0],i[1]);return null===o||o.isEmpty?null:a.Z.convertObjectToArcadeDictionary({coordinate:o.coordinate,distance:o.distance},(0,l.L)(e),!1,!0)}))}}var k=n(38176),I=n(58130),_=n(27360),M=n(95330),N=n(82971);class B extends u.Rm{constructor(e,t){super(),this.paramCount=t,this.fn=e}createFunction(e){return(...t)=>{if(t.length!==this.paramCount)throw new s.aV(e,s.rH.WrongNumberOfParameters,null);return this.fn(...t)}}call(e,t){return this.fn(...t.arguments)}marshalledCall(e,t,n,r){return r(e,t,((t,i,a)=>{a=a.map((t=>!(0,l.i)(t)||t instanceof u.Vg?t:(0,u.aq)(t,e,r)));const s=this.call(n,{arguments:a});return(0,M.y8)(s)?s.then((e=>(0,u.aq)(e,n,r))):s}))}}function L(e,t,n){try{return n(e,null,t.arguments)}catch(e){throw e}}function H(e,t){try{switch(t.type){case"EmptyStatement":return"lc.voidOperation";case"VariableDeclarator":return function(e,t){let n=null===t.init?null:H(e,t.init);n===l.x&&(n=null);const r=t.id.name.toLowerCase();if(O(r),null!==e.localScope){if(void 0!==e.localScope[r])return"lscope['"+r+"']="+n+"; ";if(void 0!==e.localScope._SymbolsMap[r])return"lscope['"+e.localScope._SymbolsMap[r]+"']="+n+"; ";{const t=U(e);return e.localScope._SymbolsMap[r]=t,e.mangleMap[r]=t,"lscope['"+t+"']="+n+"; "}}if(void 0!==e.globalScope[r])return"gscope['"+r+"']="+n+"; ";if(void 0!==e.globalScope._SymbolsMap[r])return"gscope['"+e.globalScope._SymbolsMap[r]+"']="+n+"; ";if(e.undeclaredGlobalsInFunctions.has(r)){const t=e.undeclaredGlobalsInFunctions.get(r).manglename;return e.globalScope._SymbolsMap[r]=t,e.mangleMap[r]=t,e.undeclaredGlobalsInFunctions.delete(r),"gscope[lang.setAssig('"+t+"', runtimeCtx)]="+n+"; "}const i=U(e);return e.globalScope._SymbolsMap[r]=i,e.mangleMap[r]=i,"gscope['"+i+"']="+n+"; "}(e,t);case"VariableDeclaration":return function(e,t){const n=[];for(let r=0;r<t.declarations.length;r++)n.push(H(e,t.declarations[r]));return n.join("\n")+" \n lastStatement= lc.voidOperation; \n"}(e,t);case"BlockStatement":case"Program":return R(e,t);case"FunctionDeclaration":return function(e,t){const n=t.id.name.toLowerCase();O(n);let r="",i=!1;void 0!==e.globalScope[n]?r=n:void 0!==e.globalScope._SymbolsMap[n]?r=e.globalScope._SymbolsMap[n]:e.undeclaredGlobalsInFunctions.has(n)?(r=e.undeclaredGlobalsInFunctions.get(n).manglename,e.globalScope._SymbolsMap[n]=r,e.mangleMap[n]=r,e.undeclaredGlobalsInFunctions.delete(n),i=!0):(r=U(e),e.globalScope._SymbolsMap[n]=r,e.mangleMap[n]=r);const a={isAsync:e.isAsync,console:e.console,exports:e.exports,undeclaredGlobalsInFunctions:e.undeclaredGlobalsInFunctions,customfunctions:e.customfunctions,moduleFactory:e.moduleFactory,moduleFactoryMap:e.moduleFactoryMap,libraryResolver:e.libraryResolver,lrucache:e.lrucache,interceptor:e.interceptor,services:e.services,symbols:e.symbols,mangleMap:e.mangleMap,localScope:{_SymbolsMap:{}},depthCounter:e.depthCounter,globalScope:e.globalScope};let s="new lang.UserDefinedCompiledFunction( lang.functionDepthchecker(function() { var lastStatement = lc.voidOperation; \n var lscope = runtimeCtx.localStack[runtimeCtx.localStack.length-1];\n";for(let n=0;n<t.params.length;n++){const r=t.params[n].name.toLowerCase();O(r);const i=U(e);a.localScope._SymbolsMap[r]=i,a.mangleMap[r]=i,s+="lscope['"+i+"']=arguments["+n.toString()+"];\n"}return!0===e.isAsync?(s+="return lang.__awaiter(this, void 0, void 0, function* () {\n",s+=R(a,t.body)+"\n return lastStatement; ",s+="}); }",s+=", runtimeCtx),"+t.params.length+")",s+="\n lastStatement = lc.voidOperation; \n"):(s+=R(a,t.body)+"\n return lastStatement; }, runtimeCtx),"+t.params.length+")",s+="\n lastStatement = lc.voidOperation; \n"),i?"gscope[lang.setAssig('"+r+"', runtimeCtx)]="+s:"gscope['"+r+"']="+s}(e,t);case"ImportDeclaration":return function(e,t){const n=t.specifiers[0].local.name.toLowerCase();O(n);const r=e.libraryResolver?.loadLibrary(n),a=U(e);void 0===e.moduleFactory[r.uri]&&(e.moduleFactory[r.uri]=function(e,t,n=!1){const r={isAsync:n,moduleFactory:t.moduleFactory,moduleFactoryMap:{},libraryResolver:new i.s(null,e.loadedModules),globalScope:J(t.vars,n?z:P,t.customfunctions),customfunctions:t.customfunctions,localScope:null,mangleMap:{},undeclaredGlobalsInFunctions:new Map,depthCounter:{depth:1},exports:{},console:X,lrucache:t.lrucache,timeReference:t.timeReference??null,interceptor:t.interceptor,services:t.services,symbols:{symbolCounter:0}};let a=H(r,e);""===a&&(a="lc.voidOperation; ");let s="";s=n?"var runtimeCtx=this.prepare(context, true);\n var lc = this.lc; var lang = this.lang; var gscope=runtimeCtx.globalScope; \nreturn lang.__awaiter(this, void 0, void 0, function* () {\n\n function mainBody() {\n var lastStatement=lc.voidOperation;\n return lang.__awaiter(this, void 0, void 0, function* () {\n"+a+"\n return lastStatement; }); } \n yield mainBody(); \n return this.prepareModule(runtimeCtx); }); ":"var runtimeCtx=this.prepare(context, false);\n var lc = this.lc; var lang = this.lang; var gscope=runtimeCtx.globalScope; \n function mainBody() {\n var lastStatement=lc.voidOperation;\n "+a+"\n return lastStatement; } \n mainBody(); \n return this.prepareModule(runtimeCtx); ";const o=r.moduleFactory,u=r.moduleFactoryMap,c=r.exports,d={};for(const e in c)d[e]=void 0!==r.mangleMap[e]?r.mangleMap[e]:e;const h={lc:l.w,lang:Q,mangles:r.mangleMap,prepareModule:e=>new te(e),prepare(e,t){let n=e.spatialReference;null==n&&(n=new N.Z({wkid:102100}));const r=W(e.vars,e.customfunctions,t,e.timeReference);return{localStack:[],isAsync:t,exports:c,exportmangle:d,gdefs:{},moduleFactory:o,moduleFactoryMap:u,moduleSingletons:e.moduleSingletons,mangleMap:this.mangles,spatialReference:n,globalScope:r,abortSignal:void 0===e.abortSignal||null===e.abortSignal?{aborted:!1}:e.abortSignal,localScope:null,services:e.services,console:e.console??X,lrucache:e.lrucache,timeReference:e.timeReference??null,interceptor:e.interceptor,symbols:{symbolCounter:0},depthCounter:e.depthCounter}}};return new Function("context","spatialReference",s).bind(h)}(r.syntax,{interceptor:e.interceptor,services:e.services,moduleFactory:e.moduleFactory,lrucache:e.lrucache,timeReference:e.timeReference??null,libraryResolver:e.libraryResolver,customfunctions:e.customfunctions,vars:{}},e.isAsync)),e.moduleFactoryMap[a]=r.uri;let s="";if(s=e.isAsync?"(yield lang.loadModule('"+a+"', runtimeCtx) ); ":"lang.loadModule('"+a+"', runtimeCtx); ",void 0!==e.globalScope[n])return"gscope['"+n+"']="+s;if(void 0!==e.globalScope._SymbolsMap[n])return"gscope['"+e.globalScope._SymbolsMap[n]+"']="+s;let o="";return e.undeclaredGlobalsInFunctions.has(n)?(o=e.undeclaredGlobalsInFunctions.get(n).manglename,e.undeclaredGlobalsInFunctions.delete(n)):o=U(e),e.globalScope._SymbolsMap[n]=o,e.mangleMap[n]=o,"gscope[lang.setAssig('"+o+"', runtimeCtx)]="+s}(e,t);case"ExportNamedDeclaration":return function(e,t){const n=H(e,t.declaration);if("FunctionDeclaration"===t.declaration.type)e.exports[t.declaration.id.name.toLowerCase()]="function";else if("VariableDeclaration"===t.declaration.type)for(const n of t.declaration.declarations)e.exports[n.id.name.toLowerCase()]="variable";return n}(e,t);case"ReturnStatement":return function(e,t){return null===t.argument?"return lc.voidOperation":"return "+H(e,t.argument)}(e,t);case"IfStatement":return Z(e,t);case"ExpressionStatement":return function(e,t){return"AssignmentExpression"===t.expression.type?"lastStatement = lc.voidOperation; "+H(e,t.expression)+"; \n ":(t.expression.type,"lastStatement = "+H(e,t.expression)+"; ")}(e,t);case"AssignmentExpression":return function(e,t){const n=H(e,t.right);let r=null,i="";if("MemberExpression"===t.left.type)return r=H(e,t.left.object),!0===t.left.computed?i=H(e,t.left.property):(i="'"+t.left.property.name+"'",O(t.left.property.name)),"lang.assignmember("+r+","+i+",'"+t.operator+"',"+n+")";if(r=t.left.name.toLowerCase(),O(r),null!==e.localScope){if(void 0!==e.localScope[r])return"lscope['"+r+"']=lang.assign("+n+",'"+t.operator+"', lscope['"+r+"'])";if(void 0!==e.localScope._SymbolsMap[r])return"lscope['"+e.localScope._SymbolsMap[r]+"']=lang.assign("+n+",'"+t.operator+"', lscope['"+e.localScope._SymbolsMap[r]+"'])"}if(void 0!==e.globalScope[r])return"gscope['"+r+"']=lang.assign("+n+",'"+t.operator+"', gscope['"+r+"'])";if(void 0!==e.globalScope._SymbolsMap[r])return"gscope['"+e.globalScope._SymbolsMap[r]+"']=lang.assign("+n+",'"+t.operator+"', gscope['"+e.globalScope._SymbolsMap[r]+"'])";if(null!==e.localScope){if(e.undeclaredGlobalsInFunctions.has(r))return"gscope[lang.chkAssig('"+e.undeclaredGlobalsInFunctions.get(r).manglename+"',runtimeCtx)]=lang.assign("+n+",'"+t.operator+"', gscope['"+e.undeclaredGlobalsInFunctions.get(r).manglename+"'])";const i={manglename:U(e),node:t.argument};return e.undeclaredGlobalsInFunctions.set(r,i),"gscope[lang.chkAssig('"+i.manglename+"',runtimeCtx)]=lang.assign("+n+",'"+t.operator+"', gscope['"+i.manglename+"'])"}throw new s.aV(e,s.rH.InvalidIdentifier,t)}(e,t);case"UpdateExpression":return function(e,t){let n=null,r="";if("MemberExpression"===t.argument.type)return n=H(e,t.argument.object),!0===t.argument.computed?r=H(e,t.argument.property):(r="'"+t.argument.property.name+"'",O(t.argument.property.name)),"lang.memberupdate("+n+","+r+",'"+t.operator+"',"+t.prefix+")";if(n=t.argument.name.toLowerCase(),O(n),null!==e.localScope){if(void 0!==e.localScope[n])return"lang.update(lscope, '"+n+"','"+t.operator+"',"+t.prefix+")";if(void 0!==e.localScope._SymbolsMap[n])return"lang.update(lscope, '"+e.localScope._SymbolsMap[n]+"','"+t.operator+"',"+t.prefix+")"}if(void 0!==e.globalScope[n])return"lang.update(gscope, '"+n+"','"+t.operator+"',"+t.prefix+")";if(void 0!==e.globalScope._SymbolsMap[n])return"lang.update(gscope, '"+e.globalScope._SymbolsMap[n]+"','"+t.operator+"',"+t.prefix+")";if(null!==e.localScope){if(e.undeclaredGlobalsInFunctions.has(n))return"lang.update(gscope,lang.chkAssig( '"+e.undeclaredGlobalsInFunctions.get(n).manglename+"',runtimeCtx),'"+t.operator+"',"+t.prefix+")";const r={manglename:U(e),node:t.argument};return e.undeclaredGlobalsInFunctions.set(n,r),"lang.update(gscope, lang.chkAssig('"+r.manglename+"',runtimeCtx),'"+t.operator+"',"+t.prefix+")"}throw new s.aV(e,s.rH.InvalidIdentifier,t)}(e,t);case"BreakStatement":return"break";case"ContinueStatement":return"continue";case"TemplateLiteral":return function(e,t){try{const n=[];let r=0;for(const i of t.quasis)n.push(i.value?JSON.stringify(i.value.cooked):JSON.stringify("")),!1===i.tail&&(n.push(t.expressions[r]?"lang.castString(lang.aCheck("+H(e,t.expressions[r])+", 'TemplateLiteral'))":""),r++);return"(["+n.join(",")+"]).join('')"}catch(e){throw e}}(e,t);case"TemplateElement":return JSON.stringify(t.value?t.value.cooked:"");case"ForStatement":return function(e,t){let n="lastStatement = lc.voidOperation; \n";null!==t.init&&(n+=H(e,t.init)+"; ");const r=G(e),i=G(e);return n+="var "+r+" = true; ",n+="\n do { ",null!==t.update&&(n+=" if ("+r+"===false) {\n "+H(e,t.update)+" \n}\n "+r+"=false; \n"),null!==t.test&&(n+="var "+i+" = "+H(e,t.test)+"; ",n+="if ("+i+"===false) { break; } else if ("+i+"!==true) { lang.error('"+s.rH.BooleanConditionRequired+"'); }\n"),n+=H(e,t.body),null!==t.update&&(n+="\n "+H(e,t.update)),n+="\n"+r+" = true; \n} while(true); lastStatement = lc.voidOperation; ",n}(e,t);case"ForInStatement":return function(e,t){const n=G(e),r=G(e),i=G(e);let a="var "+n+" = "+H(e,t.right)+";\n";"VariableDeclaration"===t.left.type&&(a+=H(e,t.left));let s="VariableDeclaration"===t.left.type?t.left.declarations[0].id.name:t.left.name;s=s.toLowerCase(),O(s);let o="";null!==e.localScope&&(void 0!==e.localScope[s]?o="lscope['"+s+"']":void 0!==e.localScope._SymbolsMap[s]&&(o="lscope['"+e.localScope._SymbolsMap[s]+"']"));let u="";if(""===o)if(void 0!==e.globalScope[s])o="gscope['"+s+"']";else if(void 0!==e.globalScope._SymbolsMap[s])o="gscope['"+e.globalScope._SymbolsMap[s]+"']";else if(null!==e.localScope)if(e.undeclaredGlobalsInFunctions.has(s))o="gscope['"+e.undeclaredGlobalsInFunctions.get(s).manglename+"']",u=e.undeclaredGlobalsInFunctions.get(s).manglename;else{const n={manglename:U(e),node:t.left};e.undeclaredGlobalsInFunctions.set(s,n),o="gscope['"+n.manglename+"']",u=n.manglename}return u&&(a+="lang.chkAssig('"+u+"',runtimeCtx); \n"),a+="if ("+n+"===null) { lastStatement = lc.voidOperation; }\n ",a+="else if (lc.isArray("+n+") || lc.isString("+n+")) {",a+="var "+r+"="+n+".length; \n",a+="for(var "+i+"=0; "+i+"<"+r+"; "+i+"++) {\n",a+=o+"="+i+";\n",a+=H(e,t.body),a+="\n}\n",a+=" lastStatement = lc.voidOperation; \n",a+=" \n}\n",a+="else if (lc.isImmutableArray("+n+")) {",a+="var "+r+"="+n+".length(); \n",a+="for(var "+i+"=0; "+i+"<"+r+"; "+i+"++) {\n",a+=o+"="+i+";\n",a+=H(e,t.body),a+="\n}\n",a+=" lastStatement = lc.voidOperation; \n",a+=" \n}\n",a+="else if (( "+n+" instanceof lang.Dictionary) || ( "+n+" instanceof lang.Feature)) {",a+="var "+r+"="+n+".keys(); \n",a+="for(var "+i+"=0; "+i+"<"+r+".length; "+i+"++) {\n",a+=o+"="+r+"["+i+"];\n",a+=H(e,t.body),a+="\n}\n",a+=" lastStatement = lc.voidOperation; \n",a+=" \n}\n",e.isAsync&&(a+="else if (lc.isFeatureSet("+n+")) {",a+="var "+r+"="+n+".iterator(runtimeCtx.abortSignal); \n",a+="for(var "+i+"=lang. graphicToFeature( yield "+r+".next(),"+n+", runtimeCtx); "+i+"!=null; "+i+"=lang. graphicToFeature( yield "+r+".next(),"+n+", runtimeCtx)) {\n",a+=o+"="+i+";\n",a+=H(e,t.body),a+="\n}\n",a+=" lastStatement = lc.voidOperation; \n",a+=" \n}\n"),a+="else { lastStatement = lc.voidOperation; } \n",a}(e,t);case"WhileStatement":return function(e,t){let n="lastStatement = lc.voidOperation; \n";const r=G(e);return n+=`\n var ${r} = true;\n do {\n ${r} = ${H(e,t.test)};\n if (${r}==false) {\n break;\n }\n if (${r}!==true) {\n lang.error('${s.rH.BooleanConditionRequired}');\n }\n ${H(e,t.body)}\n }\n while (${r} !== false);\n lastStatement = lc.voidOperation;\n `,n}(e,t);case"Identifier":return function(e,t){try{const n=t.name.toLowerCase();if(O(n),null!==e.localScope){if(void 0!==e.localScope[n])return"lscope['"+n+"']";if(void 0!==e.localScope._SymbolsMap[n])return"lscope['"+e.localScope._SymbolsMap[n]+"']"}if(void 0!==e.globalScope[n])return"gscope['"+n+"']";if(void 0!==e.globalScope._SymbolsMap[n])return"gscope['"+e.globalScope._SymbolsMap[n]+"']";if(null!==e.localScope){if(e.undeclaredGlobalsInFunctions.has(n))return"gscope[lang.chkAssig('"+e.undeclaredGlobalsInFunctions.get(n).manglename+"',runtimeCtx)]";const r={manglename:U(e),node:t.argument};return e.undeclaredGlobalsInFunctions.set(n,r),"gscope[lang.chkAssig('"+r.manglename+"',runtimeCtx)]"}throw new s.OF(e,s.rH.InvalidIdentifier,t)}catch(e){throw e}}(e,t);case"MemberExpression":return function(e,t){try{let n;return!0===t.computed?n=H(e,t.property):(n="'"+t.property.name+"'",O(t.property.name)),"lang.member("+H(e,t.object)+","+n+")"}catch(e){throw e}}(e,t);case"Literal":return null===t.value||void 0===t.value?"null":JSON.stringify(t.value);case"CallExpression":return function(e,t){try{if("MemberExpression"===t.callee.type){let n;!0===t.callee.computed?n=H(e,t.callee.property):(n="'"+t.callee.property.name+"'",O(t.callee.property.name));let r="[";for(let n=0;n<t.arguments.length;n++)n>0&&(r+=", "),r+=H(e,t.arguments[n]);return r+="]",e.isAsync?"(yield lang.callModuleFunction("+H(e,t.callee.object)+","+r+","+n+",runtimeCtx))":"lang.callModuleFunction("+H(e,t.callee.object)+","+r+","+n+",runtimeCtx)"}if("Identifier"!==t.callee.type)throw new s.OF(e,s.rH.FunctionNotFound,t);const n=t.callee.name.toLowerCase();if("iif"===n)return function(e,t){try{if(3!==t.arguments.length)throw new s.OF(e,s.rH.WrongNumberOfParameters,t);const n=G(e);return`${e.isAsync?"(yield (function() { \n return lang.__awaiter(this, void 0, void 0, function* () {":"function() {"}\n var ${n} = ${H(e,t.arguments[0])};\n\n if (${n} === true) {\n return ${H(e,t.arguments[1])};\n }\n else if (${n} === false) {\n return ${H(e,t.arguments[2])};\n }\n else {\n lang.error('ExecutionErrorCodes.BooleanConditionRequired');\n }\n ${e.isAsync?"})}()))":"}()"}`}catch(e){throw e}}(e,t);if("when"===n)return function(e,t){try{if(t.arguments.length<3)throw new s.OF(e,s.rH.WrongNumberOfParameters,t);if(t.arguments.length%2==0)throw new s.OF(e,s.rH.WrongNumberOfParameters,t);const n=G(e);let r="var ";for(let i=0;i<t.arguments.length-1;i+=2)r+=`${n} = lang.mustBoolean(${H(e,t.arguments[i])}, runtimeCtx);\n if (${n} === true ) {\n return ${H(e,t.arguments[i+1])}\n }\n`;return`${e.isAsync?"(yield (function() { \n return lang.__awaiter(this, void 0, void 0, function* () {":"function() {"}\n ${r}\n return ${H(e,t.arguments[t.arguments.length-1])}\n ${e.isAsync?"})}()))":"}()"}`}catch(e){throw e}}(e,t);if("decode"===n)return function(e,t){try{if(t.arguments.length<2)throw new s.OF(e,s.rH.WrongNumberOfParameters,t);if(2===t.arguments.length)return`(${H(e,t.arguments[1])})`;if((t.arguments.length-1)%2==0)throw new s.OF(e,s.rH.WrongNumberOfParameters,t);const n=G(e),r=G(e);let i="var ";for(let a=1;a<t.arguments.length-1;a+=2)i+=`${r} = ${H(e,t.arguments[a])};\n if (lang.binary(${r}, ${n}, "==") === true ) {\n return ${H(e,t.arguments[a+1])}\n }\n`;return`${e.isAsync?"(yield (function() { \n return lang.__awaiter(this, void 0, void 0, function* () {":"function() {"}\n var ${n} = ${H(e,t.arguments[0])};\n ${i}\n return ${H(e,t.arguments[t.arguments.length-1])}\n ${e.isAsync?"})}()))":"}()"}`}catch(e){throw e}}(e,t);let r="";if(null!==e.localScope&&(void 0!==e.localScope[n]?r="lscope['"+n+"']":void 0!==e.localScope._SymbolsMap[n]&&(r="lscope['"+e.localScope._SymbolsMap[n]+"']")),""===r)if(void 0!==e.globalScope[n])r="gscope['"+n+"']";else if(void 0!==e.globalScope._SymbolsMap[n])r="gscope['"+e.globalScope._SymbolsMap[n]+"']";else if(null!==e.localScope)if(e.undeclaredGlobalsInFunctions.has(n))r="gscope[lang.chkAssig('"+e.undeclaredGlobalsInFunctions.get(n).manglename+"',runtimeCtx)]";else{const i={manglename:U(e),node:t.argument};e.undeclaredGlobalsInFunctions.set(n,i),r="gscope[lang.chkAssig('"+i.manglename+"',runtimeCtx)]"}if(""!==r){let n="[";for(let r=0;r<t.arguments.length;r++)r>0&&(n+=", "),n+=H(e,t.arguments[r]);return n+="]",e.isAsync?"(yield lang.callfunc("+r+","+n+",runtimeCtx) )":"lang.callfunc("+r+","+n+",runtimeCtx)"}throw new s.OF(e,s.rH.FunctionNotFound,t)}catch(e){throw e}}(e,t);case"UnaryExpression":return function(e,t){try{return"lang.unary("+H(e,t.argument)+",'"+t.operator+"')"}catch(e){throw e}}(e,t);case"BinaryExpression":return function(e,t){try{return"lang.binary("+H(e,t.left)+","+H(e,t.right)+",'"+t.operator+"')"}catch(e){throw e}}(e,t);case"LogicalExpression":return function(e,t){try{if("AssignmentExpression"===t.left.type||"UpdateExpression"===t.left.type)throw new s.OF(e,s.rH.LogicalExpressionOnlyBoolean,t);if("AssignmentExpression"===t.right.type||"UpdateExpression"===t.right.type)throw new s.OF(e,s.rH.LogicalExpressionOnlyBoolean,t);if("&&"===t.operator||"||"===t.operator)return"(lang.logicalCheck("+H(e,t.left)+") "+t.operator+" lang.logicalCheck("+H(e,t.right)+"))";throw new s.OF(null,s.rH.LogicExpressionOrAnd,null)}catch(e){throw e}}(e,t);case"ArrayExpression":return function(e,t){try{const n=[];for(let r=0;r<t.elements.length;r++)"Literal"===t.elements[r].type?n.push(H(e,t.elements[r])):n.push("lang.aCheck("+H(e,t.elements[r])+",'ArrayExpression')");return"["+n.join(",")+"]"}catch(e){throw e}}(e,t);case"ObjectExpression":return function(e,t){let n="lang.dictionary([";for(let r=0;r<t.properties.length;r++){const i=t.properties[r];O(i.key.name),r>0&&(n+=","),n+="lang.strCheck("+("Identifier"===i.key.type?"'"+i.key.name+"'":H(e,i.key))+",'ObjectExpression'),lang.aCheck("+H(e,i.value)+", 'ObjectExpression')"}return n+="])",n}(e,t);case"Property":return function(e,t){throw new s.OF(e,s.rH.NeverReach,t)}(e,t);case"Array":throw new s.OF(e,s.rH.NeverReach,t);default:throw new s.OF(e,s.rH.Unrecognized,t)}}catch(e){throw e}}function V(e,t){return"BlockStatement"===t.type?H(e,t):"ReturnStatement"===t.type||"BreakStatement"===t.type||"ContinueStatement"===t.type?H(e,t)+"; ":"UpdateExpression"===t.type?"lastStatement = "+H(e,t)+"; ":"ExpressionStatement"===t.type?H(e,t):"ObjectExpression"===t.type?"lastStatement = "+H(e,t)+"; ":H(e,t)+"; "}function Z(e,t){if("AssignmentExpression"===t.test.type||"UpdateExpression"===t.test.type)throw new s.OF(e,s.rH.BooleanConditionRequired,t);return`if (lang.mustBoolean(${H(e,t.test)}, runtimeCtx) === true) {\n ${V(e,t.consequent)}\n } `+(null!==t.alternate?"IfStatement"===t.alternate.type?" else "+Z(e,t.alternate):` else {\n ${V(e,t.alternate)}\n }\n`:" else {\n lastStatement = lc.voidOperation;\n }\n")}function R(e,t){let n="";for(let r=0;r<t.body.length;r++)"EmptyStatement"!==t.body[r].type&&("ReturnStatement"===t.body[r].type||"BreakStatement"===t.body[r].type||"ContinueStatement"===t.body[r].type?n+=H(e,t.body[r])+"; \n":"UpdateExpression"===t.body[r].type||"ObjectExpression"===t.body[r].type?n+="lastStatement = "+H(e,t.body[r])+"; \n":n+=H(e,t.body[r])+" \n");return n}function O(e){if("iif"===e)throw new s.kq;if("decode"===e)throw new s.kq;if("when"===e)throw new s.kq}const P={};function U(e){return e.symbols.symbolCounter++,"_T"+e.symbols.symbolCounter.toString()}function G(e){return e.symbols.symbolCounter++,"_Tvar"+e.symbols.symbolCounter.toString()}(0,h.r)(P,L),(0,_.r)(P,L),(0,k.r)(P,L),(0,f.r)(P,L),(0,I.r)(P,L),P.iif=function(e,t){try{return L(e,t,((n,r,i)=>{throw new s.aV(e,s.rH.Unrecognized,t)}))}catch(e){throw e}},P.decode=function(e,t){try{return L(e,t,((n,r,i)=>{throw new s.aV(e,s.rH.Unrecognized,t)}))}catch(e){throw e}},P.when=function(e,t){try{return L(e,t,((n,r,i)=>{throw new s.aV(e,s.rH.Unrecognized,t)}))}catch(e){throw e}};const z={};for(const e in P)z[e]=new u.Bx(P[e]);v(P,L);for(const e in P)P[e]=new u.Bx(P[e]);const j=function(){};j.prototype=P;const q=function(){};function J(e,t,n){const r={};e||(e={}),n||(n={}),r._SymbolsMap={},r.textformatting=1,r.infinity=1,r.pi=1;for(const e in t)r[e]=1;for(const e in n)r[e]=1;for(const t in e)r[t]=1;return r}function W(e,t,n,r){const i=n?new q:new j;e||(e={}),t||(t={});const s=new a.Z({newline:"\n",tab:"\t",singlequote:"'",doublequote:'"',forwardslash:"/",backwardslash:"\\"});s.immutable=!1,i._SymbolsMap={textformatting:1,infinity:1,pi:1},i.textformatting=s,i.infinity=Number.POSITIVE_INFINITY,i.pi=Math.PI;for(const e in t)i[e]=t[e],i._SymbolsMap[e]=1;for(const t in e)i._SymbolsMap[t]=1,e[t]&&"esri.Graphic"===e[t].declaredClass?i[t]=o.Z.createFromGraphic(e[t],r??null):i[t]=e[t];return i}function K(e,t){const n={mode:t,compiled:!0,functions:{},signatures:[],standardFunction:L,standardFunctionAsync:L,evaluateIdentifier:$};for(let t=0;t<e.length;t++)e[t].registerFunctions(n);if("sync"===t){for(const e in n.functions)P[e]=new u.Bx(n.functions[e]),j.prototype[e]=P[e];for(let e=0;e<n.signatures.length;e++)(0,c.gW)(n.signatures[e],"sync")}else{for(const e in n.functions)z[e]=new u.Bx(n.functions[e]),q.prototype[e]=z[e];for(let e=0;e<n.signatures.length;e++)(0,c.gW)(n.signatures[e],"async")}}function $(e,t){const n=t.name;if("_SymbolsMap"===n)throw new s.aV(e,s.rH.InvalidIdentifier,null);if(e.localStack.length>0){if("_t"!==n.substr(0,2).toLowerCase()&&void 0!==e.localStack[e.localStack.length-1][n])return e.localStack[e.localStack.length-1][n];const t=e.mangleMap[n];if(void 0!==t&&void 0!==e.localStack[e.localStack.length-1][t])return e.localStack[e.localStack.length-1][t]}if("_t"!==n.substr(0,2).toLowerCase()&&void 0!==e.globalScope[n])return e.globalScope[n];if(1===e.globalScope._SymbolsMap[n])return e.globalScope[n];const r=e.mangleMap[n];return void 0!==r?e.globalScope[r]:void 0}q.prototype=z,l.A,K([d.A],"sync"),K([d.A],"async");let Y=0;const Q={error(e){throw new s.aV(null,e,null)},__awaiter:(e,t,n,r)=>new Promise(((n,i)=>{function a(e){try{o(r.next(e))}catch(e){i(e)}}function s(e){try{o(r.throw(e))}catch(e){i(e)}}function o(e){e.done?n(e.value):e.value&&e.value.then?e.value.then(a,s):(Y++,Y%100==0?setTimeout((()=>{Y=0,a(e.value)}),0):a(e.value))}o((r=r.apply(e,t||[])).next())})),functionDepthchecker:(e,t)=>function(){if(t.depthCounter.depth++,t.localStack.push([]),t.depthCounter.depth>64)throw new s.aV(null,s.rH.MaximumCallDepth,null);const n=e.apply(this,arguments);return(0,M.y8)(n)?n.then((e=>(t.depthCounter.depth--,t.localStack.length=t.localStack.length-1,e))):(t.depthCounter.depth--,t.localStack.length=t.localStack.length-1,n)},chkAssig(e,t){if(void 0===t.gdefs[e])throw new s.aV(t,s.rH.InvalidIdentifier,null);return e},mustBoolean(e,t){if(!0===e||!1===e)return e;throw new s.aV(t,s.rH.BooleanConditionRequired,null)},setAssig:(e,t)=>(t.gdefs[e]=1,e),castString:e=>(0,l.j)(e),aCheck(e,t){if((0,l.i)(e)){if("ArrayExpression"===t)throw new s.aV(null,s.rH.NoFunctionInArray,null);if("ObjectExpression"===t)throw new s.aV(null,s.rH.NoFunctionInDictionary,null);throw new s.aV(null,s.rH.NoFunctionInTemplateLiteral,null)}return e===l.x?null:e},Dictionary:a.Z,Feature:o.Z,UserDefinedCompiledFunction:B,dictionary(e){const t={},n=new Map;for(let r=0;r<e.length;r+=2){if((0,l.i)(e[r+1]))throw new s.aV(null,s.rH.NoFunctionInDictionary,null);if(!1===(0,l.c)(e[r]))throw new s.aV(null,s.rH.KeyMustBeString,null);let i=e[r].toString();const a=i.toLowerCase();n.has(a)?i=n.get(a):n.set(a,i),e[r+1]===l.x?t[i]=null:t[i]=e[r+1]}const r=new a.Z(t);return r.immutable=!1,r},strCheck(e){if(!1===(0,l.c)(e))throw new s.aV(null,s.rH.KeyMustBeString,null);return e},unary(e,t){if((0,l.a)(e)){if("!"===t)return!e;if("-"===t)return-1*(0,l.g)(e);if("+"===t)return 1*(0,l.g)(e);if("~"===t)return~(0,l.g)(e);throw new s.aV(null,s.rH.UnsupportedUnaryOperator,null)}if("-"===t)return-1*(0,l.g)(e);if("+"===t)return 1*(0,l.g)(e);if("~"===t)return~(0,l.g)(e);throw new s.aV(null,s.rH.UnsupportedUnaryOperator,null)},logicalCheck(e){if(!1===(0,l.a)(e))throw new s.aV(null,s.rH.LogicExpressionOrAnd,null);return e},logical(e,t,n){if((0,l.a)(e)&&(0,l.a)(t))switch(n){case"||":return e||t;case"&&":return e&&t;default:throw new s.aV(null,s.rH.LogicExpressionOrAnd,null)}throw new s.aV(null,s.rH.LogicExpressionOrAnd,null)},binary(e,t,n){switch(n){case"|":case"<<":case">>":case">>>":case"^":case"&":return(0,l.D)((0,l.g)(e),(0,l.g)(t),n);case"==":case"=":return(0,l.C)(e,t);case"!=":return!(0,l.C)(e,t);case"<":case">":case"<=":case">=":return(0,l.B)(e,t,n);case"+":return(0,l.c)(e)||(0,l.c)(t)?(0,l.j)(e)+(0,l.j)(t):(0,l.g)(e)+(0,l.g)(t);case"-":return(0,l.g)(e)-(0,l.g)(t);case"*":return(0,l.g)(e)*(0,l.g)(t);case"/":return(0,l.g)(e)/(0,l.g)(t);case"%":return(0,l.g)(e)%(0,l.g)(t);default:throw new s.aV(null,s.rH.UnsupportedOperator,null)}},assign(e,t,n){switch(t){case"=":return e===l.x?null:e;case"/=":return(0,l.g)(n)/(0,l.g)(e);case"*=":return(0,l.g)(n)*(0,l.g)(e);case"-=":return(0,l.g)(n)-(0,l.g)(e);case"+=":return(0,l.c)(n)||(0,l.c)(e)?(0,l.j)(n)+(0,l.j)(e):(0,l.g)(n)+(0,l.g)(e);case"%=":return(0,l.g)(n)%(0,l.g)(e);default:throw new s.aV(null,s.rH.UnsupportedOperator,null)}},update(e,t,n,r){const i=(0,l.g)(e[t]);return e[t]="++"===n?i+1:i-1,!1===r?i:"++"===n?i+1:i-1},graphicToFeature:(e,t,n)=>null===e?null:o.Z.createFromGraphicLikeObject(e.geometry,e.attributes,t,n.timeReference),memberupdate(e,t,n,r){let i;if((0,l.o)(e)){if(!(0,l.b)(t))throw new s.aV(null,s.rH.ArrayAccessorMustBeNumber,null);if(t<0&&(t=e.length+t),t<0||t>=e.length)throw new s.aV(null,s.rH.OutOfBounds,null);i=(0,l.g)(e[t]),e[t]="++"===n?i+1:i-1}else if(e instanceof a.Z){if(!1===(0,l.c)(t))throw new s.aV(null,s.rH.KeyAccessorMustBeString,null);if(!0!==e.hasField(t))throw new s.aV(null,s.rH.FieldNotFound,null,{key:t});i=(0,l.g)(e.field(t)),e.setField(t,"++"===n?i+1:i-1)}else if((0,l.r)(e)){if(!1===(0,l.c)(t))throw new s.aV(null,s.rH.KeyAccessorMustBeString,null);if(!0!==e.hasField(t))throw new s.aV(null,s.rH.FieldNotFound,null);i=(0,l.g)(e.field(t)),e.setField(t,"++"===n?i+1:i-1)}else{if((0,l.q)(e))throw new s.aV(null,s.rH.Immutable,null);if(!(e instanceof te))throw new s.aV(null,s.rH.InvalidIdentifier,null);if(!1===(0,l.c)(t))throw new s.aV(null,s.rH.ModuleAccessorMustBeString,null);if(!0!==e.hasGlobal(t))throw new s.aV(null,s.rH.ModuleExportNotFound,null);i=(0,l.g)(e.global(t)),e.setGlobal(t,"++"===n?i+1:i-1)}return!1===r?i:"++"===n?i+1:i-1},assignmember(e,t,n,r){if((0,l.o)(e)){if(!(0,l.b)(t))throw new s.aV(null,s.rH.ArrayAccessorMustBeNumber,null);if(t<0&&(t=e.length+t),t<0||t>e.length)throw new s.aV(null,s.rH.OutOfBounds,null);if(t===e.length){if("="!==n)throw new s.aV(null,s.rH.OutOfBounds,null);e[t]=this.assign(r,n,e[t])}else e[t]=this.assign(r,n,e[t])}else if(e instanceof a.Z){if(!1===(0,l.c)(t))throw new s.aV(null,s.rH.KeyAccessorMustBeString,null);if(!0===e.hasField(t))e.setField(t,this.assign(r,n,e.field(t)));else{if("="!==n)throw new s.aV(null,s.rH.FieldNotFound,null);e.setField(t,this.assign(r,n,null))}}else if((0,l.r)(e)){if(!1===(0,l.c)(t))throw new s.aV(null,s.rH.KeyAccessorMustBeString,null);if(!0===e.hasField(t))e.setField(t,this.assign(r,n,e.field(t)));else{if("="!==n)throw new s.aV(null,s.rH.FieldNotFound,null);e.setField(t,this.assign(r,n,null))}}else{if((0,l.q)(e))throw new s.aV(null,s.rH.Immutable,null);if(!(e instanceof te))throw new s.aV(null,s.rH.InvalidIdentifier,null);if(!1===(0,l.c)(t))throw new s.aV(null,s.rH.ModuleAccessorMustBeString,null);if(!e.hasGlobal(t))throw new s.aV(null,s.rH.ModuleExportNotFound,null);e.setGlobal(t,this.assign(r,n,e.global(t)))}},member(e,t){if(null===e)throw new s.aV(null,s.rH.MemberOfNull,null);if(e instanceof a.Z||(0,l.r)(e)){if((0,l.c)(t))return e.field(t);throw new s.aV(null,s.rH.InvalidMemberAccessKey,null)}if(e instanceof w.Z){if((0,l.c)(t))return(0,f.Z)(e,t,null,null);throw new s.aV(null,s.rH.InvalidMemberAccessKey,null)}if((0,l.o)(e)){if((0,l.b)(t)&&isFinite(t)&&Math.floor(t)===t){if(t<0&&(t=e.length+t),t>=e.length||t<0)throw new s.aV(null,s.rH.OutOfBounds,null);return e[t]}throw new s.aV(null,s.rH.InvalidMemberAccessKey,null)}if((0,l.c)(e)){if((0,l.b)(t)&&isFinite(t)&&Math.floor(t)===t){if(t<0&&(t=e.length+t),t>=e.length||t<0)throw new s.aV(null,s.rH.OutOfBounds,null);return e[t]}throw new s.aV(null,s.rH.InvalidMemberAccessKey,null)}if((0,l.q)(e)){if((0,l.b)(t)&&isFinite(t)&&Math.floor(t)===t){if(t<0&&(t=e.length()+t),t>=e.length()||t<0)throw new s.aV(null,s.rH.OutOfBounds,null);return e.get(t)}throw new s.aV(null,s.rH.InvalidMemberAccessKey,null)}if(e instanceof te){if((0,l.c)(t))return e.global(t);throw new s.aV(null,s.rH.InvalidMemberAccessKey,null)}throw new s.aV(null,s.rH.InvalidMemberAccessKey,null)},callfunc:(e,t,n)=>e.call(n,{arguments:t,preparsed:!0}),loadModule(e,t){const n=t.moduleFactoryMap[e];if(t.moduleSingletons[n])return t.moduleSingletons[n];const r=t.moduleFactory[n]({vars:{},moduleSingletons:t.moduleSingletons,depthCounter:t.depthCounter,console:t.console,abortSignal:t.abortSignal,isAsync:t.isAsync,services:t.services,lrucache:t.lrucache,timeReference:t.timeReference??null,interceptor:t.interceptor},t.spatialReference);return t.moduleSingletons[n]=r,r},callModuleFunction(e,t,n,r){if(!(e instanceof te))throw new s.aV(null,s.rH.FunctionNotFound,null);const i=e.global(n);if(!1===(0,l.i)(i))throw new s.aV(null,s.rH.CallNonFunction,null);return i.call(r,{preparsed:!0,arguments:t})}};function X(e){console.log(e)}function ee(e,t,n=!1){null===t&&(t={vars:{},customfunctions:{}});let r=null;e.usesModules&&(r=new i.s(null,e.loadedModules));const a={isAsync:n,globalScope:J(t.vars,n?z:P,t.customfunctions),moduleFactory:{},moduleFactoryMap:{},undeclaredGlobalsInFunctions:new Map,customfunctions:t.customfunctions,libraryResolver:r,localScope:null,mangleMap:{},depthCounter:{depth:1},exports:{},console:X,lrucache:t.lrucache,timeReference:t.timeReference??null,interceptor:t.interceptor,services:t.services,symbols:{symbolCounter:0}};let o=H(a,e);""===o&&(o="lc.voidOperation; "),a.undeclaredGlobalsInFunctions.size>0&&a.undeclaredGlobalsInFunctions.forEach((e=>{throw new s.OF(t,s.rH.InvalidIdentifier,e.node)}));let u="";u=n?"var runtimeCtx=this.prepare(context, true);\n var lc = this.lc; var lang = this.lang; var gscope=runtimeCtx.globalScope; \nreturn lang.__awaiter(this, void 0, void 0, function* () {\n\n function mainBody() {\n var lastStatement=lc.voidOperation;\n return lang.__awaiter(this, void 0, void 0, function* () {\n"+o+"\n return lastStatement; }); } \n return this.postProcess(yield mainBody()); }); ":"var runtimeCtx=this.prepare(context, false);\n var lc = this.lc; var lang = this.lang; var gscope=runtimeCtx.globalScope; \n function mainBody() {\n var lastStatement=lc.voidOperation;\n "+o+"\n return lastStatement; } \n return this.postProcess(mainBody()); ";const c=a.moduleFactory,d=a.moduleFactoryMap,h=a.exports,f={};for(const e in h)f[e]=void 0!==a.mangleMap[e]?a.mangleMap[e]:e;const m={lc:l.w,lang:Q,mangles:a.mangleMap,postProcess(e){if(e instanceof l.R&&(e=e.value),e instanceof l.I&&(e=e.value),e===l.x&&(e=null),e===l.y)throw new s.aV(null,s.rH.IllegalResult,null);if(e===l.z)throw new s.aV(null,s.rH.IllegalResult,null);if((0,l.i)(e))throw new s.aV(null,s.rH.IllegalResult,null);return e},prepare(e,t){let n=e.spatialReference;null==n&&(n=N.Z.WebMercator);const r=W(e.vars,e.customfunctions,t,e.timeReference);return{localStack:[],isAsync:t,moduleFactory:c,moduleFactoryMap:d,mangleMap:this.mangles,moduleSingletons:{},exports:h,gdefs:{},exportmangle:f,spatialReference:n,globalScope:r,abortSignal:void 0===e.abortSignal||null===e.abortSignal?{aborted:!1}:e.abortSignal,localScope:null,services:e.services,console:e.console??X,lrucache:e.lrucache,timeReference:e.timeReference??null,interceptor:e.interceptor,symbols:{symbolCounter:0},depthCounter:{depth:1}}}};return new Function("context","spatialReference",u).bind(m)}class te extends r.P{constructor(e){super(null),this.moduleContext=e}hasGlobal(e){return void 0===this.moduleContext.exports[e]&&(e=e.toLowerCase()),void 0!==this.moduleContext.exports[e]}setGlobal(e,t){const n=this.moduleContext.globalScope,r=e.toLowerCase();if((0,l.i)(t))throw new s.aV(null,s.rH.AssignModuleFunction,null);n[this.moduleContext.exportmangle[r]]=t}global(e){const t=this.moduleContext.globalScope;e=e.toLowerCase();const n=t[this.moduleContext.exportmangle[e]];if(void 0===n)throw new s.aV(null,s.rH.InvalidIdentifier,null);if((0,l.i)(n)&&!(n instanceof u.Vg)){const r=new u.Vg;return r.fn=n,r.parameterEvaluator=L,r.context=this.moduleContext,t[this.moduleContext.exportmangle[e]]=r,r}return n}}var ne,re,ie,ae=n(3172);(ie=ne||(ne={})).Break="break",ie.Continue="continue",ie.Else="else",ie.False="false",ie.For="for",ie.From="from",ie.Function="function",ie.If="if",ie.Import="import",ie.Export="export",ie.In="in",ie.Null="null",ie.Return="return",ie.True="true",ie.Var="var",ie.While="while",function(e){e.AssignmentExpression="AssignmentExpression",e.ArrayExpression="ArrayExpression",e.BlockComment="BlockComment",e.BlockStatement="BlockStatement",e.BinaryExpression="BinaryExpression",e.BreakStatement="BreakStatement",e.CallExpression="CallExpression",e.ContinueStatement="ContinueStatement",e.EmptyStatement="EmptyStatement",e.ExpressionStatement="ExpressionStatement",e.ExportNamedDeclaration="ExportNamedDeclaration",e.ExportSpecifier="ExportSpecifier",e.ForStatement="ForStatement",e.ForInStatement="ForInStatement",e.FunctionDeclaration="FunctionDeclaration",e.Identifier="Identifier",e.IfStatement="IfStatement",e.ImportDeclaration="ImportDeclaration",e.ImportDefaultSpecifier="ImportDefaultSpecifier",e.LineComment="LineComment",e.Literal="Literal",e.LogicalExpression="LogicalExpression",e.MemberExpression="MemberExpression",e.ObjectExpression="ObjectExpression",e.Program="Program",e.Property="Property",e.ReturnStatement="ReturnStatement",e.TemplateElement="TemplateElement",e.TemplateLiteral="TemplateLiteral",e.UnaryExpression="UnaryExpression",e.UpdateExpression="UpdateExpression",e.VariableDeclaration="VariableDeclaration",e.VariableDeclarator="VariableDeclarator",e.WhileStatement="WhileStatement"}(re||(re={}));const se=["++","--"],oe=["-","+","!","~"],ue=["=","/=","*=","%=","+=","-="],le=["||","&&"],ce={"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10};var de;!function(e){e[e.Unknown=0]="Unknown",e[e.BooleanLiteral=1]="BooleanLiteral",e[e.EOF=2]="EOF",e[e.Identifier=3]="Identifier",e[e.Keyword=4]="Keyword",e[e.NullLiteral=5]="NullLiteral",e[e.NumericLiteral=6]="NumericLiteral",e[e.Punctuator=7]="Punctuator",e[e.StringLiteral=8]="StringLiteral",e[e.Template=10]="Template"}(de||(de={}));const he=["Unknown","Boolean","<end>","Identifier","Keyword","Null","Numeric","Punctuator","String","RegularExpression","Template"];var fe;!function(e){e.InvalidModuleUri="InvalidModuleUri",e.ForInOfLoopInitializer="ForInOfLoopInitializer",e.IdentiferExpected="IdentiferExpected",e.InvalidEscapedReservedWord="InvalidEscapedReservedWord",e.InvalidExpression="InvalidExpression",e.InvalidFunctionIdentifier="InvalidFunctionIdentifier",e.InvalidHexEscapeSequence="InvalidHexEscapeSequence",e.InvalidLeftHandSideInAssignment="InvalidLeftHandSideInAssignment",e.InvalidLeftHandSideInForIn="InvalidLeftHandSideInForIn",e.InvalidTemplateHead="InvalidTemplateHead",e.InvalidVariableAssignment="InvalidVariableAssignment",e.KeyMustBeString="KeyMustBeString",e.NoFunctionInsideBlock="NoFunctionInsideBlock",e.NoFunctionInsideFunction="NoFunctionInsideFunction",e.ModuleExportRootOnly="ModuleExportRootOnly",e.ModuleImportRootOnly="ModuleImportRootOnly",e.PunctuatorExpected="PunctuatorExpected",e.TemplateOctalLiteral="TemplateOctalLiteral",e.UnexpectedBoolean="UnexpectedBoolean",e.UnexpectedEndOfScript="UnexpectedEndOfScript",e.UnexpectedIdentifier="UnexpectedIdentifier",e.UnexpectedKeyword="UnexpectedKeyword",e.UnexpectedNull="UnexpectedNull",e.UnexpectedNumber="UnexpectedNumber",e.UnexpectedPunctuator="UnexpectedPunctuator",e.UnexpectedString="UnexpectedString",e.UnexpectedTemplate="UnexpectedTemplate",e.UnexpectedToken="UnexpectedToken"}(fe||(fe={}));const me={[fe.InvalidModuleUri]:"Module uri must be a text literal.",[fe.ForInOfLoopInitializer]:"for-in loop variable declaration may not have an initializer.",[fe.IdentiferExpected]:"'${value}' is an invalid identifier.",[fe.InvalidEscapedReservedWord]:"Keyword cannot contain escaped characters.",[fe.InvalidExpression]:"Invalid expression.",[fe.InvalidFunctionIdentifier]:"'${value}' is an invalid function identifier.",[fe.InvalidHexEscapeSequence]:"Invalid hexadecimal escape sequence.",[fe.InvalidLeftHandSideInAssignment]:"Invalid left-hand side in assignment.",[fe.InvalidLeftHandSideInForIn]:"Invalid left-hand side in for-in.",[fe.InvalidTemplateHead]:"Invalid template structure.",[fe.InvalidVariableAssignment]:"Invalid variable assignment.",[fe.KeyMustBeString]:"Object property keys must be a word starting with a letter.",[fe.NoFunctionInsideBlock]:"Functions cannot be declared inside of code blocks.",[fe.NoFunctionInsideFunction]:"Functions cannot be declared inside another function.",[fe.ModuleExportRootOnly]:"Module exports cannot be declared inside of code blocks.",[fe.ModuleImportRootOnly]:"Module import cannot be declared inside of code blocks.",[fe.PunctuatorExpected]:"'${value}' expected.",[fe.TemplateOctalLiteral]:"Octal literals are not allowed in template literals.",[fe.UnexpectedBoolean]:"Unexpected boolean literal.",[fe.UnexpectedEndOfScript]:"Unexpected end of Arcade expression.",[fe.UnexpectedIdentifier]:"Unexpected identifier.",[fe.UnexpectedKeyword]:"Unexpected keyword.",[fe.UnexpectedNull]:"Unexpected null literal.",[fe.UnexpectedNumber]:"Unexpected number.",[fe.UnexpectedPunctuator]:"Unexpected ponctuator.",[fe.UnexpectedString]:"Unexpected text literal.",[fe.UnexpectedTemplate]:"Unexpected quasi '${value}'.",[fe.UnexpectedToken]:"Unexpected token '${value}'."};class pe extends Error{constructor({code:e,index:t,line:n,column:r,len:i=0,description:a,data:s}){super(`${a??e}`),this.declaredRootClass="esri.arcade.lib.parsingerror",this.name="ParsingError",this.code=e,this.index=t,this.line=n,this.column=r,this.len=i,this.data=s,this.description=a,this.range={start:{line:n,column:r-1},end:{line:n,column:r+i}},Error.captureStackTrace?.(this,pe)}}function ge(e){return e?.type===re.BlockStatement}function De(e){return e?.type===re.BlockComment}function ye(e){return e?.type===re.EmptyStatement}function we(e){return e?.type===re.VariableDeclarator}function xe(e,t){return!!t&&t.loc.end.line===e.loc.start.line&&t.loc.end.column<=e.loc.start.column}function Fe(e,t){return e.range[0]>=t.range[0]&&e.range[1]<=t.range[1]}class Ae{constructor(){this.comments=[],this._nodeStack=[],this._newComments=[]}insertInnerComments(e){if(!ge(e)||0!==e.body.length)return;const t=[];for(let n=this._newComments.length-1;n>=0;--n){const r=this._newComments[n];e.range[1]>=r.range[0]&&(t.unshift(r),this._newComments.splice(n,1))}t.length&&(e.innerComments=t)}attachTrailingComments(e){if(!e)return;const t=this._nodeStack[this._nodeStack.length-1];if(ge(e)&&Fe(t,e))for(let n=this._newComments.length-1;n>=0;--n){const r=this._newComments[n];Fe(r,e)&&(t.trailingComments=[...t.trailingComments??[],r],this._newComments.splice(n,1))}let n=[];if(this._newComments.length>0)for(let r=this._newComments.length-1;r>=0;--r){const i=this._newComments[r];xe(i,t)?(t.trailingComments=[...t.trailingComments??[],i],this._newComments.splice(r,1)):xe(i,e)&&(n.unshift(i),this._newComments.splice(r,1))}t?.trailingComments&&xe(t.trailingComments[0],e)&&(n=[...n,...t.trailingComments],delete t.trailingComments),n.length>0&&(e.trailingComments=n)}attachLeadingComments(e){if(!e)return;let t;for(;this._nodeStack.length>0;){const n=this._nodeStack[this._nodeStack.length-1];if(!(e.range[0]<=n.range[0]))break;t=n,this._nodeStack.pop()}const n=[],r=[];if(t){for(let i=(t.leadingComments?.length??0)-1;i>=0;--i){const a=t.leadingComments[i];e.range[0]>=a.range[1]?(n.unshift(a),t.leadingComments.splice(i,1)):we(e)&&!De(a)&&(r.unshift(a),t.leadingComments.splice(i,1))}return 0===t.leadingComments?.length&&delete t.leadingComments,n.length&&(e.leadingComments=n),void(r.length&&(e.trailingComments=[...r,...e.trailingComments??[]]))}for(let t=this._newComments.length-1;t>=0;--t){const r=this._newComments[t];e.range[0]>=r.range[0]&&(n.unshift(r),this._newComments.splice(t,1))}n.length&&(e.leadingComments=n)}attachComments(e){if(function(e){return e?.type===re.Program}(e)&&e.body.length>0){const t=this._nodeStack[this._nodeStack.length-1];return t?(t.trailingComments=[...t.trailingComments??[],...this._newComments],this._newComments.length=0,void this._nodeStack.pop()):(e.trailingComments=[...this._newComments],void(this._newComments.length=0))}this.attachTrailingComments(e),this.attachLeadingComments(e),this.insertInnerComments(e),this._nodeStack.push(e)}collectComment(e){this.comments.push(e),this._newComments.push(e)}}function Ce(e,t){const n=me[e];return t?n.replaceAll(/\${(.*?)}/g,((e,n)=>t[n]?.toString()??"")):n}class Ee{constructor(e=!1){this.tolerant=e,this.errors=[]}recordError(e){this.errors.push(e)}tolerate(e){if(!this.tolerant)throw e;this.recordError(e)}throwError(e){throw e.description=e.description??Ce(e.code,e.data),new pe(e)}tolerateError(e){e.description=e.description??Ce(e.code,e.data);const t=new pe(e);if(!this.tolerant)throw t;this.recordError(t)}}function Se(e,t){if(!e)throw new Error("ASSERT: "+t)}const be={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEF\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7C6\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB67\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDEC0-\uDEEB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05EF-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u07FD\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D3-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u09FE\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1878\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CD0-\u1CD2\u1CD4-\u1CFA\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEF\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7C6\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB67\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD27\uDD30-\uDD39\uDF00-\uDF1C\uDF27\uDF30-\uDF50\uDFE0-\uDFF6]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD44-\uDD46\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDC9-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3B-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC5E\uDC5F\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDC00-\uDC3A\uDCA0-\uDCE9\uDCFF\uDDA0-\uDDA7\uDDAA-\uDDD7\uDDDA-\uDDE1\uDDE3\uDDE4\uDE00-\uDE3E\uDE47\uDE50-\uDE99\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF4F-\uDF87\uDF8F-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD00-\uDD2C\uDD30-\uDD3D\uDD40-\uDD49\uDD4E\uDEC0-\uDEF9]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4B\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},Te={fromCodePoint:e=>e<65536?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10))+String.fromCharCode(56320+(e-65536&1023)),isWhiteSpace:e=>32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].includes(e),isLineTerminator:e=>10===e||13===e||8232===e||8233===e,isIdentifierStart:e=>36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&be.NonAsciiIdentifierStart.test(Te.fromCodePoint(e)),isIdentifierPart:e=>36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&be.NonAsciiIdentifierPart.test(Te.fromCodePoint(e)),isDecimalDigit:e=>e>=48&&e<=57,isHexDigit:e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,isOctalDigit:e=>e>=48&&e<=55};function ve(e){return"0123456789abcdef".indexOf(e.toLowerCase())}function ke(e){return"01234567".indexOf(e)}const Ie=[[],[],[]];se.forEach((e=>Ie[e.length-1].push(e))),oe.forEach((e=>Ie[e.length-1].push(e))),le.forEach((e=>Ie[e.length-1].push(e))),ue.forEach((e=>Ie[e.length-1].push(e))),["|","&",">>","<<",">>>","^","==","!=","<","<=",">",">=","+","-","*","/","%"].forEach((e=>Ie[e.length-1].push(e)));class _e{constructor(e,t){this.source=e,this.errorHandler=t,this._length=e.length,this.index=0,this.lineNumber=1,this.lineStart=0,this.curlyStack=[]}saveState(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart,curlyStack:this.curlyStack.slice()}}restoreState(e){this.index=e.index,this.lineNumber=e.lineNumber,this.lineStart=e.lineStart,this.curlyStack=e.curlyStack}eof(){return this.index>=this._length}throwUnexpectedToken(e=fe.UnexpectedToken){this.errorHandler.throwError({code:e,index:this.index,line:this.lineNumber,column:this.index-this.lineStart+1})}tolerateUnexpectedToken(e=fe.UnexpectedToken){this.errorHandler.tolerateError({code:e,index:this.index,line:this.lineNumber,column:this.index-this.lineStart+1})}skipSingleLineComment(e){const t=[],n=this.index-e,r={start:{line:this.lineNumber,column:this.index-this.lineStart-e},end:{line:0,column:0}};for(;!this.eof();){const i=this.source.charCodeAt(this.index);if(++this.index,Te.isLineTerminator(i)){if(r){r.end={line:this.lineNumber,column:this.index-this.lineStart-1};const i={multiLine:!1,start:n+e,end:this.index-1,range:[n,this.index-1],loc:r};t.push(i)}return 13===i&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t}}if(r){r.end={line:this.lineNumber,column:this.index-this.lineStart};const i={multiLine:!1,start:n+e,end:this.index,range:[n,this.index],loc:r};t.push(i)}return t}skipMultiLineComment(){const e=[],t=this.index-2,n={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{line:0,column:0}};for(;!this.eof();){const r=this.source.charCodeAt(this.index);if(Te.isLineTerminator(r))13===r&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===r){if(47===this.source.charCodeAt(this.index+1)){if(this.index+=2,n){n.end={line:this.lineNumber,column:this.index-this.lineStart};const r={multiLine:!0,start:t+2,end:this.index-2,range:[t,this.index],loc:n};e.push(r)}return e}++this.index}else++this.index}if(n){n.end={line:this.lineNumber,column:this.index-this.lineStart};const r={multiLine:!0,start:t+2,end:this.index,range:[t,this.index],loc:n};e.push(r)}return this.tolerateUnexpectedToken(),e}scanComments(){let e=[];for(;!this.eof();){let t=this.source.charCodeAt(this.index);if(Te.isWhiteSpace(t))++this.index;else if(Te.isLineTerminator(t))++this.index,13===t&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index;else{if(47!==t)break;if(t=this.source.charCodeAt(this.index+1),47===t){this.index+=2;const t=this.skipSingleLineComment(2);e=[...e,...t]}else{if(42!==t)break;{this.index+=2;const t=this.skipMultiLineComment();e=[...e,...t]}}}}return e}isKeyword(e){switch((e=e.toLowerCase()).length){case 2:return e===ne.If||e===ne.In;case 3:return e===ne.Var||e===ne.For;case 4:return e===ne.Else;case 5:return e===ne.Break||e===ne.While;case 6:return e===ne.Return||e===ne.Import||e===ne.Export;case 8:return e===ne.Function||e===ne.Continue;default:return!1}}codePointAt(e){let t=this.source.charCodeAt(e);if(t>=55296&&t<=56319){const n=this.source.charCodeAt(e+1);n>=56320&&n<=57343&&(t=1024*(t-55296)+n-56320+65536)}return t}scanHexEscape(e){const t="u"===e?4:2;let n=0;for(let e=0;e<t;++e){if(this.eof()||!Te.isHexDigit(this.source.charCodeAt(this.index)))return null;n=16*n+ve(this.source[this.index++])}return String.fromCharCode(n)}scanUnicodeCodePointEscape(){let e=this.source[this.index],t=0;for("}"===e&&this.throwUnexpectedToken();!this.eof()&&(e=this.source[this.index++],Te.isHexDigit(e.charCodeAt(0)));)t=16*t+ve(e);return(t>1114111||"}"!==e)&&this.throwUnexpectedToken(),Te.fromCodePoint(t)}getIdentifier(){const e=this.index++;for(;!this.eof();){const t=this.source.charCodeAt(this.index);if(92===t)return this.index=e,this.getComplexIdentifier();if(t>=55296&&t<57343)return this.index=e,this.getComplexIdentifier();if(!Te.isIdentifierPart(t))break;++this.index}return this.source.slice(e,this.index)}getComplexIdentifier(){let e,t=this.codePointAt(this.index),n=Te.fromCodePoint(t);for(this.index+=n.length,92===t&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,e=this.scanUnicodeCodePointEscape()):(e=this.scanHexEscape("u"),null!==e&&"\\"!==e&&Te.isIdentifierStart(e.charCodeAt(0))||this.throwUnexpectedToken()),n=e);!this.eof()&&(t=this.codePointAt(this.index),Te.isIdentifierPart(t));)e=Te.fromCodePoint(t),n+=e,this.index+=e.length,92===t&&(n=n.substring(0,n.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,e=this.scanUnicodeCodePointEscape()):(e=this.scanHexEscape("u"),null!==e&&"\\"!==e&&Te.isIdentifierPart(e.charCodeAt(0))||this.throwUnexpectedToken()),n+=e);return n}octalToDecimal(e){let t="0"!==e,n=ke(e);return!this.eof()&&Te.isOctalDigit(this.source.charCodeAt(this.index))&&(t=!0,n=8*n+ke(this.source[this.index++]),"0123".includes(e)&&!this.eof()&&Te.isOctalDigit(this.source.charCodeAt(this.index))&&(n=8*n+ke(this.source[this.index++]))),{code:n,octal:t}}scanIdentifier(){let e;const t=this.index,n=92===this.source.charCodeAt(t)?this.getComplexIdentifier():this.getIdentifier();if(e=1===n.length?de.Identifier:this.isKeyword(n)?de.Keyword:n.toLowerCase()===ne.Null?de.NullLiteral:n.toLowerCase()===ne.True||n.toLowerCase()===ne.False?de.BooleanLiteral:de.Identifier,e!==de.Identifier&&t+n.length!==this.index){const e=this.index;this.index=t,this.tolerateUnexpectedToken(fe.InvalidEscapedReservedWord),this.index=e}return{type:e,value:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}}scanPunctuator(){const e=this.index;let t=this.source[this.index];switch(t){case"(":case"{":"{"===t&&this.curlyStack.push("{"),++this.index;break;case".":case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;case"}":++this.index,this.curlyStack.pop();break;default:for(let e=Ie.length;e>0;e--)if(t=this.source.substring(this.index,this.index+e),Ie[e-1].includes(t)){this.index+=e;break}}return this.index===e&&this.throwUnexpectedToken(),{type:de.Punctuator,value:t,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}}scanHexLiteral(e){let t="";for(;!this.eof()&&Te.isHexDigit(this.source.charCodeAt(this.index));)t+=this.source[this.index++];return 0===t.length&&this.throwUnexpectedToken(),Te.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:de.NumericLiteral,value:parseInt("0x"+t,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}}scanBinaryLiteral(e){let t="";for(;!this.eof();){const e=this.source[this.index];if("0"!==e&&"1"!==e)break;t+=this.source[this.index++]}if(0===t.length&&this.throwUnexpectedToken(),!this.eof()){const e=this.source.charCodeAt(this.index);(Te.isIdentifierStart(e)||Te.isDecimalDigit(e))&&this.throwUnexpectedToken()}return{type:de.NumericLiteral,value:parseInt(t,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}}scanOctalLiteral(e,t){let n="",r=!1;for(Te.isOctalDigit(e.charCodeAt(0))?(r=!0,n="0"+this.source[this.index++]):++this.index;!this.eof()&&Te.isOctalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];return r||0!==n.length||this.throwUnexpectedToken(),(Te.isIdentifierStart(this.source.charCodeAt(this.index))||Te.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:de.NumericLiteral,value:parseInt(n,8),lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}}scanNumericLiteral(){const e=this.index;let t=this.source[e];Se(Te.isDecimalDigit(t.charCodeAt(0))||"."===t,"Numeric literal must start with a decimal digit or a decimal point");let n="";if("."!==t){if(n=this.source[this.index++],t=this.source[this.index],"0"===n){if("x"===t||"X"===t)return++this.index,this.scanHexLiteral(e);if("b"===t||"B"===t)return++this.index,this.scanBinaryLiteral(e);if("o"===t||"O"===t)return this.scanOctalLiteral(t,e)}for(;Te.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];t=this.source[this.index]}if("."===t){for(n+=this.source[this.index++];Te.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];t=this.source[this.index]}if("e"===t||"E"===t)if(n+=this.source[this.index++],t=this.source[this.index],"+"!==t&&"-"!==t||(n+=this.source[this.index++]),Te.isDecimalDigit(this.source.charCodeAt(this.index)))for(;Te.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];else this.throwUnexpectedToken();return Te.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:de.NumericLiteral,value:parseFloat(n),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}}scanStringLiteral(){const e=this.index;let t=this.source[e];Se("'"===t||'"'===t,"String literal must starts with a quote"),++this.index;let n=!1,r="";for(;!this.eof();){let e=this.source[this.index++];if(e===t){t="";break}if("\\"===e)if(e=this.source[this.index++],e&&Te.isLineTerminator(e.charCodeAt(0)))++this.lineNumber,"\r"===e&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;else switch(e){case"u":if("{"===this.source[this.index])++this.index,r+=this.scanUnicodeCodePointEscape();else{const t=this.scanHexEscape(e);null===t&&this.throwUnexpectedToken(),r+=t}break;case"x":{const t=this.scanHexEscape(e);null===t&&this.throwUnexpectedToken(fe.InvalidHexEscapeSequence),r+=t;break}case"n":r+="\n";break;case"r":r+="\r";break;case"t":r+="\t";break;case"b":r+="\b";break;case"f":r+="\f";break;case"v":r+="\v";break;case"8":case"9":r+=e,this.tolerateUnexpectedToken();break;default:if(e&&Te.isOctalDigit(e.charCodeAt(0))){const t=this.octalToDecimal(e);n=t.octal||n,r+=String.fromCharCode(t.code)}else r+=e}else{if(Te.isLineTerminator(e.charCodeAt(0)))break;r+=e}}return""!==t&&(this.index=e,this.throwUnexpectedToken()),{type:de.StringLiteral,value:r,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}}scanTemplate(){let e="",t=!1;const n=this.index,r="`"===this.source[n];let i=!1,a=2;for(++this.index;!this.eof();){let n=this.source[this.index++];if("`"===n){a=1,i=!0,t=!0;break}if("$"!==n)if("\\"!==n)Te.isLineTerminator(n.charCodeAt(0))?(++this.lineNumber,"\r"===n&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index,e+="\n"):e+=n;else if(n=this.source[this.index++],Te.isLineTerminator(n.charCodeAt(0)))++this.lineNumber,"\r"===n&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;else switch(n){case"n":e+="\n";break;case"r":e+="\r";break;case"t":e+="\t";break;case"u":if("{"===this.source[this.index])++this.index,e+=this.scanUnicodeCodePointEscape();else{const t=this.index,r=this.scanHexEscape(n);null!==r?e+=r:(this.index=t,e+=n)}break;case"x":{const t=this.scanHexEscape(n);null===t&&this.throwUnexpectedToken(fe.InvalidHexEscapeSequence),e+=t;break}case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:"0"===n?(Te.isDecimalDigit(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(fe.TemplateOctalLiteral),e+="\0"):Te.isOctalDigit(n.charCodeAt(0))?this.throwUnexpectedToken(fe.TemplateOctalLiteral):e+=n}else{if("{"===this.source[this.index]){this.curlyStack.push("${"),++this.index,t=!0;break}e+=n}}return t||this.throwUnexpectedToken(),r||this.curlyStack.pop(),{type:de.Template,value:this.source.slice(n+1,this.index-a),cooked:e,head:r,tail:i,lineNumber:this.lineNumber,lineStart:this.lineStart,start:n,end:this.index}}lex(){if(this.eof())return{type:de.EOF,value:"",lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index};const e=this.source.charCodeAt(this.index);return Te.isIdentifierStart(e)?this.scanIdentifier():40===e||41===e||59===e?this.scanPunctuator():39===e||34===e?this.scanStringLiteral():46===e?Te.isDecimalDigit(this.source.charCodeAt(this.index+1))?this.scanNumericLiteral():this.scanPunctuator():Te.isDecimalDigit(e)?this.scanNumericLiteral():96===e||125===e&&"${"===this.curlyStack[this.curlyStack.length-1]?this.scanTemplate():e>=55296&&e<57343&&Te.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()}}var Me,Ne,Be;function Le(e,t=0){let n=e.start-e.lineStart,r=e.lineNumber;return n<0&&(n+=t,r--),{index:e.start,line:r,column:n}}function He(e){return[{index:e.range[0],...e.loc.start},{index:e.range[1],...e.loc.end}]}function Ve(e){return ce[e]??0}(Be=Me||(Me={}))[Be.None=0]="None",Be[Be.Function=1]="Function",Be[Be.IfClause=2]="IfClause",Be[Be.ForLoop=4]="ForLoop",Be[Be.WhileLoop=8]="WhileLoop",function(e){e[e.AsObject=0]="AsObject",e[e.Automatic=1]="Automatic"}(Ne||(Ne={}));class Ze{constructor(e,t={},n){this.delegate=n,this.hasLineTerminator=!1,this.options={tokens:"boolean"==typeof t.tokens&&t.tokens,comments:"boolean"==typeof t.comments&&t.comments,tolerant:"boolean"==typeof t.tolerant&&t.tolerant},this.options.comments&&(this.commentHandler=new Ae),this.errorHandler=new Ee(this.options.tolerant),this.scanner=new _e(e,this.errorHandler),this.context={isAssignmentTarget:!1,blockContext:Me.None,curlyParsingType:Ne.AsObject},this.rawToken={type:de.EOF,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.endMarker={index:0,line:this.scanner.lineNumber,column:0},this.readNextRawToken(),this.endMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}throwIfInvalidType(e,t,{validTypes:n,invalidTypes:r}){n?.some((t=>e.type===t))||r?.some((t=>e.type===t))&&this.throwError(fe.InvalidExpression,t)}throwError(e,t,n=this.endMarker){const{index:r,line:i,column:a}=t,s=n.index-r-1;this.errorHandler.throwError({code:e,index:r,line:i,column:a+1,len:s})}tolerateError(e,t){throw new Error("######################################### !!!")}unexpectedTokenError(e={}){const{rawToken:t}=e;let n,{code:r,data:i}=e;if(t){if(!r)switch(t.type){case de.EOF:r=fe.UnexpectedEndOfScript;break;case de.Identifier:r=fe.UnexpectedIdentifier;break;case de.NumericLiteral:r=fe.UnexpectedNumber;break;case de.StringLiteral:r=fe.UnexpectedString;break;case de.Template:r=fe.UnexpectedTemplate}n=t.value.toString()}else n="ILLEGAL";r=r??fe.UnexpectedToken,i||(i={value:n});const a=Ce(r,i);if(t){const e=t.start,n=t.lineNumber,s=t.start-t.lineStart+1;return new pe({code:r,index:e,line:n,column:s,len:t.end-t.start-1,data:i,description:a})}const{index:s,line:o}=this.endMarker;return new pe({code:r,index:s,line:o,column:this.endMarker.column+1,data:i,description:a})}throwUnexpectedToken(e={}){throw e.rawToken=e.rawToken??this.rawToken,this.unexpectedTokenError(e)}collectComments(e){const{commentHandler:t}=this;t&&e.length&&e.forEach((e=>{const n={type:e.multiLine?re.BlockComment:re.LineComment,value:this.getSourceValue(e),range:e.range,loc:e.loc};t.collectComment(n)}))}peekAhead(e){const t=this.scanner.saveState(),n=e.call(this,(()=>(this.scanner.scanComments(),this.scanner.lex())));return this.scanner.restoreState(t),n}getSourceValue(e){return this.scanner.source.slice(e.start,e.end)}convertToToken(e){return{type:he[e.type],value:this.getSourceValue(e),range:[e.start,e.end],loc:{start:{line:this.startMarker.line,column:this.startMarker.column},end:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}}}readNextRawToken(){this.endMarker.index=this.scanner.index,this.endMarker.line=this.scanner.lineNumber,this.endMarker.column=this.scanner.index-this.scanner.lineStart;const e=this.rawToken;this.collectComments(this.scanner.scanComments()),this.scanner.index!==this.startMarker.index&&(this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart),this.rawToken=this.scanner.lex(),this.hasLineTerminator=e.lineNumber!==this.rawToken.lineNumber,this.options.tokens&&this.rawToken.type!==de.EOF&&this.tokens.push(this.convertToToken(this.rawToken))}captureStartMarker(){return{index:this.startMarker.index,line:this.startMarker.line,column:this.startMarker.column}}getItemLocation(e){return{range:[e.index,this.endMarker.index],loc:{start:{line:e.line,column:e.column},end:{line:this.endMarker.line,column:this.endMarker.column}}}}finalize(e){return(this.delegate||this.commentHandler)&&(this.commentHandler?.attachComments(e),this.delegate?.(e)),e}expectPunctuator(e){const t=this.rawToken;this.matchPunctuator(e)?this.readNextRawToken():this.throwUnexpectedToken({rawToken:t,code:fe.PunctuatorExpected,data:{value:e}})}expectKeyword(e){this.rawToken.type!==de.Keyword||this.rawToken.value.toLowerCase()!==e?this.throwUnexpectedToken({rawToken:this.rawToken}):this.readNextRawToken()}expectContextualKeyword(e){this.rawToken.type!==de.Identifier||this.rawToken.value.toLowerCase()!==e?this.throwUnexpectedToken({rawToken:this.rawToken}):this.readNextRawToken()}matchKeyword(e){return this.rawToken.type===de.Keyword&&this.rawToken.value.toLowerCase()===e}matchContextualKeyword(e){return this.rawToken.type===de.Identifier&&this.rawToken.value===e}matchPunctuator(e){return this.rawToken.type===de.Punctuator&&this.rawToken.value===e}getMatchingPunctuator(e){if("string"==typeof e&&(e=e.split("")),this.rawToken.type===de.Punctuator&&e?.length)return e.find(this.matchPunctuator,this)}isolateCoverGrammar(e){const t=this.context.isAssignmentTarget;this.context.isAssignmentTarget=!0;const n=e.call(this);return this.context.isAssignmentTarget=t,n}inheritCoverGrammar(e){const t=this.context.isAssignmentTarget;this.context.isAssignmentTarget=!0;const n=e.call(this);return this.context.isAssignmentTarget=this.context.isAssignmentTarget&&t,n}withBlockContext(e,t){const n=this.context.blockContext;this.context.blockContext=this.context.blockContext|e;const r=this.context.curlyParsingType;this.context.curlyParsingType=Ne.Automatic;const i=t.call(this);return this.context.blockContext=n,this.context.curlyParsingType=r,i}consumeSemicolon(){if(this.matchPunctuator(";"))this.readNextRawToken();else if(!this.hasLineTerminator)return this.rawToken.type===de.EOF||this.matchPunctuator("}")?(this.endMarker.index=this.startMarker.index,this.endMarker.line=this.startMarker.line,void(this.endMarker.column=this.startMarker.column)):void this.throwUnexpectedToken({rawToken:this.rawToken})}parsePrimaryExpression(){const e=this.captureStartMarker(),t=this.rawToken;switch(t.type){case de.Identifier:return this.readNextRawToken(),this.finalize({type:re.Identifier,name:t.value,...this.getItemLocation(e)});case de.NumericLiteral:case de.StringLiteral:return this.context.isAssignmentTarget=!1,this.readNextRawToken(),this.finalize({type:re.Literal,value:t.value,raw:this.getSourceValue(t),isString:"string"==typeof t.value,...this.getItemLocation(e)});case de.BooleanLiteral:return this.context.isAssignmentTarget=!1,this.readNextRawToken(),this.finalize({type:re.Literal,value:t.value.toLowerCase()===ne.True,raw:this.getSourceValue(t),isString:!1,...this.getItemLocation(e)});case de.NullLiteral:return this.context.isAssignmentTarget=!1,this.readNextRawToken(),this.finalize({type:re.Literal,value:null,raw:this.getSourceValue(t),isString:!1,...this.getItemLocation(e)});case de.Template:return this.parseTemplateLiteral();case de.Punctuator:switch(t.value){case"(":return this.inheritCoverGrammar(this.parseGroupExpression);case"[":return this.inheritCoverGrammar(this.parseArrayInitializer);case"{":return this.inheritCoverGrammar(this.parseObjectExpression);default:return this.throwUnexpectedToken({rawToken:this.rawToken})}case de.Keyword:return this.context.isAssignmentTarget=!1,this.throwUnexpectedToken({rawToken:this.rawToken});default:return this.throwUnexpectedToken({rawToken:this.rawToken})}}parseArrayInitializer(){const e=this.captureStartMarker();this.expectPunctuator("[");const t=[];for(;!this.matchPunctuator("]");){const e=this.captureStartMarker();this.matchPunctuator(",")?(this.readNextRawToken(),this.throwError(fe.InvalidExpression,e)):(t.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.matchPunctuator("]")||this.expectPunctuator(","))}return this.expectPunctuator("]"),this.finalize({type:re.ArrayExpression,elements:t,...this.getItemLocation(e)})}parseObjectPropertyKey(){const e=this.captureStartMarker(),t=this.rawToken;switch(t.type){case de.StringLiteral:return this.readNextRawToken(),this.finalize({type:re.Literal,value:t.value,raw:this.getSourceValue(t),isString:!0,...this.getItemLocation(e)});case de.Identifier:case de.BooleanLiteral:case de.NullLiteral:case de.Keyword:return this.readNextRawToken(),this.finalize({type:re.Identifier,name:t.value,...this.getItemLocation(e)});default:this.throwError(fe.KeyMustBeString,e)}}parseObjectProperty(){const e=this.rawToken,t=this.captureStartMarker(),n=this.parseObjectPropertyKey();let r=!1,i=null;return this.matchPunctuator(":")?(this.readNextRawToken(),i=this.inheritCoverGrammar(this.parseAssignmentExpression)):e.type===de.Identifier?(r=!0,i=this.finalize({type:re.Identifier,name:e.value,...this.getItemLocation(t)})):this.throwUnexpectedToken({rawToken:this.rawToken}),this.finalize({type:re.Property,kind:"init",key:n,value:i,shorthand:r,...this.getItemLocation(t)})}parseObjectExpression(){const e=this.captureStartMarker();this.expectPunctuator("{");const t=[];for(;!this.matchPunctuator("}");)t.push(this.parseObjectProperty()),this.matchPunctuator("}")||this.expectPunctuator(",");return this.expectPunctuator("}"),this.finalize({type:re.ObjectExpression,properties:t,...this.getItemLocation(e)})}parseTemplateElement(e=!1){const t=this.rawToken;t.type!==de.Template&&this.throwUnexpectedToken({rawToken:t}),e&&!t.head&&this.throwUnexpectedToken({code:fe.InvalidTemplateHead,rawToken:t});const n=this.captureStartMarker();this.readNextRawToken();const{value:r,cooked:i,tail:a}=t,s=this.finalize({type:re.TemplateElement,value:{raw:r,cooked:i},tail:a,...this.getItemLocation(n)});return s.loc.start.column++,s.loc.end.column=s.loc.end.column-(a?1:2),s}parseTemplateLiteral(){const e=this.captureStartMarker(),t=[],n=[];let r=this.parseTemplateElement(!0);for(n.push(r);!r.tail;)t.push(this.parseExpression()),r=this.parseTemplateElement(),n.push(r);return this.finalize({type:re.TemplateLiteral,quasis:n,expressions:t,...this.getItemLocation(e)})}parseGroupExpression(){this.expectPunctuator("(");const e=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.expectPunctuator(")"),e}parseArguments(){this.expectPunctuator("(");const e=[];if(!this.matchPunctuator(")"))for(;;){const t=this.isolateCoverGrammar(this.parseAssignmentExpression);if(e.push(t),this.matchPunctuator(")"))break;if(this.expectPunctuator(","),this.matchPunctuator(")"))break}return this.expectPunctuator(")"),e}parseMemberName(){const e=this.rawToken,t=this.captureStartMarker();return this.readNextRawToken(),e.type!==de.NullLiteral&&e.type!==de.Identifier&&e.type!==de.Keyword&&e.type!==de.BooleanLiteral&&this.throwUnexpectedToken({rawToken:e}),this.finalize({type:re.Identifier,name:e.value,...this.getItemLocation(t)})}parseLeftHandSideExpression(){const e=this.captureStartMarker();let t=this.inheritCoverGrammar(this.parsePrimaryExpression);const n=this.captureStartMarker();let r;for(;r=this.getMatchingPunctuator("([.");)switch(r){case"(":{this.context.isAssignmentTarget=!1,t.type!==re.Identifier&&t.type!==re.MemberExpression&&this.throwError(fe.IdentiferExpected,e,n);const r=this.parseArguments();t=this.finalize({type:re.CallExpression,callee:t,arguments:r,...this.getItemLocation(e)});continue}case"[":{this.context.isAssignmentTarget=!0,this.expectPunctuator("[");const n=this.isolateCoverGrammar(this.parseExpression);this.expectPunctuator("]"),t=this.finalize({type:re.MemberExpression,computed:!0,object:t,property:n,...this.getItemLocation(e)});continue}case".":{this.context.isAssignmentTarget=!0,this.expectPunctuator(".");const n=this.parseMemberName();t=this.finalize({type:re.MemberExpression,computed:!1,object:t,property:n,...this.getItemLocation(e)});continue}}return t}parseUpdateExpression(){const e=this.captureStartMarker();let t=this.getMatchingPunctuator(se);if(t){this.readNextRawToken();const n=this.captureStartMarker(),r=this.inheritCoverGrammar(this.parseUnaryExpression);return r.type!==re.Identifier&&r.type!==re.MemberExpression&&r.type!==re.CallExpression&&this.throwError(fe.InvalidExpression,n),this.context.isAssignmentTarget||this.tolerateError(fe.InvalidLeftHandSideInAssignment,e),this.context.isAssignmentTarget=!1,this.finalize({type:re.UpdateExpression,operator:t,argument:r,prefix:!0,...this.getItemLocation(e)})}const n=this.captureStartMarker(),r=this.inheritCoverGrammar(this.parseLeftHandSideExpression),i=this.captureStartMarker();return this.hasLineTerminator?r:(t=this.getMatchingPunctuator(se),t?(r.type!==re.Identifier&&r.type!==re.MemberExpression&&this.throwError(fe.InvalidExpression,n,i),this.context.isAssignmentTarget||this.tolerateError(fe.InvalidLeftHandSideInAssignment,e),this.readNextRawToken(),this.context.isAssignmentTarget=!1,this.finalize({type:re.UpdateExpression,operator:t,argument:r,prefix:!1,...this.getItemLocation(e)})):r)}parseUnaryExpression(){const e=this.getMatchingPunctuator(oe);if(e){const t=this.captureStartMarker();this.readNextRawToken();const n=this.inheritCoverGrammar(this.parseUnaryExpression);return this.context.isAssignmentTarget=!1,this.finalize({type:re.UnaryExpression,operator:e,argument:n,prefix:!0,...this.getItemLocation(t)})}return this.parseUpdateExpression()}parseBinaryExpression(){const e=this.rawToken;let t=this.inheritCoverGrammar(this.parseUnaryExpression);if(this.rawToken.type!==de.Punctuator)return t;const n=this.rawToken.value;let r=Ve(n);if(0===r)return t;this.readNextRawToken(),this.context.isAssignmentTarget=!1;const i=[e,this.rawToken];let a=t,s=this.inheritCoverGrammar(this.parseUnaryExpression);const o=[a,n,s],u=[r];for(;this.rawToken.type===de.Punctuator&&(r=Ve(this.rawToken.value))>0;){for(;o.length>2&&r<=u[u.length-1];){s=o.pop();const e=o.pop();u.pop(),a=o.pop(),i.pop();const t=i[i.length-1],n=Le(t,t.lineStart);o.push(this.finalize(this.createBinaryOrLogicalExpression(n,e,a,s)))}o.push(this.rawToken.value),u.push(r),i.push(this.rawToken),this.readNextRawToken(),o.push(this.inheritCoverGrammar(this.parseUnaryExpression))}let l=o.length-1;t=o[l];let c=i.pop();for(;l>1;){const e=i.pop();if(!e)break;const n=c?.lineStart,r=Le(e,n),a=o[l-1];t=this.finalize(this.createBinaryOrLogicalExpression(r,a,o[l-2],t)),l-=2,c=e}return t}createBinaryOrLogicalExpression(e,t,n,r){const i=le.includes(t)?re.LogicalExpression:re.BinaryExpression;return i===re.BinaryExpression||(n.type!==re.AssignmentExpression&&n.type!==re.UpdateExpression||this.throwError(fe.InvalidExpression,...He(n)),r.type!==re.AssignmentExpression&&r.type!==re.UpdateExpression||this.throwError(fe.InvalidExpression,...He(n))),{type:i,operator:t,left:n,right:r,...this.getItemLocation(e)}}parseAssignmentExpression(){const e=this.captureStartMarker(),t=this.inheritCoverGrammar(this.parseBinaryExpression),n=this.captureStartMarker(),r=this.getMatchingPunctuator(ue);if(!r)return t;t.type!==re.Identifier&&t.type!==re.MemberExpression&&this.throwError(fe.InvalidExpression,e,n),this.context.isAssignmentTarget||this.tolerateError(fe.InvalidLeftHandSideInAssignment,e),this.matchPunctuator("=")||(this.context.isAssignmentTarget=!1),this.readNextRawToken();const i=this.isolateCoverGrammar(this.parseAssignmentExpression);return this.finalize({type:re.AssignmentExpression,left:t,operator:r,right:i,...this.getItemLocation(e)})}parseExpression(){return this.isolateCoverGrammar(this.parseAssignmentExpression)}parseStatements(e){const t=[];for(;this.rawToken.type!==de.EOF&&!this.matchPunctuator(e);){const e=this.parseStatementListItem();ye(e)||t.push(e)}return t}parseStatementListItem(){return this.context.isAssignmentTarget=!0,this.matchKeyword(ne.Function)?this.parseFunctionDeclaration():this.matchKeyword(ne.Export)?this.parseExportDeclaration():this.matchKeyword(ne.Import)?this.parseImportDeclaration():this.parseStatement()}parseBlock(){const e=this.captureStartMarker();this.expectPunctuator("{");const t=this.parseStatements("}");return this.expectPunctuator("}"),this.finalize({type:re.BlockStatement,body:t,...this.getItemLocation(e)})}parseObjectStatement(){const e=this.captureStartMarker(),t=this.parseObjectExpression();return this.finalize({type:re.ExpressionStatement,expression:t,...this.getItemLocation(e)})}parseBlockOrObjectStatement(){return this.context.curlyParsingType===Ne.AsObject||this.peekAhead((e=>{let t=e();return(t.type===de.Identifier||t.type===de.StringLiteral)&&(t=e(),t.type===de.Punctuator&&":"===t.value)}))?this.parseObjectStatement():this.parseBlock()}parseIdentifier(){const e=this.rawToken;if(e.type!==de.Identifier)return null;const t=this.captureStartMarker();return this.readNextRawToken(),this.finalize({type:re.Identifier,name:e.value,...this.getItemLocation(t)})}parseVariableDeclarator(){const e=this.captureStartMarker(),t=this.parseIdentifier();t||this.throwUnexpectedToken({code:fe.IdentiferExpected});let n=null;if(this.matchPunctuator("=")){this.readNextRawToken();const e=this.rawToken;try{n=this.isolateCoverGrammar(this.parseAssignmentExpression)}catch(t){this.throwUnexpectedToken({rawToken:e,code:fe.InvalidVariableAssignment})}}return this.finalize({type:re.VariableDeclarator,id:t,init:n,...this.getItemLocation(e)})}parseVariableDeclarationList(){const e=[this.parseVariableDeclarator()];for(;this.matchPunctuator(",");)this.readNextRawToken(),e.push(this.parseVariableDeclarator());return e}parseVariableDeclaration(){const e=this.captureStartMarker();this.expectKeyword(ne.Var);const t=this.parseVariableDeclarationList();return this.consumeSemicolon(),this.finalize({type:re.VariableDeclaration,declarations:t,kind:"var",...this.getItemLocation(e)})}parseEmptyStatement(){const e=this.captureStartMarker();return this.expectPunctuator(";"),this.finalize({type:re.EmptyStatement,...this.getItemLocation(e)})}parseExpressionStatement(){const e=this.captureStartMarker(),t=this.parseExpression();return this.consumeSemicolon(),this.finalize({type:re.ExpressionStatement,expression:t,...this.getItemLocation(e)})}parseIfClause(){return this.withBlockContext(Me.IfClause,this.parseStatement)}parseIfStatement(){const e=this.captureStartMarker();this.expectKeyword(ne.If),this.expectPunctuator("(");const t=this.captureStartMarker(),n=this.parseExpression(),r=this.captureStartMarker();this.expectPunctuator(")"),n.type!==re.AssignmentExpression&&n.type!==re.UpdateExpression||this.throwError(fe.InvalidExpression,t,r);const i=this.parseIfClause();let a=null;return this.matchKeyword(ne.Else)&&(this.readNextRawToken(),a=this.parseIfClause()),this.finalize({type:re.IfStatement,test:n,consequent:i,alternate:a,...this.getItemLocation(e)})}parseWhileStatement(){const e=this.captureStartMarker();this.expectKeyword(ne.While),this.expectPunctuator("(");const t=this.captureStartMarker(),n=this.parseExpression(),r=this.captureStartMarker();this.expectPunctuator(")"),n.type!==re.AssignmentExpression&&n.type!==re.UpdateExpression||this.throwError(fe.InvalidExpression,t,r);const i=this.withBlockContext(Me.WhileLoop,this.parseStatement);return this.finalize({type:re.WhileStatement,test:n,body:i,...this.getItemLocation(e)})}parseForStatement(){let e=null,t=null,n=null,r=null,i=null;const a=this.captureStartMarker();if(this.expectKeyword(ne.For),this.expectPunctuator("("),this.matchPunctuator(";"))this.readNextRawToken();else if(this.matchKeyword(ne.Var)){const t=this.captureStartMarker();this.readNextRawToken();const n=this.parseVariableDeclarationList();1===n.length&&this.matchKeyword(ne.In)?(n[0].init&&this.throwError(fe.ForInOfLoopInitializer,t),r=this.finalize({type:re.VariableDeclaration,declarations:n,kind:"var",...this.getItemLocation(t)}),this.readNextRawToken(),i=this.parseExpression()):(this.matchKeyword(ne.In)&&this.throwError(fe.InvalidLeftHandSideInForIn,t),e=this.finalize({type:re.VariableDeclaration,declarations:n,kind:"var",...this.getItemLocation(t)}),this.expectPunctuator(";"))}else{const t=this.context.isAssignmentTarget,n=this.captureStartMarker();e=this.inheritCoverGrammar(this.parseAssignmentExpression),this.matchKeyword(ne.In)?(this.context.isAssignmentTarget||this.tolerateError(fe.InvalidLeftHandSideInForIn,n),e.type!==re.Identifier&&this.throwError(fe.InvalidLeftHandSideInForIn,n),this.readNextRawToken(),r=e,i=this.parseExpression(),e=null):(this.context.isAssignmentTarget=t,this.expectPunctuator(";"))}r||(this.matchPunctuator(";")||(t=this.isolateCoverGrammar(this.parseExpression)),this.expectPunctuator(";"),this.matchPunctuator(")")||(n=this.isolateCoverGrammar(this.parseExpression))),this.expectPunctuator(")");const s=this.withBlockContext(Me.ForLoop,(()=>this.isolateCoverGrammar(this.parseStatement)));return r&&i?this.finalize({type:re.ForInStatement,left:r,right:i,body:s,...this.getItemLocation(a)}):this.finalize({type:re.ForStatement,init:e,test:t,update:n,body:s,...this.getItemLocation(a)})}parseContinueStatement(){const e=this.captureStartMarker();return this.expectKeyword(ne.Continue),this.consumeSemicolon(),this.finalize({type:re.ContinueStatement,...this.getItemLocation(e)})}parseBreakStatement(){const e=this.captureStartMarker();return this.expectKeyword(ne.Break),this.consumeSemicolon(),this.finalize({type:re.BreakStatement,...this.getItemLocation(e)})}parseReturnStatement(){const e=this.captureStartMarker();this.expectKeyword(ne.Return);const t=(this.matchPunctuator(";")||this.matchPunctuator("}")||this.hasLineTerminator||this.rawToken.type===de.EOF)&&this.rawToken.type!==de.StringLiteral&&this.rawToken.type!==de.Template?null:this.parseExpression();return this.consumeSemicolon(),this.finalize({type:re.ReturnStatement,argument:t,...this.getItemLocation(e)})}parseStatement(){switch(this.rawToken.type){case de.BooleanLiteral:case de.NullLiteral:case de.NumericLiteral:case de.StringLiteral:case de.Template:case de.Identifier:return this.parseExpressionStatement();case de.Punctuator:return"{"===this.rawToken.value?this.parseBlockOrObjectStatement():"("===this.rawToken.value?this.parseExpressionStatement():";"===this.rawToken.value?this.parseEmptyStatement():this.parseExpressionStatement();case de.Keyword:switch(this.rawToken.value.toLowerCase()){case ne.Break:return this.parseBreakStatement();case ne.Continue:return this.parseContinueStatement();case ne.For:return this.parseForStatement();case ne.Function:return this.parseFunctionDeclaration();case ne.If:return this.parseIfStatement();case ne.Return:return this.parseReturnStatement();case ne.Var:return this.parseVariableDeclaration();case ne.While:return this.parseWhileStatement();default:return this.parseExpressionStatement()}default:return this.throwUnexpectedToken({rawToken:this.rawToken})}}parseFormalParameters(){const e=[];if(this.expectPunctuator("("),!this.matchPunctuator(")"))for(;this.rawToken.type!==de.EOF;){const t=this.parseIdentifier();if(t||this.throwUnexpectedToken({rawToken:this.rawToken,code:fe.IdentiferExpected}),e.push(t),this.matchPunctuator(")"))break;if(this.expectPunctuator(","),this.matchPunctuator(")"))break}return this.expectPunctuator(")"),e}parseFunctionDeclaration(){(this.context.blockContext&Me.Function)===Me.Function&&this.throwUnexpectedToken({code:fe.NoFunctionInsideFunction}),(this.context.blockContext&Me.WhileLoop)!==Me.WhileLoop&&(this.context.blockContext&Me.IfClause)!==Me.IfClause||this.throwUnexpectedToken({code:fe.NoFunctionInsideBlock});const e=this.captureStartMarker();this.expectKeyword(ne.Function);const t=this.parseIdentifier();t||this.throwUnexpectedToken({code:fe.InvalidFunctionIdentifier});const n=this.parseFormalParameters(),r=this.context.blockContext;this.context.blockContext=this.context.blockContext|Me.Function;const i=this.parseBlock();return this.context.blockContext=r,this.finalize({type:re.FunctionDeclaration,id:t,params:n,body:i,...this.getItemLocation(e)})}parseScript(){const e=this.captureStartMarker(),t=this.parseStatements(),n=this.finalize({type:re.Program,body:t,...this.getItemLocation(e)});return this.options.tokens&&(n.tokens=this.tokens),this.options.tolerant&&(n.errors=this.errorHandler.errors),n}parseExportDeclaration(){this.context.blockContext!==Me.None&&this.throwUnexpectedToken({code:fe.ModuleExportRootOnly});let e=null;const t=this.captureStartMarker();return this.expectKeyword(ne.Export),this.matchKeyword(ne.Var)?e=this.parseVariableDeclaration():this.matchKeyword("function")?e=this.parseFunctionDeclaration():this.throwUnexpectedToken({code:fe.InvalidExpression}),this.finalize({type:re.ExportNamedDeclaration,declaration:e,specifiers:[],source:null,...this.getItemLocation(t)})}parseModuleSpecifier(){const e=this.captureStartMarker(),t=this.rawToken;if(t.type===de.StringLiteral)return this.readNextRawToken(),this.finalize({type:re.Literal,value:t.value,raw:this.getSourceValue(t),isString:!0,...this.getItemLocation(e)});this.throwError(fe.InvalidModuleUri,e)}parseDefaultSpecifier(){const e=this.captureStartMarker(),t=this.parseIdentifier();return t||this.throwUnexpectedToken({code:fe.IdentiferExpected}),this.finalize({type:re.ImportDefaultSpecifier,local:t,...this.getItemLocation(e)})}parseImportDeclaration(){this.context.blockContext!==Me.None&&this.throwUnexpectedToken({code:fe.ModuleImportRootOnly});const e=this.captureStartMarker();this.expectKeyword(ne.Import);const t=this.parseDefaultSpecifier();this.expectContextualKeyword(ne.From);const n=this.parseModuleSpecifier();return this.finalize({type:re.ImportDeclaration,specifiers:[t],source:n,...this.getItemLocation(e)})}}function Re(e,t=[]){const n=new Ze(e,void 0,void 0).parseScript();if(null===n.body||void 0===n.body)throw new pe({index:0,line:0,column:0,data:null,description:"",code:fe.InvalidExpression});return n.loadedModules={},(0,c.dN)(n,t),n}class Oe{constructor(e){const t=this;t._keys=[],t._values=[],t.length=0,e&&e.forEach((e=>{t.set(e[0],e[1])}))}entries(){return[].slice.call(this.keys().map(((e,t)=>[e,this._values[t]])))}keys(){return[].slice.call(this._keys)}values(){return[].slice.call(this._values)}has(e){return this._keys.includes(e)}get(e){const t=this._keys.indexOf(e);return t>-1?this._values[t]:null}deepGet(e){if(!e||!e.length)return null;const t=(e,n)=>null==e?null:n.length?t(e instanceof Oe?e.get(n[0]):e[n[0]],n.slice(1)):e;return t(this.get(e[0]),e.slice(1))}set(e,t){const n=this,r=this._keys.indexOf(e);return r>-1?n._values[r]=t:(n._keys.push(e),n._values.push(t),n.length=n._values.length),this}sortedSet(e,t,n,r){const i=this,a=this._keys.length,s=n||0,o=void 0!==r?r:a-1;if(0===a)return i._keys.push(e),i._values.push(t),i;if(e===this._keys[s])return this._values.splice(s,0,t),this;if(e===this._keys[o])return this._values.splice(o,0,t),this;if(e>this._keys[o])return this._keys.splice(o+1,0,e),this._values.splice(o+1,0,t),this;if(e<this._keys[s])return this._values.splice(s,0,t),this._keys.splice(s,0,e),this;if(s>=o)return this;const u=s+Math.floor((o-s)/2);return e<this._keys[u]?this.sortedSet(e,t,s,u-1):e>this._keys[u]?this.sortedSet(e,t,u+1,o):this}size(){return this.length}clear(){const e=this;return e._keys.length=e.length=e._values.length=0,this}delete(e){const t=this,n=t._keys.indexOf(e);return n>-1&&(t._keys.splice(n,1),t._values.splice(n,1),t.length=t._keys.length,!0)}forEach(e){this._keys.forEach(((t,n)=>{e(this._values[n],t,n)}))}map(e){return this.keys().map(((t,n)=>e(this._values[n],t,n)))}filter(e){const t=this;return t._keys.forEach(((n,r)=>{!1===e(t._values[r],n,r)&&t.delete(n)})),this}clone(){return new Oe(this.entries())}}class Pe{constructor(e=20){this._maxEntries=e,this._values=new Oe}delete(e){this._values.has(e)&&this._values.delete(e)}get(e){let t=null;return this._values.has(e)&&(t=this._values.get(e),this._values.delete(e),this._values.set(e,t)),t}put(e,t){if(this._values.size()>=this._maxEntries){const e=this._values.keys()[0];this._values.delete(e)}this._values.set(e,t)}}var Ue=n(48522);class Ge{constructor(e){this.portalUri=e}normalizeModuleUri(e){const t=/^[a-z0-9A-Z]+(@[0-9]+\.[0-9]+\.[0-9]+)?([\?|\/].*)?$/gi,n=/(?<portalurl>.+)\/home\/item\.html\?id\=(?<itemid>.+)$/gi,r=/(?<portalurl>.+)\/sharing\/rest\/content\/users\/[a-zA-Z0-9]+\/items\/(?<itemid>.+)$/gi,i=/(?<portalurl>.+)\/sharing\/rest\/content\/items\/(?<itemid>.+)$/gi,a=/(?<itemid>.*)@(?<versionstring>[0-9]+\.[0-9]+\.[0-9]+)([\?|\/].*)?$/gi;if(e.startsWith("portal+")){let o=e.substring(7),u="",l=o,c=!1;for(const e of[n,i,r]){const t=e.exec(o);if(null!==t){const e=t.groups;l=e.itemid,u=e.portalurl,c=!0;break}}if(!1===c){if(!t.test(o))throw new s.Tu(s.TD.UnsupportedUriProtocol,{uri:e});l=o,u=this.portalUri}l.includes("/")&&(l=l.split("/")[0]),l.includes("?")&&(l=l.split("?")[0]);let d="current";const h=a.exec(l);if(null!==h){const e=h.groups;l=e.itemid,d=e.versionstring}return o=new Ue.Z({url:u}).restUrl+"/content/items/"+l+"/resources/"+d+".arc",{url:o,scheme:"portal",uri:"PO:"+o}}if(e.startsWith("mock")){if("mock"===e)return{url:"",scheme:"mock",data:'\n export var hello = 1;\n export function helloWorld() {\n return "Hello World " + hello;\n }\n ',uri:"mock"};const t=e.replace("mock:","");if(void 0!==Ge.mocks[t])return{url:"",scheme:"mock",data:Ge.mocks[t],uri:e}}throw new s.Tu(s.TD.UnrecognizedUri,{uri:e})}async fetchModule(e){const t=Ge.cachedModules.getFromCache(e.uri);if(t)return t;const n=this.fetchSource(e);Ge.cachedModules.addToCache(e.uri,n);let r=null;try{r=await n}catch(t){throw Ge.cachedModules.removeFromCache(e.uri),t}return r}async fetchSource(e){if("portal"===e.scheme){const t=await(0,ae.Z)(e.url,{responseType:"text",query:{}});if(t.data)return Re(t.data,[])}if("mock"===e.scheme)return Re(e.data??"",[]);throw new s.Tu(s.TD.UnsupportedUriProtocol)}static create(e){return new Ge(e)}static getDefault(){return this._default??(Ge._default=Ge._moduleResolverFactory())}static set moduleResolverClass(e){this._moduleResolverFactory=e,this._default=null}}Ge.mocks={},Ge.cachedModules=new class{constructor(e=20){this._maxEntries=e,this._cache=new Pe(this._maxEntries)}clear(){this._cache=new Pe(this._maxEntries)}addToCache(e,t){this._cache.put(e,t)}removeFromCache(e){this._cache.delete(e)}getFromCache(e){return this._cache.get(e)}}(30),Ge._default=null,Ge._moduleResolverFactory=()=>{const e=Ue.Z.getDefault();return new Ge(e.url)};class ze extends u.Rm{constructor(e,t){super(),this.definition=null,this.context=null,this.definition=e,this.context=t}createFunction(e){return(...t)=>{const n={spatialReference:this.context.spatialReference,console:this.context.console,services:this.context.services,timeReference:this.context.timeReference??null,lrucache:this.context.lrucache,exports:this.context.exports,libraryResolver:this.context.libraryResolver,interceptor:this.context.interceptor,localScope:{},depthCounter:{depth:e.depthCounter.depth+1},globalScope:this.context.globalScope};if(n.depthCounter.depth>64)throw new s.aV(e,s.rH.MaximumCallDepth,null);return tt(this.definition,n,t,null)}}call(e,t){return qe(e,t,((n,r,i)=>{const a={spatialReference:e.spatialReference,services:e.services,globalScope:e.globalScope,depthCounter:{depth:e.depthCounter.depth+1},libraryResolver:e.libraryResolver,exports:e.exports,timeReference:e.timeReference??null,console:e.console,lrucache:e.lrucache,interceptor:e.interceptor,localScope:{}};if(a.depthCounter.depth>64)throw new s.aV(e,s.rH.MaximumCallDepth,t);return tt(this.definition,a,i,t)}))}marshalledCall(e,t,n,r){return r(e,t,((i,a,s)=>{const o={spatialReference:e.spatialReference,globalScope:n.globalScope,services:e.services,depthCounter:{depth:e.depthCounter.depth+1},libraryResolver:e.libraryResolver,exports:e.exports,console:e.console,timeReference:e.timeReference??null,lrucache:e.lrucache,interceptor:e.interceptor,localScope:{}};return s=s.map((t=>!(0,l.i)(t)||t instanceof u.Vg?t:(0,u.aq)(t,e,r))),(0,u.aq)(tt(this.definition,o,s,t),n,r)}))}}class je extends r.P{constructor(e){super(e)}global(e){const t=this.executingContext.globalScope[e.toLowerCase()];if(t.valueset||(t.value=Je(this.executingContext,t.node),t.valueset=!0),(0,l.i)(t.value)&&!(t.value instanceof u.Vg)){const e=new u.Vg;e.fn=t.value,e.parameterEvaluator=qe,e.context=this.executingContext,t.value=e}return t.value}setGlobal(e,t){if((0,l.i)(t))throw new s.aV(null,s.rH.AssignModuleFunction,null);this.executingContext.globalScope[e.toLowerCase()]={value:t,valueset:!0,node:null}}hasGlobal(e){return void 0===this.executingContext.exports[e]&&(e=e.toLowerCase()),void 0!==this.executingContext.exports[e]}loadModule(e){let t=e.spatialReference;null==t&&(t=new N.Z({wkid:102100})),this.moduleScope=rt({},e.customfunctions,e.timeReference),this.executingContext={spatialReference:t,globalScope:this.moduleScope,localScope:null,libraryResolver:new i.s(e.libraryResolver._moduleSingletons,this.source.syntax.loadedModules),exports:{},services:e.services,console:e.console??it,timeReference:e.timeReference??null,lrucache:e.lrucache,interceptor:e.interceptor,depthCounter:{depth:1}},Je(this.executingContext,this.source.syntax)}}function qe(e,t,n){try{return!0===t.preparsed?n(e,null,t.arguments):n(e,t,function(e,t){const n=[];for(let r=0;r<t.arguments.length;r++)n.push(Je(e,t.arguments[r]));return n}(e,t))}catch(e){throw e}}function Je(e,t){try{switch(t?.type){case"EmptyStatement":return l.x;case"VariableDeclarator":return function(e,t){let n=null===t.init?null:Je(e,t.init);if(n===l.x&&(n=null),"Identifier"!==t.id.type)throw new s.aV(e,s.rH.InvalidIdentifier,t);const r=t.id.name.toLowerCase();return null!=e.localScope?e.localScope[r]={value:n,valueset:!0,node:t.init}:e.globalScope[r]={value:n,valueset:!0,node:t.init},l.x}(e,t);case"VariableDeclaration":return function(e,t){for(let n=0;n<t.declarations.length;n++)Je(e,t.declarations[n]);return l.x}(e,t);case"ImportDeclaration":return function(e,t){const n=t.specifiers[0].local.name.toLowerCase(),r=e.libraryResolver.loadLibrary(n);let i=null;return e.libraryResolver._moduleSingletons?.has(r.uri)?i=e.libraryResolver._moduleSingletons.get(r.uri):(i=new je(r),i.loadModule(e),e.libraryResolver._moduleSingletons?.set(r.uri,i)),e.globalScope[n]={value:i,valueset:!0,node:t},l.x}(e,t);case"ExportNamedDeclaration":return function(e,t){if(Je(e,t.declaration),"FunctionDeclaration"===t.declaration.type)e.exports[t.declaration.id.name.toLowerCase()]="function";else if("VariableDeclaration"===t.declaration.type)for(const n of t.declaration.declarations)e.exports[n.id.name.toLowerCase()]="variable";return l.x}(e,t);case"BlockStatement":case"Program":return function(e,t){let n=l.x;for(let r=0;r<t.body.length;r++)if(n=Je(e,t.body[r]),n instanceof l.R||n===l.y||n===l.z)return n;return n}(e,t);case"FunctionDeclaration":return function(e,t){const n=t.id.name.toLowerCase();return e.globalScope[n]={valueset:!0,node:null,value:new ze(t,e)},l.x}(e,t);case"ReturnStatement":return function(e,t){if(null===t.argument)return new l.R(l.x);const n=Je(e,t.argument);return new l.R(n)}(e,t);case"IfStatement":return function(e,t){const n=Je(e,t.test);if(!0===n)return Je(e,t.consequent);if(!1===n)return null!==t.alternate?Je(e,t.alternate):l.x;throw new s.aV(e,s.rH.BooleanConditionRequired,t)}(e,t);case"ExpressionStatement":return function(e,t){if("AssignmentExpression"===t.expression.type||"UpdateExpression"===t.expression.type)return Je(e,t.expression);if("CallExpression"===t.expression.type){const n=Je(e,t.expression);return n===l.x?l.x:new l.I(n)}{const n=Je(e,t.expression);return n===l.x?l.x:new l.I(n)}}(e,t);case"AssignmentExpression":return function(e,t){let n=null,r="";if("MemberExpression"===t.left.type){if(n=Je(e,t.left.object),!0===t.left.computed)r=Je(e,t.left.property);else{if("Identifier"!==t.left.property.type)throw new s.aV(e,s.rH.InvalidIdentifier,t);r=t.left.property.name}const i=Je(e,t.right);if((0,l.o)(n)){if(!(0,l.b)(r))throw new s.aV(e,s.rH.ArrayAccessorMustBeNumber,t);if(r<0&&(r=n.length+r),r<0||r>n.length)throw new s.aV(e,s.rH.OutOfBounds,t);if(r===n.length){if("="!==t.operator)throw new s.aV(e,s.rH.OutOfBounds,t);n[r]=Ke(i,t.operator,n[r],t,e)}else n[r]=Ke(i,t.operator,n[r],t,e)}else if(n instanceof a.Z){if(!1===(0,l.c)(r))throw new s.aV(e,s.rH.KeyAccessorMustBeString,t);if(!0===n.hasField(r))n.setField(r,Ke(i,t.operator,n.field(r),t,e));else{if("="!==t.operator)throw new s.aV(e,s.rH.FieldNotFound,t,{key:r});n.setField(r,Ke(i,t.operator,null,t,e))}}else if((0,l.r)(n)){if(!1===(0,l.c)(r))throw new s.aV(e,s.rH.KeyAccessorMustBeString,t);if(!0===n.hasField(r))n.setField(r,Ke(i,t.operator,n.field(r),t,e));else{if("="!==t.operator)throw new s.aV(e,s.rH.FieldNotFound,t,{key:r});n.setField(r,Ke(i,t.operator,null,t,e))}}else{if((0,l.q)(n))throw new s.aV(e,s.rH.Immutable,t);if(!(n instanceof je))throw new s.aV(e,s.rH.InvalidIdentifier,t);if(!1===(0,l.c)(r))throw new s.aV(e,s.rH.ModuleAccessorMustBeString,t);if(!0!==n.hasGlobal(r))throw new s.aV(e,s.rH.ModuleExportNotFound,t);n.setGlobal(r,Ke(i,t.operator,n.global(r),t,e))}return l.x}n=t.left.name.toLowerCase();const i=Je(e,t.right);if(null!=e.localScope&&void 0!==e.localScope[n])return e.localScope[n]={value:Ke(i,t.operator,e.localScope[n].value,t,e),valueset:!0,node:t.right},l.x;if(void 0!==e.globalScope[n])return e.globalScope[n]={value:Ke(i,t.operator,e.globalScope[n].value,t,e),valueset:!0,node:t.right},l.x;throw new s.aV(e,s.rH.InvalidIdentifier,t)}(e,t);case"UpdateExpression":return function(e,t){let n,r=null,i="";if("MemberExpression"===t.argument.type){if(r=Je(e,t.argument.object),!0===t.argument.computed?i=Je(e,t.argument.property):"Identifier"===t.argument.property.type&&(i=t.argument.property.name),(0,l.o)(r)){if(!(0,l.b)(i))throw new s.aV(e,s.rH.ArrayAccessorMustBeNumber,t);if(i<0&&(i=r.length+i),i<0||i>=r.length)throw new s.aV(e,s.rH.OutOfBounds,t);n=(0,l.g)(r[i]),r[i]="++"===t.operator?n+1:n-1}else if(r instanceof a.Z){if(!1===(0,l.c)(i))throw new s.aV(e,s.rH.KeyAccessorMustBeString,t);if(!0!==r.hasField(i))throw new s.aV(e,s.rH.FieldNotFound,t);n=(0,l.g)(r.field(i)),r.setField(i,"++"===t.operator?n+1:n-1)}else if((0,l.r)(r)){if(!1===(0,l.c)(i))throw new s.aV(e,s.rH.KeyAccessorMustBeString,t);if(!0!==r.hasField(i))throw new s.aV(e,s.rH.FieldNotFound,t);n=(0,l.g)(r.field(i)),r.setField(i,"++"===t.operator?n+1:n-1)}else{if((0,l.q)(r))throw new s.aV(e,s.rH.Immutable,t);if(!(r instanceof je))throw new s.aV(e,s.rH.InvalidParameter,t);if(!1===(0,l.c)(i))throw new s.aV(e,s.rH.ModuleAccessorMustBeString,t);if(!0!==r.hasGlobal(i))throw new s.aV(e,s.rH.ModuleExportNotFound,t);n=(0,l.g)(r.global(i)),r.setGlobal(i,"++"===t.operator?n+1:n-1)}return!1===t.prefix?n:"++"===t.operator?n+1:n-1}if(r="Identifier"===t.argument.type?t.argument.name.toLowerCase():"",!r)throw new s.aV(e,s.rH.InvalidIdentifier,t);if(null!=e.localScope&&void 0!==e.localScope[r])return n=(0,l.g)(e.localScope[r].value),e.localScope[r]={value:"++"===t.operator?n+1:n-1,valueset:!0,node:t},!1===t.prefix?n:"++"===t.operator?n+1:n-1;if(void 0!==e.globalScope[r])return n=(0,l.g)(e.globalScope[r].value),e.globalScope[r]={value:"++"===t.operator?n+1:n-1,valueset:!0,node:t},!1===t.prefix?n:"++"===t.operator?n+1:n-1;throw new s.aV(e,s.rH.InvalidIdentifier,t)}(e,t);case"BreakStatement":return l.y;case"ContinueStatement":return l.z;case"TemplateElement":return function(e,t){return t.value?t.value.cooked:""}(0,t);case"TemplateLiteral":return function(e,t){let n="",r=0;for(const i of t.quasis)n+=i.value?i.value.cooked:"",!1===i.tail&&(n+=t.expressions[r]?(0,l.j)($e(Je(e,t.expressions[r]),e,t)):"",r++);return n}(e,t);case"ForStatement":return function(e,t){null!==t.init&&Je(e,t.init);const n={testResult:!0,lastAction:l.x};do{We(e,t,n)}while(!0===n.testResult);return n.lastAction instanceof l.R?n.lastAction:l.x}(e,t);case"ForInStatement":return function(e,t){const n=Je(e,t.right);"VariableDeclaration"===t.left.type&&Je(e,t.left);let r=null,i="";if("VariableDeclaration"===t.left.type){const e=t.left.declarations[0].id;"Identifier"===e.type&&(i=e.name)}else"Identifier"===t.left.type&&(i=t.left.name);if(!i)throw new s.aV(e,s.rH.InvalidIdentifier,t);if(i=i.toLowerCase(),null!=e.localScope&&void 0!==e.localScope[i]&&(r=e.localScope[i]),null===r&&void 0!==e.globalScope[i]&&(r=e.globalScope[i]),null===r)throw new s.aV(e,s.rH.InvalidIdentifier,t);if((0,l.o)(n)||(0,l.c)(n)){const i=n.length;for(let n=0;n<i;n++){r.value=n;const i=Je(e,t.body);if(i===l.y)break;if(i instanceof l.R)return i}return l.x}if((0,l.q)(n)){for(let i=0;i<n.length();i++){r.value=i;const n=Je(e,t.body);if(n===l.y)break;if(n instanceof l.R)return n}return l.x}if(!(n instanceof a.Z||(0,l.r)(n)))return l.x;{const i=n.keys();for(let n=0;n<i.length;n++){r.value=i[n];const a=Je(e,t.body);if(a===l.y)break;if(a instanceof l.R)return a}}}(e,t);case"WhileStatement":return function(e,t){const n={testResult:!0,lastAction:l.x};if(n.testResult=Je(e,t.test),!1===n.testResult)return l.x;if(!0!==n.testResult)throw new s.aV(e,s.rH.BooleanConditionRequired,t);for(;!0===n.testResult&&(n.lastAction=Je(e,t.body),n.lastAction!==l.y)&&!(n.lastAction instanceof l.R);)if(n.testResult=Je(e,t.test),!0!==n.testResult&&!1!==n.testResult)throw new s.aV(e,s.rH.BooleanConditionRequired,t);return n.lastAction instanceof l.R?n.lastAction:l.x}(e,t);case"Identifier":return Ye(e,t);case"MemberExpression":return function(e,t){try{const n=Je(e,t.object);if(null===n)throw new s.aV(e,s.rH.MemberOfNull,t);if(!1===t.computed){if("Identifier"===t.property.type){if(n instanceof a.Z||(0,l.r)(n))return n.field(t.property.name);if(n instanceof w.Z)return(0,f.Z)(n,t.property.name,t,e);if(n instanceof je){if(!n.hasGlobal(t.property.name))throw new s.aV(e,s.rH.InvalidIdentifier,t);return n.global(t.property.name)}}throw new s.aV(e,s.rH.InvalidMemberAccessKey,t)}{let r=Je(e,t.property);if(n instanceof a.Z||(0,l.r)(n)){if((0,l.c)(r))return n.field(r);throw new s.aV(e,s.rH.InvalidMemberAccessKey,t)}if(n instanceof je){if((0,l.c)(r))return n.global(r);throw new s.aV(e,s.rH.InvalidMemberAccessKey,t)}if(n instanceof w.Z){if((0,l.c)(r))return(0,f.Z)(n,r,t,e);throw new s.aV(e,s.rH.InvalidMemberAccessKey,t)}if((0,l.o)(n)){if((0,l.b)(r)&&isFinite(r)&&Math.floor(r)===r){if(r<0&&(r=n.length+r),r>=n.length||r<0)throw new s.aV(e,s.rH.OutOfBounds,t);return n[r]}throw new s.aV(e,s.rH.InvalidMemberAccessKey,t)}if((0,l.c)(n)){if((0,l.b)(r)&&isFinite(r)&&Math.floor(r)===r){if(r<0&&(r=n.length+r),r>=n.length||r<0)throw new s.aV(e,s.rH.OutOfBounds,t);return n[r]}throw new s.aV(e,s.rH.InvalidMemberAccessKey,t)}if((0,l.q)(n)){if((0,l.b)(r)&&isFinite(r)&&Math.floor(r)===r){if(r<0&&(r=n.length()+r),r>=n.length()||r<0)throw new s.aV(e,s.rH.OutOfBounds,t);return n.get(r)}throw new s.aV(e,s.rH.InvalidMemberAccessKey,t)}throw new s.aV(e,s.rH.InvalidMemberAccessKey,t)}}catch(e){throw e}}(e,t);case"Literal":return t.value;case"CallExpression":return function(e,t){try{if("MemberExpression"===t.callee.type){const n=Je(e,t.callee.object);if(!(n instanceof je))throw new s.aV(e,s.rH.FunctionNotFound,t);const r=!1===t.callee.computed?t.callee.property.name:Je(e,t.callee.property);if(!n.hasGlobal(r))throw new s.aV(e,s.rH.FunctionNotFound,t);const i=n.global(r);if(!(0,l.i)(i))throw new s.aV(e,s.rH.CallNonFunction,t);return i.call(e,t)}if("Identifier"!==t.callee.type)throw new s.aV(e,s.rH.FunctionNotFound,t);if(null!=e.localScope&&void 0!==e.localScope[t.callee.name.toLowerCase()]){const n=e.localScope[t.callee.name.toLowerCase()];if((0,l.i)(n.value))return n.value.call(e,t);throw new s.aV(e,s.rH.CallNonFunction,t)}if(void 0!==e.globalScope[t.callee.name.toLowerCase()]){const n=e.globalScope[t.callee.name.toLowerCase()];if((0,l.i)(n.value))return n.value.call(e,t);throw new s.aV(e,s.rH.CallNonFunction,t)}throw new s.aV(e,s.rH.FunctionNotFound,t)}catch(e){throw e}}(e,t);case"UnaryExpression":return function(e,t){try{const n=Je(e,t.argument);if((0,l.a)(n)){if("!"===t.operator)return!n;if("-"===t.operator)return-1*(0,l.g)(n);if("+"===t.operator)return 1*(0,l.g)(n);if("~"===t.operator)return~(0,l.g)(n);throw new s.aV(e,s.rH.UnsupportedUnaryOperator,t)}if("~"===t.operator)return~(0,l.g)(n);if("-"===t.operator)return-1*(0,l.g)(n);if("+"===t.operator)return 1*(0,l.g)(n);throw new s.aV(e,s.rH.UnsupportedUnaryOperator,t)}catch(e){throw e}}(e,t);case"BinaryExpression":return function(e,t){try{const n=[Je(e,t.left),Je(e,t.right)],r=n[0],i=n[1];switch(t.operator){case"|":case"<<":case">>":case">>>":case"^":case"&":return(0,l.D)((0,l.g)(r),(0,l.g)(i),t.operator);case"==":return(0,l.C)(r,i);case"!=":return!(0,l.C)(r,i);case"<":case">":case"<=":case">=":return(0,l.B)(r,i,t.operator);case"+":return(0,l.c)(r)||(0,l.c)(i)?(0,l.j)(r)+(0,l.j)(i):(0,l.g)(r)+(0,l.g)(i);case"-":return(0,l.g)(r)-(0,l.g)(i);case"*":return(0,l.g)(r)*(0,l.g)(i);case"/":return(0,l.g)(r)/(0,l.g)(i);case"%":return(0,l.g)(r)%(0,l.g)(i);default:throw new s.aV(e,s.rH.UnsupportedOperator,t)}}catch(e){throw e}}(e,t);case"LogicalExpression":return function(e,t){try{const n=Je(e,t.left);if((0,l.a)(n))switch(t.operator){case"||":if(!0===n)return n;{const n=Je(e,t.right);if((0,l.a)(n))return n;throw new s.aV(e,s.rH.LogicExpressionOrAnd,t)}case"&&":if(!1===n)return n;{const n=Je(e,t.right);if((0,l.a)(n))return n;throw new s.aV(e,s.rH.LogicExpressionOrAnd,t)}default:throw new s.aV(e,s.rH.LogicExpressionOrAnd,t)}throw new s.aV(e,s.rH.LogicalExpressionOnlyBoolean,t)}catch(e){throw e}}(e,t);case"ArrayExpression":return function(e,t){try{const n=[];for(let r=0;r<t.elements.length;r++){const i=Je(e,t.elements[r]);if((0,l.i)(i))throw new s.aV(e,s.rH.NoFunctionInArray,t);i===l.x?n.push(null):n.push(i)}return n}catch(e){throw e}}(e,t);case"ObjectExpression":return function(e,t){const n={},r=new Map;for(let i=0;i<t.properties.length;i++){const a=Je(e,t.properties[i]);if((0,l.i)(a.value))throw new s.aV(e,s.rH.NoFunctionInDictionary,t);if(!1===(0,l.c)(a.key))throw new s.aV(e,s.rH.KeyMustBeString,t);let o=a.key.toString();const u=o.toLowerCase();r.has(u)?o=r.get(u):r.set(u,o),a.value===l.x?n[o]=null:n[o]=a.value}const i=new a.Z(n);return i.immutable=!1,i}(e,t);case"Property":return function(e,t){return{key:"Identifier"===t.key.type?t.key.name:Je(e,t.key),value:Je(e,t.value)}}(e,t);default:throw new s.aV(e,s.rH.Unrecognized,t)}}catch(n){throw(0,s.VO)(e,t,n)}}function We(e,t,n){if(null!==t.test){if(n.testResult=Je(e,t.test),!1===n.testResult)return;if(!0!==n.testResult)throw new s.aV(e,s.rH.BooleanConditionRequired,t)}n.lastAction=Je(e,t.body),n.lastAction!==l.y?n.lastAction instanceof l.R?n.testResult=!1:null!==t.update&&Je(e,t.update):n.testResult=!1}function Ke(e,t,n,r,i){switch(t){case"=":return e===l.x?null:e;case"/=":return(0,l.g)(n)/(0,l.g)(e);case"*=":return(0,l.g)(n)*(0,l.g)(e);case"-=":return(0,l.g)(n)-(0,l.g)(e);case"+=":return(0,l.c)(n)||(0,l.c)(e)?(0,l.j)(n)+(0,l.j)(e):(0,l.g)(n)+(0,l.g)(e);case"%=":return(0,l.g)(n)%(0,l.g)(e);default:throw new s.aV(i,s.rH.UnsupportedOperator,r)}}function $e(e,t,n){if((0,l.i)(e))throw new s.aV(t,s.rH.NoFunctionInTemplateLiteral,n);return e}function Ye(e,t){let n;try{const r=t.name.toLowerCase();if(null!=e.localScope&&void 0!==e.localScope[r])return n=e.localScope[r],!0===n.valueset||(n.value=Je(e,n.node),n.valueset=!0),n.value;if(void 0!==e.globalScope[r])return n=e.globalScope[r],!0===n.valueset||(n.value=Je(e,n.node),n.valueset=!0),n.value;throw new s.aV(e,s.rH.InvalidIdentifier,t)}catch(e){throw e}}const Qe={};function Xe(e,t,n,r){try{const i=t.arguments,a=Je(e,i[n]);if((0,l.C)(a,r))return Je(e,i[n+1]);{const a=i.length-n;return 1===a?Je(e,i[n]):2===a?null:3===a?Je(e,i[n+2]):Xe(e,t,n+2,r)}}catch(e){throw e}}function et(e,t,n,r){try{const i=t.arguments;if(!0===r)return Je(e,i[n+1]);if(3==i.length-n)return Je(e,i[n+2]);{const r=Je(e,i[n+2]);if(!1===(0,l.a)(r))throw new s.aV(e,s.rH.BooleanConditionRequired,i[n+2]);return et(e,t,n+2,r)}}catch(e){throw e}}function tt(e,t,n,r){try{const i=e.body;if(n.length!==e.params.length)throw new s.aV(t,s.rH.WrongNumberOfParameters,r);if(null!=t.localScope)for(let r=0;r<n.length;r++)t.localScope[e.params[r].name.toLowerCase()]={value:n[r],valueset:!0,node:null};const a=Je(t,i);if(a instanceof l.R)return a.value;if(a===l.y)throw new s.aV(t,s.rH.UnexpectedToken,r);if(a===l.z)throw new s.aV(t,s.rH.UnexpectedToken,r);return a instanceof l.I?a.value:a}catch(e){throw e}}(0,h.r)(Qe,qe),(0,_.r)(Qe,qe),(0,k.r)(Qe,qe),(0,f.r)(Qe,qe),(0,I.r)(Qe,qe),v(Qe,qe),Qe.iif=function(e,t){try{const n=t.arguments;(0,l.E)(null===n?[]:n,3,3,e,t);const r=Je(e,n[0]);if(!1===(0,l.a)(r))throw new s.aV(e,s.rH.BooleanConditionRequired,t);return Je(e,!0===r?n[1]:n[2])}catch(e){throw e}},Qe.decode=function(e,t){try{const n=t.arguments;if(n.length<2)throw new s.aV(e,s.rH.WrongNumberOfParameters,t);if(2===n.length)return Je(e,n[1]);if((n.length-1)%2==0)throw new s.aV(e,s.rH.WrongNumberOfParameters,t);return Xe(e,t,1,Je(e,n[0]))}catch(e){throw e}},Qe.when=function(e,t){try{const n=t.arguments;if(n.length<3)throw new s.aV(e,s.rH.WrongNumberOfParameters,t);if(n.length%2==0)throw new s.aV(e,s.rH.WrongNumberOfParameters,t);const r=Je(e,n[0]);if(!1===(0,l.a)(r))throw new s.aV(e,s.rH.BooleanConditionRequired,n[0]);return et(e,t,0,r)}catch(e){throw e}};for(const e in Qe)Qe[e]={value:new u.Bx(Qe[e]),valueset:!0,node:null};const nt=function(){};function rt(e,t,n){const r=new nt;e||(e={}),t||(t={});const i=new a.Z({newline:"\n",tab:"\t",singlequote:"'",doublequote:'"',forwardslash:"/",backwardslash:"\\"});i.immutable=!1,r.textformatting={value:i,valueset:!0,node:null};for(const e in t)r[e]={value:new u.Bx(t[e]),native:!0,valueset:!0,node:null};for(const t in e)e[t]&&"esri.Graphic"===e[t].declaredClass?r[t]={value:o.Z.createFromGraphic(e[t],n),valueset:!0,node:null}:r[t]={value:e[t],valueset:!0,node:null};return r}function it(e){console.log(e)}function at(e){const t={mode:"sync",compiled:!1,functions:{},signatures:[],standardFunction:qe,evaluateIdentifier:Ye};for(let n=0;n<e.length;n++)e[n].registerFunctions(t);for(const e in t.functions)Qe[e]={value:new u.Bx(t.functions[e]),valueset:!0,node:null},nt.prototype[e]=Qe[e];for(let e=0;e<t.signatures.length;e++)(0,c.gW)(t.signatures[e],"sync")}function st(e,t){let n=t.spatialReference;null==n&&(n=new N.Z({wkid:102100}));let r=null;e.usesModules&&(r=new i.s(new Map,e.loadedModules));const a={spatialReference:n,globalScope:rt(t.vars,t.customfunctions,t.timeReference),localScope:null,services:t.services??null,exports:{},libraryResolver:r,console:t.console??it,timeReference:t.timeReference??null,lrucache:t.lrucache,interceptor:t.interceptor,depthCounter:{depth:1}};let o=Je(a,e);if(o instanceof l.R&&(o=o.value),o instanceof l.I&&(o=o.value),o===l.x&&(o=null),o===l.y)throw new s.aV(a,s.rH.IllegalResult,null);if(o===l.z)throw new s.aV(a,s.rH.IllegalResult,null);if((0,l.i)(o))throw new s.aV(a,s.rH.IllegalResult,null);return o}nt.prototype=Qe,nt.prototype.infinity={value:Number.POSITIVE_INFINITY,valueset:!0,node:null},nt.prototype.pi={value:Math.PI,valueset:!0,node:null},l.A,at([d.A]);var ot=n(80442),ut=n(70586);const lt=new Set(["feature","angle","bearing","centroid","envelopeintersects","extent","geometry","isselfintersecting","ringisclockwise"]);let ct=!1,dt=!1,ht=null,ft=[];function mt(e,t){if(!0===t.useAsync||!0===e.isAsync)return function(e,t){if(null===ht)throw new s.aV(null,s.rH.AsyncNotEnabled,null);if((0,ot.Z)("esri-csp-restrictions"))return function(t){return ht.executeScript(e,t)};try{return ee(e,t,!0)}catch(t){if("esri.arcade.arcadeuncompilableerror"===t.declaredRootClass)return function(t){return ht.executeScript(e,t)};throw t}}(e,t);if((0,ot.Z)("esri-csp-restrictions"))return function(t){return st(e,t)};try{return ee(e,t)}catch(t){if("esri.arcade.arcadeuncompilableerror"===t.declaredRootClass)return function(t){return st(e,t)};throw t}}function pt(e,t=[]){return Re(e,t)}function gt(e,t){if(!0===t.useAsync||!0===e.isAsync){if(null===ht)throw new s.aV(null,s.rH.AsyncNotEnabled,null);return ht.executeScript(e,t)}return st(e,t)}function Dt(e,t){return(0,c.bV)(e,t)}function yt(e){return(0,c.Kq)(e)}function wt(e,t=[]){return void 0===e.usesGeometry&&(0,c.dN)(e,t),!0===e.usesGeometry}let xt=null;function Ft(){return xt||(xt=At(),xt)}async function At(){const e=await Promise.all([n.e(5837),n.e(5334)]).then(n.bind(n,61433));return dt=!0,S=e,!0}let Ct=null;function Et(){return null!==Ct||(Ct=St()),Ct}async function St(){await async function(){return K([await Promise.all([n.e(6569),n.e(3694)]).then(n.bind(n,95463))],"async"),!0}(),ht=await Promise.all([n.e(6569),n.e(3694),n.e(8828)]).then(n.bind(n,18828));for(const e of ft)ht.extend(e),K(e,"async");return ft=null,!0}function bt(){return ct}function Tt(){return!!ht}function vt(){return dt}let kt=null;function It(){return kt||(kt=_t(),kt)}async function _t(){await Et();const[e,t,r,i,a]=await Promise.all([Promise.all([n.e(163),n.e(4609),n.e(9790),n.e(8775),n.e(3928),n.e(3547),n.e(6569),n.e(1423),n.e(4165),n.e(3778),n.e(6404),n.e(3615),n.e(8968),n.e(8654),n.e(9238),n.e(4599),n.e(5235),n.e(9863),n.e(8324),n.e(3608)]).then(n.bind(n,67651)),Promise.all([n.e(163),n.e(4609),n.e(9790),n.e(8775),n.e(3928),n.e(3547),n.e(6569),n.e(1423),n.e(4165),n.e(3778),n.e(6404),n.e(3615),n.e(8968),n.e(8654),n.e(9238),n.e(4599),n.e(5235),n.e(9863),n.e(8324),n.e(3608),n.e(8758)]).then(n.bind(n,48758)),Promise.all([n.e(6569),n.e(8968),n.e(9863),n.e(6319)]).then(n.bind(n,7301)),Promise.all([n.e(8968),n.e(9153)]).then(n.bind(n,59153)),n.e(565).then(n.bind(n,90565))]);return Vt=e,ht.extend([t,r,i,a]),K([t,r,i,a],"async"),ct=!0,!0}function Mt(e,t=[]){return void 0===e.usesFeatureSet&&(0,c.dN)(e,t),!0===e.usesFeatureSet}async function Nt(e,t,n=[],r=!1,i=null){return Bt(new Set,e,t,n,r,i)}async function Bt(e,t,n,r=[],i=!1,a=null){const s="string"==typeof t?pt(t):t,o=[];return s&&(!1===vt()&&(wt(s)||i)&&o.push(Ft()),!1===Tt()&&(!0===s.isAsync||n)&&o.push(Et()),!1===bt()&&(Mt(s)||function(e,t){if(t){for(const n of t)if(Dt(e,n))return!0;return!1}return!1}(s,r))&&o.push(It())),o.length&&await Promise.all(o),await Lt(e,s,a,n,i),!0}async function Lt(e,t,n=null,r=!1,i=!1){const a=(0,c.x5)(t);null===n&&a.length>0&&(n=Ge.getDefault()),t.loadedModules={};for(const o of a){(0,ut.O3)(n);const a=n.normalizeModuleUri(o.source);if(e.has(a.uri))throw new s.aV(null,s.rH.CircularModules,null);e.add(a.uri);const u=await n.fetchModule(a);await Bt(e,u,r,[],i,n),e.delete(a.uri),u.isAsync&&(t.isAsync=!0),u.usesFeatureSet&&(t.usesFeatureSet=!0),u.usesGeometry&&(t.usesGeometry=!0),t.loadedModules[o.libname]={uri:a.uri,script:u}}}function Ht(e){if(wt(e))return!0;const t=(0,c.Vf)(e);let n=!1;for(let e=0;e<t.length;e++)if(lt.has(t[e])){n=!0;break}return n}let Vt=null;function Zt(){return Vt}const Rt=Object.freeze(Object.defineProperty({__proto__:null,_loadScriptDependenciesImpl:Bt,compileScript:mt,enableAsyncSupport:Et,enableAsyncSupportImpl:St,enableFeatureSetSupport:It,enableFeatureSetSupportImpl:_t,enableGeometrySupport:Ft,enableGeometrySupportImpl:At,executeScript:gt,extend:function(e){at(e),K(e,"sync"),null===ht?ft.push(e):(K(e,"async"),ht.extend(e))},extractExpectedFieldLiterals:yt,extractFieldLiterals:function(e,t=!1){return void 0===t&&(t=!1),(0,c.mb)(e)},featureSetUtils:Zt,isAsyncEnabled:Tt,isFeatureSetSupportEnabled:bt,isGeometryEnabled:vt,loadDependentModules:Lt,loadScriptDependencies:Nt,parseAndExecuteScript:function(e,t,n=[]){return gt(Re(e,n),t)},parseScript:pt,referencesFunction:function(e,t){return(0,c.w8)(e,t)},referencesMember:Dt,scriptIsAsync:function(e,t=[]){return void 0===e.isAsync&&(0,c.dN)(e,t),!0===e.isAsync},scriptTouchesGeometry:Ht,scriptUsesFeatureSet:Mt,scriptUsesGeometryEngine:wt,scriptUsesModules:function(e,t=[]){return void 0===e.usesModules&&(0,c.dN)(e,t),!0===e.usesModules}},Symbol.toStringTag,{value:"Module"}));var Ot=n(22974),Pt=n(22641),Ut=n(53970);const Gt=/^\$(feature|aggregatedFeatures)\./i,zt={vars:{$feature:"any",$view:"any"},spatialReference:null};function jt(e){return e.replaceAll(/[|\\{}()[\]^$+*?.]/g,"\\$&")}function qt(e){return null==e?null:(0,l.o)(e)||(0,l.q)(e)?"array":(0,l.k)(e)?"date":(0,l.c)(e)?"text":(0,l.a)(e)?"boolean":(0,l.b)(e)?"number":e instanceof a.Z?"dictionary":(0,l.r)(e)?"feature":e instanceof F.Z?"point":e instanceof A.Z?"polygon":e instanceof C.Z?"polyline":e instanceof x.Z?"multipoint":e instanceof y.Z?"extent":e instanceof Pt.u?"dateOnly":e instanceof Ut.n?"time":(0,l.u)(e)?"featureSet":(0,l.s)(e)?"featureSetCollection":null}function Jt(e){if(!e)return null;try{return pt(e)}catch(e){}return null}function Wt(e,t){const n="string"==typeof e?Jt(e):e;if(!n)return null;try{return mt(n,t=t||(0,Ot.d9)(zt))}catch(e){}return null}function Kt(e,t){return{vars:{$feature:null==e?new o.Z:o.Z.createFromGraphic(e,null),$view:t&&t.view},spatialReference:t&&t.sr}}function $t(e,t,n){return o.Z.createFromGraphicLikeObject(t,e,n,null)}function Yt(e,t){null!=e.vars&&(e.vars.$feature=t)}function Qt(e,t){let n;try{n=gt(e,t)}catch(e){n=null}return n}function Xt(e,t){let n;try{n=e?e(t):null}catch(e){n=null}return n}function en(e,t){try{return e?e(t):Promise.resolve(null)}catch(e){return Promise.resolve(null)}}function tn(e,t){if(!e)return[];const n="string"==typeof e?Jt(e):e;if(!n)return[];const r=yt(n);let i=new Array;r.forEach((e=>{Gt.test(e)&&(e=e.replace(Gt,""),i.push(e))}));const a=i.filter((e=>e.includes("*")));return i=i.filter((e=>!a.includes(e))),t&&a.forEach((e=>{const n=new RegExp(`^${e.split(/\*+/).map(jt).join(".*")}$`,"i");t.forEach((e=>n.test(e)?i.push(e):null))})),[...new Set(i.sort())]}function nn(e){return Dt(e,"$view")}function rn(e,t){return!!e&&Dt(e,t)}function an(e){if(e&&(null!=e.spatialReference||null!=e.scale&&null!=e.viewingMode))return{view:e.viewingMode&&null!=e.scale?new a.Z({viewingMode:e.viewingMode,scale:e.scale}):null,sr:e.spatialReference}}function sn({url:e,spatialReference:t,lrucache:n,interceptor:r}){const i=Zt();return i?i.createFeatureSetCollectionFromService(e,t,n,r):null}function on({layer:e,spatialReference:t,outFields:n,returnGeometry:r,lrucache:i,interceptor:a}){if(null===e)return null;const s=Zt();return s?s.constructFeatureSet(e,t,n,r??!0,i,a):null}function un(e){if(null===e?.map)return null;const t=Zt();return t?t.createFeatureSetCollectionFromMap(e.map,e.spatialReference,e.lrucache,e.interceptor):null}function ln(e,t){return a.Z.convertJsonToArcade(e,t)}function cn(e,t,n=[]){return Nt(e,t,n)}function dn(){return Ft()}function hn(){return It()}function fn(e,t){if(!e)return!1;if("string"==typeof e)return t(e);const n=e;if(function(e){return"simple"===e.type||"class-breaks"===e.type||"unique-value"===e.type||"dot-density"===e.type||"dictionary"===e.type||"pie-chart"===e.type}(n)){if("dot-density"===n.type){const e=n.attributes?.some((e=>t(e.valueExpression)));if(e)return e}const e=n.visualVariables,r=!!e&&e.some((e=>{let n=t(e.valueExpression);return"size"===e.type&&(yn(e.minSize)&&(n=n||t(e.minSize.valueExpression)),yn(e.maxSize)&&(n=n||t(e.maxSize.valueExpression))),n}));return!(!("valueExpression"in n)||!t(n.valueExpression))||r}if(function(e){return"esri.layers.support.LabelClass"===e.declaredClass}(n)){const e=n.labelExpressionInfo&&n.labelExpressionInfo.expression;return!(!e||!t(e))||!1}return!!function(e){return"esri.PopupTemplate"===e.declaredClass}(n)&&(!!n.expressionInfos&&n.expressionInfos.some((e=>t(e.expression)))||Array.isArray(n.content)&&n.content.some((e=>"expression"===e.type&&t(e.expressionInfo?.expression))))}function mn(e){const t=Jt(e);return!!t&&Ht(t)}function pn(e){return fn(e,mn)}function gn(e){const t=Jt(e);return!!t&&wt(t)}function Dn(e){return fn(e,gn)}function yn(e){return e&&"esri.renderers.visualVariables.SizeVariable"===e.declaredClass}},80216:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(43697),i=n(2368),a=n(96674),s=n(5600),o=(n(75215),n(67676),n(80442),n(71715)),u=n(52011),l=n(30556),c=n(42799),d=n(15512);let h=class extends((0,i.J)(a.wq)){constructor(e){super(e),this.legacy=null,this.timeZone=d.By}readLegacy(e,t){const{timeZone:n,respectsDaylightSaving:r}=t;return{timeZone:n,respectsDaylightSaving:r}}readTimeZone(e,t){return"timeZoneIANA"in t?t.timeZoneIANA:(0,c.G)(t)}writeTimeZone(e,t){t.timeZoneIANA=e}equals(e){return null!=e&&null!=this.timeZone&&null!=e.timeZone&&this.timeZone===e.timeZone}};(0,r._)([(0,s.Cb)()],h.prototype,"legacy",void 0),(0,r._)([(0,o.r)("legacy",["timeZone"])],h.prototype,"readLegacy",null),(0,r._)([(0,s.Cb)({type:String,nonNullable:!0})],h.prototype,"timeZone",void 0),(0,r._)([(0,o.r)("timeZone",["timeZone","timeZoneIANA","respectsDaylightSaving"])],h.prototype,"readTimeZone",null),(0,r._)([(0,l.c)("timeZone")],h.prototype,"writeTimeZone",null),h=(0,r._)([(0,u.j)("esri.time.TimeReference")],h);const f=h},42799:(e,t,n)=>{n.d(t,{G:()=>s});const r=new Map([["AUS Central Standard Time","Australia/Darwin"],["AUS Eastern Standard Time","Australia/Sydney"],["Afghanistan Standard Time","Asia/Kabul"],["Alaskan Standard Time","America/Anchorage"],["Aleutian Standard Time","America/Adak"],["Altai Standard Time","Asia/Barnaul"],["Arab Standard Time","Asia/Riyadh"],["Arabian Standard Time","Asia/Dubai"],["Arabic Standard Time","Asia/Baghdad"],["Argentina Standard Time","America/Buenos_Aires"],["Astrakhan Standard Time","Europe/Astrakhan"],["Atlantic Standard Time","America/Halifax"],["Aus Central W. Standard Time","Australia/Eucla"],["Azerbaijan Standard Time","Asia/Baku"],["Azores Standard Time","Atlantic/Azores"],["Bahia Standard Time","America/Bahia"],["Bangladesh Standard Time","Asia/Dhaka"],["Belarus Standard Time","Europe/Minsk"],["Bougainville Standard Time","Pacific/Bougainville"],["Canada Central Standard Time","America/Regina"],["Cape Verde Standard Time","Atlantic/Cape_Verde"],["Caucasus Standard Time","Asia/Yerevan"],["Cen. Australia Standard Time","Australia/Adelaide"],["Central America Standard Time","America/Guatemala"],["Central Asia Standard Time","Asia/Almaty"],["Central Brazilian Standard Time","America/Cuiaba"],["Central Europe Standard Time","Europe/Budapest"],["Central European Standard Time","Europe/Warsaw"],["Central Pacific Standard Time","Pacific/Guadalcanal"],["Central Standard Time","America/Chicago"],["Central Standard Time (Mexico)","America/Mexico_City"],["Chatham Islands Standard Time","Pacific/Chatham"],["China Standard Time","Asia/Shanghai"],["Cuba Standard Time","America/Havana"],["Dateline Standard Time","Etc/GMT+12"],["E. Africa Standard Time","Africa/Nairobi"],["E. Australia Standard Time","Australia/Brisbane"],["E. Europe Standard Time","Europe/Chisinau"],["E. South America Standard Time","America/Sao_Paulo"],["Easter Island Standard Time","Pacific/Easter"],["Eastern Standard Time","America/New_York"],["Eastern Standard Time (Mexico)","America/Cancun"],["Egypt Standard Time","Africa/Cairo"],["Ekaterinburg Standard Time","Asia/Yekaterinburg"],["FLE Standard Time","Europe/Kiev"],["Fiji Standard Time","Pacific/Fiji"],["GMT Standard Time","Europe/London"],["GTB Standard Time","Europe/Bucharest"],["Georgian Standard Time","Asia/Tbilisi"],["Greenland Standard Time","America/Godthab"],["Greenwich Standard Time","Atlantic/Reykjavik"],["Haiti Standard Time","America/Port-au-Prince"],["Hawaiian Standard Time","Pacific/Honolulu"],["India Standard Time","Asia/Calcutta"],["Iran Standard Time","Asia/Tehran"],["Israel Standard Time","Asia/Jerusalem"],["Jordan Standard Time","Asia/Amman"],["Kaliningrad Standard Time","Europe/Kaliningrad"],["Korea Standard Time","Asia/Seoul"],["Libya Standard Time","Africa/Tripoli"],["Line Islands Standard Time","Pacific/Kiritimati"],["Lord Howe Standard Time","Australia/Lord_Howe"],["Magadan Standard Time","Asia/Magadan"],["Magallanes Standard Time","America/Punta_Arenas"],["Marquesas Standard Time","Pacific/Marquesas"],["Mauritius Standard Time","Indian/Mauritius"],["Middle East Standard Time","Asia/Beirut"],["Montevideo Standard Time","America/Montevideo"],["Morocco Standard Time","Africa/Casablanca"],["Mountain Standard Time","America/Denver"],["Mountain Standard Time (Mexico)","America/Mazatlan"],["Myanmar Standard Time","Asia/Rangoon"],["N. Central Asia Standard Time","Asia/Novosibirsk"],["Namibia Standard Time","Africa/Windhoek"],["Nepal Standard Time","Asia/Katmandu"],["New Zealand Standard Time","Pacific/Auckland"],["Newfoundland Standard Time","America/St_Johns"],["Norfolk Standard Time","Pacific/Norfolk"],["North Asia East Standard Time","Asia/Irkutsk"],["North Asia Standard Time","Asia/Krasnoyarsk"],["North Korea Standard Time","Asia/Pyongyang"],["Omsk Standard Time","Asia/Omsk"],["Pacific SA Standard Time","America/Santiago"],["Pacific Standard Time","America/Los_Angeles"],["Pacific Standard Time (Mexico)","America/Tijuana"],["Pakistan Standard Time","Asia/Karachi"],["Paraguay Standard Time","America/Asuncion"],["Qyzylorda Standard Time","Asia/Qyzylorda"],["Romance Standard Time","Europe/Paris"],["Russia Time Zone 10","Asia/Srednekolymsk"],["Russia Time Zone 11","Asia/Kamchatka"],["Russia Time Zone 3","Europe/Samara"],["Russian Standard Time","Europe/Moscow"],["SA Eastern Standard Time","America/Cayenne"],["SA Pacific Standard Time","America/Bogota"],["SA Western Standard Time","America/La_Paz"],["SE Asia Standard Time","Asia/Bangkok"],["Saint Pierre Standard Time","America/Miquelon"],["Sakhalin Standard Time","Asia/Sakhalin"],["Samoa Standard Time","Pacific/Apia"],["Sao Tome Standard Time","Africa/Sao_Tome"],["Saratov Standard Time","Europe/Saratov"],["Singapore Standard Time","Asia/Singapore"],["South Africa Standard Time","Africa/Johannesburg"],["South Sudan Standard Time","Africa/Juba"],["Sri Lanka Standard Time","Asia/Colombo"],["Sudan Standard Time","Africa/Khartoum"],["Syria Standard Time","Asia/Damascus"],["Taipei Standard Time","Asia/Taipei"],["Tasmania Standard Time","Australia/Hobart"],["Tocantins Standard Time","America/Araguaina"],["Tokyo Standard Time","Asia/Tokyo"],["Tomsk Standard Time","Asia/Tomsk"],["Tonga Standard Time","Pacific/Tongatapu"],["Transbaikal Standard Time","Asia/Chita"],["Turkey Standard Time","Europe/Istanbul"],["Turks And Caicos Standard Time","America/Grand_Turk"],["US Eastern Standard Time","America/Indianapolis"],["US Mountain Standard Time","America/Phoenix"],["UTC","Etc/GMT"],["UTC+01","Etc/GMT-1"],["UTC+02","Etc/GMT-2"],["UTC+03","Etc/GMT-3"],["UTC+04","Etc/GMT-4"],["UTC+05","Etc/GMT-5"],["UTC+06","Etc/GMT-6"],["UTC+07","Etc/GMT-7"],["UTC+08","Etc/GMT-8"],["UTC+09","Etc/GMT-9"],["UTC+10","Etc/GMT-10"],["UTC+11","Etc/GMT-11"],["UTC+12","Etc/GMT-12"],["UTC+13","Etc/GMT-13"],["UTC+14","Etc/GMT-14"],["UTC-01","Etc/GMT+1"],["UTC-02","Etc/GMT+2"],["UTC-03","Etc/GMT+3"],["UTC-04","Etc/GMT+4"],["UTC-05","Etc/GMT+5"],["UTC-06","Etc/GMT+6"],["UTC-07","Etc/GMT+7"],["UTC-08","Etc/GMT+8"],["UTC-09","Etc/GMT+9"],["UTC-10","Etc/GMT+10"],["UTC-11","Etc/GMT+11"],["UTC-12","Etc/GMT+12"],["Ulaanbaatar Standard Time","Asia/Ulaanbaatar"],["Venezuela Standard Time","America/Caracas"],["Vladivostok Standard Time","Asia/Vladivostok"],["Volgograd Standard Time","Europe/Volgograd"],["W. Australia Standard Time","Australia/Perth"],["W. Central Africa Standard Time","Africa/Lagos"],["W. Europe Standard Time","Europe/Berlin"],["W. Mongolia Standard Time","Asia/Hovd"],["West Asia Standard Time","Asia/Tashkent"],["West Bank Standard Time","Asia/Hebron"],["West Pacific Standard Time","Pacific/Port_Moresby"],["Yakutsk Standard Time","Asia/Yakutsk"],["Yukon Standard Time","America/Whitehorse"]]);var i=n(15512),a=n(17126);function s(e,t=i.By){if(!e||!r.has(e.timeZone))return t;const n=r.get(e.timeZone);return e.timeZone.startsWith("UTC")||e.respectsDaylightSaving?n:function(e){const t=a.ou.local().setZone(e),n=Math.min(t.set({month:1,day:1}).offset,t.set({month:5}).offset);return 0===n?"Etc/UTC":`Etc/GMT${a.Qf.instance(-n).formatOffset(0,"narrow")}`}(n)}},15512:(e,t,n)=>{n.d(t,{By:()=>r,_4:()=>i,pt:()=>a});const r="system",i="unknown",a="UTC"}}]);