@arcgis/core 4.34.0-next.85 → 4.34.0-next.87
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.
- package/Basemap.js +1 -1
- package/Ground.js +1 -1
- package/Map.js +1 -1
- package/analysis/ElevationProfile/ElevationProfileLineGround.d.ts +4 -0
- package/analysis/ElevationProfile/{ElevationProfileGroundLine.js → ElevationProfileLineGround.js} +1 -1
- package/analysis/ElevationProfile/ElevationProfileLineInput.d.ts +4 -0
- package/analysis/ElevationProfile/{ElevationProfileInputLine.js → ElevationProfileLineInput.js} +1 -1
- package/analysis/ElevationProfile/ElevationProfileLineQuery.d.ts +4 -0
- package/analysis/ElevationProfile/{ElevationProfileQueryLine.js → ElevationProfileLineQuery.js} +1 -1
- package/analysis/ElevationProfile/ElevationProfileLineScene.d.ts +4 -0
- package/analysis/ElevationProfile/{ElevationProfileSceneLine.js → ElevationProfileLineScene.js} +1 -1
- package/analysis/ElevationProfile/elevationProfileLineTypes.js +1 -1
- package/analysis/ElevationProfileAnalysis.js +1 -1
- package/arcade/functions/measures.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0074f1836d7ff69ff6ec.js +1 -0
- package/assets/esri/core/workers/chunks/03ef19f0753d68770444.js +1 -0
- package/assets/esri/core/workers/chunks/06c389283ee5b60573f2.js +1 -0
- package/assets/esri/core/workers/chunks/09c2004126f4a5242b85.js +1 -0
- package/assets/esri/core/workers/chunks/0b679d5a1bfdbd006d6e.js +1 -0
- package/assets/esri/core/workers/chunks/0f05425954578ac796ec.js +1 -0
- package/assets/esri/core/workers/chunks/109149c378aa4c5f8526.js +1 -0
- package/assets/esri/core/workers/chunks/143503f6eb270c4683f8.js +1 -0
- package/assets/esri/core/workers/chunks/177840d5f0076c0de46b.js +316 -0
- package/assets/esri/core/workers/chunks/1c1b0cc91fe9cb3fec61.js +1 -0
- package/assets/esri/core/workers/chunks/{9eb1bfcb9b05f2a36748.js → 1f2d13466c60a6b57717.js} +1 -1
- package/assets/esri/core/workers/chunks/1fc6311d4f0d27e88737.js +1 -0
- package/assets/esri/core/workers/chunks/257fd65786feb5951b90.js +1 -0
- package/assets/esri/core/workers/chunks/{7a23b127f551bf13ef54.js → 268f5b233640a9dbbf89.js} +2 -2
- package/assets/esri/core/workers/chunks/2896ada406074f754b00.js +1 -0
- package/assets/esri/core/workers/chunks/28d30be414e59eabd963.js +1 -0
- package/assets/esri/core/workers/chunks/29471e0b3f7296dee096.js +1 -0
- package/assets/esri/core/workers/chunks/{3192b68675ff2afcb1d6.js → 2d3ae187f8aa3495d4ae.js} +1 -1
- package/assets/esri/core/workers/chunks/2dc88379ee94fabdaf52.js +1 -0
- package/assets/esri/core/workers/chunks/336b54144afec0c7d396.js +2 -0
- package/assets/esri/core/workers/chunks/366db86914a63e6d0c68.js +1 -0
- package/assets/esri/core/workers/chunks/{d66cdb9bb494da19696b.js → 47e4f66c33bb697fbe6b.js} +2 -2
- package/assets/esri/core/workers/chunks/481c2b01e2fe92249698.js +1 -0
- package/assets/esri/core/workers/chunks/4840bd93d8fe15c7aefd.js +1 -0
- package/assets/esri/core/workers/chunks/4d4db6854aff7656f6e1.js +1 -0
- package/assets/esri/core/workers/chunks/5c585b338a9e9aa0e205.js +1 -0
- package/assets/esri/core/workers/chunks/639d856cd217914dfe1f.js +1 -0
- package/assets/esri/core/workers/chunks/68f5a2d2666636c3f807.js +1 -0
- package/assets/esri/core/workers/chunks/7540b34e743a23e67729.js +1 -0
- package/assets/esri/core/workers/chunks/7be11a3ef1f49245089f.js +1 -0
- package/assets/esri/core/workers/chunks/819a8bc1f0a694017ee6.js +1 -0
- package/assets/esri/core/workers/chunks/{afb76f9d6abedef771df.js → 8380a092ffc8e92ede7a.js} +1 -1
- package/assets/esri/core/workers/chunks/8d63b42aea32ce2e5d09.js +1 -0
- package/assets/esri/core/workers/chunks/8de11aab65d91e7f1a4d.js +1 -0
- package/assets/esri/core/workers/chunks/9386a0ebff78b6303ed2.js +1 -0
- package/assets/esri/core/workers/chunks/{4d47187bc0821413492d.js → 95bae3c275f1483eb7ed.js} +1 -1
- package/assets/esri/core/workers/chunks/{f8f85207b382c1ea038c.js → 97489bf16a1d327992b2.js} +3 -3
- package/assets/esri/core/workers/chunks/a2652d10bb0bc41c9a8d.js +1 -0
- package/assets/esri/core/workers/chunks/a845c68e76382a73da5e.js +1 -0
- package/assets/esri/core/workers/chunks/{9c64b78c5c9b35b31d98.js → aa78b69219d9a0ef1c54.js} +2 -2
- package/assets/esri/core/workers/chunks/b09b34f64a6bc2b49e0a.js +1 -0
- package/assets/esri/core/workers/chunks/b0a03b6edbcf6e933431.js +1 -0
- package/assets/esri/core/workers/chunks/{1859a11df9f579b993d7.js → b2fbb44e219232e61cbd.js} +1 -1
- package/assets/esri/core/workers/chunks/b4349db7155673329432.js +1 -0
- package/assets/esri/core/workers/chunks/b8997ae5893afa0298d1.js +1 -0
- package/assets/esri/core/workers/chunks/c0ae186620b68d43b338.js +1 -0
- package/assets/esri/core/workers/chunks/{d153b29c542c37ae1636.js → c50e8d5f554cf151865c.js} +2 -2
- package/assets/esri/core/workers/chunks/c5cc0fc652432a9264cc.js +1 -0
- package/assets/esri/core/workers/chunks/c6cae8471c5d4ae40c65.js +1 -0
- package/assets/esri/core/workers/chunks/cab2a1382bdd32bb34d8.js +1 -0
- package/assets/esri/core/workers/chunks/ce937ff0dd1147ea297e.js +1 -0
- package/assets/esri/core/workers/chunks/d142a42755a78bb157ed.js +1 -0
- package/assets/esri/core/workers/chunks/{280af3640f8e93c1024e.js → d6e0528eacee7ea4c1ce.js} +2 -2
- package/assets/esri/core/workers/chunks/d9d86cf0500fa29d1d43.js +1 -0
- package/assets/esri/core/workers/chunks/db5a985ccc6b7d0ad855.js +1 -0
- package/assets/esri/core/workers/chunks/f3ee035fa7bf638c8e60.js +1 -0
- package/assets/esri/core/workers/chunks/{b15ff6c9ef2de8a49853.js → f651c05604eab83aef5f.js} +2 -2
- package/assets/esri/core/workers/chunks/{ed773dab5965e42a2879.js → f6e18668f728dfd8ba5e.js} +2 -2
- package/assets/esri/core/workers/chunks/fc5ac54aab66562c8463.js +1 -0
- package/assets/esri/core/workers/chunks/ff8e2f998169ca3a7a68.js +1 -0
- package/assets/esri/libs/dracoMeshDecoder/draco_mesh_decoder.wasm +0 -0
- package/assets/esri/libs/i3s/i3s.wasm +0 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis.json +1 -0
- package/assets/esri/widgets/Editor/t9n/Editor.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_en.json +1 -1
- package/chunks/CloudsComposition.glsl.js +2 -2
- package/chunks/HUDMaterial.glsl.js +49 -50
- package/chunks/LineMarker.glsl.js +34 -34
- package/chunks/PointRenderer.glsl.js +4 -4
- package/chunks/ShadowHighlight.glsl.js +3 -3
- package/chunks/draco_mesh_decoder.js +1 -1
- package/config.js +1 -1
- package/core/NestedMap.js +1 -1
- package/core/iteratorUtils.js +1 -1
- package/editing/geometry/lineUtils.js +1 -1
- package/identity/IdentityManagerBase.js +1 -1
- package/interfaces.d.ts +188 -134
- package/kernel.js +1 -1
- package/layers/GaussianSplatLayer.js +1 -1
- package/layers/IntegratedMesh3DTilesLayer.js +1 -1
- package/layers/IntegratedMeshLayer.js +1 -1
- package/layers/ParquetLayer.js +1 -1
- package/layers/SceneLayer.js +1 -1
- package/layers/VectorTileLayer.js +1 -1
- package/layers/graphics/sources/ParquetSource.js +1 -1
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
- package/layers/knowledgeGraph/cypherUtils.js +1 -1
- package/layers/support/FieldConfiguration.js +1 -1
- package/layers/support/fieldConfigUtils.js +1 -1
- package/layers/support/layerUtils.js +1 -1
- package/layers/support/vectorTileLayerLoader.js +1 -1
- package/package.json +5 -5
- package/portal/schemas/definitions.js +1 -1
- package/support/basemapEnsureType.js +1 -1
- package/support/revision.js +1 -1
- package/support/userTypeGuards/isBasemap.js +5 -0
- package/symbols/support/previewSymbol2D.js +1 -1
- package/views/2d/analysis/ElevationProfileAnalysisView2D.js +1 -1
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
- package/views/2d/layers/features/Processor.js +1 -1
- package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/StreamLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/featureServiceUtils.js +1 -1
- package/views/2d/layers/features/schema/SourceSchema.js +1 -1
- package/views/2d/layers/features/sources/FeatureSource.js +1 -1
- package/views/2d/layers/features/sources/FeatureSourceQueryInfo.js +1 -1
- package/views/2d/layers/features/sources/strategies/AFeatureLoadStrategy.js +5 -0
- package/views/2d/layers/features/sources/strategies/AFeatureTileLoadStrategy.js +5 -0
- package/views/2d/layers/features/sources/strategies/ALoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/FeatureDrillDownTileLoadStrategy.js +5 -0
- package/views/2d/layers/features/sources/strategies/FeaturePagedTileLoadStrategy.js +5 -0
- package/views/2d/layers/features/sources/strategies/FeatureSnapshotLoadStrategy.js +5 -0
- package/views/2d/layers/features/sources/strategies/ParquetSnapshotLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/ParquetTileLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/StreamLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/FeatureSnapshotSourceChunk.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/SourceChunkStore.js +1 -1
- package/views/2d/layers/features/sources/strategies/support/queryAdapters.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderParquet.js +1 -1
- package/views/3d/FocusAreasView.js +1 -1
- package/views/3d/GroundView3D.js +5 -0
- package/views/3d/analysis/ElevationProfile/{ElevationProfileSceneLineComputation.js → ElevationProfileLineSceneComputation.js} +1 -1
- package/views/3d/analysis/ElevationProfileAnalysisView3D.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementConfiguration.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
- package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
- package/views/3d/environment/CloudsComposition.glsl.js +1 -1
- package/views/3d/glTF/internal/Resource.js +1 -1
- package/views/3d/interactive/SnappingVisualizer3D.js +1 -1
- package/views/3d/interactive/visualElements/DrapedVisualElementResources.js +1 -1
- package/views/3d/interactive/visualElements/LabelVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
- package/views/3d/layers/DrapedSubView3D.js +1 -1
- package/views/3d/layers/FlowSubView3D.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
- package/views/3d/layers/MediaLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
- package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
- package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
- package/views/3d/support/MemoryController.js +1 -1
- package/views/3d/support/engineContent/marker.js +1 -1
- package/views/3d/support/engineContent/sdfPrimitives.js +1 -1
- package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
- package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
- package/views/3d/support/popupHitTest.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +11 -11
- package/views/3d/webgl-engine/lib/BasisUtil.js +1 -1
- package/views/3d/webgl-engine/lib/Texture.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/InstancedCommandVAO.js +5 -0
- package/views/3d/webgl-engine/materials/renderers/InstancedCommandVAOs.js +5 -0
- package/views/3d/webgl-engine/materials/renderers/PerBufferData.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/PerOriginData.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/VaoRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/shaders/AnimatedLine.glsl.js +14 -9
- package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarker.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/PointRenderer.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowHighlight.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/LineOffset.glsl.js +8 -8
- package/views/BasemapView.js +1 -1
- package/views/GroundView.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/View.js +1 -1
- package/views/View2D.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileChart.js +1 -1
- package/views/analysis/ElevationProfile/{ElevationProfileGroundLineComputation.js → ElevationProfileLineGroundComputation.js} +1 -1
- package/views/analysis/ElevationProfile/{ElevationProfileInputLineComputation.js → ElevationProfileLineInputComputation.js} +1 -1
- package/views/analysis/ElevationProfile/{ElevationProfileQueryLineComputation.js → ElevationProfileLineQueryComputation.js} +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileTool.js +1 -1
- package/views/support/LayerViewManager.js +1 -1
- package/views/webgl/RenderbufferDescriptor.js +1 -1
- package/views/webgl/TextureDescriptor.js +1 -1
- package/views/webgl/Util.js +1 -1
- package/views/webgl/VertexArrayObject.js +1 -1
- package/webscene/Slide.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
- package/widgets/Editor/Upload.js +1 -1
- package/widgets/Editor/components/Notices.js +1 -1
- package/widgets/Editor/modelUploadUtils.js +1 -1
- package/widgets/Editor/support/SketchController.js +1 -1
- package/widgets/Editor/support/splitFeatureUtils.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/ElevationProfile/ElevationProfileLineGround.d.ts +2 -2
- package/widgets/ElevationProfile/ElevationProfileLineInput.d.ts +2 -2
- package/widgets/ElevationProfile/ElevationProfileLineQuery.d.ts +2 -2
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/Sketch/adapters/layer/GraphicsLayerAdapter.js +5 -0
- package/widgets/Sketch/adapters/layer/MapNotesLayerAdapter.js +5 -0
- package/analysis/ElevationProfile/ElevationProfileGroundLine.d.ts +0 -4
- package/analysis/ElevationProfile/ElevationProfileInputLine.d.ts +0 -4
- package/analysis/ElevationProfile/ElevationProfileQueryLine.d.ts +0 -4
- package/analysis/ElevationProfile/ElevationProfileSceneLine.d.ts +0 -4
- package/assets/esri/core/workers/chunks/03e5d1a00d85e4d16bff.js +0 -1
- package/assets/esri/core/workers/chunks/0914a52fb33af5d77fab.js +0 -1
- package/assets/esri/core/workers/chunks/1d491447b13f2f2b4399.js +0 -1
- package/assets/esri/core/workers/chunks/20850b0fdb55fb17bc90.js +0 -1
- package/assets/esri/core/workers/chunks/25ea02dd7d45a90cbb3b.js +0 -1
- package/assets/esri/core/workers/chunks/264a9a916e1e972b69d7.js +0 -1
- package/assets/esri/core/workers/chunks/30c85a1a4f118cc45a25.js +0 -1
- package/assets/esri/core/workers/chunks/3ef8a7468d7e3b2f0b69.js +0 -351
- package/assets/esri/core/workers/chunks/486ea51306c619238e41.js +0 -1
- package/assets/esri/core/workers/chunks/49cb78c85de0102e5f02.js +0 -1
- package/assets/esri/core/workers/chunks/5610dfde4e636e2333a9.js +0 -1
- package/assets/esri/core/workers/chunks/5c1cdc2ec06c4c6bd0b3.js +0 -1
- package/assets/esri/core/workers/chunks/609abf071c4ea24955c2.js +0 -1
- package/assets/esri/core/workers/chunks/71c2a8e5a17803d3e949.js +0 -1
- package/assets/esri/core/workers/chunks/7402c2853f6aed8d1bc7.js +0 -1
- package/assets/esri/core/workers/chunks/7889a909394c61a9d3e0.js +0 -1
- package/assets/esri/core/workers/chunks/79a9f47dfa9ebabb5dbd.js +0 -1
- package/assets/esri/core/workers/chunks/86378d4f4d7f9a370c22.js +0 -1
- package/assets/esri/core/workers/chunks/99ac292a858bbedc6a89.js +0 -1
- package/assets/esri/core/workers/chunks/9a6fa91dd204f64d2590.js +0 -1
- package/assets/esri/core/workers/chunks/9cdeead9d444e8d95477.js +0 -1
- package/assets/esri/core/workers/chunks/aa1eb7b4d9ccda725da5.js +0 -1
- package/assets/esri/core/workers/chunks/b19d723d09f5bea9ca27.js +0 -1
- package/assets/esri/core/workers/chunks/b4a053063e6022080d31.js +0 -1
- package/assets/esri/core/workers/chunks/b4b26cc2ba3ff30e1d03.js +0 -1
- package/assets/esri/core/workers/chunks/b78ea9cc4d5f2fd3d871.js +0 -1
- package/assets/esri/core/workers/chunks/bbb585f0b484ab5eabb3.js +0 -1
- package/assets/esri/core/workers/chunks/bd4125d163f372a7e978.js +0 -1
- package/assets/esri/core/workers/chunks/c2bc70b65f5c2a2c9671.js +0 -1
- package/assets/esri/core/workers/chunks/cd1869e183001266c4c1.js +0 -2
- package/assets/esri/core/workers/chunks/d0a149050f7f1c1ada09.js +0 -1
- package/assets/esri/core/workers/chunks/d2fe403d6ab237bc89c2.js +0 -1
- package/assets/esri/core/workers/chunks/d51e8eeb1e1eb0605cc9.js +0 -1
- package/assets/esri/core/workers/chunks/da42cc4f6142846cb745.js +0 -1
- package/assets/esri/core/workers/chunks/dd84f630466a26722d57.js +0 -1
- package/assets/esri/core/workers/chunks/e080628ac6e1cf25dc72.js +0 -1
- package/assets/esri/core/workers/chunks/e17df11c98dbd869302b.js +0 -1
- package/assets/esri/core/workers/chunks/e1b3ae6426886e2fab07.js +0 -1
- package/assets/esri/core/workers/chunks/e8e0f73fb94e63e2abc3.js +0 -1
- package/assets/esri/core/workers/chunks/f45c343527709f6f91c2.js +0 -1
- package/assets/esri/core/workers/chunks/f6513ec888a7d927d948.js +0 -1
- package/assets/esri/core/workers/chunks/fcac475e4e82911b3126.js +0 -1
- package/views/2d/layers/features/sources/strategies/AFetchLoadStrategy.js +0 -5
- package/views/2d/layers/features/sources/strategies/ATileLoadStrategy.js +0 -5
- package/views/2d/layers/features/sources/strategies/DrillDownTileLoadStrategy.js +0 -5
- package/views/2d/layers/features/sources/strategies/PagedTileLoadStrategy.js +0 -5
- package/views/2d/layers/features/sources/strategies/SnapshotLoadStrategy.js +0 -5
- /package/assets/esri/core/workers/chunks/{7a23b127f551bf13ef54.js.LICENSE.txt → 268f5b233640a9dbbf89.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{cd1869e183001266c4c1.js.LICENSE.txt → 336b54144afec0c7d396.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{280af3640f8e93c1024e.js.LICENSE.txt → 47e4f66c33bb697fbe6b.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{9c64b78c5c9b35b31d98.js.LICENSE.txt → aa78b69219d9a0ef1c54.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{d153b29c542c37ae1636.js.LICENSE.txt → c50e8d5f554cf151865c.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{b15ff6c9ef2de8a49853.js.LICENSE.txt → d6e0528eacee7ea4c1ce.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{d66cdb9bb494da19696b.js.LICENSE.txt → f651c05604eab83aef5f.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{ed773dab5965e42a2879.js.LICENSE.txt → f6e18668f728dfd8ba5e.js.LICENSE.txt} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! For license information please see
|
|
2
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1436],{4643:(t,e,n)=>{n.d(e,{c:()=>o});var s=n(46337);function o(t,e,n){if(s.S$)return;const o=function(t){class e extends window.MutationObserver{constructor(t){super(t),this.observedEntry=[],this.callback=t}observe(t,e){return this.observedEntry.push({target:t,options:e}),super.observe(t,e)}unobserve(t){const e=this.observedEntry.filter(e=>e.target!==t);this.observedEntry=[],this.callback(super.takeRecords(),this),this.disconnect(),e.forEach(t=>this.observe(t.target,t.options))}}return"intersection"===t?window.IntersectionObserver:"mutation"===t?e:window.ResizeObserver}(t);return new o(e,n)}},20307:(t,e,n)=>{n.d(e,{u:()=>r});var s=n(50941),o=n(83623),i=n(79e3);const r=()=>(0,s.aK)((t,e)=>{let n;function s(){n?.abort()}return e.onLoad(()=>{t.listen("focus",()=>{n=new AbortController,t.el.addEventListener("focusout",s,{signal:n.signal})})}),e.onDisconnected(()=>{t.el.removeEventListener("focusout",s)}),async(e,r)=>{if(t.disabled)return;const a=function(t){if(t)return function(t){return"target"in t&&("includeContainer"in t||"strategy"in t)}(t)?t:{target:t}}(e());if(!a)return;const{target:c,includeContainer:l,strategy:h}=a,u=(0,i.k)(t.el),p=u.activeElement;return await(0,o.c)(t),p!==u.activeElement||n&&!n?.signal.aborted?void 0:(t.el.removeEventListener("focus",s),(0,i.b)(c,l,h,t.el,r))}})},32239:(t,e,n)=>{var s=n(34088),o=n(46337),i=n(
|
|
1
|
+
/*! For license information please see f6e18668f728dfd8ba5e.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1436],{4643:(t,e,n)=>{n.d(e,{c:()=>o});var s=n(46337);function o(t,e,n){if(s.S$)return;const o=function(t){class e extends window.MutationObserver{constructor(t){super(t),this.observedEntry=[],this.callback=t}observe(t,e){return this.observedEntry.push({target:t,options:e}),super.observe(t,e)}unobserve(t){const e=this.observedEntry.filter(e=>e.target!==t);this.observedEntry=[],this.callback(super.takeRecords(),this),this.disconnect(),e.forEach(t=>this.observe(t.target,t.options))}}return"intersection"===t?window.IntersectionObserver:"mutation"===t?e:window.ResizeObserver}(t);return new o(e,n)}},20307:(t,e,n)=>{n.d(e,{u:()=>r});var s=n(50941),o=n(83623),i=n(79e3);const r=()=>(0,s.aK)((t,e)=>{let n;function s(){n?.abort()}return e.onLoad(()=>{t.listen("focus",()=>{n=new AbortController,t.el.addEventListener("focusout",s,{signal:n.signal})})}),e.onDisconnected(()=>{t.el.removeEventListener("focusout",s)}),async(e,r)=>{if(t.disabled)return;const a=function(t){if(t)return function(t){return"target"in t&&("includeContainer"in t||"strategy"in t)}(t)?t:{target:t}}(e());if(!a)return;const{target:c,includeContainer:l,strategy:h}=a,u=(0,i.k)(t.el),p=u.activeElement;return await(0,o.c)(t),p!==u.activeElement||n&&!n?.signal.aborted?void 0:(t.el.removeEventListener("focus",s),(0,i.b)(c,l,h,t.el,r))}})},32239:(t,e,n)=>{var s=n(34088),o=n(46337),i=n(41557),r=n(79e3),a=n(4643),c=n(84137);const l="flip-rtl",h="svg",u={},p={},d={s:16,m:24,l:32};function b({icon:t,scale:e}){const n=d[e],s=function(t){const e=!isNaN(Number(t.charAt(0))),n=t.split("-");if(n.length>0){const e=/[a-z]/i;t=n.map((t,n)=>t.replace(e,function(t,e){return 0===n&&0===e?t:t.toUpperCase()})).join("")}return e?`i${t}`:t}(t),o="F"===s.charAt(s.length-1);return`${o?s.substring(0,s.length-1):s}${n}${o?"F":""}`}function f(t){return u[t]}const v=o.AH`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{display:inline-flex;color:var(--calcite-icon-color, var(--calcite-ui-icon-color, currentColor))}:host([scale=s]){inline-size:16px;block-size:16px;min-inline-size:16px;min-block-size:16px}:host([scale=m]){inline-size:24px;block-size:24px;min-inline-size:24px;min-block-size:24px}:host([scale=l]){inline-size:32px;block-size:32px;min-inline-size:32px;min-block-size:32px}.flip-rtl{transform:scaleX(-1)}.svg{display:block}:host([hidden]){display:none}[hidden]{display:none}`;class g extends i.WF{constructor(){super(...arguments),this.visible=!1,this.flipRtl=!1,this.icon=null,this.preload=!1,this.scale="m"}static{this.properties={pathData:[16,{},{state:!0}],visible:[16,{},{state:!0}],flipRtl:[7,{},{reflect:!0,type:Boolean}],icon:[3,{},{reflect:!0}],preload:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],textLabel:1}}static{this.styles=v}connectedCallback(){if(super.connectedCallback(),this.preload)return this.visible=!0,void this.loadIconPathData();this.visible||this.waitUntilVisible(()=>{this.visible=!0,this.loadIconPathData()})}willUpdate(t){(t.has("icon")&&(this.hasUpdated||null!==this.icon)||t.has("scale")&&(this.hasUpdated||"m"!==this.scale))&&this.loadIconPathData()}disconnectedCallback(){super.disconnectedCallback(),this.intersectionObserver?.disconnect(),this.intersectionObserver=null}async loadIconPathData(){const{icon:t,scale:e,visible:n}=this;if(o.S$||!t||!n)return;const i={icon:t,scale:e},r=f(b(i))||await async function(t){const e=b(t),n=f(e);if(n)return n;p[e]||(p[e]=fetch((0,s.g)(`./assets/icon/${e}.json`)).then(t=>t.json()).catch(()=>(c.l.error(`${t.icon} (${t.scale}) icon failed to load`),"")));const o=await p[e];return u[e]=o,o}(i);t===this.icon&&(this.pathData=r)}waitUntilVisible(t){this.intersectionObserver=(0,a.c)("intersection",e=>{e.forEach(e=>{e.isIntersecting&&(this.intersectionObserver.disconnect(),this.intersectionObserver=null,t())})},{rootMargin:"50px"}),this.intersectionObserver?this.intersectionObserver.observe(this.el):t()}render(){const{el:t,flipRtl:e,pathData:n,scale:s,textLabel:a}=this,c=(0,r.g)(t),u=d[s],p=!!a,b=[].concat(n||"");return this.el.ariaHidden=(0,r.t)(!p),this.el.ariaLabel=p?a:null,this.el.role=p?"img":null,o.qy`<svg aria-hidden=true class=${(0,i.CP)({[l]:"rtl"===c&&e,[h]:!0})} fill=currentColor height=100% viewBox=${`0 0 ${u} ${u}`} width=100% xmlns=http://www.w3.org/2000/svg>${b.map(t=>"string"==typeof t?o.JW`<path d=${t??o.s6} />`:o.JW`<path d=${t.d??o.s6} opacity=${("opacity"in t?t.opacity:1)??o.s6} />`)}</svg>`}}(0,s.c)("calcite-icon",g)},50941:(t,e,n)=>{n.d(e,{aK:()=>f,yr:()=>y,oW:()=>w});var s=n(55333),o=n(94667);var i=n(46337),r=n(20150);const a="ar,bg,bs,ca,cs,da,de,el,en,es,et,fi,fr,he,hr,hu,id,it,ja,ko,lt,lv,nl,nb,no,pl,pt-BR,pt-PT,ro,ru,sk,sl,sr,sv,th,tr,uk,vi,zh-CN,zh-HK,zh-TW".split(","),c=new Set(a),l="en",h={pt:"pt-PT",nb:"no",nn:"no",zh:"zh-CN"},u={},p=async(t,e)=>{const n=`${e}${t}.json`;try{const t=await fetch(n);if(t.ok)return await t.json()}catch(t){return console.error(t),{}}return t===l?{}:await p(l,e)},d=t=>{const e=(0,r.Zj)(t,"lang",globalThis.navigator?.language||l);return{lang:e,t9nLocale:b(e)}},b=t=>{const[e,n]=t.split("-"),s=e.toLowerCase();let o=s;return n&&(o=`${s}-${n.toUpperCase()}`),o=h[o]??o,c.has(o)?o:n?b(s):l},f=t=>e=>g(e,t);class v extends s.C{constructor(t,e){super(t);const n=this.exports;try{(0,o.s)(this.component);const t=e(this.component,this),s=this.exports!==n;if((0,o.i)(t)){s||this.setProvisionalExports(t);const e=t.then(t=>{this.exports=t,super.catchUpLifecycle()}).catch(t=>{this.P.reject(t),console.error(t)});this.onLoad(async()=>await e)}else s&&void 0===t||(this.exports=t),queueMicrotask(()=>super.catchUpLifecycle())}catch(t){this.P.reject(t),console.error(t)}}catchUpLifecycle(){}}const g=(m=v,(...t)=>{const e=(0,o.d)(),n=new m(...t),i=n.exports;(0,o.b)(e.at(-1));const r=n.component.manager;r.W(n,i),n.watchExports(r.W.bind(r,n)),(0,o.j)(n);const a=[n.component,...e].reverse();return(0,s.t)(a,t=>void 0===t?void 0:((t,{host:e,key:n,isReactive:s},i)=>{const r=e,a=r[n]!==t.exports,c=r[n]!==i,l=i!==t.exports;if(a&&!c&&l&&(r[n]=t.exports),e===t.component){if(s){const e=t.component.manager;c&&e.W(t,r[n]),t.onUpdate(s=>{if(s.has(n)){const s=r[n];s!==t.exports&&e.W(t,s)}})}t.O=s?void 0:n}const h=t.component.constructor.elementProperties.get(n)?.readOnly;t.watchExports(()=>{r[n]!==t.exports&&(h?(0,o.f)(()=>{r[n]=t.exports}):r[n]=t.exports)})})(n,t,i),i)});var m;const w=(t,e)=>new x(t,e);class x extends s.C{#t;#e;#n;constructor(t,e){super(),i.S$||(this.#e=t,this.#n=e,this.#t=new MutationObserver(n=>{n.forEach(n=>{t.includes(n.attributeName)&&e.call(this.component,this.component.el.getAttribute(n.attributeName),n.oldValue,n.attributeName)})}))}hostConnected(){this.#e.forEach(t=>{this.component.el.hasAttribute(t)&&this.#n.call(this.component,null,this.component.el.getAttribute(t),t)}),this.#t.observe(this.component.el,{attributes:!0,attributeOldValue:!0,attributeFilter:this.#e})}hostDisconnected(){this.#t.disconnect()}}const y=t=>(e={})=>g(void 0,(n,s)=>{const o=d(n.el),i={_lang:o.lang,_t9nLocale:o.t9nLocale,_loading:!0},a=n;s.onLifecycle(()=>((e,o,i,l)=>{let h;const b=()=>(async(t,e,n=t.localName.split("-").slice(1).join("-"))=>{const{lang:s,t9nLocale:o}=d(t),i=`${e}/${n}/t9n`,r=null===n?{}:await(async(t,e,n="")=>{const s=`${e}/${n}`,o=`${s}${t}.json`;return u[o]??(u[o]=p(t,s)),await u[o]})(o,i,"messages.");return{lang:s,t9nLocale:o,t9nStrings:r}})(e,t("./assets"),l).then(t=>{h?.lang===t.lang&&h.t9nLocale===t.t9nLocale&&h.t9nStrings===t.t9nStrings||(({t9nLocale:t,t9nStrings:e,lang:o})=>{const i={...e,_lang:o,_t9nLocale:t,_loading:!1};s.exports=i;const r=e.componentLabel;"string"==typeof r&&"label"in n&&null==n.label&&(n.label??=r),c(a.messageOverrides)})(t),h=t}).catch(console.error);return queueMicrotask(b),(0,r.Yt)(e,["lang"],b)})(n.el,0,0,e.name));const c=t=>{const e=s.exports,n=e._original??e,o=$(n,t);t&&(o._original=n),s.exports=o};return"messageOverrides"in a&&s.onUpdate(t=>{t.has("messageOverrides")&&c(a.messageOverrides)}),e.blocking?(s.setProvisionalExports(i,!1),s.ready):i}),$=(t,e)=>{if(!e)return t;const n={...t};return Object.entries(e).forEach(([e,s])=>{n[e]="object"==typeof s?$(t[e],s):s??t[e]}),n}},75572:(t,e,n)=>{n.d(e,{u:()=>i});var s=n(50941),o=n(34088);const i=(0,s.yr)(o.g)},83623:(t,e,n)=>{function s(t){return"l"===t?"m":"s"}async function o(t){await t.componentOnReady(),await t.updateComplete}n.d(e,{c:()=>o,g:()=>s}),n(84137)},84137:(t,e,n)=>{n.d(e,{l:()=>c});var s=n(34088);const o=new Set,i={trace:0,debug:1,info:2,warn:4,error:8,off:10};function r(t,...e){(function(t){return i[t]>=i[s.l]})(t)&&console[t].call(this,"%ccalcite","background: #007AC2; color: #fff; border-radius: 4px; padding: 2px 4px;",...e)}let a;const c={debug:t=>r("debug",t),info:t=>r("info",t),warn:t=>r("warn",t),error:t=>r("error",t),trace:t=>r("trace",t),deprecated:function(t,{component:e,name:n,suggested:s,removalVersion:i}){const c=`${t}:${"component"===t?"":e}${n}`;if(o.has(c))return;o.add(c);const l=Array.isArray(s);l&&!a&&(a=new Intl.ListFormat("en",{style:"long",type:"disjunction"})),r("warn",`[${n}] ${t} is deprecated and will be removed in ${"future"===i?"a future version":`v${i}`}.${s?` Use ${l?a.format(s.map(t=>`"${t}"`)):`"${s}"`} instead.`:""}`)}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8766],{4197:(e,t,r)=>{r.d(t,{Vj:()=>u,cj:()=>a,jh:()=>s,l5:()=>l,xm:()=>o});var n=r(34275),i=r(9093);function s(e){return e<=n.y9?new Array(e).fill(0):new Float64Array(e)}function o(e){return((0,n.iu)(e)?e.byteLength/8:e.length)<=n.y9?Array.from(e):new Float64Array(e)}function l(e,t,r){return Array.isArray(e)?e.slice(t,t+r):e.subarray(t,t+r)}function a(e){return[...e]}function u(e){const t=(0,i.vt)();for(let r=0;r<16;++r)t[r]=e[r];return t}},6455:(e,t,r)=>{r.d(t,{FJ:()=>v,Dp:()=>w,KV:()=>b});var n=r(31635),i=r(93637),s=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),l=r(89317),a=r(69540),u=r(7762),p=r(25482),c=r(43937),d=r(83960),h=r(13069);const f={write:{overridePolicy:(e,t,r)=>({enabled:!r||"scale"===r.filterMode})}};let y=class extends((0,a.OU)(p.o)){constructor(e){super(e),this.id=(0,h.lk)(),this.maxScale=0,this.minScale=0,this.title="",this.where=null}};(0,n.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],y.prototype,"id",void 0),(0,n.Cg)([(0,s.MZ)({type:Number,json:f})],y.prototype,"maxScale",void 0),(0,n.Cg)([(0,s.MZ)({type:Number,json:f})],y.prototype,"minScale",void 0),(0,n.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],y.prototype,"title",void 0),(0,n.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],y.prototype,"where",void 0),y=(0,n.Cg)([(0,o.$)("esri.layers.support.DisplayFilter")],y);var m=r(41560);let g=class extends((0,a.OU)(p.o)){constructor(e){super(e),this.activeFilterId=null,this.filters=new(u.A.ofType(y)),this.mode="manual"}writeFilters(e,t,r,n){const i=e.toArray();"scale"===this.mode&&i.sort((e,t)=>{const r=(0,d.oW)(t.minScale,e.minScale),n=e.maxScale-t.maxScale;return 0===r?n:r}),t[r]=i.map(e=>e.toJSON(n))}write(e,t){return super.write(e,(0,m.mW)(this,t))}};(0,n.Cg)([(0,s.MZ)({type:String,json:{write:{overridePolicy:(e,t,r)=>({enabled:"manual"===r.filterMode,isRequired:!0})}}})],g.prototype,"activeFilterId",void 0),(0,n.Cg)([(0,s.MZ)({type:u.A.ofType(y),nonNullable:!0,json:{write:!0}})],g.prototype,"filters",void 0),(0,n.Cg)([(0,c.K)("filters")],g.prototype,"writeFilters",null),(0,n.Cg)([(0,s.MZ)({type:["manual","scale"],nonNullable:!0,json:{name:"filterMode",write:!0}})],g.prototype,"mode",void 0),g=(0,n.Cg)([(0,o.$)("esri.layers.support.DisplayFilterInfo")],g);const v=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.displayFilterEnabled=!0,this.displayFilterInfo=null}};return(0,n.Cg)([(0,s.MZ)(w)],r.prototype,"displayFilterEnabled",void 0),(0,n.Cg)([(0,s.MZ)(b)],r.prototype,"displayFilterInfo",void 0),r=(0,n.Cg)([(0,o.$)("esri.layers.mixins.DisplayFilteredLayer")],r),r},w={type:Boolean,json:{name:"layerDefinition.disableDisplayFilter",read:{reader:e=>!e},write:{layerContainerTypes:l.K,writer(e,t,r){(0,i.sM)(r,!e,t)}},origins:{"web-scene":{write:!1,read:!1}}}},b={type:g,json:{name:"layerDefinition.displayFilterInfo",write:{enabled:!0,allowNull:!0,layerContainerTypes:l.K},origins:{"web-scene":{write:!1,read:!1}}}}},6797:(e,t,r)=>{r.d(t,{Ui:()=>d});var n=r(65008),i=r(7762),s=r(88620);const o=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function l(e){return e instanceof n.A}function a(e){return e instanceof i.A?Object.keys(e.items):l(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 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 n=a(e),i=a(t);if(0===n.length&&0===i.length)return;if(!n.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=>!n.includes(e)),d=n.filter(e=>!i.includes(e)),h=n.filter(r=>i.includes(r)&&u(e,r)!==u(t,r)).concat(s,d).sort(),f=p(e);if(f&&o.has(f)&&h.length)return{type:"complete",oldValue:e,newValue:t};let y;const m=l(e)&&l(t);for(const n of h){const i=u(e,n),s=u(t,n);let o;if((m||"function"!=typeof i&&"function"!=typeof s)&&i!==s&&(null!=i||null!=s)){if(r&&r[n]&&"function"==typeof r[n])o=r[n]?.(i,s);else if(i instanceof Date&&s instanceof Date){if(i.getTime()===s.getTime())continue;o={type:"complete",oldValue:i,newValue:s}}else o="object"==typeof i&&"object"==typeof s&&p(i)===p(s)?c(i,s):{type:"complete",oldValue:i,newValue:s};null!=o&&(null!=y?y.diff[n]=o:y={type:"partial",diff:{[n]:o}})}}return y}function d(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:()=>M});var n=r(31635),i=r(92602),s=r(70333),o=r(78888),l=r(60999),a=r(49186),u=r(53966),p=r(97768),c=r(74887),d=r(84952),h=r(10107),f=(r(44208),r(87811),r(36005)),y=r(40608),m=r(43937),g=r(77548),v=r(20655),w=r(80812),b=r(41318),I=r(10407);const M=e=>{const t=e;let M=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 w.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:n}=await r.e(1204).then(r.bind(r,41204));return(0,c.Te)(t),await n({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(!i.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:n},content:{updateItem:i}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",n),this._set("userHasUpdateItemPrivileges",i)}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 n=!s.id?.findCredential(this.url),i=e===r.id;if(i&&r.portal.user)return this._getUserPrivileges(r,n);let o,l;if(i)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;l=await(s.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.QP)(e)}const a=!0,u=!1,p=!1;if(!l)return{features:{edit:a,fullEdit:u},content:{updateItem:p}};try{if(i?await r.reload():(r=new w.default({id:e,portal:{url:o}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,n)}catch(e){(0,c.QP)(e)}return{features:{edit:a,fullEdit:u},content:{updateItem:p}}}_getUserPrivileges(e,t){const r=(0,I.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 n=`${r.owningSystemUrl}/sharing/rest`,i=v.A.getDefault();if(i&&i.loaded&&(0,d.S8)(i.restUrl)===(0,d.S8)(n))return i.user;const a=`${n}/community/self`,u=null!=e?e.signal:null,p=await(0,l.Ke)((0,o.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?b.A.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,n=this.portalItem?.id&&(this.portalItem.portal||v.A.getDefault());return r&&n&&!(0,d.ut)(n.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.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,n.Cg)([(0,h.MZ)({type:w.default})],M.prototype,"portalItem",null),(0,n.Cg)([(0,f.w)("web-document","portalItem",["itemId"])],M.prototype,"readPortalItem",null),(0,n.Cg)([(0,m.K)("web-document","portalItem",{itemId:{type:String}})],M.prototype,"writePortalItem",null),(0,n.Cg)([(0,h.MZ)({clonable:!1})],M.prototype,"resourceReferences",void 0),(0,n.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],M.prototype,"userHasEditingPrivileges",void 0),(0,n.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],M.prototype,"userHasFullEditingPrivileges",void 0),(0,n.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],M.prototype,"userHasUpdateItemPrivileges",void 0),M=(0,n.Cg)([(0,y.$)("esri.layers.mixins.PortalLayer")],M),M},x={credential:null,user:null}},9093:(e,t,r)=>{function n(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function i(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]}r.d(t,{o8:()=>i,vt:()=>n,zK:()=>s});const s=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:i,create:n,fromValues:function(e,t,r,n,i,s,o,l,a,u,p,c,d,h,f,y){return[e,t,r,n,i,s,o,l,a,u,p,c,d,h,f,y]}},Symbol.toStringTag,{value:"Module"}))},9762:(e,t,r)=>{r.r(t),r.d(t,{projectBuffer:()=>i});var n=r(37539);function i(e,t,r,i,s,o,l=Math.floor(e.length/3)){const a=(0,n.jd)(t,s);if(null==a)return!1;if(a===n.pO){if(e===i&&r===o)return!0;const t=r+3*l;for(let n=r,s=o;n<t;n++,s++)i[s]=e[n];return!0}const u=r+3*l;for(let t=r,n=o;t<u;t+=3,n+=3)a(e,t,i,n);return!0}},10184:(e,t,r)=>{r.d(t,{A:()=>c});var n=r(31635),i=r(69540),s=r(25482),o=r(88930),l=r(10107),a=(r(44208),r(53966),r(87811),r(93223)),u=r(40608),p=r(73133);let c=class extends((0,i.OU)(s.o)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,o.t)(this.value,this.unit,"milliseconds")}};(0,n.Cg)([(0,a.e)(p.j,{nonNullable:!0})],c.prototype,"unit",void 0),(0,n.Cg)([(0,l.MZ)({type:Number,json:{write:!0},nonNullable:!0})],c.prototype,"value",void 0),c=(0,n.Cg)([(0,u.$)("esri.time.TimeInterval")],c)},10407:(e,t,r)=>{r.d(t,{It:()=>h,LG:()=>o,OM:()=>u,Sm:()=>p,Y:()=>l,bK:()=>a,mm:()=>d,sQ:()=>c});var n=r(98988),i=r(16930),s=r(28735);function o(e,t){if(!l(e,t)){const r=e.typeKeywords;r?r.push(t):e.typeKeywords=[t]}}function l(e,t){return!!e.typeKeywords?.includes(t)}function a(e){return l(e,d.HOSTED_SERVICE)}function u(e,t){const r=e.typeKeywords;if(r){const e=r.indexOf(t);e>-1&&r.splice(e,1)}}function p(e,t,r){r?o(e,t):u(e,t)}async function c(e){const t=e.clone().normalize();let r;if(t.length>1)for(const e of t)r?e.width>r.width&&(r=e):r=e;else r=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,s.ci)(e);const r=i.A.WGS84;return await(0,n.initializeProjection)(t,r),(0,n.project)(e,r)}(r)}const d={CHARTS:"Charts",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery"};function h(e){const{portal:t,isOrgItem:r,itemControl:n}=e,i=t.user?.privileges;let s=!i||i.includes("features:user:edit"),o=!!r&&!!i?.includes("features:user:fullEdit");const l="update"===n||"admin"===n;return l?o=s=!0:o&&(s=!0),{features:{edit:s,fullEdit:o},content:{updateItem:l}}}},13069:(e,t,r)=>{r.d(t,{AG:()=>l,lk:()=>i,vD:()=>o,yS:()=>s});const n="randomUUID"in crypto;function i(){if(n)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`{${i().toUpperCase()}}`}function o(){return`{${i()}}`}function l(e){const t=e.toUpperCase();return e.startsWith("{")?t:`{${t}}`}},15481:(e,t,r)=>{r.r(t),r.d(t,{default:()=>re});var n=r(31635),i=r(37838),s=r(92071),o=r(74887),l=r(84952),a=r(10107),u=r(44208),p=r(53966),c=(r(87811),r(40608)),d=r(5443),h=r(16930),f=r(50498),y=r(55156),m=r(60950),g=r(89808),v=r(99959);const w=Symbol("isGeoJSONGraphicOrigin");var b;class I extends v.A{get[(b=w,m.ym)](){return this.layer}get[y.e](){return this.layer}get[g.Q](){return this.layer}constructor(e){super(),this[b]=!0,this.type="geojson",this.layer=e}get id(){return this.layer.id}}var M=r(4146),x=r(49186),T=r(92474),_=r(29953),F=r(39829),S=r(64714),A=r(22671);let C=class extends T.x_{constructor(){super(...arguments),this.type="geojson",this.refresh=(0,o.sg)(async e=>{await this.load();const{extent:t,timeExtent:r}=await this._connection.invoke("refresh",e);return this.sourceJSON.extent=t,r&&(this.sourceJSON.timeInfo.timeExtent=[r.start,r.end]),{dataChanged:!0,updates:{extent:this.sourceJSON.extent,timeInfo:this.sourceJSON.timeInfo}}})}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._startWorker(t)),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null}applyEdits(e){return this.load().then(()=>this._applyEdits(e))}openPorts(){return this.load().then(()=>this._connection.openPorts())}queryFeatures(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryFeatures",e?e.toJSON():null,t)).then(e=>A.A.fromJSON(e))}queryFeaturesJSON(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryFeatures",e?e.toJSON():null,t))}queryFeatureCount(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryFeatureCount",e?e.toJSON():null,t))}queryObjectIds(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryObjectIds",e?e.toJSON():null,t))}queryExtent(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryExtent",e?e.toJSON():null,t)).then(e=>({count:e.count,extent:d.A.fromJSON(e.extent)}))}querySnapping(e,t={}){return this.load(t).then(()=>this._connection.invoke("querySnapping",e,t))}async queryAttributeBins(e,t={}){return await this.load(),this._connection.invoke("queryAttributeBins",e?.toJSON(),t)}_applyEdits(e){if(!this._connection)throw new x.A("geojson-layer-source:edit-failure","Memory source not loaded");const t=this.layer.objectIdField,r=[],n=[],i=[];if(e.addFeatures)for(const t of e.addFeatures)r.push(this._serializeFeature(t));if(e.deleteFeatures)for(const r of e.deleteFeatures)"objectId"in r&&null!=r.objectId?n.push(r.objectId):"attributes"in r&&null!=r.attributes[t]&&n.push(r.attributes[t]);if(e.updateFeatures)for(const t of e.updateFeatures)i.push(this._serializeFeature(t));return this._connection.invoke("applyEdits",{adds:r,updates:i,deletes:n}).then(({extent:e,timeExtent:t,featureEditResults:r})=>(this.sourceJSON.extent=e,t&&(this.sourceJSON.timeInfo.timeExtent=[t.start,t.end]),this._createEditsResult(r)))}_createEditsResult(e){return{addFeatureResults:e.addResults?e.addResults.map(this._createFeatureEditResult,this):[],updateFeatureResults:e.updateResults?e.updateResults.map(this._createFeatureEditResult,this):[],deleteFeatureResults:e.deleteResults?e.deleteResults.map(this._createFeatureEditResult,this):[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}_createFeatureEditResult(e){const t=!0===e.success?null:e.error||{code:void 0,description:""};return{objectId:e.objectId,globalId:e.globalId,error:t?new x.A("geojson-layer-source:edit-failure",t.description,{code:t.code}):null}}_serializeFeature(e){const{attributes:t}=e,r=this._geometryForSerialization(e);return r?{geometry:r.toJSON(),attributes:t}:{attributes:t}}_geometryForSerialization(e){const{geometry:t}=e;return null==t?null:"mesh"===t.type||"extent"===t.type?F.A.fromExtent(t.extent):t}async _startWorker(e){this._connection=await(0,_.ho)("GeoJSONSourceWorker",{strategy:(0,u.A)("feature-layers-workers")?"dedicated":"local",signal:e,registryTarget:this});const{fields:t,spatialReference:r,hasZ:n,geometryType:i,objectIdField:s,url:o,timeInfo:l,customParameters:a}=this.layer,c="defaults"===this.layer.originOf("spatialReference"),d={url:o,customParameters:a,fields:t&&t.map(e=>e.toJSON()),geometryType:f.gy.toJSON(i),hasZ:n,objectIdField:s,timeInfo:l?l.toJSON():null,spatialReference:c?null:r&&r.toJSON()},h=await this._connection.invoke("load",d,{signal:e});for(const e of h.warnings)p.A.getLogger(this.layer).warn("#load()",`${e.message} (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}')`,{warning:e});h.featureErrors.length&&p.A.getLogger(this.layer).warn("#load()",`Encountered ${h.featureErrors.length} validation errors while loading features. (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}')`,{errors:h.featureErrors}),this.sourceJSON=h.layerDefinition,this.capabilities=(0,S.f)(this.sourceJSON.hasZ,!0)}};(0,n.Cg)([(0,a.MZ)()],C.prototype,"capabilities",void 0),(0,n.Cg)([(0,a.MZ)()],C.prototype,"type",void 0),(0,n.Cg)([(0,a.MZ)({constructOnly:!0})],C.prototype,"layer",void 0),(0,n.Cg)([(0,a.MZ)()],C.prototype,"sourceJSON",void 0),C=(0,n.Cg)([(0,c.$)("esri.layers.graphics.sources.GeoJSONSource")],C);var E=r(63074),O=r(69208),R=r(6455),j=r(87718),Z=r(56658),P=r(16131),N=r(32756),k=r(8303),D=r(54310),G=r(25036),$=r(82935),L=r(63396),z=r(10873),U=r(15426),q=r(29005),J=r(20437),B=r(17036),V=r(30524),H=r(46499),Q=r(39383),Y=r(41214),W=r(61956),K=r(30291),X=r(56400);const ee=(0,B.p)();let te=class extends((0,N.fY)((0,R.FJ)((0,O.d)((0,Z.J)((0,j.F)((0,E.dM)((0,$.e)((0,L.d)((0,G.j)((0,D.J)((0,P.q)((0,k.A)((0,s.P)(M.A)))))))))))))){constructor(e){super(e),this.attributeTableTemplate=null,this.copyright=null,this.dateFieldsTimeZone=null,this.definitionExpression=null,this.displayField=null,this.editingEnabled=!1,this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.graphicOrigin=new I(this),this.hasZ=void 0,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.objectIdField=null,this.operationalLayerType="GeoJSON",this.outFields=null,this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new C({layer:this}),this.spatialReference=h.A.WGS84,this.templates=null,this.title="GeoJSON",this.type="geojson"}destroy(){this.source?.destroy()}load(e){const t=this.loadFromPortal({supportedTypes:["GeoJson"],supportsData:!1},e).catch(o.QP).then(()=>this.source.load(e)).then(()=>{this.read(this.source.sourceJSON,{origin:"service",url:this.parsedUrl}),this.revert(["objectIdField","fields","timeInfo"],"service"),(0,V.yp)(this.renderer,this.fieldsIndex),(0,V.sv)(this.timeInfo,this.fieldsIndex)});return this.addResolvingPromise(t),Promise.resolve(this)}set portalItem(e){super.portalItem=e}set timeInfo(e){super.timeInfo=e}get capabilities(){return this.source?this.source.capabilities:null}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()}get isTable(){return this.loaded&&null==this.geometryType}get parsedUrl(){return(0,l.An)(this.url)}set renderer(e){(0,V.yp)(e,this.fieldsIndex),this._set("renderer",e)}set url(e){if(!e)return void this._set("url",e);const t=(0,l.An)(e);this._set("url",t.path),t.query&&(this.customParameters={...this.customParameters,...t.query})}async applyEdits(e,t){const{applyEdits:n}=await Promise.all([r.e(8628),r.e(3513)]).then(r.bind(r,78628));await this.load();const i=await n(this,this.source,e,t);return this.read({extent:this.source.sourceJSON.extent,timeInfo:this.source.sourceJSON.timeInfo},{origin:"service",ignoreDefaults:!0}),i}createPopupTemplate(e){return(0,K.tn)(this,e)}createQuery(){const e=new W.A,t=this.capabilities?.data;e.returnGeometry=!0,t&&t.supportsZ&&(e.returnZ=!0),e.outFields=["*"],e.where=this.definitionExpression||"1=1";const{timeOffset:r,timeExtent:n}=this;return e.timeExtent=null!=r&&null!=n?n.offset(-r.value,r.unit):n||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(W.A.from(e)||this.createQuery(),t)).then(e=>{if(e?.features)for(const t of e.features)t.layer=t.sourceLayer=this,t.origin=this.graphicOrigin;return e})}queryObjectIds(e,t){return this.load().then(()=>this.source.queryObjectIds(W.A.from(e)||this.createQuery(),t))}queryFeatureCount(e,t){return this.load().then(()=>this.source.queryFeatureCount(W.A.from(e)||this.createQuery(),t))}queryExtent(e,t){return this.load().then(()=>this.source.queryExtent(W.A.from(e)||this.createQuery(),t))}async queryAttributeBins(e,t){const{source:n,capabilities:i}=await this.load();(0,U.ZJ)(e,i,"GeoJSONLayer");const s=await Promise.all([r.e(4575),r.e(7136)]).then(r.bind(r,14575)),o=await n.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(this.customParameters);return null!=t&&this.read(t,{origin:"service",url:this.parsedUrl,ignoreDefaults:!0}),e}catch{}return!1}};(0,n.Cg)([(0,a.MZ)(z.zQ)],te.prototype,"attributeTableTemplate",void 0),(0,n.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1,write:!1}})],te.prototype,"capabilities",null),(0,n.Cg)([(0,a.MZ)({type:String})],te.prototype,"copyright",void 0),(0,n.Cg)([(0,a.MZ)({readOnly:!0})],te.prototype,"createQueryVersion",null),(0,n.Cg)([(0,a.MZ)((0,X.P6)("dateFieldsTimeReference"))],te.prototype,"dateFieldsTimeZone",void 0),(0,n.Cg)([(0,a.MZ)({readOnly:!0})],te.prototype,"defaultPopupTemplate",null),(0,n.Cg)([(0,a.MZ)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],te.prototype,"definitionExpression",void 0),(0,n.Cg)([(0,a.MZ)({type:String})],te.prototype,"displayField",void 0),(0,n.Cg)([(0,a.MZ)({type:Boolean})],te.prototype,"editingEnabled",void 0),(0,n.Cg)([(0,a.MZ)(z.Yj)],te.prototype,"elevationInfo",void 0),(0,n.Cg)([(0,a.MZ)({type:[J.A],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],te.prototype,"fields",void 0),(0,n.Cg)([(0,a.MZ)(ee.fieldsIndex)],te.prototype,"fieldsIndex",void 0),(0,n.Cg)([(0,a.MZ)({type:d.A,json:{name:"extent"}})],te.prototype,"fullExtent",void 0),(0,n.Cg)([(0,a.MZ)({type:["point","polygon","polyline","multipoint"],json:{read:{reader:f.gy.read}}})],te.prototype,"geometryType",void 0),(0,n.Cg)([(0,a.MZ)({readOnly:!0,clonable:!1})],te.prototype,"graphicOrigin",void 0),(0,n.Cg)([(0,a.MZ)({type:Boolean})],te.prototype,"hasZ",void 0),(0,n.Cg)([(0,a.MZ)(z.id)],te.prototype,"id",void 0),(0,n.Cg)([(0,a.MZ)({type:Boolean,readOnly:!0})],te.prototype,"isTable",null),(0,n.Cg)([(0,a.MZ)(z.kF)],te.prototype,"labelsVisible",void 0),(0,n.Cg)([(0,a.MZ)({type:[H.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:Q.w},write:!0}})],te.prototype,"labelingInfo",void 0),(0,n.Cg)([(0,a.MZ)(z.fV)],te.prototype,"legendEnabled",void 0),(0,n.Cg)([(0,a.MZ)({type:["show","hide"]})],te.prototype,"listMode",void 0),(0,n.Cg)([(0,a.MZ)({type:String,json:{name:"layerDefinition.objectIdField",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"objectIdField"}}}})],te.prototype,"objectIdField",void 0),(0,n.Cg)([(0,a.MZ)(z.ke)],te.prototype,"opacity",void 0),(0,n.Cg)([(0,a.MZ)({type:["GeoJSON"]})],te.prototype,"operationalLayerType",void 0),(0,n.Cg)([(0,a.MZ)(ee.outFields)],te.prototype,"outFields",void 0),(0,n.Cg)([(0,a.MZ)({readOnly:!0})],te.prototype,"parsedUrl",null),(0,n.Cg)([(0,a.MZ)(z.M6)],te.prototype,"popupEnabled",void 0),(0,n.Cg)([(0,a.MZ)({type:i.A,json:{name:"popupInfo",write:!0}})],te.prototype,"popupTemplate",void 0),(0,n.Cg)([(0,a.MZ)({types:Y.Hg,json:{name:"layerDefinition.drawingInfo.renderer",write:!0,origins:{service:{name:"drawingInfo.renderer"},"web-scene":{types:Y.XJ}}}})],te.prototype,"renderer",null),(0,n.Cg)([(0,a.MZ)(z.PY)],te.prototype,"screenSizePerspectiveEnabled",void 0),(0,n.Cg)([(0,a.MZ)({readOnly:!0})],te.prototype,"source",void 0),(0,n.Cg)([(0,a.MZ)({type:h.A})],te.prototype,"spatialReference",void 0),(0,n.Cg)([(0,a.MZ)({type:[q.A]})],te.prototype,"templates",void 0),(0,n.Cg)([(0,a.MZ)()],te.prototype,"title",void 0),(0,n.Cg)([(0,a.MZ)({json:{read:!1},readOnly:!0})],te.prototype,"type",void 0),(0,n.Cg)([(0,a.MZ)(z.OZ)],te.prototype,"url",null),te=(0,n.Cg)([(0,c.$)("esri.layers.GeoJSONLayer")],te);const re=te},17036:(e,t,r)=>{r.d(t,{p:()=>a});var n=r(44208),i=r(53966),s=r(20437),o=r(95466),l=r(30524);function a(){return{fields:{type:[s.A],value:null,set:function(e){if(e&&(0,n.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(", ");i.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||i.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,l.DB)(this.fieldsIndex,e)}}}}},22671:(e,t,r)=>{r.d(t,{A:()=>v});var n,i=r(31635),s=r(52106),o=r(66552),l=r(25482),a=r(4718),u=r(10107),p=(r(44208),r(53966),r(36005)),c=r(40608),d=r(43937),h=r(16930),f=r(65864),y=r(50498),m=r(20437);const g=new o.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=n=class extends l.o{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,n){if(e)return void g.write(e,t,r,n);const{features:i}=this;if(i)for(const e of i)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,n)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,n=(0,f.rS)(e);return n&&!r&&t.spatialReference&&(n.spatialReference=h.A.fromJSON(t.spatialReference)),n}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 n(this.cloneProperties())}cloneProperties(){return(0,a.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 n=t.features[r];if(n.geometry){const t=e?.[r];n.geometry=t?.toJSON()||n.geometry}}return t}quantize(e){const{scale:[t,r],translate:[n,i]}=e,s=this.features,o=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-n)/t),e=>Math.round((i-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:[n,i],scale:[s,o]}=r;let l=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,e=>e*s+n,e=>i-e*o,l,a);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const n=h.A.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const s=e[t],o=r.fromJSON(s),l=s.geometry?.spatialReference;null==o.geometry||l||(o.geometry.spatialReference=n);const a=s.aggregateGeometries,u=o.aggregateGeometries;if(a&&null!=u)for(const e in u){const t=u[e],r=a[e],i=r?.spatialReference;null==t||i||(t.spatialReference=n)}i.push(o)}return i}_quantizePoints(e,t,r){let n,i;const s=[];for(let o=0,l=e.length;o<l;o++){const l=e[o];if(o>0){const e=t(l[0]),o=r(l[1]);e===n&&o===i||(s.push([e-n,o-i]),n=e,i=o)}else n=t(l[0]),i=r(l[1]),s.push([n,i])}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 n=(0,f.Bi)(e)?e.rings:e.paths,i=[];for(let e=0,s=n.length;e<s;e++){const s=n[e],o=this._quantizePoints(s,t,r);o&&i.push(o)}return i.length>0?((0,f.Bi)(e)?e.rings=i:e.paths=i,e):null}:"multipoint"===e?e=>{const n=this._quantizePoints(e.points,t,r);return n&&n.length>0?(e.points=n,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,n,i){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),n&&(e.z=n(e.z))}:"polyline"===e||"polygon"===e?e=>{const s=(0,f.Bi)(e)?e.rings:e.paths;let o,l;for(let e=0,n=s.length;e<n;e++){const n=s[e];for(let e=0,i=n.length;e<i;e++){const i=n[e];e>0?(o+=i[0],l+=i[1]):(o=i[0],l=i[1]),i[0]=t(o),i[1]=r(l)}}if(n&&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]=n(r[2]),r[3]=i(r[3])}}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])}}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])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),n&&null!=e.zmax&&null!=e.zmin&&(e.zmax=n(e.zmax),e.zmin=n(e.zmin)),i&&null!=e.mmax&&null!=e.mmin&&(e.mmax=i(e.mmax),e.mmin=i(e.mmin))}:"multipoint"===e?e=>{const s=e.points;let o,l;for(let e=0,n=s.length;e<n;e++){const n=s[e];e>0?(o+=n[0],l+=n[1]):(o=n[0],l=n[1]),n[0]=t(o),n[1]=r(l)}if(n&&i)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=n(t[2]),t[3]=i(t[3])}else if(n)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=n(t[2])}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2])}}:null}};(0,i.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,i.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,i.Cg)([(0,u.MZ)({type:[s.A],json:{write:!0}})],v.prototype,"features",void 0),(0,i.Cg)([(0,p.w)("features")],v.prototype,"readFeatures",null),(0,i.Cg)([(0,u.MZ)({type:[m.A],json:{write:!0}})],v.prototype,"fields",void 0),(0,i.Cg)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],v.prototype,"geometryType",void 0),(0,i.Cg)([(0,d.K)("geometryType")],v.prototype,"writeGeometryType",null),(0,i.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,i.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,i.Cg)([(0,u.MZ)({types:y.yR,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,i.Cg)([(0,p.w)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,i.Cg)([(0,u.MZ)({type:h.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,i.Cg)([(0,d.K)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,i.Cg)([(0,u.MZ)({json:{write:!0}})],v.prototype,"transform",void 0),v=n=(0,i.Cg)([(0,c.$)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0},29005:(e,t,r)=>{r.d(t,{A:()=>p});var n=r(31635),i=r(69540),s=r(66552),o=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(40608));const u=new s.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let p=class extends((0,i.OU)(o.o)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,n.Cg)([(0,l.MZ)({json:{write:!0}})],p.prototype,"name",void 0),(0,n.Cg)([(0,l.MZ)({json:{write:!0}})],p.prototype,"description",void 0),(0,n.Cg)([(0,l.MZ)({json:{read:u.read,write:u.write}})],p.prototype,"drawingTool",void 0),(0,n.Cg)([(0,l.MZ)({json:{write:!0}})],p.prototype,"prototype",void 0),(0,n.Cg)([(0,l.MZ)({json:{write:!0}})],p.prototype,"thumbnail",void 0),p=(0,n.Cg)([(0,a.$)("esri.layers.support.FeatureTemplate")],p)},32730:(e,t,r)=>{r.d(t,{BI:()=>m,D3:()=>f,XJ:()=>y,lc:()=>h,mX:()=>v,rU:()=>g,tH:()=>x});var n=r(799);const i="__begin__",s="__end__",o=new RegExp(i,"ig"),l=new RegExp(s,"ig"),a=new RegExp("^"+i,"i"),u=new RegExp(s+"$","i"),p='"',c=p+" + ",d=" + "+p;function h(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 y(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=h(e.labelExpression),t.type="conventional"),t}function m(e){const t=y(e);if(!t)return null;switch(t.type){case"conventional":return v(t.expression);case"arcade":return t.expression}return null}function g(e){const t=y(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(w);return t?.[1].trim()||null}(t.expression);case"arcade":return x(t.expression)}return null}function v(e){let t;return e?(t=(0,n.HC)(e,e=>i+'$feature["'+e+'"]'+s),t=a.test(t)?t.replace(a,""):p+t,t=u.test(t)?t.replace(u,""):t+p,t=t.replaceAll(o,c).replaceAll(l,d)):t='""',t}const w=/^\s*\{([^}]+)\}\s*$/i,b=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,I=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,M=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function x(e){if(!e)return null;let t=b.exec(e)||I.exec(e);return t?t[1]||t[3]:(t=M.exec(e),t?t[2]:null)}},32756:(e,t,r)=>{r.d(t,{Rr:()=>a,fY:()=>p,ne:()=>u});var n=r(31635),i=r(93637),s=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),l=r(91880);function a(e,t,r){if(!e)return null;const n=e.find(e=>!!e.field);if(!n)return null;const i=new l.A;return i.read(n,r),[i]}const u={type:[l.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:a},write:{writer:function(e,t,r,n){const s=e.find(e=>!!e.field);s&&(0,i.sM)(r,[s.toJSON()],t)}}}},p=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,n.Cg)([(0,s.MZ)(u)],r.prototype,"orderBy",void 0),r=(0,n.Cg)([(0,o.$)("esri.layers.mixins.OrderedLayer")],r),r}},37539:(e,t,r)=>{r.d(t,{pO:()=>y,jd:()=>d,Tp:()=>h,w5:()=>c});var n=r(34727),i=r(83047),s=r(73941),o=r(79258);Math.PI;const l=o.$O.radius,a=o.$O.eccentricitySquared,u={a1:l*a,a2:l*a*l*a,a3:l*a*a/2,a4:l*a*l*a*2.5,a5:l*a+l*a*a/2,a6:1-a};o.$O.radius,o.$O.flattening,o.Sw.radius,o.Sw.flattening,o.sH.radius,o.sH.flattening,o.sH.radius;var p=r(21325);const c={2:{5:y,7:null,9:null,10:y,1:x,6:null,8:null,0:null,3:g,11:v,2:y,4:A},5:{5:y,7:null,9:null,10:y,1:x,6:null,8:null,0:null,3:g,11:v,2:y,4:A},7:{5:null,7:y,9:null,10:y,1:null,6:M,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:I,0:null,3:null,11:null,2:null,4:null},3:{5:m,7:null,9:null,10:m,1:function(e,t,r,n){const i=e[t]/Z,s=j-2*Math.atan(Math.exp(-e[t+1]/Z)),o=Z+e[t+2],l=Math.cos(s)*o;r[n]=Math.cos(i)*l,r[n+1]=Math.sin(i)*l,r[n+2]=Math.sin(s)*o},6:null,8:null,0:null,3:y,11:function(e,t,r,n){m(e,t,r,n),v(r,n,r,n)},2:m,4:function(e,t,r,n){m(e,t,r,n),A(r,n,r,n)}},4:{5:C,7:null,9:null,10:C,1:function(e,t,r,n){C(e,t,r,n),x(r,n,r,n)},6:null,8:null,0:null,3:function(e,t,r,n){C(e,t,r,n),g(r,n,r,n)},11:function(e,t,r,n){C(e,t,r,n),v(r,n,r,n)},2:C,4:y},1:{5:S,7:null,9:null,10:S,1:y,6:null,8:null,0:null,3:function(e,t,r,n){S(e,t,r,n),g(r,n,r,n)},11:function(e,t,r,n){S(e,t,r,n),v(r,n,r,n)},2:S,4:function(e,t,r,n){S(e,t,r,n),A(r,n,r,n)}},6:{5:null,7:F,9:null,10:F,1:null,6:y,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:_,10:_,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:x,6:M,8:I,0:null,3:g,11:v,2:y,4:A},11:{5:w,7:null,9:null,10:w,1:function(e,t,r,n){w(e,t,r,n),x(r,n,r,n)},6:null,8:null,0:null,3:function(e,t,r,n){w(e,t,r,n),g(r,n,r,n)},11:y,2:w,4:function(e,t,r,n){w(e,t,r,n),A(r,n,r,n)}}};function d(e,t){return h(e,t)?.projector}function h(e,t){if(null==e||null==t)return null;if(E.source.spatialReference===e&&E.dest.spatialReference===t)return E;const r=f(e,E.source),n=f(t,E.dest);return 0===r&&0===n?(0,p.aI)(e,t)?E.projector=y:E.projector=null:E.projector=c[r][n],E}function f(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,p.oT)(e)?t.spatialReferenceId=2:(0,p.K8)(e)?t.spatialReferenceId=3:(0,p.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,p.q8)(e)?t.spatialReferenceId=7:(0,p.KQ)(e)?t.spatialReferenceId=9:t.spatialReferenceId=0):0}function y(e,t,r,n){e!==r&&(r[n++]=e[t++],r[n++]=e[t++],r[n]=e[t])}function m(e,t,r,n){r[n]=R*(e[t]/Z),r[n+1]=R*(j-2*Math.atan(Math.exp(-e[t+1]/Z))),r[n+2]=e[t+2]}function g(e,t,r,i){!function(e,t,r,i,s){const o=.4999999*Math.PI,l=(0,n.qE)(O*e[t+1],-o,o),a=Math.sin(l);r[i++]=O*e[t]*s.radius,r[i++]=s.halfSemiMajorAxis*Math.log((1+a)/(1-a)),r[i]=e[t+2]}(e,t,r,i,o.$O)}function v(e,t,r,n){r[n]=e[t]*P,r[n+1]=e[t+1]*P,r[n+2]=e[t+2]}function w(e,t,r,n){r[n]=e[t]*N,r[n+1]=e[t+1]*N,r[n+2]=e[t+2]}function b(e,t,r,n,i){const s=i+e[t+2],o=O*e[t+1],l=O*e[t],a=Math.cos(o)*s;r[n]=Math.cos(l)*a,r[n+1]=Math.sin(l)*a,r[n+2]=Math.sin(o)*s}function I(e,t,r,n){b(e,t,r,n,o.Sw.radius)}function M(e,t,r,n){b(e,t,r,n,o.sH.radius)}function x(e,t,r,n){b(e,t,r,n,o.$O.radius)}function T(e,t,r,i,s){const o=e[t],l=e[t+1],a=e[t+2],u=Math.sqrt(o*o+l*l+a*a),p=(0,n.YN)(a/(0===u?1:u)),c=Math.atan2(l,o);r[i++]=R*c,r[i++]=R*p,r[i]=u-s}function _(e,t,r,n){T(e,t,r,n,o.Sw.radius)}function F(e,t,r,n){T(e,t,r,n,o.sH.radius)}function S(e,t,r,n){T(e,t,r,n,o.$O.radius)}function A(e,t,r,n){!function(e,t,r,n,i){const s=O*e[t],o=O*e[t+1],l=e[t+2],a=Math.sin(o),u=Math.cos(o),p=i.radius/Math.sqrt(1-i.eccentricitySquared*a*a);r[n++]=(p+l)*u*Math.cos(s),r[n++]=(p+l)*u*Math.sin(s),r[n++]=(p*(1-i.eccentricitySquared)+l)*a}(e,t,r,n,o.$O)}function C(e,t,r,n){const i=u,s=e[t],l=e[t+1],a=e[t+2];let p,c,d,h,f,y,m,g,v,w,b,I,M,x,T,_,F,S,A,C,E;p=Math.abs(a),c=s*s+l*l,d=Math.sqrt(c),h=c+a*a,f=Math.sqrt(h),C=Math.atan2(l,s),y=a*a/h,m=c/h,x=i.a2/f,T=i.a3-i.a4/f,m>.3?(g=p/f*(1+m*(i.a1+x+y*T)/f),A=Math.asin(g),w=g*g,v=Math.sqrt(1-w)):(v=d/f*(1-y*(i.a5-x-m*T)/f),A=Math.acos(v),w=1-v*v,g=Math.sqrt(w)),b=1-o.$O.eccentricitySquared*w,I=o.$O.radius/Math.sqrt(b),M=i.a6*I,x=d-I*v,T=p-M*g,F=v*x+g*T,_=v*T-g*x,S=_/(M/b+F),A+=S,E=F+_*S/2,a<0&&(A=-A),r[n++]=R*C,r[n++]=R*A,r[n]=E}const E={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:y},O=(0,n.kU)(1),R=(0,n.KJ)(1),j=.5*Math.PI,Z=o.$O.radius,P=Z*Math.PI/180,N=180/(Z*Math.PI)},41366:(e,t,r)=>{r.d(t,{K:()=>d,Q:()=>u});var n=r(31635),i=r(66552),s=r(53966),o=r(10107),l=(r(44208),r(87811),r(93223)),a=r(40608);const u=(0,i.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,n.Cg)([(0,o.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],r.prototype,"normalizationField",void 0),(0,n.Cg)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],r.prototype,"normalizationMaxValue",void 0),(0,n.Cg)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],r.prototype,"normalizationMinValue",void 0),(0,n.Cg)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],r.prototype,"normalizationTotal",void 0),(0,n.Cg)([(0,l.e)(u,{name:"parameters.normalizationType"})],r.prototype,"normalizationType",null),r=(0,n.Cg)([(0,a.$)("esri.rest.support.NormalizationBinParametersMixin")],r),r}},41560:(e,t,r)=>{r.d(t,{Ch:()=>o,mW:()=>s});var n=r(34727),i=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:n}of e.filters)t[0]=Math.max(t[0],p(r)),t[1]=Math.min(t[1],c(n));return t}(e);if(s&&((0,n.gg)(t,s[0])||(0,n.ZH)(r,s[1])))return"";const o=Array.from(l(e,t,r)),a=function(e,t,r){if(0===e.length)return!0;const i=p(e.at(0)?.minScale),s=c(e.at(-1)?.maxScale);if((0,n.ZH)(i,t)||(0,n.gg)(s,r))return!0;for(let t=0;t<e.length-1;t++){const r=e[t],i=e[t+1];if((0,n.ZH)(p(i.minScale),c(r.maxScale)))return!0}return!1}(o,t,r)?"1=1":o.map(e=>e.where||"1=1").reduce((e,t)=>(0,i.IW)(e,t),"");return a&&"1=1"!==a?a:""}function*l(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 n of e.filters)a(n.minScale,n.maxScale,t,r)&&(yield n)}}function a(e,t,r,i){return e=p(e),r=p(r),t=c(t),!(!(0,n.Sp)(r,e)&&(i??r)>e||(0,n.Hx)(t,r)||void 0!==i&&(0,n.Sp)(i,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}},46140:(e,t,r)=>{r.d(t,{R:()=>i});var n=r(49186);let i=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 n.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[i,s]=t.split("."),o=/^\s*\d+\s*$/;if(!i?.match||!o.test(i))throw new n.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 n.A((r&&r+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const l=parseInt(i,10),a=parseInt(s,10);return new e(l,a,r)}}},50498:(e,t,r)=>{r.d(t,{Ye:()=>c,gy:()=>p,yR:()=>d});var n=r(66552),i=r(5443),s=r(91075),o=r(48526),l=r(86738),a=r(39829),u=r(82799);const p=(0,n.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),c=(0,n.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"}),d={base:s.A,key:"type",typeMap:{extent:i.A,multipoint:o.A,point:l.A,polyline:u.A,polygon:a.A}}},52106:(e,t,r)=>{r.d(t,{A:()=>M});var n,i=r(31635),s=r(37838),o=r(69540),l=r(51447),a=r(25482),u=r(53966),p=r(36708),c=r(24326),d=r(10107),h=(r(44208),r(87811),r(40608)),f=r(12195),y=r(65864),m=r(50498),g=r(55156),v=r(60950),w=r(54339),b=r(33910);function I(e){if(null==e)return null;const t={};for(const r in e){const n=e[r];n&&(t[r]=n.toJSON())}return 0!==Object.keys(t).length?t:null}let M=class extends((0,o.OU)(a.o)){static{n=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,l.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 n({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=(0,v.E_)(this.origin);if(t)return t.popupTemplate??(e?t.defaultPopupTemplate:null)??null;const r=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const t of[r,this.sourceLayer,this.layer])if(t&&"object"==typeof t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&null!=t.defaultPopupTemplate)return t.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=(0,g.I)(this.origin);if(e)return(0,w.r)(this,e);const t=this.sourceLayer??this.layer;return t?(0,w.r)(this,t):null}getGlobalId(){const e=(0,g.I)(this.origin);if(e?.globalIdField)return this.getAttribute(e.globalIdField);const t=this.sourceLayer??this.layer;return t&&"globalIdField"in t&&t.globalIdField?this.getAttribute(t.globalIdField):null}toJSON(){return{aggregateGeometries:I(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,n){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const i={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(i.action=n),"attributes"===e&&(i.attributeName=n),this.layer.graphicChanged(i)}_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,i.Cg)([(0,d.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const n=(0,y.rS)(e[r]);n&&(t[r]=n)}return 0!==Object.keys(t).length?t:null}}})],M.prototype,"aggregateGeometries",null),(0,i.Cg)([(0,d.MZ)({value:null})],M.prototype,"attributes",null),(0,i.Cg)([(0,d.MZ)({value:null,types:m.yR,json:{read:y.rS}})],M.prototype,"geometry",null),(0,i.Cg)([(0,d.MZ)({type:Boolean})],M.prototype,"isAggregate",void 0),(0,i.Cg)([(0,d.MZ)({clonable:!1})],M.prototype,"layer",void 0),(0,i.Cg)([(0,d.MZ)({clonable:"reference"})],M.prototype,"origin",void 0),(0,i.Cg)([(0,d.MZ)({type:s.A,value:null})],M.prototype,"popupTemplate",null),(0,i.Cg)([(0,d.MZ)({clonable:"reference"})],M.prototype,"sourceLayer",void 0),(0,i.Cg)([(0,d.MZ)({value:null,types:b.Es})],M.prototype,"symbol",null),(0,i.Cg)([(0,d.MZ)({clonable:!1,json:{read:!1,write:!1}})],M.prototype,"_version",void 0),(0,i.Cg)([(0,d.MZ)({type:Boolean,value:!0})],M.prototype,"visible",null),M=n=(0,i.Cg)([(0,h.$)("esri.Graphic")],M)},54339:(e,t,r)=>{function n(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 n of t.fieldNames)r.push(e.attributes[n]??null);return JSON.stringify(r)}}}function i(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:()=>n,r:()=>i})},55156:(e,t,r)=>{r.d(t,{I:()=>i,e:()=>n});const n=Symbol("idFieldsProviderSymbol");function i(e){return(t=e)&&n in t?e[n]:void 0;var t}},55674:(e,t,r)=>{r.d(t,{Ad:()=>h,Gj:()=>m,QY:()=>d,lL:()=>g,xR:()=>f});var n=r(66131),i=r(49186),s=(r(44208),r(44729)),o=r(15032),l=r(65864),a=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 h(e,t){return y.create(e,t,null,["$feature","$view"])}function f(e,t,r){return y.create(e,t,r,["$feature","$view","$config"])}class y{static async create(e,t,r,n){const{arcade:s,Dictionary:o}=await(0,u.l)();let l;try{l=s.parseScript(e)}catch(t){throw new i.A("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})}const a=s.scriptUsesGeometryEngine(l);a&&await s.enableGeometrySupport(),await s.loadDependentModules(new Set,l,null,!1,a);const p={vars:n.reduce((e,t)=>({...e,[t]:null}),{}),spatialReference:t,useAsync:!1},c=s.compileScript(l,p);let d=null;null!=r&&(d=new o(r),d.immutable=!0);const h=new o;return h.immutable=!1,h.setField("scale",0),new y(e,s,l,c,t,h,d,o)}constructor(e,t,r,n,i,s,o,l){this.script=e,this._arcade=t,this._syntaxTree=r,this._compiled=n,this._spatialReference=i,this._viewDict=s,this._configDict=o,this._dictionaryCtor=l,this._dependencies=new Map,this._featureReader=new m,this._dependencies.set("geometry",t.scriptTouchesGeometry(this._syntaxTree)),this._dependencies.set("scale",this._arcade.referencesMember(this._syntaxTree,"scale")),this._dependencies.set("timeProperties",this._arcade.scriptUsesViewProperties(this._syntaxTree,["timeProperties"]))}evaluate(e,t){const r=t.$view?.timeZone;if(t.$view){let e;if(this._viewDict.setField("scale",t.$view.scale),null!=t.$view.timeProperties){const{currentStart:i,currentEnd:s}=t.$view.timeProperties;e=new this._dictionaryCtor({currentStart:null!=i?null!=r?n.lY.epochToArcadeDate(i,r):n.lY.unknownEpochToArcadeDate(i):void 0,currentEnd:null!=s?null!=r?n.lY.epochToArcadeDate(s,r):n.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 m{constructor(){this._boundTarget=null,this._boundSchema={fields:null,fieldsIndex:null,spatialReference:null,get geometryType(){return null},get objectIdField(){return null}},this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}bind(e,t,r){const n=t??new a.A(g(e.attributes));this._boundTarget=e,this._boundSchema.fields=n.fields,this._boundSchema.fieldsIndex=n,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,l.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 n.lY.fromReaderAsTimeStampOffset(t);case"date":case"esriFieldTypeDate":return this.isUnknownDateTimeField(e)?n.lY.unknownEpochToArcadeDate(t):n.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}},62815:(e,t,r)=>{r.d(t,{N:()=>o});var n=r(83047),i=r(73941),s=r(21325);function o(e,t,r){if(null==t||null==r||r.vcsWkid||(0,s.aI)(t,r)||(0,i.xP)(t)||(0,i.xP)(r))return null;const o=(0,n.G9)(t)/(0,n.G9)(r);if(1===o)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){null!=e?.z&&(e.z*=t)}(e,o);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const r of e.paths)for(const e of r)e.length>2&&(e[2]*=t)}(e,o);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const r of e.rings)for(const e of r)e.length>2&&(e[2]*=t)}(e,o);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const r of e.points)r.length>2&&(r[2]*=t)}(e,o);case"extent":case"esriGeometryEnvelope":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,o);default:return null}}},63396:(e,t,r)=>{r.d(t,{d:()=>x});var n=r(31635),i=r(10107),s=(r(44208),r(53966),r(87811),r(40608)),o=r(60950),l=r(99959);class a extends l.A{constructor(e){super(),this.type="track",this.trackInfoProvider=e}get id(){return this.trackInfoProvider.id}get[o.ym](){return this.trackInfoProvider.trackInfo}}var u=r(37838),p=r(69540),c=r(25482),d=r(93637),h=r(43937),f=r(50820),y=r(10873),m=r(46499),g=r(41214);let v=class extends((0,p.OU)(c.o)){constructor(e){super(e),this.labelingInfo=null,this.labelsVisible=!0,this.renderer=null,this.visible=!0}};(0,n.Cg)([(0,i.MZ)({type:[m.A],json:{write:!0}})],v.prototype,"labelingInfo",void 0),(0,n.Cg)([(0,i.MZ)(y.kF)],v.prototype,"labelsVisible",void 0),(0,n.Cg)([(0,i.MZ)({types:g.Hg,json:{write:!0}})],v.prototype,"renderer",void 0),(0,n.Cg)([(0,i.MZ)({type:Boolean,json:{write:!0}})],v.prototype,"visible",void 0),v=(0,n.Cg)([(0,s.$)("esri.layers.support.TrackPartInfo")],v);var w=r(96576),b=r(59868),I=r(10184);let M=class extends((0,p.OU)(c.o)){constructor(e){super(e),this.enabled=!0,this.fields=[],this.latestObservations=new v({renderer:new w.A({symbol:b.UK.clone()})}),this.maxDisplayDuration=null,this.maxDisplayObservationsPerTrack=0,this.popupEnabled=!0,this.popupTemplate=null,this.previousObservations=new v({renderer:new w.A({symbol:b.UK.clone()})}),this.trackLines=new v({renderer:new w.A({symbol:b.A7.clone()})}),this.timeField="startTimeField"}writeFields(e,t,r){const n=e.filter(e=>"avg_angle"!==e.statisticType).map(e=>e.toJSON());(0,d.sM)(r,n,t)}};(0,n.Cg)([(0,i.MZ)({type:Boolean,json:{write:!0}})],M.prototype,"enabled",void 0),(0,n.Cg)([(0,i.MZ)({type:[f.A],json:{write:!0}})],M.prototype,"fields",void 0),(0,n.Cg)([(0,h.K)("fields")],M.prototype,"writeFields",null),(0,n.Cg)([(0,i.MZ)({type:v,json:{write:!0}})],M.prototype,"latestObservations",void 0),(0,n.Cg)([(0,i.MZ)({type:I.A,json:{write:!0}})],M.prototype,"maxDisplayDuration",void 0),(0,n.Cg)([(0,i.MZ)({type:Number,json:{write:!0}})],M.prototype,"maxDisplayObservationsPerTrack",void 0),(0,n.Cg)([(0,i.MZ)(y.M6)],M.prototype,"popupEnabled",void 0),(0,n.Cg)([(0,i.MZ)({type:u.A,json:{name:"popupInfo",write:!0}})],M.prototype,"popupTemplate",void 0),(0,n.Cg)([(0,i.MZ)({type:v,json:{write:!0}})],M.prototype,"previousObservations",void 0),(0,n.Cg)([(0,i.MZ)({type:v,json:{write:!0}})],M.prototype,"trackLines",void 0),(0,n.Cg)([(0,i.MZ)({type:["timeReceived","startTimeField","endTimeField"],json:{read:!0,write:!0}})],M.prototype,"timeField",void 0),M=(0,n.Cg)([(0,s.$)("esri.layers.support.TrackInfo")],M);const x=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.trackGraphicOrigin=new a(this),this.trackInfo=null}};return(0,n.Cg)([(0,i.MZ)({readOnly:!0,clonable:!1})],r.prototype,"trackGraphicOrigin",void 0),(0,n.Cg)([(0,i.MZ)({type:M})],r.prototype,"trackInfo",void 0),r=(0,n.Cg)([(0,s.$)("esri.layers.mixins.TrackableLayer")],r),r}},64714:(e,t,r)=>{r.d(t,{F0:()=>l,Vx:()=>p,e2:()=>d,f:()=>h});var n=r(44208),i=r(4718),s=r(99352),o=r(93470);function l(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.Cb:"esriGeometryPolyline"===e?o.yM:o.WR}}}const a=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function p(e,t){if((0,n.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 n=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new n}catch(r){return()=>({[t]:null,...e})}}function c(e){return a.test(e)?`.${e}`:`["${e}"]`}function d(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,i.o8)(e)}}]}function h(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}}}},69208:(e,t,r)=>{r.d(t,{d:()=>o});var n=r(31635),i=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,n.Cg)([(0,i.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],r.prototype,"customParameters",void 0),r=(0,n.Cg)([(0,s.$)("esri.layers.mixins.CustomParametersMixin")],r),r}},70328:(e,t,r)=>{r.d(t,{BI:()=>w,DC:()=>c,Ej:()=>h,Ie:()=>g,Jt:()=>v,Ne:()=>f,RF:()=>p,aI:()=>I,fA:()=>o,gE:()=>a,hZ:()=>m,iT:()=>d,is:()=>b,qv:()=>M,vI:()=>y,vY:()=>l,v_:()=>x,vt:()=>s,w1:()=>u});var n=r(5443),i=(r(19419),r(4197));function s(e=x){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function o(e,t,r,n,i,o,l=s()){return l[0]=e,l[1]=t,l[2]=r,l[3]=n,l[4]=i,l[5]=o,l}function l(e,t=s()){return function(e,t,r,n=s()){return m(n,M),function(e,t,r=0,n=t.length/3){let i=e[0],s=e[1],o=e[2],l=e[3],a=e[4],u=e[5];for(let e=0;e<n;e++)i=Math.min(i,t[r+3*e]),s=Math.min(s,t[r+3*e+1]),o=Math.min(o,t[r+3*e+2]),l=Math.max(l,t[r+3*e]),a=Math.max(a,t[r+3*e+1]),u=Math.max(u,t[r+3*e+2]);e[0]=i,e[1]=s,e[2]=o,e[3]=l,e[4]=a,e[5]=u}(n,e,t,r),n}(e,0,e.length/3,t)}function a(e,t=(0,i.jh)(24)){const[r,n,s,o,l,a]=e;return t[0]=r,t[1]=n,t[2]=s,t[3]=r,t[4]=n,t[5]=a,t[6]=r,t[7]=l,t[8]=s,t[9]=r,t[10]=l,t[11]=a,t[12]=o,t[13]=n,t[14]=s,t[15]=o,t[16]=n,t[17]=a,t[18]=o,t[19]=l,t[20]=s,t[21]=o,t[22]=l,t[23]=a,t}function u(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new n.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[3]=Math.max(e[3],t[2]),e[4]=Math.max(e[4],t[3])}function d(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 h(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 f(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 y(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 g(e){return e?m(e,M):s(M)}function v(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,n,i){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=n,e[4]=i,e[5]=Number.POSITIVE_INFINITY,e}function b(e){return 6===e.length}function I(e,t,r){if(null==e||null==t)return e===t;if(!b(e)||!b(t))return!1;if(r){for(let n=0;n<e.length;n++)if(!r(e[n],t[n]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}const M=[1/0,1/0,1/0,-1/0,-1/0,-1/0],x=[0,0,0,0,0,0];s()},73133:(e,t,r)=>{r.d(t,{j:()=>n});const n=(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:()=>a});var n=r(49186),i=r(53966),s=r(46140),o=r(95466),l=r(55674);class a{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&&i.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:d});const h=await(0,l.xR)(e.expression,null,c);if(!h)throw new n.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");const f=!o||!o.greaterEqual(4,0);f&&i.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:o});const y=new u(r,f);return new a(f,p,h,y)}constructor(e,t,r,n){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=n}get itemNames(){return this._itemNames}evaluate(e,t,r,n){try{return this._reader.bind(e,r,n),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 o.A(e);const t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new o.A(t)}}class u extends l.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:()=>h,e:()=>f});var n=r(31635),i=r(10107),s=(r(44208),r(53966),r(87811),r(36005)),o=r(40608),l=r(89317),a=r(30524),u=r(96184),p=r(73133),c=r(79677),d=r(10184);const h={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation",layerContainerTypes:l.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 n=r.timeOffset,i=p.j.fromJSON(r.timeOffsetUnits);return n&&i?new d.A({value:n,unit:i}):null}set timeInfo(e){(0,a.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,n.Cg)([(0,i.MZ)({type:c.A,json:{write:!1}})],r.prototype,"timeExtent",void 0),(0,n.Cg)([(0,i.MZ)({type:d.A})],r.prototype,"timeOffset",void 0),(0,n.Cg)([(0,s.w)("service","timeOffset",["timeInfo.exportOptions"])],r.prototype,"readOffset",null),(0,n.Cg)([(0,i.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,n.Cg)([(0,i.MZ)(h)],r.prototype,"useViewTime",void 0),r=(0,n.Cg)([(0,o.$)("esri.layers.mixins.TemporalLayer")],r),r}},83960:(e,t,r)=>{r.d(t,{X_:()=>o,oW:()=>a,zx:()=>l});var n=r(34727),i=r(83047);const s=96;function o(e,t){const r=t||e.extent,n=e.width,o=(0,i.GA)(r?.spatialReference);return r&&n?r.width/n*o*i.dy*s:0}function l(e,t,r){return function(e,t){return 0===t||(0,n.Sp)(e,t)||e<t}(e,t)&&function(e,t){return 0===t||(0,n.Sp)(e,t)||e>t}(e,r)}function a(e,t){return(0,n.Sp)(e,t)?0:(e||Number.POSITIVE_INFINITY)>(t||Number.POSITIVE_INFINITY)?1:-1}},91880:(e,t,r)=>{r.d(t,{A:()=>p});var n,i=r(31635),s=r(66552),o=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(40608));const u=new s.J({asc:"ascending",desc:"descending"});let p=class extends o.o{static{n=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new n({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,i.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],p.prototype,"field",void 0),(0,i.Cg)([(0,l.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],p.prototype,"valueExpression",void 0),(0,i.Cg)([(0,l.MZ)({type:u.apiValues,json:{type:u.jsonValues,read:u.read,write:u.write}})],p.prototype,"order",void 0),p=n=(0,i.Cg)([(0,a.$)("esri.layers.support.OrderByInfo")],p)},95466:(e,t,r)=>{r.d(t,{A:()=>h});var n=r(49186),i=r(53966),s=r(91869),o=r(3330),l=r(12195),a=r(30524),u=r(98623),p=r(56400),c=r(28097);const d=new Map;class h{static fromJSON(e){return new h(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new h(e.fields??[],g(e))}static fromLayerJSON(e){return new h(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,n=y(t);if(t&&n){const i=f(t);this._fieldsMap.set(t,e),this._fieldsMap.set(i,e),this._normalizedFieldsMap.set(n,e),r.push(`${i}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,a.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,a.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,a.te)(e)||(0,a.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,a.te)(e)||(0,a.Xz)(e)||e.nullable||void 0!==(0,a.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(y(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?(i.A.getLogger("esri.layers.support.FieldsIndex").errorOnce(new n.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):m.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,a.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,l.W)(e)?e.toJSON():e),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function f(e){return e.trim().toLowerCase()}function y(e){return(0,a.rS)(e)?.toLowerCase()??""}const m=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:n,editFieldsInfo:i}=e,s=(n?"startField"in n?n.startField:n.startTimeField:"")??"",o=(n?"endField"in n?n.endField:n.endTimeField:"")??"",l=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,p.ZS)(e.dateFieldsTimeReference):null,a=i?function(e){return"timeZone"in e}(i)?i.timeZone??l:i.dateFieldsTimeReference?(0,p.ZS)(i.dateFieldsTimeReference):l??u.n$:null,c=n?function(e){return"timeZone"in e}(n)?n.timeZone??l:n.timeReference?(0,p.ZS)(n.timeReference):l:null,d=new Map([[f(i?.creationDateField??""),a],[f(i?.editDateField??""),a],[f(s),c],[f(o),c]]);for(const{name:n,type:i}of e.fields)if(m.has(i))t.set(n,u.L5);else if("date"!==i&&"esriFieldTypeDate"!==i)t.set(n,null);else if(r)t.set(n,u.L5);else{const e=d.get(f(n??""))??l;t.set(n,e)}return t}},96184:(e,t,r)=>{r.d(t,{A:()=>f});var n=r(31635),i=r(69540),s=r(25482),o=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),a=r(40608),u=r(43937),p=r(79677),c=r(10184),d=r(56400);function h(e,t){return c.A.fromJSON({value:e,unit:t})}let f=class extends((0,i.OU)(s.o)){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.A.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?h(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?h(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,n.Cg)([(0,o.MZ)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],f.prototype,"cumulative",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],f.prototype,"endField",void 0),(0,n.Cg)([(0,o.MZ)({type:p.A,json:{write:{enabled:!0,allowNull:!0}}})],f.prototype,"fullTimeExtent",void 0),(0,n.Cg)([(0,l.w)("fullTimeExtent",["timeExtent"])],f.prototype,"readFullTimeExtent",null),(0,n.Cg)([(0,u.K)("fullTimeExtent")],f.prototype,"writeFullTimeExtent",null),(0,n.Cg)([(0,o.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"hasLiveData",void 0),(0,n.Cg)([(0,o.MZ)({type:c.A,json:{write:{enabled:!0,allowNull:!0}}})],f.prototype,"interval",void 0),(0,n.Cg)([(0,l.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],f.prototype,"readInterval",null),(0,n.Cg)([(0,u.K)("interval")],f.prototype,"writeInterval",null),(0,n.Cg)([(0,o.MZ)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],f.prototype,"startField",void 0),(0,n.Cg)([(0,o.MZ)((0,d.P6)("timeReference",!0))],f.prototype,"timeZone",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],f.prototype,"trackIdField",void 0),(0,n.Cg)([(0,o.MZ)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],f.prototype,"useTime",void 0),(0,n.Cg)([(0,o.MZ)({type:[Date],json:{read:!1}})],f.prototype,"stops",void 0),f=(0,n.Cg)([(0,a.$)("esri.layers.support.TimeInfo")],f)},98988:(e,t,r)=>{r.r(t),r.d(t,{canProjectWithoutEngine:()=>V,getTransformation:()=>$,getTransformations:()=>L,initializeProjection:()=>Q,isEqualBaseGCS:()=>H,isLoaded:()=>O,isLoadedOrLoad:()=>R,isLoadedOrLoadFor:()=>j,load:()=>P,project:()=>N,projectExtent:()=>se,projectMany:()=>k,projectMultipoint:()=>X,projectOrLoad:()=>D,projectOrLoadMany:()=>G,projectPoint:()=>W,projectPolygon:()=>ne,projectPolyline:()=>te,projectWithZConversion:()=>B,projectWithoutEngine:()=>Y,requiresLoad:()=>Z,test:()=>q,tryProjectWithZConversion:()=>J,unload:()=>U});var n=r(49186),i=r(74887),s=r(62788),o=r(95488),l=r(51850),a=r(21276),u=r(73941),p=r(5443),c=r(48526),d=r(83290),h=r(86738),f=r(39829),y=r(82799),m=r(16930),g=r(9762),v=r(37539);function w(e,t,r,n,i,s){return b[0]=e,b[1]=t,b[2]=r,(0,g.projectBuffer)(b,n,0,i,s,0)}const b=(0,l.vt)();let I=0;class M{static fromGE(e){const t=new M;return t._wkt=e.wkt,t._wkid=e.wkid,t._isInverse=e.isInverse,t}constructor(e){this.uid=I++,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=I++}get wkid(){return this._wkid}set wkid(e){this._wkid=e,this.uid=I++}get isInverse(){return this._isInverse}set isInverse(e){this._isInverse=e,this.uid=I++}getInverse(){const e=new M;return e._wkt=this.wkt,e._wkid=this._wkid,e._isInverse=!this.isInverse,e}}class x{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 x;let r="";for(const n of e.steps){const e=M.fromGE(n);t.steps.push(e),r+=e.uid.toString()+","}return t._cachedProjection={},t._gtlistentry=null,t._chain=r,t}constructor(e){if(this.steps=[],this._cachedProjection={},this._chain="",this._gtlistentry=null,e?.steps)for(const t of e.steps)t instanceof M?this.steps.push(t):this.steps.push(new M({wkid:t.wkid,wkt:t.wkt,isInverse:t.isInverse}))}getInverse(){const e=new x;e.steps=[];for(let t=this.steps.length-1;t>=0;t--){const r=this.steps[t];e.steps.push(r.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,r){this._cachedProjection[x.cacheKey(e,t)]=r}getCachedGeTransformation(e,t){let r="";for(const e of this.steps)r+=e.uid.toString()+",";r!==this._chain&&(this._gtlistentry=null,this._cachedProjection={},this._chain=r);const n=this._cachedProjection[x.cacheKey(e,t)];return void 0===n?null:n}}var T=r(21325),_=r(62815);let F=null,S=null,A=null,C={};const E=new o.I;function O(){return!!F&&(0,d.i)()}function R(){return!!O()||((0,s.gc)(E),P(),!1)}function j(e,t){return!e||!t||V(e,t)||R()}function Z(e,t){return!V(e,t)&&!O()}function P(e){return null==A&&(A=Promise.all([(0,d.l)(),r.e(9930).then(r.bind(r,49930)).then(e=>e.g),r.e(2731).then(r.bind(r,12731))])),A.then(([,t,{hydratedAdapter:r}])=>{(0,i.Te)(e),S=r,F=t.default,F._enableProjection(d.p),E.notify()})}function N(e,t,r=null,n=null){return Array.isArray(e)?0===e.length?[]:((0,a.H)(e),k(S,e,e[0].spatialReference,t,r,n)):((0,a.f)(e),k(S,[e],e.spatialReference,t,r,n)[0])}function k(e,t,r,n,i=null,s=null){if(null==r||null==n)return t;if(V(r,n,i))return t.map(e=>Y(e,r,n));if(null==i&&(0,u.jA)(r))return t.map(e=>Y(e,r,m.A.WGS84)).map(e=>J(e,n));if(null==i&&(0,u.jA)(n))return t.map(e=>J(e,m.A.WGS84)).map(e=>Y(e,m.A.WGS84,n));if(null==i){const e=x.cacheKey(r,n);void 0!==C[e]?i=C[e]:(null==(i=$(r,n,void 0))&&(i=new x),C[e]=i)}if(null==F||null==e)throw new z;return null!=s?F._project(e,t,r,n,i,s):F._project(e,t,r,n,i)}function D(e,t){const r=G([e],t);return null!=r.pending?{pending:r.pending,geometry:null}:null!=r.geometries?{pending:null,geometry:r.geometries[0]}:{pending:null,geometry:null}}function G(e,t){if(!O())for(const r of e)if(null!=r&&!(0,T.aI)(r.spatialReference,t)&&(0,T.fn)(r.spatialReference)&&(0,T.fn)(t)&&!V(r.spatialReference,t))return(0,s.gc)(E),{pending:P(),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)?J(e,t):null)}}function $(e,t,r=null){if(null==e||null==t)return null;if(null==F||null==S)throw new z;const n=F._getTransformation(S,e,t,r,r?.spatialReference);return null!==n?x.fromGE(n):null}function L(e,t,r=null){if(null==F||null==S)throw new z;const n=F._getTransformationBySuitability(S,e,t,r,r?.spatialReference);if(null!==n){const e=[];for(const t of n)e.push(x.fromGE(t));return e}return[]}class z extends n.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function U(){F=null,S=null,A=null,C={}}const q={get loadPromise(){return A}};function J(e,t){try{const r=N(e,t);if(null==r)return null;"xmin"in e&&"xmin"in r&&(r.zmin=e.zmin,r.zmax=e.zmax);const n=(0,_.N)(r.type,e.spatialReference,t);return null!=n&&n(r),r}catch(e){if(!(e instanceof z))throw e;return null}}async function B(e,t,r){const n=e.spatialReference;return null!=n&&null!=t&&await Q(n,t,null,r),J(e,t)}function V(e,t,r){return!r&&(!!(0,T.aI)(e,t)||(0,T.fn)(e)&&(0,T.fn)(t)&&!!(0,v.jd)(e,t))}function H(e,t){if((0,T.aI)(e,t))return!0;if(!(0,T.fn)(e)||!(0,T.fn)(t))return!1;const r=(0,T.oT)(e)||(0,T.K8)(e)||(0,T.x1)(e),n=(0,T.oT)(t)||(0,T.K8)(t)||(0,T.x1)(t);return r&&n}async function Q(e,t,r,n){if(O())return(0,i.NO)(n);if(Array.isArray(e)){for(const{source:t,dest:r,geographicTransformation:i}of e)if(t&&r&&!V(t,r,i))return P(n)}else if(e&&t&&!V(e,t,r))return P(n);return(0,i.NO)(n)}function Y(e,t,r){return e?"x"in e?K(e,t,new h.A,r,0):"xmin"in e?oe(e,t,new p.A,r,0):"rings"in e?ie(e,t,new f.A,r,0):"paths"in e?re(e,t,new y.A,r,0):"points"in e?ee(e,t,new c.A,r,0):null:null}function W(e,t,r=t.spatialReference,n=0){return null!=r&&null!=e.spatialReference&&null!=K(e,e.spatialReference,t,r,n)}function K(e,t,r,n,i){ae[0]=e.x,ae[1]=e.y;const s=e.z;return ae[2]=void 0!==s?s:i,(0,g.projectBuffer)(ae,t,0,ae,n,0)?(r.x=ae[0],r.y=ae[1],r.spatialReference=n,void 0!==s||(0,u.xP)(n)?(r.z=ae[2],r.hasZ=!0):(r.z=void 0,r.hasZ=!1),void 0===e.m?(r.m=void 0,r.hasM=!1):(r.m=e.m,r.hasM=!0),r):null}function X(e,t,r=t.spatialReference,n=0){return null!=e.spatialReference&&null!=r&&null!=ee(e,e.spatialReference,t,r,n)}function ee(e,t,r,n,i){const{points:s,hasZ:o,hasM:l}=e,a=[],p=s.length,c=[];for(const e of s)c.push(e[0],e[1],o?e[2]:i);if(!(0,g.projectBuffer)(c,t,0,c,n,0,p))return null;const d=o||(0,u.xP)(n);for(let e=0;e<p;++e){const t=3*e,r=c[t],n=c[t+1];d&&l?a.push([r,n,c[t+2],s[e][3]]):d?a.push([r,n,c[t+2]]):l?a.push([r,n,s[e][2]]):a.push([r,n])}return r.points=a,r.spatialReference=n,r.hasZ=o,r.hasM=l,r}function te(e,t,r=t.spatialReference,n=0){return null!=e.spatialReference&&null!=r&&null!=re(e,e.spatialReference,t,r,n)}function re(e,t,r,n,i){const{paths:s,hasZ:o,hasM:l}=e,a=[];if(!le(s,o??!1,l??!1,t,a,n,i))return null;const p=o||(0,u.xP)(n);return r.paths=a,r.spatialReference=n,r.hasZ=p,r.hasM=l,r}function ne(e,t,r=t.spatialReference,n=0){return null!=e.spatialReference&&null!=r&&null!=ie(e,e.spatialReference,t,r,n)}function ie(e,t,r,n,i){const{rings:s,hasZ:o,hasM:l}=e,a=[];if(!le(s,o??!1,l??!1,t,a,n,i))return null;const p=o||(0,u.xP)(n);return r.rings=a,r.spatialReference=n,r.hasZ=p,r.hasM=l,r}function se(e,t,r=t.spatialReference,n=0){return null!=e.spatialReference&&null!=r&&null!=oe(e,e.spatialReference,t,r,n)}function oe(e,t,r,n,i){const{xmin:s,ymin:o,xmax:l,ymax:a,hasZ:p,hasM:c}=e;if(!w(s,o,p?e.zmin:i,t,ae,n))return null;const d=p||(0,u.xP)(n);return r.xmin=ae[0],r.ymin=ae[1],d&&(r.zmin=ae[2]),w(l,a,p?e.zmax:i,t,ae,n)?(r.xmax=ae[0],r.ymax=ae[1],d&&(r.zmax=ae[2]),c&&(r.mmin=e.mmin,r.mmax=e.mmax),r.spatialReference=n,r):null}function le(e,t,r,n,i,s,o=0){const l=new Array;for(const r of e)for(const e of r)l.push(e[0],e[1],t?e[2]:o);if(!(0,g.projectBuffer)(l,n,0,l,s,0))return!1;let a=0;i.length=0;const p=t||(0,u.xP)(s);for(const t of e){const e=new Array;for(const n of t)p&&r?e.push([l[a++],l[a++],l[a++],n[3]]):p?e.push([l[a++],l[a++],l[a++]]):r?(e.push([l[a++],l[a++],n[2]]),a++):(e.push([l[a++],l[a++]]),a++);i.push(e)}return!0}const ae=(0,l.vt)()},99352:(e,t,r)=>{r.d(t,{F:()=>n,P:()=>i});const n={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCentroidOnDegeneratedQuantizedGeometry:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!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},i={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}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[788],{10788:(t,e,n)=>{n.d(e,{A:()=>Ze,CharStream:()=>$e,CommonTokenStream:()=>Xe,ParseTreeWalker:()=>Qe,p:()=>Je});var s={763:()=>{}},i={};function r(t){var e=i[t];if(void 0!==e)return e.exports;var n=i[t]={exports:{}};return s[t](n,n.exports,r),n.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var o={};r.d(o,{MG:()=>Q,fr:()=>wt,sR:()=>Ie,Zo:()=>Le,iH:()=>be,rt:()=>Ft,jB:()=>Me,M8:()=>ue,$t:()=>Ne,aq:()=>Ce,pG:()=>vt,eP:()=>Ee,KU:()=>me,zW:()=>Oe,IX:()=>A,mY:()=>k,a7:()=>J,JG:()=>zt,ay:()=>Zt,X2:()=>ie,WU:()=>fe,Uw:()=>xe,gw:()=>Te,iX:()=>Be,re:()=>oe,Pg:()=>qe,tD:()=>le,R$:()=>se,Dj:()=>Bt,m7:()=>z,NZ:()=>F,xo:()=>M,ou:()=>l,qC:()=>He,mD:()=>f,Ay:()=>je});class l{constructor(){this.source=null,this.type=null,this.channel=null,this.start=null,this.stop=null,this.tokenIndex=null,this.line=null,this.column=null,this._text=null}getTokenSource(){return this.source[0]}getInputStream(){return this.source[1]}get text(){return this._text}set text(t){this._text=t}}function a(t,e){if(!Array.isArray(t)||!Array.isArray(e))return!1;if(t===e)return!0;if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(!(t[n]===e[n]||t[n].equals&&t[n].equals(e[n])))return!1;return!0}l.INVALID_TYPE=0,l.EPSILON=-2,l.MIN_USER_TOKEN_TYPE=1,l.EOF=-1,l.DEFAULT_CHANNEL=0,l.HIDDEN_CHANNEL=1;const h=Math.round(Math.random()*Math.pow(2,32));function c(t){if(!t)return 0;const e=typeof t,n="string"===e?t:!("object"!==e||!t.toString)&&t.toString();if(!n)return 0;let s,i;const r=3&n.length,o=n.length-r;let l=h;const a=3432918353,c=461845907;let u=0;for(;u<o;)i=255&n.charCodeAt(u)|(255&n.charCodeAt(++u))<<8|(255&n.charCodeAt(++u))<<16|(255&n.charCodeAt(++u))<<24,++u,i=(65535&i)*a+(((i>>>16)*a&65535)<<16)&4294967295,i=i<<15|i>>>17,i=(65535&i)*c+(((i>>>16)*c&65535)<<16)&4294967295,l^=i,l=l<<13|l>>>19,s=5*(65535&l)+((5*(l>>>16)&65535)<<16)&4294967295,l=27492+(65535&s)+((58964+(s>>>16)&65535)<<16);switch(i=0,r){case 3:i^=(255&n.charCodeAt(u+2))<<16;case 2:i^=(255&n.charCodeAt(u+1))<<8;case 1:i^=255&n.charCodeAt(u),i=(65535&i)*a+(((i>>>16)*a&65535)<<16)&4294967295,i=i<<15|i>>>17,i=(65535&i)*c+(((i>>>16)*c&65535)<<16)&4294967295,l^=i}return l^=n.length,l^=l>>>16,l=2246822507*(65535&l)+((2246822507*(l>>>16)&65535)<<16)&4294967295,l^=l>>>13,l=3266489909*(65535&l)+((3266489909*(l>>>16)&65535)<<16)&4294967295,l^=l>>>16,l>>>0}class u{constructor(){this.count=0,this.hash=0}update(){for(let t=0;t<arguments.length;t++){const e=arguments[t];if(null!=e)if(Array.isArray(e))this.update.apply(this,e);else{let t=0;switch(typeof e){case"undefined":case"function":continue;case"number":case"boolean":t=e;break;case"string":t=c(e);break;default:e.updateHashCode?e.updateHashCode(this):console.log("No updateHashCode for "+e.toString());continue}t*=3432918353,t=t<<15|t>>>17,t*=461845907,this.count=this.count+1;let n=this.hash^t;n=n<<13|n>>>19,n=5*n+3864292196,this.hash=n}}}finish(){let t=this.hash^4*this.count;return t^=t>>>16,t*=2246822507,t^=t>>>13,t*=3266489909,t^=t>>>16,t}static hashStuff(){const t=new u;return t.update.apply(t,arguments),t.finish()}}function d(t){return t?"string"==typeof t?c(t):t.hashCode():-1}function g(t,e){return t&&t.equals?t.equals(e):t===e}function p(t){return null===t?"null":t}function f(t){return Array.isArray(t)?"["+t.map(p).join(", ")+"]":"null"}class x{constructor(t,e){this.buckets=new Array(16),this.threshold=Math.floor(12),this.itemCount=0,this.hashFunction=t||d,this.equalsFunction=e||g}get(t){if(null==t)return t;const e=this._getBucket(t);if(!e)return null;for(const n of e)if(this.equalsFunction(n,t))return n;return null}add(t){return this.getOrAdd(t)===t}getOrAdd(t){this._expand();const e=this._getSlot(t);let n=this.buckets[e];if(!n)return n=[t],this.buckets[e]=n,this.itemCount++,t;for(const e of n)if(this.equalsFunction(e,t))return e;return n.push(t),this.itemCount++,t}has(t){return null!=this.get(t)}values(){return this.buckets.filter(t=>null!=t).flat(1)}toString(){return f(this.values())}get length(){return this.itemCount}_getSlot(t){return this.hashFunction(t)&this.buckets.length-1}_getBucket(t){return this.buckets[this._getSlot(t)]}_expand(){if(this.itemCount<=this.threshold)return;const t=this.buckets,e=2*this.buckets.length;this.buckets=new Array(e),this.threshold=Math.floor(.75*e);for(const e of t)if(e)for(const t of e){const e=this._getSlot(t);let n=this.buckets[e];n||(n=[],this.buckets[e]=n),n.push(t)}}}class T{hashCode(){const t=new u;return this.updateHashCode(t),t.finish()}evaluate(t,e){}evalPrecedence(t,e){return this}static andContext(t,e){if(null===t||t===T.NONE)return e;if(null===e||e===T.NONE)return t;const n=new S(t,e);return 1===n.opnds.length?n.opnds[0]:n}static orContext(t,e){if(null===t)return e;if(null===e)return t;if(t===T.NONE||e===T.NONE)return T.NONE;const n=new m(t,e);return 1===n.opnds.length?n.opnds[0]:n}}class S extends T{constructor(t,e){super();const n=new x;t instanceof S?t.opnds.map(function(t){n.add(t)}):n.add(t),e instanceof S?e.opnds.map(function(t){n.add(t)}):n.add(e);const s=E(n);if(s.length>0){let t=null;s.map(function(e){(null===t||e.precedence<t.precedence)&&(t=e)}),n.add(t)}this.opnds=Array.from(n.values())}equals(t){return this===t||t instanceof S&&a(this.opnds,t.opnds)}updateHashCode(t){t.update(this.opnds,"AND")}evaluate(t,e){for(let n=0;n<this.opnds.length;n++)if(!this.opnds[n].evaluate(t,e))return!1;return!0}evalPrecedence(t,e){let n=!1;const s=[];for(let i=0;i<this.opnds.length;i++){const r=this.opnds[i],o=r.evalPrecedence(t,e);if(n|=o!==r,null===o)return null;o!==T.NONE&&s.push(o)}if(!n)return this;if(0===s.length)return T.NONE;let i=null;return s.map(function(t){i=null===i?t:T.andContext(i,t)}),i}toString(){const t=this.opnds.map(t=>t.toString());return(t.length>3?t.slice(3):t).join("&&")}}class m extends T{constructor(t,e){super();const n=new x;t instanceof m?t.opnds.map(function(t){n.add(t)}):n.add(t),e instanceof m?e.opnds.map(function(t){n.add(t)}):n.add(e);const s=E(n);if(s.length>0){const t=s.sort(function(t,e){return t.compareTo(e)}),e=t[t.length-1];n.add(e)}this.opnds=Array.from(n.values())}equals(t){return this===t||t instanceof m&&a(this.opnds,t.opnds)}updateHashCode(t){t.update(this.opnds,"OR")}evaluate(t,e){for(let n=0;n<this.opnds.length;n++)if(this.opnds[n].evaluate(t,e))return!0;return!1}evalPrecedence(t,e){let n=!1;const s=[];for(let i=0;i<this.opnds.length;i++){const r=this.opnds[i],o=r.evalPrecedence(t,e);if(n|=o!==r,o===T.NONE)return T.NONE;null!==o&&s.push(o)}return n?(s.length,null):this}toString(){const t=this.opnds.map(t=>t.toString());return(t.length>3?t.slice(3):t).join("||")}}function E(t){const e=[];return t.values().map(function(t){t instanceof T.PrecedencePredicate&&e.push(t)}),e}function _(t,e){if(null===t){const t={state:null,alt:null,context:null,semanticContext:null};return e&&(t.reachesIntoOuterContext=0),t}{const n={};return n.state=t.state||null,n.alt=void 0===t.alt?null:t.alt,n.context=t.context||null,n.semanticContext=t.semanticContext||null,e&&(n.reachesIntoOuterContext=t.reachesIntoOuterContext||0,n.precedenceFilterSuppressed=t.precedenceFilterSuppressed||!1),n}}class C{constructor(t,e){this.checkContext(t,e),t=_(t),e=_(e,!0),this.state=null!==t.state?t.state:e.state,this.alt=null!==t.alt?t.alt:e.alt,this.context=null!==t.context?t.context:e.context,this.semanticContext=null!==t.semanticContext?t.semanticContext:null!==e.semanticContext?e.semanticContext:T.NONE,this.reachesIntoOuterContext=e.reachesIntoOuterContext,this.precedenceFilterSuppressed=e.precedenceFilterSuppressed}checkContext(t,e){null!==t.context&&void 0!==t.context||null!==e&&null!==e.context&&void 0!==e.context||(this.context=null)}hashCode(){const t=new u;return this.updateHashCode(t),t.finish()}updateHashCode(t){t.update(this.state.stateNumber,this.alt,this.context,this.semanticContext)}equals(t){return this===t||t instanceof C&&this.state.stateNumber===t.state.stateNumber&&this.alt===t.alt&&(null===this.context?null===t.context:this.context.equals(t.context))&&this.semanticContext.equals(t.semanticContext)&&this.precedenceFilterSuppressed===t.precedenceFilterSuppressed}hashCodeForConfigSet(){const t=new u;return t.update(this.state.stateNumber,this.alt,this.semanticContext),t.finish()}equalsForConfigSet(t){return this===t||t instanceof C&&this.state.stateNumber===t.state.stateNumber&&this.alt===t.alt&&this.semanticContext.equals(t.semanticContext)}toString(){return"("+this.state+","+this.alt+(null!==this.context?",["+this.context.toString()+"]":"")+(this.semanticContext!==T.NONE?","+this.semanticContext.toString():"")+(this.reachesIntoOuterContext>0?",up="+this.reachesIntoOuterContext:"")+")"}}class A{constructor(t,e){this.start=t,this.stop=e}clone(){return new A(this.start,this.stop)}contains(t){return t>=this.start&&t<this.stop}toString(){return this.start===this.stop-1?this.start.toString():this.start.toString()+".."+(this.stop-1).toString()}get length(){return this.stop-this.start}}A.INVALID_INTERVAL=new A(-1,-2);class k{constructor(){this.intervals=null,this.readOnly=!1}first(t){return null===this.intervals||0===this.intervals.length?l.INVALID_TYPE:this.intervals[0].start}addOne(t){this.addInterval(new A(t,t+1))}addRange(t,e){this.addInterval(new A(t,e+1))}addInterval(t){if(null===this.intervals)this.intervals=[],this.intervals.push(t.clone());else{for(let e=0;e<this.intervals.length;e++){const n=this.intervals[e];if(t.stop<n.start)return void this.intervals.splice(e,0,t);if(t.stop===n.start)return void(this.intervals[e]=new A(t.start,n.stop));if(t.start<=n.stop)return this.intervals[e]=new A(Math.min(n.start,t.start),Math.max(n.stop,t.stop)),void this.reduce(e)}this.intervals.push(t.clone())}}addSet(t){return null!==t.intervals&&t.intervals.forEach(t=>this.addInterval(t),this),this}reduce(t){if(t<this.intervals.length-1){const e=this.intervals[t],n=this.intervals[t+1];e.stop>=n.stop?(this.intervals.splice(t+1,1),this.reduce(t)):e.stop>=n.start&&(this.intervals[t]=new A(e.start,n.stop),this.intervals.splice(t+1,1))}}complement(t,e){const n=new k;return n.addInterval(new A(t,e+1)),null!==this.intervals&&this.intervals.forEach(t=>n.removeRange(t)),n}contains(t){if(null===this.intervals)return!1;for(let e=0;e<this.intervals.length;e++)if(this.intervals[e].contains(t))return!0;return!1}removeRange(t){if(t.start===t.stop-1)this.removeOne(t.start);else if(null!==this.intervals){let e=0;for(let n=0;n<this.intervals.length;n++){const n=this.intervals[e];if(t.stop<=n.start)return;if(t.start>n.start&&t.stop<n.stop){this.intervals[e]=new A(n.start,t.start);const s=new A(t.stop,n.stop);return void this.intervals.splice(e,0,s)}t.start<=n.start&&t.stop>=n.stop?(this.intervals.splice(e,1),e-=1):t.start<n.stop?this.intervals[e]=new A(n.start,t.start):t.stop<n.stop&&(this.intervals[e]=new A(t.stop,n.stop)),e+=1}}}removeOne(t){if(null!==this.intervals)for(let e=0;e<this.intervals.length;e++){const n=this.intervals[e];if(t<n.start)return;if(t===n.start&&t===n.stop-1)return void this.intervals.splice(e,1);if(t===n.start)return void(this.intervals[e]=new A(n.start+1,n.stop));if(t===n.stop-1)return void(this.intervals[e]=new A(n.start,n.stop-1));if(t<n.stop-1){const s=new A(n.start,t);return n.start=t+1,void this.intervals.splice(e,0,s)}}}toString(t,e,n){return t=t||null,e=e||null,n=n||!1,null===this.intervals?"{}":null!==t||null!==e?this.toTokenString(t,e):n?this.toCharString():this.toIndexString()}toCharString(){const t=[];for(let e=0;e<this.intervals.length;e++){const n=this.intervals[e];n.stop===n.start+1?n.start===l.EOF?t.push("<EOF>"):t.push("'"+String.fromCharCode(n.start)+"'"):t.push("'"+String.fromCharCode(n.start)+"'..'"+String.fromCharCode(n.stop-1)+"'")}return t.length>1?"{"+t.join(", ")+"}":t[0]}toIndexString(){const t=[];for(let e=0;e<this.intervals.length;e++){const n=this.intervals[e];n.stop===n.start+1?n.start===l.EOF?t.push("<EOF>"):t.push(n.start.toString()):t.push(n.start.toString()+".."+(n.stop-1).toString())}return t.length>1?"{"+t.join(", ")+"}":t[0]}toTokenString(t,e){const n=[];for(let s=0;s<this.intervals.length;s++){const i=this.intervals[s];for(let s=i.start;s<i.stop;s++)n.push(this.elementName(t,e,s))}return n.length>1?"{"+n.join(", ")+"}":n[0]}elementName(t,e,n){return n===l.EOF?"<EOF>":n===l.EPSILON?"<EPSILON>":t[n]||e[n]}get length(){return this.intervals.map(t=>t.length).reduce((t,e)=>t+e)}}class N{constructor(){this.atn=null,this.stateNumber=N.INVALID_STATE_NUMBER,this.stateType=null,this.ruleIndex=0,this.epsilonOnlyTransitions=!1,this.transitions=[],this.nextTokenWithinRule=null}toString(){return this.stateNumber}equals(t){return t instanceof N&&this.stateNumber===t.stateNumber}isNonGreedyExitState(){return!1}addTransition(t,e){void 0===e&&(e=-1),0===this.transitions.length?this.epsilonOnlyTransitions=t.isEpsilon:this.epsilonOnlyTransitions!==t.isEpsilon&&(this.epsilonOnlyTransitions=!1),-1===e?this.transitions.push(t):this.transitions.splice(e,1,t)}}N.INVALID_TYPE=0,N.BASIC=1,N.RULE_START=2,N.BLOCK_START=3,N.PLUS_BLOCK_START=4,N.STAR_BLOCK_START=5,N.TOKEN_START=6,N.RULE_STOP=7,N.BLOCK_END=8,N.STAR_LOOP_BACK=9,N.STAR_LOOP_ENTRY=10,N.PLUS_LOOP_BACK=11,N.LOOP_END=12,N.serializationNames=["INVALID","BASIC","RULE_START","BLOCK_START","PLUS_BLOCK_START","STAR_BLOCK_START","TOKEN_START","RULE_STOP","BLOCK_END","STAR_LOOP_BACK","STAR_LOOP_ENTRY","PLUS_LOOP_BACK","LOOP_END"],N.INVALID_STATE_NUMBER=-1;class I extends N{constructor(){return super(),this.stateType=N.RULE_STOP,this}}class y{constructor(t){if(null==t)throw"target cannot be null.";this.target=t,this.isEpsilon=!1,this.label=null}}y.EPSILON=1,y.RANGE=2,y.RULE=3,y.PREDICATE=4,y.ATOM=5,y.ACTION=6,y.SET=7,y.NOT_SET=8,y.WILDCARD=9,y.PRECEDENCE=10,y.serializationNames=["INVALID","EPSILON","RANGE","RULE","PREDICATE","ATOM","ACTION","SET","NOT_SET","WILDCARD","PRECEDENCE"],y.serializationTypes={EpsilonTransition:y.EPSILON,RangeTransition:y.RANGE,RuleTransition:y.RULE,PredicateTransition:y.PREDICATE,AtomTransition:y.ATOM,ActionTransition:y.ACTION,SetTransition:y.SET,NotSetTransition:y.NOT_SET,WildcardTransition:y.WILDCARD,PrecedencePredicateTransition:y.PRECEDENCE};class L extends y{constructor(t,e,n,s){super(t),this.ruleIndex=e,this.precedence=n,this.followState=s,this.serializationType=y.RULE,this.isEpsilon=!0}matches(t,e,n){return!1}}class O extends y{constructor(t,e){super(t),this.serializationType=y.SET,null!=e?this.label=e:(this.label=new k,this.label.addOne(l.INVALID_TYPE))}matches(t,e,n){return this.label.contains(t)}toString(){return this.label.toString()}}class R extends O{constructor(t,e){super(t,e),this.serializationType=y.NOT_SET}matches(t,e,n){return t>=e&&t<=n&&!super.matches(t,e,n)}toString(){return"~"+super.toString()}}class w extends y{constructor(t){super(t),this.serializationType=y.WILDCARD}matches(t,e,n){return t>=e&&t<=n}toString(){return"."}}class v extends y{constructor(t){super(t)}}class b{}class P extends b{}class D extends P{}class F extends D{get ruleContext(){throw new Error("missing interface implementation")}}class M extends D{}class U extends M{}const B={toStringTree:function(t,e,n){e=e||null,null!==(n=n||null)&&(e=n.ruleNames);let s=B.getNodeText(t,e);s=function(t){return t.replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r")}(s);const i=t.getChildCount();if(0===i)return s;let r="("+s+" ";i>0&&(s=B.toStringTree(t.getChild(0),e),r=r.concat(s));for(let n=1;n<i;n++)s=B.toStringTree(t.getChild(n),e),r=r.concat(" "+s);return r=r.concat(")"),r},getNodeText:function(t,e,n){if(e=e||null,null!==(n=n||null)&&(e=n.ruleNames),null!==e){if(t instanceof F){const n=t.ruleContext.getAltNumber();return 0!=n?e[t.ruleIndex]+":"+n:e[t.ruleIndex]}if(t instanceof U)return t.toString();if(t instanceof M&&null!==t.symbol)return t.symbol.text}const s=t.getPayload();return s instanceof l?s.text:t.getPayload().toString()},getChildren:function(t){const e=[];for(let n=0;n<t.getChildCount();n++)e.push(t.getChild(n));return e},getAncestors:function(t){let e=[];for(t=t.getParent();null!==t;)e=[t].concat(e),t=t.getParent();return e},findAllTokenNodes:function(t,e){return B.findAllNodes(t,e,!0)},findAllRuleNodes:function(t,e){return B.findAllNodes(t,e,!1)},findAllNodes:function(t,e,n){const s=[];return B._findAllNodes(t,e,n,s),s},_findAllNodes:function(t,e,n,s){n&&t instanceof M?t.symbol.type===e&&s.push(t):!n&&t instanceof F&&t.ruleIndex===e&&s.push(t);for(let i=0;i<t.getChildCount();i++)B._findAllNodes(t.getChild(i),e,n,s)},descendants:function(t){let e=[t];for(let n=0;n<t.getChildCount();n++)e=e.concat(B.descendants(t.getChild(n)));return e}},V=B;class z extends F{constructor(t,e){super(),this.parentCtx=t||null,this.invokingState=e||-1}depth(){let t=0,e=this;for(;null!==e;)e=e.parentCtx,t+=1;return t}isEmpty(){return-1===this.invokingState}getSourceInterval(){return A.INVALID_INTERVAL}get ruleContext(){return this}getPayload(){return this}getText(){return 0===this.getChildCount()?"":this.children.map(function(t){return t.getText()}).join("")}getAltNumber(){return 0}setAltNumber(t){}getChild(t){return null}getChildCount(){return 0}accept(t){return t.visitChildren(this)}toStringTree(t,e){return V.toStringTree(this,t,e)}toString(t,e){t=t||null,e=e||null;let n=this,s="[";for(;null!==n&&n!==e;){if(null===t)n.isEmpty()||(s+=n.invokingState);else{const e=n.ruleIndex;s+=e>=0&&e<t.length?t[e]:""+e}null===n.parentCtx||null===t&&n.parentCtx.isEmpty()||(s+=" "),n=n.parentCtx}return s+="]",s}}class q{constructor(t){this.cachedHashCode=t}isEmpty(){return this===q.EMPTY}hasEmptyPath(){return this.getReturnState(this.length-1)===q.EMPTY_RETURN_STATE}hashCode(){return this.cachedHashCode}updateHashCode(t){t.update(this.cachedHashCode)}}q.EMPTY=null,q.EMPTY_RETURN_STATE=2147483647,q.globalNodeCount=1,q.id=q.globalNodeCount,q.trace_atn_sim=!1;class H extends q{constructor(t,e){const n=new u;return n.update(t,e),super(n.finish()),this.parents=t,this.returnStates=e,this}isEmpty(){return this.returnStates[0]===q.EMPTY_RETURN_STATE}getParent(t){return this.parents[t]}getReturnState(t){return this.returnStates[t]}equals(t){return this===t||t instanceof H&&this.hashCode()===t.hashCode()&&a(this.returnStates,t.returnStates)&&a(this.parents,t.parents)}toString(){if(this.isEmpty())return"[]";{let t="[";for(let e=0;e<this.returnStates.length;e++)e>0&&(t+=", "),this.returnStates[e]!==q.EMPTY_RETURN_STATE?(t+=this.returnStates[e],null!==this.parents[e]?t=t+" "+this.parents[e]:t+="null"):t+="$";return t+"]"}}get length(){return this.returnStates.length}}class K extends q{constructor(t,e){let n=0;const s=new u;null!==t?s.update(t,e):s.update(1),n=s.finish(),super(n),this.parentCtx=t,this.returnState=e}getParent(t){return this.parentCtx}getReturnState(t){return this.returnState}equals(t){return this===t||t instanceof K&&this.hashCode()===t.hashCode()&&this.returnState===t.returnState&&(null==this.parentCtx?null==t.parentCtx:this.parentCtx.equals(t.parentCtx))}toString(){const t=null===this.parentCtx?"":this.parentCtx.toString();return 0===t.length?this.returnState===q.EMPTY_RETURN_STATE?"$":""+this.returnState:this.returnState+" "+t}get length(){return 1}static create(t,e){return e===q.EMPTY_RETURN_STATE&&null===t?q.EMPTY:new K(t,e)}}class Y extends K{constructor(){super(null,q.EMPTY_RETURN_STATE)}isEmpty(){return!0}getParent(t){return null}getReturnState(t){return this.returnState}equals(t){return this===t}toString(){return"$"}}q.EMPTY=new Y;class G{constructor(t,e){this.buckets=new Array(16),this.threshold=Math.floor(12),this.itemCount=0,this.hashFunction=t||d,this.equalsFunction=e||g}set(t,e){this._expand();const n=this._getSlot(t);let s=this.buckets[n];if(!s)return s=[[t,e]],this.buckets[n]=s,this.itemCount++,e;const i=s.find(e=>this.equalsFunction(e[0],t),this);if(i){const t=i[1];return i[1]=e,t}return s.push([t,e]),this.itemCount++,e}containsKey(t){const e=this._getBucket(t);return!!e&&!!e.find(e=>this.equalsFunction(e[0],t),this)}get(t){const e=this._getBucket(t);if(!e)return null;const n=e.find(e=>this.equalsFunction(e[0],t),this);return n?n[1]:null}entries(){return this.buckets.filter(t=>null!=t).flat(1)}getKeys(){return this.entries().map(t=>t[0])}getValues(){return this.entries().map(t=>t[1])}toString(){return"["+this.entries().map(t=>"{"+t[0]+":"+t[1]+"}").join(", ")+"]"}get length(){return this.itemCount}_getSlot(t){return this.hashFunction(t)&this.buckets.length-1}_getBucket(t){return this.buckets[this._getSlot(t)]}_expand(){if(this.itemCount<=this.threshold)return;const t=this.buckets,e=2*this.buckets.length;this.buckets=new Array(e),this.threshold=Math.floor(.75*e);for(const e of t)if(e)for(const t of e){const e=this._getSlot(t[0]);let n=this.buckets[e];n||(n=[],this.buckets[e]=n),n.push(t)}}}function W(t,e){if(null==e&&(e=z.EMPTY),null===e.parentCtx||e===z.EMPTY)return q.EMPTY;const n=W(t,e.parentCtx),s=t.states[e.invokingState].transitions[0];return K.create(n,s.followState.stateNumber)}function j(t,e,n){if(t.isEmpty())return t;let s=n.get(t)||null;if(null!==s)return s;if(s=e.get(t),null!==s)return n.set(t,s),s;let i=!1,r=[];for(let s=0;s<r.length;s++){const o=j(t.getParent(s),e,n);if(i||o!==t.getParent(s)){if(!i){r=[];for(let e=0;e<t.length;e++)r[e]=t.getParent(e);i=!0}r[s]=o}}if(!i)return e.add(t),n.set(t,t),t;let o=null;return o=0===r.length?q.EMPTY:1===r.length?K.create(r[0],t.getReturnState(0)):new H(r,t.returnStates),e.add(o),n.set(o,o),n.set(t,o),o}function $(t,e,n,s){if(t===e)return t;if(t instanceof K&&e instanceof K)return function(t,e,n,s){if(null!==s){let n=s.get(t,e);if(null!==n)return n;if(n=s.get(e,t),null!==n)return n}const i=function(t,e,n){if(n){if(t===q.EMPTY)return q.EMPTY;if(e===q.EMPTY)return q.EMPTY}else{if(t===q.EMPTY&&e===q.EMPTY)return q.EMPTY;if(t===q.EMPTY){const t=[e.returnState,q.EMPTY_RETURN_STATE],n=[e.parentCtx,null];return new H(n,t)}if(e===q.EMPTY){const e=[t.returnState,q.EMPTY_RETURN_STATE],n=[t.parentCtx,null];return new H(n,e)}}return null}(t,e,n);if(null!==i)return null!==s&&s.set(t,e,i),i;if(t.returnState===e.returnState){const i=$(t.parentCtx,e.parentCtx,n,s);if(i===t.parentCtx)return t;if(i===e.parentCtx)return e;const r=K.create(i,t.returnState);return null!==s&&s.set(t,e,r),r}{let n=null;if((t===e||null!==t.parentCtx&&t.parentCtx===e.parentCtx)&&(n=t.parentCtx),null!==n){const i=[t.returnState,e.returnState];t.returnState>e.returnState&&(i[0]=e.returnState,i[1]=t.returnState);const r=new H([n,n],i);return null!==s&&s.set(t,e,r),r}const i=[t.returnState,e.returnState];let r=[t.parentCtx,e.parentCtx];t.returnState>e.returnState&&(i[0]=e.returnState,i[1]=t.returnState,r=[e.parentCtx,t.parentCtx]);const o=new H(r,i);return null!==s&&s.set(t,e,o),o}}(t,e,n,s);if(n){if(t instanceof Y)return t;if(e instanceof Y)return e}return t instanceof K&&(t=new H([t.getParent()],[t.returnState])),e instanceof K&&(e=new H([e.getParent()],[e.returnState])),function(t,e,n,s){if(null!==s){let n=s.get(t,e);if(null!==n)return q.trace_atn_sim&&console.log("mergeArrays a="+t+",b="+e+" -> previous"),n;if(n=s.get(e,t),null!==n)return q.trace_atn_sim&&console.log("mergeArrays a="+t+",b="+e+" -> previous"),n}let i=0,r=0,o=0,l=new Array(t.returnStates.length+e.returnStates.length).fill(0),a=new Array(t.returnStates.length+e.returnStates.length).fill(null);for(;i<t.returnStates.length&&r<e.returnStates.length;){const h=t.parents[i],c=e.parents[r];if(t.returnStates[i]===e.returnStates[r]){const e=t.returnStates[i];e===q.EMPTY_RETURN_STATE&&null===h&&null===c||null!==h&&null!==c&&h===c?(a[o]=h,l[o]=e):(a[o]=$(h,c,n,s),l[o]=e),i+=1,r+=1}else t.returnStates[i]<e.returnStates[r]?(a[o]=h,l[o]=t.returnStates[i],i+=1):(a[o]=c,l[o]=e.returnStates[r],r+=1);o+=1}if(i<t.returnStates.length)for(let e=i;e<t.returnStates.length;e++)a[o]=t.parents[e],l[o]=t.returnStates[e],o+=1;else for(let t=r;t<e.returnStates.length;t++)a[o]=e.parents[t],l[o]=e.returnStates[t],o+=1;if(o<a.length){if(1===o){const n=K.create(a[0],l[0]);return null!==s&&s.set(t,e,n),n}a=a.slice(0,o),l=l.slice(0,o)}const h=new H(a,l);return h.equals(t)?(null!==s&&s.set(t,e,t),q.trace_atn_sim&&console.log("mergeArrays a="+t+",b="+e+" -> a"),t):h.equals(e)?(null!==s&&s.set(t,e,e),q.trace_atn_sim&&console.log("mergeArrays a="+t+",b="+e+" -> b"),e):(function(t){const e=new G;for(let n=0;n<t.length;n++){const s=t[n];e.containsKey(s)||e.set(s,s)}for(let n=0;n<t.length;n++)t[n]=e.get(t[n])}(a),null!==s&&s.set(t,e,h),q.trace_atn_sim&&console.log("mergeArrays a="+t+",b="+e+" -> "+h),h)}(t,e,n,s)}class X{constructor(){this.data=new Uint32Array(1)}set(t){X._checkIndex(t),this._resize(t),this.data[t>>>5]|=1<<t%32}get(t){X._checkIndex(t);const e=t>>>5;return!(e>=this.data.length||!(this.data[e]&1<<t%32))}clear(t){X._checkIndex(t);const e=t>>>5;e<this.data.length&&(this.data[e]&=~(1<<t))}or(t){const e=Math.min(this.data.length,t.data.length);for(let n=0;n<e;++n)this.data[n]|=t.data[n];if(this.data.length<t.data.length){this._resize((t.data.length<<5)-1);const n=t.data.length;for(let s=e;s<n;++s)this.data[s]=t.data[s]}}values(){const t=new Array(this.length);let e=0;const n=this.data.length;for(let s=0;s<n;++s){let n=this.data[s];for(;0!==n;){const i=n&-n;t[e++]=(s<<5)+X._bitCount(i-1),n^=i}}return t}minValue(){for(let t=0;t<this.data.length;++t){let e=this.data[t];if(0!==e){let n=0;for(;!(1&e);)n++,e>>=1;return n+32*t}}return 0}hashCode(){return u.hashStuff(this.values())}equals(t){return t instanceof X&&a(this.data,t.data)}toString(){return"{"+this.values().join(", ")+"}"}get length(){return this.data.map(t=>X._bitCount(t)).reduce((t,e)=>t+e,0)}_resize(t){const e=t+32>>>5;if(e<=this.data.length)return;const n=new Uint32Array(e);n.set(this.data),n.fill(0,this.data.length),this.data=n}static _checkIndex(t){if(t<0)throw new RangeError("index cannot be negative")}static _bitCount(t){return t=(t=(858993459&(t-=t>>1&1431655765))+(t>>2&858993459))+(t>>4)&252645135,t+=t>>8,0+(t+=t>>16)&63}}class J{constructor(t){this.atn=t}getDecisionLookahead(t){if(null===t)return null;const e=t.transitions.length,n=[];for(let s=0;s<e;s++){n[s]=new k;const e=new x,i=!1;this._LOOK(t.transition(s).target,null,q.EMPTY,n[s],e,new X,i,!1),(0===n[s].length||n[s].contains(J.HIT_PRED))&&(n[s]=null)}return n}LOOK(t,e,n){const s=new k,i=null!==(n=n||null)?W(t.atn,n):null;return this._LOOK(t,e,i,s,new x,new X,!0,!0),s}_LOOK(t,e,n,s,i,r,o,a){const h=new C({state:t,alt:0,context:n},null);if(!i.has(h)){if(i.add(h),t===e){if(null===n)return void s.addOne(l.EPSILON);if(n.isEmpty()&&a)return void s.addOne(l.EOF)}if(t instanceof I){if(null===n)return void s.addOne(l.EPSILON);if(n.isEmpty()&&a)return void s.addOne(l.EOF);if(n!==q.EMPTY){const l=r.get(t.ruleIndex);try{r.clear(t.ruleIndex);for(let t=0;t<n.length;t++){const l=this.atn.states[n.getReturnState(t)];this._LOOK(l,e,n.getParent(t),s,i,r,o,a)}}finally{l&&r.set(t.ruleIndex)}return}}for(let h=0;h<t.transitions.length;h++){const c=t.transitions[h];if(c.constructor===L){if(r.get(c.target.ruleIndex))continue;const t=K.create(n,c.followState.stateNumber);try{r.set(c.target.ruleIndex),this._LOOK(c.target,e,t,s,i,r,o,a)}finally{r.clear(c.target.ruleIndex)}}else if(c instanceof v)o?this._LOOK(c.target,e,n,s,i,r,o,a):s.addOne(J.HIT_PRED);else if(c.isEpsilon)this._LOOK(c.target,e,n,s,i,r,o,a);else if(c.constructor===w)s.addRange(l.MIN_USER_TOKEN_TYPE,this.atn.maxTokenType);else{let t=c.label;null!==t&&(c instanceof R&&(t=t.complement(l.MIN_USER_TOKEN_TYPE,this.atn.maxTokenType)),s.addSet(t))}}}}}J.HIT_PRED=l.INVALID_TYPE;class Q{constructor(t,e){this.grammarType=t,this.maxTokenType=e,this.states=[],this.decisionToState=[],this.ruleToStartState=[],this.ruleToStopState=null,this.modeNameToStartState={},this.ruleToTokenType=null,this.lexerActions=null,this.modeToStartState=[]}nextTokensInContext(t,e){return new J(this).LOOK(t,null,e)}nextTokensNoContext(t){return null!==t.nextTokenWithinRule||(t.nextTokenWithinRule=this.nextTokensInContext(t,null),t.nextTokenWithinRule.readOnly=!0),t.nextTokenWithinRule}nextTokens(t,e){return void 0===e?this.nextTokensNoContext(t):this.nextTokensInContext(t,e)}addState(t){null!==t&&(t.atn=this,t.stateNumber=this.states.length),this.states.push(t)}removeState(t){this.states[t.stateNumber]=null}defineDecisionState(t){return this.decisionToState.push(t),t.decision=this.decisionToState.length-1,t.decision}getDecisionState(t){return 0===this.decisionToState.length?null:this.decisionToState[t]}getExpectedTokens(t,e){if(t<0||t>=this.states.length)throw"Invalid state number.";const n=this.states[t];let s=this.nextTokens(n);if(!s.contains(l.EPSILON))return s;const i=new k;for(i.addSet(s),i.removeOne(l.EPSILON);null!==e&&e.invokingState>=0&&s.contains(l.EPSILON);){const t=this.states[e.invokingState].transitions[0];s=this.nextTokens(t.followState),i.addSet(s),i.removeOne(l.EPSILON),e=e.parentCtx}return s.contains(l.EPSILON)&&i.addOne(l.EOF),i}}Q.INVALID_ALT_NUMBER=0;class Z extends N{constructor(){super(),this.stateType=N.BASIC}}class tt extends N{constructor(){return super(),this.decision=-1,this.nonGreedy=!1,this}}class et extends tt{constructor(){return super(),this.endState=null,this}}class nt extends N{constructor(){return super(),this.stateType=N.BLOCK_END,this.startState=null,this}}class st extends N{constructor(){return super(),this.stateType=N.LOOP_END,this.loopBackState=null,this}}class it extends N{constructor(){return super(),this.stateType=N.RULE_START,this.stopState=null,this.isPrecedenceRule=!1,this}}class rt extends tt{constructor(){return super(),this.stateType=N.TOKEN_START,this}}class ot extends tt{constructor(){return super(),this.stateType=N.PLUS_LOOP_BACK,this}}class lt extends N{constructor(){return super(),this.stateType=N.STAR_LOOP_BACK,this}}class at extends tt{constructor(){return super(),this.stateType=N.STAR_LOOP_ENTRY,this.loopBackState=null,this.isPrecedenceDecision=null,this}}class ht extends et{constructor(){return super(),this.stateType=N.PLUS_BLOCK_START,this.loopBackState=null,this}}class ct extends et{constructor(){return super(),this.stateType=N.STAR_BLOCK_START,this}}class ut extends et{constructor(){return super(),this.stateType=N.BLOCK_START,this}}class dt extends y{constructor(t,e){super(t),this.label_=e,this.label=this.makeLabel(),this.serializationType=y.ATOM}makeLabel(){const t=new k;return t.addOne(this.label_),t}matches(t,e,n){return this.label_===t}toString(){return this.label_}}class gt extends y{constructor(t,e,n){super(t),this.serializationType=y.RANGE,this.start=e,this.stop=n,this.label=this.makeLabel()}makeLabel(){const t=new k;return t.addRange(this.start,this.stop),t}matches(t,e,n){return t>=this.start&&t<=this.stop}toString(){return"'"+String.fromCharCode(this.start)+"'..'"+String.fromCharCode(this.stop)+"'"}}class pt extends y{constructor(t,e,n,s){super(t),this.serializationType=y.ACTION,this.ruleIndex=e,this.actionIndex=void 0===n?-1:n,this.isCtxDependent=void 0!==s&&s,this.isEpsilon=!0}matches(t,e,n){return!1}toString(){return"action_"+this.ruleIndex+":"+this.actionIndex}}class ft extends y{constructor(t,e){super(t),this.serializationType=y.EPSILON,this.isEpsilon=!0,this.outermostPrecedenceReturn=e}matches(t,e,n){return!1}toString(){return"epsilon"}}class xt extends T{constructor(t,e,n){super(),this.ruleIndex=void 0===t?-1:t,this.predIndex=void 0===e?-1:e,this.isCtxDependent=void 0!==n&&n}evaluate(t,e){const n=this.isCtxDependent?e:null;return t.sempred(n,this.ruleIndex,this.predIndex)}updateHashCode(t){t.update(this.ruleIndex,this.predIndex,this.isCtxDependent)}equals(t){return this===t||t instanceof xt&&this.ruleIndex===t.ruleIndex&&this.predIndex===t.predIndex&&this.isCtxDependent===t.isCtxDependent}toString(){return"{"+this.ruleIndex+":"+this.predIndex+"}?"}}T.NONE=new xt;class Tt extends v{constructor(t,e,n,s){super(t),this.serializationType=y.PREDICATE,this.ruleIndex=e,this.predIndex=n,this.isCtxDependent=s,this.isEpsilon=!0}matches(t,e,n){return!1}getPredicate(){return new xt(this.ruleIndex,this.predIndex,this.isCtxDependent)}toString(){return"pred_"+this.ruleIndex+":"+this.predIndex}}class St extends T{constructor(t){super(),this.precedence=void 0===t?0:t}evaluate(t,e){return t.precpred(e,this.precedence)}evalPrecedence(t,e){return t.precpred(e,this.precedence)?T.NONE:null}compareTo(t){return this.precedence-t.precedence}updateHashCode(t){t.update(this.precedence)}equals(t){return this===t||t instanceof St&&this.precedence===t.precedence}toString(){return"{"+this.precedence+">=prec}?"}}T.PrecedencePredicate=St;class mt extends v{constructor(t,e){super(t),this.serializationType=y.PRECEDENCE,this.precedence=e,this.isEpsilon=!0}matches(t,e,n){return!1}getPredicate(){return new St(this.precedence)}toString(){return this.precedence+" >= _p"}}class Et{constructor(t){void 0===t&&(t=null),this.readOnly=!1,this.verifyATN=null===t||t.verifyATN,this.generateRuleBypassTransitions=null!==t&&t.generateRuleBypassTransitions}}Et.defaultOptions=new Et,Et.defaultOptions.readOnly=!0;class _t{constructor(t){this.actionType=t,this.isPositionDependent=!1}hashCode(){const t=new u;return this.updateHashCode(t),t.finish()}updateHashCode(t){t.update(this.actionType)}equals(t){return this===t}}class Ct extends _t{constructor(){super(6)}execute(t){t.skip()}toString(){return"skip"}}Ct.INSTANCE=new Ct;class At extends _t{constructor(t){super(0),this.channel=t}execute(t){t._channel=this.channel}updateHashCode(t){t.update(this.actionType,this.channel)}equals(t){return this===t||t instanceof At&&this.channel===t.channel}toString(){return"channel("+this.channel+")"}}class kt extends _t{constructor(t,e){super(1),this.ruleIndex=t,this.actionIndex=e,this.isPositionDependent=!0}execute(t){t.action(null,this.ruleIndex,this.actionIndex)}updateHashCode(t){t.update(this.actionType,this.ruleIndex,this.actionIndex)}equals(t){return this===t||t instanceof kt&&this.ruleIndex===t.ruleIndex&&this.actionIndex===t.actionIndex}}class Nt extends _t{constructor(){super(3)}execute(t){t.more()}toString(){return"more"}}Nt.INSTANCE=new Nt;class It extends _t{constructor(t){super(7),this.type=t}execute(t){t.type=this.type}updateHashCode(t){t.update(this.actionType,this.type)}equals(t){return this===t||t instanceof It&&this.type===t.type}toString(){return"type("+this.type+")"}}class yt extends _t{constructor(t){super(5),this.mode=t}execute(t){t.pushMode(this.mode)}updateHashCode(t){t.update(this.actionType,this.mode)}equals(t){return this===t||t instanceof yt&&this.mode===t.mode}toString(){return"pushMode("+this.mode+")"}}class Lt extends _t{constructor(){super(4)}execute(t){t.popMode()}toString(){return"popMode"}}Lt.INSTANCE=new Lt;class Ot extends _t{constructor(t){super(2),this.mode=t}execute(t){t.setMode(this.mode)}updateHashCode(t){t.update(this.actionType,this.mode)}equals(t){return this===t||t instanceof Ot&&this.mode===t.mode}toString(){return"mode("+this.mode+")"}}function Rt(t,e){const n=[];return n[t-1]=e,n.map(function(t){return e})}class wt{constructor(t){null==t&&(t=Et.defaultOptions),this.deserializationOptions=t,this.stateFactories=null,this.actionFactories=null}deserialize(t){const e=this.reset(t);this.checkVersion(e),e&&this.skipUUID();const n=this.readATN();this.readStates(n,e),this.readRules(n,e),this.readModes(n);const s=[];return this.readSets(n,s,this.readInt.bind(this)),e&&this.readSets(n,s,this.readInt32.bind(this)),this.readEdges(n,s),this.readDecisions(n),this.readLexerActions(n,e),this.markPrecedenceDecisions(n),this.verifyATN(n),this.deserializationOptions.generateRuleBypassTransitions&&1===n.grammarType&&(this.generateRuleBypassTransitions(n),this.verifyATN(n)),n}reset(t){if(3===(t.charCodeAt?t.charCodeAt(0):t[0])){const e=function(t){const e=t.charCodeAt(0);return e>1?e-2:e+65534},n=t.split("").map(e);return n[0]=t.charCodeAt(0),this.data=n,this.pos=0,!0}return this.data=t,this.pos=0,!1}skipUUID(){let t=0;for(;t++<8;)this.readInt()}checkVersion(t){const e=this.readInt();if(!t&&4!==e)throw"Could not deserialize ATN with version "+e+" (expected 4)."}readATN(){const t=this.readInt(),e=this.readInt();return new Q(t,e)}readStates(t,e){let n,s,i;const r=[],o=[],l=this.readInt();for(let n=0;n<l;n++){const n=this.readInt();if(n===N.INVALID_TYPE){t.addState(null);continue}let s=this.readInt();e&&65535===s&&(s=-1);const i=this.stateFactory(n,s);if(n===N.LOOP_END){const t=this.readInt();r.push([i,t])}else if(i instanceof et){const t=this.readInt();o.push([i,t])}t.addState(i)}for(n=0;n<r.length;n++)s=r[n],s[0].loopBackState=t.states[s[1]];for(n=0;n<o.length;n++)s=o[n],s[0].endState=t.states[s[1]];let a=this.readInt();for(n=0;n<a;n++)i=this.readInt(),t.states[i].nonGreedy=!0;let h=this.readInt();for(n=0;n<h;n++)i=this.readInt(),t.states[i].isPrecedenceRule=!0}readRules(t,e){let n;const s=this.readInt();for(0===t.grammarType&&(t.ruleToTokenType=Rt(s,0)),t.ruleToStartState=Rt(s,0),n=0;n<s;n++){const s=this.readInt();if(t.ruleToStartState[n]=t.states[s],0===t.grammarType){let s=this.readInt();e&&65535===s&&(s=l.EOF),t.ruleToTokenType[n]=s}}for(t.ruleToStopState=Rt(s,0),n=0;n<t.states.length;n++){const e=t.states[n];e instanceof I&&(t.ruleToStopState[e.ruleIndex]=e,t.ruleToStartState[e.ruleIndex].stopState=e)}}readModes(t){const e=this.readInt();for(let n=0;n<e;n++){let e=this.readInt();t.modeToStartState.push(t.states[e])}}readSets(t,e,n){const s=this.readInt();for(let t=0;t<s;t++){const t=new k;e.push(t);const s=this.readInt();0!==this.readInt()&&t.addOne(-1);for(let e=0;e<s;e++){const e=n(),s=n();t.addRange(e,s)}}}readEdges(t,e){let n,s,i,r,o;const l=this.readInt();for(n=0;n<l;n++){const n=this.readInt(),s=this.readInt(),i=this.readInt(),o=this.readInt(),l=this.readInt(),a=this.readInt();r=this.edgeFactory(t,i,n,s,o,l,a,e),t.states[n].addTransition(r)}for(n=0;n<t.states.length;n++)for(i=t.states[n],s=0;s<i.transitions.length;s++){const e=i.transitions[s];if(!(e instanceof L))continue;let n=-1;t.ruleToStartState[e.target.ruleIndex].isPrecedenceRule&&0===e.precedence&&(n=e.target.ruleIndex),r=new ft(e.followState,n),t.ruleToStopState[e.target.ruleIndex].addTransition(r)}for(n=0;n<t.states.length;n++){if(i=t.states[n],i instanceof et){if(null===i.endState)throw"IllegalState";if(null!==i.endState.startState)throw"IllegalState";i.endState.startState=i}if(i instanceof ot)for(s=0;s<i.transitions.length;s++)o=i.transitions[s].target,o instanceof ht&&(o.loopBackState=i);else if(i instanceof lt)for(s=0;s<i.transitions.length;s++)o=i.transitions[s].target,o instanceof at&&(o.loopBackState=i)}}readDecisions(t){const e=this.readInt();for(let n=0;n<e;n++){const e=this.readInt(),s=t.states[e];t.decisionToState.push(s),s.decision=n}}readLexerActions(t,e){if(0===t.grammarType){const n=this.readInt();t.lexerActions=Rt(n,null);for(let s=0;s<n;s++){const n=this.readInt();let i=this.readInt();e&&65535===i&&(i=-1);let r=this.readInt();e&&65535===r&&(r=-1),t.lexerActions[s]=this.lexerActionFactory(n,i,r)}}}generateRuleBypassTransitions(t){let e;const n=t.ruleToStartState.length;for(e=0;e<n;e++)t.ruleToTokenType[e]=t.maxTokenType+e+1;for(e=0;e<n;e++)this.generateRuleBypassTransition(t,e)}generateRuleBypassTransition(t,e){let n,s;const i=new ut;i.ruleIndex=e,t.addState(i);const r=new nt;r.ruleIndex=e,t.addState(r),i.endState=r,t.defineDecisionState(i),r.startState=i;let o=null,l=null;if(t.ruleToStartState[e].isPrecedenceRule){for(l=null,n=0;n<t.states.length;n++)if(s=t.states[n],this.stateIsEndStateFor(s,e)){l=s,o=s.loopBackState.transitions[0];break}if(null===o)throw"Couldn't identify final state of the precedence rule prefix section."}else l=t.ruleToStopState[e];for(n=0;n<t.states.length;n++){s=t.states[n];for(let t=0;t<s.transitions.length;t++){const e=s.transitions[t];e!==o&&e.target===l&&(e.target=r)}}const a=t.ruleToStartState[e],h=a.transitions.length;for(;h>0;)i.addTransition(a.transitions[h-1]),a.transitions=a.transitions.slice(-1);t.ruleToStartState[e].addTransition(new ft(i)),r.addTransition(new ft(l));const c=new Z;t.addState(c),c.addTransition(new dt(r,t.ruleToTokenType[e])),i.addTransition(new ft(c))}stateIsEndStateFor(t,e){if(t.ruleIndex!==e)return null;if(!(t instanceof at))return null;const n=t.transitions[t.transitions.length-1].target;return n instanceof st&&n.epsilonOnlyTransitions&&n.transitions[0].target instanceof I?t:null}markPrecedenceDecisions(t){for(let e=0;e<t.states.length;e++){const n=t.states[e];if(n instanceof at&&t.ruleToStartState[n.ruleIndex].isPrecedenceRule){const t=n.transitions[n.transitions.length-1].target;t instanceof st&&t.epsilonOnlyTransitions&&t.transitions[0].target instanceof I&&(n.isPrecedenceDecision=!0)}}}verifyATN(t){if(this.deserializationOptions.verifyATN)for(let e=0;e<t.states.length;e++){const n=t.states[e];if(null!==n)if(this.checkCondition(n.epsilonOnlyTransitions||n.transitions.length<=1),n instanceof ht)this.checkCondition(null!==n.loopBackState);else if(n instanceof at)if(this.checkCondition(null!==n.loopBackState),this.checkCondition(2===n.transitions.length),n.transitions[0].target instanceof ct)this.checkCondition(n.transitions[1].target instanceof st),this.checkCondition(!n.nonGreedy);else{if(!(n.transitions[0].target instanceof st))throw"IllegalState";this.checkCondition(n.transitions[1].target instanceof ct),this.checkCondition(n.nonGreedy)}else n instanceof lt?(this.checkCondition(1===n.transitions.length),this.checkCondition(n.transitions[0].target instanceof at)):n instanceof st?this.checkCondition(null!==n.loopBackState):n instanceof it?this.checkCondition(null!==n.stopState):n instanceof et?this.checkCondition(null!==n.endState):n instanceof nt?this.checkCondition(null!==n.startState):n instanceof tt?this.checkCondition(n.transitions.length<=1||n.decision>=0):this.checkCondition(n.transitions.length<=1||n instanceof I)}}checkCondition(t,e){if(!t)throw null==e&&(e="IllegalState"),e}readInt(){return this.data[this.pos++]}readInt32(){return this.readInt()|this.readInt()<<16}edgeFactory(t,e,n,s,i,r,o,a){const h=t.states[s];switch(e){case y.EPSILON:return new ft(h);case y.RANGE:return new gt(h,0!==o?l.EOF:i,r);case y.RULE:return new L(t.states[i],r,o,h);case y.PREDICATE:return new Tt(h,i,r,0!==o);case y.PRECEDENCE:return new mt(h,i);case y.ATOM:return new dt(h,0!==o?l.EOF:i);case y.ACTION:return new pt(h,i,r,0!==o);case y.SET:return new O(h,a[i]);case y.NOT_SET:return new R(h,a[i]);case y.WILDCARD:return new w(h);default:throw"The specified transition type: "+e+" is not valid."}}stateFactory(t,e){if(null===this.stateFactories){const t=[];t[N.INVALID_TYPE]=null,t[N.BASIC]=()=>new Z,t[N.RULE_START]=()=>new it,t[N.BLOCK_START]=()=>new ut,t[N.PLUS_BLOCK_START]=()=>new ht,t[N.STAR_BLOCK_START]=()=>new ct,t[N.TOKEN_START]=()=>new rt,t[N.RULE_STOP]=()=>new I,t[N.BLOCK_END]=()=>new nt,t[N.STAR_LOOP_BACK]=()=>new lt,t[N.STAR_LOOP_ENTRY]=()=>new at,t[N.PLUS_LOOP_BACK]=()=>new ot,t[N.LOOP_END]=()=>new st,this.stateFactories=t}if(t>this.stateFactories.length||null===this.stateFactories[t])throw"The specified state type "+t+" is not valid.";{const n=this.stateFactories[t]();if(null!==n)return n.ruleIndex=e,n}}lexerActionFactory(t,e,n){if(null===this.actionFactories){const t=[];t[0]=(t,e)=>new At(t),t[1]=(t,e)=>new kt(t,e),t[2]=(t,e)=>new Ot(t),t[3]=(t,e)=>Nt.INSTANCE,t[4]=(t,e)=>Lt.INSTANCE,t[5]=(t,e)=>new yt(t),t[6]=(t,e)=>Ct.INSTANCE,t[7]=(t,e)=>new It(t),this.actionFactories=t}if(t>this.actionFactories.length||null===this.actionFactories[t])throw"The specified lexer action type "+t+" is not valid.";return this.actionFactories[t](e,n)}}class vt{syntaxError(t,e,n,s,i,r){}reportAmbiguity(t,e,n,s,i,r,o){}reportAttemptingFullContext(t,e,n,s,i,r){}reportContextSensitivity(t,e,n,s,i,r){}}class bt extends vt{constructor(){super()}syntaxError(t,e,n,s,i,r){console.error("line "+n+":"+s+" "+i)}}bt.INSTANCE=new bt;class Pt extends vt{constructor(t){if(super(),null===t)throw"delegates";return this.delegates=t,this}syntaxError(t,e,n,s,i,r){this.delegates.map(o=>o.syntaxError(t,e,n,s,i,r))}reportAmbiguity(t,e,n,s,i,r,o){this.delegates.map(l=>l.reportAmbiguity(t,e,n,s,i,r,o))}reportAttemptingFullContext(t,e,n,s,i,r){this.delegates.map(o=>o.reportAttemptingFullContext(t,e,n,s,i,r))}reportContextSensitivity(t,e,n,s,i,r){this.delegates.map(o=>o.reportContextSensitivity(t,e,n,s,i,r))}}class Dt{constructor(){this._listeners=[bt.INSTANCE],this._interp=null,this._stateNumber=-1}checkVersion(t){const e="4.13.2";e!==t&&console.log("ANTLR runtime and generated code versions disagree: "+e+"!="+t)}addErrorListener(t){this._listeners.push(t)}removeErrorListeners(){this._listeners=[]}getLiteralNames(){return Object.getPrototypeOf(this).constructor.literalNames||[]}getSymbolicNames(){return Object.getPrototypeOf(this).constructor.symbolicNames||[]}getTokenNames(){if(!this.tokenNames){const t=this.getLiteralNames(),e=this.getSymbolicNames(),n=t.length>e.length?t.length:e.length;this.tokenNames=[];for(let s=0;s<n;s++)this.tokenNames[s]=t[s]||e[s]||"<INVALID"}return this.tokenNames}getTokenTypeMap(){const t=this.getTokenNames();if(null===t)throw"The current recognizer does not provide a list of token names.";let e=this.tokenTypeMapCache[t];return void 0===e&&(e=t.reduce(function(t,e,n){t[e]=n}),e.EOF=l.EOF,this.tokenTypeMapCache[t]=e),e}getRuleIndexMap(){const t=this.ruleNames;if(null===t)throw"The current recognizer does not provide a list of rule names.";let e=this.ruleIndexMapCache[t];return void 0===e&&(e=t.reduce(function(t,e,n){t[e]=n}),this.ruleIndexMapCache[t]=e),e}getTokenType(t){const e=this.getTokenTypeMap()[t];return void 0!==e?e:l.INVALID_TYPE}getErrorHeader(t){return"line "+t.getOffendingToken().line+":"+t.getOffendingToken().column}getTokenErrorDisplay(t){if(null===t)return"<no token>";let e=t.text;return null===e&&(e=t.type===l.EOF?"<EOF>":"<"+t.type+">"),e=e.replace("\n","\\n").replace("\r","\\r").replace("\t","\\t"),"'"+e+"'"}getErrorListenerDispatch(){return console.warn("Calling deprecated method in Recognizer class: getErrorListenerDispatch()"),this.getErrorListener()}getErrorListener(){return new Pt(this._listeners)}sempred(t,e,n){return!0}precpred(t,e){return!0}get atn(){return this._interp.atn}get state(){return this._stateNumber}set state(t){this._stateNumber=t}}Dt.tokenTypeMapCache={},Dt.ruleIndexMapCache={};class Ft extends l{constructor(t,e,n,s,i){super(),this.source=void 0!==t?t:Ft.EMPTY_SOURCE,this.type=void 0!==e?e:null,this.channel=void 0!==n?n:l.DEFAULT_CHANNEL,this.start=void 0!==s?s:-1,this.stop=void 0!==i?i:-1,this.tokenIndex=-1,null!==this.source[0]?(this.line=t[0].line,this.column=t[0].column):this.column=-1}clone(){const t=new Ft(this.source,this.type,this.channel,this.start,this.stop);return t.tokenIndex=this.tokenIndex,t.line=this.line,t.column=this.column,t.text=this.text,t}cloneWithType(t){const e=new Ft(this.source,t,this.channel,this.start,this.stop);return e.tokenIndex=this.tokenIndex,e.line=this.line,e.column=this.column,t===l.EOF&&(e.text=""),e}toString(){let t=this.text;return t=null!==t?t.replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t"):"<no text>","[@"+this.tokenIndex+","+this.start+":"+this.stop+"='"+t+"',<"+this.type+">"+(this.channel>0?",channel="+this.channel:"")+","+this.line+":"+this.column+"]"}get text(){if(null!==this._text)return this._text;const t=this.getInputStream();if(null===t)return null;const e=t.size;return this.start<e&&this.stop<e?t.getText(this.start,this.stop):"<EOF>"}set text(t){this._text=t}}Ft.EMPTY_SOURCE=[null,null];class Mt{}class Ut extends Mt{constructor(t){super(),this.copyText=void 0!==t&&t}create(t,e,n,s,i,r,o,l){const a=new Ft(t,e,s,i,r);return a.line=o,a.column=l,null!==n?a.text=n:this.copyText&&null!==t[1]&&(a.text=t[1].getText(i,r)),a}createThin(t,e){const n=new Ft(null,t);return n.text=e,n}}Ut.DEFAULT=new Ut;class Bt extends Error{constructor(t){super(t.message),Error.captureStackTrace&&Error.captureStackTrace(this,Bt),this.message=t.message,this.recognizer=t.recognizer,this.input=t.input,this.ctx=t.ctx,this.offendingToken=null,this.offendingState=-1,null!==this.recognizer&&(this.offendingState=this.recognizer.state)}getExpectedTokens(){return null!==this.recognizer?this.recognizer.atn.getExpectedTokens(this.offendingState,this.ctx):null}toString(){return this.message}}class Vt extends Bt{constructor(t,e,n,s){super({message:"",recognizer:t,input:e,ctx:null}),this.startIndex=n,this.deadEndConfigs=s}toString(){let t="";return this.startIndex>=0&&this.startIndex<this.input.size&&(t=this.input.getText(new A(this.startIndex,this.startIndex))),"LexerNoViableAltException"+t}}class zt extends Dt{constructor(t){super(),this._input=t,this._factory=Ut.DEFAULT,this._tokenFactorySourcePair=[this,t],this._interp=null,this._token=null,this._tokenStartCharIndex=-1,this._tokenStartLine=-1,this._tokenStartColumn=-1,this._hitEOF=!1,this._channel=l.DEFAULT_CHANNEL,this._type=l.INVALID_TYPE,this._modeStack=[],this._mode=zt.DEFAULT_MODE,this._text=null}reset(){null!==this._input&&this._input.seek(0),this._token=null,this._type=l.INVALID_TYPE,this._channel=l.DEFAULT_CHANNEL,this._tokenStartCharIndex=-1,this._tokenStartColumn=-1,this._tokenStartLine=-1,this._text=null,this._hitEOF=!1,this._mode=zt.DEFAULT_MODE,this._modeStack=[],this._interp.reset()}nextToken(){if(null===this._input)throw"nextToken requires a non-null input stream.";const t=this._input.mark();try{for(;;){if(this._hitEOF)return this.emitEOF(),this._token;this._token=null,this._channel=l.DEFAULT_CHANNEL,this._tokenStartCharIndex=this._input.index,this._tokenStartColumn=this._interp.column,this._tokenStartLine=this._interp.line,this._text=null;let e=!1;for(;;){this._type=l.INVALID_TYPE;let n=zt.SKIP;try{n=this._interp.match(this._input,this._mode)}catch(t){if(!(t instanceof Bt))throw console.log(t.stack),t;this.notifyListeners(t),this.recover(t)}if(this._input.LA(1)===l.EOF&&(this._hitEOF=!0),this._type===l.INVALID_TYPE&&(this._type=n),this._type===zt.SKIP){e=!0;break}if(this._type!==zt.MORE)break}if(!e)return null===this._token&&this.emit(),this._token}}finally{this._input.release(t)}}skip(){this._type=zt.SKIP}more(){this._type=zt.MORE}mode(t){console.warn("Calling deprecated method in Lexer class: mode(...)"),this.setMode(t)}setMode(t){this._mode=t}getMode(){return this._mode}getModeStack(){return this._modeStack}pushMode(t){this._interp.debug&&console.log("pushMode "+t),this._modeStack.push(this._mode),this.setMode(t)}popMode(){if(0===this._modeStack.length)throw"Empty Stack";return this._interp.debug&&console.log("popMode back to "+this._modeStack.slice(0,-1)),this.setMode(this._modeStack.pop()),this._mode}emitToken(t){this._token=t}emit(){const t=this._factory.create(this._tokenFactorySourcePair,this._type,this._text,this._channel,this._tokenStartCharIndex,this.getCharIndex()-1,this._tokenStartLine,this._tokenStartColumn);return this.emitToken(t),t}emitEOF(){const t=this.column,e=this.line,n=this._factory.create(this._tokenFactorySourcePair,l.EOF,null,l.DEFAULT_CHANNEL,this._input.index,this._input.index-1,e,t);return this.emitToken(n),n}getCharIndex(){return this._input.index}getAllTokens(){const t=[];let e=this.nextToken();for(;e.type!==l.EOF;)t.push(e),e=this.nextToken();return t}notifyListeners(t){const e=this._tokenStartCharIndex,n=this._input.index,s=this._input.getText(e,n),i="token recognition error at: '"+this.getErrorDisplay(s)+"'";this.getErrorListener().syntaxError(this,null,this._tokenStartLine,this._tokenStartColumn,i,t)}getErrorDisplay(t){const e=[];for(let n=0;n<t.length;n++)e.push(t[n]);return e.join("")}getErrorDisplayForChar(t){return t.charCodeAt(0)===l.EOF?"<EOF>":"\n"===t?"\\n":"\t"===t?"\\t":"\r"===t?"\\r":t}getCharErrorDisplay(t){return"'"+this.getErrorDisplayForChar(t)+"'"}recover(t){this._input.LA(1)!==l.EOF&&(t instanceof Vt?this._interp.consume(this._input):this._input.consume())}get inputStream(){return this._input}set inputStream(t){this._input=null,this._tokenFactorySourcePair=[this,this._input],this.reset(),this._input=t,this._tokenFactorySourcePair=[this,this._input]}get sourceName(){return this._input.sourceName}get type(){return this._type}set type(t){this._type=t}get line(){return this._interp.line}set line(t){this._interp.line=t}get column(){return this._interp.column}set column(t){this._interp.column=t}get text(){return null!==this._text?this._text:this._interp.getText(this._input)}set text(t){this._text=t}}function qt(t){return t.hashCodeForConfigSet()}function Ht(t,e){return t===e||null!==t&&null!==e&&t.equalsForConfigSet(e)}zt.DEFAULT_MODE=0,zt.MORE=-2,zt.SKIP=-3,zt.DEFAULT_TOKEN_CHANNEL=l.DEFAULT_CHANNEL,zt.HIDDEN=l.HIDDEN_CHANNEL,zt.MIN_CHAR_VALUE=0,zt.MAX_CHAR_VALUE=1114111;class Kt{constructor(t){this.configLookup=new x(qt,Ht),this.fullCtx=void 0===t||t,this.readOnly=!1,this.configs=[],this.uniqueAlt=0,this.conflictingAlts=null,this.hasSemanticContext=!1,this.dipsIntoOuterContext=!1,this.cachedHashCode=-1}add(t,e){if(void 0===e&&(e=null),this.readOnly)throw"This set is readonly";t.semanticContext!==T.NONE&&(this.hasSemanticContext=!0),t.reachesIntoOuterContext>0&&(this.dipsIntoOuterContext=!0);const n=this.configLookup.getOrAdd(t);if(n===t)return this.cachedHashCode=-1,this.configs.push(t),!0;const s=!this.fullCtx,i=$(n.context,t.context,s,e);return n.reachesIntoOuterContext=Math.max(n.reachesIntoOuterContext,t.reachesIntoOuterContext),t.precedenceFilterSuppressed&&(n.precedenceFilterSuppressed=!0),n.context=i,!0}getStates(){const t=new x;for(let e=0;e<this.configs.length;e++)t.add(this.configs[e].state);return t}getPredicates(){const t=[];for(let e=0;e<this.configs.length;e++){const n=this.configs[e].semanticContext;n!==T.NONE&&t.push(n.semanticContext)}return t}optimizeConfigs(t){if(this.readOnly)throw"This set is readonly";if(0!==this.configLookup.length)for(let e=0;e<this.configs.length;e++){const n=this.configs[e];n.context=t.getCachedContext(n.context)}}addAll(t){for(let e=0;e<t.length;e++)this.add(t[e]);return!1}equals(t){return this===t||t instanceof Kt&&a(this.configs,t.configs)&&this.fullCtx===t.fullCtx&&this.uniqueAlt===t.uniqueAlt&&this.conflictingAlts===t.conflictingAlts&&this.hasSemanticContext===t.hasSemanticContext&&this.dipsIntoOuterContext===t.dipsIntoOuterContext}hashCode(){const t=new u;return t.update(this.configs),t.finish()}updateHashCode(t){this.readOnly?(-1===this.cachedHashCode&&(this.cachedHashCode=this.hashCode()),t.update(this.cachedHashCode)):t.update(this.hashCode())}isEmpty(){return 0===this.configs.length}contains(t){if(null===this.configLookup)throw"This method is not implemented for readonly sets.";return this.configLookup.contains(t)}containsFast(t){if(null===this.configLookup)throw"This method is not implemented for readonly sets.";return this.configLookup.containsFast(t)}clear(){if(this.readOnly)throw"This set is readonly";this.configs=[],this.cachedHashCode=-1,this.configLookup=new x}setReadonly(t){this.readOnly=t,t&&(this.configLookup=null)}toString(){return f(this.configs)+(this.hasSemanticContext?",hasSemanticContext="+this.hasSemanticContext:"")+(this.uniqueAlt!==Q.INVALID_ALT_NUMBER?",uniqueAlt="+this.uniqueAlt:"")+(null!==this.conflictingAlts?",conflictingAlts="+this.conflictingAlts:"")+(this.dipsIntoOuterContext?",dipsIntoOuterContext":"")}get items(){return this.configs}get length(){return this.configs.length}}class Yt{constructor(t,e){return null===t&&(t=-1),null===e&&(e=new Kt),this.stateNumber=t,this.configs=e,this.edges=null,this.isAcceptState=!1,this.prediction=0,this.lexerActionExecutor=null,this.requiresFullContext=!1,this.predicates=null,this}getAltSet(){const t=new x;if(null!==this.configs)for(let e=0;e<this.configs.length;e++){const n=this.configs[e];t.add(n.alt)}return 0===t.length?null:t}equals(t){return this===t||t instanceof Yt&&this.configs.equals(t.configs)}toString(){let t=this.stateNumber+":"+this.configs;return this.isAcceptState&&(t+="=>",null!==this.predicates?t+=this.predicates:t+=this.prediction),t}hashCode(){const t=new u;return t.update(this.configs),t.finish()}}class Gt{constructor(t,e){return this.atn=t,this.sharedContextCache=e,this}getCachedContext(t){if(null===this.sharedContextCache)return t;const e=new G;return j(t,this.sharedContextCache,e)}}Gt.ERROR=new Yt(2147483647,new Kt);class Wt extends Kt{constructor(){super(),this.configLookup=new x}}class jt extends C{constructor(t,e){super(t,e);const n=t.lexerActionExecutor||null;return this.lexerActionExecutor=n||(null!==e?e.lexerActionExecutor:null),this.passedThroughNonGreedyDecision=null!==e&&this.checkNonGreedyDecision(e,this.state),this.hashCodeForConfigSet=jt.prototype.hashCode,this.equalsForConfigSet=jt.prototype.equals,this}updateHashCode(t){t.update(this.state.stateNumber,this.alt,this.context,this.semanticContext,this.passedThroughNonGreedyDecision,this.lexerActionExecutor)}equals(t){return this===t||t instanceof jt&&this.passedThroughNonGreedyDecision===t.passedThroughNonGreedyDecision&&(this.lexerActionExecutor?this.lexerActionExecutor.equals(t.lexerActionExecutor):!t.lexerActionExecutor)&&super.equals(t)}checkNonGreedyDecision(t,e){return t.passedThroughNonGreedyDecision||e instanceof tt&&e.nonGreedy}}class $t extends _t{constructor(t,e){super(e.actionType),this.offset=t,this.action=e,this.isPositionDependent=!0}execute(t){this.action.execute(t)}updateHashCode(t){t.update(this.actionType,this.offset,this.action)}equals(t){return this===t||t instanceof $t&&this.offset===t.offset&&this.action===t.action}}class Xt{constructor(t){return this.lexerActions=null===t?[]:t,this.cachedHashCode=u.hashStuff(t),this}fixOffsetBeforeMatch(t){let e=null;for(let n=0;n<this.lexerActions.length;n++)!this.lexerActions[n].isPositionDependent||this.lexerActions[n]instanceof $t||(null===e&&(e=this.lexerActions.concat([])),e[n]=new $t(t,this.lexerActions[n]));return null===e?this:new Xt(e)}execute(t,e,n){let s=!1;const i=e.index;try{for(let r=0;r<this.lexerActions.length;r++){let o=this.lexerActions[r];if(o instanceof $t){const t=o.offset;e.seek(n+t),o=o.action,s=n+t!==i}else o.isPositionDependent&&(e.seek(i),s=!1);o.execute(t)}}finally{s&&e.seek(i)}}hashCode(){return this.cachedHashCode}updateHashCode(t){t.update(this.cachedHashCode)}equals(t){if(this===t)return!0;if(t instanceof Xt){if(this.cachedHashCode!=t.cachedHashCode)return!1;if(this.lexerActions.length!=t.lexerActions.length)return!1;{const e=this.lexerActions.length;for(let n=0;n<e;++n)if(!this.lexerActions[n].equals(t.lexerActions[n]))return!1;return!0}}return!1}static append(t,e){if(null===t)return new Xt([e]);const n=t.lexerActions.concat([e]);return new Xt(n)}}function Jt(t){t.index=-1,t.line=0,t.column=-1,t.dfaState=null}class Qt{constructor(){Jt(this)}reset(){Jt(this)}}class Zt extends Gt{constructor(t,e,n,s){super(e,s),this.decisionToDFA=n,this.recog=t,this.startIndex=-1,this.line=1,this.column=0,this.mode=zt.DEFAULT_MODE,this.prevAccept=new Qt}copyState(t){this.column=t.column,this.line=t.line,this.mode=t.mode,this.startIndex=t.startIndex}match(t,e){this.mode=e;const n=t.mark();try{this.startIndex=t.index,this.prevAccept.reset();const n=this.decisionToDFA[e];return null===n.s0?this.matchATN(t):this.execATN(t,n.s0)}finally{t.release(n)}}reset(){this.prevAccept.reset(),this.startIndex=-1,this.line=1,this.column=0,this.mode=zt.DEFAULT_MODE}matchATN(t){const e=this.atn.modeToStartState[this.mode];Zt.debug&&console.log("matchATN mode "+this.mode+" start: "+e);const n=this.mode,s=this.computeStartState(t,e),i=s.hasSemanticContext;s.hasSemanticContext=!1;const r=this.addDFAState(s);i||(this.decisionToDFA[this.mode].s0=r);const o=this.execATN(t,r);return Zt.debug&&console.log("DFA after matchATN: "+this.decisionToDFA[n].toLexerString()),o}execATN(t,e){Zt.debug&&console.log("start state closure="+e.configs),e.isAcceptState&&this.captureSimState(this.prevAccept,t,e);let n=t.LA(1),s=e;for(;;){Zt.debug&&console.log("execATN loop starting closure: "+s.configs);let e=this.getExistingTargetState(s,n);if(null===e&&(e=this.computeTargetState(t,s,n)),e===Gt.ERROR)break;if(n!==l.EOF&&this.consume(t),e.isAcceptState&&(this.captureSimState(this.prevAccept,t,e),n===l.EOF))break;n=t.LA(1),s=e}return this.failOrAccept(this.prevAccept,t,s.configs,n)}getExistingTargetState(t,e){if(null===t.edges||e<Zt.MIN_DFA_EDGE||e>Zt.MAX_DFA_EDGE)return null;let n=t.edges[e-Zt.MIN_DFA_EDGE];return void 0===n&&(n=null),Zt.debug&&null!==n&&console.log("reuse state "+t.stateNumber+" edge to "+n.stateNumber),n}computeTargetState(t,e,n){const s=new Wt;return this.getReachableConfigSet(t,e.configs,s,n),0===s.items.length?(s.hasSemanticContext||this.addDFAEdge(e,n,Gt.ERROR),Gt.ERROR):this.addDFAEdge(e,n,null,s)}failOrAccept(t,e,n,s){if(null!==this.prevAccept.dfaState){const n=t.dfaState.lexerActionExecutor;return this.accept(e,n,this.startIndex,t.index,t.line,t.column),t.dfaState.prediction}if(s===l.EOF&&e.index===this.startIndex)return l.EOF;throw new Vt(this.recog,e,this.startIndex,n)}getReachableConfigSet(t,e,n,s){let i=Q.INVALID_ALT_NUMBER;for(let r=0;r<e.items.length;r++){const o=e.items[r],a=o.alt===i;if(!a||!o.passedThroughNonGreedyDecision){Zt.debug&&console.log("testing %s at %s\n",this.getTokenName(s),o.toString(this.recog,!0));for(let e=0;e<o.state.transitions.length;e++){const r=o.state.transitions[e],h=this.getReachableTarget(r,s);if(null!==h){let e=o.lexerActionExecutor;null!==e&&(e=e.fixOffsetBeforeMatch(t.index-this.startIndex));const r=s===l.EOF,c=new jt({state:h,lexerActionExecutor:e},o);this.closure(t,c,n,a,!0,r)&&(i=o.alt)}}}}}accept(t,e,n,s,i,r){Zt.debug&&console.log("ACTION %s\n",e),t.seek(s),this.line=i,this.column=r,null!==e&&null!==this.recog&&e.execute(this.recog,t,n)}getReachableTarget(t,e){return t.matches(e,0,zt.MAX_CHAR_VALUE)?t.target:null}computeStartState(t,e){const n=q.EMPTY,s=new Wt;for(let i=0;i<e.transitions.length;i++){const r=e.transitions[i].target,o=new jt({state:r,alt:i+1,context:n},null);this.closure(t,o,s,!1,!1,!1)}return s}closure(t,e,n,s,i,r){let o=null;if(Zt.debug&&console.log("closure("+e.toString(this.recog,!0)+")"),e.state instanceof I){if(Zt.debug&&(null!==this.recog?console.log("closure at %s rule stop %s\n",this.recog.ruleNames[e.state.ruleIndex],e):console.log("closure at rule stop %s\n",e)),null===e.context||e.context.hasEmptyPath()){if(null===e.context||e.context.isEmpty())return n.add(e),!0;n.add(new jt({state:e.state,context:q.EMPTY},e)),s=!0}if(null!==e.context&&!e.context.isEmpty())for(let l=0;l<e.context.length;l++)if(e.context.getReturnState(l)!==q.EMPTY_RETURN_STATE){const a=e.context.getParent(l),h=this.atn.states[e.context.getReturnState(l)];o=new jt({state:h,context:a},e),s=this.closure(t,o,n,s,i,r)}return s}e.state.epsilonOnlyTransitions||s&&e.passedThroughNonGreedyDecision||n.add(e);for(let l=0;l<e.state.transitions.length;l++){const a=e.state.transitions[l];o=this.getEpsilonTarget(t,e,a,n,i,r),null!==o&&(s=this.closure(t,o,n,s,i,r))}return s}getEpsilonTarget(t,e,n,s,i,r){let o=null;if(n.serializationType===y.RULE){const t=K.create(e.context,n.followState.stateNumber);o=new jt({state:n.target,context:t},e)}else{if(n.serializationType===y.PRECEDENCE)throw"Precedence predicates are not supported in lexers.";if(n.serializationType===y.PREDICATE)Zt.debug&&console.log("EVAL rule "+n.ruleIndex+":"+n.predIndex),s.hasSemanticContext=!0,this.evaluatePredicate(t,n.ruleIndex,n.predIndex,i)&&(o=new jt({state:n.target},e));else if(n.serializationType===y.ACTION)if(null===e.context||e.context.hasEmptyPath()){const t=Xt.append(e.lexerActionExecutor,this.atn.lexerActions[n.actionIndex]);o=new jt({state:n.target,lexerActionExecutor:t},e)}else o=new jt({state:n.target},e);else n.serializationType===y.EPSILON?o=new jt({state:n.target},e):n.serializationType!==y.ATOM&&n.serializationType!==y.RANGE&&n.serializationType!==y.SET||r&&n.matches(l.EOF,0,zt.MAX_CHAR_VALUE)&&(o=new jt({state:n.target},e))}return o}evaluatePredicate(t,e,n,s){if(null===this.recog)return!0;if(!s)return this.recog.sempred(null,e,n);const i=this.column,r=this.line,o=t.index,l=t.mark();try{return this.consume(t),this.recog.sempred(null,e,n)}finally{this.column=i,this.line=r,t.seek(o),t.release(l)}}captureSimState(t,e,n){t.index=e.index,t.line=this.line,t.column=this.column,t.dfaState=n}addDFAEdge(t,e,n,s){if(void 0===n&&(n=null),void 0===s&&(s=null),null===n&&null!==s){const t=s.hasSemanticContext;if(s.hasSemanticContext=!1,n=this.addDFAState(s),t)return n}return e<Zt.MIN_DFA_EDGE||e>Zt.MAX_DFA_EDGE||(Zt.debug&&console.log("EDGE "+t+" -> "+n+" upon "+e),null===t.edges&&(t.edges=[]),t.edges[e-Zt.MIN_DFA_EDGE]=n),n}addDFAState(t){const e=new Yt(null,t);let n=null;for(let e=0;e<t.items.length;e++){const s=t.items[e];if(s.state instanceof I){n=s;break}}null!==n&&(e.isAcceptState=!0,e.lexerActionExecutor=n.lexerActionExecutor,e.prediction=this.atn.ruleToTokenType[n.state.ruleIndex]);const s=this.decisionToDFA[this.mode],i=s.states.get(e);if(null!==i)return i;const r=e;return r.stateNumber=s.states.length,t.setReadonly(!0),r.configs=t,s.states.add(r),r}getDFA(t){return this.decisionToDFA[t]}getText(t){return t.getText(this.startIndex,t.index-1)}consume(t){t.LA(1)==="\n".charCodeAt(0)?(this.line+=1,this.column=0):this.column+=1,t.consume()}getTokenName(t){return-1===t?"EOF":"'"+String.fromCharCode(t)+"'"}}Zt.debug=!1,Zt.dfa_debug=!1,Zt.MIN_DFA_EDGE=0,Zt.MAX_DFA_EDGE=127;class te{constructor(t,e){this.alt=e,this.pred=t}toString(){return"("+this.pred+", "+this.alt+")"}}class ee{constructor(){this.data={}}get(t){return this.data["k-"+t]||null}set(t,e){this.data["k-"+t]=e}values(){return Object.keys(this.data).filter(t=>t.startsWith("k-")).map(t=>this.data[t],this)}}const ne={SLL:0,LL:1,LL_EXACT_AMBIG_DETECTION:2,hasSLLConflictTerminatingPrediction:function(t,e){if(ne.allConfigsInRuleStopStates(e))return!0;if(t===ne.SLL&&e.hasSemanticContext){const t=new Kt;for(let n=0;n<e.items.length;n++){let s=e.items[n];s=new C({semanticContext:T.NONE},s),t.add(s)}e=t}const n=ne.getConflictingAltSubsets(e);return ne.hasConflictingAltSet(n)&&!ne.hasStateAssociatedWithOneAlt(e)},hasConfigInRuleStopState:function(t){for(let e=0;e<t.items.length;e++)if(t.items[e].state instanceof I)return!0;return!1},allConfigsInRuleStopStates:function(t){for(let e=0;e<t.items.length;e++)if(!(t.items[e].state instanceof I))return!1;return!0},resolvesToJustOneViableAlt:function(t){return ne.getSingleViableAlt(t)},allSubsetsConflict:function(t){return!ne.hasNonConflictingAltSet(t)},hasNonConflictingAltSet:function(t){for(let e=0;e<t.length;e++)if(1===t[e].length)return!0;return!1},hasConflictingAltSet:function(t){for(let e=0;e<t.length;e++)if(t[e].length>1)return!0;return!1},allSubsetsEqual:function(t){let e=null;for(let n=0;n<t.length;n++){const s=t[n];if(null===e)e=s;else if(s!==e)return!1}return!0},getUniqueAlt:function(t){const e=ne.getAlts(t);return 1===e.length?e.minValue():Q.INVALID_ALT_NUMBER},getAlts:function(t){const e=new X;return t.map(function(t){e.or(t)}),e},getConflictingAltSubsets:function(t){const e=new G;return e.hashFunction=function(t){u.hashStuff(t.state.stateNumber,t.context)},e.equalsFunction=function(t,e){return t.state.stateNumber===e.state.stateNumber&&t.context.equals(e.context)},t.items.map(function(t){let n=e.get(t);null===n&&(n=new X,e.set(t,n)),n.set(t.alt)}),e.getValues()},getStateToAltMap:function(t){const e=new ee;return t.items.map(function(t){let n=e.get(t.state);null===n&&(n=new X,e.set(t.state,n)),n.set(t.alt)}),e},hasStateAssociatedWithOneAlt:function(t){const e=ne.getStateToAltMap(t).values();for(let t=0;t<e.length;t++)if(1===e[t].length)return!0;return!1},getSingleViableAlt:function(t){let e=null;for(let n=0;n<t.length;n++){const s=t[n].minValue();if(null===e)e=s;else if(e!==s)return Q.INVALID_ALT_NUMBER}return e}},se=ne;class ie extends Bt{constructor(t,e,n,s,i,r){r=r||t._ctx,s=s||t.getCurrentToken(),n=n||t.getCurrentToken(),e=e||t.getInputStream(),super({message:"",recognizer:t,input:e,ctx:r}),this.deadEndConfigs=i,this.startToken=n,this.offendingToken=s}}class re{constructor(t){this.defaultMapCtor=t||G,this.cacheMap=new this.defaultMapCtor}get(t,e){const n=this.cacheMap.get(t)||null;return null===n?null:n.get(e)||null}set(t,e,n){let s=this.cacheMap.get(t)||null;null===s&&(s=new this.defaultMapCtor,this.cacheMap.set(t,s)),s.set(e,n)}}class oe extends Gt{constructor(t,e,n,s){super(e,s),this.parser=t,this.decisionToDFA=n,this.predictionMode=se.LL,this._input=null,this._startIndex=0,this._outerContext=null,this._dfa=null,this.mergeCache=null,this.debug=!1,this.debug_closure=!1,this.debug_add=!1,this.trace_atn_sim=!1,this.dfa_debug=!1,this.retry_debug=!1}reset(){}adaptivePredict(t,e,n){(this.debug||this.trace_atn_sim)&&console.log("adaptivePredict decision "+e+" exec LA(1)=="+this.getLookaheadName(t)+" line "+t.LT(1).line+":"+t.LT(1).column),this._input=t,this._startIndex=t.index,this._outerContext=n;const s=this.decisionToDFA[e];this._dfa=s;const i=t.mark(),r=t.index;try{let e;if(e=s.precedenceDfa?s.getPrecedenceStartState(this.parser.getPrecedence()):s.s0,null===e){null===n&&(n=z.EMPTY),this.debug&&console.log("predictATN decision "+s.decision+" exec LA(1)=="+this.getLookaheadName(t)+", outerContext="+n.toString(this.parser.ruleNames));const i=!1;let r=this.computeStartState(s.atnStartState,z.EMPTY,i);s.precedenceDfa?(s.s0.configs=r,r=this.applyPrecedenceFilter(r),e=this.addDFAState(s,new Yt(null,r)),s.setPrecedenceStartState(this.parser.getPrecedence(),e)):(e=this.addDFAState(s,new Yt(null,r)),s.s0=e)}const i=this.execATN(s,e,t,r,n);return this.debug&&console.log("DFA after predictATN: "+s.toString(this.parser.literalNames,this.parser.symbolicNames)),i}finally{this._dfa=null,this.mergeCache=null,t.seek(r),t.release(i)}}execATN(t,e,n,s,i){let r;(this.debug||this.trace_atn_sim)&&console.log("execATN decision "+t.decision+", DFA state "+e+", LA(1)=="+this.getLookaheadName(n)+" line "+n.LT(1).line+":"+n.LT(1).column);let o=e;this.debug&&console.log("s0 = "+e);let a=n.LA(1);for(;;){let e=this.getExistingTargetState(o,a);if(null===e&&(e=this.computeTargetState(t,o,a)),e===Gt.ERROR){const t=this.noViableAlt(n,i,o.configs,s);if(n.seek(s),r=this.getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(o.configs,i),r!==Q.INVALID_ALT_NUMBER)return r;throw t}if(e.requiresFullContext&&this.predictionMode!==se.SLL){let o=null;if(null!==e.predicates){this.debug&&console.log("DFA state has preds in DFA sim LL failover");const t=n.index;if(t!==s&&n.seek(s),o=this.evalSemanticContext(e.predicates,i,!0),1===o.length)return this.debug&&console.log("Full LL avoided"),o.minValue();t!==s&&n.seek(t)}this.dfa_debug&&console.log("ctx sensitive state "+i+" in "+e);const l=!0,a=this.computeStartState(t.atnStartState,i,l);return this.reportAttemptingFullContext(t,o,e.configs,s,n.index),r=this.execATNWithFullContext(t,e,a,n,s,i),r}if(e.isAcceptState){if(null===e.predicates)return e.prediction;const r=n.index;n.seek(s);const o=this.evalSemanticContext(e.predicates,i,!0);if(0===o.length)throw this.noViableAlt(n,i,e.configs,s);return 1===o.length||this.reportAmbiguity(t,e,s,r,!1,o,e.configs),o.minValue()}o=e,a!==l.EOF&&(n.consume(),a=n.LA(1))}}getExistingTargetState(t,e){const n=t.edges;return null===n?null:n[e+1]||null}computeTargetState(t,e,n){const s=this.computeReachSet(e.configs,n,!1);if(null===s)return this.addDFAEdge(t,e,n,Gt.ERROR),Gt.ERROR;let i=new Yt(null,s);const r=this.getUniqueAlt(s);if(this.debug){const t=se.getConflictingAltSubsets(s);console.log("SLL altSubSets="+f(t)+", configs="+s+", predict="+r+", allSubsetsConflict="+se.allSubsetsConflict(t)+", conflictingAlts="+this.getConflictingAlts(s))}return r!==Q.INVALID_ALT_NUMBER?(i.isAcceptState=!0,i.configs.uniqueAlt=r,i.prediction=r):se.hasSLLConflictTerminatingPrediction(this.predictionMode,s)&&(i.configs.conflictingAlts=this.getConflictingAlts(s),i.requiresFullContext=!0,i.isAcceptState=!0,i.prediction=i.configs.conflictingAlts.minValue()),i.isAcceptState&&i.configs.hasSemanticContext&&(this.predicateDFAState(i,this.atn.getDecisionState(t.decision)),null!==i.predicates&&(i.prediction=Q.INVALID_ALT_NUMBER)),i=this.addDFAEdge(t,e,n,i),i}predicateDFAState(t,e){const n=e.transitions.length,s=this.getConflictingAltsOrUniqueAlt(t.configs),i=this.getPredsForAmbigAlts(s,t.configs,n);null!==i?(t.predicates=this.getPredicatePredictions(s,i),t.prediction=Q.INVALID_ALT_NUMBER):t.prediction=s.minValue()}execATNWithFullContext(t,e,n,s,i,r){(this.debug||this.trace_atn_sim)&&console.log("execATNWithFullContext "+n);let o,a=!1,h=n;s.seek(i);let c=s.LA(1),u=-1;for(;;){if(o=this.computeReachSet(h,c,!0),null===o){const t=this.noViableAlt(s,r,h,i);s.seek(i);const e=this.getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(h,r);if(e!==Q.INVALID_ALT_NUMBER)return e;throw t}const t=se.getConflictingAltSubsets(o);if(this.debug&&console.log("LL altSubSets="+t+", predict="+se.getUniqueAlt(t)+", resolvesToJustOneViableAlt="+se.resolvesToJustOneViableAlt(t)),o.uniqueAlt=this.getUniqueAlt(o),o.uniqueAlt!==Q.INVALID_ALT_NUMBER){u=o.uniqueAlt;break}if(this.predictionMode!==se.LL_EXACT_AMBIG_DETECTION){if(u=se.resolvesToJustOneViableAlt(t),u!==Q.INVALID_ALT_NUMBER)break}else if(se.allSubsetsConflict(t)&&se.allSubsetsEqual(t)){a=!0,u=se.getSingleViableAlt(t);break}h=o,c!==l.EOF&&(s.consume(),c=s.LA(1))}return o.uniqueAlt!==Q.INVALID_ALT_NUMBER?(this.reportContextSensitivity(t,u,o,i,s.index),u):(this.reportAmbiguity(t,e,i,s.index,a,null,o),u)}computeReachSet(t,e,n){this.debug&&console.log("in computeReachSet, starting closure: "+t),null===this.mergeCache&&(this.mergeCache=new re);const s=new Kt(n);let i=null;for(let r=0;r<t.items.length;r++){const o=t.items[r];if(this.debug&&console.log("testing "+this.getTokenName(e)+" at "+o),o.state instanceof I)(n||e===l.EOF)&&(null===i&&(i=[]),i.push(o),this.debug_add&&console.log("added "+o+" to skippedStopStates"));else for(let t=0;t<o.state.transitions.length;t++){const n=o.state.transitions[t],i=this.getReachableTarget(n,e);if(null!==i){const t=new C({state:i},o);s.add(t,this.mergeCache),this.debug_add&&console.log("added "+t+" to intermediate")}}}let r=null;if(null===i&&e!==l.EOF&&(1===s.items.length||this.getUniqueAlt(s)!==Q.INVALID_ALT_NUMBER)&&(r=s),null===r){r=new Kt(n);const t=new x,i=e===l.EOF;for(let e=0;e<s.items.length;e++)this.closure(s.items[e],r,t,!1,n,i)}if(e===l.EOF&&(r=this.removeAllConfigsNotInRuleStopState(r,r===s)),!(null===i||n&&se.hasConfigInRuleStopState(r)))for(let t=0;t<i.length;t++)r.add(i[t],this.mergeCache);return this.trace_atn_sim&&console.log("computeReachSet "+t+" -> "+r),0===r.items.length?null:r}removeAllConfigsNotInRuleStopState(t,e){if(se.allConfigsInRuleStopStates(t))return t;const n=new Kt(t.fullCtx);for(let s=0;s<t.items.length;s++){const i=t.items[s];if(i.state instanceof I)n.add(i,this.mergeCache);else if(e&&i.state.epsilonOnlyTransitions&&this.atn.nextTokens(i.state).contains(l.EPSILON)){const t=this.atn.ruleToStopState[i.state.ruleIndex];n.add(new C({state:t},i),this.mergeCache)}}return n}computeStartState(t,e,n){const s=W(this.atn,e),i=new Kt(n);this.trace_atn_sim&&console.log("computeStartState from ATN state "+t+" initialContext="+s.toString(this.parser));for(let e=0;e<t.transitions.length;e++){const r=t.transitions[e].target,o=new C({state:r,alt:e+1,context:s},null),l=new x;this.closure(o,i,l,!0,n,!1)}return i}applyPrecedenceFilter(t){let e;const n=[],s=new Kt(t.fullCtx);for(let i=0;i<t.items.length;i++){if(e=t.items[i],1!==e.alt)continue;const r=e.semanticContext.evalPrecedence(this.parser,this._outerContext);null!==r&&(n[e.state.stateNumber]=e.context,r!==e.semanticContext?s.add(new C({semanticContext:r},e),this.mergeCache):s.add(e,this.mergeCache))}for(let i=0;i<t.items.length;i++)if(e=t.items[i],1!==e.alt){if(!e.precedenceFilterSuppressed){const t=n[e.state.stateNumber]||null;if(null!==t&&t.equals(e.context))continue}s.add(e,this.mergeCache)}return s}getReachableTarget(t,e){return t.matches(e,0,this.atn.maxTokenType)?t.target:null}getPredsForAmbigAlts(t,e,n){let s=[];for(let n=0;n<e.items.length;n++){const i=e.items[n];t.get(i.alt)&&(s[i.alt]=T.orContext(s[i.alt]||null,i.semanticContext))}let i=0;for(let t=1;t<n+1;t++){const e=s[t]||null;null===e?s[t]=T.NONE:e!==T.NONE&&(i+=1)}return 0===i&&(s=null),this.debug&&console.log("getPredsForAmbigAlts result "+f(s)),s}getPredicatePredictions(t,e){const n=[];let s=!1;for(let i=1;i<e.length;i++){const r=e[i];null!==t&&t.get(i)&&n.push(new te(r,i)),r!==T.NONE&&(s=!0)}return s?n:null}getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(t,e){const n=this.splitAccordingToSemanticValidity(t,e),s=n[0],i=n[1];let r=this.getAltThatFinishedDecisionEntryRule(s);return r!==Q.INVALID_ALT_NUMBER||i.items.length>0&&(r=this.getAltThatFinishedDecisionEntryRule(i),r!==Q.INVALID_ALT_NUMBER)?r:Q.INVALID_ALT_NUMBER}getAltThatFinishedDecisionEntryRule(t){const e=[];for(let n=0;n<t.items.length;n++){const s=t.items[n];(s.reachesIntoOuterContext>0||s.state instanceof I&&s.context.hasEmptyPath())&&e.indexOf(s.alt)<0&&e.push(s.alt)}return 0===e.length?Q.INVALID_ALT_NUMBER:Math.min.apply(null,e)}splitAccordingToSemanticValidity(t,e){const n=new Kt(t.fullCtx),s=new Kt(t.fullCtx);for(let i=0;i<t.items.length;i++){const r=t.items[i];r.semanticContext!==T.NONE?r.semanticContext.evaluate(this.parser,e)?n.add(r):s.add(r):n.add(r)}return[n,s]}evalSemanticContext(t,e,n){const s=new X;for(let i=0;i<t.length;i++){const r=t[i];if(r.pred===T.NONE){if(s.set(r.alt),!n)break;continue}const o=r.pred.evaluate(this.parser,e);if((this.debug||this.dfa_debug)&&console.log("eval pred "+r+"="+o),o&&((this.debug||this.dfa_debug)&&console.log("PREDICT "+r.alt),s.set(r.alt),!n))break}return s}closure(t,e,n,s,i,r){this.closureCheckingStopState(t,e,n,s,i,0,r)}closureCheckingStopState(t,e,n,s,i,r,o){if((this.trace_atn_sim||this.debug_closure)&&console.log("closure("+t.toString(this.parser,!0)+")"),t.state instanceof I){if(!t.context.isEmpty()){for(let l=0;l<t.context.length;l++){if(t.context.getReturnState(l)===q.EMPTY_RETURN_STATE){if(i){e.add(new C({state:t.state,context:q.EMPTY},t),this.mergeCache);continue}this.debug&&console.log("FALLING off rule "+this.getRuleName(t.state.ruleIndex)),this.closure_(t,e,n,s,i,r,o);continue}const a=this.atn.states[t.context.getReturnState(l)],h=t.context.getParent(l),c={state:a,alt:t.alt,context:h,semanticContext:t.semanticContext},u=new C(c,null);u.reachesIntoOuterContext=t.reachesIntoOuterContext,this.closureCheckingStopState(u,e,n,s,i,r-1,o)}return}if(i)return void e.add(t,this.mergeCache);this.debug&&console.log("FALLING off rule "+this.getRuleName(t.state.ruleIndex))}this.closure_(t,e,n,s,i,r,o)}closure_(t,e,n,s,i,r,o){const l=t.state;l.epsilonOnlyTransitions||e.add(t,this.mergeCache);for(let a=0;a<l.transitions.length;a++){if(0===a&&this.canDropLoopEntryEdgeInLeftRecursiveRule(t))continue;const h=l.transitions[a],c=s&&!(h instanceof pt),u=this.getEpsilonTarget(t,h,c,0===r,i,o);if(null!==u){let s=r;if(t.state instanceof I){if(null!==this._dfa&&this._dfa.precedenceDfa&&h.outermostPrecedenceReturn===this._dfa.atnStartState.ruleIndex&&(u.precedenceFilterSuppressed=!0),u.reachesIntoOuterContext+=1,n.getOrAdd(u)!==u)continue;e.dipsIntoOuterContext=!0,s-=1,this.debug&&console.log("dips into outer ctx: "+u)}else{if(!h.isEpsilon&&n.getOrAdd(u)!==u)continue;h instanceof L&&s>=0&&(s+=1)}this.closureCheckingStopState(u,e,n,c,i,s,o)}}}canDropLoopEntryEdgeInLeftRecursiveRule(t){const e=t.state;if(e.stateType!==N.STAR_LOOP_ENTRY)return!1;if(e.stateType!==N.STAR_LOOP_ENTRY||!e.isPrecedenceDecision||t.context.isEmpty()||t.context.hasEmptyPath())return!1;const n=t.context.length;for(let s=0;s<n;s++)if(this.atn.states[t.context.getReturnState(s)].ruleIndex!==e.ruleIndex)return!1;const s=e.transitions[0].target.endState.stateNumber,i=this.atn.states[s];for(let s=0;s<n;s++){const n=t.context.getReturnState(s),r=this.atn.states[n];if(1!==r.transitions.length||!r.transitions[0].isEpsilon)return!1;const o=r.transitions[0].target;if(!(r.stateType===N.BLOCK_END&&o===e||r===i||o===i||o.stateType===N.BLOCK_END&&1===o.transitions.length&&o.transitions[0].isEpsilon&&o.transitions[0].target===e))return!1}return!0}getRuleName(t){return null!==this.parser&&t>=0?this.parser.ruleNames[t]:"<rule "+t+">"}getEpsilonTarget(t,e,n,s,i,r){switch(e.serializationType){case y.RULE:return this.ruleTransition(t,e);case y.PRECEDENCE:return this.precedenceTransition(t,e,n,s,i);case y.PREDICATE:return this.predTransition(t,e,n,s,i);case y.ACTION:return this.actionTransition(t,e);case y.EPSILON:return new C({state:e.target},t);case y.ATOM:case y.RANGE:case y.SET:return r&&e.matches(l.EOF,0,1)?new C({state:e.target},t):null;default:return null}}actionTransition(t,e){if(this.debug){const t=-1===e.actionIndex?65535:e.actionIndex;console.log("ACTION edge "+e.ruleIndex+":"+t)}return new C({state:e.target},t)}precedenceTransition(t,e,n,s,i){this.debug&&(console.log("PRED (collectPredicates="+n+") "+e.precedence+">=_p, ctx dependent=true"),null!==this.parser&&console.log("context surrounding pred is "+f(this.parser.getRuleInvocationStack())));let r=null;if(n&&s)if(i){const n=this._input.index;this._input.seek(this._startIndex);const s=e.getPredicate().evaluate(this.parser,this._outerContext);this._input.seek(n),s&&(r=new C({state:e.target},t))}else{const n=T.andContext(t.semanticContext,e.getPredicate());r=new C({state:e.target,semanticContext:n},t)}else r=new C({state:e.target},t);return this.debug&&console.log("config from pred transition="+r),r}predTransition(t,e,n,s,i){this.debug&&(console.log("PRED (collectPredicates="+n+") "+e.ruleIndex+":"+e.predIndex+", ctx dependent="+e.isCtxDependent),null!==this.parser&&console.log("context surrounding pred is "+f(this.parser.getRuleInvocationStack())));let r=null;if(n&&(e.isCtxDependent&&s||!e.isCtxDependent))if(i){const n=this._input.index;this._input.seek(this._startIndex);const s=e.getPredicate().evaluate(this.parser,this._outerContext);this._input.seek(n),s&&(r=new C({state:e.target},t))}else{const n=T.andContext(t.semanticContext,e.getPredicate());r=new C({state:e.target,semanticContext:n},t)}else r=new C({state:e.target},t);return this.debug&&console.log("config from pred transition="+r),r}ruleTransition(t,e){this.debug&&console.log("CALL rule "+this.getRuleName(e.target.ruleIndex)+", ctx="+t.context);const n=e.followState,s=K.create(t.context,n.stateNumber);return new C({state:e.target,context:s},t)}getConflictingAlts(t){const e=se.getConflictingAltSubsets(t);return se.getAlts(e)}getConflictingAltsOrUniqueAlt(t){let e=null;return t.uniqueAlt!==Q.INVALID_ALT_NUMBER?(e=new X,e.set(t.uniqueAlt)):e=t.conflictingAlts,e}getTokenName(t){if(t===l.EOF)return"EOF";if(null!==this.parser&&null!==this.parser.literalNames){if(!(t>=this.parser.literalNames.length&&t>=this.parser.symbolicNames.length))return(this.parser.literalNames[t]||this.parser.symbolicNames[t])+"<"+t+">";console.log(t+" ttype out of range: "+this.parser.literalNames),console.log(""+this.parser.getInputStream().getTokens())}return""+t}getLookaheadName(t){return this.getTokenName(t.LA(1))}dumpDeadEndConfigs(t){console.log("dead end configs: ");const e=t.getDeadEndConfigs();for(let t=0;t<e.length;t++){const n=e[t];let s="no edges";if(n.state.transitions.length>0){const t=n.state.transitions[0];t instanceof dt?s="Atom "+this.getTokenName(t.label):t instanceof O&&(s=(t instanceof R?"~":"")+"Set "+t.set)}console.error(n.toString(this.parser,!0)+":"+s)}}noViableAlt(t,e,n,s){return new ie(this.parser,t,t.get(s),t.LT(1),n,e)}getUniqueAlt(t){let e=Q.INVALID_ALT_NUMBER;for(let n=0;n<t.items.length;n++){const s=t.items[n];if(e===Q.INVALID_ALT_NUMBER)e=s.alt;else if(s.alt!==e)return Q.INVALID_ALT_NUMBER}return e}addDFAEdge(t,e,n,s){if(this.debug&&console.log("EDGE "+e+" -> "+s+" upon "+this.getTokenName(n)),null===s)return null;if(s=this.addDFAState(t,s),null===e||n<-1||n>this.atn.maxTokenType)return s;if(null===e.edges&&(e.edges=[]),e.edges[n+1]=s,this.debug){const e=null===this.parser?null:this.parser.literalNames,n=null===this.parser?null:this.parser.symbolicNames;console.log("DFA=\n"+t.toString(e,n))}return s}addDFAState(t,e){if(e===Gt.ERROR)return e;const n=t.states.get(e);return null!==n?(this.trace_atn_sim&&console.log("addDFAState "+e+" exists"),n):(e.stateNumber=t.states.length,e.configs.readOnly||(e.configs.optimizeConfigs(this),e.configs.setReadonly(!0)),this.trace_atn_sim&&console.log("addDFAState new "+e),t.states.add(e),this.debug&&console.log("adding new DFA state: "+e),e)}reportAttemptingFullContext(t,e,n,s,i){if(this.debug||this.retry_debug){const e=new A(s,i+1);console.log("reportAttemptingFullContext decision="+t.decision+":"+n+", input="+this.parser.getTokenStream().getText(e))}null!==this.parser&&this.parser.getErrorListener().reportAttemptingFullContext(this.parser,t,s,i,e,n)}reportContextSensitivity(t,e,n,s,i){if(this.debug||this.retry_debug){const e=new A(s,i+1);console.log("reportContextSensitivity decision="+t.decision+":"+n+", input="+this.parser.getTokenStream().getText(e))}null!==this.parser&&this.parser.getErrorListener().reportContextSensitivity(this.parser,t,s,i,e,n)}reportAmbiguity(t,e,n,s,i,r,o){if(this.debug||this.retry_debug){const t=new A(n,s+1);console.log("reportAmbiguity "+r+":"+o+", input="+this.parser.getTokenStream().getText(t))}null!==this.parser&&this.parser.getErrorListener().reportAmbiguity(this.parser,t,n,s,i,r,o)}}class le{constructor(){this.cache=new G}add(t){if(t===q.EMPTY)return q.EMPTY;const e=this.cache.get(t)||null;return null!==e?e:(this.cache.set(t,t),t)}get(t){return this.cache.get(t)||null}get length(){return this.cache.length}}const ae={ATN:Q,ATNDeserializer:wt,LexerATNSimulator:Zt,ParserATNSimulator:oe,PredictionMode:se,PredictionContextCache:le};class he{constructor(t,e,n){this.dfa=t,this.literalNames=e||[],this.symbolicNames=n||[]}toString(){if(null===this.dfa.s0)return null;let t="";const e=this.dfa.sortedStates();for(let n=0;n<e.length;n++){const s=e[n];if(null!==s.edges){const e=s.edges.length;for(let n=0;n<e;n++){const e=s.edges[n]||null;null!==e&&2147483647!==e.stateNumber&&(t=t.concat(this.getStateString(s)),t=t.concat("-"),t=t.concat(this.getEdgeLabel(n)),t=t.concat("->"),t=t.concat(this.getStateString(e)),t=t.concat("\n"))}}}return 0===t.length?null:t}getEdgeLabel(t){return 0===t?"EOF":null!==this.literalNames||null!==this.symbolicNames?this.literalNames[t-1]||this.symbolicNames[t-1]:String.fromCharCode(t-1)}getStateString(t){const e=(t.isAcceptState?":":"")+"s"+t.stateNumber+(t.requiresFullContext?"^":"");return t.isAcceptState?null!==t.predicates?e+"=>"+f(t.predicates):e+"=>"+t.prediction.toString():e}}class ce extends he{constructor(t){super(t,null)}getEdgeLabel(t){return"'"+String.fromCharCode(t)+"'"}}class ue{constructor(t,e){if(void 0===e&&(e=0),this.atnStartState=t,this.decision=e,this._states=new x,this.s0=null,this.precedenceDfa=!1,t instanceof at&&t.isPrecedenceDecision){this.precedenceDfa=!0;const t=new Yt(null,new Kt);t.edges=[],t.isAcceptState=!1,t.requiresFullContext=!1,this.s0=t}}getPrecedenceStartState(t){if(!this.precedenceDfa)throw"Only precedence DFAs may contain a precedence start state.";return t<0||t>=this.s0.edges.length?null:this.s0.edges[t]||null}setPrecedenceStartState(t,e){if(!this.precedenceDfa)throw"Only precedence DFAs may contain a precedence start state.";t<0||(this.s0.edges[t]=e)}setPrecedenceDfa(t){if(this.precedenceDfa!==t){if(this._states=new x,t){const t=new Yt(null,new Kt);t.edges=[],t.isAcceptState=!1,t.requiresFullContext=!1,this.s0=t}else this.s0=null;this.precedenceDfa=t}}sortedStates(){return this._states.values().sort(function(t,e){return t.stateNumber-e.stateNumber})}toString(t,e){return t=t||null,e=e||null,null===this.s0?"":new he(this,t,e).toString()}toLexerString(){return null===this.s0?"":new ce(this).toString()}get states(){return this._states}}const de={DFA:ue,DFASerializer:he,LexerDFASerializer:ce,PredPrediction:te},ge={PredictionContext:q},pe={Interval:A,IntervalSet:k};class fe{visitTerminal(t){}visitErrorNode(t){}enterEveryRule(t){}exitEveryRule(t){}}class xe{visit(t){return Array.isArray(t)?t.map(function(t){return t.accept(this)},this):t.accept(this)}visitChildren(t){return t.children?this.visit(t.children):null}visitTerminal(t){}visitErrorNode(t){}}class Te{walk(t,e){if(e instanceof U||void 0!==e.isErrorNode&&e.isErrorNode())t.visitErrorNode(e);else if(e instanceof M)t.visitTerminal(e);else{this.enterRule(t,e);for(let n=0;n<e.getChildCount();n++){const s=e.getChild(n);this.walk(t,s)}this.exitRule(t,e)}}enterRule(t,e){const n=e.ruleContext;t.enterEveryRule(n),n.enterRule(t)}exitRule(t,e){const n=e.ruleContext;n.exitRule(t),t.exitEveryRule(n)}}Te.DEFAULT=new Te;const Se={Trees:V,RuleNode:F,ErrorNode:U,TerminalNode:M,ParseTreeListener:fe,ParseTreeVisitor:xe,ParseTreeWalker:Te};class me extends Bt{constructor(t){super({message:"",recognizer:t,input:t.getInputStream(),ctx:t._ctx}),this.offendingToken=t.getCurrentToken()}}class Ee extends Bt{constructor(t,e,n){super({message:_e(e,n||null),recognizer:t,input:t.getInputStream(),ctx:t._ctx});const s=t._interp.atn.states[t.state].transitions[0];s instanceof Tt?(this.ruleIndex=s.ruleIndex,this.predicateIndex=s.predIndex):(this.ruleIndex=0,this.predicateIndex=0),this.predicate=e,this.offendingToken=t.getCurrentToken()}}function _e(t,e){return null!==e?e:"failed predicate: {"+t+"}?"}class Ce extends vt{constructor(t){super(),t=t||!0,this.exactOnly=t}reportAmbiguity(t,e,n,s,i,r,o){if(this.exactOnly&&!i)return;const l="reportAmbiguity d="+this.getDecisionDescription(t,e)+": ambigAlts="+this.getConflictingAlts(r,o)+", input='"+t.getTokenStream().getText(new A(n,s))+"'";t.notifyErrorListeners(l)}reportAttemptingFullContext(t,e,n,s,i,r){const o="reportAttemptingFullContext d="+this.getDecisionDescription(t,e)+", input='"+t.getTokenStream().getText(new A(n,s))+"'";t.notifyErrorListeners(o)}reportContextSensitivity(t,e,n,s,i,r){const o="reportContextSensitivity d="+this.getDecisionDescription(t,e)+", input='"+t.getTokenStream().getText(new A(n,s))+"'";t.notifyErrorListeners(o)}getDecisionDescription(t,e){const n=e.decision,s=e.atnStartState.ruleIndex,i=t.ruleNames;if(s<0||s>=i.length)return""+n;const r=i[s]||null;return null===r||0===r.length?""+n:`${n} (${r})`}getConflictingAlts(t,e){if(null!==t)return t;const n=new X;for(let t=0;t<e.items.length;t++)n.set(e.items[t].alt);return`{${n.values().join(", ")}}`}}class Ae extends Error{constructor(){super(),Error.captureStackTrace(this,Ae)}}class ke{reset(t){}recoverInline(t){}recover(t,e){}sync(t){}inErrorRecoveryMode(t){}reportError(t){}}class Ne extends ke{constructor(){super(),this.errorRecoveryMode=!1,this.lastErrorIndex=-1,this.lastErrorStates=null,this.nextTokensContext=null,this.nextTokenState=0}reset(t){this.endErrorCondition(t)}beginErrorCondition(t){this.errorRecoveryMode=!0}inErrorRecoveryMode(t){return this.errorRecoveryMode}endErrorCondition(t){this.errorRecoveryMode=!1,this.lastErrorStates=null,this.lastErrorIndex=-1}reportMatch(t){this.endErrorCondition(t)}reportError(t,e){this.inErrorRecoveryMode(t)||(this.beginErrorCondition(t),e instanceof ie?this.reportNoViableAlternative(t,e):e instanceof me?this.reportInputMismatch(t,e):e instanceof Ee?this.reportFailedPredicate(t,e):(console.log("unknown recognition error type: "+e.constructor.name),console.log(e.stack),t.notifyErrorListeners(e.getOffendingToken(),e.getMessage(),e)))}recover(t,e){this.lastErrorIndex===t.getInputStream().index&&null!==this.lastErrorStates&&this.lastErrorStates.indexOf(t.state)>=0&&t.consume(),this.lastErrorIndex=t._input.index,null===this.lastErrorStates&&(this.lastErrorStates=[]),this.lastErrorStates.push(t.state);const n=this.getErrorRecoverySet(t);this.consumeUntil(t,n)}sync(t){if(this.inErrorRecoveryMode(t))return;const e=t._interp.atn.states[t.state],n=t.getTokenStream().LA(1),s=t.atn.nextTokens(e);if(s.contains(n))return this.nextTokensContext=null,void(this.nextTokenState=N.INVALID_STATE_NUMBER);if(s.contains(l.EPSILON))null===this.nextTokensContext&&(this.nextTokensContext=t._ctx,this.nextTokensState=t._stateNumber);else switch(e.stateType){case N.BLOCK_START:case N.STAR_BLOCK_START:case N.PLUS_BLOCK_START:case N.STAR_LOOP_ENTRY:if(null!==this.singleTokenDeletion(t))return;throw new me(t);case N.PLUS_LOOP_BACK:case N.STAR_LOOP_BACK:{this.reportUnwantedToken(t);const e=new k;e.addSet(t.getExpectedTokens());const n=e.addSet(this.getErrorRecoverySet(t));this.consumeUntil(t,n)}}}reportNoViableAlternative(t,e){const n=t.getTokenStream();let s;s=null!==n?e.startToken.type===l.EOF?"<EOF>":n.getText(new A(e.startToken.tokenIndex,e.offendingToken.tokenIndex)):"<unknown input>";const i="no viable alternative at input "+this.escapeWSAndQuote(s);t.notifyErrorListeners(i,e.offendingToken,e)}reportInputMismatch(t,e){const n="mismatched input "+this.getTokenErrorDisplay(e.offendingToken)+" expecting "+e.getExpectedTokens().toString(t.literalNames,t.symbolicNames);t.notifyErrorListeners(n,e.offendingToken,e)}reportFailedPredicate(t,e){const n="rule "+t.ruleNames[t._ctx.ruleIndex]+" "+e.message;t.notifyErrorListeners(n,e.offendingToken,e)}reportUnwantedToken(t){if(this.inErrorRecoveryMode(t))return;this.beginErrorCondition(t);const e=t.getCurrentToken(),n="extraneous input "+this.getTokenErrorDisplay(e)+" expecting "+this.getExpectedTokens(t).toString(t.literalNames,t.symbolicNames);t.notifyErrorListeners(n,e,null)}reportMissingToken(t){if(this.inErrorRecoveryMode(t))return;this.beginErrorCondition(t);const e=t.getCurrentToken(),n="missing "+this.getExpectedTokens(t).toString(t.literalNames,t.symbolicNames)+" at "+this.getTokenErrorDisplay(e);t.notifyErrorListeners(n,e,null)}recoverInline(t){const e=this.singleTokenDeletion(t);if(null!==e)return t.consume(),e;if(this.singleTokenInsertion(t))return this.getMissingSymbol(t);throw new me(t)}singleTokenInsertion(t){const e=t.getTokenStream().LA(1),n=t._interp.atn,s=n.states[t.state].transitions[0].target;return!!n.nextTokens(s,t._ctx).contains(e)&&(this.reportMissingToken(t),!0)}singleTokenDeletion(t){const e=t.getTokenStream().LA(2);if(this.getExpectedTokens(t).contains(e)){this.reportUnwantedToken(t),t.consume();const e=t.getCurrentToken();return this.reportMatch(t),e}return null}getMissingSymbol(t){const e=t.getCurrentToken(),n=this.getExpectedTokens(t).first();let s;s=n===l.EOF?"<missing EOF>":"<missing "+t.literalNames[n]+">";let i=e;const r=t.getTokenStream().LT(-1);return i.type===l.EOF&&null!==r&&(i=r),t.getTokenFactory().create(i.source,n,s,l.DEFAULT_CHANNEL,-1,-1,i.line,i.column)}getExpectedTokens(t){return t.getExpectedTokens()}getTokenErrorDisplay(t){if(null===t)return"<no token>";let e=t.text;return null===e&&(e=t.type===l.EOF?"<EOF>":"<"+t.type+">"),this.escapeWSAndQuote(e)}escapeWSAndQuote(t){return"'"+(t=(t=(t=t.replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/\t/g,"\\t"))+"'"}getErrorRecoverySet(t){const e=t._interp.atn;let n=t._ctx;const s=new k;for(;null!==n&&n.invokingState>=0;){const t=e.states[n.invokingState].transitions[0],i=e.nextTokens(t.followState);s.addSet(i),n=n.parentCtx}return s.removeOne(l.EPSILON),s}consumeUntil(t,e){let n=t.getTokenStream().LA(1);for(;n!==l.EOF&&!e.contains(n);)t.consume(),n=t.getTokenStream().LA(1)}}class Ie extends Ne{constructor(){super()}recover(t,e){let n=t._ctx;for(;null!==n;)n.exception=e,n=n.parentCtx;throw new Ae(e)}recoverInline(t){this.recover(t,new me(t))}sync(t){}}const ye={RecognitionException:Bt,NoViableAltException:ie,LexerNoViableAltException:Vt,InputMismatchException:me,FailedPredicateException:Ee,DiagnosticErrorListener:Ce,BailErrorStrategy:Ie,DefaultErrorStrategy:Ne,ErrorListener:vt};class Le{constructor(t,e){if(this.name="<empty>",this.strdata=t,this.decodeToUnicodeCodePoints=e||!1,this._index=0,this.data=[],this.decodeToUnicodeCodePoints)for(let t=0;t<this.strdata.length;){const e=this.strdata.codePointAt(t);this.data.push(e),t+=e<=65535?1:2}else{this.data=new Array(this.strdata.length);for(let t=0;t<this.strdata.length;t++)this.data[t]=this.strdata.charCodeAt(t)}this._size=this.data.length}reset(){this._index=0}consume(){if(this._index>=this._size)throw"cannot consume EOF";this._index+=1}LA(t){if(0===t)return 0;t<0&&(t+=1);const e=this._index+t-1;return e<0||e>=this._size?l.EOF:this.data[e]}LT(t){return this.LA(t)}mark(){return-1}release(t){}seek(t){t<=this._index?this._index=t:this._index=Math.min(t,this._size)}getText(t,e){if(e>=this._size&&(e=this._size-1),t>=this._size)return"";if(this.decodeToUnicodeCodePoints){let n="";for(let s=t;s<=e;s++)n+=String.fromCodePoint(this.data[s]);return n}return this.strdata.slice(t,e+1)}toString(){return this.strdata}get index(){return this._index}get size(){return this._size}}class Oe extends Le{constructor(t,e){super(t,e)}}var Re=r(763);const we="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node;class ve extends Oe{static fromPath(t,e,n){if(!we)throw new Error("FileStream is only available when running in Node!");Re.readFile(t,e,function(t,e){let s=null;null!==e&&(s=new Le(e,!0)),n(t,s)})}constructor(t,e,n){if(!we)throw new Error("FileStream is only available when running in Node!");super(Re.readFileSync(t,e||"utf-8"),n),this.fileName=t}}const be={fromString:function(t){return new Le(t,!0)},fromBlob:function(t,e,n,s){const i=new window.FileReader;i.onload=function(t){const e=new Le(t.target.result,!0);n(e)},i.onerror=s,i.readAsText(t,e)},fromBuffer:function(t,e){return new Le(t.toString(e),!0)},fromPath:function(t,e,n){ve.fromPath(t,e,n)},fromPathSync:function(t,e){return new ve(t,e)}},Pe={arrayToString:f,stringToCharArray:function(t){let e=new Uint16Array(t.length);for(let n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}};class De{}class Fe extends De{constructor(t){super(),this.tokenSource=t,this.tokens=[],this.index=-1,this.fetchedEOF=!1}mark(){return 0}release(t){}reset(){this.seek(0)}seek(t){this.lazyInit(),this.index=this.adjustSeekIndex(t)}get size(){return this.tokens.length}get(t){return this.lazyInit(),this.tokens[t]}consume(){let t=!1;if(t=this.index>=0&&(this.fetchedEOF?this.index<this.tokens.length-1:this.index<this.tokens.length),!t&&this.LA(1)===l.EOF)throw"cannot consume EOF";this.sync(this.index+1)&&(this.index=this.adjustSeekIndex(this.index+1))}sync(t){const e=t-this.tokens.length+1;return!(e>0)||this.fetch(e)>=e}fetch(t){if(this.fetchedEOF)return 0;for(let e=0;e<t;e++){const t=this.tokenSource.nextToken();if(t.tokenIndex=this.tokens.length,this.tokens.push(t),t.type===l.EOF)return this.fetchedEOF=!0,e+1}return t}getTokens(t,e,n){if(void 0===n&&(n=null),t<0||e<0)return null;this.lazyInit();const s=[];e>=this.tokens.length&&(e=this.tokens.length-1);for(let i=t;i<e;i++){const t=this.tokens[i];if(t.type===l.EOF)break;(null===n||n.contains(t.type))&&s.push(t)}return s}LA(t){return this.LT(t).type}LB(t){return this.index-t<0?null:this.tokens[this.index-t]}LT(t){if(this.lazyInit(),0===t)return null;if(t<0)return this.LB(-t);const e=this.index+t-1;return this.sync(e),e>=this.tokens.length?this.tokens[this.tokens.length-1]:this.tokens[e]}adjustSeekIndex(t){return t}lazyInit(){-1===this.index&&this.setup()}setup(){this.sync(0),this.index=this.adjustSeekIndex(0)}setTokenSource(t){this.tokenSource=t,this.tokens=[],this.index=-1,this.fetchedEOF=!1}nextTokenOnChannel(t,e){if(this.sync(t),t>=this.tokens.length)return-1;let n=this.tokens[t];for(;n.channel!==e;){if(n.type===l.EOF)return-1;t+=1,this.sync(t),n=this.tokens[t]}return t}previousTokenOnChannel(t,e){for(;t>=0&&this.tokens[t].channel!==e;)t-=1;return t}getHiddenTokensToRight(t,e){if(void 0===e&&(e=-1),this.lazyInit(),t<0||t>=this.tokens.length)throw t+" not in 0.."+this.tokens.length-1;const n=this.nextTokenOnChannel(t+1,zt.DEFAULT_TOKEN_CHANNEL),s=t+1,i=-1===n?this.tokens.length-1:n;return this.filterForChannel(s,i,e)}getHiddenTokensToLeft(t,e){if(void 0===e&&(e=-1),this.lazyInit(),t<0||t>=this.tokens.length)throw t+" not in 0.."+this.tokens.length-1;const n=this.previousTokenOnChannel(t-1,zt.DEFAULT_TOKEN_CHANNEL);if(n===t-1)return null;const s=n+1,i=t-1;return this.filterForChannel(s,i,e)}filterForChannel(t,e,n){const s=[];for(let i=t;i<e+1;i++){const t=this.tokens[i];-1===n?t.channel!==zt.DEFAULT_TOKEN_CHANNEL&&s.push(t):t.channel===n&&s.push(t)}return 0===s.length?null:s}getSourceName(){return this.tokenSource.getSourceName()}getText(t){this.lazyInit(),this.fill(),t||(t=new A(0,this.tokens.length-1));let e=t.start;e instanceof l&&(e=e.tokenIndex);let n=t.stop;if(n instanceof l&&(n=n.tokenIndex),null===e||null===n||e<0||n<0)return"";n>=this.tokens.length&&(n=this.tokens.length-1);let s="";for(let t=e;t<n+1;t++){const e=this.tokens[t];if(e.type===l.EOF)break;s+=e.text}return s}fill(){for(this.lazyInit();1e3===this.fetch(1e3););}}Object.defineProperty(Fe,"size",{get:function(){return this.tokens.length}});class Me extends Fe{constructor(t,e){super(t),this.channel=void 0===e?l.DEFAULT_CHANNEL:e}adjustSeekIndex(t){return this.nextTokenOnChannel(t,this.channel)}LB(t){if(0===t||this.index-t<0)return null;let e=this.index,n=1;for(;n<=t;)e=this.previousTokenOnChannel(e-1,this.channel),n+=1;return e<0?null:this.tokens[e]}LT(t){if(this.lazyInit(),0===t)return null;if(t<0)return this.LB(-t);let e=this.index,n=1;for(;n<t;)this.sync(e+1)&&(e=this.nextTokenOnChannel(e+1,this.channel)),n+=1;return this.tokens[e]}getNumberOfOnChannelTokens(){let t=0;this.fill();for(let e=0;e<this.tokens.length;e++){const n=this.tokens[e];if(n.channel===this.channel&&(t+=1),n.type===l.EOF)break}return t}}class Ue extends fe{constructor(t){super(),this.parser=t}enterEveryRule(t){console.log("enter "+this.parser.ruleNames[t.ruleIndex]+", LT(1)="+this.parser._input.LT(1).text)}visitTerminal(t){console.log("consume "+t.symbol+" rule "+this.parser.ruleNames[this.parser._ctx.ruleIndex])}exitEveryRule(t){console.log("exit "+this.parser.ruleNames[t.ruleIndex]+", LT(1)="+this.parser._input.LT(1).text)}}class Be extends Dt{constructor(t){super(),this._input=null,this._errHandler=new Ne,this._precedenceStack=[],this._precedenceStack.push(0),this._ctx=null,this.buildParseTrees=!0,this._tracer=null,this._parseListeners=null,this._syntaxErrors=0,this.setInputStream(t)}reset(){null!==this._input&&this._input.seek(0),this._errHandler.reset(this),this._ctx=null,this._syntaxErrors=0,this.setTrace(!1),this._precedenceStack=[],this._precedenceStack.push(0),null!==this._interp&&this._interp.reset()}match(t){let e=this.getCurrentToken();return e.type===t?(this._errHandler.reportMatch(this),this.consume()):(e=this._errHandler.recoverInline(this),this.buildParseTrees&&-1===e.tokenIndex&&this._ctx.addErrorNode(e)),e}matchWildcard(){let t=this.getCurrentToken();return t.type>0?(this._errHandler.reportMatch(this),this.consume()):(t=this._errHandler.recoverInline(this),this.buildParseTrees&&-1===t.tokenIndex&&this._ctx.addErrorNode(t)),t}getParseListeners(){return this._parseListeners||[]}addParseListener(t){if(null===t)throw"listener";null===this._parseListeners&&(this._parseListeners=[]),this._parseListeners.push(t)}removeParseListener(t){if(null!==this._parseListeners){const e=this._parseListeners.indexOf(t);e>=0&&this._parseListeners.splice(e,1),0===this._parseListeners.length&&(this._parseListeners=null)}}removeParseListeners(){this._parseListeners=null}triggerEnterRuleEvent(){if(null!==this._parseListeners){const t=this._ctx;this._parseListeners.forEach(function(e){e.enterEveryRule(t),t.enterRule(e)})}}triggerExitRuleEvent(){if(null!==this._parseListeners){const t=this._ctx;this._parseListeners.slice(0).reverse().forEach(function(e){t.exitRule(e),e.exitEveryRule(t)})}}getTokenFactory(){return this._input.tokenSource._factory}setTokenFactory(t){this._input.tokenSource._factory=t}getATNWithBypassAlts(){const t=this.getSerializedATN();if(null===t)throw"The current parser does not support an ATN with bypass alternatives.";let e=this.bypassAltsAtnCache[t];if(null===e){const n=new Et;n.generateRuleBypassTransitions=!0,e=new wt(n).deserialize(t),this.bypassAltsAtnCache[t]=e}return e}getInputStream(){return this.getTokenStream()}setInputStream(t){this.setTokenStream(t)}getTokenStream(){return this._input}setTokenStream(t){this._input=null,this.reset(),this._input=t}get syntaxErrorsCount(){return this._syntaxErrors}getCurrentToken(){return this._input.LT(1)}notifyErrorListeners(t,e,n){n=n||null,null===(e=e||null)&&(e=this.getCurrentToken()),this._syntaxErrors+=1;const s=e.line,i=e.column;this.getErrorListener().syntaxError(this,e,s,i,t,n)}consume(){const t=this.getCurrentToken();t.type!==l.EOF&&this.getInputStream().consume();const e=null!==this._parseListeners&&this._parseListeners.length>0;if(this.buildParseTrees||e){let n;n=this._errHandler.inErrorRecoveryMode(this)?this._ctx.addErrorNode(t):this._ctx.addTokenNode(t),n.invokingState=this.state,e&&this._parseListeners.forEach(function(t){n instanceof U||void 0!==n.isErrorNode&&n.isErrorNode()?t.visitErrorNode(n):n instanceof M&&t.visitTerminal(n)})}return t}addContextToParseTree(){null!==this._ctx.parentCtx&&this._ctx.parentCtx.addChild(this._ctx)}enterRule(t,e,n){this.state=e,this._ctx=t,this._ctx.start=this._input.LT(1),this.buildParseTrees&&this.addContextToParseTree(),this.triggerEnterRuleEvent()}exitRule(){this._ctx.stop=this._input.LT(-1),this.triggerExitRuleEvent(),this.state=this._ctx.invokingState,this._ctx=this._ctx.parentCtx}enterOuterAlt(t,e){t.setAltNumber(e),this.buildParseTrees&&this._ctx!==t&&null!==this._ctx.parentCtx&&(this._ctx.parentCtx.removeLastChild(),this._ctx.parentCtx.addChild(t)),this._ctx=t}getPrecedence(){return 0===this._precedenceStack.length?-1:this._precedenceStack[this._precedenceStack.length-1]}enterRecursionRule(t,e,n,s){this.state=e,this._precedenceStack.push(s),this._ctx=t,this._ctx.start=this._input.LT(1),this.triggerEnterRuleEvent()}pushNewRecursionContext(t,e,n){const s=this._ctx;s.parentCtx=t,s.invokingState=e,s.stop=this._input.LT(-1),this._ctx=t,this._ctx.start=s.start,this.buildParseTrees&&this._ctx.addChild(s),this.triggerEnterRuleEvent()}unrollRecursionContexts(t){this._precedenceStack.pop(),this._ctx.stop=this._input.LT(-1);const e=this._ctx,n=this.getParseListeners();if(null!==n&&n.length>0)for(;this._ctx!==t;)this.triggerExitRuleEvent(),this._ctx=this._ctx.parentCtx;else this._ctx=t;e.parentCtx=t,this.buildParseTrees&&null!==t&&t.addChild(e)}getInvokingContext(t){let e=this._ctx;for(;null!==e;){if(e.ruleIndex===t)return e;e=e.parentCtx}return null}precpred(t,e){return e>=this._precedenceStack[this._precedenceStack.length-1]}inContext(t){return!1}isExpectedToken(t){const e=this._interp.atn;let n=this._ctx;const s=e.states[this.state];let i=e.nextTokens(s);if(i.contains(t))return!0;if(!i.contains(l.EPSILON))return!1;for(;null!==n&&n.invokingState>=0&&i.contains(l.EPSILON);){const s=e.states[n.invokingState].transitions[0];if(i=e.nextTokens(s.followState),i.contains(t))return!0;n=n.parentCtx}return!(!i.contains(l.EPSILON)||t!==l.EOF)}getExpectedTokens(){return this._interp.atn.getExpectedTokens(this.state,this._ctx)}getExpectedTokensWithinCurrentRule(){const t=this._interp.atn,e=t.states[this.state];return t.nextTokens(e)}getRuleIndex(t){const e=this.getRuleIndexMap()[t];return null!==e?e:-1}getRuleInvocationStack(t){null===(t=t||null)&&(t=this._ctx);const e=[];for(;null!==t;){const n=t.ruleIndex;n<0?e.push("n/a"):e.push(this.ruleNames[n]),t=t.parentCtx}return e}getDFAStrings(){return this._interp.decisionToDFA.toString()}dumpDFA(){let t=!1;for(let e=0;e<this._interp.decisionToDFA.length;e++){const n=this._interp.decisionToDFA[e];n.states.length>0&&(t&&console.log(),this.printer.println("Decision "+n.decision+":"),this.printer.print(n.toString(this.literalNames,this.symbolicNames)),t=!0)}}getSourceName(){return this._input.getSourceName()}setTrace(t){t?(null!==this._tracer&&this.removeParseListener(this._tracer),this._tracer=new Ue(this),this.addParseListener(this._tracer)):(this.removeParseListener(this._tracer),this._tracer=null)}}Be.bypassAltsAtnCache={};class Ve extends M{constructor(t){super(),this.parentCtx=null,this.symbol=t}getChild(t){return null}getSymbol(){return this.symbol}getParent(){return this.parentCtx}getPayload(){return this.symbol}getSourceInterval(){if(null===this.symbol)return A.INVALID_INTERVAL;const t=this.symbol.tokenIndex;return new A(t,t)}getChildCount(){return 0}accept(t){return t.visitTerminal(this)}getText(){return this.symbol.text}toString(){return this.symbol.type===l.EOF?"<EOF>":this.symbol.text}}class ze extends Ve{constructor(t){super(t)}isErrorNode(){return!0}accept(t){return t.visitErrorNode(this)}}class qe extends z{constructor(t,e){super(t,e),this.children=null,this.start=null,this.stop=null,this.exception=null}copyFrom(t){this.parentCtx=t.parentCtx,this.invokingState=t.invokingState,this.children=null,this.start=t.start,this.stop=t.stop,t.children&&(this.children=[],t.children.map(function(t){t instanceof ze&&(this.children.push(t),t.parentCtx=this)},this))}enterRule(t){}exitRule(t){}addChild(t){return null===this.children&&(this.children=[]),this.children.push(t),t}removeLastChild(){null!==this.children&&this.children.pop()}addTokenNode(t){const e=new Ve(t);return this.addChild(e),e.parentCtx=this,e}addErrorNode(t){const e=new ze(t);return this.addChild(e),e.parentCtx=this,e}getChild(t,e){if(e=e||null,null===this.children||t<0||t>=this.children.length)return null;if(null===e)return this.children[t];for(let n=0;n<this.children.length;n++){const s=this.children[n];if(s instanceof e){if(0===t)return s;t-=1}}return null}getToken(t,e){if(null===this.children||e<0||e>=this.children.length)return null;for(let n=0;n<this.children.length;n++){const s=this.children[n];if(s instanceof M&&s.symbol.type===t){if(0===e)return s;e-=1}}return null}getTokens(t){if(null===this.children)return[];{const e=[];for(let n=0;n<this.children.length;n++){const s=this.children[n];s instanceof M&&s.symbol.type===t&&e.push(s)}return e}}getTypedRuleContext(t,e){return this.getChild(e,t)}getTypedRuleContexts(t){if(null===this.children)return[];{const e=[];for(let n=0;n<this.children.length;n++){const s=this.children[n];s instanceof t&&e.push(s)}return e}}getChildCount(){return null===this.children?0:this.children.length}getSourceInterval(){return null===this.start||null===this.stop?A.INVALID_INTERVAL:new A(this.start.tokenIndex,this.stop.tokenIndex)}}z.EMPTY=new qe;class He{static DEFAULT_PROGRAM_NAME="default";constructor(t){this.tokens=t,this.programs=new Map}getTokenStream(){return this.tokens}insertAfter(t,e){let n,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:He.DEFAULT_PROGRAM_NAME;n="number"==typeof t?t:t.tokenIndex;let i=this.getProgram(s),r=new Ge(this.tokens,n,i.length,e);i.push(r)}insertBefore(t,e){let n,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:He.DEFAULT_PROGRAM_NAME;n="number"==typeof t?t:t.tokenIndex;const i=this.getProgram(s),r=new Ye(this.tokens,n,i.length,e);i.push(r)}replaceSingle(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:He.DEFAULT_PROGRAM_NAME;this.replace(t,t,e,n)}replace(t,e,n){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:He.DEFAULT_PROGRAM_NAME;if("number"!=typeof t&&(t=t.tokenIndex),"number"!=typeof e&&(e=e.tokenIndex),t>e||t<0||e<0||e>=this.tokens.size)throw new RangeError(`replace: range invalid: ${t}..${e}(size=${this.tokens.size})`);let i=this.getProgram(s),r=new We(this.tokens,t,e,i.length,n);i.push(r)}delete(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:He.DEFAULT_PROGRAM_NAME;void 0===e&&(e=t),this.replace(t,e,null,n)}getProgram(t){let e=this.programs.get(t);return null==e&&(e=this.initializeProgram(t)),e}initializeProgram(t){const e=[];return this.programs.set(t,e),e}getText(t){let e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:He.DEFAULT_PROGRAM_NAME;e=t instanceof A?t:new A(0,this.tokens.size-1),"string"==typeof t&&(n=t);const s=this.programs.get(n);let i=e.start,r=e.stop;if(r>this.tokens.size-1&&(r=this.tokens.size-1),i<0&&(i=0),null==s||0===s.length)return this.tokens.getText(new A(i,r));let o=[],a=this.reduceToSingleOperationPerIndex(s),h=i;for(;h<=r&&h<this.tokens.size;){let t=a.get(h);a.delete(h);let e=this.tokens.get(h);null==t?(e.type!==l.EOF&&o.push(String(e.text)),h++):h=t.execute(o)}if(r===this.tokens.size-1)for(const t of a.values())t.index>=this.tokens.size-1&&o.push(t.text.toString());return o.join("")}reduceToSingleOperationPerIndex(t){for(let e=0;e<t.length;e++){let n=t[e];if(null==n)continue;if(!(n instanceof We))continue;let s=n,i=this.getKindOfOps(t,Ye,e);for(let e of i)e.index===s.index?(t[e.instructionIndex]=void 0,s.text=e.text.toString()+(null!=s.text?s.text.toString():"")):e.index>s.index&&e.index<=s.lastIndex&&(t[e.instructionIndex]=void 0);let r=this.getKindOfOps(t,We,e);for(let e of r){if(e.index>=s.index&&e.lastIndex<=s.lastIndex){t[e.instructionIndex]=void 0;continue}let n=e.lastIndex<s.index||e.index>s.lastIndex;if(null!=e.text||null!=s.text||n){if(!n)throw new Error(`replace op boundaries of ${s} overlap with previous ${e}`)}else t[e.instructionIndex]=void 0,s.index=Math.min(e.index,s.index),s.lastIndex=Math.max(e.lastIndex,s.lastIndex)}}for(let e=0;e<t.length;e++){let n=t[e];if(null==n)continue;if(!(n instanceof Ye))continue;let s=n,i=this.getKindOfOps(t,Ye,e);for(let e of i)e.index===s.index&&(e instanceof Ge?(s.text=this.catOpText(e.text,s.text),t[e.instructionIndex]=void 0):e instanceof Ye&&(s.text=this.catOpText(s.text,e.text),t[e.instructionIndex]=void 0));let r=this.getKindOfOps(t,We,e);for(let n of r)if(s.index!==n.index){if(s.index>=n.index&&s.index<=n.lastIndex)throw new Error(`insert op ${s} within boundaries of previous ${n}`)}else n.text=this.catOpText(s.text,n.text),t[e]=void 0}let e=new Map;for(let n of t)if(null!=n){if(null!=e.get(n.index))throw new Error("should only be one op per index");e.set(n.index,n)}return e}catOpText(t,e){let n="",s="";return null!=t&&(n=t.toString()),null!=e&&(s=e.toString()),n+s}getKindOfOps(t,e,n){return t.slice(0,n).filter(t=>t&&t instanceof e)}}class Ke{constructor(t,e,n,s){this.tokens=t,this.instructionIndex=n,this.index=e,this.text=void 0===s?"":s}toString(){let t=this.constructor.name;const e=t.indexOf("$");return t=t.substring(e+1,t.length),"<"+t+"@"+this.tokens.get(this.index)+':"'+this.text+'">'}}class Ye extends Ke{constructor(t,e,n,s){super(t,e,n,s)}execute(t){return this.text&&t.push(this.text.toString()),this.tokens.get(this.index).type!==l.EOF&&t.push(String(this.tokens.get(this.index).text)),this.index+1}}class Ge extends Ye{constructor(t,e,n,s){super(t,e+1,n,s)}}class We extends Ke{constructor(t,e,n,s,i){super(t,e,s,i),this.lastIndex=n}execute(t){return this.text&&t.push(this.text.toString()),this.lastIndex+1}toString(){return null==this.text?"<DeleteOp@"+this.tokens.get(this.index)+".."+this.tokens.get(this.lastIndex)+">":"<ReplaceOp@"+this.tokens.get(this.index)+".."+this.tokens.get(this.lastIndex)+':"'+this.text+'">'}}const je={atn:ae,dfa:de,context:ge,misc:pe,tree:Se,error:ye,Token:l,CommonToken:Ft,CharStreams:be,CharStream:Le,InputStream:Oe,CommonTokenStream:Me,Lexer:zt,Parser:Be,ParserRuleContext:qe,Interval:A,IntervalSet:k,LL1Analyzer:J,Utils:Pe,TokenStreamRewriter:He};var $e=o.Zo,Xe=o.jB,Je=o.pG,Qe=o.gw,Ze=o.Ay}}]);
|
|
Binary file
|
|
Binary file
|