@arcgis/core 4.34.0-next.34 → 4.34.0-next.36

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 (306) hide show
  1. package/Graphic.js +1 -1
  2. package/analysis/ElevationProfileAnalysis.d.ts +4 -0
  3. package/analysis/ElevationProfileAnalysis.js +5 -0
  4. package/analysis/ElevationProfileLine.d.ts +4 -0
  5. package/analysis/ElevationProfileLine.js +5 -0
  6. package/analysis/ElevationProfileLineChartOptions.d.ts +4 -0
  7. package/analysis/ElevationProfileLineChartOptions.js +5 -0
  8. package/analysis/ElevationProfileLineGround.d.ts +4 -0
  9. package/analysis/ElevationProfileLineGround.js +5 -0
  10. package/analysis/ElevationProfileLineInput.d.ts +4 -0
  11. package/analysis/ElevationProfileLineInput.js +5 -0
  12. package/analysis/ElevationProfileLineQuery.d.ts +4 -0
  13. package/analysis/ElevationProfileLineQuery.js +5 -0
  14. package/analysis/ElevationProfileLineScene.d.ts +4 -0
  15. package/analysis/ElevationProfileLineScene.js +5 -0
  16. package/analysis/ElevationProfileLineViewOptions.d.ts +4 -0
  17. package/analysis/ElevationProfileLineViewOptions.js +5 -0
  18. package/analysis/ElevationProfileUnits.d.ts +4 -0
  19. package/analysis/ElevationProfileUnits.js +5 -0
  20. package/analysis/support/elevationProfileLineTypes.js +5 -0
  21. package/arcade/ArcadeDate.js +1 -1
  22. package/arcade/ArcadeModuleResolver.js +1 -1
  23. package/arcade/arcadeAsyncRuntime.js +1 -1
  24. package/arcade/arcadeCompiler.js +1 -1
  25. package/arcade/arcadeRuntime.js +1 -1
  26. package/arcade/compilerUtils.js +5 -0
  27. package/arcade/containerUtils.js +1 -1
  28. package/arcade/featureset/actions/GroupBy.js +1 -1
  29. package/arcade/functions/convertdirection.js +1 -1
  30. package/arcade/functions/date.js +1 -1
  31. package/arcade/functions/feature.js +1 -1
  32. package/arcade/functions/featuresetbase.js +1 -1
  33. package/arcade/functions/featuresetgeom.js +1 -1
  34. package/arcade/functions/featuresetstring.js +1 -1
  35. package/arcade/functions/fieldStats.js +1 -1
  36. package/arcade/functions/geomasync.js +1 -1
  37. package/arcade/functions/geometry.js +1 -1
  38. package/arcade/functions/geomsync.js +1 -1
  39. package/arcade/functions/knowledgegraph.js +1 -1
  40. package/arcade/functions/maths.js +1 -1
  41. package/arcade/functions/string.js +1 -1
  42. package/arcade/functions/track.js +1 -1
  43. package/arcade/geometry/functions.js +1 -1
  44. package/arcade/languageUtils.js +1 -1
  45. package/arcade.js +1 -1
  46. package/assets/esri/core/workers/RemoteClient.js +1 -1
  47. package/assets/esri/core/workers/chunks/0550e775677597f3752c.js +1 -0
  48. package/assets/esri/core/workers/chunks/{b4b30a7f1b673461dc55.js → 0997e09fe5b0aba1f804.js} +1 -1
  49. package/assets/esri/core/workers/chunks/0c0080b652cf8afc4e6b.js +1 -0
  50. package/assets/esri/core/workers/chunks/152128775b4740e779ab.js +1 -0
  51. package/assets/esri/core/workers/chunks/{847455bf4fc33d6e6efc.js → 1dc410bc070cabb7198d.js} +1 -1
  52. package/assets/esri/core/workers/chunks/1e58b1e191498417c21d.js +1 -0
  53. package/assets/esri/core/workers/chunks/2032b649350a75ba294f.js +1 -0
  54. package/assets/esri/core/workers/chunks/{55a763662bad03ae6bae.js → 209c70ba2925171ef742.js} +1 -1
  55. package/assets/esri/core/workers/chunks/2105d2cc75e75bf8f1c0.js +1 -0
  56. package/assets/esri/core/workers/chunks/236fc659747e812f6424.js +1 -0
  57. package/assets/esri/core/workers/chunks/2c29f8a708a03cb703ab.js +1 -0
  58. package/assets/esri/core/workers/chunks/{94a3474e3f45efa4a4fe.js → 2c816d3a737e39e6eb84.js} +1 -1
  59. package/assets/esri/core/workers/chunks/40b0c5368b8322498189.js +1 -0
  60. package/assets/esri/core/workers/chunks/{4778acd0cfaf0cebeec7.js → 439128f23fa091633d2d.js} +1 -1
  61. package/assets/esri/core/workers/chunks/{ddaaff5d6036a5eed50f.js → 44116cf0bd4d6a127c96.js} +1 -1
  62. package/assets/esri/core/workers/chunks/4c54239974a5847b8fdd.js +1 -0
  63. package/assets/esri/core/workers/chunks/4fb13252a985131d3dae.js +1 -0
  64. package/assets/esri/core/workers/chunks/{b89aacec211c66e3a011.js → 5d8c64693830506c8776.js} +1 -1
  65. package/assets/esri/core/workers/chunks/5f995450f720483fcffa.js +1 -0
  66. package/assets/esri/core/workers/chunks/{5d0c92aaa5891e6cb8f0.js → 641ca71d7c1a07bde66a.js} +1 -1
  67. package/assets/esri/core/workers/chunks/{b78d00c4e493086741e1.js → 7d25f57299c642e727a6.js} +1 -1
  68. package/assets/esri/core/workers/chunks/81be8d23b8dfa4937eaf.js +1 -0
  69. package/assets/esri/core/workers/chunks/8b7f6f2d1692b6b6dbd5.js +1 -0
  70. package/assets/esri/core/workers/chunks/{0ec7b5f1a614a86ad3db.js → 948ecf0bfbc886ec3b52.js} +1 -1
  71. package/assets/esri/core/workers/chunks/9f43736d6d80c8e858b2.js +1 -0
  72. package/assets/esri/core/workers/chunks/a36be186ad10200c420c.js +1 -0
  73. package/assets/esri/core/workers/chunks/a44f17397d8589433dae.js +1 -0
  74. package/assets/esri/core/workers/chunks/a53f2529b7067c28f320.js +1 -0
  75. package/assets/esri/core/workers/chunks/a6b6915b7321f77f765f.js +1 -0
  76. package/assets/esri/core/workers/chunks/aa12ba96fb8c91105473.js +1 -0
  77. package/assets/esri/core/workers/chunks/ab73df4f809430db6249.js +1 -0
  78. package/assets/esri/core/workers/chunks/ae7f1499912c86973921.js +1 -0
  79. package/assets/esri/core/workers/chunks/b331543767c35e5edcc6.js +1 -0
  80. package/assets/esri/core/workers/chunks/b98a049561b12a0555b7.js +1 -0
  81. package/assets/esri/core/workers/chunks/bf60d4da0dff1e14da8e.js +1 -0
  82. package/assets/esri/core/workers/chunks/{4784af2b04fafacfcc1b.js → c6077a893d5b5c34a46c.js} +1 -1
  83. package/assets/esri/core/workers/chunks/{a809042fdce7ced2a415.js → cc3ca1729af33688c1e3.js} +1 -1
  84. package/assets/esri/core/workers/chunks/cd150c7e1516134c7437.js +1 -0
  85. package/assets/esri/core/workers/chunks/cde79c3644166d4798a8.js +1 -0
  86. package/assets/esri/core/workers/chunks/{181f8bbe670b4468307a.js → ce8f0ed9179c0d314df8.js} +1 -1
  87. package/assets/esri/core/workers/chunks/d4cadde4a9cbfe2c51d8.js +1 -0
  88. package/assets/esri/core/workers/chunks/{ac30cf2f9a94597f7665.js → d6b2ab614f308db50c4a.js} +2 -2
  89. package/assets/esri/core/workers/chunks/dab82564928265b9f22d.js +1 -0
  90. package/assets/esri/core/workers/chunks/dec9656997683ef01ba6.js +1 -0
  91. package/assets/esri/core/workers/chunks/e892ed8b0b990d7eba28.js +1 -0
  92. package/assets/esri/core/workers/chunks/e897c5ce83db8a71b0a2.js +1 -0
  93. package/assets/esri/core/workers/chunks/{41071e672dcddec47492.js → f4e9640306f64b1af7a3.js} +1 -1
  94. package/assets/esri/core/workers/chunks/fa01d418237d7fa67efc.js +1 -0
  95. package/assets/esri/core/workers/chunks/ff736cb5a9fd18368244.js +1 -0
  96. package/chunks/arcade.js +1 -1
  97. package/chunks/array.js +1 -1
  98. package/chunks/languageUtils.js +1 -1
  99. package/config.js +1 -1
  100. package/copyright.txt +27 -0
  101. package/core/BidiEngine.js +1 -1
  102. package/core/Promise.js +1 -1
  103. package/core/accessorSupport/ensureType.js +1 -1
  104. package/core/promiseUtils.js +1 -1
  105. package/core/sql/SqlInterval.js +1 -1
  106. package/core/sql/sqlDateParsingUtils.js +1 -1
  107. package/core/unitUtils.js +1 -1
  108. package/geometry/support/DoubleArray.js +1 -1
  109. package/geometry/support/coordinateSystem.js +1 -1
  110. package/graphic/BuildingGraphicOrigin.d.ts +4 -0
  111. package/graphic/BuildingGraphicOrigin.js +5 -0
  112. package/graphic/CSVGraphicOrigin.d.ts +4 -0
  113. package/graphic/CSVGraphicOrigin.js +5 -0
  114. package/graphic/CatalogGraphicOrigin.d.ts +4 -0
  115. package/graphic/CatalogGraphicOrigin.js +5 -0
  116. package/graphic/FeatureGraphicOrigin.d.ts +4 -0
  117. package/graphic/FeatureGraphicOrigin.js +5 -0
  118. package/graphic/GeoJSONGraphicOrigin.d.ts +4 -0
  119. package/graphic/GeoJSONGraphicOrigin.js +5 -0
  120. package/graphic/GraphicOrigin.d.ts +4 -0
  121. package/graphic/GraphicOrigin.js +5 -0
  122. package/graphic/IntegratedMesh3DTilesGraphicOrigin.d.ts +4 -0
  123. package/graphic/IntegratedMesh3DTilesGraphicOrigin.js +5 -0
  124. package/graphic/IntegratedMeshGraphicOrigin.d.ts +4 -0
  125. package/graphic/IntegratedMeshGraphicOrigin.js +5 -0
  126. package/graphic/OGCFeatureGraphicOrigin.d.ts +4 -0
  127. package/graphic/OGCFeatureGraphicOrigin.js +5 -0
  128. package/graphic/PointCloudGraphicOrigin.d.ts +4 -0
  129. package/graphic/PointCloudGraphicOrigin.js +5 -0
  130. package/graphic/SceneGraphicOrigin.d.ts +4 -0
  131. package/graphic/SceneGraphicOrigin.js +5 -0
  132. package/graphic/StreamGraphicOrigin.d.ts +4 -0
  133. package/graphic/StreamGraphicOrigin.js +5 -0
  134. package/graphic/VectorTileGraphicOrigin.d.ts +4 -0
  135. package/graphic/VectorTileGraphicOrigin.js +5 -0
  136. package/graphic/VoxelGraphicOrigin.d.ts +4 -0
  137. package/graphic/VoxelGraphicOrigin.js +5 -0
  138. package/graphic/WFSGraphicOrigin.d.ts +4 -0
  139. package/graphic/WFSGraphicOrigin.js +5 -0
  140. package/graphic/graphicOriginUtils.js +5 -0
  141. package/graphic/graphicOrigins.d.ts +14 -0
  142. package/graphic/graphicOrigins.js +5 -0
  143. package/graphic/isBuildingGraphicOrigin.js +5 -0
  144. package/graphic/isCSVGraphicOrigin.js +5 -0
  145. package/graphic/isCatalogGraphicOrigin.js +5 -0
  146. package/graphic/isFeatureGraphicOrigin.js +5 -0
  147. package/graphic/isGeoJSONGraphicOrigin.js +5 -0
  148. package/graphic/isIntegratedMesh3DTilesGraphicOrigin.js +5 -0
  149. package/graphic/isIntegratedMeshGraphicOrigin.js +5 -0
  150. package/graphic/isOGCFeatureGraphicOrigin.js +5 -0
  151. package/graphic/isPointCloudGraphicOrigin.js +5 -0
  152. package/graphic/isSceneGraphicOrigin.js +5 -0
  153. package/graphic/isStreamGraphicOrigin.js +5 -0
  154. package/graphic/isVectorTileGraphicOrigin.js +5 -0
  155. package/graphic/isVoxelGraphicOrigin.js +5 -0
  156. package/graphic/isWFSGraphicOrigin.js +5 -0
  157. package/interfaces.d.ts +1025 -63
  158. package/kernel.js +1 -1
  159. package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
  160. package/layers/support/Field.js +1 -1
  161. package/layers/support/PromiseQueue.js +1 -1
  162. package/layers/support/featurePopupQueryUtils.js +1 -1
  163. package/layers/voxel/NCTimeParser.js +1 -1
  164. package/package.json +1 -1
  165. package/rest/knowledgeGraphService.js +1 -1
  166. package/smartMapping/statistics/support/utils.js +1 -1
  167. package/support/arcadeExpressionUtils.js +1 -1
  168. package/support/revision.js +1 -1
  169. package/symbols/support/svgUtils.js +1 -1
  170. package/views/2d/engine/vectorTiles/VectorTileFeatureIndex.js +1 -1
  171. package/views/2d/engine/webgl/FeatureDisplayList.js +1 -1
  172. package/views/2d/engine/webgl/Painter.js +1 -1
  173. package/views/2d/engine/webgl/mesh/templates/segmentUtils.js +1 -1
  174. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelTechnique.js +1 -1
  175. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  176. package/views/2d/layers/VectorTileLayerView2D.js +1 -1
  177. package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
  178. package/views/3d/FocusAreasView.js +1 -1
  179. package/views/3d/analysis/AnalysisViewManager3D.js +1 -1
  180. package/views/3d/analysis/ElevationProfileAnalysisView3D.d.ts +4 -0
  181. package/views/3d/analysis/ElevationProfileAnalysisView3D.js +5 -0
  182. package/views/3d/analysis/Slice/SliceController.js +1 -1
  183. package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
  184. package/views/3d/analysis/VolumeMeasurement/CutFillVolumeMeasurementComputation.js +5 -0
  185. package/views/3d/analysis/VolumeMeasurement/CutFillVolumeMeasurementController.js +1 -1
  186. package/views/3d/environment/Clouds.js +1 -1
  187. package/views/3d/environment/CloudsRenderer.js +1 -1
  188. package/views/3d/environment/EnvironmentRenderer.js +1 -1
  189. package/views/3d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles3D.js +1 -1
  190. package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
  191. package/views/3d/layers/CSVLayerView3D.js +1 -1
  192. package/views/3d/layers/CatalogFootprintLayerView3D.js +1 -1
  193. package/views/3d/layers/FeatureLayerView3D.js +1 -1
  194. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  195. package/views/3d/layers/FlowSubView3D.js +1 -1
  196. package/views/3d/layers/GeoJSONLayerView3D.js +1 -1
  197. package/views/3d/layers/GraphicsView3D.js +1 -1
  198. package/views/3d/layers/GraphicsView3DDummyLayer.js +5 -0
  199. package/views/3d/layers/I3SMeshView3D.js +1 -1
  200. package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
  201. package/views/3d/layers/OGCFeatureLayerView3D.js +1 -1
  202. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  203. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  204. package/views/3d/layers/SceneLayerView3D.js +1 -1
  205. package/views/3d/layers/SceneLayerWorker.js +1 -1
  206. package/views/3d/layers/StreamLayerView3D.js +1 -1
  207. package/views/3d/layers/WFSLayerView3D.js +1 -1
  208. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  209. package/views/3d/layers/graphics/ElevationQuery.js +1 -1
  210. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  211. package/views/3d/layers/graphics/Graphics3DElevationAlignment.js +1 -1
  212. package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
  213. package/views/3d/layers/graphics/Graphics3DFrustumVisibility.js +1 -1
  214. package/views/3d/layers/graphics/Graphics3DScaleVisibility.js +1 -1
  215. package/views/3d/layers/graphics/GraphicsDeconflictor.js +1 -1
  216. package/views/3d/layers/graphics/LabelDeconflictor.js +1 -1
  217. package/views/3d/layers/graphics/Labeler.js +1 -1
  218. package/views/3d/layers/graphics/StreamController.js +1 -1
  219. package/views/3d/layers/graphics/pipeline/Feature3DPipeline.js +1 -1
  220. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorkerHandle.js +1 -1
  221. package/views/3d/layers/graphics/pipeline/Tile3DManager.js +1 -1
  222. package/views/3d/layers/i3s/I3SAsyncElevationUpdater.js +1 -1
  223. package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
  224. package/views/3d/layers/i3s/I3SFrameTask.js +1 -1
  225. package/views/3d/layers/support/FeatureTileDescriptor.js +1 -1
  226. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  227. package/views/3d/layers/support/FeatureTileFetcher3DContext.js +1 -1
  228. package/views/3d/layers/support/FeatureTileMeasurements3D.js +1 -1
  229. package/views/3d/layers/support/FeatureTileTree3D.js +1 -1
  230. package/views/3d/layers/support/FeatureTileTree3DDebugger.js +1 -1
  231. package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
  232. package/views/3d/layers/support/FeatureVisibilityFilter.js +1 -1
  233. package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
  234. package/views/3d/layers/support/Tiles3DIntersectionHandler.js +1 -1
  235. package/views/3d/state/ConstraintsManager.js +1 -1
  236. package/views/3d/support/StreamDataLoader.js +1 -1
  237. package/views/3d/support/flow/geometryUtils.js +1 -1
  238. package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
  239. package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
  240. package/views/3d/support/pointsOfInterest/Focus.js +1 -1
  241. package/views/3d/support/pointsOfInterest/SurfaceGeometryUpdates.js +1 -1
  242. package/views/3d/terrain/OverlayManager.js +1 -1
  243. package/views/3d/terrain/OverlayRenderer.js +1 -1
  244. package/views/3d/terrain/TerrainSurface.js +1 -1
  245. package/views/3d/terrain/Tile.js +1 -1
  246. package/views/3d/webgl-engine/Stage.js +1 -1
  247. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  248. package/views/3d/webgl-engine/effects/RenderPlugin.js +1 -1
  249. package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
  250. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  251. package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
  252. package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +1 -1
  253. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  254. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  255. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  256. package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
  257. package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
  258. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  259. package/views/SceneView.js +1 -1
  260. package/views/analysis/ElevationProfileResult.d.ts +4 -0
  261. package/views/analysis/ElevationProfileResult.js +5 -0
  262. package/views/interactive/Tooltip.js +1 -1
  263. package/views/layers/FeatureLayerView.js +1 -1
  264. package/views/layers/support/popupUtils.js +1 -1
  265. package/views/support/ScheduledQueueProcessor.js +1 -1
  266. package/views/support/Scheduler.js +1 -1
  267. package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
  268. package/widgets/ElevationProfile/ElevationProfileLine.d.ts +2 -2
  269. package/widgets/ElevationProfile/ElevationProfileLine.js +1 -1
  270. package/widgets/ElevationProfile/ElevationProfileLineGround.d.ts +2 -2
  271. package/widgets/ElevationProfile/ElevationProfileLineInput.d.ts +2 -2
  272. package/widgets/ElevationProfile/ElevationProfileLineQuery.d.ts +2 -2
  273. package/assets/esri/core/workers/chunks/07b2cc0f6b064277632f.js +0 -1
  274. package/assets/esri/core/workers/chunks/086f3bc5938bf9a37274.js +0 -1
  275. package/assets/esri/core/workers/chunks/13f9e92e7e5d44d9f95c.js +0 -1
  276. package/assets/esri/core/workers/chunks/140efe4735605258ecc9.js +0 -1
  277. package/assets/esri/core/workers/chunks/20aed6e1d9b6bf06a398.js +0 -1
  278. package/assets/esri/core/workers/chunks/28e04ef3575f164f611a.js +0 -1
  279. package/assets/esri/core/workers/chunks/2b76e716f478468b6798.js +0 -1
  280. package/assets/esri/core/workers/chunks/386ab72a45102c2d47f2.js +0 -1
  281. package/assets/esri/core/workers/chunks/39bff604d4b4a1295038.js +0 -1
  282. package/assets/esri/core/workers/chunks/3cd1ab26396052f17832.js +0 -1
  283. package/assets/esri/core/workers/chunks/3fb6146d914f9b410c2e.js +0 -1
  284. package/assets/esri/core/workers/chunks/432365fcd7becd508541.js +0 -1
  285. package/assets/esri/core/workers/chunks/439ce953a25b2776cb7f.js +0 -1
  286. package/assets/esri/core/workers/chunks/4c8d2334fcdb1354ff43.js +0 -1
  287. package/assets/esri/core/workers/chunks/50f58b2a933b56effd70.js +0 -1
  288. package/assets/esri/core/workers/chunks/5f321be63ed5447b04a1.js +0 -1
  289. package/assets/esri/core/workers/chunks/6006fbdb90c3bfc493a6.js +0 -1
  290. package/assets/esri/core/workers/chunks/674970c539d336a93ba1.js +0 -1
  291. package/assets/esri/core/workers/chunks/700c641347853b1034d9.js +0 -1
  292. package/assets/esri/core/workers/chunks/7c35c61e3673cf94cdfd.js +0 -1
  293. package/assets/esri/core/workers/chunks/7c75876a0c6460585055.js +0 -1
  294. package/assets/esri/core/workers/chunks/7d852617e91b51121ea7.js +0 -1
  295. package/assets/esri/core/workers/chunks/949dc266ac6f3505d357.js +0 -1
  296. package/assets/esri/core/workers/chunks/98f6d4ea026ed96fd3f3.js +0 -1
  297. package/assets/esri/core/workers/chunks/9bc6d974b0fce9db64ef.js +0 -1
  298. package/assets/esri/core/workers/chunks/a84af1b8b64b86b49bd3.js +0 -1
  299. package/assets/esri/core/workers/chunks/a9d83a442d8d7a376fc0.js +0 -1
  300. package/assets/esri/core/workers/chunks/abe2cdfc2eda46b00812.js +0 -1
  301. package/assets/esri/core/workers/chunks/ba1b21a90b257ac9a342.js +0 -1
  302. package/assets/esri/core/workers/chunks/c30adbead0ba4722acf9.js +0 -1
  303. package/assets/esri/core/workers/chunks/ca46f78aac1133d127fa.js +0 -1
  304. package/assets/esri/core/workers/chunks/dc5a8cf2a44a5ac201c5.js +0 -1
  305. package/assets/esri/core/workers/chunks/ea240d9e594bfbd8af68.js +0 -1
  306. package/assets/esri/core/workers/chunks/f9ad37dfbe1d14c6a352.js +0 -1
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[709,3549],{4197:(e,t,r)=>{r.d(t,{jh:()=>n,l5:()=>o,xm:()=>s});var i=r(34275);function n(e,t=!1){return e<=i.y9?t?new Array(e).fill(0):new Array(e):new Float64Array(e)}function s(e){return((0,i.iu)(e)?e.byteLength/8:e.length)<=i.y9?Array.from(e):new Float64Array(e)}function o(e,t,r){return Array.isArray(e)?e.slice(t,t+r):e.subarray(t,t+r)}},6455:(e,t,r)=>{r.d(t,{FJ:()=>w,Dp:()=>b,KV:()=>v});var i=r(31635),n=r(93637),s=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),a=r(89317),l=r(69540),u=r(7762),p=r(25482),c=r(43937),d=r(83960),y=r(13069);const f={write:{overridePolicy:(e,t,r)=>({enabled:!r||"scale"===r.filterMode})}};let m=class extends(l.A.ClonableMixin(p.A)){constructor(e){super(e),this.id=(0,y.lk)(),this.maxScale=0,this.minScale=0,this.title="",this.where=null}};(0,i.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],m.prototype,"id",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:f})],m.prototype,"maxScale",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:f})],m.prototype,"minScale",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],m.prototype,"title",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],m.prototype,"where",void 0),m=(0,i.Cg)([(0,o.$)("esri.layers.support.DisplayFilter")],m);var h=r(41560);let g=class extends(l.A.ClonableMixin(p.A)){constructor(e){super(e),this.activeFilterId=null,this.filters=new(u.A.ofType(m)),this.mode="manual"}writeFilters(e,t,r,i){const n=e.toArray();"scale"===this.mode&&n.sort((e,t)=>{const r=(0,d.oW)(t.minScale,e.minScale),i=e.maxScale-t.maxScale;return 0===r?i:r}),t[r]=n.map(e=>e.toJSON(i))}write(e,t){return super.write(e,(0,h.mW)(this,t))}};(0,i.Cg)([(0,s.MZ)({type:String,json:{write:{overridePolicy:(e,t,r)=>({enabled:"manual"===r.filterMode,isRequired:!0})}}})],g.prototype,"activeFilterId",void 0),(0,i.Cg)([(0,s.MZ)({type:u.A.ofType(m),nonNullable:!0,json:{write:!0}})],g.prototype,"filters",void 0),(0,i.Cg)([(0,c.K)("filters")],g.prototype,"writeFilters",null),(0,i.Cg)([(0,s.MZ)({type:["manual","scale"],nonNullable:!0,json:{name:"filterMode",write:!0}})],g.prototype,"mode",void 0),g=(0,i.Cg)([(0,o.$)("esri.layers.support.DisplayFilterInfo")],g);const w=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.displayFilterEnabled=!0,this.displayFilterInfo=null}};return(0,i.Cg)([(0,s.MZ)(b)],r.prototype,"displayFilterEnabled",void 0),(0,i.Cg)([(0,s.MZ)(v)],r.prototype,"displayFilterInfo",void 0),r=(0,i.Cg)([(0,o.$)("esri.layers.mixins.DisplayFilteredLayer")],r),r},b={type:Boolean,json:{name:"layerDefinition.disableDisplayFilter",read:{reader:e=>!e},write:{layerContainerTypes:a.K,writer(e,t,r){(0,n.sM)(r,!e,t)}},origins:{"web-scene":{write:!1,read:!1}}}},v={type:g,json:{name:"layerDefinition.displayFilterInfo",write:{enabled:!0,allowNull:!0,layerContainerTypes:a.K},origins:{"web-scene":{write:!1,read:!1}}}}},6797:(e,t,r)=>{r.d(t,{Mj:()=>d,Ui:()=>f,w2:()=>y});var i=r(69622),n=r(7762),s=r(88620);const o=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function a(e){return e instanceof i.A}function l(e){return e instanceof n.A?Object.keys(e.items):a(e)?(0,s.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof n.A?e.items[t]:e[t]}function p(e){return e?e.declaredClass:null}function c(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const i=l(e),n=l(t);if(0===i.length&&0===n.length)return;if(!i.length||!n.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const s=n.filter(e=>!i.includes(e)),d=i.filter(e=>!n.includes(e)),y=i.filter(r=>n.includes(r)&&u(e,r)!==u(t,r)).concat(s,d).sort(),f=p(e);if(f&&o.has(f)&&y.length)return{type:"complete",oldValue:e,newValue:t};let m;const h=a(e)&&a(t);for(const i of y){const n=u(e,i),s=u(t,i);let o;if((h||"function"!=typeof n&&"function"!=typeof s)&&n!==s&&(null!=n||null!=s)){if(r&&r[i]&&"function"==typeof r[i])o=r[i]?.(n,s);else if(n instanceof Date&&s instanceof Date){if(n.getTime()===s.getTime())continue;o={type:"complete",oldValue:n,newValue:s}}else o="object"==typeof n&&"object"==typeof s&&p(n)===p(s)?c(n,s):{type:"complete",oldValue:n,newValue:s};null!=o&&(null!=m?m.diff[i]=o:m={type:"partial",diff:{[i]:o}})}}return m}function d(e,t){return function(e,t){if(null==e)return!1;const r=t.split(".");let i=e;for(const e of r){if("complete"===i.type)return!0;if("partial"!==i.type)return!1;{const t=i.diff[e];if(!t)return!1;i=t}}return!0}(e,t)}function y(e,t){if(!e)return!1;if("partial"===e.type){const r=Object.keys(e.diff);return 1===r.length&&r[0]===t}return!1}function f(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&p(e)!==p(t)?{type:"complete",oldValue:e,newValue:t}:c(e,t)}},8303:(e,t,r)=>{r.d(t,{A:()=>F});var i=r(31635),n=r(92602),s=r(70333),o=r(78888),a=r(60999),l=r(49186),u=r(53966),p=r(97768),c=r(74887),d=r(84952),y=r(10107),f=(r(44208),r(87811),r(36005)),m=r(40608),h=r(43937),g=r(77548),w=r(20655),b=r(80812),v=r(41318),T=r(10407);const F=e=>{const t=e;let F=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new b.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await r.e(1204).then(r.bind(r,41204));return(0,c.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,c.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,c.QP)(e),!0)))}async setUserPrivileges(e,t){if(!n.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:n}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",n)}catch(e){(0,c.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=!s.id?.findCredential(this.url),n=e===r.id;if(n&&r.portal.user)return this._getUserPrivileges(r,i);let o,a;if(n)o=r.portal.url;else try{o=await(0,g.wI)(this.url,t)}catch(e){(0,c.QP)(e)}if(!o||!(0,d.b8)(o,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(s.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.QP)(e)}const l=!0,u=!1,p=!1;if(!a)return{features:{edit:l,fullEdit:u},content:{updateItem:p}};try{if(n?await r.reload():(r=new b.default({id:e,portal:{url:o}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,i)}catch(e){(0,c.QP)(e)}return{features:{edit:l,fullEdit:u},content:{updateItem:p}}}_getUserPrivileges(e,t){const r=(0,T.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const r=x.credential===t?x.user:await this._fetchEditingUser(e);return x.credential=t,x.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=s.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,n=w.A.getDefault();if(n&&n.loaded&&(0,d.S8)(n.restUrl)===(0,d.S8)(i))return n.user;const l=`${i}/community/self`,u=null!=e?e.signal:null,p=await(0,a.Ke)((0,o.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?v.A.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||w.A.getDefault());return r&&i&&!(0,d.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i.Cg)([(0,y.MZ)({type:b.default})],F.prototype,"portalItem",null),(0,i.Cg)([(0,f.w)("web-document","portalItem",["itemId"])],F.prototype,"readPortalItem",null),(0,i.Cg)([(0,h.K)("web-document","portalItem",{itemId:{type:String}})],F.prototype,"writePortalItem",null),(0,i.Cg)([(0,y.MZ)({clonable:!1})],F.prototype,"resourceReferences",void 0),(0,i.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],F.prototype,"userHasEditingPrivileges",void 0),(0,i.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],F.prototype,"userHasFullEditingPrivileges",void 0),(0,i.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],F.prototype,"userHasUpdateItemPrivileges",void 0),F=(0,i.Cg)([(0,m.$)("esri.layers.mixins.PortalLayer")],F),F},x={credential:null,user:null}},13043:(e,t,r)=>{function i(e,t){if(e&&t)for(const r of e.children)if(r.localName in t){const e=t[r.localName];if("function"==typeof e){const t=e(r);t&&i(r,t)}else i(r,e)}}function*n(e,t){for(const r of e.children)if(r.localName in t){const e=t[r.localName];"function"==typeof e?yield e(r):yield*n(r,e)}}r.d(t,{i:()=>n,p:()=>i})},13069:(e,t,r)=>{r.d(t,{AG:()=>a,lk:()=>n,vD:()=>o,yS:()=>s});const i="randomUUID"in crypto;function n(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function s(){return`{${n().toUpperCase()}}`}function o(){return`{${n()}}`}function a(e){const t=e.toUpperCase();return"{"!==e[0]?`{${t}}`:t}},16350:(e,t,r)=>{r.r(t),r.d(t,{default:()=>ee});var i=r(31635),n=r(13874),s=r(92071),o=r(93637),a=r(84952),l=r(10107),u=r(56507),p=r(44208),c=(r(87811),r(40608)),d=r(43937),y=r(5443),f=r(16930),m=r(50498),h=r(4146),g=r(49186),w=r(92474),b=r(53966),v=r(74887),T=r(29953),F=r(64714),x=r(34322),C=r(37745),I=r(22671),S=r(98623);let A=class extends w.A{constructor(){super(...arguments),this._connection=null,this._workerHandler=null,this.capabilities=(0,F.f)(!1,!1),this.type="wfs",this.refresh=(0,v.sg)(async()=>{await this.load();const e={customParameters:this.layer.customParameters,maxRecordCount:this.layer.maxRecordCount,maxTotalRecordCount:this.layer.maxTotalRecordCount,maxPageCount:this.layer.maxPageCount},{extent:t}=await this._workerHandler.refresh(e);return t&&(this.sourceJSON.extent=t),{dataChanged:!0,updates:{extent:this.sourceJSON.extent}}})}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._startWorker({signal:t})),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null,this._workerHandler=null}async openPorts(){return await this.load(),this._connection.openPorts()}async queryFeatures(e,t={}){const r=await this.queryFeaturesJSON(e,t);return I.A.fromJSON(r)}async queryFeaturesJSON(e,t={}){return await this.load(t),this._workerHandler.queryFeatures(e?e.toJSON():void 0,t)}async queryFeatureCount(e,t={}){return await this.load(t),this._workerHandler.queryFeatureCount(e?e.toJSON():void 0,t)}async queryObjectIds(e,t={}){return await this.load(t),this._workerHandler.queryObjectIds(e?e.toJSON():void 0,t)}async queryExtent(e,t={}){await this.load(t);const r=await this._workerHandler.queryExtent(e?e.toJSON():void 0,t);return{count:r.count,extent:y.A.fromJSON(r.extent)}}async querySnapping(e,t={}){return await this.load(t),this._workerHandler.querySnapping(e,t)}async queryAttributeBins(e,t={}){await this.load(t);const r=await this._workerHandler.queryAttributeBins(e?.toJSON(),t);return C.A.fromJSON(r)}async _createLoadOptions(e){const{url:t,customParameters:r,name:i,namespaceUri:n,fields:s,geometryType:o,maxRecordCount:a,maxPageCount:l,maxTotalRecordCount:u,swapXY:p}=this.layer,c="defaults"===this.layer.originOf("spatialReference")?void 0:this.layer.spatialReference;if(!t)throw new g.A("wfs-layer:missing-url","WFSLayer must be created with a url");this.wfsCapabilities||(this.wfsCapabilities=await(0,x.Fu)(t,{customParameters:r,...e}));const d=["fields","geometryType","name","namespaceUri","swapXY"].some(e=>null==this.layer[e]),y=d?await(0,x.O8)(this.wfsCapabilities,i,n,{spatialReference:c,customParameters:r,signal:e?.signal}):{...(0,x.YW)(s??[]),geometryType:o,name:i,namespaceUri:n,spatialReference:c,swapXY:p},f=(0,x.mG)(this.wfsCapabilities.readFeatureTypes(),y.name,y.namespaceUri),h=m.gy.toJSON(y.geometryType),{operations:w}=this.wfsCapabilities,b=w.GetFeature.url,v=w.GetFeature.outputFormat;return{customParameters:r,featureType:f,fields:y.fields?.map(e=>e.toJSON())??[],geometryField:y.geometryField,geometryType:h,getFeatureUrl:b,getFeatureOutputFormat:v,maxRecordCount:a,maxPageCount:l,maxTotalRecordCount:u,objectIdField:y.objectIdField,spatialReference:y.spatialReference?.toJSON(),swapXY:!!y.swapXY}}async _startWorker(e){const[t,r]=await(0,v.Lx)([this._createLoadOptions(e),(0,T.ho)("WFSSourceWorker",{...e,strategy:(0,p.A)("feature-layers-workers")?"dedicated":"local",registryTarget:this})]),i=t.error||r.error||null,n=r.value||null;if(i)throw n&&n.close(),i;const s=t.value;this._connection=r.value,this._workerHandler=this._connection.createInvokeProxy();const o=await this._workerHandler.load(s,e);for(const e of o.warnings)b.A.getLogger(this.layer).warn("#load()",`${e.message} (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}')`,{warning:e});this.sourceJSON={dateFieldsTimeReference:{timeZoneIANA:S.n$},extent:o.extent,fields:s.fields,geometryType:s.geometryType,objectIdField:s.objectIdField,geometryField:s.geometryField,drawingInfo:(0,F.F0)(s.geometryType),name:s.featureType.title,wfsInfo:{name:s.featureType.name,featureUrl:s.getFeatureUrl,maxFeatures:s.maxRecordCount,swapXY:s.swapXY,supportedSpatialReferences:s.featureType.supportedSpatialReferences,version:"2.0.0",wfsNamespace:s.featureType.namespaceUri}}}};(0,i.Cg)([(0,l.MZ)()],A.prototype,"capabilities",void 0),(0,i.Cg)([(0,l.MZ)({constructOnly:!0})],A.prototype,"layer",void 0),(0,i.Cg)([(0,l.MZ)()],A.prototype,"sourceJSON",void 0),(0,i.Cg)([(0,l.MZ)()],A.prototype,"type",void 0),(0,i.Cg)([(0,l.MZ)()],A.prototype,"wfsCapabilities",void 0),A=(0,i.Cg)([(0,c.$)("esri.layers.graphics.sources.WFSSource")],A);var M,_=r(63074),N=r(69208),P=r(6455),O=r(87718),E=r(76294),R=r(16131),j=r(32756),Z=r(8303),D=r(54310),k=r(25036),$=r(82935),U=r(68109),G=r(10873),L=r(15426),q=r(20437),z=r(17036),J=r(30524),V=r(46499),B=r(39383),Y=r(41214),H=r(61956),W=r(30291),Q=r(56400);const X=(0,z.p)();let K=M=class extends((0,j.fY)((0,P.FJ)((0,N.d)((0,E.J)((0,O.F)((0,_.dM)((0,$.e)((0,U.d)((0,D.J)((0,k.j)((0,R.q)((0,Z.A)((0,s.P)(h.A)))))))))))))){static fromWFSLayerInfo(e){const{customParameters:t,fields:r,geometryField:i,geometryType:n,name:s,namespaceUri:o,objectIdField:a,spatialReference:l,swapXY:u,url:p,wfsCapabilities:c}=e;return new M({customParameters:t,fields:r,geometryField:i,geometryType:n,name:s,namespaceUri:o,objectIdField:a,spatialReference:l,swapXY:u,url:p,wfsCapabilities:c})}constructor(e){super(e),this.copyright=null,this.customParameters=null,this.dateFieldsTimeZone=null,this.definitionExpression=null,this.displayField=null,this.elevationInfo=null,this.featureUrl=void 0,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.objectIdField=null,this.operationalLayerType="WFS",this.maxRecordCount=3e3,this.maxPageCount=10,this.maxTotalRecordCount=2e5,this.mode=0,this.name=null,this.namespaceUri=null,this.outFields=null,this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new A({layer:this}),this.spatialReference=f.A.WGS84,this.spatialReferences=[4326],this.swapXY=void 0,this.title="WFS",this.type="wfs",this.url=null,this.version=void 0}destroy(){this.source?.destroy()}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WFS"]},e).then(()=>this.source.load(e)).then(()=>{this.read(this.source.sourceJSON,{origin:"service",url:this.parsedUrl}),this.revert(["objectIdField","fields","timeInfo","spatialReference","name","namespaceUri"],"service"),(0,J.yp)(this.renderer,this.fieldsIndex),(0,J.sv)(this.timeInfo,this.fieldsIndex)})),Promise.resolve(this)}get capabilities(){return this.source?.capabilities}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("capabilities"),(this._get("createQueryVersion")||0)+1}get defaultPopupTemplate(){return this.createPopupTemplate()}writeFields(e,t,r){const i=e.filter(e=>e.name!==x.i5);this.geometryField&&i.unshift(new q.A({name:this.geometryField,alias:this.geometryField,type:"geometry"})),(0,o.sM)(r,i.map(e=>e.toJSON()),t)}get parsedUrl(){return(0,a.An)(this.url)}set renderer(e){(0,J.yp)(e,this.fieldsIndex),this._set("renderer",e)}get wfsCapabilities(){return this.source?.wfsCapabilities}set wfsCapabilities(e){this.source&&(this.source.wfsCapabilities=e)}createPopupTemplate(e){return(0,W.tn)(this,e)}createQuery(){const e=new H.A({returnGeometry:!0,outFields:["*"],where:this.definitionExpression||"1=1"}),{timeOffset:t,timeExtent:r}=this;return e.timeExtent=null!=t&&null!=r?r.offset(-t.value,t.unit):r||null,e}getFieldDomain(e,t){return this.getField(e)?.domain}getField(e){return this.fieldsIndex?.get(e)}queryFeatures(e,t){return this.load().then(()=>this.source.queryFeatures(H.A.from(e)||this.createQuery(),t)).then(e=>{if(e?.features)for(const t of e.features)t.layer=t.sourceLayer=this;return e})}queryObjectIds(e,t){return this.load().then(()=>this.source.queryObjectIds(H.A.from(e)||this.createQuery(),t))}queryFeatureCount(e,t){return this.load().then(()=>this.source.queryFeatureCount(H.A.from(e)||this.createQuery(),t))}queryExtent(e,t){return this.load().then(()=>this.source.queryExtent(H.A.from(e)||this.createQuery(),t))}async queryAttributeBins(e,t){const{source:i,capabilities:n}=await this.load();(0,L.ZJ)(e,n,"WFSLayer");const s=await Promise.all([r.e(4575),r.e(7136)]).then(r.bind(r,14575)),o=await i.queryAttributeBins(s.default.from(e),t);if(o.features)for(const e of o.features)e.layer=e.sourceLayer=this;return o}async hasDataChanged(){try{const{dataChanged:e,updates:t}=await this.source.refresh();return null!=t&&this.read(t,{origin:"service",url:this.parsedUrl,ignoreDefaults:!0}),e}catch{}return!1}};(0,i.Cg)([(0,l.MZ)({readOnly:!0})],K.prototype,"capabilities",null),(0,i.Cg)([(0,l.MZ)({type:String})],K.prototype,"copyright",void 0),(0,i.Cg)([(0,l.MZ)({readOnly:!0})],K.prototype,"createQueryVersion",null),(0,i.Cg)([(0,l.MZ)({json:{name:"wfsInfo.customParameters",write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0),ignoreOrigin:!0})}}})],K.prototype,"customParameters",void 0),(0,i.Cg)([(0,l.MZ)((0,Q.P6)("dateFieldsTimeReference"))],K.prototype,"dateFieldsTimeZone",void 0),(0,i.Cg)([(0,l.MZ)({readOnly:!0})],K.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,l.MZ)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],K.prototype,"definitionExpression",void 0),(0,i.Cg)([(0,l.MZ)({type:String})],K.prototype,"displayField",void 0),(0,i.Cg)([(0,l.MZ)(G.Yj)],K.prototype,"elevationInfo",void 0),(0,i.Cg)([(0,l.MZ)({type:String,readOnly:!0,json:{name:"wfsInfo.featureUrl",write:{ignoreOrigin:!0,isRequired:!0}}})],K.prototype,"featureUrl",void 0),(0,i.Cg)([(0,l.MZ)({type:[q.A],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],K.prototype,"fields",void 0),(0,i.Cg)([(0,d.K)("fields")],K.prototype,"writeFields",null),(0,i.Cg)([(0,l.MZ)(X.fieldsIndex)],K.prototype,"fieldsIndex",void 0),(0,i.Cg)([(0,l.MZ)({type:y.A,json:{name:"extent"}})],K.prototype,"fullExtent",void 0),(0,i.Cg)([(0,l.MZ)()],K.prototype,"geometryField",void 0),(0,i.Cg)([(0,l.MZ)({type:String,json:{read:{source:"layerDefinition.geometryType",reader:m.gy.read},write:{target:"layerDefinition.geometryType",writer:m.gy.write,ignoreOrigin:!0},origins:{service:{read:m.gy.read}}}})],K.prototype,"geometryType",void 0),(0,i.Cg)([(0,l.MZ)({type:String})],K.prototype,"id",void 0),(0,i.Cg)([(0,l.MZ)(G.kF)],K.prototype,"labelsVisible",void 0),(0,i.Cg)([(0,l.MZ)({type:[V.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:B.w},write:!0}})],K.prototype,"labelingInfo",void 0),(0,i.Cg)([(0,l.MZ)(G.fV)],K.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,l.MZ)({type:["show","hide"]})],K.prototype,"listMode",void 0),(0,i.Cg)([(0,l.MZ)({type:String})],K.prototype,"objectIdField",void 0),(0,i.Cg)([(0,l.MZ)({type:["WFS"]})],K.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,l.MZ)({type:u.jz,json:{name:"wfsInfo.maxFeatures",write:{ignoreOrigin:!0,isRequired:!0}}})],K.prototype,"maxRecordCount",void 0),(0,i.Cg)([(0,l.MZ)({type:u.jz})],K.prototype,"maxPageCount",void 0),(0,i.Cg)([(0,l.MZ)({type:u.jz})],K.prototype,"maxTotalRecordCount",void 0),(0,i.Cg)([(0,l.MZ)({type:[0],readOnly:!0,json:{origins:{"web-map":{write:{ignoreOrigin:!0,isRequired:!0}}}}})],K.prototype,"mode",void 0),(0,i.Cg)([(0,l.MZ)({type:String,json:{name:"wfsInfo.name",write:{ignoreOrigin:!0,isRequired:!0}}})],K.prototype,"name",void 0),(0,i.Cg)([(0,l.MZ)({type:String,json:{name:"wfsInfo.wfsNamespace",write:{ignoreOrigin:!0,isRequired:!0}}})],K.prototype,"namespaceUri",void 0),(0,i.Cg)([(0,l.MZ)(G.Ih)],K.prototype,"opacity",void 0),(0,i.Cg)([(0,l.MZ)(X.outFields)],K.prototype,"outFields",void 0),(0,i.Cg)([(0,l.MZ)({readOnly:!0})],K.prototype,"parsedUrl",null),(0,i.Cg)([(0,l.MZ)(G.M6)],K.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,l.MZ)({type:n.A,json:{name:"popupInfo",write:!0}})],K.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,l.MZ)({types:Y.Hg,json:{origins:{service:{name:"drawingInfo.renderer"},"web-scene":{types:Y.XJ,name:"layerDefinition.drawingInfo.renderer",write:!0}},name:"layerDefinition.drawingInfo.renderer",write:{ignoreOrigin:!0}}})],K.prototype,"renderer",null),(0,i.Cg)([(0,l.MZ)(G.PY)],K.prototype,"screenSizePerspectiveEnabled",void 0),(0,i.Cg)([(0,l.MZ)({readOnly:!0})],K.prototype,"source",void 0),(0,i.Cg)([(0,l.MZ)({type:f.A,json:{name:"layerDefinition.spatialReference",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"extent.spatialReference"}}}})],K.prototype,"spatialReference",void 0),(0,i.Cg)([(0,l.MZ)({readOnly:!0,type:[u.jz],json:{name:"wfsInfo.supportedSpatialReferences",write:{ignoreOrigin:!0,isRequired:!0}}})],K.prototype,"spatialReferences",void 0),(0,i.Cg)([(0,l.MZ)({type:Boolean,value:!1,json:{name:"wfsInfo.swapXY",write:{ignoreOrigin:!0,isRequired:!0}}})],K.prototype,"swapXY",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"name"}}}})],K.prototype,"title",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!1},readOnly:!0})],K.prototype,"type",void 0),(0,i.Cg)([(0,l.MZ)(G.OZ)],K.prototype,"url",void 0),(0,i.Cg)([(0,l.MZ)({type:String,readOnly:!0,json:{name:"wfsInfo.version",write:{ignoreOrigin:!0,isRequired:!0}}})],K.prototype,"version",void 0),(0,i.Cg)([(0,l.MZ)()],K.prototype,"wfsCapabilities",null),K=M=(0,i.Cg)([(0,c.$)("esri.layers.WFSLayer")],K);const ee=K},17036:(e,t,r)=>{r.d(t,{p:()=>l});var i=r(44208),n=r(53966),s=r(20437),o=r(95466),a=r(30524);function l(){return{fields:{type:[s.A],value:null,set:function(e){if(e&&(0,i.A)("big-integer-warning-enabled")){const t=e.filter(e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8);if(t.length){const e=t.map(e=>`'${e.name}'`).join(", ");n.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return o.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const r=this.fieldsIndex?.has(t);r||n.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,a.DB)(this.fieldsIndex,e)}}}}},22671:(e,t,r)=>{r.d(t,{A:()=>w});var i,n=r(31635),s=r(52106),o=r(66552),a=r(25482),l=r(4718),u=r(10107),p=(r(44208),r(53966),r(36005)),c=r(40608),d=r(43937),y=r(16930),f=r(65864),m=r(50498),h=r(20437);const g=new o.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let w=i=class extends a.A{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,s.A)}writeGeometryType(e,t,r,i){if(e)return void g.write(e,t,r,i);const{features:n}=this;if(n)for(const e of n)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,f.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=y.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,l.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,n]}=e,s=this.features,o=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-i)/t),e=>Math.round((n-e)/r));for(let e=0,t=s.length;e<t;e++)o?.(s[e].geometry)||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,n],scale:[s,o]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,e=>e*s+i,e=>n-e*o,a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const i=y.A.fromJSON(t.spatialReference),n=[];for(let t=0;t<e.length;t++){const s=e[t],o=r.fromJSON(s),a=s.geometry?.spatialReference;null==o.geometry||a||(o.geometry.spatialReference=i);const l=s.aggregateGeometries,u=o.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],r=l[e],n=r?.spatialReference;null==t||n||(t.spatialReference=i)}n.push(o)}return n}_quantizePoints(e,t,r){let i,n;const s=[];for(let o=0,a=e.length;o<a;o++){const a=e[o];if(o>0){const e=t(a[0]),o=r(a[1]);e===i&&o===n||(s.push([e-i,o-n]),i=e,n=o)}else i=t(a[0]),n=r(a[1]),s.push([i,n])}return s.length>0?s:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,f.Bi)(e)?e.rings:e.paths,n=[];for(let e=0,s=i.length;e<s;e++){const s=i[e],o=this._quantizePoints(s,t,r);o&&n.push(o)}return n.length>0?((0,f.Bi)(e)?e.rings=n:e.paths=n,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,n){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const s=(0,f.Bi)(e)?e.rings:e.paths;let o,a;for(let e=0,i=s.length;e<i;e++){const i=s[e];for(let e=0,n=i.length;e<n;e++){const n=i[e];e>0?(o+=n[0],a+=n[1]):(o=n[0],a=n[1]),n[0]=t(o),n[1]=r(a)}}if(i&&n)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=n(r[3])}}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(n)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),n&&null!=e.mmax&&null!=e.mmin&&(e.mmax=n(e.mmax),e.mmin=n(e.mmin))}:"multipoint"===e?e=>{const s=e.points;let o,a;for(let e=0,i=s.length;e<i;e++){const i=s[e];e>0?(o+=i[0],a+=i[1]):(o=i[0],a=i[1]),i[0]=t(o),i[1]=r(a)}if(i&&n)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2]),t[3]=n(t[3])}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2])}else if(n)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=n(t[2])}}:null}};(0,n.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],w.prototype,"displayFieldName",void 0),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"exceededTransferLimit",void 0),(0,n.Cg)([(0,u.MZ)({type:[s.A],json:{write:!0}})],w.prototype,"features",void 0),(0,n.Cg)([(0,p.w)("features")],w.prototype,"readFeatures",null),(0,n.Cg)([(0,u.MZ)({type:[h.A],json:{write:!0}})],w.prototype,"fields",void 0),(0,n.Cg)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],w.prototype,"geometryType",void 0),(0,n.Cg)([(0,d.K)("geometryType")],w.prototype,"writeGeometryType",null),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasM",void 0),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasZ",void 0),(0,n.Cg)([(0,u.MZ)({types:m.yR,json:{write:!0}})],w.prototype,"queryGeometry",void 0),(0,n.Cg)([(0,p.w)("queryGeometry")],w.prototype,"readQueryGeometry",null),(0,n.Cg)([(0,u.MZ)({type:y.A,json:{write:!0}})],w.prototype,"spatialReference",void 0),(0,n.Cg)([(0,d.K)("spatialReference")],w.prototype,"writeSpatialReference",null),(0,n.Cg)([(0,u.MZ)({json:{write:!0}})],w.prototype,"transform",void 0),w=i=(0,n.Cg)([(0,c.$)("esri.rest.support.FeatureSet")],w),w.prototype.toJSON.isDefaultToJSON=!0},26253:(e,t,r)=>{r.d(t,{T:()=>c});var i=r(31635),n=r(69540),s=r(25482),o=r(88930),a=r(10107),l=(r(44208),r(53966),r(87811),r(93223)),u=r(40608),p=r(73133);let c=class extends(n.A.ClonableMixin(s.A)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,o.t)(this.value,this.unit,"milliseconds")}};(0,i.Cg)([(0,l.e)(p.j,{nonNullable:!0})],c.prototype,"unit",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0},nonNullable:!0})],c.prototype,"value",void 0),c=(0,i.Cg)([(0,u.$)("esri.time.TimeInterval")],c)},27647:(e,t,r)=>{function i(e,t){return e?t?4:3:t?3:2}function n(e,t,r,n){if(!t?.lengths.length)return null;e.lengths.length&&(e.lengths.length=0),e.coords.length&&(e.coords.length=0);const a=e.coords,l=[],u=r?[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]:[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY],{lengths:p,coords:c}=t,d=i(r,n);let y=0;for(const e of p){const t=s(u,c,y,e,r,n);t&&l.push(t),y+=e*d}if(l.sort((e,t)=>{let i=e[2]-t[2];return 0===i&&r&&(i=e[4]-t[4]),i}),l.length){let e=6*l[0][2];a[0]=l[0][0]/e,a[1]=l[0][1]/e,r&&(e=6*l[0][4],a[2]=0!==e?l[0][3]/e:0),(a[0]<u[0]||a[0]>u[1]||a[1]<u[2]||a[1]>u[3]||r&&(a[2]<u[4]||a[2]>u[5]))&&(a.length=0)}if(!a.length){const e=t.lengths[0]?o(c,0,p[0],r,n):null;if(!e)return null;a[0]=e[0],a[1]=e[1],r&&e.length>2&&(a[2]=e[2])}return e}function s(e,t,r,n,s,o){const a=i(s,o);let l=r,u=r+a,p=0,c=0,d=0,y=0,f=0;for(let r=0,i=n-1;r<i;r++,l+=a,u+=a){const r=t[l],i=t[l+1],n=t[l+2],o=t[u],a=t[u+1],m=t[u+2];let h=r*a-o*i;y+=h,p+=(r+o)*h,c+=(i+a)*h,s&&(h=r*m-o*n,d+=(n+m)*h,f+=h),r<e[0]&&(e[0]=r),r>e[1]&&(e[1]=r),i<e[2]&&(e[2]=i),i>e[3]&&(e[3]=i),s&&(n<e[4]&&(e[4]=n),n>e[5]&&(e[5]=n))}if(y>0&&(y*=-1),f>0&&(f*=-1),!y)return null;const m=[p,c,.5*y];return s&&(m[3]=d,m[4]=.5*f),m}function o(e,t,r,n,s){const o=i(n,s);let c=t,d=t+o,y=0,f=0,m=0,h=0;for(let t=0,i=r-1;t<i;t++,c+=o,d+=o){const t=e[c],r=e[c+1],i=e[c+2],s=e[d],o=e[d+1],g=e[d+2],w=n?l(t,r,i,s,o,g):a(t,r,s,o);if(w)if(y+=w,n){const e=p(t,r,i,s,o,g);f+=w*e[0],m+=w*e[1],h+=w*e[2]}else{const e=u(t,r,s,o);f+=w*e[0],m+=w*e[1]}}return y>0?n?[f/y,m/y,h/y]:[f/y,m/y]:r>0?n?[e[t],e[t+1],e[t+2]]:[e[t],e[t+1]]:null}function a(e,t,r,i){const n=r-e,s=i-t;return Math.sqrt(n*n+s*s)}function l(e,t,r,i,n,s){const o=i-e,a=n-t,l=s-r;return Math.sqrt(o*o+a*a+l*l)}function u(e,t,r,i){return[e+.5*(r-e),t+.5*(i-t)]}function p(e,t,r,i,n,s){return[e+.5*(i-e),t+.5*(n-t),r+.5*(s-r)]}r.d(t,{Q:()=>n})},32730:(e,t,r)=>{r.d(t,{BI:()=>h,D3:()=>f,XJ:()=>m,lc:()=>y,mX:()=>w,rU:()=>g,tH:()=>x});var i=r(799);const n="__begin__",s="__end__",o=new RegExp(n,"ig"),a=new RegExp(s,"ig"),l=new RegExp("^"+n,"i"),u=new RegExp(s+"$","i"),p='"',c=p+" + ",d=" + "+p;function y(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function f(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function m(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=y(e.labelExpression),t.type="conventional"),t}function h(e){const t=m(e);if(!t)return null;switch(t.type){case"conventional":return w(t.expression);case"arcade":return t.expression}return null}function g(e){const t=m(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(b);return t?.[1].trim()||null}(t.expression);case"arcade":return x(t.expression)}return null}function w(e){let t;return e?(t=(0,i.HC)(e,e=>n+'$feature["'+e+'"]'+s),t=l.test(t)?t.replace(l,""):p+t,t=u.test(t)?t.replace(u,""):t+p,t=t.replaceAll(o,c).replaceAll(a,d)):t='""',t}const b=/^\s*\{([^}]+)\}\s*$/i,v=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,T=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,F=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function x(e){if(!e)return null;let t=v.exec(e)||T.exec(e);return t?t[1]||t[3]:(t=F.exec(e),t?t[2]:null)}},32756:(e,t,r)=>{r.d(t,{Rr:()=>l,fY:()=>p,ne:()=>u});var i=r(31635),n=r(93637),s=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),a=r(91880);function l(e,t,r){if(!e)return null;const i=e.find(e=>!!e.field);if(!i)return null;const n=new a.A;return n.read(i,r),[n]}const u={type:[a.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:l},write:{writer:function(e,t,r,i){const s=e.find(e=>!!e.field);s&&(0,n.sM)(r,[s.toJSON()],t)}}}},p=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,i.Cg)([(0,s.MZ)(u)],r.prototype,"orderBy",void 0),r=(0,i.Cg)([(0,o.$)("esri.layers.mixins.OrderedLayer")],r),r}},34322:(e,t,r)=>{r.d(t,{E:()=>q,Fu:()=>N,O8:()=>Z,UH:()=>B,YW:()=>D,i5:()=>b,mG:()=>j,x$:()=>G});var i=r(78888),n=r(49186),s=r(5479),o=r(84952),a=r(5443),l=r(98988),u=r(16930),p=r(21325),c=r(50498),d=r(85113),y=r(13043),f=r(60694),m=r(20437),h=r(30524);const g="xlink:href",w="2.0.0",b="__esri_wfs_id__",v="wfs-layer:getWFSLayerTypeInfo-error",T="wfs-layer:empty-service",F="wfs-layer:feature-type-not-found",x="wfs-layer:geojson-not-supported",C="wfs-layer:kvp-encoding-not-supported",I="wfs-layer:malformed-json",S="wfs-layer:unknown-geometry-type",A="wfs-layer:unknown-field-type",M="wfs-layer:unsupported-spatial-reference",_="wfs-layer:unsupported-wfs-version";async function N(e,t){const r=function(e){const t=z(e);(function(e){const t=e.firstElementChild?.getAttribute("version");if(t&&t!==w)throw new n.A(_,`Unsupported WFS version ${t}. Supported version: ${w}`)})(t),V(t);const r=t.firstElementChild,i=(0,s.PP)(function(e){return(0,y.i)(e,{FeatureTypeList:{FeatureType:e=>{const t={typeName:"undefined:undefined",name:"",title:"",description:"",extent:null,namespacePrefix:"",namespaceUri:"",defaultSpatialReference:4326,supportedSpatialReferences:[]},r=new Set;return(0,y.p)(e,{Name:e=>{const{name:r,prefix:i}=J(e.textContent);t.typeName=`${i}:${r}`,t.name=r,t.namespacePrefix=i,t.namespaceUri=e.lookupNamespaceURI(i)},Abstract:e=>{t.description=e.textContent},Title:e=>{t.title=e.textContent},WGS84BoundingBox:e=>{t.extent=a.A.fromJSON(function(e){let t,r,i,n;for(const s of e.children)switch(s.localName){case"LowerCorner":[t,r]=s.textContent.split(" ").map(e=>Number.parseFloat(e));break;case"UpperCorner":[i,n]=s.textContent.split(" ").map(e=>Number.parseFloat(e))}return{xmin:t,ymin:r,xmax:i,ymax:n,spatialReference:p.KK}}(e))},DefaultCRS:e=>{const i=R(e);i&&(t.defaultSpatialReference=i,r.add(i))},OtherCRS:e=>{const t=R(e);t&&r.add(t)}}),t.title||(t.title=t.name),r.add(4326),t.supportedSpatialReferences.push(...r),t}}})}(r));return{operations:E(r),get featureTypes(){return Array.from(i())},readFeatureTypes:i}}((await(0,i.A)(e,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"GetCapabilities",VERSION:w,...t?.customParameters},signal:t?.signal})).data);return function(e,t){(0,o.m3)(e)&&((0,o.FX)(e,t.operations.DescribeFeatureType.url,!0)&&(t.operations.DescribeFeatureType.url=(0,o.lM)(t.operations.DescribeFeatureType.url)),(0,o.FX)(e,t.operations.GetFeature.url,!0)&&(t.operations.GetFeature.url=(0,o.lM)(t.operations.GetFeature.url)))}(e,r),r}const P=["json","application/json; subtype=geojson; charset=utf-8","application/json; subtype=geojson","application/json","geojson","application/geo+json"];function O(e){for(const t of P){const r=e.findIndex(e=>e.toLowerCase()===t);if(r>=0)return e[r]}return null}function E(e){let t=!0;const r={GetCapabilities:{url:""},DescribeFeatureType:{url:""},GetFeature:{url:"",outputFormat:null,supportsPagination:!1}},i=[],s=[];if((0,y.p)(e,{OperationsMetadata:{Parameter:e=>{if("outputformat"===e.getAttribute("name")?.toLowerCase())return{AllowedValues:{Value:({textContent:e})=>{e&&i.push(e)}}}},Operation:e=>{switch(e.getAttribute("name")){case"GetCapabilities":return{DCP:{HTTP:{Get:e=>{r.GetCapabilities.url=e.getAttribute(g)}}}};case"DescribeFeatureType":return{DCP:{HTTP:{Get:e=>{r.DescribeFeatureType.url=e.getAttribute(g)}}}};case"GetFeature":return{DCP:{HTTP:{Get:e=>{r.GetFeature.url=e.getAttribute(g)}}},Parameter:e=>{if("outputformat"===e.getAttribute("name")?.toLowerCase())return{AllowedValues:{Value:({textContent:e})=>{e&&s.push(e)}}}}}}},Constraint:e=>{switch(e.getAttribute("name")){case"KVPEncoding":return{DefaultValue:e=>{t="true"===e.textContent.toLowerCase()}};case"ImplementsResultPaging":return{DefaultValue:e=>{r.GetFeature.supportsPagination="true"===e.textContent.toLowerCase()}}}}}}),r.GetFeature.outputFormat=O(s)??O(i),!t)throw new n.A(C,"WFS service doesn't support key/value pair (KVP) encoding");if(null==r.GetFeature.outputFormat)throw new n.A(x,"WFS service doesn't support GeoJSON output format");return r}function R(e){const t=parseInt(e.textContent?.match(/(?<wkid>\d+$)/i)?.groups?.wkid??"",10);if(!Number.isNaN(t))return t}function j(e,t,r){return(0,s.I6)(e,e=>r?e.name===t&&e.namespaceUri===r:e.typeName===t||e.name===t)}async function Z(e,t,r,i={}){const{featureType:s,extent:o}=await async function(e,t,r,i={}){const s=e.readFeatureTypes(),o=t?j(s,t,r):s.next().value,{spatialReference:a=new u.A({wkid:o?.defaultSpatialReference})}=i;if(null==o)throw t?new n.A(F,`The type '${t}' could not be found in the service`):new n.A(T,"The service is empty");let c=o.extent;if(c&&!(0,p.aI)(c.spatialReference,a))try{await(0,l.initializeProjection)(c.spatialReference,a,void 0,i),c=(0,l.project)(c,a)}catch{throw new n.A(M,"Projection not supported")}return{extent:c,spatialReference:a,featureType:o}}(e,t,r,i),{spatialReference:a}=B(e.operations.GetFeature.url,s,i.spatialReference),{fields:c,geometryType:d,swapXY:y,objectIdField:f,geometryField:m}=await async function(e,t,r,i={}){const{typeName:s}=t,[o,a]=await Promise.allSettled([$(e.operations.DescribeFeatureType.url,s,i),k(e,s,r,i)]),l=e=>new n.A(v,`An error occurred while getting info about the feature type '${s}'`,{error:e});if("rejected"===o.status)throw l(o.reason);if("rejected"===a.status)throw l(a.reason);const{fields:u,errors:p}=o.value??{},c=o.value?.geometryType||a.value?.geometryType,d=a.value?.swapXY??!1;if(null==c)throw new n.A(S,`The geometry type could not be determined for type '${s}`,{typeName:s,geometryType:c,fields:u,errors:p});return{...D(u??[]),geometryType:c,swapXY:d}}(e,s,a,i);return{url:e.operations.GetCapabilities.url,name:s.name,namespaceUri:s.namespaceUri,fields:c,geometryField:m,geometryType:d,objectIdField:f,spatialReference:i.spatialReference??new u.A({wkid:s.defaultSpatialReference}),extent:o,swapXY:y,wfsCapabilities:e,customParameters:i.customParameters}}function D(e){const t=e.find(e=>"geometry"===e.type);let r=e.find(e=>"oid"===e.type);return e=e.filter(e=>"geometry"!==e.type),r||(r=new m.A({name:b,type:"oid",alias:b}),e.unshift(r)),{geometryField:t?.name??null,objectIdField:r.name,fields:e}}async function k(e,t,r,n={}){let s,o=!1;const[a,l]=await Promise.all([G(e.operations.GetFeature.url,t,r,e.operations.GetFeature.outputFormat,{...n,count:1}),(0,i.A)(e.operations.GetFeature.url,{responseType:"text",query:L(t,r,void 0,{...n,count:1}),signal:n?.signal})]),u="FeatureCollection"===a.type&&a.features[0]?.geometry;if(u){let e;switch(s=c.gy.fromJSON((0,d.xD)(u.type)),u.type){case"Point":e=u.coordinates;break;case"LineString":case"MultiPoint":e=u.coordinates[0];break;case"MultiLineString":case"Polygon":e=u.coordinates[0][0];break;case"MultiPolygon":e=u.coordinates[0][0][0]}const t=/<[^>]*pos[^>]*> *(-?\d+(?:\.\d+)?) (-?\d+(?:\.\d+)?)/.exec(l.data);if(t){const r=e[0].toFixed(3),i=e[1].toFixed(3),n=parseFloat(t[1]).toFixed(3);r===parseFloat(t[2]).toFixed(3)&&i===n&&(o=!0)}}return{geometryType:s,swapXY:o}}async function $(e,t,r){return function(e,t){const{name:r}=J(e),i=z(t);V(i);const o=(0,s.I6)((0,y.i)(i.firstElementChild,{element:e=>e}),e=>e.getAttribute("name")===r);if(null!=o){const e=o.getAttribute("type"),t=e?(0,s.I6)((0,y.i)(i.firstElementChild,{complexType:e=>e}),t=>t.getAttribute("name")===J(e).name):(0,s.I6)((0,y.i)(o,{complexType:e=>e}),()=>!0);if(t)return function(e){const t=[],r=[];let i;const s=(0,y.i)(e,{complexContent:{extension:{sequence:{element:e=>e}}}});for(const o of s){const s=o.getAttribute("name");if(!s)continue;let a,l;if(o.hasAttribute("type")?a=J(o.getAttribute("type")).name:(0,y.p)(o,{simpleType:{restriction:e=>(a=J(e.getAttribute("base")).name,{maxLength:e=>{l=+e.getAttribute("value")}})}}),!a)continue;const u="true"===o.getAttribute("nillable");let p=!1;switch(a.toLowerCase()){case"integer":case"nonpositiveinteger":case"negativeinteger":case"long":case"int":case"short":case"byte":case"nonnegativeinteger":case"unsignedlong":case"unsignedint":case"unsignedshort":case"unsignedbyte":case"positiveinteger":r.push(new m.A({name:s,alias:s,type:"integer",nullable:u,length:(0,h._b)("integer")}));break;case"float":case"double":case"decimal":r.push(new m.A({name:s,alias:s,type:"double",nullable:u,length:(0,h._b)("double")}));break;case"boolean":case"string":case"gyearmonth":case"gyear":case"gmonthday":case"gday":case"gmonth":case"anyuri":case"qname":case"notation":case"normalizedstring":case"token":case"language":case"idrefs":case"entities":case"nmtoken":case"nmtokens":case"name":case"ncname":case"id":case"idref":case"entity":case"duration":case"time":r.push(new m.A({name:s,alias:s,type:"string",nullable:u,length:l??(0,h._b)("string")}));break;case"datetime":case"date":r.push(new m.A({name:s,alias:s,type:"date",nullable:u,length:l??(0,h._b)("date")}));break;case"pointpropertytype":i="point",p=!0;break;case"multipointpropertytype":i="multipoint",p=!0;break;case"curvepropertytype":case"multicurvepropertytype":case"multilinestringpropertytype":i="polyline",p=!0;break;case"surfacepropertytype":case"multisurfacepropertytype":case"multipolygonpropertytype":i="polygon",p=!0;break;case"geometrypropertytype":case"multigeometrypropertytype":p=!0,t.push(new n.A(S,`geometry type '${a}' is not supported`,{type:(new XMLSerializer).serializeToString(e)}));break;default:t.push(new n.A(A,`Unknown field type '${a}'`,{type:(new XMLSerializer).serializeToString(e)}))}p&&r.push(new m.A({name:s,alias:s,type:"geometry",nullable:u}))}for(const e of r)if("integer"===e.type&&!e.nullable&&U.has(e.name.toLowerCase())){e.type="oid";break}return{geometryType:i,fields:r,errors:t}}(t)}throw new n.A(F,`Type '${e}' not found in document`,{document:(new XMLSerializer).serializeToString(i)})}(t,(await(0,i.A)(e,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"DescribeFeatureType",VERSION:w,TYPENAME:t,TYPENAMES:t,...r?.customParameters},signal:r?.signal})).data)}const U=new Set(["objectid","fid"]);async function G(e,t,r,s,o){let{data:a}=await(0,i.A)(e,{responseType:"text",query:L(t,r,s,o),signal:o?.signal});a=a.replaceAll(/": +(-?\d+),(\d+)(,)?/g,'": $1.$2$3');try{return JSON.parse(a)}catch(e){throw new n.A(I,"Error while parsing the response",{response:a,error:e})}}function L(e,t,r,i){const n="number"==typeof t?t:t.wkid;return{SERVICE:"WFS",REQUEST:"GetFeature",VERSION:w,TYPENAMES:e,OUTPUTFORMAT:r,SRSNAME:"EPSG:"+n,STARTINDEX:i?.startIndex,COUNT:i?.count,...i?.customParameters}}async function q(e,t,r){const n=await(0,i.A)(e,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"GetFeature",VERSION:w,TYPENAMES:t,RESULTTYPE:"hits",...r?.customParameters},signal:r?.signal}),s=/numberMatched=["'](?<numberMatched>\d+)["']/gi.exec(n.data);if(s?.groups)return+s.groups.numberMatched}function z(e){return(new DOMParser).parseFromString(e.trim(),"text/xml")}function J(e){const[t,r]=e.split(":");return{prefix:r?t:"",name:r??t}}function V(e){let t="",r="";if((0,y.p)(e.firstElementChild,{Exception:e=>(t=e.getAttribute("exceptionCode"),{ExceptionText:e=>{r=e.textContent}})}),t)throw new n.A(`wfs-layer:${t}`,r)}function B(e,t,r){const i={wkid:t.defaultSpatialReference},n=null!=r?.wkid?{wkid:r.wkid}:i;return{spatialReference:n,getFeatureSpatialReference:(0,f.Fi)(e)||n.wkid&&t.supportedSpatialReferences.includes(n.wkid)?{wkid:n.wkid}:{wkid:t.defaultSpatialReference}}}},37745:(e,t,r)=>{r.d(t,{A:()=>y});var i,n=r(31635),s=r(52106),o=r(69540),a=r(4718),l=r(10107),u=(r(44208),r(53966),r(40608));let p=class extends(o.A.ClonableMixin(s.A)){static{i=this}constructor(e){super(e),this.stackedAttributes=null}cloneShallow(){return new i({...super.cloneShallow(),stackedAttributes:this.stackedAttributes})}toJSON(){return{...super.toJSON(),stackedAttributes:(0,a.o8)(this.stackedAttributes)}}};(0,n.Cg)([(0,l.MZ)()],p.prototype,"stackedAttributes",void 0),p=i=(0,n.Cg)([(0,u.$)("esri.AttributeBinsGraphic")],p),r(87811);var c=r(36005),d=r(22671);let y=class extends(o.A.ClonableMixin(d.A)){constructor(){super(...arguments),this.features=[]}readFeatures(e,t){return this.readFeaturesWithClass(e,t,p)}};(0,n.Cg)([(0,l.MZ)({type:[p],json:{write:!0}})],y.prototype,"features",void 0),(0,n.Cg)([(0,c.w)("features")],y.prototype,"readFeatures",null),y=(0,n.Cg)([(0,u.$)("esri.rest.support.AttributeBinsFeatureSet")],y)},39516:(e,t,r)=>{let i;async function n(){return null==i&&(i=Promise.all([r.e(8368),r.e(4123)]).then(r.bind(r,44123)).then(e=>new e.WhereClauseCache(500,500))),i}async function s(e,t){const r=await n(),i=r.get(e,t);if(null==i)throw r.getError(e,t);return i}function o(e,t){return e||=null,t||=null,"1=1"===e?t??e:"1=1"===t?e??t:e&&t?`(${e}) AND (${t})`:e??t}function a(e,t){return e||=null,t||=null,"1=1"===e||"1=1"===t||e===t?"1=1"===e?e:t:e&&t?`(${e}) OR (${t})`:e??t}r.d(t,{GP:()=>s,IW:()=>a,mA:()=>o})},41366:(e,t,r)=>{r.d(t,{K:()=>d,Q:()=>u});var i=r(31635),n=r(66552),s=r(53966),o=r(10107),a=(r(44208),r(87811),r(93223)),l=r(40608);const u=(0,n.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),p="percent-of-total",c="field",d=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,r=null!=this.normalizationTotal;return t||r?(e=t&&c||r&&p||null,t&&r&&s.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==c&&e!==p||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,i.Cg)([(0,o.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],r.prototype,"normalizationField",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],r.prototype,"normalizationMaxValue",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],r.prototype,"normalizationMinValue",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],r.prototype,"normalizationTotal",void 0),(0,i.Cg)([(0,a.e)(u,{name:"parameters.normalizationType"})],r.prototype,"normalizationType",null),r=(0,i.Cg)([(0,l.$)("esri.rest.support.NormalizationBinParametersMixin")],r),r}},41560:(e,t,r)=>{r.d(t,{Ch:()=>o,mW:()=>s});var i=r(34727),n=r(39516);function s(e,t){return{...t,filterMode:e.mode}}function o(e,t,r){const s=function(e){if("manual"===u(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:r,maxScale:i}of e.filters)t[0]=Math.max(t[0],p(r)),t[1]=Math.min(t[1],c(i));return t}(e);if(s&&((0,i.gg)(t,s[0])||(0,i.ZH)(r,s[1])))return"";const o=Array.from(a(e,t,r)),l=function(e,t,r){if(0===e.length)return!0;const n=p(e.at(0)?.minScale),s=c(e.at(-1)?.maxScale);if((0,i.ZH)(n,t)||(0,i.gg)(s,r))return!0;for(let t=0;t<e.length-1;t++){const r=e[t],n=e[t+1];if((0,i.ZH)(p(n.minScale),c(r.maxScale)))return!0}return!1}(o,t,r)?"1=1":o.map(e=>e.where||"1=1").reduce((e,t)=>(0,n.IW)(e,t),"");return l&&"1=1"!==l?l:""}function*a(e,t,r){if("manual"===u(e)){const t=e.filters.find(t=>t.id===e.activeFilterId);t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(const i of e.filters)l(i.minScale,i.maxScale,t,r)&&(yield i)}}function l(e,t,r,n){return e=p(e),r=p(r),t=c(t),!(!(0,i.Sp)(r,e)&&(n??r)>e||(0,i.Hx)(t,r)||void 0!==n&&(0,i.Sp)(n,e))}function u(e){return"mode"in e?e.mode:e.filterMode}function p(e){return e||Number.POSITIVE_INFINITY}function c(e){return e||0}},43334:(e,t,r)=>{r.d(t,{N3:()=>a,Om:()=>o});var i=r(69397),n=r(27647),s=r(92722);class o{constructor(e=null,t={},r,i,n=0){this.geometry=e,this.attributes=t,this.centroid=r,this.objectId=i,this.displayId=n}static fromJSON(e){const t=e.geometry?s.A.fromJSON(e.geometry):null,r=e.centroid?s.A.fromJSON(e.centroid):null,i=e.objectId;return new o(t,e.attributes,r,i)}weakClone(){const e=new o(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e}clone(){const e=this.geometry?.clone(),t=new o(e,{...this.attributes},this.centroid?.clone(),this.objectId);return t.displayId=this.displayId,t}ensureCentroid(e){return this.centroid??=(0,n.Q)(new s.A,this.geometry,e.hasZ,e.hasM),this.centroid}get usedMemory(){return 128+(0,i.lM)(this.attributes)+(this.geometry?.usedMemory??0)}}function a(e){return!!e.geometry?.coords?.length}},46140:(e,t,r)=>{r.d(t,{R:()=>n});var i=r(49186);let n=class e{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new e(this.major,this.minor,this._context)}static parse(t,r=""){const[n,s]=t.split("."),o=/^\s*\d+\s*$/;if(!n?.match||!o.test(n))throw new i.A((r&&r+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!s?.match||!o.test(s))throw new i.A((r&&r+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const a=parseInt(n,10),l=parseInt(s,10);return new e(a,l,r)}}},50498:(e,t,r)=>{r.d(t,{Ye:()=>c,gy:()=>p,yR:()=>d});var i=r(66552),n=r(5443),s=r(91075),o=r(48526),a=r(86738),l=r(39829),u=r(82799);const p=(0,i.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),c=(0,i.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"}),d={base:s.A,key:"type",typeMap:{extent:n.A,multipoint:o.A,point:a.A,polyline:u.A,polygon:l.A}}},52106:(e,t,r)=>{r.d(t,{A:()=>v});var i,n=r(31635),s=r(13874),o=r(69540),a=r(51447),l=r(25482),u=r(53966),p=r(36708),c=r(24326),d=r(10107),y=(r(44208),r(87811),r(40608)),f=r(12195),m=r(65864),h=r(50498),g=r(54339),w=r(33910);function b(e){if(null==e)return null;const t={};for(const r in e){const i=e[r];i&&(t[r]=i.toJSON())}return 0!==Object.keys(t).length?t:null}let v=class extends(o.A.ClonableMixin(l.A)){static{i=this}constructor(e){super(e),this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this._version=0,Object.defineProperty(this,"uid",{value:(0,c.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,a.eF)(u.A.getLogger(this),"Graphic",{version:"4.30"})}initialize(){this._watchMeshGeometryChanges()}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),"mesh"!==e?.type&&this._notifyLayer("geometry",t,e))}set popupTemplate(e){const t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new i({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const r of[t,this.sourceLayer,this.layer])if(r){if("popupTemplate"in r&&r.popupTemplate)return r.popupTemplate;if(e&&"defaultPopupTemplate"in r&&null!=r.defaultPopupTemplate)return r.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t}}getObjectId(){const e=this.sourceLayer??this.layer;return e?(0,g.r)(this,e):null}getGlobalId(){const e=this.sourceLayer??this.layer;return e&&"globalIdField"in e&&e.globalIdField?this.getAttribute(e.globalIdField):null}toJSON(){return{aggregateGeometries:b(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:(0,f.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const r={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",r,r,e.action)}}_notifyLayer(e,t,r,i){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const n={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(n.action=i),"attributes"===e&&(n.attributeName=i),this.layer.graphicChanged(n)}_watchMeshGeometryChanges(){this.addHandles([(0,p.z7)(()=>"mesh"===this.geometry?.type&&this.geometry.vertexSpace.origin?{localMatrix:this.geometry.transform?.localMatrix,origin:this.geometry.vertexSpace.origin}:void 0,({localMatrix:e,origin:t})=>{this._lastMeshTransform.localMatrix===e&&this._lastMeshTransform.origin===t||(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())}),(0,p.z7)(()=>"mesh"===this.geometry?.type?{vertexAttributes:this.geometry.vertexAttributes}:void 0,()=>{const e=this.geometry;"mesh"===e?.type&&e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",this.geometry,this.geometry)},{equals:(e,t)=>e===t,sync:!0})])}};(0,n.Cg)([(0,d.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const i=(0,m.rS)(e[r]);i&&(t[r]=i)}return 0!==Object.keys(t).length?t:null}}})],v.prototype,"aggregateGeometries",null),(0,n.Cg)([(0,d.MZ)({value:null})],v.prototype,"attributes",null),(0,n.Cg)([(0,d.MZ)({value:null,types:h.yR,json:{read:m.rS}})],v.prototype,"geometry",null),(0,n.Cg)([(0,d.MZ)({type:Boolean})],v.prototype,"isAggregate",void 0),(0,n.Cg)([(0,d.MZ)({clonable:!1})],v.prototype,"layer",void 0),(0,n.Cg)([(0,d.MZ)({clonable:"reference"})],v.prototype,"origin",void 0),(0,n.Cg)([(0,d.MZ)({type:s.A,value:null})],v.prototype,"popupTemplate",null),(0,n.Cg)([(0,d.MZ)({clonable:"reference"})],v.prototype,"sourceLayer",void 0),(0,n.Cg)([(0,d.MZ)({value:null,types:w.Es})],v.prototype,"symbol",null),(0,n.Cg)([(0,d.MZ)({clonable:!1,json:{read:!1,write:!1}})],v.prototype,"_version",void 0),(0,n.Cg)([(0,d.MZ)({type:Boolean,value:!0})],v.prototype,"visible",null),v=i=(0,n.Cg)([(0,y.$)("esri.Graphic")],v)},54339:(e,t,r)=>{function i(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{const r=[];for(const i of t.fieldNames)r.push(e.attributes[i]??null);return JSON.stringify(r)}}}function n(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];const r=t.uniqueIdFields.map(t=>e.attributes?.[t]);return JSON.stringify(r)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}r.d(t,{W:()=>i,r:()=>n})},55674:(e,t,r)=>{r.d(t,{Ad:()=>y,Gj:()=>h,QY:()=>d,lL:()=>g,xR:()=>f});var i=r(66131),n=r(49186),s=(r(44208),r(44729)),o=r(15032),a=r(65864),l=r(95466),u=r(43668),p=r(98623);const c=["geometry","scale","timeProperties"];function d(e,t){if(null!=t)for(const r of c)t.hasArcadeDependency(r)&&e.add(r);return e}function y(e,t){return m.create(e,t,null,["$feature","$view"])}function f(e,t,r){return m.create(e,t,r,["$feature","$view","$config"])}class m{static async create(e,t,r,i){const{arcade:s,Dictionary:o}=await(0,u.l)();let a;try{a=s.parseScript(e)}catch(t){throw new n.A("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})}const l=s.scriptUsesGeometryEngine(a);l&&await s.enableGeometrySupport(),await s.loadDependentModules(new Set,a,null,!1,l);const p={vars:i.reduce((e,t)=>({...e,[t]:null}),{}),spatialReference:t,useAsync:!1},c=s.compileScript(a,p);let d=null;null!=r&&(d=new o(r),d.immutable=!0);const y=new o;return y.immutable=!1,y.setField("scale",0),new m(e,s,a,c,t,y,d,o)}constructor(e,t,r,i,n,s,o,a){this.script=e,this._arcade=t,this._syntaxTree=r,this._compiled=i,this._spatialReference=n,this._viewDict=s,this._configDict=o,this._dictionaryCtor=a,this._dependencies=new Map,this._featureReader=new h,this._dependencies.set("geometry",t.scriptTouchesGeometry(this._syntaxTree)),this._dependencies.set("scale",this._arcade.referencesMember(this._syntaxTree,"scale")),this._dependencies.set("timeProperties",this._arcade.scriptUsesViewProperties(this._syntaxTree,["timeProperties"]))}evaluate(e,t){const r=t.$view?.timeZone;if(t.$view){let e;if(this._viewDict.setField("scale",t.$view.scale),null!=t.$view.timeProperties){const{currentStart:n,currentEnd:s}=t.$view.timeProperties;e=new this._dictionaryCtor({currentStart:null!=n?null!=r?i.lY.epochToArcadeDate(n,r):i.lY.unknownEpochToArcadeDate(n):void 0,currentEnd:null!=s?null!=r?i.lY.epochToArcadeDate(s,r):i.lY.unknownEpochToArcadeDate(s):void 0,startIncluded:!0,endIncluded:!0})}this._viewDict.setField("timeProperties",e)}return this._compiled({vars:{$view:this._viewDict,$config:this._configDict,$feature:e},spatialReference:this._spatialReference,timeZone:r})}repurposeFeature(e,t){return this._featureReader.bind(e,t,this._spatialReference),this._featureReader}references(e){return this._dependencies.get(e)??!1}}class h{constructor(){this._boundTarget=null,this._boundSchema={fields:null,fieldsIndex:null,spatialReference:null,get geometryType(){return null},get objectIdField(){return null}},this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}bind(e,t,r){const i=t??new l.A(g(e.attributes));this._boundTarget=e,this._boundSchema.fields=i.fields,this._boundSchema.fieldsIndex=i,this._boundSchema.spatialReference=r}_getField(e){return this._boundSchema.fieldsIndex.get(e)}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(e){this._contextTimeZone=e}readArcadeFeature(){return this}hasField(e){return this._boundSchema.fieldsIndex.has(e)}geometry(){if("fromJSON"in this._boundTarget)return this._boundTarget.geometry;const e=(0,a.rS)(this._boundTarget.geometry);if(e){if(!this._boundSchema.spatialReference)throw new Error("InternalError: Expected spatial reference to be defined");e.spatialReference=this._boundSchema.spatialReference}return e}isUnknownDateTimeField(e){return this._boundSchema.fieldsIndex.getTimeZone(e)===p.L5}field(e,t=!0){const r=this._getField(e);if(r){const t=this._boundTarget.attributes[r.name];if(null==t)return null;switch(r.type){case"date-only":case"esriFieldTypeDateOnly":return s.n.fromReader(t);case"time-only":case"esriFieldTypeTimeOnly":return o.k.fromReader(t);case"esriFieldTypeTimestampOffset":case"timestamp-offset":return i.lY.fromReaderAsTimeStampOffset(t);case"date":case"esriFieldTypeDate":return this.isUnknownDateTimeField(e)?i.lY.unknownEpochToArcadeDate(t):i.lY.epochToArcadeDate(t,this.contextTimeZone??p.qU);default:return t}}if(t)throw new Error(`Field ${e} does not exist`);return null}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this._boundSchema.fieldsIndex.fields.map(e=>e.name)}castToText(e=!1){return JSON.stringify(this._boundTarget)}gdbVersion(){return null}fullSchema(){return this._boundSchema}castAsJson(e=null){return{attributes:this._boundTarget.attributes,geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null}}castAsJsonAsync(e=null,t=null){return Promise.resolve(this.castAsJson(t))}}function g(e){const t=[];for(const r in e)t.push({name:r,alias:r,type:"string"==typeof e[r]?"esriFieldTypeString":"esriFieldTypeDouble"});return t}},64714:(e,t,r)=>{r.d(t,{F0:()=>a,Vx:()=>p,e2:()=>d,f:()=>y});var i=r(44208),n=r(4718),s=r(99352),o=r(93470);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.Cb:"esriGeometryPolyline"===e?o.yM:o.WR}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function p(e,t){if((0,i.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this${c(t)} = null;`;for(const t in e)r+=`this${c(t)} = ${JSON.stringify(e[t])};`;const i=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new i}catch(r){return()=>({[t]:null,...e})}}function c(e){return l.test(e)?`.${e}`:`["${e}"]`}function d(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.o8)(e)}}]}function y(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:s.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:s.P,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},67482:(e,t,r)=>{function i(e){return null!=a(e)||null!=o(e)}function n(e){return l.test(e)}function s(e){return a(e)??o(e)}function o(e){const t=new Date(e);return function(e,t){if(Number.isNaN(e.getTime()))return!1;let r=!0;if(p&&/\d+\W*$/.test(t)){const e=t.match(/[a-zA-Z]{2,}/);if(e){let t=!1,i=0;for(;!t&&i<=e.length;)t=!u.test(e[i]),i++;r=!t}}return r}(t,e)?Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset():null}function a(e){const t=l.exec(e);if(!t?.groups)return null;const r=t.groups,i=+r.year,n=+r.month-1,s=+r.day,o=+(r.hours??"0"),a=+(r.minutes??"0"),u=+(r.seconds??"0");if(o>23)return null;if(a>59)return null;if(u>59)return null;const p=r.ms??"0",c=p?+p.padEnd(3,"0").slice(0,3):0;let d;if(r.isUTC||!r.offsetSign)d=Date.UTC(i,n,s,o,a,u,c);else{const e=+r.offsetHours,t=+r.offsetMinutes;d=6e4*("+"===r.offsetSign?-1:1)*(60*e+t)+Date.UTC(i,n,s,o,a,u,c)}return Number.isNaN(d)?null:d}r.d(t,{Br:()=>n,Cq:()=>i,_U:()=>s});const l=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,u=/^((jan(uary)?)|(feb(ruary)?)|(mar(ch)?)|(apr(il)?)|(may)|(jun(e)?)|(jul(y)?)|(aug(ust)?)|(sep(tember)?)|(oct(ober)?)|(nov(ember)?)|(dec(ember)?)|(am)|(pm)|(gmt)|(utc))$/i,p=!Number.isNaN(new Date("technology 10").getTime())},68109:(e,t,r)=>{r.d(t,{d:()=>v});var i=r(31635),n=r(10107),s=(r(44208),r(53966),r(87811),r(40608)),o=r(13874),a=r(69540),l=r(25482),u=r(93637),p=r(43937),c=r(50820),d=r(10873),y=r(46499),f=r(41214);let m=class extends(a.A.ClonableMixin(l.A)){constructor(e){super(e),this.labelingInfo=null,this.labelsVisible=!0,this.renderer=null,this.visible=!0}};(0,i.Cg)([(0,n.MZ)({type:[y.A],json:{write:!0}})],m.prototype,"labelingInfo",void 0),(0,i.Cg)([(0,n.MZ)(d.kF)],m.prototype,"labelsVisible",void 0),(0,i.Cg)([(0,n.MZ)({types:f.Hg,json:{write:!0}})],m.prototype,"renderer",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"visible",void 0),m=(0,i.Cg)([(0,s.$)("esri.layers.support.TrackPartInfo")],m);var h=r(96576),g=r(59868),w=r(26253);let b=class extends(a.A.ClonableMixin(l.A)){constructor(e){super(e),this.enabled=!0,this.fields=[],this.latestObservations=new m({renderer:new h.A({symbol:g.UK.clone()})}),this.maxDisplayDuration=null,this.maxDisplayObservationsPerTrack=0,this.popupEnabled=!0,this.popupTemplate=null,this.previousObservations=new m({renderer:new h.A({symbol:g.UK.clone()})}),this.trackLines=new m({renderer:new h.A({symbol:g.A7.clone()})}),this.timeField="startTimeField"}writeFields(e,t,r){const i=e.filter(e=>"avg_angle"!==e.statisticType).map(e=>e.toJSON());(0,u.sM)(r,i,t)}};(0,i.Cg)([(0,n.MZ)({type:Boolean,json:{write:!0}})],b.prototype,"enabled",void 0),(0,i.Cg)([(0,n.MZ)({type:[c.A],json:{write:!0}})],b.prototype,"fields",void 0),(0,i.Cg)([(0,p.K)("fields")],b.prototype,"writeFields",null),(0,i.Cg)([(0,n.MZ)({type:m,json:{write:!0}})],b.prototype,"latestObservations",void 0),(0,i.Cg)([(0,n.MZ)({type:w.T,json:{write:!0}})],b.prototype,"maxDisplayDuration",void 0),(0,i.Cg)([(0,n.MZ)({type:Number,json:{write:!0}})],b.prototype,"maxDisplayObservationsPerTrack",void 0),(0,i.Cg)([(0,n.MZ)(d.M6)],b.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,n.MZ)({type:o.A,json:{name:"popupInfo",write:!0}})],b.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,n.MZ)({type:m,json:{write:!0}})],b.prototype,"previousObservations",void 0),(0,i.Cg)([(0,n.MZ)({type:m,json:{write:!0}})],b.prototype,"trackLines",void 0),(0,i.Cg)([(0,n.MZ)({type:["timeReceived","startTimeField","endTimeField"],json:{read:!0,write:!0}})],b.prototype,"timeField",void 0),b=(0,i.Cg)([(0,s.$)("esri.layers.support.TrackInfo")],b);const v=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.trackInfo=null}};return(0,i.Cg)([(0,n.MZ)({type:b})],r.prototype,"trackInfo",void 0),r=(0,i.Cg)([(0,s.$)("esri.layers.mixins.TrackableLayer")],r),r}},69208:(e,t,r)=>{r.d(t,{d:()=>o});var i=r(31635),n=r(10107),s=(r(44208),r(53966),r(87811),r(40608));const o=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.customParameters=null}};return(0,i.Cg)([(0,n.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],r.prototype,"customParameters",void 0),r=(0,i.Cg)([(0,s.$)("esri.layers.mixins.CustomParametersMixin")],r),r}},69397:(e,t,r)=>{r.d(t,{$B:()=>n,Qf:()=>u,Qh:()=>a,RS:()=>s,ez:()=>d,lM:()=>o,qK:()=>c});var i=r(34275);function n(e){return 32+e.length}const s=16;function o(e){if(!e)return 0;let t=c;for(const r in e)e.hasOwnProperty(r)&&(t+=l(e[r],!1));return t}function a(e){if(!e)return 0;if("number"==typeof e[0])return u(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return p(e,8);let r=d;for(let i=0;i<t;i++)r+=l(e[i]);return r}(e);let t=c;for(const r in e)e.hasOwnProperty(r)&&(t+=l(e[r]));return t}function l(e,t=!0){switch(typeof e){case"object":return t?a(e):c;case"string":return n(e);case"number":return s;case"boolean":return 4;default:return 8}}function u(...e){return e.reduce((e,t)=>e+(t?(0,i.iu)(t)?t.byteLength+y:Array.isArray(t)?p(t,s):0:0),0)}function p(e,t){return d+e.length*t}const c=32,d=16,y=145},70328:(e,t,r)=>{r.d(t,{BI:()=>w,Ej:()=>d,Ie:()=>h,Jt:()=>g,Ne:()=>y,RF:()=>p,aI:()=>v,fA:()=>o,gE:()=>l,hZ:()=>m,iT:()=>c,is:()=>b,qv:()=>T,vI:()=>f,vY:()=>a,v_:()=>F,vt:()=>s,w1:()=>u});var i=r(5443),n=(r(19419),r(4197));function s(e=F){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function o(e,t,r,i,n,o,a=s()){return a[0]=e,a[1]=t,a[2]=r,a[3]=i,a[4]=n,a[5]=o,a}function a(e,t=s()){return function(e,t,r,i=s()){return m(i,T),function(e,t,r=0,i=t.length/3){let n=e[0],s=e[1],o=e[2],a=e[3],l=e[4],u=e[5];for(let e=0;e<i;e++)n=Math.min(n,t[r+3*e]),s=Math.min(s,t[r+3*e+1]),o=Math.min(o,t[r+3*e+2]),a=Math.max(a,t[r+3*e]),l=Math.max(l,t[r+3*e+1]),u=Math.max(u,t[r+3*e+2]);e[0]=n,e[1]=s,e[2]=o,e[3]=a,e[4]=l,e[5]=u}(i,e,t,r),i}(e,0,e.length/3,t)}function l(e,t=(0,n.jh)(24)){const[r,i,s,o,a,l]=e;return t[0]=r,t[1]=i,t[2]=s,t[3]=r,t[4]=i,t[5]=l,t[6]=r,t[7]=a,t[8]=s,t[9]=r,t[10]=a,t[11]=l,t[12]=o,t[13]=i,t[14]=s,t[15]=o,t[16]=i,t[17]=l,t[18]=o,t[19]=a,t[20]=s,t[21]=o,t[22]=a,t[23]=l,t}function u(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new i.A(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function p(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function c(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function d(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function y(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function f(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function m(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function h(e){return e?m(e,T):s(T)}function g(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function w(e,t,r,i,n){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=i,e[4]=n,e[5]=Number.POSITIVE_INFINITY,e}function b(e){return 6===e.length}function v(e,t,r){if(null==e||null==t)return e===t;if(!b(e)||!b(t))return!1;if(r){for(let i=0;i<e.length;i++)if(!r(e[i],t[i]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}const T=[1/0,1/0,1/0,-1/0,-1/0,-1/0],F=[0,0,0,0,0,0];s()},73133:(e,t,r)=>{r.d(t,{j:()=>i});const i=(0,r(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},73681:(e,t,r)=>{r.d(t,{n:()=>l});var i=r(49186),n=r(53966),s=r(46140),o=r(95466),a=r(55674);class l{static async from(e,t,r){const o=e.dictionary_version?s.R.parse(e.dictionary_version):null,p=new Set(e.itemsNames),c={};if(t)for(const e in t)c[e]=t[e];if(e.authoringInfo.configuration)for(const t of e.authoringInfo.configuration)c.hasOwnProperty(t.name)||(c[t.name]=t.value);const d=new Set(e.authoringInfo.symbol);for(const e of Object.keys(r))d.delete(e);d.size&&n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:d});const y=await(0,a.xR)(e.expression,null,c);if(!y)throw new i.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");const f=!o||!o.greaterEqual(4,0);f&&n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:o});const m=new u(r,f);return new l(f,p,y,m)}constructor(e,t,r,i){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=i}get itemNames(){return this._itemNames}evaluate(e,t,r,i){try{return this._reader.bind(e,r,i),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new o.A(e);const t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new o.A(t)}}class u extends a.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){const t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);const t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},82935:(e,t,r)=>{r.d(t,{B:()=>y,e:()=>f});var i=r(31635),n=r(10107),s=(r(44208),r(53966),r(87811),r(36005)),o=r(40608),a=r(89317),l=r(30524),u=r(96184),p=r(73133),c=r(64272),d=r(26253);const y={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation",layerContainerTypes:a.K}}},f=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const i=r.timeOffset,n=p.j.fromJSON(r.timeOffsetUnits);return i&&n?new d.T({value:i,unit:n}):null}set timeInfo(e){(0,l.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,i.Cg)([(0,n.MZ)({type:c.T,json:{write:!1}})],r.prototype,"timeExtent",void 0),(0,i.Cg)([(0,n.MZ)({type:d.T})],r.prototype,"timeOffset",void 0),(0,i.Cg)([(0,s.w)("service","timeOffset",["timeInfo.exportOptions"])],r.prototype,"readOffset",null),(0,i.Cg)([(0,n.MZ)({value:null,type:u.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],r.prototype,"timeInfo",null),(0,i.Cg)([(0,n.MZ)(y)],r.prototype,"useViewTime",void 0),r=(0,i.Cg)([(0,o.$)("esri.layers.mixins.TemporalLayer")],r),r}},83960:(e,t,r)=>{r.d(t,{X_:()=>o,oW:()=>l,zx:()=>a});var i=r(34727),n=r(83047);const s=96;function o(e,t){const r=t||e.extent,i=e.width,o=(0,n.GA)(r?.spatialReference);return r&&i?r.width/i*o*n.dy*s:0}function a(e,t,r){return function(e,t){return 0===t||(0,i.Sp)(e,t)||e<t}(e,t)&&function(e,t){return 0===t||(0,i.Sp)(e,t)||e>t}(e,r)}function l(e,t){return(0,i.Sp)(e,t)?0:(e||Number.POSITIVE_INFINITY)>(t||Number.POSITIVE_INFINITY)?1:-1}},85113:(e,t,r)=>{r.d(t,{BM:()=>C,bd:()=>I,sO:()=>x,xD:()=>p});var i=r(67482),n=r(49186),s=r(21325),o=r(43334),a=r(92722),l=r(30524);const u={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function p(e){return u[e]}function*c(e){switch(e.type){case"Feature":yield e;break;case"FeatureCollection":for(const t of e.features)t&&(yield t)}}function*d(e){if(e)switch(e.type){case"Point":yield e.coordinates;break;case"LineString":case"MultiPoint":yield*e.coordinates;break;case"MultiLineString":case"Polygon":for(const t of e.coordinates)yield*t;break;case"MultiPolygon":for(const t of e.coordinates)for(const e of t)yield*e}}function y(e){for(const t of e)if(t.length>2)return!0;return!1}function f(e){let t=0;for(let r=0;r<e.length;r++){const i=e[r],n=e[(r+1)%e.length];t+=i[0]*n[1]-n[0]*i[1]}return t<=0}function m(e){const t=e[0],r=e[e.length-1];return t[0]===r[0]&&t[1]===r[1]&&t[2]===r[2]||e.push(t),e}function h(e,t,r){switch(t.type){case"LineString":case"MultiPoint":return function(e,t,r){return b(e,t.coordinates,r),e}(e,t,r);case"MultiLineString":return function(e,t,r){for(const i of t.coordinates)b(e,i,r);return e}(e,t,r);case"MultiPolygon":return function(e,t,r){for(const i of t.coordinates){g(e,i[0],r);for(let t=1;t<i.length;t++)w(e,i[t],r)}return e}(e,t,r);case"Point":return function(e,t,r){return T(e,t.coordinates,r),e}(e,t,r);case"Polygon":return function(e,t,r){const i=t.coordinates;g(e,i[0],r);for(let t=1;t<i.length;t++)w(e,i[t],r);return e}(e,t,r)}}function g(e,t,r){const i=m(t);!function(e){return!f(e)}(i)?b(e,i,r):v(e,i,r)}function w(e,t,r){const i=m(t);!function(e){return f(e)}(i)?b(e,i,r):v(e,i,r)}function b(e,t,r){for(const i of t)T(e,i,r);e.lengths.push(t.length)}function v(e,t,r){for(let i=t.length-1;i>=0;i--)T(e,t[i],r);e.lengths.push(t.length)}function T(e,t,r){const[i,n,s]=t;e.coords.push(i,n),r.hasZ&&e.coords.push(s||0)}function F(e){switch(typeof e){case"string":return(0,i.Br)(e)?"esriFieldTypeDate":"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function x(e,t=4326){if(!e)throw new n.A("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==e.type&&"FeatureCollection"!==e.type)throw new n.A("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:e});const{crs:r}=e;if(!r)return;const i="string"==typeof r?r:"name"===r.type?r.properties.name:"EPSG"===r.type?r.properties.code:null,o=(0,s.oT)({wkid:t})?new RegExp(".*(CRS84H?|4326)$","i"):new RegExp(`.*(${t})$`,"i");if(!i||!o.test(i))throw new n.A("geojson:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:r})}function C(e,t={}){const r=[],i=new Set,n=new Set;let s,o=!1,a=null,u=!1,{geometryType:f=null}=t;for(const t of c(e)){const{geometry:e,properties:c,id:m}=t;if((!e||(f||(f=p(e.type)),p(e.type)===f))&&(o||(o=y(d(e))),u||(u=null!=m,u&&(s=typeof m,c&&(a=Object.keys(c).filter(e=>c[e]===m)))),c&&a&&u&&null!=m&&(a.length>1?a=a.filter(e=>c[e]===m):1===a.length&&(a=c[a[0]]===m?a:[])),c))for(const e in c){if(i.has(e))continue;const t=F(c[e]);if("unknown"===t){n.add(e);continue}n.delete(e),i.add(e);const s=(0,l.rS)(e);s&&r.push({name:s,alias:e,type:t})}}const m=(0,l.rS)(1===a?.length&&a[0]||null)??void 0;if(m)for(const e of r)if(e.name===m&&(0,l.WA)(e)){e.type="esriFieldTypeOID";break}return{fields:r,geometryType:f,hasZ:o,objectIdFieldName:m,objectIdFieldType:s,unknownFields:Array.from(n)}}function I(e,t){return Array.from(function*(e,t={}){const{geometryType:r,objectIdField:i}=t;for(const n of e){const{geometry:e,properties:s,id:l}=n;if(e&&p(e.type)!==r)continue;const u=s||{};let c;i&&(c=u[i],null==l||c||(u[i]=c=l));const d=new o.Om(e?h(new a.A,e,t):null,u,null,c);yield d}}(c(e),t))}},91880:(e,t,r)=>{r.d(t,{A:()=>p});var i,n=r(31635),s=r(66552),o=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608));const u=new s.J({asc:"ascending",desc:"descending"});let p=class extends o.A{static{i=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,n.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],p.prototype,"field",void 0),(0,n.Cg)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],p.prototype,"valueExpression",void 0),(0,n.Cg)([(0,a.MZ)({type:u.apiValues,json:{type:u.jsonValues,read:u.read,write:u.write}})],p.prototype,"order",void 0),p=i=(0,n.Cg)([(0,l.$)("esri.layers.support.OrderByInfo")],p)},92722:(e,t,r)=>{r.d(t,{A:()=>n});var i=r(69397);class n{constructor(e=[],t=[]){this.lengths=e??[],this.coords=t??[]}static fromJSON(e){return new n(e.lengths,e.coords)}static fromRect(e){const[t,r,i,s]=e,o=i-t,a=s-r;return new n([5],[t,r,o,0,0,a,-o,0,0,-a])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.lengths.reduce((e,t)=>e+t)}get usedMemory(){return 64+(0,i.Qf)(this.lengths,this.coords)}area(){let e=0,t=0;if(!this.lengths.length)return 0;for(let r=0;r<this.lengths.length;r++){const i=this.lengths[r];if(i<3)continue;let n=this.coords[2*t],s=this.coords[2*t+1];for(let r=1;r<i;r+=1){const i=this.coords[2*(r+t)],o=this.coords[2*(r+t)+1];e+=-.5*(i-n)*(o+s),n=i,s=o}t+=i}return e}forEachVertex(e){let t=0;this.lengths.length||e(this.coords[0],this.coords[1]);for(let r=0;r<this.lengths.length;r++){const i=this.lengths[r];for(let r=0;r<i;r++)e(this.coords[2*(r+t)],this.coords[2*(r+t)+1]);t+=i}}deltaDecode(){const e=this.clone(),{coords:t,lengths:r}=e;let i=0;for(const e of r){for(let r=1;r<e;r++)t[2*(i+r)]+=t[2*(i+r)-2],t[2*(i+r)+1]+=t[2*(i+r)-1];i+=e}return e}clone(e){if(0===this.lengths.length)return new n([],[this.coords[0],this.coords[1]]);const t=2*(0===this.lengths.length?1:this.lengths.reduce((e,t)=>e+t)),r=this.coords.slice(0,t);return e?(e.set(r),new n(this.lengths,e)):new n(Array.from(this.lengths),Array.from(r))}}},95466:(e,t,r)=>{r.d(t,{A:()=>y});var i=r(49186),n=r(53966),s=r(91869),o=r(3330),a=r(12195),l=r(30524),u=r(98623),p=r(56400),c=r(96285);const d=new Map;class y{static fromJSON(e){return new y(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new y(e.fields??[],g(e))}static fromLayerJSON(e){return new y(e.fields??[],g(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,i=m(t);if(t&&i){const n=f(t);this._fieldsMap.set(t,e),this._fieldsMap.set(n,e),this._normalizedFieldsMap.set(i,e),r.push(`${n}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.te)(e)||(0,l.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.te)(e)||(0,l.Xz)(e)||e.nullable||void 0!==(0,l.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(f(e))??this._normalizedFieldsMap.get(m(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(n.A.getLogger("esri.layers.support.FieldsIndex").errorOnce(new i.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):h.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?o.GB.instance:t===u.n$?c.mQ.utcInstance:(0,s.tE)(d,t,()=>c.oh.create(t)):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map(e=>(0,a.W)(e)?e.toJSON():e),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function f(e){return e.trim().toLowerCase()}function m(e){return(0,l.rS)(e)?.toLowerCase()??""}const h=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function g(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:i,editFieldsInfo:n}=e,s=(i?"startField"in i?i.startField:i.startTimeField:"")??"",o=(i?"endField"in i?i.endField:i.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,p.ZS)(e.dateFieldsTimeReference):null,l=n?function(e){return"timeZone"in e}(n)?n.timeZone??a:n.dateFieldsTimeReference?(0,p.ZS)(n.dateFieldsTimeReference):a??u.n$:null,c=i?function(e){return"timeZone"in e}(i)?i.timeZone??a:i.timeReference?(0,p.ZS)(i.timeReference):a:null,d=new Map([[f(n?.creationDateField??""),l],[f(n?.editDateField??""),l],[f(s),c],[f(o),c]]);for(const{name:i,type:n}of e.fields)if(h.has(n))t.set(i,u.L5);else if("date"!==n&&"esriFieldTypeDate"!==n)t.set(i,null);else if(r)t.set(i,u.L5);else{const e=d.get(f(i??""))??a;t.set(i,e)}return t}},96184:(e,t,r)=>{r.d(t,{A:()=>f});var i=r(31635),n=r(69540),s=r(25482),o=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),l=r(40608),u=r(43937),p=r(64272),c=r(26253),d=r(56400);function y(e,t){return c.T.fromJSON({value:e,unit:t})}let f=class extends(n.A.ClonableMixin(s.A)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0,this.stops=null}readFullTimeExtent(e,t){return t.timeExtent&&Array.isArray(t.timeExtent)&&2===t.timeExtent.length?p.T.fromArray(t.timeExtent):null}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=e.toArray():t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?y(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?y(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],f.prototype,"cumulative",void 0),(0,i.Cg)([(0,o.MZ)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],f.prototype,"endField",void 0),(0,i.Cg)([(0,o.MZ)({type:p.T,json:{write:{enabled:!0,allowNull:!0}}})],f.prototype,"fullTimeExtent",void 0),(0,i.Cg)([(0,a.w)("fullTimeExtent",["timeExtent"])],f.prototype,"readFullTimeExtent",null),(0,i.Cg)([(0,u.K)("fullTimeExtent")],f.prototype,"writeFullTimeExtent",null),(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"hasLiveData",void 0),(0,i.Cg)([(0,o.MZ)({type:c.T,json:{write:{enabled:!0,allowNull:!0}}})],f.prototype,"interval",void 0),(0,i.Cg)([(0,a.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],f.prototype,"readInterval",null),(0,i.Cg)([(0,u.K)("interval")],f.prototype,"writeInterval",null),(0,i.Cg)([(0,o.MZ)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],f.prototype,"startField",void 0),(0,i.Cg)([(0,o.MZ)((0,d.P6)("timeReference",!0))],f.prototype,"timeZone",void 0),(0,i.Cg)([(0,o.MZ)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],f.prototype,"trackIdField",void 0),(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],f.prototype,"useTime",void 0),(0,i.Cg)([(0,o.MZ)({type:[Date],json:{read:!1}})],f.prototype,"stops",void 0),f=(0,i.Cg)([(0,l.$)("esri.layers.support.TimeInfo")],f)},99352:(e,t,r)=>{r.d(t,{F:()=>i,P:()=>n});const i={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,maxUniqueIDCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},n={supportsDate:!0,supportsFixedInterval:!0,supportsAutoInterval:!0,supportsFixedBoundaries:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!0,supportedStatistics:{count:!0,sum:!0,avg:!0,var:!0,stddev:!0,min:!0,max:!0,percentileContinuous:!0,percentileDiscrete:!0,envelope:!0,centroid:!0,convexHull:!0},supportedNormalizationTypes:{field:!0,log:!0,naturalLog:!0,percentOfTotal:!0,squareRoot:!0}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8549],{6797:(e,t,n)=>{n.d(t,{Mj:()=>p,Ui:()=>h,w2:()=>f});var r=n(69622),i=n(7762),s=n(88620);const a=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function o(e){return e instanceof r.A}function l(e){return e instanceof i.A?Object.keys(e.items):o(e)?(0,s.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof i.A?e.items[t]:e[t]}function c(e){return e?e.declaredClass:null}function d(e,t){const n=e.diff;if(n&&"function"==typeof n)return n(e,t);const r=l(e),i=l(t);if(0===r.length&&0===i.length)return;if(!r.length||!i.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const s=i.filter(e=>!r.includes(e)),p=r.filter(e=>!i.includes(e)),f=r.filter(n=>i.includes(n)&&u(e,n)!==u(t,n)).concat(s,p).sort(),h=c(e);if(h&&a.has(h)&&f.length)return{type:"complete",oldValue:e,newValue:t};let y;const g=o(e)&&o(t);for(const r of f){const i=u(e,r),s=u(t,r);let a;if((g||"function"!=typeof i&&"function"!=typeof s)&&i!==s&&(null!=i||null!=s)){if(n&&n[r]&&"function"==typeof n[r])a=n[r]?.(i,s);else if(i instanceof Date&&s instanceof Date){if(i.getTime()===s.getTime())continue;a={type:"complete",oldValue:i,newValue:s}}else a="object"==typeof i&&"object"==typeof s&&c(i)===c(s)?d(i,s):{type:"complete",oldValue:i,newValue:s};null!=a&&(null!=y?y.diff[r]=a:y={type:"partial",diff:{[r]:a}})}}return y}function p(e,t){return function(e,t){if(null==e)return!1;const n=t.split(".");let r=e;for(const e of n){if("complete"===r.type)return!0;if("partial"!==r.type)return!1;{const t=r.diff[e];if(!t)return!1;r=t}}return!0}(e,t)}function f(e,t){if(!e)return!1;if("partial"===e.type){const n=Object.keys(e.diff);return 1===n.length&&n[0]===t}return!1}function h(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&c(e)!==c(t)?{type:"complete",oldValue:e,newValue:t}:d(e,t)}},9762:(e,t,n)=>{n.r(t),n.d(t,{projectBuffer:()=>i});var r=n(37539);function i(e,t,n,i,s,a,o=Math.floor(e.length/3)){const l=(0,r.jd)(t,s);if(null==l)return!1;if(l===r.pO){if(e===i&&n===a)return!0;const t=n+3*o;for(let r=n,s=a;r<t;r++,s++)i[s]=e[r];return!0}const u=n+3*o;for(let t=n,r=a;t<u;t+=3,r+=3)l(e,t,i,r);return!0}},10536:(e,t,n)=>{function r(e){const t={};for(const n in e){if("declaredClass"===n)continue;const i=e[n];if(null!=i&&"function"!=typeof i)if(Array.isArray(i)){t[n]=[];for(let e=0;e<i.length;e++)t[n][e]=r(i[e])}else"object"==typeof i?i.toJSON&&(t[n]=JSON.stringify(i)):t[n]=i}return t}n.d(t,{z:()=>r})},20437:(e,t,n)=>{n.d(t,{A:()=>y});var r,i=n(31635),s=n(66552),a=n(25482),o=n(10107),l=n(56507),u=(n(44208),n(87811),n(93223)),c=n(36005),d=n(40608),p=n(80451),f=n(98453);const h=new s.J({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 y=class extends a.A{static{r=this}constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,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?h.fromJSON(n.fieldValueType):null}clone(){return new r({alias:this.alias,defaultValue:this.defaultValue,description:this.description,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.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],y.prototype,"alias",void 0),(0,i.Cg)([(0,o.MZ)({type:[String,Number],json:{write:{allowNull:!0}}})],y.prototype,"defaultValue",void 0),(0,i.Cg)([(0,o.MZ)()],y.prototype,"description",void 0),(0,i.Cg)([(0,c.w)("description")],y.prototype,"readDescription",null),(0,i.Cg)([(0,o.MZ)({types:p.gK,json:{read:{reader:p.rS},write:!0}})],y.prototype,"domain",void 0),(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{write:!0}})],y.prototype,"editable",void 0),(0,i.Cg)([(0,o.MZ)({type:l.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],y.prototype,"length",void 0),(0,i.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],y.prototype,"name",void 0),(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{write:!0}})],y.prototype,"nullable",void 0),(0,i.Cg)([(0,u.e)(f.m)],y.prototype,"type",void 0),(0,i.Cg)([(0,o.MZ)()],y.prototype,"valueType",void 0),(0,i.Cg)([(0,c.w)("valueType",["description"])],y.prototype,"readValueType",null),(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{read:!1}})],y.prototype,"visible",void 0),y=r=(0,i.Cg)([(0,d.$)("esri.layers.support.Field")],y)},32587:(e,t,n)=>{n.d(t,{A:()=>s});var r=n(62788),i=n(95488);class s{constructor(e){this._observable=new i.I,this._map=new Map(e)}get size(){return(0,r.gc)(this._observable),this._map.size}clear(){this._map.size>0&&(this._map.clear(),this._observable.notify())}delete(e){const t=this._map.delete(e);return t&&this._observable.notify(),t}entries(){return(0,r.gc)(this._observable),this._map.entries()}forEach(e,t){(0,r.gc)(this._observable),this._map.forEach((n,r)=>e.call(t,n,r,this),t)}get(e){return(0,r.gc)(this._observable),this._map.get(e)}has(e){return(0,r.gc)(this._observable),this._map.has(e)}keys(){return(0,r.gc)(this._observable),this._map.keys()}set(e,t){return this._map.set(e,t),this._observable.notify(),this}values(){return(0,r.gc)(this._observable),this._map.values()}[Symbol.iterator](){return(0,r.gc)(this._observable),this._map[Symbol.iterator]()}[Symbol.dispose](){this._observable.destroy()}get[Symbol.toStringTag](){return this._map[Symbol.toStringTag]}}},36708:(e,t,n)=>{n.d(t,{C_:()=>p,OH:()=>y,Vh:()=>g,on:()=>d,pc:()=>m,wB:()=>l,z7:()=>u});var r=n(37955),i=n(36563),s=n(97768),a=n(74887),o=n(14012);function l(e,t,n={}){return c(e,t,n,f)}function u(e,t,n={}){return c(e,t,n,h)}function c(e,t,n={},r){let i=null;const a=n.once?(e,n)=>{r(e)&&((0,s.xt)(i),t(e,n))}:(e,n)=>{r(e)&&t(e,n)};if(i=(0,o.Cn)(e,a,n.sync,n.equals),n.initial){const t=e();a(t,t)}return i}function d(e,t,n,a={}){let o=null,u=null,c=null;function d(){o&&u&&(u.remove(),a.onListenerRemove?.(o),o=null,u=null)}function p(e){a.once&&a.once&&(0,s.xt)(c),n(e)}const f=l(e,(e,n)=>{d(),(0,r.wb)(e)&&(o=e,u=(0,r.on)(e,t,p),a.onListenerAdd?.(e))},{sync:a.sync,initial:!0});return c=(0,i.hA)(()=>{f.remove(),d()}),c}function p(e,t){return function(e,t,n){if((0,a.G4)(n))return Promise.reject((0,a.NK)());const r=e();if(t?.(r))return Promise.resolve(r);let o=null;function l(){o=(0,s.xt)(o)}return new Promise((r,s)=>{o=(0,i.vE)([(0,a.u7)(n,()=>{l(),s((0,a.NK)())}),c(e,e=>{l(),r(e)},{sync:!1,once:!0},t??f)])})}(e,h,t)}function f(e){return!0}function h(e){return!!e}n(80559);const y={sync:!0},g={initial:!0},m={sync:!0,initial:!0}},37539:(e,t,n)=>{n.d(t,{pO:()=>y,jd:()=>p,Tp:()=>f,w5:()=>d});var r=n(34727),i=n(83047),s=n(73941),a=n(79258);Math.PI;const o=a.$O.radius,l=a.$O.eccentricitySquared,u={a1:o*l,a2:o*l*o*l,a3:o*l*l/2,a4:o*l*o*l*2.5,a5:o*l+o*l*l/2,a6:1-l};a.$O.radius,a.$O.flattening,a.Sw.radius,a.Sw.flattening,a.sH.radius,a.sH.flattening,a.sH.radius;var c=n(21325);const d={2:{5:y,7:null,9:null,10:y,1:v,6:null,8:null,0:null,3:m,11:_,2:y,4:M},5:{5:y,7:null,9:null,10:y,1:v,6:null,8:null,0:null,3:m,11:_,2:y,4:M},7:{5:null,7:y,9:null,10:y,1:null,6:S,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:y,10:y,1:null,6:null,8:k,0:null,3:null,11:null,2:null,4:null},3:{5:g,7:null,9:null,10:g,1:function(e,t,n,r){const i=e[t]/P,s=O-2*Math.atan(Math.exp(-e[t+1]/P)),a=P+e[t+2],o=Math.cos(s)*a;n[r]=Math.cos(i)*o,n[r+1]=Math.sin(i)*o,n[r+2]=Math.sin(s)*a},6:null,8:null,0:null,3:y,11:function(e,t,n,r){g(e,t,n,r),_(n,r,n,r)},2:g,4:function(e,t,n,r){g(e,t,n,r),M(n,r,n,r)}},4:{5:A,7:null,9:null,10:A,1:function(e,t,n,r){A(e,t,n,r),v(n,r,n,r)},6:null,8:null,0:null,3:function(e,t,n,r){A(e,t,n,r),m(n,r,n,r)},11:function(e,t,n,r){A(e,t,n,r),_(n,r,n,r)},2:A,4:y},1:{5:R,7:null,9:null,10:R,1:y,6:null,8:null,0:null,3:function(e,t,n,r){R(e,t,n,r),m(n,r,n,r)},11:function(e,t,n,r){R(e,t,n,r),_(n,r,n,r)},2:R,4:function(e,t,n,r){R(e,t,n,r),M(n,r,n,r)}},6:{5:null,7:I,9:null,10:I,1:null,6:y,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:x,10:x,1:null,6:null,8:y,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:y,3:null,11:null,2:null,4:null},10:{5:y,7:y,9:y,10:y,1:v,6:S,8:k,0:null,3:m,11:_,2:y,4:M},11:{5:b,7:null,9:null,10:b,1:function(e,t,n,r){b(e,t,n,r),v(n,r,n,r)},6:null,8:null,0:null,3:function(e,t,n,r){b(e,t,n,r),m(n,r,n,r)},11:y,2:b,4:function(e,t,n,r){b(e,t,n,r),M(n,r,n,r)}}};function p(e,t){return f(e,t)?.projector}function f(e,t){if(null==e||null==t)return null;if(F.source.spatialReference===e&&F.dest.spatialReference===t)return F;const n=h(e,F.source),r=h(t,F.dest);return 0===n&&0===r?(0,c.aI)(e,t)?F.projector=y:F.projector=null:F.projector=d[n][r],F}function h(e,t){return e?t.spatialReference===e?t.spatialReferenceId:(t.spatialReference=e,"metersPerUnit"in t&&(t.metersPerUnit=(0,i.GA)(e,1)),(0,s.jA)(e)?t.spatialReferenceId=1:(0,c.oT)(e)?t.spatialReferenceId=2:(0,c.K8)(e)?t.spatialReferenceId=3:(0,c.r1)(e)?t.spatialReferenceId=11:e.wkt===s.Ro.wkt?t.spatialReferenceId=4:4490===e.wkid?t.spatialReferenceId=5:e.wkt===s.FY.wkt?t.spatialReferenceId=6:e.wkt===s.LJ.wkt?t.spatialReferenceId=8:(0,c.q8)(e)?t.spatialReferenceId=7:(0,c.KQ)(e)?t.spatialReferenceId=9:t.spatialReferenceId=0):0}function y(e,t,n,r){e!==n&&(n[r++]=e[t++],n[r++]=e[t++],n[r]=e[t])}function g(e,t,n,r){n[r]=q*(e[t]/P),n[r+1]=q*(O-2*Math.atan(Math.exp(-e[t+1]/P))),n[r+2]=e[t+2]}function m(e,t,n,i){!function(e,t,n,i,s){const a=.4999999*Math.PI,o=(0,r.qE)(j*e[t+1],-a,a),l=Math.sin(o);n[i++]=j*e[t]*s.radius,n[i++]=s.halfSemiMajorAxis*Math.log((1+l)/(1-l)),n[i]=e[t+2]}(e,t,n,i,a.$O)}function _(e,t,n,r){n[r]=e[t]*V,n[r+1]=e[t+1]*V,n[r+2]=e[t+2]}function b(e,t,n,r){n[r]=e[t]*C,n[r+1]=e[t+1]*C,n[r+2]=e[t+2]}function w(e,t,n,r,i){const s=i+e[t+2],a=j*e[t+1],o=j*e[t],l=Math.cos(a)*s;n[r]=Math.cos(o)*l,n[r+1]=Math.sin(o)*l,n[r+2]=Math.sin(a)*s}function k(e,t,n,r){w(e,t,n,r,a.Sw.radius)}function S(e,t,n,r){w(e,t,n,r,a.sH.radius)}function v(e,t,n,r){w(e,t,n,r,a.$O.radius)}function T(e,t,n,i,s){const a=e[t],o=e[t+1],l=e[t+2],u=Math.sqrt(a*a+o*o+l*l),c=(0,r.YN)(l/(0===u?1:u)),d=Math.atan2(o,a);n[i++]=q*d,n[i++]=q*c,n[i]=u-s}function x(e,t,n,r){T(e,t,n,r,a.Sw.radius)}function I(e,t,n,r){T(e,t,n,r,a.sH.radius)}function R(e,t,n,r){T(e,t,n,r,a.$O.radius)}function M(e,t,n,r){!function(e,t,n,r,i){const s=j*e[t],a=j*e[t+1],o=e[t+2],l=Math.sin(a),u=Math.cos(a),c=i.radius/Math.sqrt(1-i.eccentricitySquared*l*l);n[r++]=(c+o)*u*Math.cos(s),n[r++]=(c+o)*u*Math.sin(s),n[r++]=(c*(1-i.eccentricitySquared)+o)*l}(e,t,n,r,a.$O)}function A(e,t,n,r){const i=u,s=e[t],o=e[t+1],l=e[t+2];let c,d,p,f,h,y,g,m,_,b,w,k,S,v,T,x,I,R,M,A,F;c=Math.abs(l),d=s*s+o*o,p=Math.sqrt(d),f=d+l*l,h=Math.sqrt(f),A=Math.atan2(o,s),y=l*l/f,g=d/f,v=i.a2/h,T=i.a3-i.a4/h,g>.3?(m=c/h*(1+g*(i.a1+v+y*T)/h),M=Math.asin(m),b=m*m,_=Math.sqrt(1-b)):(_=p/h*(1-y*(i.a5-v-g*T)/h),M=Math.acos(_),b=1-_*_,m=Math.sqrt(b)),w=1-a.$O.eccentricitySquared*b,k=a.$O.radius/Math.sqrt(w),S=i.a6*k,v=p-k*_,T=c-S*m,I=_*v+m*T,x=_*T-m*v,R=x/(S/w+I),M+=R,F=I+x*R/2,l<0&&(M=-M),n[r++]=q*A,n[r++]=q*M,n[r]=F}const F={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:y},j=(0,r.kU)(1),q=(0,r.KJ)(1),O=.5*Math.PI,P=a.$O.radius,V=P*Math.PI/180,C=180/(P*Math.PI)},39357:(e,t,n)=>{n.d(t,{H:()=>l});var r,i=n(31635),s=n(25482),a=n(10107),o=(n(44208),n(53966),n(87811),n(40608));let l=r=class extends s.A{constructor(e){super(e),this.name=null,this.code=null}clone(){return new r({name:this.name,code:this.code})}};(0,i.Cg)([(0,a.MZ)({type:String,json:{write:{isRequired:!0}}})],l.prototype,"name",void 0),(0,i.Cg)([(0,a.MZ)({type:[String,Number],json:{write:{isRequired:!0}}})],l.prototype,"code",void 0),l=r=(0,i.Cg)([(0,o.$)("esri.layers.support.CodedValue")],l)},40804:(e,t,n)=>{n.d(t,{U:()=>i});var r=n(34727);function i(e,t,n=0){const i=(0,r.qE)(e,0,o);for(let e=0;e<4;e++)t[n+e]=Math.floor(256*l(i*s[e]))}const s=[1,256,65536,16777216],a=[1/256,1/65536,1/16777216,1/4294967296],o=function(e,t=0){let n=0;for(let r=0;r<4;r++)n+=e[t+r]*a[r];return n}(new Uint8ClampedArray([255,255,255,255]));function l(e){return e-Math.floor(e)}},50498:(e,t,n)=>{n.d(t,{Ye:()=>d,gy:()=>c,yR:()=>p});var r=n(66552),i=n(5443),s=n(91075),a=n(48526),o=n(86738),l=n(39829),u=n(82799);const c=(0,r.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),d=(0,r.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"}),p={base:s.A,key:"type",typeMap:{extent:i.A,multipoint:a.A,point:o.A,polyline:u.A,polygon:l.A}}},51624:(e,t,n)=>{n.d(t,{A:()=>u});var r=n(44208),i=n(69397),s=n(93687);const a=4294967296,o=new TextDecoder("utf-8"),l=(0,r.A)("safari")||(0,r.A)("ios")?6:(0,r.A)("ff")?12:32;class u{constructor(e,t,n=0,r=(e?e.byteLength:0)){this._tag=0,this._dataType=99,this._init(e,t,n,r)}_init(e,t,n,r){this._data=e,this._dataView=t,this._pos=n,this._end=r}get usedMemory(){return 64+(0,i.Qf)(this._data)}asUnsafe(){return this}clone(){return new u(this._data,this._dataView,this._pos,this._end)}pos(){return this._pos}move(e){this._pos=e}nextTag(e){for(;;){if(this._pos===this._end)return!1;const t=this._decodeVarint();if(this._tag=t>>3,this._dataType=7&t,!e||e===this._tag)break;this.skip()}return!0}next(){if(this._pos===this._end)return!1;const e=this._decodeVarint();return this._tag=e>>3,this._dataType=7&e,!0}empty(){return this._pos>=this._end}tag(){return this._tag}getInt32(){return this._decodeVarint()}getInt64(){return this._decodeVarint()}getUInt32(){let e=4294967295;if(e=(127&this._data[this._pos])>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<7)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<14)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<21)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(15&this._data[this._pos])<<28)>>>0,this._data[this._pos++]<128)return e;throw new Error("Varint overflow")}getUInt64(){return this._decodeVarint()}getSInt32(){const e=this.getUInt32();return e>>>1^-(1&e)}getSInt64(){return this._decodeSVarint()}getBool(){const e=0!==this._data[this._pos];return this._skip(1),e}getEnum(){return this._decodeVarint()}getFixed64(){const e=this._dataView,t=this._pos,n=e.getUint32(t,!0)+e.getUint32(t+4,!0)*a;return this._skip(8),n}getSFixed64(){const e=this._dataView,t=this._pos,n=e.getUint32(t,!0)+e.getInt32(t+4,!0)*a;return this._skip(8),n}getDouble(){const e=this._dataView.getFloat64(this._pos,!0);return this._skip(8),e}getFixed32(){const e=this._dataView.getUint32(this._pos,!0);return this._skip(4),e}getSFixed32(){const e=this._dataView.getInt32(this._pos,!0);return this._skip(4),e}getFloat(){const e=this._dataView.getFloat32(this._pos,!0);return this._skip(4),e}getString(){const e=this._getLength(),t=this._pos,n=this._toString(this._data,t,t+e);return this._skip(e),n}getBytes(){const e=this._getLength(),t=this._pos,n=this._toBytes(this._data,t,t+e);return this._skip(e),n}getLength(){return this._getLengthUnsafe()}processMessageWithArgs(e,t,n,r){const i=this.getMessage(),s=e(i,t,n,r);return i.release(),s}processMessage(e){const t=this.getMessage(),n=e(t);return t.release(),n}getMessage(){const e=this._getLength(),t=u.pool.acquire();return t._init(this._data,this._dataView,this._pos,this._pos+e),this._skip(e),t}release(){u.pool.release(this)}dataType(){return this._dataType}skip(){switch(this._dataType){case 0:this._decodeVarint();break;case 1:this._skip(8);break;case 2:this._skip(this._getLength());break;case 5:this._skip(4);break;default:throw new Error("Invalid data type!")}}skipLen(e){this._skip(e)}_skip(e){if(this._pos+e>this._end)throw new Error("Attempt to skip past the end of buffer!");this._pos+=e}_decodeVarint(){const e=this._data;let t=this._pos,n=0,r=0;if(this._end-t>=10)do{if(r=e[t++],n|=127&r,!(128&r))break;if(r=e[t++],n|=(127&r)<<7,!(128&r))break;if(r=e[t++],n|=(127&r)<<14,!(128&r))break;if(r=e[t++],n|=(127&r)<<21,!(128&r))break;if(r=e[t++],n+=268435456*(127&r),!(128&r))break;if(r=e[t++],n+=34359738368*(127&r),!(128&r))break;if(r=e[t++],n+=4398046511104*(127&r),!(128&r))break;if(r=e[t++],n+=562949953421312*(127&r),!(128&r))break;if(r=e[t++],n+=72057594037927940*(127&r),!(128&r))break;if(r=e[t++],n+=0x8000000000000000*(127&r),!(128&r))break;throw new Error("Varint too long!")}while(0);else{let i=1;for(;t!==this._end&&(r=e[t],128&r);)++t,n+=(127&r)*i,i*=128;if(t===this._end)throw new Error("Varint overrun!");++t,n+=r*i}return this._pos=t,n}_decodeSVarint(){const e=this._data;let t,n=0,r=0;const i=1&e[this._pos];if(r=e[this._pos++],n|=127&r,!(128&r))return i?-(n+1)/2:n/2;if(r=e[this._pos++],n|=(127&r)<<7,!(128&r))return i?-(n+1)/2:n/2;if(r=e[this._pos++],n|=(127&r)<<14,!(128&r))return i?-(n+1)/2:n/2;if(r=e[this._pos++],n|=(127&r)<<21,!(128&r))return i?-(n+1)/2:n/2;if(r=e[this._pos++],n+=268435456*(127&r),!(128&r))return i?-(n+1)/2:n/2;if(r=e[this._pos++],n+=34359738368*(127&r),!(128&r))return i?-(n+1)/2:n/2;if(r=e[this._pos++],n+=4398046511104*(127&r),!(128&r))return i?-(n+1)/2:n/2;if(t=BigInt(n),r=e[this._pos++],t+=0x2000000000000n*BigInt(127&r),!(128&r))return Number(i?-(t+1n)/2n:t/2n);if(r=e[this._pos++],t+=0x100000000000000n*BigInt(127&r),!(128&r))return Number(i?-(t+1n)/2n:t/2n);if(r=e[this._pos++],t+=0x8000000000000000n*BigInt(127&r),!(128&r))return Number(i?-(t+1n)/2n:t/2n);throw new Error("Varint too long!")}_getLength(){if(2!==this._dataType)throw new Error("Not a delimited data type!");return this._decodeVarint()}_getLengthUnsafe(){return this.getUInt32()}_toString(e,t,n){if((n=Math.min(this._end,n))-t>l){const r=e.subarray(t,n);return o.decode(r)}let r="",i="";for(let s=t;s<n;++s){const t=e[s];128&t?i+="%"+t.toString(16):(r+=decodeURIComponent(i)+String.fromCharCode(t),i="")}return i.length&&(r+=decodeURIComponent(i)),r}_toBytes(e,t,n){return n=Math.min(this._end,n),new Uint8Array(e.buffer,t,n-t)}static{this.pool=new s.A(u,void 0,e=>{e._data=null,e._dataView=null})}}},53177:(e,t,n)=>{n.d(t,{A:()=>d});var r,i=n(31635),s=n(4718),a=n(10107),o=(n(44208),n(53966),n(93223)),l=n(40608),u=n(39357),c=n(76357);let d=class extends c.A{static{r=this}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 r({codedValues:(0,s.o8)(this.codedValues),name:this.name})}};(0,i.Cg)([(0,a.MZ)({type:[u.H],json:{write:{isRequired:!0}}})],d.prototype,"codedValues",void 0),(0,i.Cg)([(0,o.e)({codedValue:"coded-value"})],d.prototype,"type",void 0),d=r=(0,i.Cg)([(0,l.$)("esri.layers.support.CodedValueDomain")],d)},53655:(e,t,n)=>{n.d(t,{SH:()=>M,ae:()=>v,cn:()=>_});var r=n(49186),i=n(51624),s=n(92722),a=n(69418);const o=["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeString","esriFieldTypeDate","esriFieldTypeOID","esriFieldTypeGeometry","esriFieldTypeBlob","esriFieldTypeRaster","esriFieldTypeGUID","esriFieldTypeGlobalID","esriFieldTypeXML","esriFieldTypeBigInteger","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"],l=["sqlTypeBigInt","sqlTypeBinary","sqlTypeBit","sqlTypeChar","sqlTypeDate","sqlTypeDecimal","sqlTypeDouble","sqlTypeFloat","sqlTypeGeometry","sqlTypeGUID","sqlTypeInteger","sqlTypeLongNVarchar","sqlTypeLongVarbinary","sqlTypeLongVarchar","sqlTypeNChar","sqlTypeNVarchar","sqlTypeOther","sqlTypeReal","sqlTypeSmallInt","sqlTypeSqlXml","sqlTypeTime","sqlTypeTimestamp","sqlTypeTimestamp2","sqlTypeTinyInt","sqlTypeVarbinary","sqlTypeVarchar"],u=["upperLeft","lowerLeft"];function c(e){return e>=o.length?null:o[e]}function d(e){return e>=l.length?null:l[e]}function p(e){return e>=u.length?null:u[e]}function f(e,t){return t>=e.geometryTypes.length?null:e.geometryTypes[t]}function h(e,t,n){const r=e.asUnsafe(),i=t.createPointGeometry(n);for(;r.next();)switch(r.tag()){case 3:{const e=r.getUInt32(),n=r.pos()+e;let s=0;for(;r.pos()<n;)t.addCoordinatePoint(i,r.getSInt64(),s++);break}default:r.skip()}return i}function y(e,t,n){const r=e.asUnsafe(),i=t.createGeometry(n),s=2+(n.hasZ?1:0)+(n.hasM?1:0);for(;r.next();)switch(r.tag()){case 2:{const e=r.getUInt32(),n=r.pos()+e;let s=0;for(;r.pos()<n;)t.addLength(i,r.getUInt32(),s++);break}case 3:{const e=r.getUInt32(),n=r.pos()+e;let a=0;for(t.allocateCoordinates(i);r.pos()<n;)t.addCoordinate(i,r.getSInt64(),a),a++,a===s&&(a=0);break}default:r.skip()}return i}function g(e){const t=e.asUnsafe(),n=new s.A;let r="esriGeometryPoint";for(;t.next();)switch(t.tag()){case 2:{const e=t.getUInt32(),r=t.pos()+e;for(;t.pos()<r;)n.lengths.push(t.getUInt32());break}case 3:{const e=t.getUInt32(),r=t.pos()+e;for(;t.pos()<r;)n.coords.push(t.getSInt64());break}case 1:r=a.z[t.getEnum()];break;default:t.skip()}return{queryGeometry:n,queryGeometryType:r}}function m(e){const t=e.asUnsafe();for(;t.next();)switch(t.tag()){case 1:return t.getString();case 2:return t.getFloat();case 3:return t.getDouble();case 4:return t.getSInt32();case 5:return t.getUInt32();case 6:return t.getInt64();case 7:return t.getUInt64();case 8:return t.getSInt64();case 9:return t.getBool();default:return t.skip(),null}return null}function _(e){const t=e.asUnsafe(),n={type:c(0)};for(;t.next();)switch(t.tag()){case 1:n.name=t.getString();break;case 2:n.type=c(t.getEnum());break;case 3:n.alias=t.getString();break;case 4:n.sqlType=d(t.getEnum());break;case 5:default:t.skip();break;case 6:n.defaultValue=t.getString()}return n}function b(e){const t={},n=e.asUnsafe();for(;n.next();)switch(n.tag()){case 1:t.name=n.getString();break;case 2:t.isSystemMaintained=n.getBool();break;default:n.skip()}return t}function w(e,t,n,r){const i=t.createFeature(n);let s=0;for(;e.next();)switch(e.tag()){case 1:{const t=r[s++].name;i.attributes[t]=e.processMessage(m);break}case 2:i.geometry=e.processMessageWithArgs(y,t,n);break;case 4:i.centroid=e.processMessageWithArgs(h,t,n);break;default:e.skip()}return i}function k(e){const t=[1,1,1,1],n=e.asUnsafe();for(;n.next();)switch(n.tag()){case 1:t[0]=n.getDouble();break;case 2:t[1]=n.getDouble();break;case 4:t[2]=n.getDouble();break;case 3:t[3]=n.getDouble();break;default:n.skip()}return t}function S(e){const t=[0,0,0,0],n=e.asUnsafe();for(;n.next();)switch(n.tag()){case 1:t[0]=n.getDouble();break;case 2:t[1]=n.getDouble();break;case 4:t[2]=n.getDouble();break;case 3:t[3]=n.getDouble();break;default:n.skip()}return t}function v(e){const t={originPosition:p(0)},n=e.asUnsafe();for(;n.next();)switch(n.tag()){case 1:t.originPosition=p(n.getEnum());break;case 2:t.scale=n.processMessage(k);break;case 3:t.translate=n.processMessage(S);break;default:n.skip()}return t}function T(e){const t={},n=e.asUnsafe();for(;n.next();)switch(n.tag()){case 1:t.shapeAreaFieldName=n.getString();break;case 2:t.shapeLengthFieldName=n.getString();break;case 3:t.units=n.getString();break;default:n.skip()}return t}function x(e,t){const n=t.createSpatialReference();for(;e.next();)switch(e.tag()){case 1:n.wkid=e.getUInt32();break;case 5:n.wkt=e.getString();break;case 2:n.latestWkid=e.getUInt32();break;case 3:n.vcsWkid=e.getUInt32();break;case 4:n.latestVcsWkid=e.getUInt32();break;default:e.skip()}return n}function I(e,t){const n=t.createFeatureResult(),r=e.asUnsafe();n.geometryType=f(t,0);let i=!1;for(;r.next();)switch(r.tag()){case 1:n.objectIdFieldName=r.getString();break;case 3:n.globalIdFieldName=r.getString();break;case 4:n.geohashFieldName=r.getString();break;case 5:n.geometryProperties=r.processMessage(T);break;case 7:n.geometryType=f(t,r.getEnum());break;case 8:n.spatialReference=r.processMessageWithArgs(x,t);break;case 10:n.hasZ=r.getBool();break;case 11:n.hasM=r.getBool();break;case 12:n.transform=r.processMessage(v);break;case 9:n.exceededTransferLimit=r.getBool();break;case 13:t.addField(n,r.processMessage(_));break;case 15:i||(t.prepareFeatures(n),i=!0),t.addFeature(n,r.processMessageWithArgs(w,t,n,n.fields));break;case 2:n.uniqueIdField=r.processMessage(b);break;default:r.skip()}return t.finishFeatureResult(n),n}function R(e,t){const n={};let r=null;for(;e.next();)switch(e.tag()){case 4:r=e.processMessageWithArgs(g);break;case 1:n.featureResult=e.processMessageWithArgs(I,t);break;default:e.skip()}return null!=r&&n.featureResult&&t.addQueryGeometry(n,r),n}function M(e,t){try{const n=2,r=new i.A(new Uint8Array(e),new DataView(e)),s={};for(;r.next();)r.tag()===n?s.queryResult=r.processMessageWithArgs(R,t):r.skip();return s}catch(e){throw new r.A("query:parsing-pbf","Error while parsing FeatureSet PBF payload",{error:e})}}},55674:(e,t,n)=>{n.d(t,{Ad:()=>f,Gj:()=>g,QY:()=>p,lL:()=>m,xR:()=>h});var r=n(66131),i=n(49186),s=(n(44208),n(44729)),a=n(15032),o=n(65864),l=n(95466),u=n(43668),c=n(98623);const d=["geometry","scale","timeProperties"];function p(e,t){if(null!=t)for(const n of d)t.hasArcadeDependency(n)&&e.add(n);return e}function f(e,t){return y.create(e,t,null,["$feature","$view"])}function h(e,t,n){return y.create(e,t,n,["$feature","$view","$config"])}class y{static async create(e,t,n,r){const{arcade:s,Dictionary:a}=await(0,u.l)();let o;try{o=s.parseScript(e)}catch(t){throw new i.A("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})}const l=s.scriptUsesGeometryEngine(o);l&&await s.enableGeometrySupport(),await s.loadDependentModules(new Set,o,null,!1,l);const c={vars:r.reduce((e,t)=>({...e,[t]:null}),{}),spatialReference:t,useAsync:!1},d=s.compileScript(o,c);let p=null;null!=n&&(p=new a(n),p.immutable=!0);const f=new a;return f.immutable=!1,f.setField("scale",0),new y(e,s,o,d,t,f,p,a)}constructor(e,t,n,r,i,s,a,o){this.script=e,this._arcade=t,this._syntaxTree=n,this._compiled=r,this._spatialReference=i,this._viewDict=s,this._configDict=a,this._dictionaryCtor=o,this._dependencies=new Map,this._featureReader=new g,this._dependencies.set("geometry",t.scriptTouchesGeometry(this._syntaxTree)),this._dependencies.set("scale",this._arcade.referencesMember(this._syntaxTree,"scale")),this._dependencies.set("timeProperties",this._arcade.scriptUsesViewProperties(this._syntaxTree,["timeProperties"]))}evaluate(e,t){const n=t.$view?.timeZone;if(t.$view){let e;if(this._viewDict.setField("scale",t.$view.scale),null!=t.$view.timeProperties){const{currentStart:i,currentEnd:s}=t.$view.timeProperties;e=new this._dictionaryCtor({currentStart:null!=i?null!=n?r.lY.epochToArcadeDate(i,n):r.lY.unknownEpochToArcadeDate(i):void 0,currentEnd:null!=s?null!=n?r.lY.epochToArcadeDate(s,n):r.lY.unknownEpochToArcadeDate(s):void 0,startIncluded:!0,endIncluded:!0})}this._viewDict.setField("timeProperties",e)}return this._compiled({vars:{$view:this._viewDict,$config:this._configDict,$feature:e},spatialReference:this._spatialReference,timeZone:n})}repurposeFeature(e,t){return this._featureReader.bind(e,t,this._spatialReference),this._featureReader}references(e){return this._dependencies.get(e)??!1}}class g{constructor(){this._boundTarget=null,this._boundSchema={fields:null,fieldsIndex:null,spatialReference:null,get geometryType(){return null},get objectIdField(){return null}},this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}bind(e,t,n){const r=t??new l.A(m(e.attributes));this._boundTarget=e,this._boundSchema.fields=r.fields,this._boundSchema.fieldsIndex=r,this._boundSchema.spatialReference=n}_getField(e){return this._boundSchema.fieldsIndex.get(e)}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(e){this._contextTimeZone=e}readArcadeFeature(){return this}hasField(e){return this._boundSchema.fieldsIndex.has(e)}geometry(){if("fromJSON"in this._boundTarget)return this._boundTarget.geometry;const e=(0,o.rS)(this._boundTarget.geometry);if(e){if(!this._boundSchema.spatialReference)throw new Error("InternalError: Expected spatial reference to be defined");e.spatialReference=this._boundSchema.spatialReference}return e}isUnknownDateTimeField(e){return this._boundSchema.fieldsIndex.getTimeZone(e)===c.L5}field(e,t=!0){const n=this._getField(e);if(n){const t=this._boundTarget.attributes[n.name];if(null==t)return null;switch(n.type){case"date-only":case"esriFieldTypeDateOnly":return s.n.fromReader(t);case"time-only":case"esriFieldTypeTimeOnly":return a.k.fromReader(t);case"esriFieldTypeTimestampOffset":case"timestamp-offset":return r.lY.fromReaderAsTimeStampOffset(t);case"date":case"esriFieldTypeDate":return this.isUnknownDateTimeField(e)?r.lY.unknownEpochToArcadeDate(t):r.lY.epochToArcadeDate(t,this.contextTimeZone??c.qU);default:return t}}if(t)throw new Error(`Field ${e} does not exist`);return null}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this._boundSchema.fieldsIndex.fields.map(e=>e.name)}castToText(e=!1){return JSON.stringify(this._boundTarget)}gdbVersion(){return null}fullSchema(){return this._boundSchema}castAsJson(e=null){return{attributes:this._boundTarget.attributes,geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null}}castAsJsonAsync(e=null,t=null){return Promise.resolve(this.castAsJson(t))}}function m(e){const t=[];for(const n in e)t.push({name:n,alias:n,type:"string"==typeof e[n]?"esriFieldTypeString":"esriFieldTypeDouble"});return t}},58501:(e,t,n)=>{n.d(t,{q:()=>i});var r=n(62815);function i(e,t,n){if(!n?.features||!n.hasZ)return;const i=(0,r.N)(n.geometryType,t,e.outSpatialReference);if(null!=i)for(const e of n.features)i(e.geometry)}},62815:(e,t,n)=>{n.d(t,{N:()=>a});var r=n(83047),i=n(73941),s=n(21325);function a(e,t,n){if(null==t||null==n||n.vcsWkid||(0,s.aI)(t,n)||(0,i.xP)(t)||(0,i.xP)(n))return null;const a=(0,r.G9)(t)/(0,r.G9)(n);if(1===a)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){null!=e?.z&&(e.z*=t)}(e,a);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const n of e.paths)for(const e of n)e.length>2&&(e[2]*=t)}(e,a);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const n of e.rings)for(const e of n)e.length>2&&(e[2]*=t)}(e,a);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const n of e.points)n.length>2&&(n[2]*=t)}(e,a);case"extent":case"esriGeometryEnvelope":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,a);default:return null}}},66208:(e,t,n)=>{n.d(t,{m:()=>i});var r=n(53655);function i(e,t){const n=(0,r.SH)(e,t),i=n.queryResult.featureResult,s=n.queryResult.queryGeometry,a=n.queryResult.queryGeometryType;if(i&&i.features&&i.features.length&&i.objectIdFieldName){const e=i.objectIdFieldName;for(const t of i.features)t.attributes&&(t.objectId=t.attributes[e])}return i&&(i.queryGeometry=s,i.queryGeometryType=a),i}},69418:(e,t,n)=>{n.d(t,{S:()=>u,z:()=>l});var r=n(83047),i=n(21325),s=n(43334),a=n(58512),o=n(92722);const l=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"];class u{constructor(e){this._options=e,this.geometryTypes=l,this._coordinatePtr=0,this._vertexDimension=0}createFeatureResult(){return new a.A}prepareFeatures(e){this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++}finishFeatureResult(e){if(!e?.features||!e.hasZ||!this._options.sourceSpatialReference||!e.spatialReference||(0,i.aI)(e.spatialReference,this._options.sourceSpatialReference)||e.spatialReference.vcsWkid)return;const t=(0,r.G9)(this._options.sourceSpatialReference)/(0,r.G9)(e.spatialReference);if(1!==t)for(const n of e.features){if(!(0,s.N3)(n))continue;const e=n.geometry.coords;for(let n=2;n<e.length;n+=3)e[n]*=t}}addFeature(e,t){e.features.push(t)}createFeature(){return new s.Om(null,{},null,0)}createSpatialReference(){return{wkid:0}}createGeometry(){return new o.A}addField(e,t){e.fields.push(t)}allocateCoordinates(e){e.coords.length=e.lengths.reduce((e,t)=>e+t,0)*this._vertexDimension,this._coordinatePtr=0}addCoordinate(e,t){e.coords[this._coordinatePtr++]=t}addCoordinatePoint(e,t){e.coords.push(t)}addLength(e,t){e.lengths.push(t)}addQueryGeometry(e,t){e.queryGeometry=t.queryGeometry,e.queryGeometryType=t.queryGeometryType}createPointGeometry(){return new o.A}}},73681:(e,t,n)=>{n.d(t,{n:()=>l});var r=n(49186),i=n(53966),s=n(46140),a=n(95466),o=n(55674);class l{static async from(e,t,n){const a=e.dictionary_version?s.R.parse(e.dictionary_version):null,c=new Set(e.itemsNames),d={};if(t)for(const e in t)d[e]=t[e];if(e.authoringInfo.configuration)for(const t of e.authoringInfo.configuration)d.hasOwnProperty(t.name)||(d[t.name]=t.value);const p=new Set(e.authoringInfo.symbol);for(const e of Object.keys(n))p.delete(e);p.size&&i.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:p});const f=await(0,o.xR)(e.expression,null,d);if(!f)throw new r.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");const h=!a||!a.greaterEqual(4,0);h&&i.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:a});const y=new u(n,h);return new l(h,c,f,y)}constructor(e,t,n,r){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=n,this._reader=r}get itemNames(){return this._itemNames}evaluate(e,t,n,r){try{return this._reader.bind(e,n,r),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){i.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new a.A(e);const t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new a.A(t)}}class u extends o.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){const t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);const t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},76357:(e,t,n)=>{n.d(t,{A:()=>c});var r=n(31635),i=n(66552),s=n(25482),a=n(10107),o=(n(44208),n(53966),n(87811),n(93223)),l=n(40608);const u=new i.J({inherited:"inherited",codedValue:"coded-value",range:"range"});let c=class extends s.A{constructor(e){super(e),this.name=null,this.type=null}};(0,r.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,r.Cg)([(0,o.e)(u),(0,a.MZ)({json:{write:{isRequired:!0}}})],c.prototype,"type",void 0),c=(0,r.Cg)([(0,l.$)("esri.layers.support.Domain")],c)},80451:(e,t,n)=>{n.d(t,{rS:()=>h,gK:()=>f}),n(44208);var r,i=n(53177),s=n(76357),a=n(31635),o=(n(53966),n(87811),n(49186),n(93223)),l=n(40608);let u=class extends s.A{static{r=this}constructor(e){super(e),this.type="inherited"}clone(){return new r}};(0,a.Cg)([(0,o.e)({inherited:"inherited"})],u.prototype,"type",void 0),u=r=(0,a.Cg)([(0,l.$)("esri.layers.support.InheritedDomain")],u);var c,d=n(10107);let p=class extends s.A{static{c=this}constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new c({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,a.Cg)([(0,d.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>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]},isRequired:!0}}})],p.prototype,"maxValue",void 0),(0,a.Cg)([(0,d.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,n){t[n]=[e,this.maxValue||0]},isRequired:!0}}})],p.prototype,"minValue",void 0),(0,a.Cg)([(0,o.e)({range:"range"})],p.prototype,"type",void 0),p=c=(0,a.Cg)([(0,l.$)("esri.layers.support.RangeDomain")],p);const f={key:"type",base:s.A,typeMap:{range:p,"coded-value":i.A,inherited:u}};function h(e){if(!e?.type)return null;switch(e.type){case"range":return p.fromJSON(e);case"codedValue":return i.A.fromJSON(e);case"inherited":return u.fromJSON(e)}return null}},80893:(e,t,n)=>{n.d(t,{IJ:()=>h,Jf:()=>_,Pk:()=>g,eW:()=>f,gW:()=>m,kS:()=>y});var r=n(78888),i=n(84952),s=n(65864),a=n(17136),o=n(21325),l=n(10536),u=n(66208),c=n(58501);const d="Layer does not support extent calculation.";function p(e,t,n){const r=e.geometry,i=e.toJSON();delete i.compactGeometryEnabled,delete i.defaultSpatialReferenceEnabled;const a=i;let l,u,c;if(r&&(u=r.spatialReference,c=(0,o.YX)(u),a.geometryType=(0,s.$B)(r),a.geometry=function(e,t){if(t&&"extent"===e.type)return`${e.xmin},${e.ymin},${e.xmax},${e.ymax}`;if(t&&"point"===e.type)return`${e.x},${e.y}`;const n=e.toJSON();return delete n.spatialReference,JSON.stringify(n)}(r,e.compactGeometryEnabled),a.inSR=c),i.groupByFieldsForStatistics&&(a.groupByFieldsForStatistics=i.groupByFieldsForStatistics.join(",")),i.objectIds)switch(n?.uniqueIdFields?.length){case void 0:a.objectIds=i.objectIds.join(",");break;case 1:a.uniqueIds=JSON.stringify(i.objectIds),delete a.objectIds;break;default:a.uniqueIds=JSON.stringify(i.objectIds.map(e=>JSON.parse(e))),delete a.objectIds}if(i.orderByFields&&(a.orderByFields=i.orderByFields.join(",")),!i.outFields||!i.returnDistinctValues&&(t?.returnCountOnly||t?.returnExtentOnly||t?.returnIdsOnly)?delete a.outFields:i.outFields.includes("*")?a.outFields="*":a.outFields=i.outFields.join(","),i.outSR?(a.outSR=(0,o.YX)(i.outSR),l=e.outSpatialReference):r&&(i.returnGeometry||i.returnCentroid)&&(a.outSR=a.inSR,l=u),i.returnGeometry&&delete i.returnGeometry,i.outStatistics&&(a.outStatistics=JSON.stringify(i.outStatistics)),i.fullText&&(a.fullText=JSON.stringify(i.fullText)),i.pixelSize&&(a.pixelSize=JSON.stringify(i.pixelSize)),i.quantizationParameters&&(e.defaultSpatialReferenceEnabled&&null!=u&&null!=e.quantizationParameters?.extent&&u.equals(e.quantizationParameters.extent.spatialReference)&&delete i.quantizationParameters.extent.spatialReference,a.quantizationParameters=JSON.stringify(i.quantizationParameters)),i.parameterValues&&(a.parameterValues=JSON.stringify(i.parameterValues)),i.rangeValues&&(a.rangeValues=JSON.stringify(i.rangeValues)),i.dynamicDataSource&&(a.layer=JSON.stringify({source:i.dynamicDataSource}),delete i.dynamicDataSource),i.timeExtent){const e=i.timeExtent,{start:t,end:n}=e;null==t&&null==n||(a.time=t===n?t:`${t??"null"},${n??"null"}`),delete i.timeExtent}return e.defaultSpatialReferenceEnabled&&null!=u&&null!=l&&u.equals(l)&&(a.defaultSR=a.inSR,delete a.inSR,delete a.outSR),a}async function f(e,t,n,r,i){const s=t.timeExtent?.isEmpty?{data:{features:[]}}:await w(e,t,"json",r,void 0,i);return(0,c.q)(t,n,s.data),s}async function h(e,t,n,r,i){if(t.timeExtent?.isEmpty)return{data:n.createFeatureResult()};const s=await y(e,t,r,i),a=s;return a.data=(0,u.m)(s.data,n),a}function y(e,t,n,r){return w(e,t,"pbf",n,void 0,r)}function g(e,t,n,r){return t.timeExtent?.isEmpty?Promise.resolve({data:{objectIds:[]}}):w(e,t,"json",n,{returnIdsOnly:!0},r)}function m(e,t,n,r){return t.timeExtent?.isEmpty?Promise.resolve({data:{count:0}}):w(e,t,"json",n,{returnIdsOnly:!0,returnCountOnly:!0},r)}async function _(e,t,n){if(t.timeExtent?.isEmpty)return{data:{count:0,extent:null}};const r=await w(e,t,"json",n,{returnExtentOnly:!0,returnCountOnly:!0}),i=r.data;if(i.hasOwnProperty("extent"))return r;if(i.features)throw new Error(d);if(i.hasOwnProperty("count"))throw new Error(d);return r}function b(e,t){if(!e.returnIdsOnly||!t.uniqueIdFields)return e;const n={...e,returnUniqueIdsOnly:!0};return delete n.returnIdsOnly,n}async function w(e,t,n,s={},o={},u={}){const c="string"==typeof e?(0,i.An)(e):e,d=t.geometry?[t.geometry]:[],f=await(0,a.el)(d,null,{signal:s.signal}),h=f?.[0];null!=h&&((t=t.clone()).geometry=h);const y=(0,l.z)({...c.query,f:n,...b(o,u),...p(t,o,u)});return(0,r.A)((0,i.fj)(c.path,(g=o,null==t.formatOf3DObjects||g.returnCountOnly||g.returnExtentOnly||g.returnIdsOnly?"query":"query3d")),{...s,responseType:"pbf"===n?"array-buffer":"json",query:{...y,...s.query}});var g}},98988:(e,t,n)=>{n.r(t),n.d(t,{canProjectWithoutEngine:()=>J,getTransformation:()=>N,getTransformations:()=>U,initializeProjection:()=>Y,isEqualBaseGCS:()=>W,isLoaded:()=>j,isLoadedOrLoad:()=>q,isLoadedOrLoadFor:()=>O,load:()=>V,project:()=>C,projectExtent:()=>se,projectMany:()=>D,projectMultipoint:()=>X,projectOrLoad:()=>E,projectOrLoadMany:()=>G,projectPoint:()=>H,projectPolygon:()=>re,projectPolyline:()=>te,projectWithZConversion:()=>B,projectWithoutEngine:()=>K,requiresLoad:()=>P,test:()=>L,tryProjectWithZConversion:()=>z,unload:()=>$});var r=n(49186),i=n(74887),s=n(62788),a=n(95488),o=n(51850),l=n(21276),u=n(73941),c=n(5443),d=n(48526),p=n(83290),f=n(86738),h=n(39829),y=n(82799),g=n(16930),m=n(9762),_=n(37539);function b(e,t,n,r,i,s){return w[0]=e,w[1]=t,w[2]=n,(0,m.projectBuffer)(w,r,0,i,s,0)}const w=(0,o.vt)();let k=0;class S{static fromGE(e){const t=new S;return t._wkt=e.wkt,t._wkid=e.wkid,t._isInverse=e.isInverse,t}constructor(e){this.uid=k++,e?(this._wkt=null!=e.wkt?e.wkt:null,this._wkid=null!=e.wkid?e.wkid:-1,this._isInverse=null!=e.isInverse&&!0===e.isInverse):(this._wkt=null,this._wkid=-1,this._isInverse=!1)}get wkt(){return this._wkt}set wkt(e){this._wkt=e,this.uid=k++}get wkid(){return this._wkid}set wkid(e){this._wkid=e,this.uid=k++}get isInverse(){return this._isInverse}set isInverse(e){this._isInverse=e,this.uid=k++}getInverse(){const e=new S;return e._wkt=this.wkt,e._wkid=this._wkid,e._isInverse=!this.isInverse,e}}class v{static cacheKey(e,t){return[e.wkid?.toString()??"-1",e.wkt?.toString()??"",e.wkt2?.toString()??"",t.wkid?.toString()??"-1",t.wkt?.toString()??"",t.wkt2?.toString()??""].join()}static fromGE(e){const t=new v;let n="";for(const r of e.steps){const e=S.fromGE(r);t.steps.push(e),n+=e.uid.toString()+","}return t._cachedProjection={},t._gtlistentry=null,t._chain=n,t}constructor(e){if(this.steps=[],this._cachedProjection={},this._chain="",this._gtlistentry=null,e?.steps)for(const t of e.steps)t instanceof S?this.steps.push(t):this.steps.push(new S({wkid:t.wkid,wkt:t.wkt,isInverse:t.isInverse}))}getInverse(){const e=new v;e.steps=[];for(let t=this.steps.length-1;t>=0;t--){const n=this.steps[t];e.steps.push(n.getInverse())}return e}getGTListEntry(){let e="";for(const t of this.steps)e+=t.uid.toString()+",";return e!==this._chain&&(this._gtlistentry=null,this._cachedProjection={},this._chain=e),this._gtlistentry}assignCachedGe(e,t,n){this._cachedProjection[v.cacheKey(e,t)]=n}getCachedGeTransformation(e,t){let n="";for(const e of this.steps)n+=e.uid.toString()+",";n!==this._chain&&(this._gtlistentry=null,this._cachedProjection={},this._chain=n);const r=this._cachedProjection[v.cacheKey(e,t)];return void 0===r?null:r}}var T=n(21325),x=n(62815);let I=null,R=null,M=null,A={};const F=new a.I;function j(){return!!I&&(0,p.i)()}function q(){return!!j()||((0,s.gc)(F),V(),!1)}function O(e,t){return!e||!t||J(e,t)||q()}function P(e,t){return!J(e,t)&&!j()}function V(e){return null==M&&(M=Promise.all([(0,p.l)(),n.e(9930).then(n.bind(n,49930)).then(e=>e.g),n.e(2731).then(n.bind(n,12731))])),M.then(([,t,{hydratedAdapter:n}])=>{(0,i.Te)(e),R=n,I=t.default,I._enableProjection(p.p),F.notify()})}function C(e,t,n=null,r=null){return Array.isArray(e)?0===e.length?[]:((0,l.H)(e),D(R,e,e[0].spatialReference,t,n,r)):((0,l.f)(e),D(R,[e],e.spatialReference,t,n,r)[0])}function D(e,t,n,r,i=null,s=null){if(null==n||null==r)return t;if(J(n,r,i))return t.map(e=>K(e,n,r));if(null==i&&(0,u.jA)(n))return t.map(e=>K(e,n,g.A.WGS84)).map(e=>z(e,r));if(null==i&&(0,u.jA)(r))return t.map(e=>z(e,g.A.WGS84)).map(e=>K(e,g.A.WGS84,r));if(null==i){const e=v.cacheKey(n,r);void 0!==A[e]?i=A[e]:(null==(i=N(n,r,void 0))&&(i=new v),A[e]=i)}if(null==I||null==e)throw new Z;return null!=s?I._project(e,t,n,r,i,s):I._project(e,t,n,r,i)}function E(e,t){const n=G([e],t);return null!=n.pending?{pending:n.pending,geometry:null}:null!=n.geometries?{pending:null,geometry:n.geometries[0]}:{pending:null,geometry:null}}function G(e,t){if(!j())for(const n of e)if(null!=n&&!(0,T.aI)(n.spatialReference,t)&&(0,T.fn)(n.spatialReference)&&(0,T.fn)(t)&&!J(n.spatialReference,t))return(0,s.gc)(F),{pending:V(),geometries:null};return{pending:null,geometries:e.map(e=>null==e?null:(0,T.aI)(e.spatialReference,t)?e:(0,T.fn)(e.spatialReference)&&(0,T.fn)(t)?z(e,t):null)}}function N(e,t,n=null){if(null==e||null==t)return null;if(null==I||null==R)throw new Z;const r=I._getTransformation(R,e,t,n,n?.spatialReference);return null!==r?v.fromGE(r):null}function U(e,t,n=null){if(null==I||null==R)throw new Z;const r=I._getTransformationBySuitability(R,e,t,n,n?.spatialReference);if(null!==r){const e=[];for(const t of r)e.push(v.fromGE(t));return e}return[]}class Z extends r.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function $(){I=null,R=null,M=null,A={}}const L={get loadPromise(){return M}};function z(e,t){try{const n=C(e,t);if(null==n)return null;"xmin"in e&&"xmin"in n&&(n.zmin=e.zmin,n.zmax=e.zmax);const r=(0,x.N)(n.type,e.spatialReference,t);return null!=r&&r(n),n}catch(e){if(!(e instanceof Z))throw e;return null}}async function B(e,t,n){const r=e.spatialReference;return null!=r&&null!=t&&await Y(r,t,null,n),z(e,t)}function J(e,t,n){return!n&&(!!(0,T.aI)(e,t)||(0,T.fn)(e)&&(0,T.fn)(t)&&!!(0,_.jd)(e,t))}function W(e,t){if((0,T.aI)(e,t))return!0;if(!(0,T.fn)(e)||!(0,T.fn)(t))return!1;const n=(0,T.oT)(e)||(0,T.K8)(e)||(0,T.x1)(e),r=(0,T.oT)(t)||(0,T.K8)(t)||(0,T.x1)(t);return n&&r}async function Y(e,t,n,r){if(j())return(0,i.NO)(r);if(Array.isArray(e)){for(const{source:t,dest:n,geographicTransformation:i}of e)if(t&&n&&!J(t,n,i))return V(r)}else if(e&&t&&!J(e,t,n))return V(r);return(0,i.NO)(r)}function K(e,t,n){return e?"x"in e?Q(e,t,new f.A,n,0):"xmin"in e?ae(e,t,new c.A,n,0):"rings"in e?ie(e,t,new h.A,n,0):"paths"in e?ne(e,t,new y.A,n,0):"points"in e?ee(e,t,new d.A,n,0):null:null}function H(e,t,n=t.spatialReference,r=0){return null!=n&&null!=e.spatialReference&&null!=Q(e,e.spatialReference,t,n,r)}function Q(e,t,n,r,i){le[0]=e.x,le[1]=e.y;const s=e.z;return le[2]=void 0!==s?s:i,(0,m.projectBuffer)(le,t,0,le,r,0)?(n.x=le[0],n.y=le[1],n.spatialReference=r,void 0!==s||(0,u.xP)(r)?(n.z=le[2],n.hasZ=!0):(n.z=void 0,n.hasZ=!1),void 0===e.m?(n.m=void 0,n.hasM=!1):(n.m=e.m,n.hasM=!0),n):null}function X(e,t,n=t.spatialReference,r=0){return null!=e.spatialReference&&null!=n&&null!=ee(e,e.spatialReference,t,n,r)}function ee(e,t,n,r,i){const{points:s,hasZ:a,hasM:o}=e,l=[],c=s.length,d=[];for(const e of s)d.push(e[0],e[1],a?e[2]:i);if(!(0,m.projectBuffer)(d,t,0,d,r,0,c))return null;const p=a||(0,u.xP)(r);for(let e=0;e<c;++e){const t=3*e,n=d[t],r=d[t+1];p&&o?l.push([n,r,d[t+2],s[e][3]]):p?l.push([n,r,d[t+2]]):o?l.push([n,r,s[e][2]]):l.push([n,r])}return n.points=l,n.spatialReference=r,n.hasZ=a,n.hasM=o,n}function te(e,t,n=t.spatialReference,r=0){return null!=e.spatialReference&&null!=n&&null!=ne(e,e.spatialReference,t,n,r)}function ne(e,t,n,r,i){const{paths:s,hasZ:a,hasM:o}=e,l=[];if(!oe(s,a??!1,o??!1,t,l,r,i))return null;const c=a||(0,u.xP)(r);return n.paths=l,n.spatialReference=r,n.hasZ=c,n.hasM=o,n}function re(e,t,n=t.spatialReference,r=0){return null!=e.spatialReference&&null!=n&&null!=ie(e,e.spatialReference,t,n,r)}function ie(e,t,n,r,i){const{rings:s,hasZ:a,hasM:o}=e,l=[];if(!oe(s,a??!1,o??!1,t,l,r,i))return null;const c=a||(0,u.xP)(r);return n.rings=l,n.spatialReference=r,n.hasZ=c,n.hasM=o,n}function se(e,t,n=t.spatialReference,r=0){return null!=e.spatialReference&&null!=n&&null!=ae(e,e.spatialReference,t,n,r)}function ae(e,t,n,r,i){const{xmin:s,ymin:a,xmax:o,ymax:l,hasZ:c,hasM:d}=e;if(!b(s,a,c?e.zmin:i,t,le,r))return null;const p=c||(0,u.xP)(r);return n.xmin=le[0],n.ymin=le[1],p&&(n.zmin=le[2]),b(o,l,c?e.zmax:i,t,le,r)?(n.xmax=le[0],n.ymax=le[1],p&&(n.zmax=le[2]),d&&(n.mmin=e.mmin,n.mmax=e.mmax),n.spatialReference=r,n):null}function oe(e,t,n,r,i,s,a=0){const o=new Array;for(const n of e)for(const e of n)o.push(e[0],e[1],t?e[2]:a);if(!(0,m.projectBuffer)(o,r,0,o,s,0))return!1;let l=0;i.length=0;const c=t||(0,u.xP)(s);for(const t of e){const e=new Array;for(const r of t)c&&n?e.push([o[l++],o[l++],o[l++],r[3]]):c?e.push([o[l++],o[l++],o[l++]]):n?(e.push([o[l++],o[l++],r[2]]),l++):(e.push([o[l++],o[l++]]),l++);i.push(e)}return!0}const le=(0,o.vt)()}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8368],{1262:(e,t,n)=>{n.d(t,{L:()=>o});var r=n(799);const a={InvalidValueForAggregateFunction:"Invalid value used in aggregate function",MissingStatisticParameters:"Statistic does not have 1 or 0 Parameters",InvalidFunctionParameters:"Invalid parameters for call to {function}",UnsupportedIsLhs:"Unsupported left hand expression in is statement",UnsupportedIsRhs:"Unsupported right hand expression in is statement",UnsupportedOperator:"Unsupported operator - {operator}",UnsupportedSyntax:"Unsupported syntax - {node}",UnsupportedSqlFunction:"Sql function not found = {function}",InvalidDataType:"Invalid sql data type",InvalidDate:"Invalid date encountered",InvalidOperator:"Invalid operator encountered",InvalidTime:"Invalid time encountered",IllegalInterval:"Illegal interval",FunctionNotRecognized:"Function not recognized",InvalidTimeStamp:"Invalid timestamp encountered",InvalidParameterCount:"Invalid parameter count for call to {name}",PrimarySecondaryQualifiers:"Primary and Secondary SqlInterval qualifiers not supported",YearMonthIntervals:"Year-Month Intervals not supported",CannotCastValue:"Cannot cast value to the required data type"};class o extends Error{constructor(e,t){super((0,r.HC)(a[e],t)),this.declaredRootClass="esri.arcade.featureset.support.sqlerror",Error.captureStackTrace&&Error.captureStackTrace(this,o)}}},55612:(e,t,n)=>{n.d(t,{g:()=>i});var r=n(96285);function a(e){return Number.isNaN(e)||0===e?e:Math.trunc(e)}const o="esri.core.sql.SqlTimeStampOffset";class i{constructor(e){this._timeStampOffset=e,this.declaredRootClass=o,this._date=null}static isTimestampOffset(e){return"object"==typeof e&&null!=e&&"declaredRootClass"in e&&e.declaredRootClass===o}toDateTime(){return this._date??=r.c9.fromISO(this._timeStampOffset,{setZone:!0}),this._date}get isValid(){return this.toDateTime().isValid}get timezoneOffsetHour(){return a(this.toDateTime().offset/60)}get timezoneOffsetMinutes(){return a(this.toDateTime().offset%60)}toMilliseconds(){return this.toDateTime().toMillis()}get hour(){return this.toDateTime().hour}get minute(){return this.toDateTime().minute}get second(){return this.toDateTime().second}get day(){return this.toDateTime().day}get month(){return this.toDateTime().month}get year(){return this.toDateTime().year}startOfDay(){return i.fromDateTime(this.toDateTime().startOf("day"))}static fromJSDate(e){return new i(r.c9.fromJSDate(e).toISO({includeOffset:!0}))}static fromDateTime(e){return new i(e.toISO({includeOffset:!0}))}static fromParts(e,t,n=0,r=0,a=0,o=0,u=0,s=!1,l=0,c=0){const f=`${e.toString().padStart(4,"0")}-${t.toString().padStart(2,"0")}-${n.toString().padStart(2,"0")}`;let d="";o<10&&(d="0");let p=`${r.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}:${d+o.toString()}`;0!==u&&(p+="."+u.toString().padStart(3,"0"));const m=`${s?"-":"+"}${l.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}`;return new i(f+"T"+p+m)}toStorageFormat(){return this._timeStampOffset}toString(){return this._timeStampOffset}toSQLValue(){let e=this.toDateTime().toSQL({includeOffset:!0,includeOffsetSpace:!0});return e&&(e=e.replace(".000","")),e}toSQLWithKeyword(){return`timestamp '${this.toSQLValue()}'`}addMilliseconds(e){const t=this.toDateTime().plus(e);return i.fromDateTime(t)}}},74639:(e,t,n)=>{n.d(t,{M:()=>l,s:()=>s});var r=n(44729),a=n(1262),o=n(55612),i=n(15032),u=n(96285);function s(e,t){const n=c[e.toLowerCase()];if(null==n)throw new a.L("FunctionNotRecognized");if(t.length<n.minParams||t.length>n.maxParams)throw new a.L("InvalidParameterCount",{name:e.toUpperCase()});return n.evaluate(t)}function l(e,t){const n=c[e.toLowerCase()];return null!=n&&t>=n.minParams&&t<=n.maxParams}const c={min:{minParams:1,maxParams:1,evaluate:e=>p(e[0],"min")},max:{minParams:1,maxParams:1,evaluate:e=>p(e[0],"max")},avg:{minParams:1,maxParams:1,evaluate:e=>f(e[0])},sum:{minParams:1,maxParams:1,evaluate:e=>function(e){if(null===e)return null;let t=0;for(let n=0;n<e.length;n++){const r=e[n];if(null!==r){if(!d(r))throw new a.L("InvalidValueForAggregateFunction");t+=r}}return t}(e[0])},stddev:{minParams:1,maxParams:1,evaluate:e=>function(e){if(null===e)return null;const t=m(e);return null===t?null:Math.sqrt(t)}(e[0])},count:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:e[0].length},var:{minParams:1,maxParams:1,evaluate:e=>m(e[0])}};function f(e){if(null===e)return null;let t=0,n=0;for(let r=0;r<e.length;r++){const o=e[r];if(null!==o){if(!d(o))throw new a.L("InvalidValueForAggregateFunction");n++,t+=o}}return 0===n?null:t/e.length}function d(e){return"number"==typeof e}function p(e,t){if(null===e)return null;let n=null,a=null;for(const s of e){let e=s;e=r.n.isDateOnly(s)||i.k.isTimeOnly(s)?s.toNumber():u.c9.isDateTime(s)?s.toMillis():o.g.isTimestampOffset(s)?s.toMilliseconds():s,(null===n||"max"===t&&null!==a&&null!==e&&a<=e||"min"===t&&null!==a&&null!==e&&a>=e)&&(n=s,a=e)}return n}function m(e){if(null===e)return null;if(0===(e=e.filter(e=>null!==e)).length)return null;const t=f(e);if(null===t)return null;let n=0;for(const r of e){if(!d(r))throw new a.L("InvalidValueForAggregateFunction");n+=(t-r)**2}return n/(e.length-1)}},88368:(e,t,n)=>{n.d(t,{A:()=>ce});var r=n(44208),a=n(74639),o=n(44729),i=n(1262);function u(e){if(null!==e.precision||null!==e.secondary)throw new i.L("PrimarySecondaryQualifiers")}function s(e,t){if(t.includes(".")){const n=t.split(".");e.second=parseFloat(n[0]),e.millis=parseInt(n[1],10)}else e.second=parseFloat(t)}const l="esri.core.sql.SqlInterval";class c{constructor(){this.declaredRootClass=l,this.op="+",this.day=0,this.second=0,this.hour=0,this.month=0,this.year=0,this.minute=0,this.millis=0}static isInterval(e){return"object"==typeof e&&null!=e&&"declaredRootClass"in e&&e.declaredRootClass===l}static createFromMilliseconds(e){const t=new c;return t.second=e/1e3,t}static createFromValueAndQualifier(e,t,n){let r=null;const a=new c;if(a.op="-"===n?"-":"+","interval-period"===t.type){u(t);const n=new RegExp("^[0-9]{1,}$");if("year"===t.period||"month"===t.period)throw new i.L("YearMonthIntervals");if("second"===t.period){if(!/^[0-9]{1,}([.]{1}[0-9]{1,}){0,1}$/.test(e))throw new i.L("IllegalInterval");s(a,e)}else{if(!n.test(e))throw new i.L("IllegalInterval");a[t.period]=parseFloat(e)}}else{if(u(t.start),u(t.end),"year"===t.start.period||"month"===t.start.period||"year"===t.end.period||"month"===t.end.period)throw new i.L("YearMonthIntervals");switch(t.start.period){case"day":switch(t.end.period){case"hour":if(r=new RegExp("^[0-9]{1,} [0-9]{1,}$"),!r.test(e))throw new i.L("IllegalInterval");a[t.start.period]=parseFloat(e.split(" ")[0]),a[t.end.period]=parseFloat(e.split(" ")[1]);break;case"minute":if(r=new RegExp("^[0-9]{1,} [0-9]{1,2}:[0-9]{1,}$"),!r.test(e))throw new i.L("IllegalInterval");{a[t.start.period]=parseFloat(e.split(" ")[0]);const n=e.split(" ")[1].split(":");a.hour=parseFloat(n[0]),a.minute=parseFloat(n[1])}break;case"second":if(r=new RegExp("^[0-9]{1,} [0-9]{1,2}:[0-9]{1,2}:[0-9]{1,}([.]{1}[0-9]{1,}){0,1}$"),!r.test(e))throw new i.L("IllegalInterval");{a[t.start.period]=parseFloat(e.split(" ")[0]);const n=e.split(" ")[1].split(":");a.hour=parseFloat(n[0]),a.minute=parseFloat(n[1]),s(a,n[2])}break;default:throw new i.L("IllegalInterval")}break;case"hour":switch(t.end.period){case"minute":if(r=new RegExp("^[0-9]{1,}:[0-9]{1,}$"),!r.test(e))throw new i.L("IllegalInterval");a.hour=parseFloat(e.split(":")[0]),a.minute=parseFloat(e.split(":")[1]);break;case"second":if(r=new RegExp("^[0-9]{1,}:[0-9]{1,2}:[0-9]{1,}([.]{1}[0-9]{1,}){0,1}$"),!r.test(e))throw new i.L("IllegalInterval");{const t=e.split(":");a.hour=parseFloat(t[0]),a.minute=parseFloat(t[1]),s(a,t[2])}break;default:throw new i.L("IllegalInterval")}break;case"minute":if("second"!==t.end.period)throw new i.L("IllegalInterval");if(r=new RegExp("^[0-9]{1,}:[0-9]{1,}([.]{1}[0-9]{1,}){0,1}$"),!r.test(e))throw new i.L("IllegalInterval");{const t=e.split(":");a.minute=parseFloat(t[0]),s(a,t[1])}break;default:throw new i.L("IllegalInterval")}}return a}valueInMilliseconds(){return("-"===this.op?-1:1)*(this.millis+1e3*this.second+60*this.minute*1e3+60*this.hour*60*1e3+24*this.day*60*60*1e3+this.month*(365/12)*24*60*60*1e3+365*this.year*24*60*60*1e3)}}var f=n(55612),d=n(15032),p=n(3330),m=n(96285);const h=/^(\d{1,2}):(\d{1,2}):(\d{1,2})$/,w=/^(\d{1,2}):(\d{1,2})$/,v=/^(\d{1,2}):(\d{1,2}):(\d{1,2}).([0-9]+)$/,I=/^(\d{4})-(\d{1,2})-(\d{1,2})$/,g=/^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})(\.[0-9]+)?$/,y=/^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})(\.[0-9]+)?[ ]{0,1}(\+|-)(\d{1,2}):(\d{1,2})$/,L=/^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2})?[ ]{0,1}(\+|-)(\d{1,2}):(\d{1,2})$/,T=/^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2})$/;function N(e,t){if(t instanceof m.bo)return t===p.GB.instance?m.c9.fromMillis(e.getTime(),{zone:p.GB.instance}):m.c9.fromJSDate(e,{zone:t});switch(t){case"system":case"local":case null:return m.c9.fromJSDate(e);default:return"unknown"===t?.toLowerCase()?m.c9.fromMillis(e.getTime(),{zone:p.GB.instance}):m.c9.fromJSDate(e,{zone:t})}}function O(e){return c.isInterval(e)}function E(e){return m.c9.isDateTime(e)}function S(e){return o.n.isDateOnly(e)}function x(e){return d.k.isTimeOnly(e)}function C(e){return f.g.isTimestampOffset(e)}function D(e){let t=h.exec(e);if(null!==t){const[,e,n,r]=t,a=d.k.fromParts(parseInt(e,10),parseInt(n,10),parseInt(r,10),0);if(null!==a)return a;throw new i.L("InvalidTime")}if(t=w.exec(e),null!==t){const[,e,n]=t,r=d.k.fromParts(parseInt(e,10),parseInt(n,10),0,0);if(null!==r)return r;throw new i.L("InvalidTime")}if(t=v.exec(e),null!==t){const[,e,n,r,a]=t,o=d.k.fromParts(parseInt(e,10),parseInt(n,10),parseInt(r,10),parseInt(a,10));if(null!==o)return o;throw new i.L("InvalidTime")}throw new i.L("InvalidTime")}function _(e,t,n=!1){let r=g.exec(e);if(null!==r){const[,e,n,a,o,u,s,l]=r,c=m.c9.fromObject({year:parseInt(e,10),month:parseInt(n,10),day:parseInt(a,10),hour:parseInt(o,10),minute:parseInt(u,10),second:parseInt(s,10),millisecond:l?parseInt(l.replace(".",""),10):0},{zone:(0,p.Qo)(t)});if(!1===c.isValid)throw new i.L("InvalidTimeStamp");return c}if(r=y.exec(e),null!==r){const[,e,t,n,a,o,u,s,l,c,d]=r,p=f.g.fromParts(parseInt(e,10),parseInt(t,10),parseInt(n,10),parseInt(a,10),parseInt(o,10),parseInt(u,10),s?parseInt(s.replace(".",""),10):0,"-"===l,parseInt(c,10),parseInt(d,10));if(!1===p.isValid)throw new i.L("InvalidTimeStamp");return p}if(r=L.exec(e),null!==r){const[,e,t,n,a,o,u,s,l]=r,c=f.g.fromParts(parseInt(e,10),parseInt(t,10),parseInt(n,10),parseInt(a,10),parseInt(o,10),0,0,"-"===u,parseInt(s,10),parseInt(l,10));if(!1===c.isValid)throw new i.L("InvalidTimeStamp");return c}if(r=T.exec(e),null!==r){const[,e,n,a,o,u]=r,s=m.c9.fromObject({year:parseInt(e,10),month:parseInt(n,10),day:parseInt(a,10),hour:parseInt(o,10),minute:parseInt(u,10),second:0},{zone:(0,p.Qo)(t)});if(!1===s.isValid)throw new i.L("InvalidTimeStamp");return s}if(r=I.exec(e),null!==r){const[,e,n,a]=r,o=m.c9.fromObject({year:parseInt(e,10),month:parseInt(n,10),day:parseInt(a,10),hour:0,minute:0,second:0},{zone:(0,p.Qo)(t)});if(!1===o.isValid)throw new i.L("InvalidTimeStamp");return o}throw new i.L("InvalidTimeStamp")}function M(e,t){const n=I.exec(e);if(null===n)try{return _(e,t)}catch{throw new i.L("InvalidDate")}const[,r,a,u]=n,s=o.n.fromParts(parseInt(r,10),parseInt(a,10),parseInt(u,10));if(null===s)throw new i.L("InvalidDate");return s}var b=n(34727),P=n(799),A=n(54218);function F(e){return!!E(e)||!!C(e)}function $(e){return!!(E(e)||S(e)||C(e)||x(e))}function R(e){if(E(e))return e.toMillis();if(S(e))return e.toNumber();if(C(e))return e.toMilliseconds();throw new i.L("InvalidDataType")}function k(e,t,n){if(null==e||null==t)return null;if((0,A.Et)(e)){if((0,A.Et)(t))return U(e,t,n);if((0,A.Kg)(t))return function(e,t,n){const r=parseFloat(t);if(!isNaN(r))return U(e,r,n);const a=e.toString();switch(n){case"<>":return a!==t;case"=":return a===t;case">":return a>t;case"<":return a<t;case">=":return a>=t;case"<=":return a<=t}}(e,t,n);if($(t))throw new i.L("InvalidOperator");if(S(t))throw new i.L("InvalidOperator")}else if((0,A.Kg)(e)){if((0,A.Et)(t))return function(e,t,n){const r=parseFloat(e);if(!isNaN(r))return U(r,t,n);const a=t.toString();switch(n){case"<>":return e!==a;case"=":return e===a;case">":return e>a;case"<":return e<a;case">=":return e>=a;case"<=":return e<=a}}(e,t,n);if((0,A.Kg)(t))return function(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}}(e,t,n);if(E(t))throw new i.L("InvalidOperator");if(S(t))throw new i.L("InvalidOperator");if(x(t))throw new i.L("InvalidOperator");if(C(t))throw new i.L("InvalidOperator")}else if(E(e)){if(F(t)){if((0,p.Y4)(e.zone)){if(m.c9.isDateTime(t)&&!(0,p.Y4)(t.zone))return V(e,t,n);if(f.g.isTimestampOffset(t))return V(e,t,n)}else if(m.c9.isDateTime(t)&&(0,p.Y4)(t.zone)){if(!(0,p.Y4)(e.zone))return V(e,t,n);if(f.g.isTimestampOffset(e))return V(e,t,n)}return U(R(e),R(t),n)}if((0,A.Kg)(t))throw new i.L("InvalidOperator");if(S(t))return function(e,t,n){const r=t.toDateTimeLuxon(e.zone);return U((e=e.startOf("day")).toMillis(),r.toMillis(),n)}(e,t,n);if(x(t))throw new i.L("InvalidOperator");if((0,A.Et)(t))throw new i.L("InvalidOperator")}else if(S(e)){if(C(t))return function(e,t,n){const r=e.toDateTimeLuxon(t.toDateTime().zone);return t=t.startOfDay(),U(r.toMillis(),t.toMilliseconds(),n)}(e,t,n);if(E(t))return function(e,t,n){const r=e.toDateTimeLuxon(t.zone);return t=t.startOf("day"),U(r.toMillis(),t.toMillis(),n)}(e,t,n);if((0,A.Kg)(t))throw new i.L("InvalidOperator");if(S(t))return U(e.toNumber(),t.toNumber(),n);if(x(t))throw new i.L("InvalidOperator");if((0,A.Et)(t))throw new i.L("InvalidOperator")}else if(x(e)){if(x(t))return U(e.toNumber(),t.toNumber(),n);if((0,A.Kg)(t))throw new i.L("InvalidOperator");if((0,A.Et)(t))throw new i.L("InvalidOperator");if(S(t))throw new i.L("InvalidOperator");if(F(t))throw new i.L("InvalidOperator")}else if(C(e)){if(F(t))return m.c9.isDateTime(t)&&(0,p.Y4)(t.zone)?V(e,t,n):U(R(e),R(t),n);if((0,A.Kg)(t))throw new i.L("InvalidOperator");if(S(t))return function(e,t,n){const r=t.toDateTimeLuxon(e.toDateTime().zone);return U((e=e.startOfDay()).toMilliseconds(),r.toMillis(),n)}(e,t,n);if(x(t))throw new i.L("InvalidOperator");if((0,A.Et)(t))throw new i.L("InvalidOperator")}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 U(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 V(e,t,n){f.g.isTimestampOffset(e)&&(e=e.toDateTime()),f.g.isTimestampOffset(t)&&(t=t.toDateTime());const r=z(e),a=z(t);switch(n){case"<>":return r!==a;case"=":return r===a;case">":return r>a;case"<":return r<a;case">=":return r>=a;case"<=":return r<=a}}function z(e){return 321408e5*e.year+26784e5*e.month+864e5*e.day+36e5*e.hour+6e4*e.minute+1e3*e.second+e.millisecond}function H(e,t,n){const r=Z[e.toLowerCase()];if(null==r)throw new i.L("FunctionNotRecognized");if(t.length<r.minParams||t.length>r.maxParams)throw new i.L("InvalidParameterCount",{name:e.toUpperCase()});return r.evaluate(t,n)}function q(e){return!((0,A.$P)(e)||S(e)||E(e)||x(e)||C(e))}function K(e){return S(e)||x(e)?e.toString():C(e)?e.toSQLValue():E(e)?0===e.millisecond?e.toFormat("yyyy-LL-dd HH:mm:ss"):e.toSQL({includeOffset:!1}):(0,A.$P)(e)?K(m.c9.fromJSDate(e)):e.toString()}const Z={extract:{minParams:2,maxParams:2,evaluate:([e,t])=>{if(null==t)return null;if((0,A.$P)(t))switch(e.toUpperCase()){case"SECOND":return t.getSeconds();case"MINUTE":return t.getMinutes();case"HOUR":return t.getHours();case"DAY":return t.getDate();case"MONTH":return t.getMonth()+1;case"YEAR":return t.getFullYear();case"TIMEZONE_HOUR":case"TIMEZONE_MINUTE":return 0;case"DOW":return m.c9.fromJSDate(t,{zone:"system"}).weekday;case"DOY":return m.c9.fromJSDate(t,{zone:"system"}).ordinal;case"WEEK":return m.c9.fromJSDate(t,{zone:"system"}).weekNumber}else if(E(t))switch(e.toUpperCase()){case"SECOND":return t.second;case"MINUTE":return t.minute;case"HOUR":return t.hour;case"DAY":return t.day;case"MONTH":return t.month;case"YEAR":return t.year;case"TIMEZONE_HOUR":case"TIMEZONE_MINUTE":throw new i.L("InvalidFunctionParameters",{function:"EXTRACT"});case"DOW":return t.weekday;case"DOY":return t.ordinal;case"WEEK":return t.weekNumber}else if(S(t))switch(e.toUpperCase()){case"DAY":return t.day;case"MONTH":return t.month;case"YEAR":return t.year;case"TIMEZONE_HOUR":case"TIMEZONE_MINUTE":throw new i.L("InvalidFunctionParameters",{function:"EXTRACT"});case"DOW":return t.toDateTime("unknown").weekday;case"DOY":return t.toDateTime("unknown").ordinal;case"WEEK":return t.toDateTime("unknown").weekNumber}else if(x(t))switch(e.toUpperCase()){case"SECOND":return t.second;case"MINUTE":return t.minute;case"HOUR":return t.hour}else if(C(t))switch(e.toUpperCase()){case"SECOND":return t.second;case"MINUTE":return t.minute;case"HOUR":return t.hour;case"DAY":return t.day;case"MONTH":return t.month;case"YEAR":return t.year;case"TIMEZONE_HOUR":return t.timezoneOffsetHour;case"TIMEZONE_MINUTE":return t.timezoneOffsetMinutes;case"DOW":return t.toDateTime().weekday;case"DOY":return t.toDateTime().ordinal;case"WEEK":return t.toDateTime().weekNumber}throw new i.L("InvalidFunctionParameters",{function:"EXTRACT"})}},substring:{minParams:2,maxParams:3,evaluate:e=>{if(2===e.length){const[t,n]=e;return null==t||null==n?null:t.toString().substring(n-1)}if(3===e.length){const[t,n,r]=e;return null==t||null==n||null==r?null:r<=0?"":t.toString().substring(n-1,n+r-1)}}},position:{minParams:2,maxParams:2,evaluate:([e,t])=>null==e||null==t?null:t.indexOf(e)+1},trim:{minParams:2,maxParams:3,evaluate:e=>{const t=3===e.length,n=t?e[1]:" ",r=t?e[2]:e[1];if(null==n||null==r)return null;const a=`(${(0,P.Cj)(n)})`;switch(e[0]){case"BOTH":return r.replaceAll(new RegExp(`^${a}*|${a}*$`,"g"),"");case"LEADING":return r.replaceAll(new RegExp(`^${a}*`,"g"),"");case"TRAILING":return r.replaceAll(new RegExp(`${a}*$`,"g"),"")}throw new i.L("InvalidFunctionParameters",{function:"TRIM"})}},abs:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.abs(e[0])},ceiling:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.ceil(e[0])},floor:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.floor(e[0])},log:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.log(e[0])},log10:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.log(e[0])*Math.LOG10E},sin:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.sin(e[0])},cos:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.cos(e[0])},tan:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.tan(e[0])},asin:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.asin(e[0])},acos:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.acos(e[0])},atan:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.atan(e[0])},sign:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:e[0]>0?1:e[0]<0?-1:0},power:{minParams:2,maxParams:2,evaluate:e=>null==e[0]||null==e[1]?null:e[0]**e[1]},mod:{minParams:2,maxParams:2,evaluate:e=>null==e[0]||null==e[1]?null:e[0]%e[1]},round:{minParams:1,maxParams:2,evaluate:e=>{const t=e[0],n=2===e.length?10**e[1]:1;return null==t?null:Math.round(t*n)/n}},truncate:{minParams:1,maxParams:2,evaluate:e=>null==e[0]?null:1===e.length||0===e[1]?Math.trunc(e[0]):(0,b.pF)("trunc",e[0],-Number(e[1]))},char_length:{minParams:1,maxParams:1,evaluate:e=>(0,A.Kg)(e[0])?e[0].length:0},concat:{minParams:1,maxParams:1/0,evaluate:e=>{let t="";for(let n=0;n<e.length;n++){if(null==e[n])return null;t+=e[n].toString()}return t}},lower:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:e[0].toString().toLowerCase()},upper:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:e[0].toString().toUpperCase()},coalesce:{minParams:1,maxParams:1/0,evaluate:e=>{for(const t of e)if(null!==t)return t;return null}},cosh:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.cosh(e[0])},sinh:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.sinh(e[0])},tanh:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.tanh(e[0])},nullif:{minParams:2,maxParams:2,evaluate:e=>k(e[0],e[1],"=")?null:e[0]},cast:{minParams:2,maxParams:2,evaluate:(e,t)=>{const n=e[0],r=e[1];if(null===n)return null;switch(r.type){case"integer":{if(!q(n))throw new i.L("CannotCastValue");const e=parseInt(n,10);if(isNaN(e))throw new i.L("CannotCastValue");return e}case"smallint":{if(!q(n))throw new i.L("CannotCastValue");const e=parseInt(n,10);if(isNaN(e))throw new i.L("CannotCastValue");if(e>32767||e<-32767)throw new i.L("CannotCastValue");return e}case"float":case"real":{if(!q(n))throw new i.L("CannotCastValue");const e=parseFloat(n);if(isNaN(e))throw new i.L("CannotCastValue");return e}case"time":return function(e){if((0,A.$P)(e))return d.k.fromDateJS(e);if(E(e))return d.k.fromDateTime(e);if(S(e))throw new i.L("CannotCastValue");if(x(e))return e;if(C(e))return d.k.fromSqlTimeStampOffset(e);if((0,A.Kg)(e))return D(e);throw new i.L("CannotCastValue")}(n);case"date":return function(e){if((0,A.$P)(e))return o.n.fromDateJS(e);if(E(e))return o.n.fromParts(e.year,e.month,e.day);if(S(e))return e;if(x(e))throw new i.L("CannotCastValue");if(C(e)&&null===o.n.fromParts(e.year,e.month,e.day))throw new i.L("CannotCastValue");if((0,A.Kg)(e)){const t=o.n.fromReader(e);if(null!==t&&t.isValid)return t}throw new i.L("CannotCastValue")}(n);case"timestamp":return function(e,t,n){if((0,A.$P)(e))return N(e,t);if(E(e))return e;if(S(e))return e.toDateTimeLuxon("unknown");if(x(e))throw new i.L("CannotCastValue");if(C(e))return e;if((0,A.Kg)(e))return _(e,"unknown",n);throw new i.L("CannotCastValue")}(n,t,!0===r.withtimezone);case"varchar":{const e=K(n);if(e.length>r.size)throw new i.L("CannotCastValue");return e}default:throw new i.L("InvalidDataType")}}}};function Y(e,t,n,r){if("||"===e)return H("concat",[t,n],r);if(null===t||null===n)return null;if((0,A.Et)(t)){if((0,A.Et)(n))return j(t,n,e);if(O(n))return function(e,t,n){switch(n){case"+":return c.createFromMilliseconds(e+t.valueInMilliseconds());case"-":return c.createFromMilliseconds(e-t.valueInMilliseconds());case"*":return c.createFromMilliseconds(e*t.valueInMilliseconds());case"/":return c.createFromMilliseconds(e/t.valueInMilliseconds())}throw new i.L("InvalidOperator")}(t,n,e);if(x(n))return function(){throw new i.L("InvalidOperator")}();if(S(n))return function(){throw new i.L("InvalidOperator")}();if(C(n))return function(){throw new i.L("InvalidOperator")}();if(E(n))return function(){throw new i.L("InvalidOperator")}();if((0,A.Kg)(n))return function(e,t,n){const r=parseFloat(t);if(isNaN(r))throw new i.L("InvalidOperator");return j(e,r,n)}(t,n,e);throw new i.L("InvalidOperator")}if(S(t)){if((0,A.Et)(n))return function(e,t,n){const r=1e3*t*24*60*60;switch(n){case"+":return e.plus("milliseconds",r);case"-":return e.plus("milliseconds",-1*r)}throw new i.L("InvalidOperator")}(t,n,e);if(O(n))return function(e,t,n){switch(n){case"+":return e.plus("milliseconds",t.valueInMilliseconds());case"-":return e.plus("milliseconds",-1*t.valueInMilliseconds())}throw new i.L("InvalidOperator")}(t,n,e);if(x(n))return function(){throw new i.L("InvalidOperator")}();if(S(n))return function(e,t,n){if("-"===n)return e.toDateTimeLuxon("UTC").diff(t.toDateTimeLuxon("UTC")).as("days");throw new i.L("InvalidOperator")}(t,n,e);if(C(n))return function(e,t,n){if("-"===n)return e.toDateTimeLuxon(t.toDateTime().zone).diff(t.toDateTime()).as("days");throw new i.L("InvalidOperator")}(t,n,e);if(E(n))return function(e,t,n){if("-"===n)return e.toDateTimeLuxon(t.zone).diff(t).as("days");throw new i.L("InvalidOperator")}(t,n,e);if((0,A.Kg)(n))return function(){throw new i.L("InvalidOperator")}();throw new i.L("InvalidOperator")}if(x(t)){if((0,A.Et)(n))return function(e,t,n){const r=1e3*t*24*60*60;switch(n){case"+":return e.plus("milliseconds",r);case"-":return e.plus("milliseconds",-1*r)}throw new i.L("InvalidOperator")}(t,n,e);if(O(n))return function(e,t,n){switch(n){case"+":return e.plus("milliseconds",t.valueInMilliseconds());case"-":return e.plus("milliseconds",-1*t.valueInMilliseconds())}throw new i.L("InvalidOperator")}(t,n,e);if(x(n))return function(){throw new i.L("InvalidOperator")}();if(S(n))return function(){throw new i.L("InvalidOperator")}();if(C(n))return function(){throw new i.L("InvalidOperator")}();if(E(n))return function(){throw new i.L("InvalidOperator")}();if((0,A.Kg)(n))return function(){throw new i.L("InvalidOperator")}();throw new i.L("InvalidOperator")}if(O(t)){if((0,A.Et)(n))return function(e,t,n){switch(n){case"+":return c.createFromMilliseconds(e.valueInMilliseconds()+t);case"-":return c.createFromMilliseconds(e.valueInMilliseconds()-t);case"*":return c.createFromMilliseconds(e.valueInMilliseconds()*t);case"/":return c.createFromMilliseconds(e.valueInMilliseconds()/t)}throw new i.L("InvalidOperator")}(t,n,e);if(O(n))return function(e,t,n){switch(n){case"+":return c.createFromMilliseconds(e.valueInMilliseconds()+t.valueInMilliseconds());case"-":return c.createFromMilliseconds(e.valueInMilliseconds()-t.valueInMilliseconds());case"*":return c.createFromMilliseconds(e.valueInMilliseconds()*t.valueInMilliseconds());case"/":return c.createFromMilliseconds(e.valueInMilliseconds()/t.valueInMilliseconds())}throw new i.L("InvalidOperator")}(t,n,e);if(x(n))return function(e,t,n){if("+"===n)return t.plus("milliseconds",e.valueInMilliseconds());throw new i.L("InvalidOperator")}(t,n,e);if(S(n))return function(e,t,n){if("+"===n)return t.plus("milliseconds",e.valueInMilliseconds());throw new i.L("InvalidOperator")}(t,n,e);if(C(n))return function(e,t,n){if("+"===n)return t.addMilliseconds(e.valueInMilliseconds());throw new i.L("InvalidOperator")}(t,n,e);if(E(n))return function(e,t,n){switch(n){case"+":return t.plus({milliseconds:e.valueInMilliseconds()});case"-":return e.valueInMilliseconds()-t.toMillis()}throw new i.L("InvalidOperator")}(t,n,e);if((0,A.Kg)(n))return function(){throw new i.L("InvalidOperator")}();throw new i.L("InvalidOperator")}if(E(t)){if((0,A.Et)(n))return function(e,t,n){const r=1e3*t*24*60*60;switch(n){case"+":return e.plus({milliseconds:r});case"-":return e.minus({milliseconds:r})}throw new i.L("InvalidOperator")}(t,n,e);if(O(n))return function(e,t,n){switch(n){case"+":return e.plus({milliseconds:t.valueInMilliseconds()});case"-":return e.minus({milliseconds:t.valueInMilliseconds()})}throw new i.L("InvalidOperator")}(t,n,e);if(x(n))return function(){throw new i.L("InvalidOperator")}();if(S(n))return function(e,t,n){if("-"===n)return e.diff(t.toDateTimeLuxon(e.zone)).as("days");throw new i.L("InvalidOperator")}(t,n,e);if(C(n))return function(e,t,n){if("-"===n)return e.diff(t.toDateTime()).as("days");throw new i.L("InvalidOperator")}(t,n,e);if(E(n))return function(e,t,n){if("-"===n)return e.diff(t).as("days");throw new i.L("InvalidOperator")}(t,n,e);if((0,A.Kg)(n))return function(){throw new i.L("InvalidOperator")}();throw new i.L("InvalidOperator")}if(C(t)){if((0,A.Et)(n))return function(e,t,n){const r=1e3*t*24*60*60;switch(n){case"+":return e.addMilliseconds(r);case"-":return e.addMilliseconds(-1*r)}throw new i.L("InvalidOperator")}(t,n,e);if(O(n))return function(e,t,n){switch(n){case"+":return e.addMilliseconds(t.valueInMilliseconds());case"-":return e.addMilliseconds(-1*t.valueInMilliseconds())}throw new i.L("InvalidOperator")}(t,n,e);if(x(n))return function(){throw new i.L("InvalidOperator")}();if(S(n))return function(e,t,n){if("-"===n)return e.toDateTime().diff(t.toDateTimeLuxon(e.toDateTime().zone)).as("days");throw new i.L("InvalidOperator")}(t,n,e);if(C(n))return function(e,t,n){if("-"===n)return e.toDateTime().diff(t.toDateTime()).as("days");throw new i.L("InvalidOperator")}(t,n,e);if(E(n))return function(e,t,n){if("-"===n)return e.toDateTime().diff(t).as("days");throw new i.L("InvalidOperator")}(t,n,e);if((0,A.Kg)(n))return function(){throw new i.L("InvalidOperator")}();throw new i.L("InvalidOperator")}if((0,A.Kg)(t)){if((0,A.Et)(n))return function(e,t,n){const r=parseFloat(e);if(isNaN(r))throw new i.L("InvalidOperator");return j(r,t,n)}(t,n,e);if(O(n))return function(){throw new i.L("InvalidOperator")}();if(x(n))return function(){throw new i.L("InvalidOperator")}();if(S(n))return function(){throw new i.L("InvalidOperator")}();if(C(n))return function(){throw new i.L("InvalidOperator")}();if(E(n))return function(){throw new i.L("InvalidOperator")}();if((0,A.Kg)(n))return function(e,t,n){if("+"===n)return e+t;throw new i.L("InvalidOperator")}(t,n,e);throw new i.L("InvalidOperator")}throw new i.L("InvalidOperator")}function j(e,t,n){switch(n){case"+":return e+t;case"-":return e-t;case"*":return e*t;case"/":return e/t}throw new i.L("InvalidOperator")}class W extends SyntaxError{constructor(e,t,n,r){super(e),this.expected=t,this.found=n,this.location=r,this.name="SyntaxError"}format(e){let t="Error: "+this.message;if(this.location){let n=null;const r=e.find(e=>e.source===this.location.source);r&&(n=r.text.split(/\r\n|\n|\r/g));const a=this.location.start,o=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(a):a,i=this.location.source+":"+o.line+":"+o.column;if(n){const e=this.location.end,r="".padEnd(o.line.toString().length," "),u=n[a.line-1],s=(a.line===e.line?e.column:u.length+1)-a.column||1;t+="\n --\x3e "+i+"\n"+r+" |\n"+o.line+" | "+u+"\n"+r+" | "+"".padEnd(a.column-1," ")+"".padEnd(s,"^")}else t+="\n at "+i}return t}static buildMessage(e,t){function n(e){return e.codePointAt(0).toString(16).toUpperCase()}const r=Object.prototype.hasOwnProperty.call(RegExp.prototype,"unicode")?new RegExp("[\\p{C}\\p{Mn}\\p{Mc}]","gu"):null;function a(e){return r?e.replace(r,e=>"\\u{"+n(e)+"}"):e}function o(e){return a(e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,e=>"\\x0"+n(e)).replace(/[\x10-\x1F\x7F-\x9F]/g,e=>"\\x"+n(e)))}function i(e){return a(e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,e=>"\\x0"+n(e)).replace(/[\x10-\x1F\x7F-\x9F]/g,e=>"\\x"+n(e)))}const u={literal:e=>'"'+o(e.text)+'"',class(e){const t=e.parts.map(e=>Array.isArray(e)?i(e[0])+"-"+i(e[1]):i(e));return"["+(e.inverted?"^":"")+t.join("")+"]"+(e.unicode?"u":"")},any:()=>"any character",end:()=>"end of input",other:e=>e.description};function s(e){return u[e.type](e)}return"Expected "+function(e){const t=e.map(s);if(t.sort(),t.length>0){let e=1;for(let n=1;n<t.length;n++)t[n-1]!==t[n]&&(t[e]=t[n],e++);t.length=e}switch(t.length){case 1:return t[0];case 2:return t[0]+" or "+t[1];default:return t.slice(0,-1).join(", ")+", or "+t[t.length-1]}}(e)+" but "+function(e){return e?'"'+o(e)+'"':"end of input"}(t)+" found."}}function J(e,t){const n={},r=(t=void 0!==t?t:{}).grammarSource,a={start:Tn};let o=Tn;const i="!",u="=",s=">=",l=">",c="<=",f="<>",d="!=",p="||",m="@",h="'",w="N'",v="''",I=".",g="null",y="true",L="false",T="in",N="is",O="like",E="escape",S="not",x="and",C="or",D="between",_="from",M="for",b="substring",P="extract",A="trim",F="position",$="timestamp",R="date",k="time",U="leading",V="trailing",z="both",H="cast",q="as",K="integer",Z="int",Y="smallint",j="float",J="real",B="varchar",G="to",Q="interval",X="year",ee="timezone_hour",te="timezone_minute",ne="month",re="day",ae="hour",oe="minute",ie="second",ue="dow",se="doy",le="week",ce="case",fe="end",de="when",pe="then",me="else",he=",",we="(",ve=")",Ie="`",ge=/^[<-=]/,ye=/^[+\-]/,Le=/^[*\/]/,Te=/^[A-Za-z_\x80-\uFFFF]/,Ne=/^[A-Za-z0-9_]/,Oe=/^[A-Za-z0-9_.\x80-\uFFFF]/,Ee=/^["]/,Se=/^[^']/,xe=/^[0-9]/,Ce=/^[eE]/,De=/^[ \t\n\r]/,_e=/^[^`]/,Me=vn("!",!1),be=vn("=",!1),Pe=vn(">=",!1),Ae=vn(">",!1),Fe=vn("<=",!1),$e=vn("<>",!1),Re=In([["<","="]],!1,!1,!1),ke=vn("!=",!1),Ue=In(["+","-"],!1,!1,!1),Ve=vn("||",!1),ze=In(["*","/"],!1,!1,!1),He=In([["A","Z"],["a","z"],"_",["€","￿"]],!1,!1,!1),qe=In([["A","Z"],["a","z"],["0","9"],"_"],!1,!1,!1),Ke=In([["A","Z"],["a","z"],["0","9"],"_",".",["€","￿"]],!1,!1,!1),Ze=In(['"'],!1,!1,!1),Ye=vn("@",!1),je=vn("'",!1),We=vn("N'",!1),Je=vn("''",!1),Be=In(["'"],!0,!1,!1),Ge=vn(".",!1),Qe=In([["0","9"]],!1,!1,!1),Xe=In(["e","E"],!1,!1,!1),et=vn("NULL",!0),tt=vn("TRUE",!0),nt=vn("FALSE",!0),rt=vn("IN",!0),at=vn("IS",!0),ot=vn("LIKE",!0),it=vn("ESCAPE",!0),ut=vn("NOT",!0),st=vn("AND",!0),lt=vn("OR",!0),ct=vn("BETWEEN",!0),ft=vn("FROM",!0),dt=vn("FOR",!0),pt=vn("SUBSTRING",!0),mt=vn("EXTRACT",!0),ht=vn("TRIM",!0),wt=vn("POSITION",!0),vt=vn("TIMESTAMP",!0),It=vn("DATE",!0),gt=vn("TIME",!0),yt=vn("LEADING",!0),Lt=vn("TRAILING",!0),Tt=vn("BOTH",!0),Nt=vn("CAST",!0),Ot=vn("AS",!0),Et=vn("INTEGER",!0),St=vn("INT",!0),xt=vn("SMALLINT",!0),Ct=vn("FLOAT",!0),Dt=vn("REAL",!0),_t=vn("VARCHAR",!0),Mt=vn("TO",!0),bt=vn("INTERVAL",!0),Pt=vn("YEAR",!0),At=vn("TIMEZONE_HOUR",!0),Ft=vn("TIMEZONE_MINUTE",!0),$t=vn("MONTH",!0),Rt=vn("DAY",!0),kt=vn("HOUR",!0),Ut=vn("MINUTE",!0),Vt=vn("SECOND",!0),zt=vn("DOW",!0),Ht=vn("DOY",!0),qt=vn("WEEK",!0),Kt=vn("CASE",!0),Zt=vn("END",!0),Yt=vn("WHEN",!0),jt=vn("THEN",!0),Wt=vn("ELSE",!0),Jt=vn(",",!1),Bt=vn("(",!1),Gt=vn(")",!1),Qt=In([" ","\t","\n","\r"],!1,!1,!1),Xt=vn("`",!1),en=In(["`"],!0,!1,!1);function tn(e,t,n){return{op:t,expr:n,location:hn()}}function nn(e,t,n){return{op:t,expr:n,location:hn()}}function rn(e,t){return{op:e,expr:t,location:hn()}}function an(e,t,n){return{op:t,expr:n,location:hn()}}function on(e,t,n){return{op:t,expr:n,location:hn()}}function un(){return"'"}let sn=0|t.peg$currPos,ln=sn;const cn=[{line:1,column:1}];let fn,dn=sn,pn=t.peg$maxFailExpected||[],mn=0|t.peg$silentFails;if(t.startRule){if(!(t.startRule in a))throw new Error("Can't start parsing from rule \""+t.startRule+'".');o=a[t.startRule]}function hn(){return yn(ln,sn)}function wn(e,t){throw function(e,t){return new W(e,null,null,t)}(e,t=void 0!==t?t:yn(ln,sn))}function vn(e,t){return{type:"literal",text:e,ignoreCase:t}}function In(e,t,n,r){return{type:"class",parts:e,inverted:t,ignoreCase:n,unicode:r}}function gn(t){let n,r=cn[t];if(r)return r;if(t>=cn.length)n=cn.length-1;else for(n=t;!cn[--n];);for(r=cn[n],r={line:r.line,column:r.column};n<t;)10===e.charCodeAt(n)?(r.line++,r.column=1):r.column++,n++;return cn[t]=r,r}function yn(e,t,n){const a=gn(e),o=gn(t);return{source:r,start:{offset:e,line:a.line,column:a.column},end:{offset:t,line:o.line,column:o.column}}}function Ln(e){sn<dn||(sn>dn&&(dn=sn,pn=[]),pn.push(e))}function Tn(){let e,t;return e=sn,oa(),t=On(),t!==n?(oa(),ln=e,e=t):(sn=e,e=n),e}function Nn(){let e,t,r,a,o,i,u,s;if(e=sn,t=ra(),t!==n){for(oa(),r=[],a=On();a!==n;)r.push(a),a=sn,o=sn,i=oa(),u=na(),u!==n?(s=oa(),i=[i,u,s],o=i):(sn=o,o=n),o!==n?(o=On(),o===n?(sn=a,a=n):a=o):a=o;a=oa(),o=aa(),o!==n?(ln=e,e=function(e){return{type:"expression-list",location:hn(),value:e}}(r)):(sn=e,e=n)}else sn=e,e=n;return e}function On(){let e,t,r,a,o,i;if(e=sn,t=En(),t!==n){for(r=[],a=sn,oa(),o=wr(),o!==n?(oa(),i=En(),i!==n?(ln=a,a=tn(0,o,i)):(sn=a,a=n)):(sn=a,a=n);a!==n;)r.push(a),a=sn,oa(),o=wr(),o!==n?(oa(),i=En(),i!==n?(ln=a,a=tn(0,o,i)):(sn=a,a=n)):(sn=a,a=n);ln=e,e=function(e,t){return ca(e,t)}(t,r)}else sn=e,e=n;return e}function En(){let e,t,r,a,o,i;if(e=sn,t=Sn(),t!==n){for(r=[],a=sn,oa(),o=hr(),o!==n?(oa(),i=Sn(),i!==n?(ln=a,a=nn(0,o,i)):(sn=a,a=n)):(sn=a,a=n);a!==n;)r.push(a),a=sn,oa(),o=hr(),o!==n?(oa(),i=Sn(),i!==n?(ln=a,a=nn(0,o,i)):(sn=a,a=n)):(sn=a,a=n);ln=e,e=function(e,t){return ca(e,t)}(t,r)}else sn=e,e=n;return e}function Sn(){let t,r,a,o,s;return t=sn,r=mr(),r===n&&(r=sn,33===e.charCodeAt(sn)?(a=i,sn++):(a=n,0===mn&&Ln(Me)),a!==n?(o=sn,mn++,61===e.charCodeAt(sn)?(s=u,sn++):(s=n,0===mn&&Ln(be)),mn--,s===n?o=void 0:(sn=o,o=n),o!==n?(a=[a,o],r=a):(sn=r,r=n)):(sn=r,r=n)),r!==n?(a=oa(),o=Sn(),o!==n?(ln=t,t=function(e){return function(e,t,n){return{type:"unary-expression",location:n,operator:"NOT",expr:t}}(0,e,hn())}(o)):(sn=t,t=n)):(sn=t,t=n),t===n&&(t=function(){let e,t,r,a;return e=sn,t=_n(),t!==n?(r=sn,oa(),a=function(){let e;return e=function(){let e,t,r,a,o;if(e=sn,t=[],r=sn,oa(),a=xn(),a!==n?(oa(),o=_n(),o!==n?(ln=r,r=rn(a,o)):(sn=r,r=n)):(sn=r,r=n),r!==n)for(;r!==n;)t.push(r),r=sn,oa(),a=xn(),a!==n?(oa(),o=_n(),o!==n?(ln=r,r=rn(a,o)):(sn=r,r=n)):(sn=r,r=n);else t=n;return t!==n&&(ln=e,t=function(e){return{type:"arithmetic",tail:e}}(t)),e=t,e}(),e===n&&(e=function(){let e,t,r;return e=sn,t=Dn(),t!==n?(oa(),r=Nn(),r!==n?(ln=e,e=function(e,t){return{op:e,right:t}}(t,r)):(sn=e,e=n)):(sn=e,e=n),e===n&&(e=sn,t=Dn(),t!==n?(oa(),r=zn(),r!==n?(ln=e,e=function(e,t){return{op:e,right:t}}(t,r)):(sn=e,e=n)):(sn=e,e=n)),e}(),e===n&&(e=function(){let e,t,r,a,o,i,u,s;return e=sn,t=mr(),t!==n?(oa(),r=vr(),r!==n?(a=oa(),o=sn,i=_n(),i!==n?(oa(),u=hr(),u!==n?(oa(),s=_n(),s!==n?(ln=o,o=function(e,t,n){return la(hn(),t,n)}(0,i,s)):(sn=o,o=n)):(sn=o,o=n)):(sn=o,o=n),o!==n?(ln=e,e=function(e,t){return{op:"NOT"+e,right:t}}(r,o)):(sn=e,e=n)):(sn=e,e=n)):(sn=e,e=n),e===n&&(e=sn,t=vr(),t!==n?(oa(),r=sn,a=_n(),a!==n?(o=oa(),i=hr(),i!==n?(oa(),u=_n(),u!==n?(ln=r,r=function(e,t,n){return la(hn(),t,n)}(0,a,u)):(sn=r,r=n)):(sn=r,r=n)):(sn=r,r=n),r!==n?(ln=e,e=function(e,t){return{op:e,right:t}}(t,r)):(sn=e,e=n)):(sn=e,e=n)),e}(),e===n&&(e=function(){let e,t,r,a;return e=sn,t=fr(),t!==n?(oa(),r=mr(),r!==n?(oa(),a=_n(),a!==n?(ln=e,e=function(e,t){return{op:e+"NOT",right:t}}(t,a)):(sn=e,e=n)):(sn=e,e=n)):(sn=e,e=n),e===n&&(e=sn,t=fr(),t!==n?(oa(),r=_n(),r!==n?(ln=e,e=function(e,t){return{op:e,right:t}}(t,r)):(sn=e,e=n)):(sn=e,e=n)),e}(),e===n&&(e=function(){let e,t,r,a,o;return e=sn,t=Cn(),t!==n?(oa(),r=Bn(),r!==n?(oa(),a=pr(),a!==n?(oa(),o=Gn(),o!==n?(ln=e,e=function(e,t,n){return{op:e,right:t,escape:n.value}}(t,r,o)):(sn=e,e=n)):(sn=e,e=n)):(sn=e,e=n)):(sn=e,e=n),e===n&&(e=sn,t=Cn(),t!==n?(oa(),r=Bn(),r!==n?(ln=e,e=function(e,t){return{op:e,right:t,escape:""}}(t,r)):(sn=e,e=n)):(sn=e,e=n)),e}())))),e}(),a!==n?r=a:(sn=r,r=n),r===n&&(r=null),ln=e,e=function(e,t){return""==t||null==t||null==t?e:"arithmetic"==t.type?ca(e,t.tail):sa(t.op,e,t.right,t.escape,hn())}(t,r)):(sn=e,e=n),e}()),t}function xn(){let t;return e.substr(sn,2)===s?(t=s,sn+=2):(t=n,0===mn&&Ln(Pe)),t===n&&(62===e.charCodeAt(sn)?(t=l,sn++):(t=n,0===mn&&Ln(Ae)),t===n&&(e.substr(sn,2)===c?(t=c,sn+=2):(t=n,0===mn&&Ln(Fe)),t===n&&(e.substr(sn,2)===f?(t=f,sn+=2):(t=n,0===mn&&Ln($e)),t===n&&(t=e.charAt(sn),ge.test(t)?sn++:(t=n,0===mn&&Ln(Re)),t===n&&(e.substr(sn,2)===d?(t=d,sn+=2):(t=n,0===mn&&Ln(ke))))))),t}function Cn(){let e,t,r,a,o;return e=sn,t=sn,r=mr(),r!==n?(a=oa(),o=dr(),o!==n?(r=[r,a,o],t=r):(sn=t,t=n)):(sn=t,t=n),t!==n&&(ln=e,t=function(e){return e[0]+" "+e[2]}(t)),e=t,e===n&&(e=dr()),e}function Dn(){let e,t,r,a,o;return e=sn,t=sn,r=mr(),r!==n?(a=oa(),o=cr(),o!==n?(r=[r,a,o],t=r):(sn=t,t=n)):(sn=t,t=n),t!==n&&(ln=e,t=function(e){return e[0]+" "+e[2]}(t)),e=t,e===n&&(e=cr()),e}function _n(){let e,t,r,a,o,i;if(e=sn,t=bn(),t!==n){for(r=[],a=sn,oa(),o=Mn(),o!==n?(oa(),i=bn(),i!==n?(ln=a,a=an(0,o,i)):(sn=a,a=n)):(sn=a,a=n);a!==n;)r.push(a),a=sn,oa(),o=Mn(),o!==n?(oa(),i=bn(),i!==n?(ln=a,a=an(0,o,i)):(sn=a,a=n)):(sn=a,a=n);ln=e,e=function(e,t){return ca(e,t)}(t,r)}else sn=e,e=n;return e}function Mn(){let t;return t=e.charAt(sn),ye.test(t)?sn++:(t=n,0===mn&&Ln(Ue)),t===n&&(e.substr(sn,2)===p?(t=p,sn+=2):(t=n,0===mn&&Ln(Ve))),t}function bn(){let e,t,r,a,o,i;if(e=sn,t=An(),t!==n){for(r=[],a=sn,oa(),o=Pn(),o!==n?(oa(),i=An(),i!==n?(ln=a,a=on(0,o,i)):(sn=a,a=n)):(sn=a,a=n);a!==n;)r.push(a),a=sn,oa(),o=Pn(),o!==n?(oa(),i=An(),i!==n?(ln=a,a=on(0,o,i)):(sn=a,a=n)):(sn=a,a=n);ln=e,e=function(e,t){return ca(e,t)}(t,r)}else sn=e,e=n;return e}function Pn(){let t;return t=e.charAt(sn),Le.test(t)?sn++:(t=n,0===mn&&Ln(ze)),t}function An(){let e,t,r,a;return e=function(){let e;return e=Gn(),e===n&&(e=function(){let e,t,r,a;return e=sn,t=function(){let e,t,r,a;return e=sn,t=tr(),t!==n?(r=nr(),r!==n?(a=rr(),a!==n?(ln=e,e=function(e,t,n){return parseFloat(e+t+n)}(t,r,a)):(sn=e,e=n)):(sn=e,e=n)):(sn=e,e=n),e===n&&(e=sn,t=tr(),t!==n?(r=nr(),r!==n?(ln=e,e=function(e,t){return parseFloat(e+t)}(t,r)):(sn=e,e=n)):(sn=e,e=n),e===n&&(e=sn,t=tr(),t!==n?(r=rr(),r!==n?(ln=e,e=function(e,t){return parseFloat(e+t)}(t,r)):(sn=e,e=n)):(sn=e,e=n),e===n&&(e=sn,t=tr(),t!==n&&(ln=e,t=function(e){return parseFloat(e)}(t)),e=t))),e}(),t!==n?(r=sn,mn++,a=$n(),mn--,a===n?r=void 0:(sn=r,r=n),r!==n?(ln=e,e=function(e){return{type:"number",location:hn(),value:e}}(t)):(sn=e,e=n)):(sn=e,e=n),e}(),e===n&&(e=function(){let e,t;return e=sn,t=sr(),t!==n&&(ln=e,t={type:"boolean",location:hn(),value:!0}),e=t,e===n&&(e=sn,t=lr(),t!==n&&(ln=e,t={type:"boolean",location:hn(),value:!1}),e=t),e}(),e===n&&(e=function(){let e,t;return e=sn,t=ur(),t!==n&&(ln=e,t={type:"null",location:hn(),value:null}),e=t,e}(),e===n&&(e=function(){let e,t,r;return e=sn,t=Er(),t!==n?(oa(),r=Bn(),r!==n?(ln=e,e=function(e){return"string"===e.type&&function(e){!0!==/^(\d{4})-(\d{1,2})-(\d{1,2})$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})(\.[0-9]+)?$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})(\.[0-9]+)?[ ]{0,1}(\+|\-)(\d{1,2}):(\d{1,2})$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2})?[ ]{0,1}(\+|\-)(\d{1,2}):(\d{1,2})$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2})$/.test(e)&&wn("Date literal is invalid")}(e.value),{type:"date",location:hn(),value:e.value}}(r)):(sn=e,e=n)):(sn=e,e=n),e}(),e===n&&(e=function(){let e,t,r;return e=sn,t=Or(),t!==n?(oa(),r=Bn(),r!==n?(ln=e,e=function(e){return"string"===e.type&&function(e){!0!==/^(\d{4})-(\d{1,2})-(\d{1,2})$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})(\.[0-9]+)?$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})(\.[0-9]+)?[ ]{0,1}(\+|\-)(\d{1,2}):(\d{1,2})$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2})?[ ]{0,1}(\+|\-)(\d{1,2}):(\d{1,2})$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2})$/.test(e)&&wn("Timestamp literal is invalid")}(e.value),{type:"timestamp",location:hn(),value:e.value}}(r)):(sn=e,e=n)):(sn=e,e=n),e}(),e===n&&(e=Zn(),e===n&&(e=function(){let e,t,r;return e=sn,t=Sr(),t!==n?(oa(),r=Bn(),r!==n?(ln=e,e=function(e){return"string"===e.type&&function(e){!0!==/^(\d{1,2}):(\d{1,2}):(\d{1,2})$|^(\d{1,2}):(\d{1,2})$|^(\d{1,2}):(\d{1,2}):(\d{1,2}).([0-9]+)$/.test(e)&&wn("Time literal is invalid")}(e.value),{type:"time",location:hn(),value:e.value}}(r)):(sn=e,e=n)):(sn=e,e=n),e}()))))))),e}(),e===n&&(e=function(){let e,t,r,a,o,i,u,s;return e=sn,t=Lr(),t!==n?(oa(),r=sn,a=ra(),a!==n?(oa(),o=Kn(),o!==n?(oa(),i=Ir(),i!==n?(oa(),u=On(),u!==n?(oa(),s=aa(),s!==n?(ln=r,r=function(e,t){return la(hn(),e,t)}(o,u)):(sn=r,r=n)):(sn=r,r=n)):(sn=r,r=n)):(sn=r,r=n)):(sn=r,r=n),r===n&&(r=sn,a=ra(),a!==n?(oa(),o=Kn(),o!==n?(oa(),i=na(),i!==n?(oa(),u=On(),u!==n?(oa(),s=aa(),s!==n?(ln=r,r=function(e,t){return la(hn(),e,t)}(o,u)):(sn=r,r=n)):(sn=r,r=n)):(sn=r,r=n)):(sn=r,r=n)):(sn=r,r=n)),r!==n?(ln=e,e=function(e){return{type:"function",location:hn(),name:"extract",args:e}}(r)):(sn=e,e=n)):(sn=e,e=n),e}(),e===n&&(e=function(){let e,t,r,a,o,i,u,s,l,c,f;return e=sn,t=yr(),t!==n?(oa(),r=sn,a=ra(),a!==n?(oa(),o=On(),o!==n?(oa(),i=Ir(),i!==n?(oa(),u=On(),u!==n?(oa(),s=sn,l=gr(),l!==n?(c=oa(),f=On(),f!==n?(oa(),s=f):(sn=s,s=n)):(sn=s,s=n),s===n&&(s=null),l=aa(),l!==n?(ln=r,r=function(e,t,n){return la(hn(),e,t,...n?[n]:[])}(o,u,s)):(sn=r,r=n)):(sn=r,r=n)):(sn=r,r=n)):(sn=r,r=n)):(sn=r,r=n),r===n&&(r=sn,a=ra(),a!==n?(oa(),o=On(),o!==n?(oa(),i=na(),i!==n?(oa(),u=On(),u!==n?(oa(),s=na(),s!==n?(l=oa(),c=On(),c!==n?(f=aa(),f!==n?(ln=r,r=function(e,t,n){return la(hn(),e,t,n)}(o,u,c)):(sn=r,r=n)):(sn=r,r=n)):(sn=r,r=n)):(sn=r,r=n)):(sn=r,r=n)):(sn=r,r=n)):(sn=r,r=n)),r!==n?(ln=e,e=function(e){return{type:"function",location:hn(),name:"substring",args:e}}(r)):(sn=e,e=n)):(sn=e,e=n),e}(),e===n&&(e=function(){let e,t,r,a,o,i,u,s,l;return e=sn,t=Tr(),t!==n?(oa(),r=sn,a=ra(),a!==n?(oa(),o=qn(),oa(),i=On(),i!==n?(oa(),u=Ir(),u!==n?(oa(),s=On(),s!==n?(oa(),l=aa(),l!==n?(ln=r,r=function(e,t,n){return la(hn(),e,t,n)}(o,i,s)):(sn=r,r=n)):(sn=r,r=n)):(sn=r,r=n)):(sn=r,r=n)):(sn=r,r=n),r===n&&(r=sn,a=ra(),a!==n?(oa(),o=qn(),oa(),i=On(),i!==n?(oa(),u=aa(),u!==n?(ln=r,r=function(e,t){return la(hn(),e,t)}(o,i)):(sn=r,r=n)):(sn=r,r=n)):(sn=r,r=n)),r!==n?(ln=e,e=function(e){return{type:"function",location:hn(),name:"trim",args:e}}(r)):(sn=e,e=n)):(sn=e,e=n),e}(),e===n&&(e=function(){let e,t,r,a,o,i,u,s;return e=sn,t=Nr(),t!==n?(oa(),r=sn,a=ra(),a!==n?(oa(),o=On(),o!==n?(oa(),i=cr(),i!==n?(oa(),u=On(),u!==n?(oa(),s=aa(),s!==n?(ln=r,r=function(e,t){return la(hn(),e,t)}(o,u)):(sn=r,r=n)):(sn=r,r=n)):(sn=r,r=n)):(sn=r,r=n)):(sn=r,r=n),r===n&&(r=sn,a=ra(),a!==n?(oa(),o=On(),o!==n?(oa(),i=na(),i!==n?(oa(),u=On(),u!==n?(oa(),s=aa(),s!==n?(ln=r,r=function(e,t){return la(hn(),e,t)}(o,u)):(sn=r,r=n)):(sn=r,r=n)):(sn=r,r=n)):(sn=r,r=n)):(sn=r,r=n)),r!==n?(ln=e,e=function(e){return{type:"function",location:hn(),name:"position",args:e}}(r)):(sn=e,e=n)):(sn=e,e=n),e}(),e===n&&(e=function(){let e,t,r,a,o,i,u,s;return e=sn,t=_r(),t!==n?(oa(),r=sn,a=ra(),a!==n?(oa(),o=On(),o!==n?(oa(),i=Mr(),i!==n?(oa(),u=Hn(),u!==n?(oa(),s=aa(),s!==n?(ln=r,r=function(e,t){return la(hn(),e,t)}(o,u)):(sn=r,r=n)):(sn=r,r=n)):(sn=r,r=n)):(sn=r,r=n)):(sn=r,r=n),r===n&&(r=sn,a=ra(),a!==n?(oa(),o=On(),o!==n?(oa(),i=na(),i!==n?(oa(),u=Hn(),u!==n?(oa(),s=aa(),s!==n?(ln=r,r=function(e,t){return la(hn(),e,t)}(o,u)):(sn=r,r=n)):(sn=r,r=n)):(sn=r,r=n)):(sn=r,r=n)):(sn=r,r=n)),r!==n?(ln=e,e=function(e){return{type:"function",location:hn(),name:"cast",args:e}}(r)):(sn=e,e=n)):(sn=e,e=n),e}(),e===n&&(e=function(){let e,t,r,a;return e=sn,t=sn,mn++,r=Lr(),mn--,r===n?t=void 0:(sn=t,t=n),t!==n?(r=ua(),r!==n?(oa(),a=Nn(),a!==n?(ln=e,e=function(e,t){return{type:"function",location:hn(),name:e,args:t}}(r,a)):(sn=e,e=n)):(sn=e,e=n)):(sn=e,e=n),e}(),e===n&&(e=function(){let e;return e=function(){let e,t,r,a,o,i,u;if(e=sn,t=Gr(),t!==n)if(oa(),r=On(),r!==n){for(oa(),a=[],o=sn,i=Xn(),i!==n?(u=oa(),o=i):(sn=o,o=n);o!==n;)a.push(o),o=sn,i=Xn(),i!==n?(u=oa(),o=i):(sn=o,o=n);o=Qr(),o!==n?(ln=e,e=function(e,t){return{type:"case-expression",location:hn(),format:"simple",operand:e,clauses:t,else:null,elseLocation:null}}(r,a)):(sn=e,e=n)}else sn=e,e=n;else sn=e,e=n;if(e===n)if(e=sn,t=Gr(),t!==n)if(oa(),r=On(),r!==n){for(oa(),a=[],o=sn,i=Xn(),i!==n?(u=oa(),o=i):(sn=o,o=n);o!==n;)a.push(o),o=sn,i=Xn(),i!==n?(u=oa(),o=i):(sn=o,o=n);o=er(),o!==n?(i=oa(),u=Qr(),u!==n?(ln=e,e=function(e,t,n){return{type:"case-expression",location:hn(),format:"simple",operand:e,clauses:t,else:n.value,elseLocation:n.location}}(r,a,o)):(sn=e,e=n)):(sn=e,e=n)}else sn=e,e=n;else sn=e,e=n;return e}(),e===n&&(e=function(){let e,t,r,a,o,i;if(e=sn,t=Gr(),t!==n){for(oa(),r=[],a=sn,o=Qn(),o!==n?(i=oa(),a=o):(sn=a,a=n);a!==n;)r.push(a),a=sn,o=Qn(),o!==n?(i=oa(),a=o):(sn=a,a=n);a=Qr(),a!==n?(ln=e,e=function(e){return{type:"case-expression",location:hn(),format:"searched",clauses:e,else:null,elseLocation:null}}(r)):(sn=e,e=n)}else sn=e,e=n;if(e===n)if(e=sn,t=Gr(),t!==n){for(oa(),r=[],a=sn,o=Qn(),o!==n?(i=oa(),a=o):(sn=a,a=n);a!==n;)r.push(a),a=sn,o=Qn(),o!==n?(i=oa(),a=o):(sn=a,a=n);a=er(),a!==n?(o=oa(),i=Qr(),i!==n?(ln=e,e=function(e,t){return{type:"case-expression",location:hn(),format:"searched",clauses:e,else:t.value,elseLocation:t.location}}(r,a)):(sn=e,e=n)):(sn=e,e=n)}else sn=e,e=n;return e}()),e}(),e===n&&(e=function(){let e,t;return e=sn,t=function(){let e,t;return e=sn,t=function(){let e,t,r,a;if(e=sn,t=$n(),t!==n){for(r=[],a=kn();a!==n;)r.push(a),a=kn();ln=e,e=function(e,t){return e+t.join("")}(t,r)}else sn=e,e=n;return e}(),t!==n&&(ln=e),e=t,e}(),t!==n&&(ln=e,t=function(e){return/^CURRENT_DATE$/i.test(e)?{type:"current-time",location:hn(),mode:"date"}:/^CURRENT_TIMESTAMP$/i.test(e)?{type:"current-time",location:hn(),mode:"timestamp"}:/^CURRENT_TIME$/i.test(e)?{type:"current-time",location:hn(),mode:"time"}:/^CURRENT_USER$/i.test(e)?{type:"current-user",location:hn()}:{type:"column-reference",location:hn(),table:"",column:e}}(t)),e=t,e===n&&(e=sn,t=function(){let e,t,r,a;return e=sn,t=Vn(),t!==n?(r=function(){let e,t,r;for(e=sn,t=[],r=Un();r!==n;)t.push(r),r=Un();return ln=e,t=function(e){return e.join("")}(t),e=t,e}(),a=Vn(),a!==n?(ln=e,e=r):(sn=e,e=n)):(sn=e,e=n),e}(),t!==n&&(ln=e,t=function(e){return{type:"column-reference",location:hn(),table:"",column:e,delimited:!0}}(t)),e=t),e}(),e===n&&(e=zn(),e===n&&(e=sn,t=ra(),t!==n?(oa(),r=On(),r!==n?(oa(),a=aa(),a!==n?(ln=e,e=function(e){return e.paren=!0,e}(r)):(sn=e,e=n)):(sn=e,e=n)):(sn=e,e=n))))))))))),e}function Fn(){let e,t,r,a;if(e=sn,t=$n(),t!==n){for(r=[],a=Rn();a!==n;)r.push(a),a=Rn();ln=e,e=function(e,t){return e+t.join("")}(t,r)}else sn=e,e=n;return e}function $n(){let t;return t=e.charAt(sn),Te.test(t)?sn++:(t=n,0===mn&&Ln(He)),t}function Rn(){let t;return t=e.charAt(sn),Ne.test(t)?sn++:(t=n,0===mn&&Ln(qe)),t}function kn(){let t;return t=e.charAt(sn),Oe.test(t)?sn++:(t=n,0===mn&&Ln(Ke)),t}function Un(){let t;return t=function(){let t;return t=e.charAt(sn),Oe.test(t)?sn++:(t=n,0===mn&&Ln(Ke)),t}(),t===n&&(t=function(){let e,t,r;return e=sn,t=Vn(),t!==n?(r=Vn(),r!==n?(ln=e,e='"'):(sn=e,e=n)):(sn=e,e=n),e}()),t}function Vn(){let t;return t=e.charAt(sn),Ee.test(t)?sn++:(t=n,0===mn&&Ln(Ze)),t}function zn(){let t,r,a,o;return t=sn,r=sn,64===e.charCodeAt(sn)?(a=m,sn++):(a=n,0===mn&&Ln(Ye)),a!==n?(o=Fn(),o!==n?(a=[a,o],r=a):(sn=r,r=n)):(sn=r,r=n),r!==n&&(ln=t,r=function(e){return{type:"parameter",location:hn(),value:e[1]}}(r)),t=r,t}function Hn(){let e,t,r,a,o;return e=sn,t=br(),t===n&&(t=Pr()),t!==n&&(ln=e,t={type:"data-type",location:hn(),value:{type:"integer"}}),e=t,e===n&&(e=sn,t=Ar(),t!==n&&(ln=e,t={type:"data-type",location:hn(),value:{type:"smallint"}}),e=t,e===n&&(e=sn,t=Fr(),t!==n&&(ln=e,t={type:"data-type",location:hn(),value:{type:"float"}}),e=t,e===n&&(e=sn,t=$r(),t!==n&&(ln=e,t={type:"data-type",location:hn(),value:{type:"real"}}),e=t,e===n&&(e=sn,t=Er(),t!==n&&(ln=e,t={type:"data-type",location:hn(),value:{type:"date"}}),e=t,e===n&&(e=sn,t=Or(),t!==n&&(ln=e,t={type:"data-type",location:hn(),value:{type:"timestamp"}}),e=t,e===n&&(e=sn,t=Sr(),t!==n&&(ln=e,t={type:"data-type",location:hn(),value:{type:"time"}}),e=t,e===n&&(e=sn,t=Rr(),t!==n?(oa(),r=ra(),r!==n?(oa(),a=ar(),a!==n?(oa(),o=aa(),o!==n?(ln=e,e=function(e){return{type:"data-type",location:hn(),value:{type:"varchar",size:parseInt(e)}}}(a)):(sn=e,e=n)):(sn=e,e=n)):(sn=e,e=n)):(sn=e,e=n)))))))),e}function qn(){let e,t;return e=sn,t=xr(),t===n&&(t=Cr(),t===n&&(t=Dr())),t===n&&(t=null),ln=e,t=function(e){return{type:"string",location:hn(),value:e??"BOTH"}}(t),e=t,e}function Kn(){let e,t;return e=sn,t=Vr(),t===n&&(t=qr(),t===n&&(t=Kr(),t===n&&(t=Zr(),t===n&&(t=Yr(),t===n&&(t=jr(),t===n&&(t=zr(),t===n&&(t=Hr(),t===n&&(t=Wr(),t===n&&(t=Jr(),t===n&&(t=Br())))))))))),t!==n&&(ln=e,t=function(e){return{type:"string",location:hn(),value:e}}(t)),e=t,e}function Zn(){let t,r,a,o,i;return t=sn,r=Ur(),r!==n?(oa(),a=e.charAt(sn),ye.test(a)?sn++:(a=n,0===mn&&Ln(Ue)),a!==n?(oa(),o=Bn(),o!==n?(oa(),i=Yn(),i!==n?(ln=t,t=function(e,t,n){return{type:"interval",location:hn(),value:t,qualifier:n,op:e}}(a,o,i)):(sn=t,t=n)):(sn=t,t=n)):(sn=t,t=n)):(sn=t,t=n),t===n&&(t=sn,r=Ur(),r!==n?(oa(),a=Bn(),a!==n?(oa(),o=Yn(),o!==n?(ln=t,t=function(e,t){return{type:"interval",location:hn(),value:e,qualifier:t,op:""}}(a,o)):(sn=t,t=n)):(sn=t,t=n)):(sn=t,t=n)),t}function Yn(){let e,t,r,a;return e=sn,t=function(){let e,t,r,a,o;return e=sn,t=jn(),t!==n?(oa(),r=ra(),r!==n?(oa(),a=Jn(),a!==n?(oa(),o=aa(),o!==n?(ln=e,e=function(e,t){return{type:"interval-period",location:hn(),period:e.value,precision:t,secondary:null}}(t,a)):(sn=e,e=n)):(sn=e,e=n)):(sn=e,e=n)):(sn=e,e=n),e===n&&(e=sn,t=jn(),t!==n&&(ln=e,t=function(e){return{type:"interval-period",location:hn(),period:e.value,precision:null,secondary:null}}(t)),e=t),e}(),t!==n?(oa(),r=kr(),r!==n?(oa(),a=function(){let e,t,r,a,o,i,u;return e=sn,t=jn(),t!==n&&(ln=e,t=function(e){return{type:"interval-period",location:hn(),period:e.value,precision:null,secondary:null}}(t)),e=t,e===n&&(e=sn,t=jr(),t!==n?(oa(),r=ra(),r!==n?(oa(),a=Jn(),a!==n?(oa(),o=na(),o!==n?(oa(),i=Wn(),i!==n?(oa(),u=aa(),u!==n?(ln=e,e=function(e,t){return{type:"interval-period",location:hn(),period:"second",precision:e,secondary:t}}(a,i)):(sn=e,e=n)):(sn=e,e=n)):(sn=e,e=n)):(sn=e,e=n)):(sn=e,e=n)):(sn=e,e=n),e===n&&(e=sn,t=jr(),t!==n?(oa(),r=ra(),r!==n?(oa(),a=Jn(),a!==n?(oa(),o=aa(),o!==n?(ln=e,e=function(e){return{type:"interval-period",location:hn(),period:"second",precision:e,secondary:null}}(a)):(sn=e,e=n)):(sn=e,e=n)):(sn=e,e=n)):(sn=e,e=n),e===n&&(e=sn,t=jr(),t!==n&&(ln=e,t={type:"interval-period",location:hn(),period:"second",precision:null,secondary:null}),e=t))),e}(),a!==n?(ln=e,e=function(e,t){return{type:"interval-qualifier",location:hn(),start:e,end:t}}(t,a)):(sn=e,e=n)):(sn=e,e=n)):(sn=e,e=n),e===n&&(e=function(){let e,t,r,a,o,i,u;return e=sn,t=jn(),t!==n?(oa(),r=ra(),r!==n?(oa(),a=Wn(),a!==n?(oa(),o=aa(),o!==n?(ln=e,e=function(e,t){return{type:"interval-period",location:hn(),period:e.value,precision:t,secondary:null}}(t,a)):(sn=e,e=n)):(sn=e,e=n)):(sn=e,e=n)):(sn=e,e=n),e===n&&(e=sn,t=jn(),t!==n&&(ln=e,t=function(e){return{type:"interval-period",location:hn(),period:e.value,precision:null,secondary:null}}(t)),e=t,e===n&&(e=sn,t=jr(),t!==n?(oa(),r=ra(),r!==n?(oa(),a=Jn(),a!==n?(oa(),o=na(),o!==n?(oa(),i=Wn(),i!==n?(oa(),u=aa(),u!==n?(ln=e,e=function(e,t){return{type:"interval-period",location:hn(),period:"second",precision:e,secondary:t}}(a,i)):(sn=e,e=n)):(sn=e,e=n)):(sn=e,e=n)):(sn=e,e=n)):(sn=e,e=n)):(sn=e,e=n),e===n&&(e=sn,t=jr(),t!==n?(oa(),r=ra(),r!==n?(oa(),a=Wn(),a!==n?(oa(),o=aa(),o!==n?(ln=e,e=function(e){return{type:"interval-period",location:hn(),period:"second",precision:e,secondary:null}}(a)):(sn=e,e=n)):(sn=e,e=n)):(sn=e,e=n)):(sn=e,e=n),e===n&&(e=sn,t=jr(),t!==n&&(ln=e,t={type:"interval-period",location:hn(),period:"second",precision:null,secondary:null}),e=t)))),e}()),e}function jn(){let e,t;return e=sn,t=Kr(),t!==n&&(ln=e,t={type:"string",location:hn(),value:"day"}),e=t,e===n&&(e=sn,t=Zr(),t!==n&&(ln=e,t={type:"string",location:hn(),value:"hour"}),e=t,e===n&&(e=sn,t=Yr(),t!==n&&(ln=e,t={type:"string",location:hn(),value:"minute"}),e=t,e===n&&(e=sn,t=qr(),t!==n&&(ln=e,t={type:"string",location:hn(),value:"month"}),e=t,e===n&&(e=sn,t=Vr(),t!==n&&(ln=e,t={type:"string",location:hn(),value:"year"}),e=t)))),e}function Wn(){let e,t;return e=sn,t=ar(),t!==n&&(ln=e,t=function(e){return parseFloat(e)}(t)),e=t,e}function Jn(){let e,t;return e=sn,t=ar(),t!==n&&(ln=e,t=function(e){return parseFloat(e)}(t)),e=t,e}function Bn(){let e;return e=Gn(),e===n&&(e=zn()),e}function Gn(){let t,r,a,o,i;if(t=sn,39===e.charCodeAt(sn)?(r=h,sn++):(r=n,0===mn&&Ln(je)),r===n&&(e.substr(sn,2)===w?(r=w,sn+=2):(r=n,0===mn&&Ln(We))),r!==n){for(a=[],o=sn,e.substr(sn,2)===v?(i=v,sn+=2):(i=n,0===mn&&Ln(Je)),i!==n&&(ln=o,i="'"),o=i,o===n&&(o=e.charAt(sn),Se.test(o)?sn++:(o=n,0===mn&&Ln(Be)));o!==n;)a.push(o),o=sn,e.substr(sn,2)===v?(i=v,sn+=2):(i=n,0===mn&&Ln(Je)),i!==n&&(ln=o,i=un()),o=i,o===n&&(o=e.charAt(sn),Se.test(o)?sn++:(o=n,0===mn&&Ln(Be)));39===e.charCodeAt(sn)?(o=h,sn++):(o=n,0===mn&&Ln(je)),o!==n?(ln=t,t=function(e){return{type:"string",location:hn(),value:e.join("")}}(a)):(sn=t,t=n)}else sn=t,t=n;return t}function Qn(){let e,t,r,a,o;return e=sn,t=Xr(),t!==n?(oa(),r=On(),r!==n?(oa(),a=ea(),a!==n?(oa(),o=On(),o!==n?(ln=e,e=function(e,t){return{type:"when-clause",location:hn(),operand:e,value:t}}(r,o)):(sn=e,e=n)):(sn=e,e=n)):(sn=e,e=n)):(sn=e,e=n),e}function Xn(){let e,t,r,a,o;return e=sn,t=Xr(),t!==n?(oa(),r=On(),r!==n?(oa(),a=ea(),a!==n?(oa(),o=On(),o!==n?(ln=e,e=function(e,t){return{type:"when-clause",location:hn(),operand:e,value:t}}(r,o)):(sn=e,e=n)):(sn=e,e=n)):(sn=e,e=n)):(sn=e,e=n),e}function er(){let e,t,r;return e=sn,t=ta(),t!==n?(oa(),r=On(),r!==n?(ln=e,e=function(e){return{type:"else-clause",location:hn(),value:e}}(r)):(sn=e,e=n)):(sn=e,e=n),e}function tr(){let t,r,a;return t=ar(),t===n&&(t=sn,r=e.charAt(sn),ye.test(r)?sn++:(r=n,0===mn&&Ln(Ue)),r!==n?(a=ar(),a!==n?(ln=t,t=function(e,t){return e[0]+t}(r,a)):(sn=t,t=n)):(sn=t,t=n)),t}function nr(){let t,r,a;return t=sn,46===e.charCodeAt(sn)?(r=I,sn++):(r=n,0===mn&&Ln(Ge)),r!==n?(a=ar(),a===n&&(a=null),ln=t,t=function(e){return"."+(null!=e?e:"")}(a)):(sn=t,t=n),t}function rr(){let e,t,r;return e=sn,t=ir(),t!==n?(r=ar(),r!==n?(ln=e,e=function(e,t){return e+t}(t,r)):(sn=e,e=n)):(sn=e,e=n),e}function ar(){let e,t,r;if(e=sn,t=[],r=or(),r!==n)for(;r!==n;)t.push(r),r=or();else t=n;return t!==n&&(ln=e,t=function(e){return e.join("")}(t)),e=t,e}function or(){let t;return t=e.charAt(sn),xe.test(t)?sn++:(t=n,0===mn&&Ln(Qe)),t}function ir(){let t,r,a;return t=sn,r=e.charAt(sn),Ce.test(r)?sn++:(r=n,0===mn&&Ln(Xe)),r!==n?(a=e.charAt(sn),ye.test(a)?sn++:(a=n,0===mn&&Ln(Ue)),a===n&&(a=null),ln=t,t=function(e,t){return"e"+(null===t?"":t)}(0,a)):(sn=t,t=n),t}function ur(){let t,r,a,o;return t=sn,r=e.substr(sn,4),r.toLowerCase()===g?sn+=4:(r=n,0===mn&&Ln(et)),r!==n?(a=sn,mn++,o=Rn(),mn--,o===n?a=void 0:(sn=a,a=n),a!==n?(r=[r,a],t=r):(sn=t,t=n)):(sn=t,t=n),t}function sr(){let t,r,a,o;return t=sn,r=e.substr(sn,4),r.toLowerCase()===y?sn+=4:(r=n,0===mn&&Ln(tt)),r!==n?(a=sn,mn++,o=Rn(),mn--,o===n?a=void 0:(sn=a,a=n),a!==n?(r=[r,a],t=r):(sn=t,t=n)):(sn=t,t=n),t}function lr(){let t,r,a,o;return t=sn,r=e.substr(sn,5),r.toLowerCase()===L?sn+=5:(r=n,0===mn&&Ln(nt)),r!==n?(a=sn,mn++,o=Rn(),mn--,o===n?a=void 0:(sn=a,a=n),a!==n?(r=[r,a],t=r):(sn=t,t=n)):(sn=t,t=n),t}function cr(){let t,r,a,o;return t=sn,r=e.substr(sn,2),r.toLowerCase()===T?sn+=2:(r=n,0===mn&&Ln(rt)),r!==n?(a=sn,mn++,o=Rn(),mn--,o===n?a=void 0:(sn=a,a=n),a!==n?(ln=t,t="IN"):(sn=t,t=n)):(sn=t,t=n),t}function fr(){let t,r,a,o;return t=sn,r=e.substr(sn,2),r.toLowerCase()===N?sn+=2:(r=n,0===mn&&Ln(at)),r!==n?(a=sn,mn++,o=Rn(),mn--,o===n?a=void 0:(sn=a,a=n),a!==n?(ln=t,t="IS"):(sn=t,t=n)):(sn=t,t=n),t}function dr(){let t,r,a,o;return t=sn,r=e.substr(sn,4),r.toLowerCase()===O?sn+=4:(r=n,0===mn&&Ln(ot)),r!==n?(a=sn,mn++,o=Rn(),mn--,o===n?a=void 0:(sn=a,a=n),a!==n?(ln=t,t="LIKE"):(sn=t,t=n)):(sn=t,t=n),t}function pr(){let t,r,a,o;return t=sn,r=e.substr(sn,6),r.toLowerCase()===E?sn+=6:(r=n,0===mn&&Ln(it)),r!==n?(a=sn,mn++,o=Rn(),mn--,o===n?a=void 0:(sn=a,a=n),a!==n?(ln=t,t="ESCAPE"):(sn=t,t=n)):(sn=t,t=n),t}function mr(){let t,r,a,o;return t=sn,r=e.substr(sn,3),r.toLowerCase()===S?sn+=3:(r=n,0===mn&&Ln(ut)),r!==n?(a=sn,mn++,o=Rn(),mn--,o===n?a=void 0:(sn=a,a=n),a!==n?(ln=t,t="NOT"):(sn=t,t=n)):(sn=t,t=n),t}function hr(){let t,r,a,o;return t=sn,r=e.substr(sn,3),r.toLowerCase()===x?sn+=3:(r=n,0===mn&&Ln(st)),r!==n?(a=sn,mn++,o=Rn(),mn--,o===n?a=void 0:(sn=a,a=n),a!==n?(ln=t,t="AND"):(sn=t,t=n)):(sn=t,t=n),t}function wr(){let t,r,a,o;return t=sn,r=e.substr(sn,2),r.toLowerCase()===C?sn+=2:(r=n,0===mn&&Ln(lt)),r!==n?(a=sn,mn++,o=Rn(),mn--,o===n?a=void 0:(sn=a,a=n),a!==n?(ln=t,t="OR"):(sn=t,t=n)):(sn=t,t=n),t}function vr(){let t,r,a,o;return t=sn,r=e.substr(sn,7),r.toLowerCase()===D?sn+=7:(r=n,0===mn&&Ln(ct)),r!==n?(a=sn,mn++,o=Rn(),mn--,o===n?a=void 0:(sn=a,a=n),a!==n?(ln=t,t="BETWEEN"):(sn=t,t=n)):(sn=t,t=n),t}function Ir(){let t,r,a,o;return t=sn,r=e.substr(sn,4),r.toLowerCase()===_?sn+=4:(r=n,0===mn&&Ln(ft)),r!==n?(a=sn,mn++,o=Rn(),mn--,o===n?a=void 0:(sn=a,a=n),a!==n?(ln=t,t="FROM"):(sn=t,t=n)):(sn=t,t=n),t}function gr(){let t,r,a,o;return t=sn,r=e.substr(sn,3),r.toLowerCase()===M?sn+=3:(r=n,0===mn&&Ln(dt)),r!==n?(a=sn,mn++,o=Rn(),mn--,o===n?a=void 0:(sn=a,a=n),a!==n?(ln=t,t="FOR"):(sn=t,t=n)):(sn=t,t=n),t}function yr(){let t,r,a,o;return t=sn,r=e.substr(sn,9),r.toLowerCase()===b?sn+=9:(r=n,0===mn&&Ln(pt)),r!==n?(a=sn,mn++,o=Rn(),mn--,o===n?a=void 0:(sn=a,a=n),a!==n?(ln=t,t="SUBSTRING"):(sn=t,t=n)):(sn=t,t=n),t}function Lr(){let t,r,a,o;return t=sn,r=e.substr(sn,7),r.toLowerCase()===P?sn+=7:(r=n,0===mn&&Ln(mt)),r!==n?(a=sn,mn++,o=Rn(),mn--,o===n?a=void 0:(sn=a,a=n),a!==n?(ln=t,t="EXTRACT"):(sn=t,t=n)):(sn=t,t=n),t}function Tr(){let t,r,a,o;return t=sn,r=e.substr(sn,4),r.toLowerCase()===A?sn+=4:(r=n,0===mn&&Ln(ht)),r!==n?(a=sn,mn++,o=Rn(),mn--,o===n?a=void 0:(sn=a,a=n),a!==n?(ln=t,t="TRIM"):(sn=t,t=n)):(sn=t,t=n),t}function Nr(){let t,r,a,o;return t=sn,r=e.substr(sn,8),r.toLowerCase()===F?sn+=8:(r=n,0===mn&&Ln(wt)),r!==n?(a=sn,mn++,o=Rn(),mn--,o===n?a=void 0:(sn=a,a=n),a!==n?(ln=t,t="POSITION"):(sn=t,t=n)):(sn=t,t=n),t}function Or(){let t,r,a,o;return t=sn,r=e.substr(sn,9),r.toLowerCase()===$?sn+=9:(r=n,0===mn&&Ln(vt)),r!==n?(a=sn,mn++,o=Rn(),mn--,o===n?a=void 0:(sn=a,a=n),a!==n?(ln=t,t="TIMESTAMP"):(sn=t,t=n)):(sn=t,t=n),t}function Er(){let t,r,a,o;return t=sn,r=e.substr(sn,4),r.toLowerCase()===R?sn+=4:(r=n,0===mn&&Ln(It)),r!==n?(a=sn,mn++,o=Rn(),mn--,o===n?a=void 0:(sn=a,a=n),a!==n?(ln=t,t="DATE"):(sn=t,t=n)):(sn=t,t=n),t}function Sr(){let t,r,a,o;return t=sn,r=e.substr(sn,4),r.toLowerCase()===k?sn+=4:(r=n,0===mn&&Ln(gt)),r!==n?(a=sn,mn++,o=Rn(),mn--,o===n?a=void 0:(sn=a,a=n),a!==n?(ln=t,t="TIME"):(sn=t,t=n)):(sn=t,t=n),t}function xr(){let t,r,a,o;return t=sn,r=e.substr(sn,7),r.toLowerCase()===U?sn+=7:(r=n,0===mn&&Ln(yt)),r!==n?(a=sn,mn++,o=Rn(),mn--,o===n?a=void 0:(sn=a,a=n),a!==n?(ln=t,t="LEADING"):(sn=t,t=n)):(sn=t,t=n),t}function Cr(){let t,r,a,o;return t=sn,r=e.substr(sn,8),r.toLowerCase()===V?sn+=8:(r=n,0===mn&&Ln(Lt)),r!==n?(a=sn,mn++,o=Rn(),mn--,o===n?a=void 0:(sn=a,a=n),a!==n?(ln=t,t="TRAILING"):(sn=t,t=n)):(sn=t,t=n),t}function Dr(){let t,r,a,o;return t=sn,r=e.substr(sn,4),r.toLowerCase()===z?sn+=4:(r=n,0===mn&&Ln(Tt)),r!==n?(a=sn,mn++,o=Rn(),mn--,o===n?a=void 0:(sn=a,a=n),a!==n?(ln=t,t="BOTH"):(sn=t,t=n)):(sn=t,t=n),t}function _r(){let t,r,a,o;return t=sn,r=e.substr(sn,4),r.toLowerCase()===H?sn+=4:(r=n,0===mn&&Ln(Nt)),r!==n?(a=sn,mn++,o=Rn(),mn--,o===n?a=void 0:(sn=a,a=n),a!==n?(ln=t,t="CAST"):(sn=t,t=n)):(sn=t,t=n),t}function Mr(){let t,r,a,o;return t=sn,r=e.substr(sn,2),r.toLowerCase()===q?sn+=2:(r=n,0===mn&&Ln(Ot)),r!==n?(a=sn,mn++,o=Rn(),mn--,o===n?a=void 0:(sn=a,a=n),a!==n?(ln=t,t="AS"):(sn=t,t=n)):(sn=t,t=n),t}function br(){let t,r,a,o;return t=sn,r=e.substr(sn,7),r.toLowerCase()===K?sn+=7:(r=n,0===mn&&Ln(Et)),r!==n?(a=sn,mn++,o=Rn(),mn--,o===n?a=void 0:(sn=a,a=n),a!==n?(ln=t,t="INTEGER"):(sn=t,t=n)):(sn=t,t=n),t}function Pr(){let t,r,a,o;return t=sn,r=e.substr(sn,3),r.toLowerCase()===Z?sn+=3:(r=n,0===mn&&Ln(St)),r!==n?(a=sn,mn++,o=Rn(),mn--,o===n?a=void 0:(sn=a,a=n),a!==n?(ln=t,t="INT"):(sn=t,t=n)):(sn=t,t=n),t}function Ar(){let t,r,a,o;return t=sn,r=e.substr(sn,8),r.toLowerCase()===Y?sn+=8:(r=n,0===mn&&Ln(xt)),r!==n?(a=sn,mn++,o=Rn(),mn--,o===n?a=void 0:(sn=a,a=n),a!==n?(ln=t,t="SMALLINT"):(sn=t,t=n)):(sn=t,t=n),t}function Fr(){let t,r,a,o;return t=sn,r=e.substr(sn,5),r.toLowerCase()===j?sn+=5:(r=n,0===mn&&Ln(Ct)),r!==n?(a=sn,mn++,o=Rn(),mn--,o===n?a=void 0:(sn=a,a=n),a!==n?(ln=t,t="FLOAT"):(sn=t,t=n)):(sn=t,t=n),t}function $r(){let t,r,a,o;return t=sn,r=e.substr(sn,4),r.toLowerCase()===J?sn+=4:(r=n,0===mn&&Ln(Dt)),r!==n?(a=sn,mn++,o=Rn(),mn--,o===n?a=void 0:(sn=a,a=n),a!==n?(ln=t,t="REAL"):(sn=t,t=n)):(sn=t,t=n),t}function Rr(){let t,r,a,o;return t=sn,r=e.substr(sn,7),r.toLowerCase()===B?sn+=7:(r=n,0===mn&&Ln(_t)),r!==n?(a=sn,mn++,o=Rn(),mn--,o===n?a=void 0:(sn=a,a=n),a!==n?(ln=t,t="VARCHAR"):(sn=t,t=n)):(sn=t,t=n),t}function kr(){let t,r,a,o;return t=sn,r=e.substr(sn,2),r.toLowerCase()===G?sn+=2:(r=n,0===mn&&Ln(Mt)),r!==n?(a=sn,mn++,o=Rn(),mn--,o===n?a=void 0:(sn=a,a=n),a!==n?(ln=t,t="TO"):(sn=t,t=n)):(sn=t,t=n),t}function Ur(){let t,r,a,o;return t=sn,r=e.substr(sn,8),r.toLowerCase()===Q?sn+=8:(r=n,0===mn&&Ln(bt)),r!==n?(a=sn,mn++,o=Rn(),mn--,o===n?a=void 0:(sn=a,a=n),a!==n?(ln=t,t="INTERVAL"):(sn=t,t=n)):(sn=t,t=n),t}function Vr(){let t,r,a,o;return t=sn,r=e.substr(sn,4),r.toLowerCase()===X?sn+=4:(r=n,0===mn&&Ln(Pt)),r!==n?(a=sn,mn++,o=Rn(),mn--,o===n?a=void 0:(sn=a,a=n),a!==n?(ln=t,t="YEAR"):(sn=t,t=n)):(sn=t,t=n),t}function zr(){let t,r,a,o;return t=sn,r=e.substr(sn,13),r.toLowerCase()===ee?sn+=13:(r=n,0===mn&&Ln(At)),r!==n?(a=sn,mn++,o=Rn(),mn--,o===n?a=void 0:(sn=a,a=n),a!==n?(ln=t,t="TIMEZONE_HOUR"):(sn=t,t=n)):(sn=t,t=n),t}function Hr(){let t,r,a,o;return t=sn,r=e.substr(sn,15),r.toLowerCase()===te?sn+=15:(r=n,0===mn&&Ln(Ft)),r!==n?(a=sn,mn++,o=Rn(),mn--,o===n?a=void 0:(sn=a,a=n),a!==n?(ln=t,t="TIMEZONE_MINUTE"):(sn=t,t=n)):(sn=t,t=n),t}function qr(){let t,r,a,o;return t=sn,r=e.substr(sn,5),r.toLowerCase()===ne?sn+=5:(r=n,0===mn&&Ln($t)),r!==n?(a=sn,mn++,o=Rn(),mn--,o===n?a=void 0:(sn=a,a=n),a!==n?(ln=t,t="MONTH"):(sn=t,t=n)):(sn=t,t=n),t}function Kr(){let t,r,a,o;return t=sn,r=e.substr(sn,3),r.toLowerCase()===re?sn+=3:(r=n,0===mn&&Ln(Rt)),r!==n?(a=sn,mn++,o=Rn(),mn--,o===n?a=void 0:(sn=a,a=n),a!==n?(ln=t,t="DAY"):(sn=t,t=n)):(sn=t,t=n),t}function Zr(){let t,r,a,o;return t=sn,r=e.substr(sn,4),r.toLowerCase()===ae?sn+=4:(r=n,0===mn&&Ln(kt)),r!==n?(a=sn,mn++,o=Rn(),mn--,o===n?a=void 0:(sn=a,a=n),a!==n?(ln=t,t="HOUR"):(sn=t,t=n)):(sn=t,t=n),t}function Yr(){let t,r,a,o;return t=sn,r=e.substr(sn,6),r.toLowerCase()===oe?sn+=6:(r=n,0===mn&&Ln(Ut)),r!==n?(a=sn,mn++,o=Rn(),mn--,o===n?a=void 0:(sn=a,a=n),a!==n?(ln=t,t="MINUTE"):(sn=t,t=n)):(sn=t,t=n),t}function jr(){let t,r,a,o;return t=sn,r=e.substr(sn,6),r.toLowerCase()===ie?sn+=6:(r=n,0===mn&&Ln(Vt)),r!==n?(a=sn,mn++,o=Rn(),mn--,o===n?a=void 0:(sn=a,a=n),a!==n?(ln=t,t="SECOND"):(sn=t,t=n)):(sn=t,t=n),t}function Wr(){let t,r,a,o;return t=sn,r=e.substr(sn,3),r.toLowerCase()===ue?sn+=3:(r=n,0===mn&&Ln(zt)),r!==n?(a=sn,mn++,o=Rn(),mn--,o===n?a=void 0:(sn=a,a=n),a!==n?(ln=t,t="DOW"):(sn=t,t=n)):(sn=t,t=n),t}function Jr(){let t,r,a,o;return t=sn,r=e.substr(sn,3),r.toLowerCase()===se?sn+=3:(r=n,0===mn&&Ln(Ht)),r!==n?(a=sn,mn++,o=Rn(),mn--,o===n?a=void 0:(sn=a,a=n),a!==n?(ln=t,t="DOY"):(sn=t,t=n)):(sn=t,t=n),t}function Br(){let t,r,a,o;return t=sn,r=e.substr(sn,4),r.toLowerCase()===le?sn+=4:(r=n,0===mn&&Ln(qt)),r!==n?(a=sn,mn++,o=Rn(),mn--,o===n?a=void 0:(sn=a,a=n),a!==n?(ln=t,t="WEEK"):(sn=t,t=n)):(sn=t,t=n),t}function Gr(){let t,r,a,o;return t=sn,r=e.substr(sn,4),r.toLowerCase()===ce?sn+=4:(r=n,0===mn&&Ln(Kt)),r!==n?(a=sn,mn++,o=Rn(),mn--,o===n?a=void 0:(sn=a,a=n),a!==n?(ln=t,t="CASE"):(sn=t,t=n)):(sn=t,t=n),t}function Qr(){let t,r,a,o;return t=sn,r=e.substr(sn,3),r.toLowerCase()===fe?sn+=3:(r=n,0===mn&&Ln(Zt)),r!==n?(a=sn,mn++,o=Rn(),mn--,o===n?a=void 0:(sn=a,a=n),a!==n?(ln=t,t="END"):(sn=t,t=n)):(sn=t,t=n),t}function Xr(){let t,r,a,o;return t=sn,r=e.substr(sn,4),r.toLowerCase()===de?sn+=4:(r=n,0===mn&&Ln(Yt)),r!==n?(a=sn,mn++,o=Rn(),mn--,o===n?a=void 0:(sn=a,a=n),a!==n?(ln=t,t="WHEN"):(sn=t,t=n)):(sn=t,t=n),t}function ea(){let t,r,a,o;return t=sn,r=e.substr(sn,4),r.toLowerCase()===pe?sn+=4:(r=n,0===mn&&Ln(jt)),r!==n?(a=sn,mn++,o=Rn(),mn--,o===n?a=void 0:(sn=a,a=n),a!==n?(ln=t,t="THEN"):(sn=t,t=n)):(sn=t,t=n),t}function ta(){let t,r,a,o;return t=sn,r=e.substr(sn,4),r.toLowerCase()===me?sn+=4:(r=n,0===mn&&Ln(Wt)),r!==n?(a=sn,mn++,o=Rn(),mn--,o===n?a=void 0:(sn=a,a=n),a!==n?(ln=t,t="ELSE"):(sn=t,t=n)):(sn=t,t=n),t}function na(){let t;return 44===e.charCodeAt(sn)?(t=he,sn++):(t=n,0===mn&&Ln(Jt)),t}function ra(){let t;return 40===e.charCodeAt(sn)?(t=we,sn++):(t=n,0===mn&&Ln(Bt)),t}function aa(){let t;return 41===e.charCodeAt(sn)?(t=ve,sn++):(t=n,0===mn&&Ln(Gt)),t}function oa(){let e,t;for(e=[],t=ia();t!==n;)e.push(t),t=ia();return e}function ia(){let t;return t=e.charAt(sn),De.test(t)?sn++:(t=n,0===mn&&Ln(Qt)),t}function ua(){let t,r,a,o;if(t=sn,r=Fn(),r!==n&&(ln=t),t=r,t===n)if(t=sn,96===e.charCodeAt(sn)?(r=Ie,sn++):(r=n,0===mn&&Ln(Xt)),r!==n){if(a=[],o=e.charAt(sn),_e.test(o)?sn++:(o=n,0===mn&&Ln(en)),o!==n)for(;o!==n;)a.push(o),o=e.charAt(sn),_e.test(o)?sn++:(o=n,0===mn&&Ln(en));else a=n;a!==n?(96===e.charCodeAt(sn)?(o=Ie,sn++):(o=n,0===mn&&Ln(Xt)),o!==n?(ln=t,t=function(e){return e.join("")}(a)):(sn=t,t=n)):(sn=t,t=n)}else sn=t,t=n;return t}function sa(e,t,n,r,a){const o={type:"binary-expression",location:a,operator:e,left:t,right:n};return void 0!==r&&(o.escape=r),o}function la(e,...t){return{type:"expression-list",location:e,value:t}}function ca(e,t){let n=e;for(const{op:e,expr:r,location:{end:a}}of t)n=sa(e,n,r,void 0,{...n.location,end:a});return n}fn=o();const fa=fn!==n&&sn===e.length;function da(){throw fn!==n&&sn<e.length&&Ln({type:"end"}),function(e,t,n){return new W(W.buildMessage(e,t),e,t,n)}(pn,dn<e.length?function(t=sn){const n=e.codePointAt(t);return void 0===n?"":String.fromCodePoint(n)}(dn):null,dn<e.length?yn(dn,dn+1):yn(dn,dn))}return t.peg$library?{peg$result:fn,peg$currPos:sn,peg$FAILED:n,peg$maxFailExpected:pn,peg$maxFailPos:dn,peg$success:fa,peg$throw:fa?void 0:da}:fa?fn:void da()}class B{static parse(e){return J(e)}}function G(e,t){if(null!=e)switch(t(e),e.type){case"when-clause":G(e.operand,t),G(e.value,t);break;case"case-expression":for(const n of e.clauses)G(n,t);"simple"===e.format&&G(e.operand,t),null!==e.else&&G(e.else,t);break;case"expression-list":for(const n of e.value)G(n,t);break;case"unary-expression":G(e.expr,t);break;case"binary-expression":G(e.left,t),G(e.right,t);break;case"function":G(e.args,t);break;case"interval":G(e.value,t),G(e.qualifier,t);break;case"interval-qualifier":G(e.start,t),G(e.end,t)}}const Q=new Set(["current_timestamp","current_date","current_time"]);class X{constructor(e){this.staticData=e}makeBool(e){return fe(e)}featureValue(e,t,n,r){return Te(e,t,n,r)}equalsNull(e){return null===e}applyLike(e,t,n){return Le(e,t,n)}ensureArray(e){return de(e)}applyIn(e,t){return we(e,t)}currentTimestamp(e){return ve(e)}currentDate(e){return Ie(e)}currentTime(e){return ge(e)}makeSqlInterval(e,t,n){return c.createFromValueAndQualifier(e,t,n)}convertInterval(e){return c.isInterval(e)?e.valueInMilliseconds():e}compare(e,t,n){return k(t,n,e)}calculate(e,t,n,r){return Y(e,t,n,r)}evaluateTime(e){return D(e)}evaluateTimestamp(e,t,n){return _(e,t,n)}evaluateDate(e,t){return M(e,t)}evaluateFunction(e,t,n){return H(e,t,n)}lookup(e,t){const n=t[e];return void 0===n?null:n}between(e,t){return null==e||null==t[0]||null==t[1]?null:k(e,t[0],">=")&&k(e,t[1],"<=")}notbetween(e,t){return null==e||null==t[0]||null==t[1]?null:k(e,t[0],"<")||k(e,t[1],">")}ternaryNot(e){return pe(e)}ternaryAnd(e,t){return me(e,t)}ternaryOr(e,t){return he(e,t)}}function ee(e,...t){return`this.${e}(${t.join(", ")})`}function te(e){return void 0===e?"void 0":JSON.stringify(e)}function ne({type:e,period:t,precision:n,secondary:r}){return JSON.stringify({type:e,period:t,precision:n,secondary:r})}const re="feature",ae="lookups",oe="attributeAdapter",ie="fieldsIndex",ue="timeZone",se="currentUser";class le{constructor(e){this._parseTree=e,this._staticData=Object.create(null),this._nextStaticDataId=0,this._tempVars=new Set,this._nextTempVarId=0}compile(){const e=this._compileNode(this._parseTree),t=`\n ${this._tempVars.size>0?`var ${Array.from(this._tempVars).join(", ")};`:""}\n return this.convertInterval(${e});\n `;return new Function(re,ae,oe,ie,ue,se,t).bind(new X(this._staticData))}_storeStaticData(e){const t="static$"+this._nextStaticDataId++;return this._staticData[t]=e,t}_compileRefStaticData(e){return`this.staticData[${te(e)}]`}_generateTempVar(){const e="temp$"+this._nextTempVarId++;return this._tempVars.add(e),e}_compileSimpleCase(e){const t=this._compileNode(e.operand),n=this._generateTempVar(),r=[];for(const t of e.clauses){const e=ee("compare",te("="),n,this._compileNode(t.operand)),a=this._compileNode(t.value);r.push(`${e} ? (${a}) :`)}return null!=e.else?r.push(this._compileNode(e.else)):r.push(te(null)),`(${n} = ${t}, ${r.join(" ")})`}_compileSearchedCase(e){const t=[];for(const n of e.clauses){const e=ee("makeBool",this._compileNode(n.operand)),r=this._compileNode(n.value);t.push(`${e} ? (${r}) :`)}return null!=e.else?t.push(this._compileNode(e.else)):t.push(te(null)),t.join(" ")}_compileInExpr(e,t){const n=new Set,r=[];for(const e of t.value)"number"===e.type||"string"===e.type?n.add(e.value):r.push(e);const a=this._compileNode(e),o=ee("ensureArray",this._compileNode({type:"expression-list",location:t.location,value:r}));if(n.size>0){const e=this._compileRefStaticData(this._storeStaticData(n)),t=this._generateTempVar();return r.length>0?`(${t} = ${a}, ${e}.has(${t}) || ${ee("applyIn",t,o)})`:`(${t} = ${a}, ${t} == null ? null : ${e}.has(${t}))`}return ee("applyIn",a,o)}_compileNode(e){switch(e.type){case"interval":return ee("makeSqlInterval",this._compileNode(e.value),"interval-qualifier"===e.qualifier.type?function({type:e,start:t,end:n}){return`{type: ${te(e)}, start: ${ne(t)}, end: ${ne(n)}}`}(e.qualifier):ne(e.qualifier),te(e.op));case"case-expression":return"simple"===e.format?this._compileSimpleCase(e):this._compileSearchedCase(e);case"parameter":return ee("lookup",te(e.value.toLowerCase()),ae);case"expression-list":return`[${e.value.map(e=>this._compileNode(e)).join(", ")}]`;case"unary-expression":return ee("ternaryNot",this._compileNode(e.expr));case"binary-expression":switch(e.operator){case"AND":return ee("ternaryAnd",this._compileNode(e.left),this._compileNode(e.right));case"OR":return ee("ternaryOr",this._compileNode(e.left),this._compileNode(e.right));case"IS":if("null"!==e.right.type)throw new i.L("UnsupportedIsRhs");return ee("equalsNull",this._compileNode(e.left));case"ISNOT":if("null"!==e.right.type)throw new i.L("UnsupportedIsRhs");return`!${ee("equalsNull",this._compileNode(e.left))}`;case"IN":return this._compileInExpr(e.left,e.right);case"NOT IN":return ee("ternaryNot",this._compileInExpr(e.left,e.right));case"BETWEEN":return ee("between",this._compileNode(e.left),this._compileNode(e.right));case"NOTBETWEEN":return ee("notbetween",this._compileNode(e.left),this._compileNode(e.right));case"LIKE":return ee("applyLike",this._compileNode(e.left),this._compileNode(e.right),te(e.escape));case"NOT LIKE":return ee("ternaryNot",ee("applyLike",this._compileNode(e.left),this._compileNode(e.right),te(e.escape)));case"<>":case"<":case">":case">=":case"<=":case"=":return ee("compare",te(e.operator),this._compileNode(e.left),this._compileNode(e.right));case"*":case"-":case"+":case"/":case"||":return ee("calculate",te(e.operator),this._compileNode(e.left),this._compileNode(e.right),ue);default:throw new i.L("UnsupportedOperator",{operator:e.operator})}case"null":case"boolean":case"string":case"number":return te(e.value);case"time":try{return this._compileRefStaticData(this._storeStaticData(D(e.value)))}catch{return ee("evaluateTime",te(e.value))}case"date":try{return this._compileRefStaticData(this._storeStaticData(M(e.value,"unknown")))}catch{return ee("evaluateDate",te(e.value),te("unknown"))}case"timestamp":try{return this._compileRefStaticData(this._storeStaticData(_(e.value,"unknown")))}catch{return ee("evaluateTimestamp",te(e.value),te("unknown"))}case"current-time":return"date"===e.mode?ee("currentDate",ue):"time"===e.mode?ee("currentTime",ue):ee("currentTimestamp",ue);case"current-user":return se;case"column-reference":return ee("featureValue",re,te(e.column),ie,oe);case"data-type":return function({type:e,size:t,withtimezone:n}){return JSON.stringify({type:e,size:t,withtimezone:n})}(e.value);case"function":return ee("evaluateFunction",te(e.name),this._compileNode(e.args),ue)}throw new i.L("UnsupportedSyntax",{node:e.type})}}class ce{static create(e,t={}){return new ce(e,t.fieldsIndex,t.timeZone??void 0,t.currentUser)}constructor(e,t,n="UTC",r=null){this.fieldsIndex=t,this.timeZone=n,this.currentUser=r,this.parameters={},this._compiledExecutor=null,this._hasDateFunctions=void 0,this.parseTree=B.parse(e);const{isStandardized:a,isAggregate:o,currentUserRequired:i,referencedFieldNames:u}=this._extractExpressionInfo(t);this._referencedFieldNames=u,this.isStandardized=a,this.isAggregate=o,this.currentUserRequired=i}static convertValueToStorageFormat(e,t=null){if(null===t)return(0,A.$P)(e)?e.getTime():E(e)?e.toMillis():C(e)?e.toStorageFormat():x(e)?e.toStorageString():S(e)?e.toStorageFormat():e;switch(t){case"date":return(0,A.$P)(e)?e.getTime():E(e)?e.toMillis():C(e)?e.toMilliseconds():S(e)?e.toNumber():e;case"date-only":return(0,A.$P)(e)?o.n.fromDateJS(e).toString():C(e)?o.n.fromSqlTimeStampOffset(e).toString():E(e)?o.n.fromDateTime(e).toString():e;case"time-only":return(0,A.$P)(e)?d.k.fromDateJS(e).toStorageString():E(e)?d.k.fromDateTime(e).toStorageString():C(e)?d.k.fromSqlTimeStampOffset(e).toStorageString():x(e)?e.toStorageString():e;case"timestamp-offset":if((0,A.$P)(e))return f.g.fromJSDate(e).toStorageFormat();if(E(e))return f.g.fromDateTime(e).toStorageFormat();if(C(e))return e.toStorageFormat()}return e}get fieldNames(){return this._referencedFieldNames}testSet(e,t=Ne,n=this.currentUser){return!!this._evaluateNode(this.parseTree,null,t,e,n)}calculateValue(e,t=Ne,n=this.currentUser){const r=this._evaluateNode(this.parseTree,e,t,null,n);return c.isInterval(r)?r.valueInMilliseconds()/864e5:r}tryGetCompiledExecutor(){if(null!=this._compiledExecutor)return this._compiledExecutor;if((0,r.A)("esri-csp-restrictions"))return null;const e=new le(this.parseTree);return this._compiledExecutor=e.compile(),this._compiledExecutor}calculateValueCompiled(e,t=Ne,n=this.currentUser){const r=this.tryGetCompiledExecutor();return null==r?this.calculateValue(e,t):r(e,this.parameters,t,this.fieldsIndex,this.timeZone,n??null)}testFeature(e,t=Ne,n=this.currentUser){return!!this._evaluateNode(this.parseTree,e,t,null,n)}testFeatureCompiled(e,t=Ne,n=this.currentUser){const r=this.tryGetCompiledExecutor();return null==r?this.testFeature(e,t):!!r(e,this.parameters,t,this.fieldsIndex,this.timeZone,n??null)}get hasDateFunctions(){return null!=this._hasDateFunctions||(this._hasDateFunctions=!1,G(this.parseTree,e=>{"current-time"===e.type?this._hasDateFunctions=!0:"function"===e.type&&(this._hasDateFunctions=this._hasDateFunctions||Q.has(e.name.toLowerCase()))})),this._hasDateFunctions}getFunctions(){const e=new Set;return G(this.parseTree,t=>{"function"===t.type&&e.add(t.name.toLowerCase())}),Array.from(e)}getExpressions(){const e=new Map;return G(this.parseTree,t=>{if("function"===t.type){const n=t.name.toLowerCase(),r=t.args.value[0];if("column-reference"===r.type){const t=r.column,a=`${n}-${t}`;e.has(a)||e.set(a,{aggregateType:n,field:t})}}}),[...e.values()]}getVariables(){const e=new Set;return G(this.parseTree,t=>{"parameter"===t.type&&e.add(t.value.toLowerCase())}),Array.from(e)}_extractExpressionInfo(e){const t=[],n=new Set;let r=!0,o=!1,i=!1;return G(this.parseTree,u=>{switch(u.type){case"column-reference":{const r=e?.get(u.column);let a,o;r?a=o=r.name??"":(o=u.column,a=o.toLowerCase()),n.has(a)||(n.add(a),t.push(o)),u.column=o;break}case"current-user":i=!0;break;case"function":{const{name:e,args:t}=u,n=t.value.length;r&&(r=function(e,t){const n=Z[e.toLowerCase()];return null!=n&&t>=n.minParams&&t<=n.maxParams}(e,n)),!1===o&&(o=(0,a.M)(e,n));break}}}),{referencedFieldNames:Array.from(t),isStandardized:r,isAggregate:o,currentUserRequired:i}}_evaluateNode(e,t,n,r,o){let u;switch(e.type){case"interval":{const a=this._evaluateNode(e.value,t,n,r,o);return c.createFromValueAndQualifier(a,e.qualifier,e.op)}case"case-expression":if("simple"===e.format){const a=this._evaluateNode(e.operand,t,n,r,o);for(let i=0;i<e.clauses.length;i++)if(k(a,this._evaluateNode(e.clauses[i].operand,t,n,r,o),"="))return this._evaluateNode(e.clauses[i].value,t,n,r,o);if(null!==e.else)return this._evaluateNode(e.else,t,n,r,o)}else{for(let a=0;a<e.clauses.length;a++)if(fe(this._evaluateNode(e.clauses[a].operand,t,n,r,o)))return this._evaluateNode(e.clauses[a].value,t,n,r,o);if(null!==e.else)return this._evaluateNode(e.else,t,n,r,o)}return null;case"parameter":return u=this.parameters[e.value.toLowerCase()],(0,A.$P)(u)?m.c9.fromJSDate(u):null!=u&&"object"==typeof u&&"toDateTime"in u?u.toDateTime():u;case"expression-list":{const a=[];for(const i of e.value)a.push(this._evaluateNode(i,t,n,r,o));return a}case"unary-expression":return pe(this._evaluateNode(e.expr,t,n,r,o));case"binary-expression":switch(e.operator){case"AND":return me(this._evaluateNode(e.left,t,n,r,o),this._evaluateNode(e.right,t,n,r,o));case"OR":return he(this._evaluateNode(e.left,t,n,r,o),this._evaluateNode(e.right,t,n,r,o));case"IS":if("null"!==e.right.type)throw new i.L("UnsupportedIsRhs");return null===this._evaluateNode(e.left,t,n,r,o);case"ISNOT":if("null"!==e.right.type)throw new i.L("UnsupportedIsRhs");return null!==this._evaluateNode(e.left,t,n,r,o);case"IN":{const a=de(this._evaluateNode(e.right,t,n,r,o));return we(this._evaluateNode(e.left,t,n,r,o),a)}case"NOT IN":{const a=de(this._evaluateNode(e.right,t,n,r,o));return pe(we(this._evaluateNode(e.left,t,n,r,o),a))}case"BETWEEN":{const a=this._evaluateNode(e.left,t,n,r,o),i=this._evaluateNode(e.right,t,n,r,o);return null==a||null==i[0]||null==i[1]?null:k(a,i[0],">=")&&k(a,i[1],"<=")}case"NOTBETWEEN":{const a=this._evaluateNode(e.left,t,n,r,o),i=this._evaluateNode(e.right,t,n,r,o);return null==a||null==i[0]||null==i[1]?null:k(a,i[0],"<")||k(a,i[1],">")}case"LIKE":return Le(this._evaluateNode(e.left,t,n,r,o),this._evaluateNode(e.right,t,n,r,o),e.escape);case"NOT LIKE":return pe(Le(this._evaluateNode(e.left,t,n,r,o),this._evaluateNode(e.right,t,n,r,o),e.escape));case"<>":case"<":case">":case">=":case"<=":case"=":return k(this._evaluateNode(e.left,t,n,r,o),this._evaluateNode(e.right,t,n,r,o),e.operator);case"-":case"+":case"*":case"/":case"||":return Y(e.operator,this._evaluateNode(e.left,t,n,r,o),this._evaluateNode(e.right,t,n,r,o),this.timeZone)}case"null":case"boolean":case"string":case"number":return e.value;case"date":return e.parsedValue??=M(e.value,"unknown"),e.parsedValue;case"timestamp":return e.parsedValue??=_(e.value,"unknown"),e.parsedValue;case"time":return D(e.value);case"current-time":return"date"===e.mode?Ie(this.timeZone):"time"===e.mode?ge(this.timeZone):ve(this.timeZone);case"current-user":return o??null;case"column-reference":return Te(t,e.column,this.fieldsIndex,n);case"data-type":return e.value;case"function":{if(this.isAggregate&&(0,a.M)(e.name,e.args.value.length)){const t=[];for(const a of e.args?.value||[]){const e=[];for(const t of r||[])e.push(this._evaluateNode(a,t,n,null,o));t.push(e)}return(0,a.s)(e.name,t)}const i=this._evaluateNode(e.args,t,n,r,o);return H(e.name,i,this.timeZone)}}throw new i.L("UnsupportedSyntax",{node:e.type})}}function fe(e){return!0===e}function de(e){return Array.isArray(e)?e:[e]}function pe(e){return null!==e?!0!==e:null}function me(e,t){return null!=e&&null!=t?!0===e&&!0===t:!1!==e&&!1!==t&&null}function he(e,t){return null!=e&&null!=t?!0===e||!0===t:!0===e||!0===t||null}function we(e,t){if(null==e)return null;let n=!1;for(const r of t)if(null==r)n=null;else{if(e===r){n=!0;break}if($(e)&&$(r)&&(n=k(e,r,"="),n))break}return n}function ve(e){return N(new Date,e)}function Ie(e){return o.n.fromNow(e)}function ge(e){const t=N(new Date,e);return d.k.fromDateTime(t)}const ye="-[]/{}()*+?.\\^$|";function Le(e,t,n){return null==e?null:function(e,t){const n=t;let r="",a=0;for(let t=0;t<e.length;t++){const o=e.charAt(t);switch(a){case 0:o===n?a=1:ye.includes(o)?r+="\\"+o:r+="%"===o?".*":"_"===o?".":o;break;case 1:ye.includes(o)?r+="\\"+o:r+=o,a=0}}return new RegExp("^"+r+"$","m")}(t,n).test(e)}function Te(e,t,n,r){if("getAttributeSQL"in r)return r.getAttributeSQL(e,t);const a=r.getAttribute(e,t);if(null==a)return a;const i=n?.get(t);switch(i?.type){case"esriFieldTypeDate":case"date":return N(new Date(a),n?.getLuxonTimeZone(i.name)??m.mQ.utcInstance);case"esriFieldTypeDateOnly":case"date-only":return o.n.fromReader(a);case"esriFieldTypeTimeOnly":case"time-only":return d.k.fromReader(a);case"esriFieldTypeTimestampOffset":case"timestamp-offset":return new f.g(a)}return a}const Ne={getAttribute:(e,t)=>(function(e){return e&&"object"==typeof e.attributes}(e)?e.attributes:e)[t]}}}]);