@arcgis/core 5.2.0-next.47 → 5.2.0-next.49
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/applications/Components/OrientedImageryViewer/PanoramicViewer/utils.d.ts +33 -0
- package/applications/Components/OrientedImageryViewer/PanoramicViewer/utils.js +2 -0
- package/arcgisGlobal.d.ts +2 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/003a87b16f8a4b476e14.js +1 -0
- package/assets/esri/core/workers/chunks/031ccf2e1583beebdf24.js +1 -0
- package/assets/esri/core/workers/chunks/0474af7687466d8befd2.js +1 -0
- package/assets/esri/core/workers/chunks/{2a4868acd546312aa6d8.js → 05f6887805d92da03122.js} +1 -1
- package/assets/esri/core/workers/chunks/069b6d8bdb34ee88d437.js +1 -0
- package/assets/esri/core/workers/chunks/{f9b2727b41943d83d4ca.js → 0a413d917f3d19440fc1.js} +1 -1
- package/assets/esri/core/workers/chunks/0b2ca406761c63529a6a.js +1 -0
- package/assets/esri/core/workers/chunks/{68f7eaa3122de7c00adb.js → 0ea374f7b16745b9bbc7.js} +1 -1
- package/assets/esri/core/workers/chunks/{c369d4266f38e9ea6592.js → 1119a33245138e7b3914.js} +1 -1
- package/assets/esri/core/workers/chunks/12e0c5b7cc5c3f9e6f0f.js +1 -0
- package/assets/esri/core/workers/chunks/172571397c66f992d08c.js +1 -0
- package/assets/esri/core/workers/chunks/18edf2846d7546285e5e.js +1 -0
- package/assets/esri/core/workers/chunks/1b0557fcb058fc450230.js +1 -0
- package/assets/esri/core/workers/chunks/{98f575c038da74ced2a6.js → 1bc45872d22d61dbd7d1.js} +1 -1
- package/assets/esri/core/workers/chunks/{835643f716f7058a2722.js → 1cf8fb704c48ac3d3b15.js} +1 -1
- package/assets/esri/core/workers/chunks/25cb56c3b538d00e7693.js +1 -0
- package/assets/esri/core/workers/chunks/{4d4710d57c72ec75cccc.js → 26f1fd3f2be5102aae1d.js} +1 -1
- package/assets/esri/core/workers/chunks/285a5bd708f0fe1c620c.js +1 -0
- package/assets/esri/core/workers/chunks/{7777a79f26a06a6c5240.js → 304a22c580ce103480cb.js} +1 -1
- package/assets/esri/core/workers/chunks/{383392c63202ac044b6c.js → 33bd9785bd0b6ccef21b.js} +1 -1
- package/assets/esri/core/workers/chunks/{2c0d92c0e3511775401a.js → 35cbf00f0c37a86517af.js} +1 -1
- package/assets/esri/core/workers/chunks/{0f19bc532be24ca64755.js → 36fe6adf6517d8f80125.js} +1 -1
- package/assets/esri/core/workers/chunks/382d9491c2a56c1925fe.js +1 -0
- package/assets/esri/core/workers/chunks/3af2b9d6d5466cb2b957.js +256 -0
- package/assets/esri/core/workers/chunks/{b3cd17daf5a297b96705.js → 3bc2943035391b44d4cf.js} +1 -1
- package/assets/esri/core/workers/chunks/{d36f17d32c654b1ac7fa.js → 3f1a7f8a9ead64bf0b7b.js} +1 -1
- package/assets/esri/core/workers/chunks/40f7bb0ebd918d76f078.js +1 -0
- package/assets/esri/core/workers/chunks/43b39abd49c4a8ce891f.js +1 -0
- package/assets/esri/core/workers/chunks/{821176ee3be724621bb0.js → 461c2de938bf4c9b1442.js} +1 -1
- package/assets/esri/core/workers/chunks/{cc637aec16918052548e.js → 47af3525396f890f2a6b.js} +1 -1
- package/assets/esri/core/workers/chunks/4ee7232ea41fa41c5ed4.js +29 -0
- package/assets/esri/core/workers/chunks/4ee900e5dbb130fa0c7b.js +1 -0
- package/assets/esri/core/workers/chunks/50674ba5f24129d61d89.js +1 -0
- package/assets/esri/core/workers/chunks/547a2fe53139f705f95e.js +1 -0
- package/assets/esri/core/workers/chunks/5ce09c4d06e98b1e9251.js +1 -0
- package/assets/esri/core/workers/chunks/5dbd28fce73751d2d1aa.js +1 -0
- package/assets/esri/core/workers/chunks/5ec8b02e097cf6718462.js +1 -0
- package/assets/esri/core/workers/chunks/5f54d927dc77e92cf145.js +1 -0
- package/assets/esri/core/workers/chunks/63e3d338751240479335.js +1 -0
- package/assets/esri/core/workers/chunks/69b9a327f23e052fced7.js +1 -0
- package/assets/esri/core/workers/chunks/6c2b5087a9df65267f4e.js +1 -0
- package/assets/esri/core/workers/chunks/6ccd5fa5e35dc70fcd5d.js +1 -0
- package/assets/esri/core/workers/chunks/6e520ef645c5edcd499a.js +1 -0
- package/assets/esri/core/workers/chunks/7659391f952d134164cf.js +1 -0
- package/assets/esri/core/workers/chunks/78add8e6b54b51eaa299.js +1 -0
- package/assets/esri/core/workers/chunks/{2b669473aa2c7cfb63c7.js → 7b0ed52363704cfce129.js} +1 -1
- package/assets/esri/core/workers/chunks/7b61f56d0f766421eaef.js +1 -0
- package/assets/esri/core/workers/chunks/7f2f2a92dce3f68e579b.js +1 -0
- package/assets/esri/core/workers/chunks/801a664f21e0218bc705.js +1 -0
- package/assets/esri/core/workers/chunks/{8f9fb4e8a7d73db41664.js → 851bcc75acac4a2f199b.js} +1 -1
- package/assets/esri/core/workers/chunks/{6010b7be978698a642d0.js → 8977c85aecc7e08ab13c.js} +1 -1
- package/assets/esri/core/workers/chunks/8c5726c7ce40a92901e6.js +1 -0
- package/assets/esri/core/workers/chunks/8d21e2dabc5165f1c8ca.js +1 -0
- package/assets/esri/core/workers/chunks/9008090a5d8431ddfa22.js +1 -0
- package/assets/esri/core/workers/chunks/{f2adf1227a795604d3b8.js → 90ae80b797642bff0efa.js} +1 -1
- package/assets/esri/core/workers/chunks/{71ce1009dadcae8f8094.js → 95b3b8fe45ef4ac6b277.js} +1 -1
- package/assets/esri/core/workers/chunks/96cec8a02ca96175d602.js +1 -0
- package/assets/esri/core/workers/chunks/99eccf9ce53582cfa5b5.js +1 -0
- package/assets/esri/core/workers/chunks/9b7cb96acea388d86fa4.js +1 -0
- package/assets/esri/core/workers/chunks/{dee4019338a79c1ecd26.js → 9d0a9d465ec3a8ba1ed2.js} +1 -1
- package/assets/esri/core/workers/chunks/9e474465d069cb9e94f5.js +1 -0
- package/assets/esri/core/workers/chunks/aa3abc07de2921ef6ca1.js +1 -0
- package/assets/esri/core/workers/chunks/{ae9f9e975d7a9d442fa5.js → ab5aa4280ed0cb7fcbe9.js} +1 -1
- package/assets/esri/core/workers/chunks/b03f09ee2224f0cc526a.js +1 -0
- package/assets/esri/core/workers/chunks/{ee58f4bbc0a1f7d03df0.js → b32ede7805c7c6644e4c.js} +1 -1
- package/assets/esri/core/workers/chunks/b49952541d189b4b9f7e.js +1 -0
- package/assets/esri/core/workers/chunks/b8bdacebd4d24ba90f3f.js +1 -0
- package/assets/esri/core/workers/chunks/{85cd0cd721b27c497b18.js → baac90da0703891d59c4.js} +1 -1
- package/assets/esri/core/workers/chunks/bb552089b34d6811fb03.js +1 -0
- package/assets/esri/core/workers/chunks/cd1f1a72483b7c80bd9a.js +1 -0
- package/assets/esri/core/workers/chunks/{744f34e379484e63277c.js → cdb331b58e22f8c1c988.js} +2 -2
- package/assets/esri/core/workers/chunks/{b23d1e10fc4161d1f3eb.js → d021775cf747556660a5.js} +1 -1
- package/assets/esri/core/workers/chunks/{728ea88e7d4733230e1f.js → d1af0bd611a3dc549858.js} +85 -81
- package/assets/esri/core/workers/chunks/d2cb3d5ef0a9285afb78.js +1 -0
- package/assets/esri/core/workers/chunks/d49e42f36bc3dc256b9f.js +1 -0
- package/assets/esri/core/workers/chunks/d560ed96dde5ca3a5583.js +1 -0
- package/assets/esri/core/workers/chunks/dc1787d88b11ed985159.js +1 -0
- package/assets/esri/core/workers/chunks/{399e23d777a043efa9f1.js → dd95f50dac3f33cdb6d2.js} +1 -1
- package/assets/esri/core/workers/chunks/ddb92c815d17c67a45e6.js +1 -0
- package/assets/esri/core/workers/chunks/{7c2784ebbe17d79f669c.js → de50a19944617cd426b8.js} +1 -1
- package/assets/esri/core/workers/chunks/{52efa4ded11c1e71f04f.js → e2e2162adbfb9b46bede.js} +1 -1
- package/assets/esri/core/workers/chunks/e4353f0792f45aa6a62f.js +1 -0
- package/assets/esri/core/workers/chunks/eac8cae89da9ce2f4946.js +1 -0
- package/assets/esri/core/workers/chunks/edf87407dd20685c82ab.js +1 -0
- package/assets/esri/core/workers/chunks/ee7c8a7f384ea6393487.js +705 -0
- package/assets/esri/core/workers/chunks/f1299b4fc760ccca1518.js +1 -0
- package/assets/esri/core/workers/chunks/f244632f7934a4b72c91.js +1 -0
- package/assets/esri/core/workers/chunks/fc639c730115e07a4a1a.js +1 -0
- package/assets/esri/libs/basisu/basis_encoder.wasm +0 -0
- package/assets/esri/libs/basisu/basis_transcoder.wasm +0 -0
- package/assets/esri/libs/dxtEncoder/dxt_encoder.wasm +0 -0
- package/chunks/Component.glsl.js +104 -67
- package/chunks/DefaultMaterial.glsl.js +1 -1
- package/chunks/LineMarker.glsl.js +31 -31
- package/chunks/RibbonLine.glsl.js +60 -49
- package/chunks/basis_encoder.js +1 -1
- package/chunks/basis_transcoder.js +1 -1
- package/chunks/dxt_encoder.js +1 -1
- package/chunks/vec3.js +1 -1
- package/config.js +1 -1
- package/core/has.js +1 -1
- package/core/libs/gl-matrix-2/math/vec3.js +1 -1
- package/core/promiseUtils.js +1 -1
- package/core/workers/workerFactory.js +1 -1
- package/geometry/Mesh.d.ts +4 -4
- package/geometry/support/MeshMaterialMetallicRoughness.d.ts +13 -1
- package/geometry/support/MeshMaterialMetallicRoughness.js +1 -1
- package/geometry/support/aaBoundingBox.js +1 -1
- package/geometry/support/buffer/math/vec3.js +1 -1
- package/geometry/support/frustum.js +1 -1
- package/geometry/support/meshUtils/exporters/gltf/gltf.js +1 -1
- package/geometry/support/meshUtils/extent.js +1 -1
- package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
- package/geometry/support/meshUtils/vertexSpaceConversion.js +1 -1
- package/geometry/support/meshUtils.d.ts +33 -5
- package/geometry/support/plane.js +1 -1
- package/kernel.js +1 -1
- package/layers/orientedImagery/transformations/imageToWorld.js +1 -1
- package/layers/orientedImagery/transformations/utils.js +1 -1
- package/layers/raster/formats/ImageCanvasDecoder.js +1 -1
- package/layers/raster/formats/JpgPlus.js +1 -1
- package/layers/raster/formats/RasterCodec.js +1 -1
- package/layers/raster/formats/TiffDecoder.js +1 -1
- package/layers/raster/formats/Zlib.js +2 -0
- package/package.json +2 -2
- package/rest/featureService/FeatureService.d.ts +74 -1
- package/rest/featureService/FeatureService.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/ObjectSymbol3DLayer.d.ts +10 -8
- package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
- package/symbols/cim/CIMSymbolHelper.js +1 -1
- package/symbols/cim/TextRasterizer.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/symbols/cim/richTextUtils.js +2 -0
- package/symbols/support/ObjectSymbol3DLayerResource.d.ts +9 -4
- package/views/2d/analysis/AreaMeasurement/AreaMeasurementAreaVisualization.js +1 -1
- package/views/2d/analysis/AreaMeasurement/AreaMeasurementTool.js +1 -1
- package/views/2d/analysis/DistanceMeasurement/DistanceMeasurementTool.js +1 -1
- package/views/2d/engine/webgl/TextureManager.js +1 -1
- package/views/2d/engine/webgl/definitions.js +1 -1
- package/views/2d/engine/webgl/mesh/MultiTileMeshData.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
- package/views/2d/engine/webgl/util/DimensionMatcher.js +1 -1
- package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
- package/views/2d/layers/features/Processor.js +1 -1
- package/views/2d/layers/features/processor/AProcessorStrategy.js +1 -1
- package/views/2d/layers/features/processor/AggregateStrategy.js +2 -0
- package/views/2d/layers/features/processor/bins/BinAdapter.js +2 -0
- package/views/2d/layers/features/processor/bins/BinLevelState.js +2 -0
- package/views/2d/layers/features/processor/bins/BinState.js +2 -0
- package/views/2d/layers/features/processor/bins/createBinningStrategy.js +2 -0
- package/views/2d/layers/features/processor/clusters/ClusterAdapter.js +2 -0
- package/views/2d/layers/features/processor/clusters/ClusterLevelState.js +2 -0
- package/views/2d/layers/features/processor/clusters/ClusterSendState.js +2 -0
- package/views/2d/layers/features/processor/clusters/createClusterStrategy.js +2 -0
- package/views/2d/layers/features/processor/createAggregateStrategy.js +2 -0
- package/views/2d/layers/features/processor/tracks/Track.js +2 -0
- package/views/2d/layers/features/processor/tracks/TrackAdapter.js +2 -0
- package/views/2d/layers/features/processor/tracks/TrackLevelState.js +2 -0
- package/views/2d/layers/features/processor/tracks/TrackSendState.js +2 -0
- package/views/2d/layers/features/processor/tracks/createTrackStrategy.js +2 -0
- package/views/2d/layers/features/schema/processor/symbols/SymbolSchema.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderIndirect.js +1 -1
- package/views/2d/layers/support/annodime/DimensionInfo.js +1 -1
- package/views/2d/layers/support/annodime/dimensionUtils.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightReshapeTool3D.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedConfiguration.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedEditTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedSubVisualization.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
- package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
- package/views/3d/focusAreaUtils.js +1 -1
- package/views/3d/glTF/LoaderResult.js +1 -1
- package/views/3d/glTF/internal/Resource.js +1 -1
- package/views/3d/glTF/loader.js +1 -1
- package/views/3d/interactive/editingTools/transform/extentTransform/ExtentScale.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
- package/views/3d/layers/graphics/wosrLoader.js +1 -1
- package/views/3d/layers/i3s/meshUtils.js +1 -1
- package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
- package/views/3d/webgl/RenderCamera.js +1 -1
- package/views/3d/webgl/RenderNode.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/Component.glsl.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBuffer.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js +36 -25
- package/views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js +19 -20
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +17 -10
- package/views/3d/webgl-engine/lib/BoundingInfo.js +1 -1
- package/views/3d/webgl-engine/lib/Intersector.js +1 -1
- package/views/3d/webgl-engine/lib/NavigationDepthCache.js +1 -1
- package/views/3d/webgl-engine/lib/NavigationDepthCacheStore.js +2 -0
- package/views/3d/webgl-engine/lib/Object3D.js +1 -1
- package/views/3d/webgl-engine/lib/PolygonIntersections2D.js +1 -1
- package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
- package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
- package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
- package/views/3d/webgl-engine/lib/intersectorUtils.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodLevel.js +1 -1
- package/views/3d/webgl-engine/lib/screenPolygonOverlapUtils.js +1 -1
- package/views/3d/webgl-engine/lib/screenPolygonTriangleIntersections.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/shaders/AnimatedLine.glsl.js +8 -5
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineLayouts.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTextureBuffer.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/TerrainTechniqueConfiguration.js +1 -1
- package/views/PopupView.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/interactive/snapping/RightAngleTriangleSnapper.js +1 -1
- package/views/interactive/snapping/SnappingAlgorithm.js +1 -1
- package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorkerHandle.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.js +1 -1
- package/views/selection/SelectionOperation.js +1 -1
- package/views/support/AnalysisViewManager.js +1 -1
- package/views/support/DefaultsFromMap.js +1 -1
- package/views/support/LayerViewManager.js +1 -1
- package/views/support/TextureCompressionWorker.js +1 -1
- package/views/webgl/RenderingContext.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/services/SuperimposeService.js +1 -1
- package/widgets/OrientedImageryViewer/support/superimposeUtils.js +1 -1
- package/widgets/PanoramicViewer/support/PanoramicTileNode.d.ts +63 -0
- package/widgets/PanoramicViewer/support/PanoramicTileNode.js +1 -1
- package/widgets/PanoramicViewer/support/PanoramicTilePyramid.d.ts +66 -0
- package/widgets/PanoramicViewer/support/PanoramicTilePyramid.js +1 -1
- package/widgets/PanoramicViewer/utils.js +1 -1
- package/widgets/Sketch/VisibleElements.d.ts +0 -10
- package/widgets/Sketch.js +1 -1
- package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
- package/widgets/support/SelectionToolbar.js +1 -1
- package/widgets/support/Selector3D/selectorUtils.js +2 -0
- package/assets/esri/core/workers/chunks/0115681a3de6df0aebdf.js +0 -1
- package/assets/esri/core/workers/chunks/025caafc70ac26f0a4ed.js +0 -1
- package/assets/esri/core/workers/chunks/08e18fb12533fc76e49c.js +0 -1
- package/assets/esri/core/workers/chunks/0e64e20fedfe01a1985f.js +0 -1
- package/assets/esri/core/workers/chunks/0f674c625f24ac73e25a.js +0 -1
- package/assets/esri/core/workers/chunks/15351354afcbf840a23d.js +0 -29
- package/assets/esri/core/workers/chunks/176c5eaaa23a479c88e0.js +0 -1
- package/assets/esri/core/workers/chunks/1d1f5578c7d8619f7a46.js +0 -1
- package/assets/esri/core/workers/chunks/1f118d85d8271ad7690b.js +0 -1
- package/assets/esri/core/workers/chunks/2015f4def2ef201bdab8.js +0 -1
- package/assets/esri/core/workers/chunks/268637fd6c50264acfc3.js +0 -1
- package/assets/esri/core/workers/chunks/272c8ab189217240d05f.js +0 -1
- package/assets/esri/core/workers/chunks/296fa9fb80e521c30cb1.js +0 -1
- package/assets/esri/core/workers/chunks/354199a41de44902de84.js +0 -1
- package/assets/esri/core/workers/chunks/384b619854ef8a3f6e94.js +0 -1
- package/assets/esri/core/workers/chunks/3af923abeb6e65c4468f.js +0 -1
- package/assets/esri/core/workers/chunks/46d3ddf62fa7a76dd57d.js +0 -1
- package/assets/esri/core/workers/chunks/4b24f72b56edc28bb15e.js +0 -1
- package/assets/esri/core/workers/chunks/4f09f208ece2ec1db727.js +0 -1
- package/assets/esri/core/workers/chunks/57374213084bef59b776.js +0 -1
- package/assets/esri/core/workers/chunks/5f9c4dad6952c4c58ebf.js +0 -1
- package/assets/esri/core/workers/chunks/706230b70a36d2e038f7.js +0 -1
- package/assets/esri/core/workers/chunks/7cc729b57a6a52c8ac68.js +0 -1
- package/assets/esri/core/workers/chunks/8026cc0065f6520c4161.js +0 -1
- package/assets/esri/core/workers/chunks/804ab5f614efa12a131b.js +0 -1
- package/assets/esri/core/workers/chunks/81d55594cee124040565.js +0 -1
- package/assets/esri/core/workers/chunks/8d21f3d6edbcd7b335d0.js +0 -1
- package/assets/esri/core/workers/chunks/8d90bef1091204fba0f1.js +0 -1
- package/assets/esri/core/workers/chunks/8ec5e470583b75fceae1.js +0 -1
- package/assets/esri/core/workers/chunks/9114a575b78a7ea18d0f.js +0 -1
- package/assets/esri/core/workers/chunks/93e705c1147cc8ceca02.js +0 -1
- package/assets/esri/core/workers/chunks/9a97f6cda2f36941efae.js +0 -1
- package/assets/esri/core/workers/chunks/9ceeae787dc7c194d60e.js +0 -1
- package/assets/esri/core/workers/chunks/a8033e606b2db1ee332d.js +0 -1
- package/assets/esri/core/workers/chunks/a90f7b1c6c69b6033b4c.js +0 -1
- package/assets/esri/core/workers/chunks/a9c641bcdef161c754bf.js +0 -1
- package/assets/esri/core/workers/chunks/ad5c2b0de6713d0a93a4.js +0 -680
- package/assets/esri/core/workers/chunks/ae50b2d5e63f62c088d2.js +0 -1
- package/assets/esri/core/workers/chunks/aea247138617e12b699b.js +0 -1
- package/assets/esri/core/workers/chunks/b03dcf3d55266745f3d1.js +0 -1
- package/assets/esri/core/workers/chunks/b32bdf5730953c2fb16b.js +0 -1
- package/assets/esri/core/workers/chunks/bf287f0e2ecb4532dc00.js +0 -1
- package/assets/esri/core/workers/chunks/c01a121ebe571a848452.js +0 -1
- package/assets/esri/core/workers/chunks/c3cd38ca8690286d40d7.js +0 -1
- package/assets/esri/core/workers/chunks/c4b13124a9cfc78c42a6.js +0 -261
- package/assets/esri/core/workers/chunks/c5e36544b2d1792e4c5f.js +0 -1
- package/assets/esri/core/workers/chunks/c6042825f61cd70d54d8.js +0 -1
- package/assets/esri/core/workers/chunks/cba3316910ff088f4d77.js +0 -1
- package/assets/esri/core/workers/chunks/d8b67ca02cdc1e8191e3.js +0 -1
- package/assets/esri/core/workers/chunks/dadefe369f49e89a2610.js +0 -1
- package/assets/esri/core/workers/chunks/db416ba3132034e20642.js +0 -1
- package/assets/esri/core/workers/chunks/de9573871f64c01e9f01.js +0 -1
- package/assets/esri/core/workers/chunks/dfbdc72c7ea137e3841d.js +0 -1
- package/assets/esri/core/workers/chunks/e3e966777f18164afcd8.js +0 -1
- package/assets/esri/core/workers/chunks/e9c48630757bea465b7e.js +0 -1
- package/assets/esri/core/workers/chunks/f2c8122d31aedc2604ee.js +0 -1
- package/assets/esri/core/workers/chunks/f8f0de841be17cd05c8f.js +0 -1
- package/assets/esri/core/workers/chunks/ff089723a27859fe18d1.js +0 -1
- package/chunks/Zlib.js +0 -2
- package/views/2d/layers/features/processor/AAggregateStrategy.js +0 -2
- package/views/2d/layers/features/processor/BinningStrategy.js +0 -2
- package/views/2d/layers/features/processor/ClusterStrategy.js +0 -2
- package/views/2d/layers/features/processor/TrackStrategy.js +0 -2
- package/views/3d/analysis/Viewshed/ViewshedTool2.js +0 -2
- /package/assets/esri/core/workers/chunks/{744f34e379484e63277c.js.LICENSE.txt → cdb331b58e22f8c1c988.js.LICENSE.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8714],{98714(e,r,t){t.d(r,{default:()=>o});var n,o=(n="undefined"!=typeof document?document.currentScript?.src:void 0,function(e={}){var r,o,a=e,i=new Promise((e,t)=>{r=e,o=t}),s="object"==typeof window,l="undefined"!=typeof WorkerGlobalScope;"object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node&&process.type;var d,u,c=Object.assign({},a),f="./this.program",h="";(s||l)&&(l?h=self.location.href:"undefined"!=typeof document&&document.currentScript&&(h=document.currentScript.src),n&&(h=n),h=h.startsWith("blob:")?"":h.substr(0,h.replace(/[?#].*/,"").lastIndexOf("/")+1),l&&(u=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.responseType="arraybuffer",r.send(null),new Uint8Array(r.response)}),d=async e=>{var r=await fetch(e,{credentials:"same-origin"});if(r.ok)return r.arrayBuffer();throw new Error(r.status+" : "+r.url)});var m=a.print||console.log.bind(console),p=a.printErr||console.error.bind(console);Object.assign(a,c),c=null,a.arguments&&a.arguments,a.thisProgram&&(f=a.thisProgram);var v,w,g,y,E,b,k,_,A,P=a.wasmBinary,$=!1;function D(){var e=v.buffer;a.HEAP8=w=new Int8Array(e),a.HEAP16=y=new Int16Array(e),a.HEAPU8=g=new Uint8Array(e),a.HEAPU16=E=new Uint16Array(e),a.HEAP32=b=new Int32Array(e),a.HEAPU32=k=new Uint32Array(e),a.HEAPF32=_=new Float32Array(e),a.HEAPF64=A=new Float64Array(e)}var F=[],S=[],C=[];function T(e){F.unshift(e)}function M(e){C.unshift(e)}var j=0,R=null;function x(e){j++,a.monitorRunDependencies?.(j)}function N(e){if(j--,a.monitorRunDependencies?.(j),0==j&&R){var r=R;R=null,r()}}function z(e){a.onAbort?.(e),p(e="Aborted("+e+")"),$=!0,e+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(e);throw o(r),r}var O,B,U,W=e=>e.startsWith("data:application/octet-stream;base64,");async function L(e,r,t){if(!e&&"function"==typeof WebAssembly.instantiateStreaming&&!W(r)&&"function"==typeof fetch)try{var n=fetch(r,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(n,t)}catch(e){p(`wasm streaming compile failed: ${e}`),p("falling back to ArrayBuffer instantiation")}return async function(e,r){try{var t=await async function(e){if(!P)try{var r=await d(e);return new Uint8Array(r)}catch{}return function(e){if(e==O&&P)return new Uint8Array(P);if(u)return u(e);throw"both async and sync fetching of the wasm failed"}(e)}(e);return await WebAssembly.instantiate(t,r)}catch(e){p(`failed to asynchronously prepare wasm: ${e}`),z(e)}}(r,t)}var I=e=>{for(;e.length>0;)e.shift()(a)};a.noExitRuntime;class H{constructor(e){this.excPtr=e,this.ptr=e-24}set_type(e){k[this.ptr+4>>2]=e}get_type(){return k[this.ptr+4>>2]}set_destructor(e){k[this.ptr+8>>2]=e}get_destructor(){return k[this.ptr+8>>2]}set_caught(e){e=e?1:0,w[this.ptr+12]=e}get_caught(){return 0!=w[this.ptr+12]}set_rethrown(e){e=e?1:0,w[this.ptr+13]=e}get_rethrown(){return 0!=w[this.ptr+13]}init(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)}set_adjusted_ptr(e){k[this.ptr+16>>2]=e}get_adjusted_ptr(){return k[this.ptr+16>>2]}}var q,V,X,G=e=>{for(var r="",t=e;g[t];)r+=q[g[t++]];return r},K={},J={},Q={},Y=e=>{throw new V(e)},Z=e=>{throw new X(e)};function ee(e,r,t={}){return function(e,r,t={}){var n=r.name;if(e||Y(`type "${n}" must have a positive integer typeid pointer`),J.hasOwnProperty(e)){if(t.ignoreDuplicateRegistrations)return;Y(`Cannot register type '${n}' twice`)}if(J[e]=r,delete Q[e],K.hasOwnProperty(e)){var o=K[e];delete K[e],o.forEach(e=>e())}}(e,r,t)}var re=[],te=[],ne=e=>{e>9&&0===--te[e+1]&&(te[e]=void 0,re.push(e))},oe=e=>(e||Y("Cannot use deleted val. handle = "+e),te[e]),ae=e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const r=re.pop()||te.length;return te[r]=e,te[r+1]=1,r}}};function ie(e){return this.fromWireType(k[e>>2])}var se,le,de={name:"emscripten::val",fromWireType:e=>{var r=oe(e);return ne(e),r},toWireType:(e,r)=>ae(r),argPackAdvance:8,readValueFromPointer:ie,destructorFunction:null},ue=(e,r)=>{switch(r){case 4:return function(e){return this.fromWireType(_[e>>2])};case 8:return function(e){return this.fromWireType(A[e>>3])};default:throw new TypeError(`invalid float width (${r}): ${e}`)}},ce=(e,r)=>Object.defineProperty(r,"name",{value:e}),fe=e=>{for(;e.length;){var r=e.pop();e.pop()(r)}},he=(e,r,t)=>{if(void 0===e[r].overloadTable){var n=e[r];e[r]=function(...n){return e[r].overloadTable.hasOwnProperty(n.length)||Y(`Function '${t}' called with an invalid number of arguments (${n.length}) - expects one of (${e[r].overloadTable})!`),e[r].overloadTable[n.length].apply(this,n)},e[r].overloadTable=[],e[r].overloadTable[n.argCount]=n}},me=(e,r,t)=>{a.hasOwnProperty(e)?((void 0===t||void 0!==a[e].overloadTable&&void 0!==a[e].overloadTable[t])&&Y(`Cannot register public name '${e}' twice`),he(a,e,e),a[e].overloadTable.hasOwnProperty(t)&&Y(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`),a[e].overloadTable[t]=r):(a[e]=r,a[e].argCount=t)},pe=(e,r,t)=>{a.hasOwnProperty(e)||Z("Replacing nonexistent public symbol"),void 0!==a[e].overloadTable&&void 0!==t?a[e].overloadTable[t]=r:(a[e]=r,a[e].argCount=t)},ve=[],we=e=>{var r=ve[e];return r||(e>=ve.length&&(ve.length=e+1),ve[e]=r=se.get(e)),r},ge=(e,r)=>{var t=(e=G(e)).includes("j")?((e,r)=>(...t)=>((e,r,t=[])=>e.includes("j")?((e,r,t)=>(e=e.replace(/p/g,"i"),(0,a["dynCall_"+e])(r,...t)))(e,r,t):we(r)(...t))(e,r,t))(e,r):we(r);return"function"!=typeof t&&Y(`unknown function pointer with signature ${e}: ${r}`),t},ye=e=>{var r=sr(e),t=G(r);return dr(r),t},Ee=(e,r,t)=>{switch(r){case 1:return t?e=>w[e]:e=>g[e];case 2:return t?e=>y[e>>1]:e=>E[e>>1];case 4:return t?e=>b[e>>2]:e=>k[e>>2];default:throw new TypeError(`invalid integer width (${r}): ${e}`)}},be=(e,r,t,n)=>{if(!(n>0))return 0;for(var o=t,a=t+n-1,i=0;i<e.length;++i){var s=e.charCodeAt(i);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++i)),s<=127){if(t>=a)break;r[t++]=s}else if(s<=2047){if(t+1>=a)break;r[t++]=192|s>>6,r[t++]=128|63&s}else if(s<=65535){if(t+2>=a)break;r[t++]=224|s>>12,r[t++]=128|s>>6&63,r[t++]=128|63&s}else{if(t+3>=a)break;r[t++]=240|s>>18,r[t++]=128|s>>12&63,r[t++]=128|s>>6&63,r[t++]=128|63&s}}return r[t]=0,t-o},ke=(e,r,t)=>be(e,g,r,t),_e=e=>{for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n<=127?r++:n<=2047?r+=2:n>=55296&&n<=57343?(r+=4,++t):r+=3}return r},Ae="undefined"!=typeof TextDecoder?new TextDecoder:void 0,Pe=(e,r=0,t=NaN)=>{for(var n=r+t,o=r;e[o]&&!(o>=n);)++o;if(o-r>16&&e.buffer&&Ae)return Ae.decode(e.subarray(r,o));for(var a="";r<o;){var i=e[r++];if(128&i){var s=63&e[r++];if(192!=(224&i)){var l=63&e[r++];if((i=224==(240&i)?(15&i)<<12|s<<6|l:(7&i)<<18|s<<12|l<<6|63&e[r++])<65536)a+=String.fromCharCode(i);else{var d=i-65536;a+=String.fromCharCode(55296|d>>10,56320|1023&d)}}else a+=String.fromCharCode((31&i)<<6|s)}else a+=String.fromCharCode(i)}return a},$e=(e,r)=>e?Pe(g,e,r):"",De="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,Fe=(e,r)=>{for(var t=e,n=t>>1,o=n+r/2;!(n>=o)&&E[n];)++n;if((t=n<<1)-e>32&&De)return De.decode(g.subarray(e,t));for(var a="",i=0;!(i>=r/2);++i){var s=y[e+2*i>>1];if(0==s)break;a+=String.fromCharCode(s)}return a},Se=(e,r,t)=>{if(t??=2147483647,t<2)return 0;for(var n=r,o=(t-=2)<2*e.length?t/2:e.length,a=0;a<o;++a){var i=e.charCodeAt(a);y[r>>1]=i,r+=2}return y[r>>1]=0,r-n},Ce=e=>2*e.length,Te=(e,r)=>{for(var t=0,n="";!(t>=r/4);){var o=b[e+4*t>>2];if(0==o)break;if(++t,o>=65536){var a=o-65536;n+=String.fromCharCode(55296|a>>10,56320|1023&a)}else n+=String.fromCharCode(o)}return n},Me=(e,r,t)=>{if(t??=2147483647,t<4)return 0;for(var n=r,o=n+t-4,a=0;a<e.length;++a){var i=e.charCodeAt(a);if(i>=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&e.charCodeAt(++a)),b[r>>2]=i,(r+=4)+4>o)break}return b[r>>2]=0,r-n},je=e=>{for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n>=55296&&n<=57343&&++t,r+=4}return r},Re=(e,r)=>{var t=J[e];return void 0===t&&Y(`${r} has unknown type ${ye(e)}`),t},xe=(e,r,t)=>{var n=[],o=e.toWireType(n,t);return n.length&&(k[r>>2]=ae(n)),o},Ne=[],ze={},Oe=e=>{var r=ze[e];return void 0===r?G(e):r},Be=()=>{if("object"==typeof globalThis)return globalThis;function e(e){e.$$$embind_global$$$=e;var r="object"==typeof $$$embind_global$$$&&e.$$$embind_global$$$==e;return r||delete e.$$$embind_global$$$,r}if("object"==typeof $$$embind_global$$$)return $$$embind_global$$$;if("object"==typeof t.g&&e(t.g)?$$$embind_global$$$=t.g:"object"==typeof self&&e(self)&&($$$embind_global$$$=self),"object"==typeof $$$embind_global$$$)return $$$embind_global$$$;throw Error("unable to get global object.")},Ue=Reflect.construct,We=(e,r)=>Math.ceil(e/r)*r,Le=e=>{var r=(e-v.buffer.byteLength+65535)/65536|0;try{return v.grow(r),D(),1}catch(e){}},Ie={},He=()=>{if(!He.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:f||"./this.program"};for(var r in Ie)void 0===Ie[r]?delete e[r]:e[r]=Ie[r];var t=[];for(var r in e)t.push(`${r}=${e[r]}`);He.strings=t}return He.strings},qe={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,r)=>{for(var t=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),t++):t&&(e.splice(n,1),t--)}if(r)for(;t;t--)e.unshift("..");return e},normalize:e=>{var r=qe.isAbs(e),t="/"===e.substr(-1);return(e=qe.normalizeArray(e.split("/").filter(e=>!!e),!r).join("/"))||r||(e="."),e&&t&&(e+="/"),(r?"/":"")+e},dirname:e=>{var r=qe.splitPath(e),t=r[0],n=r[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:e=>{if("/"===e)return"/";var r=(e=(e=qe.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===r?e:e.substr(r+1)},join:(...e)=>qe.normalize(e.join("/")),join2:(e,r)=>qe.normalize(e+"/"+r)},Ve=e=>(Ve=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);z("initRandomDevice")})())(e),Xe={resolve:(...e)=>{for(var r="",t=!1,n=e.length-1;n>=-1&&!t;n--){var o=n>=0?e[n]:tr.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");if(!o)return"";r=o+"/"+r,t=qe.isAbs(o)}return(t?"/":"")+(r=qe.normalizeArray(r.split("/").filter(e=>!!e),!t).join("/"))||"."},relative:(e,r)=>{function t(e){for(var r=0;r<e.length&&""===e[r];r++);for(var t=e.length-1;t>=0&&""===e[t];t--);return r>t?[]:e.slice(r,t-r+1)}e=Xe.resolve(e).substr(1),r=Xe.resolve(r).substr(1);for(var n=t(e.split("/")),o=t(r.split("/")),a=Math.min(n.length,o.length),i=a,s=0;s<a;s++)if(n[s]!==o[s]){i=s;break}var l=[];for(s=i;s<n.length;s++)l.push("..");return(l=l.concat(o.slice(i))).join("/")}},Ge=[];function Ke(e,r,t){var n=_e(e)+1,o=new Array(n),a=be(e,o,0,o.length);return o.length=a,o}var Je={ttys:[],init(){},shutdown(){},register(e,r){Je.ttys[e]={input:[],output:[],ops:r},tr.registerDevice(e,Je.stream_ops)},stream_ops:{open(e){var r=Je.ttys[e.node.rdev];if(!r)throw new tr.ErrnoError(43);e.tty=r,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,r,t,n,o){if(!e.tty||!e.tty.ops.get_char)throw new tr.ErrnoError(60);for(var a=0,i=0;i<n;i++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(e){throw new tr.ErrnoError(29)}if(void 0===s&&0===a)throw new tr.ErrnoError(6);if(null==s)break;a++,r[t+i]=s}return a&&(e.node.atime=Date.now()),a},write(e,r,t,n,o){if(!e.tty||!e.tty.ops.put_char)throw new tr.ErrnoError(60);try{for(var a=0;a<n;a++)e.tty.ops.put_char(e.tty,r[t+a])}catch(e){throw new tr.ErrnoError(29)}return n&&(e.node.mtime=e.node.ctime=Date.now()),a}},default_tty_ops:{get_char:e=>(()=>{if(!Ge.length){var e=null;if("undefined"!=typeof window&&"function"==typeof window.prompt&&null!==(e=window.prompt("Input: "))&&(e+="\n"),!e)return null;Ge=Ke(e)}return Ge.shift()})(),put_char(e,r){null===r||10===r?(m(Pe(e.output)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&(m(Pe(e.output)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,r,t)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,r){null===r||10===r?(p(Pe(e.output)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&(p(Pe(e.output)),e.output=[])}}},Qe=e=>{z()},Ye={ops_table:null,mount:e=>Ye.createNode(null,"/",16895,0),createNode(e,r,t,n){if(tr.isBlkdev(t)||tr.isFIFO(t))throw new tr.ErrnoError(63);Ye.ops_table||={dir:{node:{getattr:Ye.node_ops.getattr,setattr:Ye.node_ops.setattr,lookup:Ye.node_ops.lookup,mknod:Ye.node_ops.mknod,rename:Ye.node_ops.rename,unlink:Ye.node_ops.unlink,rmdir:Ye.node_ops.rmdir,readdir:Ye.node_ops.readdir,symlink:Ye.node_ops.symlink},stream:{llseek:Ye.stream_ops.llseek}},file:{node:{getattr:Ye.node_ops.getattr,setattr:Ye.node_ops.setattr},stream:{llseek:Ye.stream_ops.llseek,read:Ye.stream_ops.read,write:Ye.stream_ops.write,allocate:Ye.stream_ops.allocate,mmap:Ye.stream_ops.mmap,msync:Ye.stream_ops.msync}},link:{node:{getattr:Ye.node_ops.getattr,setattr:Ye.node_ops.setattr,readlink:Ye.node_ops.readlink},stream:{}},chrdev:{node:{getattr:Ye.node_ops.getattr,setattr:Ye.node_ops.setattr},stream:tr.chrdev_stream_ops}};var o=tr.createNode(e,r,t,n);return tr.isDir(o.mode)?(o.node_ops=Ye.ops_table.dir.node,o.stream_ops=Ye.ops_table.dir.stream,o.contents={}):tr.isFile(o.mode)?(o.node_ops=Ye.ops_table.file.node,o.stream_ops=Ye.ops_table.file.stream,o.usedBytes=0,o.contents=null):tr.isLink(o.mode)?(o.node_ops=Ye.ops_table.link.node,o.stream_ops=Ye.ops_table.link.stream):tr.isChrdev(o.mode)&&(o.node_ops=Ye.ops_table.chrdev.node,o.stream_ops=Ye.ops_table.chrdev.stream),o.atime=o.mtime=o.ctime=Date.now(),e&&(e.contents[r]=o,e.atime=e.mtime=e.ctime=o.atime),o},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,r){var t=e.contents?e.contents.length:0;if(!(t>=r)){r=Math.max(r,t*(t<1048576?2:1.125)>>>0),0!=t&&(r=Math.max(r,256));var n=e.contents;e.contents=new Uint8Array(r),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,r){if(e.usedBytes!=r)if(0==r)e.contents=null,e.usedBytes=0;else{var t=e.contents;e.contents=new Uint8Array(r),t&&e.contents.set(t.subarray(0,Math.min(r,e.usedBytes))),e.usedBytes=r}},node_ops:{getattr(e){var r={};return r.dev=tr.isChrdev(e.mode)?e.id:1,r.ino=e.id,r.mode=e.mode,r.nlink=1,r.uid=0,r.gid=0,r.rdev=e.rdev,tr.isDir(e.mode)?r.size=4096:tr.isFile(e.mode)?r.size=e.usedBytes:tr.isLink(e.mode)?r.size=e.link.length:r.size=0,r.atime=new Date(e.atime),r.mtime=new Date(e.mtime),r.ctime=new Date(e.ctime),r.blksize=4096,r.blocks=Math.ceil(r.size/r.blksize),r},setattr(e,r){for(const t of["mode","atime","mtime","ctime"])r[t]&&(e[t]=r[t]);void 0!==r.size&&Ye.resizeFileStorage(e,r.size)},lookup(e,r){throw Ye.doesNotExistError},mknod:(e,r,t,n)=>Ye.createNode(e,r,t,n),rename(e,r,t){var n;try{n=tr.lookupNode(r,t)}catch(e){}if(n){if(tr.isDir(e.mode))for(var o in n.contents)throw new tr.ErrnoError(55);tr.hashRemoveNode(n)}delete e.parent.contents[e.name],r.contents[t]=e,e.name=t,r.ctime=r.mtime=e.parent.ctime=e.parent.mtime=Date.now()},unlink(e,r){delete e.contents[r],e.ctime=e.mtime=Date.now()},rmdir(e,r){var t=tr.lookupNode(e,r);for(var n in t.contents)throw new tr.ErrnoError(55);delete e.contents[r],e.ctime=e.mtime=Date.now()},readdir:e=>[".","..",...Object.keys(e.contents)],symlink(e,r,t){var n=Ye.createNode(e,r,41471,0);return n.link=t,n},readlink(e){if(!tr.isLink(e.mode))throw new tr.ErrnoError(28);return e.link}},stream_ops:{read(e,r,t,n,o){var a=e.node.contents;if(o>=e.node.usedBytes)return 0;var i=Math.min(e.node.usedBytes-o,n);if(i>8&&a.subarray)r.set(a.subarray(o,o+i),t);else for(var s=0;s<i;s++)r[t+s]=a[o+s];return i},write(e,r,t,n,o,a){if(r.buffer===w.buffer&&(a=!1),!n)return 0;var i=e.node;if(i.mtime=i.ctime=Date.now(),r.subarray&&(!i.contents||i.contents.subarray)){if(a)return i.contents=r.subarray(t,t+n),i.usedBytes=n,n;if(0===i.usedBytes&&0===o)return i.contents=r.slice(t,t+n),i.usedBytes=n,n;if(o+n<=i.usedBytes)return i.contents.set(r.subarray(t,t+n),o),n}if(Ye.expandFileStorage(i,o+n),i.contents.subarray&&r.subarray)i.contents.set(r.subarray(t,t+n),o);else for(var s=0;s<n;s++)i.contents[o+s]=r[t+s];return i.usedBytes=Math.max(i.usedBytes,o+n),n},llseek(e,r,t){var n=r;if(1===t?n+=e.position:2===t&&tr.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new tr.ErrnoError(28);return n},allocate(e,r,t){Ye.expandFileStorage(e.node,r+t),e.node.usedBytes=Math.max(e.node.usedBytes,r+t)},mmap(e,r,t,n,o){if(!tr.isFile(e.node.mode))throw new tr.ErrnoError(43);var a,i,s=e.node.contents;if(2&o||!s||s.buffer!==w.buffer){if(i=!0,!(a=Qe()))throw new tr.ErrnoError(48);s&&((t>0||t+r<s.length)&&(s=s.subarray?s.subarray(t,t+r):Array.prototype.slice.call(s,t,t+r)),w.set(s,a))}else i=!1,a=s.byteOffset;return{ptr:a,allocated:i}},msync:(e,r,t,n,o)=>(Ye.stream_ops.write(e,r,0,n,t,!1),0)}},Ze=async e=>{var r=await d(e);return new Uint8Array(r)},er=a.preloadPlugins||[],rr=(e,r)=>{var t=0;return e&&(t|=365),r&&(t|=146),t},tr={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:class{name="ErrnoError";constructor(e){this.errno=e}},filesystems:null,syncFSRequests:0,readFiles:{},FSStream:class{shared={};get object(){return this.node}set object(e){this.node=e}get isRead(){return 1!=(2097155&this.flags)}get isWrite(){return!!(2097155&this.flags)}get isAppend(){return 1024&this.flags}get flags(){return this.shared.flags}set flags(e){this.shared.flags=e}get position(){return this.shared.position}set position(e){this.shared.position=e}},FSNode:class{node_ops={};stream_ops={};readMode=365;writeMode=146;mounted=null;constructor(e,r,t,n){e||(e=this),this.parent=e,this.mount=e.mount,this.id=tr.nextInode++,this.name=r,this.mode=t,this.rdev=n,this.atime=this.mtime=this.ctime=Date.now()}get read(){return(this.mode&this.readMode)===this.readMode}set read(e){e?this.mode|=this.readMode:this.mode&=~this.readMode}get write(){return(this.mode&this.writeMode)===this.writeMode}set write(e){e?this.mode|=this.writeMode:this.mode&=~this.writeMode}get isFolder(){return tr.isDir(this.mode)}get isDevice(){return tr.isChrdev(this.mode)}},lookupPath(e,r={}){if(!e)return{path:"",node:null};r.follow_mount??=!0,qe.isAbs(e)||(e=tr.cwd()+"/"+e);e:for(var t=0;t<40;t++){for(var n=e.split("/").filter(e=>!!e&&"."!==e),o=tr.root,a="/",i=0;i<n.length;i++){var s=i===n.length-1;if(s&&r.parent)break;if(".."!==n[i]){a=qe.join2(a,n[i]);try{o=tr.lookupNode(o,n[i])}catch(e){if(44===e?.errno&&s&&r.noent_okay)return{path:a};throw e}if(!tr.isMountpoint(o)||s&&!r.follow_mount||(o=o.mounted.root),tr.isLink(o.mode)&&(!s||r.follow)){if(!o.node_ops.readlink)throw new tr.ErrnoError(52);var l=o.node_ops.readlink(o);qe.isAbs(l)||(l=qe.dirname(a)+"/"+l),e=l+"/"+n.slice(i+1).join("/");continue e}}else a=qe.dirname(a),o=o.parent}return{path:a,node:o}}throw new tr.ErrnoError(32)},getPath(e){for(var r;;){if(tr.isRoot(e)){var t=e.mount.mountpoint;return r?"/"!==t[t.length-1]?`${t}/${r}`:t+r:t}r=r?`${e.name}/${r}`:e.name,e=e.parent}},hashName(e,r){for(var t=0,n=0;n<r.length;n++)t=(t<<5)-t+r.charCodeAt(n)|0;return(e+t>>>0)%tr.nameTable.length},hashAddNode(e){var r=tr.hashName(e.parent.id,e.name);e.name_next=tr.nameTable[r],tr.nameTable[r]=e},hashRemoveNode(e){var r=tr.hashName(e.parent.id,e.name);if(tr.nameTable[r]===e)tr.nameTable[r]=e.name_next;else for(var t=tr.nameTable[r];t;){if(t.name_next===e){t.name_next=e.name_next;break}t=t.name_next}},lookupNode(e,r){var t=tr.mayLookup(e);if(t)throw new tr.ErrnoError(t);for(var n=tr.hashName(e.id,r),o=tr.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===e.id&&a===r)return o}return tr.lookup(e,r)},createNode(e,r,t,n){var o=new tr.FSNode(e,r,t,n);return tr.hashAddNode(o),o},destroyNode(e){tr.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>!(49152&~e),flagsToPermissionString(e){var r=["r","w","rw"][3&e];return 512&e&&(r+="w"),r},nodePermissions:(e,r)=>tr.ignorePermissions||(!r.includes("r")||292&e.mode)&&(!r.includes("w")||146&e.mode)&&(!r.includes("x")||73&e.mode)?0:2,mayLookup:e=>tr.isDir(e.mode)?tr.nodePermissions(e,"x")||(e.node_ops.lookup?0:2):54,mayCreate(e,r){if(!tr.isDir(e.mode))return 54;try{return tr.lookupNode(e,r),20}catch(e){}return tr.nodePermissions(e,"wx")},mayDelete(e,r,t){var n;try{n=tr.lookupNode(e,r)}catch(e){return e.errno}var o=tr.nodePermissions(e,"wx");if(o)return o;if(t){if(!tr.isDir(n.mode))return 54;if(tr.isRoot(n)||tr.getPath(n)===tr.cwd())return 10}else if(tr.isDir(n.mode))return 31;return 0},mayOpen:(e,r)=>e?tr.isLink(e.mode)?32:tr.isDir(e.mode)&&("r"!==tr.flagsToPermissionString(r)||512&r)?31:tr.nodePermissions(e,tr.flagsToPermissionString(r)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=tr.MAX_OPEN_FDS;e++)if(!tr.streams[e])return e;throw new tr.ErrnoError(33)},getStreamChecked(e){var r=tr.getStream(e);if(!r)throw new tr.ErrnoError(8);return r},getStream:e=>tr.streams[e],createStream:(e,r=-1)=>(e=Object.assign(new tr.FSStream,e),-1==r&&(r=tr.nextfd()),e.fd=r,tr.streams[r]=e,e),closeStream(e){tr.streams[e]=null},dupStream(e,r=-1){var t=tr.createStream(e,r);return t.stream_ops?.dup?.(t),t},chrdev_stream_ops:{open(e){var r=tr.getDevice(e.node.rdev);e.stream_ops=r.stream_ops,e.stream_ops.open?.(e)},llseek(){throw new tr.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,r)=>e<<8|r,registerDevice(e,r){tr.devices[e]={stream_ops:r}},getDevice:e=>tr.devices[e],getMounts(e){for(var r=[],t=[e];t.length;){var n=t.pop();r.push(n),t.push(...n.mounts)}return r},syncfs(e,r){"function"==typeof e&&(r=e,e=!1),tr.syncFSRequests++,tr.syncFSRequests>1&&p(`warning: ${tr.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var t=tr.getMounts(tr.root.mount),n=0;function o(e){return tr.syncFSRequests--,r(e)}function a(e){if(e)return a.errored?void 0:(a.errored=!0,o(e));++n>=t.length&&o(null)}t.forEach(r=>{if(!r.type.syncfs)return a(null);r.type.syncfs(r,e,a)})},mount(e,r,t){var n,o="/"===t,a=!t;if(o&&tr.root)throw new tr.ErrnoError(10);if(!o&&!a){var i=tr.lookupPath(t,{follow_mount:!1});if(t=i.path,n=i.node,tr.isMountpoint(n))throw new tr.ErrnoError(10);if(!tr.isDir(n.mode))throw new tr.ErrnoError(54)}var s={type:e,opts:r,mountpoint:t,mounts:[]},l=e.mount(s);return l.mount=s,s.root=l,o?tr.root=l:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),l},unmount(e){var r=tr.lookupPath(e,{follow_mount:!1});if(!tr.isMountpoint(r.node))throw new tr.ErrnoError(28);var t=r.node,n=t.mounted,o=tr.getMounts(n);Object.keys(tr.nameTable).forEach(e=>{for(var r=tr.nameTable[e];r;){var t=r.name_next;o.includes(r.mount)&&tr.destroyNode(r),r=t}}),t.mounted=null;var a=t.mount.mounts.indexOf(n);t.mount.mounts.splice(a,1)},lookup:(e,r)=>e.node_ops.lookup(e,r),mknod(e,r,t){var n=tr.lookupPath(e,{parent:!0}).node,o=qe.basename(e);if(!o||"."===o||".."===o)throw new tr.ErrnoError(28);var a=tr.mayCreate(n,o);if(a)throw new tr.ErrnoError(a);if(!n.node_ops.mknod)throw new tr.ErrnoError(63);return n.node_ops.mknod(n,o,r,t)},statfs(e){var r={bsize:4096,frsize:4096,blocks:1e6,bfree:5e5,bavail:5e5,files:tr.nextInode,ffree:tr.nextInode-1,fsid:42,flags:2,namelen:255},t=tr.lookupPath(e,{follow:!0}).node;return t?.node_ops.statfs&&Object.assign(r,t.node_ops.statfs(t.mount.opts.root)),r},create:(e,r=438)=>(r&=4095,r|=32768,tr.mknod(e,r,0)),mkdir:(e,r=511)=>(r&=1023,r|=16384,tr.mknod(e,r,0)),mkdirTree(e,r){for(var t=e.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{tr.mkdir(n,r)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,r,t)=>(void 0===t&&(t=r,r=438),r|=8192,tr.mknod(e,r,t)),symlink(e,r){if(!Xe.resolve(e))throw new tr.ErrnoError(44);var t=tr.lookupPath(r,{parent:!0}).node;if(!t)throw new tr.ErrnoError(44);var n=qe.basename(r),o=tr.mayCreate(t,n);if(o)throw new tr.ErrnoError(o);if(!t.node_ops.symlink)throw new tr.ErrnoError(63);return t.node_ops.symlink(t,n,e)},rename(e,r){var t,n,o=qe.dirname(e),a=qe.dirname(r),i=qe.basename(e),s=qe.basename(r);if(t=tr.lookupPath(e,{parent:!0}).node,n=tr.lookupPath(r,{parent:!0}).node,!t||!n)throw new tr.ErrnoError(44);if(t.mount!==n.mount)throw new tr.ErrnoError(75);var l,d=tr.lookupNode(t,i),u=Xe.relative(e,a);if("."!==u.charAt(0))throw new tr.ErrnoError(28);if("."!==(u=Xe.relative(r,o)).charAt(0))throw new tr.ErrnoError(55);try{l=tr.lookupNode(n,s)}catch(e){}if(d!==l){var c=tr.isDir(d.mode),f=tr.mayDelete(t,i,c);if(f)throw new tr.ErrnoError(f);if(f=l?tr.mayDelete(n,s,c):tr.mayCreate(n,s))throw new tr.ErrnoError(f);if(!t.node_ops.rename)throw new tr.ErrnoError(63);if(tr.isMountpoint(d)||l&&tr.isMountpoint(l))throw new tr.ErrnoError(10);if(n!==t&&(f=tr.nodePermissions(t,"w")))throw new tr.ErrnoError(f);tr.hashRemoveNode(d);try{t.node_ops.rename(d,n,s),d.parent=n}catch(e){throw e}finally{tr.hashAddNode(d)}}},rmdir(e){var r=tr.lookupPath(e,{parent:!0}).node,t=qe.basename(e),n=tr.lookupNode(r,t),o=tr.mayDelete(r,t,!0);if(o)throw new tr.ErrnoError(o);if(!r.node_ops.rmdir)throw new tr.ErrnoError(63);if(tr.isMountpoint(n))throw new tr.ErrnoError(10);r.node_ops.rmdir(r,t),tr.destroyNode(n)},readdir(e){var r=tr.lookupPath(e,{follow:!0}).node;if(!r.node_ops.readdir)throw new tr.ErrnoError(54);return r.node_ops.readdir(r)},unlink(e){var r=tr.lookupPath(e,{parent:!0}).node;if(!r)throw new tr.ErrnoError(44);var t=qe.basename(e),n=tr.lookupNode(r,t),o=tr.mayDelete(r,t,!1);if(o)throw new tr.ErrnoError(o);if(!r.node_ops.unlink)throw new tr.ErrnoError(63);if(tr.isMountpoint(n))throw new tr.ErrnoError(10);r.node_ops.unlink(r,t),tr.destroyNode(n)},readlink(e){var r=tr.lookupPath(e).node;if(!r)throw new tr.ErrnoError(44);if(!r.node_ops.readlink)throw new tr.ErrnoError(28);return r.node_ops.readlink(r)},stat(e,r){var t=tr.lookupPath(e,{follow:!r}).node;if(!t)throw new tr.ErrnoError(44);if(!t.node_ops.getattr)throw new tr.ErrnoError(63);return t.node_ops.getattr(t)},lstat:e=>tr.stat(e,!0),chmod(e,r,t){var n;if(!(n="string"==typeof e?tr.lookupPath(e,{follow:!t}).node:e).node_ops.setattr)throw new tr.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&r|-4096&n.mode,ctime:Date.now()})},lchmod(e,r){tr.chmod(e,r,!0)},fchmod(e,r){var t=tr.getStreamChecked(e);tr.chmod(t.node,r)},chown(e,r,t,n){var o;if(!(o="string"==typeof e?tr.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new tr.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown(e,r,t){tr.chown(e,r,t,!0)},fchown(e,r,t){var n=tr.getStreamChecked(e);tr.chown(n.node,r,t)},truncate(e,r){if(r<0)throw new tr.ErrnoError(28);var t;if(!(t="string"==typeof e?tr.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new tr.ErrnoError(63);if(tr.isDir(t.mode))throw new tr.ErrnoError(31);if(!tr.isFile(t.mode))throw new tr.ErrnoError(28);var n=tr.nodePermissions(t,"w");if(n)throw new tr.ErrnoError(n);t.node_ops.setattr(t,{size:r,timestamp:Date.now()})},ftruncate(e,r){var t=tr.getStreamChecked(e);if(!(2097155&t.flags))throw new tr.ErrnoError(28);tr.truncate(t.node,r)},utime(e,r,t){var n=tr.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{atime:r,mtime:t})},open(e,r,t=438){if(""===e)throw new tr.ErrnoError(44);var n;if(t=64&(r="string"==typeof r?(e=>{var r={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===r)throw new Error(`Unknown file open mode: ${e}`);return r})(r):r)?4095&t|32768:0,"object"==typeof e)n=e;else{var o=tr.lookupPath(e,{follow:!(131072&r),noent_okay:!0});n=o.node,e=o.path}var i=!1;if(64&r)if(n){if(128&r)throw new tr.ErrnoError(20)}else n=tr.mknod(e,t,0),i=!0;if(!n)throw new tr.ErrnoError(44);if(tr.isChrdev(n.mode)&&(r&=-513),65536&r&&!tr.isDir(n.mode))throw new tr.ErrnoError(54);if(!i){var s=tr.mayOpen(n,r);if(s)throw new tr.ErrnoError(s)}512&r&&!i&&tr.truncate(n,0),r&=-131713;var l=tr.createStream({node:n,path:tr.getPath(n),flags:r,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return l.stream_ops.open&&l.stream_ops.open(l),!a.logReadFiles||1&r||e in tr.readFiles||(tr.readFiles[e]=1),l},close(e){if(tr.isClosed(e))throw new tr.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{tr.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,r,t){if(tr.isClosed(e))throw new tr.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new tr.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new tr.ErrnoError(28);return e.position=e.stream_ops.llseek(e,r,t),e.ungotten=[],e.position},read(e,r,t,n,o){if(n<0||o<0)throw new tr.ErrnoError(28);if(tr.isClosed(e))throw new tr.ErrnoError(8);if(1==(2097155&e.flags))throw new tr.ErrnoError(8);if(tr.isDir(e.node.mode))throw new tr.ErrnoError(31);if(!e.stream_ops.read)throw new tr.ErrnoError(28);var a=void 0!==o;if(a){if(!e.seekable)throw new tr.ErrnoError(70)}else o=e.position;var i=e.stream_ops.read(e,r,t,n,o);return a||(e.position+=i),i},write(e,r,t,n,o,a){if(n<0||o<0)throw new tr.ErrnoError(28);if(tr.isClosed(e))throw new tr.ErrnoError(8);if(!(2097155&e.flags))throw new tr.ErrnoError(8);if(tr.isDir(e.node.mode))throw new tr.ErrnoError(31);if(!e.stream_ops.write)throw new tr.ErrnoError(28);e.seekable&&1024&e.flags&&tr.llseek(e,0,2);var i=void 0!==o;if(i){if(!e.seekable)throw new tr.ErrnoError(70)}else o=e.position;var s=e.stream_ops.write(e,r,t,n,o,a);return i||(e.position+=s),s},allocate(e,r,t){if(tr.isClosed(e))throw new tr.ErrnoError(8);if(r<0||t<=0)throw new tr.ErrnoError(28);if(!(2097155&e.flags))throw new tr.ErrnoError(8);if(!tr.isFile(e.node.mode)&&!tr.isDir(e.node.mode))throw new tr.ErrnoError(43);if(!e.stream_ops.allocate)throw new tr.ErrnoError(138);e.stream_ops.allocate(e,r,t)},mmap(e,r,t,n,o){if(2&n&&!(2&o)&&2!=(2097155&e.flags))throw new tr.ErrnoError(2);if(1==(2097155&e.flags))throw new tr.ErrnoError(2);if(!e.stream_ops.mmap)throw new tr.ErrnoError(43);if(!r)throw new tr.ErrnoError(28);return e.stream_ops.mmap(e,r,t,n,o)},msync:(e,r,t,n,o)=>e.stream_ops.msync?e.stream_ops.msync(e,r,t,n,o):0,ioctl(e,r,t){if(!e.stream_ops.ioctl)throw new tr.ErrnoError(59);return e.stream_ops.ioctl(e,r,t)},readFile(e,r={}){if(r.flags=r.flags||0,r.encoding=r.encoding||"binary","utf8"!==r.encoding&&"binary"!==r.encoding)throw new Error(`Invalid encoding type "${r.encoding}"`);var t,n=tr.open(e,r.flags),o=tr.stat(e).size,a=new Uint8Array(o);return tr.read(n,a,0,o,0),"utf8"===r.encoding?t=Pe(a):"binary"===r.encoding&&(t=a),tr.close(n),t},writeFile(e,r,t={}){t.flags=t.flags||577;var n=tr.open(e,t.flags,t.mode);if("string"==typeof r){var o=new Uint8Array(_e(r)+1),a=be(r,o,0,o.length);tr.write(n,o,0,a,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(r))throw new Error("Unsupported data type");tr.write(n,r,0,r.byteLength,void 0,t.canOwn)}tr.close(n)},cwd:()=>tr.currentPath,chdir(e){var r=tr.lookupPath(e,{follow:!0});if(null===r.node)throw new tr.ErrnoError(44);if(!tr.isDir(r.node.mode))throw new tr.ErrnoError(54);var t=tr.nodePermissions(r.node,"x");if(t)throw new tr.ErrnoError(t);tr.currentPath=r.path},createDefaultDirectories(){tr.mkdir("/tmp"),tr.mkdir("/home"),tr.mkdir("/home/web_user")},createDefaultDevices(){tr.mkdir("/dev"),tr.registerDevice(tr.makedev(1,3),{read:()=>0,write:(e,r,t,n,o)=>n,llseek:()=>0}),tr.mkdev("/dev/null",tr.makedev(1,3)),Je.register(tr.makedev(5,0),Je.default_tty_ops),Je.register(tr.makedev(6,0),Je.default_tty1_ops),tr.mkdev("/dev/tty",tr.makedev(5,0)),tr.mkdev("/dev/tty1",tr.makedev(6,0));var e=new Uint8Array(1024),r=0,t=()=>(0===r&&(r=Ve(e).byteLength),e[--r]);tr.createDevice("/dev","random",t),tr.createDevice("/dev","urandom",t),tr.mkdir("/dev/shm"),tr.mkdir("/dev/shm/tmp")},createSpecialDirectories(){tr.mkdir("/proc");var e=tr.mkdir("/proc/self");tr.mkdir("/proc/self/fd"),tr.mount({mount(){var r=tr.createNode(e,"fd",16895,73);return r.stream_ops={llseek:Ye.stream_ops.llseek},r.node_ops={lookup(e,r){var t=+r,n=tr.getStreamChecked(t),o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path},id:t+1};return o.parent=o,o},readdir:()=>Array.from(tr.streams.entries()).filter(([e,r])=>r).map(([e,r])=>e.toString())},r}},{},"/proc/self/fd")},createStandardStreams(e,r,t){e?tr.createDevice("/dev","stdin",e):tr.symlink("/dev/tty","/dev/stdin"),r?tr.createDevice("/dev","stdout",null,r):tr.symlink("/dev/tty","/dev/stdout"),t?tr.createDevice("/dev","stderr",null,t):tr.symlink("/dev/tty1","/dev/stderr"),tr.open("/dev/stdin",0),tr.open("/dev/stdout",1),tr.open("/dev/stderr",1)},staticInit(){tr.nameTable=new Array(4096),tr.mount(Ye,{},"/"),tr.createDefaultDirectories(),tr.createDefaultDevices(),tr.createSpecialDirectories(),tr.filesystems={MEMFS:Ye}},init(e,r,t){tr.initialized=!0,e??=a.stdin,r??=a.stdout,t??=a.stderr,tr.createStandardStreams(e,r,t)},quit(){tr.initialized=!1;for(var e=0;e<tr.streams.length;e++){var r=tr.streams[e];r&&tr.close(r)}},findObject(e,r){var t=tr.analyzePath(e,r);return t.exists?t.object:null},analyzePath(e,r){try{e=(n=tr.lookupPath(e,{follow:!r})).path}catch(e){}var t={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=tr.lookupPath(e,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=qe.basename(e),n=tr.lookupPath(e,{follow:!r}),t.exists=!0,t.path=n.path,t.object=n.node,t.name=n.node.name,t.isRoot="/"===n.path}catch(e){t.error=e.errno}return t},createPath(e,r,t,n){e="string"==typeof e?e:tr.getPath(e);for(var o=r.split("/").reverse();o.length;){var a=o.pop();if(a){var i=qe.join2(e,a);try{tr.mkdir(i)}catch(e){}e=i}}return i},createFile(e,r,t,n,o){var a=qe.join2("string"==typeof e?e:tr.getPath(e),r),i=rr(n,o);return tr.create(a,i)},createDataFile(e,r,t,n,o,a){var i=r;e&&(e="string"==typeof e?e:tr.getPath(e),i=r?qe.join2(e,r):e);var s=rr(n,o),l=tr.create(i,s);if(t){if("string"==typeof t){for(var d=new Array(t.length),u=0,c=t.length;u<c;++u)d[u]=t.charCodeAt(u);t=d}tr.chmod(l,146|s);var f=tr.open(l,577);tr.write(f,t,0,t.length,0,a),tr.close(f),tr.chmod(l,s)}},createDevice(e,r,t,n){var o=qe.join2("string"==typeof e?e:tr.getPath(e),r),a=rr(!!t,!!n);tr.createDevice.major??=64;var i=tr.makedev(tr.createDevice.major++,0);return tr.registerDevice(i,{open(e){e.seekable=!1},close(e){n?.buffer?.length&&n(10)},read(e,r,n,o,a){for(var i=0,s=0;s<o;s++){var l;try{l=t()}catch(e){throw new tr.ErrnoError(29)}if(void 0===l&&0===i)throw new tr.ErrnoError(6);if(null==l)break;i++,r[n+s]=l}return i&&(e.node.atime=Date.now()),i},write(e,r,t,o,a){for(var i=0;i<o;i++)try{n(r[t+i])}catch(e){throw new tr.ErrnoError(29)}return o&&(e.node.mtime=e.node.ctime=Date.now()),i}}),tr.mkdev(o,a,i)},forceLoadFile(e){if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");try{e.contents=u(e.url),e.usedBytes=e.contents.length}catch(e){throw new tr.ErrnoError(29)}},createLazyFile(e,r,t,n,o){class a{lengthKnown=!1;chunks=[];get(e){if(!(e>this.length-1||e<0)){var r=e%this.chunkSize,t=e/this.chunkSize|0;return this.getter(t)[r]}}setDataGetter(e){this.getter=e}cacheLength(){var e=new XMLHttpRequest;if(e.open("HEAD",t,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+t+". Status: "+e.status);var r,n=Number(e.getResponseHeader("Content-length")),o=(r=e.getResponseHeader("Accept-Ranges"))&&"bytes"===r,a=(r=e.getResponseHeader("Content-Encoding"))&&"gzip"===r,i=1048576;o||(i=n);var s=(e,r)=>{if(e>r)throw new Error("invalid range ("+e+", "+r+") or no bytes requested!");if(r>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",t,!1),n!==i&&o.setRequestHeader("Range","bytes="+e+"-"+r),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+t+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):Ke(o.responseText||"")},l=this;l.setDataGetter(e=>{var r=e*i,t=(e+1)*i-1;if(t=Math.min(t,n-1),void 0===l.chunks[e]&&(l.chunks[e]=s(r,t)),void 0===l.chunks[e])throw new Error("doXHR failed!");return l.chunks[e]}),!a&&n||(i=n=1,n=this.getter(0).length,i=n,m("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=i,this.lengthKnown=!0}get length(){return this.lengthKnown||this.cacheLength(),this._length}get chunkSize(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}if("undefined"!=typeof XMLHttpRequest){if(!l)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var i={isDevice:!1,contents:new a}}else i={isDevice:!1,url:t};var s=tr.createFile(e,r,i,n,o);i.contents?s.contents=i.contents:i.url&&(s.contents=null,s.url=i.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var d={};function u(e,r,t,n,o){var a=e.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,n);if(a.slice)for(var s=0;s<i;s++)r[t+s]=a[o+s];else for(s=0;s<i;s++)r[t+s]=a.get(o+s);return i}return Object.keys(s.stream_ops).forEach(e=>{var r=s.stream_ops[e];d[e]=(...e)=>(tr.forceLoadFile(s),r(...e))}),d.read=(e,r,t,n,o)=>(tr.forceLoadFile(s),u(e,r,t,n,o)),d.mmap=(e,r,t,n,o)=>{tr.forceLoadFile(s);var a=Qe();if(!a)throw new tr.ErrnoError(48);return u(e,w,a,r,t),{ptr:a,allocated:!0}},s.stream_ops=d,s}},nr={DEFAULT_POLLMASK:5,calculateAt(e,r,t){if(qe.isAbs(r))return r;var n;if(n=-100===e?tr.cwd():nr.getStreamFromFD(e).path,0==r.length){if(!t)throw new tr.ErrnoError(44);return n}return n+"/"+r},doStat(e,r,t){var n=e(r);b[t>>2]=n.dev,b[t+4>>2]=n.mode,k[t+8>>2]=n.nlink,b[t+12>>2]=n.uid,b[t+16>>2]=n.gid,b[t+20>>2]=n.rdev,U=[n.size>>>0,(B=n.size,+Math.abs(B)>=1?B>0?+Math.floor(B/4294967296)>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)],b[t+24>>2]=U[0],b[t+28>>2]=U[1],b[t+32>>2]=4096,b[t+36>>2]=n.blocks;var o=n.atime.getTime(),a=n.mtime.getTime(),i=n.ctime.getTime();return U=[Math.floor(o/1e3)>>>0,(B=Math.floor(o/1e3),+Math.abs(B)>=1?B>0?+Math.floor(B/4294967296)>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)],b[t+40>>2]=U[0],b[t+44>>2]=U[1],k[t+48>>2]=o%1e3*1e3*1e3,U=[Math.floor(a/1e3)>>>0,(B=Math.floor(a/1e3),+Math.abs(B)>=1?B>0?+Math.floor(B/4294967296)>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)],b[t+56>>2]=U[0],b[t+60>>2]=U[1],k[t+64>>2]=a%1e3*1e3*1e3,U=[Math.floor(i/1e3)>>>0,(B=Math.floor(i/1e3),+Math.abs(B)>=1?B>0?+Math.floor(B/4294967296)>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)],b[t+72>>2]=U[0],b[t+76>>2]=U[1],k[t+80>>2]=i%1e3*1e3*1e3,U=[n.ino>>>0,(B=n.ino,+Math.abs(B)>=1?B>0?+Math.floor(B/4294967296)>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)],b[t+88>>2]=U[0],b[t+92>>2]=U[1],0},doMsync(e,r,t,n,o){if(!tr.isFile(r.node.mode))throw new tr.ErrnoError(43);if(2&n)return 0;var a=g.slice(e,e+t);tr.msync(r,a,o,t,n)},getStreamFromFD:e=>tr.getStreamChecked(e),varargs:void 0,getStr:e=>$e(e)};(()=>{for(var e=new Array(256),r=0;r<256;++r)e[r]=String.fromCharCode(r);q=e})(),V=a.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},X=a.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},te.push(0,1,void 0,1,null,1,!0,1,!1,1),a.count_emval_handles=()=>te.length/2-5-re.length,le=a.UnboundTypeError=((e,r)=>{var t=ce(r,function(e){this.name=r,this.message=e;var t=new Error(e).stack;void 0!==t&&(this.stack=this.toString()+"\n"+t.replace(/^Error(:[^\n]*)?\n/,""))});return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},t})(Error,"UnboundTypeError"),tr.createPreloadedFile=(e,r,t,n,o,a,i,s,l,d)=>{var u=r?Xe.resolve(qe.join2(e,r)):e;function c(t){function c(t){d?.(),s||((e,r,t,n,o,a)=>{tr.createDataFile(e,r,t,n,o,a)})(e,r,t,n,o,l),a?.(),N()}((e,r,t,n)=>{"undefined"!=typeof Browser&&Browser.init();var o=!1;return er.forEach(a=>{o||a.canHandle(r)&&(a.handle(e,r,t,n),o=!0)}),o})(t,u,c,()=>{i?.(),N()})||c(t)}x(),"string"==typeof t?Ze(t).then(c,i):c(t)},tr.staticInit(),Ye.doesNotExistError=new tr.ErrnoError(44),Ye.doesNotExistError.stack="<generic error, no stack>";var or,ar={q:(e,r,t)=>{throw new H(e).init(r,t),e},w:()=>z(""),s:(e,r,t,n,o)=>{},D:(e,r,t,n)=>{ee(e,{name:r=G(r),fromWireType:function(e){return!!e},toWireType:function(e,r){return r?t:n},argPackAdvance:8,readValueFromPointer:function(e){return this.fromWireType(g[e])},destructorFunction:null})},B:e=>ee(e,de),p:(e,r,t)=>{ee(e,{name:r=G(r),fromWireType:e=>e,toWireType:(e,r)=>r,argPackAdvance:8,readValueFromPointer:ue(r,t),destructorFunction:null})},i:(e,r,t,n,o,a,i,s)=>{var l=((e,r)=>{for(var t=[],n=0;n<e;n++)t.push(k[r+4*n>>2]);return t})(r,t);e=(e=>{const r=(e=e.trim()).indexOf("(");return-1!==r?e.substr(0,r):e})(e=G(e)),o=ge(n,o),me(e,function(){((e,r)=>{var t=[],n={};throw r.forEach(function e(r){n[r]||J[r]||(Q[r]?Q[r].forEach(e):(t.push(r),n[r]=!0))}),new le(`${e}: `+t.map(ye).join([", "]))})(`Cannot call ${e} due to unbound types`,l)},r-1),((e,r,t)=>{function n(r){var n=t(r);n.length!==e.length&&Z("Mismatched type converter count");for(var o=0;o<e.length;++o)ee(e[o],n[o])}e.forEach(e=>Q[e]=r);var o=new Array(r.length),a=[],i=0;r.forEach((e,r)=>{J.hasOwnProperty(e)?o[r]=J[e]:(a.push(e),K.hasOwnProperty(e)||(K[e]=[]),K[e].push(()=>{o[r]=J[e],++i===a.length&&n(o)}))}),0===a.length&&n(o)})([],l,t=>{var n=[t[0],null].concat(t.slice(1));return pe(e,function(e,r,t,n,o){var a=r.length;a<2&&Y("argTypes array size mismatch! Must at least get return value and 'this' types!"),r[1];var i=function(e){for(var r=1;r<e.length;++r)if(null!==e[r]&&void 0===e[r].destructorFunction)return!0;return!1}(r),s="void"!==r[0].name,l=a-2,d=new Array(l),u=[],c=[];return ce(e,function(...e){c.length=0,u.length=1,u[0]=o;for(var t=0;t<l;++t)d[t]=r[t+2].toWireType(c,e[t]),u.push(d[t]);return function(e){if(i)fe(c);else for(var t=2;t<r.length;t++){var n=1===t?void 0:d[t-2];null!==r[t].destructorFunction&&r[t].destructorFunction(n)}if(s)return r[0].fromWireType(e)}(n(...u))})}(e,n,0,o,a),r-1),[]})},c:(e,r,t,n,o)=>{r=G(r);var a=e=>e;if(0===n){var i=32-8*t;a=e=>e<<i>>>i}var s=r.includes("unsigned");ee(e,{name:r,fromWireType:a,toWireType:s?function(e,r){return this.name,r>>>0}:function(e,r){return this.name,r},argPackAdvance:8,readValueFromPointer:Ee(r,t,0!==n),destructorFunction:null})},a:(e,r,t)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][r];function o(e){var r=k[e>>2],t=k[e+4>>2];return new n(w.buffer,t,r)}ee(e,{name:t=G(t),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},C:(e,r)=>{ee(e,{name:r=G(r),fromWireType(e){for(var r,t=k[e>>2],n=e+4,o=n,a=0;a<=t;++a){var i=n+a;if(a==t||0==g[i]){var s=$e(o,i-o);void 0===r?r=s:(r+=String.fromCharCode(0),r+=s),o=i+1}}return dr(e),r},toWireType(e,r){var t;r instanceof ArrayBuffer&&(r=new Uint8Array(r));var n="string"==typeof r;n||r instanceof Uint8Array||r instanceof Uint8ClampedArray||r instanceof Int8Array||Y("Cannot pass non-string to std::string"),t=n?_e(r):r.length;var o=lr(4+t+1),a=o+4;if(k[o>>2]=t,n)ke(r,a,t+1);else if(n)for(var i=0;i<t;++i){var s=r.charCodeAt(i);s>255&&(dr(a),Y("String has UTF-16 code units that do not fit in 8 bits")),g[a+i]=s}else for(i=0;i<t;++i)g[a+i]=r[i];return null!==e&&e.push(dr,o),o},argPackAdvance:8,readValueFromPointer:ie,destructorFunction(e){dr(e)}})},j:(e,r,t)=>{var n,o,a,i;t=G(t),2===r?(n=Fe,o=Se,i=Ce,a=e=>E[e>>1]):4===r&&(n=Te,o=Me,i=je,a=e=>k[e>>2]),ee(e,{name:t,fromWireType:e=>{for(var t,o=k[e>>2],i=e+4,s=0;s<=o;++s){var l=e+4+s*r;if(s==o||0==a(l)){var d=n(i,l-i);void 0===t?t=d:(t+=String.fromCharCode(0),t+=d),i=l+r}}return dr(e),t},toWireType:(e,n)=>{"string"!=typeof n&&Y(`Cannot pass non-string to C++ string type ${t}`);var a=i(n),s=lr(4+a+r);return k[s>>2]=a/r,o(n,s+4,a+r),null!==e&&e.push(dr,s),s},argPackAdvance:8,readValueFromPointer:ie,destructorFunction(e){dr(e)}})},E:(e,r)=>{ee(e,{isVoid:!0,name:r=G(r),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,r)=>{}})},A:(e,r,t)=>g.copyWithin(e,r,r+t),n:(e,r,t)=>(e=oe(e),r=Re(r,"emval::as"),xe(r,t,e)),l:(e,r,t,n)=>(e=Ne[e])(null,r=oe(r),t,n),k:(e,r,t,n,o)=>(e=Ne[e])(r=oe(r),r[t=Oe(t)],n,o),b:ne,F:e=>0===e?ae(Be()):(e=Oe(e),ae(Be()[e])),g:(e,r,t)=>{var n=((e,r)=>{for(var t=new Array(e),n=0;n<e;++n)t[n]=Re(k[r+4*n>>2],"parameter "+n);return t})(e,r),o=n.shift();e--;var a=new Array(e),i=`methodCaller<(${n.map(e=>e.name).join(", ")}) => ${o.name}>`;return(e=>{var r=Ne.length;return Ne.push(e),r})(ce(i,(r,i,s,l)=>{for(var d=0,u=0;u<e;++u)a[u]=n[u].readValueFromPointer(l+d),d+=n[u].argPackAdvance;var c=1===t?Ue(i,a):i.apply(r,a);return xe(o,s,c)}))},m:e=>(e=Oe(e),ae(a[e])),e:(e,r)=>(e=oe(e),r=oe(r),ae(e[r])),h:e=>{e>9&&(te[e+1]+=1)},f:e=>ae(Oe(e)),d:e=>{var r=oe(e);fe(r),ne(e)},t:(e,r,t,n)=>{var o=(new Date).getFullYear(),a=new Date(o,0,1),i=new Date(o,6,1),s=a.getTimezoneOffset(),l=i.getTimezoneOffset(),d=Math.max(s,l);k[e>>2]=60*d,b[r>>2]=Number(s!=l);var u=e=>{var r=e>=0?"-":"+",t=Math.abs(e);return`UTC${r}${String(Math.floor(t/60)).padStart(2,"0")}${String(t%60).padStart(2,"0")}`},c=u(s),f=u(l);l<s?(ke(c,t,17),ke(f,n,17)):(ke(c,n,17),ke(f,t,17))},z:e=>{var r=g.length,t=2147483648;if((e>>>=0)>t)return!1;for(var n=1;n<=4;n*=2){var o=r*(1+.2/n);o=Math.min(o,e+100663296);var a=Math.min(t,We(Math.max(e,o),65536));if(Le(a))return!0}return!1},u:(e,r)=>{var t=0;return He().forEach((n,o)=>{var a=r+t;k[e+4*o>>2]=a,((e,r)=>{for(var t=0;t<e.length;++t)w[r++]=e.charCodeAt(t);w[r]=0})(n,a),t+=n.length+1}),0},v:(e,r)=>{var t=He();k[e>>2]=t.length;var n=0;return t.forEach(e=>n+=e.length+1),k[r>>2]=n,0},x:function(e){try{var r=nr.getStreamFromFD(e);return tr.close(r),0}catch(e){if(void 0===tr||"ErrnoError"!==e.name)throw e;return e.errno}},y:function(e,r,t,n){try{var o=((e,r,t)=>{for(var n=0,o=0;o<t;o++){var a=k[r>>2],i=k[r+4>>2];r+=8;var s=tr.read(e,w,a,i,void 0);if(s<0)return-1;if(n+=s,s<i)break}return n})(nr.getStreamFromFD(e),r,t);return k[n>>2]=o,0}catch(e){if(void 0===tr||"ErrnoError"!==e.name)throw e;return e.errno}},r:function(e,r,t,n,o){var a=((e,r)=>r+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*r:NaN)(r,t);try{if(isNaN(a))return 61;var i=nr.getStreamFromFD(e);return tr.llseek(i,a,n),U=[i.position>>>0,(B=i.position,+Math.abs(B)>=1?B>0?+Math.floor(B/4294967296)>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)],b[o>>2]=U[0],b[o+4>>2]=U[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0}catch(e){if(void 0===tr||"ErrnoError"!==e.name)throw e;return e.errno}},o:function(e,r,t,n){try{var o=((e,r,t)=>{for(var n=0,o=0;o<t;o++){var a=k[r>>2],i=k[r+4>>2];r+=8;var s=tr.write(e,w,a,i,void 0);if(s<0)return-1;if(n+=s,s<i)break}return n})(nr.getStreamFromFD(e),r,t);return k[n>>2]=o,0}catch(e){if(void 0===tr||"ErrnoError"!==e.name)throw e;return e.errno}}};!async function(){function e(e,r){return or=e.exports,v=or.G,D(),se=or.J,function(e){S.unshift(e)}(or.H),N(),or}x();var r={a:ar};if(a.instantiateWasm)try{return a.instantiateWasm(r,e)}catch(e){p(`Module.instantiateWasm callback failed with error: ${e}`),o(e)}O??=function(){var e="dxt_encoder.wasm";return W(e)?e:function(e){return a.locateFile?a.locateFile(e,h):h+e}(e)}();try{var t=await L(P,O,r);return function(r){e(r.instance)}(t),t}catch(e){return void o(e)}}();var ir,sr=e=>(sr=or.I)(e),lr=e=>(lr=or.K)(e),dr=e=>(dr=or.L)(e);function ur(){function e(){ir||(ir=!0,a.calledRun=!0,$||(a.noFSInit||tr.initialized||tr.init(),tr.ignorePermissions=!1,I(S),r(a),a.onRuntimeInitialized?.(),function(){if(a.postRun)for("function"==typeof a.postRun&&(a.postRun=[a.postRun]);a.postRun.length;)M(a.postRun.shift());I(C)}()))}j>0||(function(){if(a.preRun)for("function"==typeof a.preRun&&(a.preRun=[a.preRun]);a.preRun.length;)T(a.preRun.shift());I(F)}(),j>0||(a.setStatus?(a.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>a.setStatus(""),1),e()},1)):e()))}if(a.dynCall_jiji=(e,r,t,n,o)=>(a.dynCall_jiji=or.M)(e,r,t,n,o),a.dynCall_viijii=(e,r,t,n,o,i,s)=>(a.dynCall_viijii=or.N)(e,r,t,n,o,i,s),a.dynCall_iiiiij=(e,r,t,n,o,i,s)=>(a.dynCall_iiiiij=or.O)(e,r,t,n,o,i,s),a.dynCall_iiiiijj=(e,r,t,n,o,i,s,l,d)=>(a.dynCall_iiiiijj=or.P)(e,r,t,n,o,i,s,l,d),a.dynCall_iiiiiijj=(e,r,t,n,o,i,s,l,d,u)=>(a.dynCall_iiiiiijj=or.Q)(e,r,t,n,o,i,s,l,d,u),R=function e(){ir||ur(),ir||(R=e)},a.preInit)for("function"==typeof a.preInit&&(a.preInit=[a.preInit]);a.preInit.length>0;)a.preInit.pop()();return ur(),i})}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8714],{98714(e,r,t){t.d(r,{default:()=>o});var n,o=(n="undefined"!=typeof document?document.currentScript?.src:void 0,function(e={}){var r,o,a=e,i=new Promise((e,t)=>{r=e,o=t}),s="object"==typeof window,l="undefined"!=typeof WorkerGlobalScope;"object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node&&process.type;var d,u,c=Object.assign({},a),f="./this.program",h="";(s||l)&&(l?h=self.location.href:"undefined"!=typeof document&&document.currentScript&&(h=document.currentScript.src),n&&(h=n),h=h.startsWith("blob:")?"":h.substr(0,h.replace(/[?#].*/,"").lastIndexOf("/")+1),l&&(u=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.responseType="arraybuffer",r.send(null),new Uint8Array(r.response)}),d=async e=>{var r=await fetch(e,{credentials:"same-origin"});if(r.ok)return r.arrayBuffer();throw new Error(r.status+" : "+r.url)});var m=a.print||console.log.bind(console),p=a.printErr||console.error.bind(console);Object.assign(a,c),c=null,a.arguments&&a.arguments,a.thisProgram&&(f=a.thisProgram);var v,w,g,y,E,b,k,_,A,P=a.wasmBinary,$=!1;function D(){var e=v.buffer;a.HEAP8=w=new Int8Array(e),a.HEAP16=y=new Int16Array(e),a.HEAPU8=g=new Uint8Array(e),a.HEAPU16=E=new Uint16Array(e),a.HEAP32=b=new Int32Array(e),a.HEAPU32=k=new Uint32Array(e),a.HEAPF32=_=new Float32Array(e),a.HEAPF64=A=new Float64Array(e)}var F=[],S=[],C=[];function T(e){F.unshift(e)}function M(e){C.unshift(e)}var j=0,R=null;function x(e){j++,a.monitorRunDependencies?.(j)}function N(e){if(j--,a.monitorRunDependencies?.(j),0==j&&R){var r=R;R=null,r()}}function z(e){a.onAbort?.(e),p(e="Aborted("+e+")"),$=!0,e+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(e);throw o(r),r}var O,B,U,W=e=>e.startsWith("data:application/octet-stream;base64,");async function L(e,r,t){if(!e&&"function"==typeof WebAssembly.instantiateStreaming&&!W(r)&&"function"==typeof fetch)try{var n=fetch(r,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(n,t)}catch(e){p(`wasm streaming compile failed: ${e}`),p("falling back to ArrayBuffer instantiation")}return async function(e,r){try{var t=await async function(e){if(!P)try{var r=await d(e);return new Uint8Array(r)}catch{}return function(e){if(e==O&&P)return new Uint8Array(P);if(u)return u(e);throw"both async and sync fetching of the wasm failed"}(e)}(e);return await WebAssembly.instantiate(t,r)}catch(e){p(`failed to asynchronously prepare wasm: ${e}`),z(e)}}(r,t)}var I=e=>{for(;e.length>0;)e.shift()(a)};a.noExitRuntime;class H{constructor(e){this.excPtr=e,this.ptr=e-24}set_type(e){k[this.ptr+4>>2]=e}get_type(){return k[this.ptr+4>>2]}set_destructor(e){k[this.ptr+8>>2]=e}get_destructor(){return k[this.ptr+8>>2]}set_caught(e){e=e?1:0,w[this.ptr+12]=e}get_caught(){return 0!=w[this.ptr+12]}set_rethrown(e){e=e?1:0,w[this.ptr+13]=e}get_rethrown(){return 0!=w[this.ptr+13]}init(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)}set_adjusted_ptr(e){k[this.ptr+16>>2]=e}get_adjusted_ptr(){return k[this.ptr+16>>2]}}var q,V,X,G=e=>{for(var r="",t=e;g[t];)r+=q[g[t++]];return r},K={},J={},Q={},Y=e=>{throw new V(e)},Z=e=>{throw new X(e)};function ee(e,r,t={}){return function(e,r,t={}){var n=r.name;if(e||Y(`type "${n}" must have a positive integer typeid pointer`),J.hasOwnProperty(e)){if(t.ignoreDuplicateRegistrations)return;Y(`Cannot register type '${n}' twice`)}if(J[e]=r,delete Q[e],K.hasOwnProperty(e)){var o=K[e];delete K[e],o.forEach(e=>e())}}(e,r,t)}var re=[],te=[],ne=e=>{e>9&&0===--te[e+1]&&(te[e]=void 0,re.push(e))},oe=e=>(e||Y("Cannot use deleted val. handle = "+e),te[e]),ae=e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const r=re.pop()||te.length;return te[r]=e,te[r+1]=1,r}}};function ie(e){return this.fromWireType(k[e>>2])}var se,le,de={name:"emscripten::val",fromWireType:e=>{var r=oe(e);return ne(e),r},toWireType:(e,r)=>ae(r),argPackAdvance:8,readValueFromPointer:ie,destructorFunction:null},ue=(e,r)=>{switch(r){case 4:return function(e){return this.fromWireType(_[e>>2])};case 8:return function(e){return this.fromWireType(A[e>>3])};default:throw new TypeError(`invalid float width (${r}): ${e}`)}},ce=(e,r)=>Object.defineProperty(r,"name",{value:e}),fe=e=>{for(;e.length;){var r=e.pop();e.pop()(r)}},he=(e,r,t)=>{if(void 0===e[r].overloadTable){var n=e[r];e[r]=function(...n){return e[r].overloadTable.hasOwnProperty(n.length)||Y(`Function '${t}' called with an invalid number of arguments (${n.length}) - expects one of (${e[r].overloadTable})!`),e[r].overloadTable[n.length].apply(this,n)},e[r].overloadTable=[],e[r].overloadTable[n.argCount]=n}},me=(e,r,t)=>{a.hasOwnProperty(e)?((void 0===t||void 0!==a[e].overloadTable&&void 0!==a[e].overloadTable[t])&&Y(`Cannot register public name '${e}' twice`),he(a,e,e),a[e].overloadTable.hasOwnProperty(t)&&Y(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`),a[e].overloadTable[t]=r):(a[e]=r,a[e].argCount=t)},pe=(e,r,t)=>{a.hasOwnProperty(e)||Z("Replacing nonexistent public symbol"),void 0!==a[e].overloadTable&&void 0!==t?a[e].overloadTable[t]=r:(a[e]=r,a[e].argCount=t)},ve=[],we=e=>{var r=ve[e];return r||(e>=ve.length&&(ve.length=e+1),ve[e]=r=se.get(e)),r},ge=(e,r)=>{var t=(e=G(e)).includes("j")?((e,r)=>(...t)=>((e,r,t=[])=>e.includes("j")?((e,r,t)=>(e=e.replace(/p/g,"i"),(0,a["dynCall_"+e])(r,...t)))(e,r,t):we(r)(...t))(e,r,t))(e,r):we(r);return"function"!=typeof t&&Y(`unknown function pointer with signature ${e}: ${r}`),t},ye=e=>{var r=sr(e),t=G(r);return dr(r),t},Ee=(e,r,t)=>{switch(r){case 1:return t?e=>w[e]:e=>g[e];case 2:return t?e=>y[e>>1]:e=>E[e>>1];case 4:return t?e=>b[e>>2]:e=>k[e>>2];default:throw new TypeError(`invalid integer width (${r}): ${e}`)}},be=(e,r,t,n)=>{if(!(n>0))return 0;for(var o=t,a=t+n-1,i=0;i<e.length;++i){var s=e.charCodeAt(i);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++i)),s<=127){if(t>=a)break;r[t++]=s}else if(s<=2047){if(t+1>=a)break;r[t++]=192|s>>6,r[t++]=128|63&s}else if(s<=65535){if(t+2>=a)break;r[t++]=224|s>>12,r[t++]=128|s>>6&63,r[t++]=128|63&s}else{if(t+3>=a)break;r[t++]=240|s>>18,r[t++]=128|s>>12&63,r[t++]=128|s>>6&63,r[t++]=128|63&s}}return r[t]=0,t-o},ke=(e,r,t)=>be(e,g,r,t),_e=e=>{for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n<=127?r++:n<=2047?r+=2:n>=55296&&n<=57343?(r+=4,++t):r+=3}return r},Ae="undefined"!=typeof TextDecoder?new TextDecoder:void 0,Pe=(e,r=0,t=NaN)=>{for(var n=r+t,o=r;e[o]&&!(o>=n);)++o;if(o-r>16&&e.buffer&&Ae)return Ae.decode(e.subarray(r,o));for(var a="";r<o;){var i=e[r++];if(128&i){var s=63&e[r++];if(192!=(224&i)){var l=63&e[r++];if((i=224==(240&i)?(15&i)<<12|s<<6|l:(7&i)<<18|s<<12|l<<6|63&e[r++])<65536)a+=String.fromCharCode(i);else{var d=i-65536;a+=String.fromCharCode(55296|d>>10,56320|1023&d)}}else a+=String.fromCharCode((31&i)<<6|s)}else a+=String.fromCharCode(i)}return a},$e=(e,r)=>e?Pe(g,e,r):"",De="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,Fe=(e,r)=>{for(var t=e,n=t>>1,o=n+r/2;!(n>=o)&&E[n];)++n;if((t=n<<1)-e>32&&De)return De.decode(g.subarray(e,t));for(var a="",i=0;!(i>=r/2);++i){var s=y[e+2*i>>1];if(0==s)break;a+=String.fromCharCode(s)}return a},Se=(e,r,t)=>{if(t??=2147483647,t<2)return 0;for(var n=r,o=(t-=2)<2*e.length?t/2:e.length,a=0;a<o;++a){var i=e.charCodeAt(a);y[r>>1]=i,r+=2}return y[r>>1]=0,r-n},Ce=e=>2*e.length,Te=(e,r)=>{for(var t=0,n="";!(t>=r/4);){var o=b[e+4*t>>2];if(0==o)break;if(++t,o>=65536){var a=o-65536;n+=String.fromCharCode(55296|a>>10,56320|1023&a)}else n+=String.fromCharCode(o)}return n},Me=(e,r,t)=>{if(t??=2147483647,t<4)return 0;for(var n=r,o=n+t-4,a=0;a<e.length;++a){var i=e.charCodeAt(a);if(i>=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&e.charCodeAt(++a)),b[r>>2]=i,(r+=4)+4>o)break}return b[r>>2]=0,r-n},je=e=>{for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n>=55296&&n<=57343&&++t,r+=4}return r},Re=(e,r)=>{var t=J[e];return void 0===t&&Y(`${r} has unknown type ${ye(e)}`),t},xe=(e,r,t)=>{var n=[],o=e.toWireType(n,t);return n.length&&(k[r>>2]=ae(n)),o},Ne=[],ze={},Oe=e=>{var r=ze[e];return void 0===r?G(e):r},Be=()=>{if("object"==typeof globalThis)return globalThis;function e(e){e.$$$embind_global$$$=e;var r="object"==typeof $$$embind_global$$$&&e.$$$embind_global$$$==e;return r||delete e.$$$embind_global$$$,r}if("object"==typeof $$$embind_global$$$)return $$$embind_global$$$;if("object"==typeof t.g&&e(t.g)?$$$embind_global$$$=t.g:"object"==typeof self&&e(self)&&($$$embind_global$$$=self),"object"==typeof $$$embind_global$$$)return $$$embind_global$$$;throw Error("unable to get global object.")},Ue=Reflect.construct,We=(e,r)=>Math.ceil(e/r)*r,Le=e=>{var r=(e-v.buffer.byteLength+65535)/65536|0;try{return v.grow(r),D(),1}catch(e){}},Ie={},He=()=>{if(!He.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:f||"./this.program"};for(var r in Ie)void 0===Ie[r]?delete e[r]:e[r]=Ie[r];var t=[];for(var r in e)t.push(`${r}=${e[r]}`);He.strings=t}return He.strings},qe={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,r)=>{for(var t=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),t++):t&&(e.splice(n,1),t--)}if(r)for(;t;t--)e.unshift("..");return e},normalize:e=>{var r=qe.isAbs(e),t="/"===e.substr(-1);return(e=qe.normalizeArray(e.split("/").filter(e=>!!e),!r).join("/"))||r||(e="."),e&&t&&(e+="/"),(r?"/":"")+e},dirname:e=>{var r=qe.splitPath(e),t=r[0],n=r[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:e=>{if("/"===e)return"/";var r=(e=(e=qe.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===r?e:e.substr(r+1)},join:(...e)=>qe.normalize(e.join("/")),join2:(e,r)=>qe.normalize(e+"/"+r)},Ve=e=>(Ve=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);z("initRandomDevice")})())(e),Xe={resolve:(...e)=>{for(var r="",t=!1,n=e.length-1;n>=-1&&!t;n--){var o=n>=0?e[n]:tr.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");if(!o)return"";r=o+"/"+r,t=qe.isAbs(o)}return(t?"/":"")+(r=qe.normalizeArray(r.split("/").filter(e=>!!e),!t).join("/"))||"."},relative:(e,r)=>{function t(e){for(var r=0;r<e.length&&""===e[r];r++);for(var t=e.length-1;t>=0&&""===e[t];t--);return r>t?[]:e.slice(r,t-r+1)}e=Xe.resolve(e).substr(1),r=Xe.resolve(r).substr(1);for(var n=t(e.split("/")),o=t(r.split("/")),a=Math.min(n.length,o.length),i=a,s=0;s<a;s++)if(n[s]!==o[s]){i=s;break}var l=[];for(s=i;s<n.length;s++)l.push("..");return(l=l.concat(o.slice(i))).join("/")}},Ge=[];function Ke(e,r,t){var n=_e(e)+1,o=new Array(n),a=be(e,o,0,o.length);return o.length=a,o}var Je={ttys:[],init(){},shutdown(){},register(e,r){Je.ttys[e]={input:[],output:[],ops:r},tr.registerDevice(e,Je.stream_ops)},stream_ops:{open(e){var r=Je.ttys[e.node.rdev];if(!r)throw new tr.ErrnoError(43);e.tty=r,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,r,t,n,o){if(!e.tty||!e.tty.ops.get_char)throw new tr.ErrnoError(60);for(var a=0,i=0;i<n;i++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(e){throw new tr.ErrnoError(29)}if(void 0===s&&0===a)throw new tr.ErrnoError(6);if(null==s)break;a++,r[t+i]=s}return a&&(e.node.atime=Date.now()),a},write(e,r,t,n,o){if(!e.tty||!e.tty.ops.put_char)throw new tr.ErrnoError(60);try{for(var a=0;a<n;a++)e.tty.ops.put_char(e.tty,r[t+a])}catch(e){throw new tr.ErrnoError(29)}return n&&(e.node.mtime=e.node.ctime=Date.now()),a}},default_tty_ops:{get_char:e=>(()=>{if(!Ge.length){var e=null;if("undefined"!=typeof window&&"function"==typeof window.prompt&&null!==(e=window.prompt("Input: "))&&(e+="\n"),!e)return null;Ge=Ke(e)}return Ge.shift()})(),put_char(e,r){null===r||10===r?(m(Pe(e.output)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&(m(Pe(e.output)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,r,t)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,r){null===r||10===r?(p(Pe(e.output)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&(p(Pe(e.output)),e.output=[])}}},Qe=e=>{z()},Ye={ops_table:null,mount:e=>Ye.createNode(null,"/",16895,0),createNode(e,r,t,n){if(tr.isBlkdev(t)||tr.isFIFO(t))throw new tr.ErrnoError(63);Ye.ops_table||={dir:{node:{getattr:Ye.node_ops.getattr,setattr:Ye.node_ops.setattr,lookup:Ye.node_ops.lookup,mknod:Ye.node_ops.mknod,rename:Ye.node_ops.rename,unlink:Ye.node_ops.unlink,rmdir:Ye.node_ops.rmdir,readdir:Ye.node_ops.readdir,symlink:Ye.node_ops.symlink},stream:{llseek:Ye.stream_ops.llseek}},file:{node:{getattr:Ye.node_ops.getattr,setattr:Ye.node_ops.setattr},stream:{llseek:Ye.stream_ops.llseek,read:Ye.stream_ops.read,write:Ye.stream_ops.write,allocate:Ye.stream_ops.allocate,mmap:Ye.stream_ops.mmap,msync:Ye.stream_ops.msync}},link:{node:{getattr:Ye.node_ops.getattr,setattr:Ye.node_ops.setattr,readlink:Ye.node_ops.readlink},stream:{}},chrdev:{node:{getattr:Ye.node_ops.getattr,setattr:Ye.node_ops.setattr},stream:tr.chrdev_stream_ops}};var o=tr.createNode(e,r,t,n);return tr.isDir(o.mode)?(o.node_ops=Ye.ops_table.dir.node,o.stream_ops=Ye.ops_table.dir.stream,o.contents={}):tr.isFile(o.mode)?(o.node_ops=Ye.ops_table.file.node,o.stream_ops=Ye.ops_table.file.stream,o.usedBytes=0,o.contents=null):tr.isLink(o.mode)?(o.node_ops=Ye.ops_table.link.node,o.stream_ops=Ye.ops_table.link.stream):tr.isChrdev(o.mode)&&(o.node_ops=Ye.ops_table.chrdev.node,o.stream_ops=Ye.ops_table.chrdev.stream),o.atime=o.mtime=o.ctime=Date.now(),e&&(e.contents[r]=o,e.atime=e.mtime=e.ctime=o.atime),o},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,r){var t=e.contents?e.contents.length:0;if(!(t>=r)){r=Math.max(r,t*(t<1048576?2:1.125)>>>0),0!=t&&(r=Math.max(r,256));var n=e.contents;e.contents=new Uint8Array(r),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,r){if(e.usedBytes!=r)if(0==r)e.contents=null,e.usedBytes=0;else{var t=e.contents;e.contents=new Uint8Array(r),t&&e.contents.set(t.subarray(0,Math.min(r,e.usedBytes))),e.usedBytes=r}},node_ops:{getattr(e){var r={};return r.dev=tr.isChrdev(e.mode)?e.id:1,r.ino=e.id,r.mode=e.mode,r.nlink=1,r.uid=0,r.gid=0,r.rdev=e.rdev,tr.isDir(e.mode)?r.size=4096:tr.isFile(e.mode)?r.size=e.usedBytes:tr.isLink(e.mode)?r.size=e.link.length:r.size=0,r.atime=new Date(e.atime),r.mtime=new Date(e.mtime),r.ctime=new Date(e.ctime),r.blksize=4096,r.blocks=Math.ceil(r.size/r.blksize),r},setattr(e,r){for(const t of["mode","atime","mtime","ctime"])r[t]&&(e[t]=r[t]);void 0!==r.size&&Ye.resizeFileStorage(e,r.size)},lookup(e,r){throw Ye.doesNotExistError},mknod:(e,r,t,n)=>Ye.createNode(e,r,t,n),rename(e,r,t){var n;try{n=tr.lookupNode(r,t)}catch(e){}if(n){if(tr.isDir(e.mode))for(var o in n.contents)throw new tr.ErrnoError(55);tr.hashRemoveNode(n)}delete e.parent.contents[e.name],r.contents[t]=e,e.name=t,r.ctime=r.mtime=e.parent.ctime=e.parent.mtime=Date.now()},unlink(e,r){delete e.contents[r],e.ctime=e.mtime=Date.now()},rmdir(e,r){var t=tr.lookupNode(e,r);for(var n in t.contents)throw new tr.ErrnoError(55);delete e.contents[r],e.ctime=e.mtime=Date.now()},readdir:e=>[".","..",...Object.keys(e.contents)],symlink(e,r,t){var n=Ye.createNode(e,r,41471,0);return n.link=t,n},readlink(e){if(!tr.isLink(e.mode))throw new tr.ErrnoError(28);return e.link}},stream_ops:{read(e,r,t,n,o){var a=e.node.contents;if(o>=e.node.usedBytes)return 0;var i=Math.min(e.node.usedBytes-o,n);if(i>8&&a.subarray)r.set(a.subarray(o,o+i),t);else for(var s=0;s<i;s++)r[t+s]=a[o+s];return i},write(e,r,t,n,o,a){if(r.buffer===w.buffer&&(a=!1),!n)return 0;var i=e.node;if(i.mtime=i.ctime=Date.now(),r.subarray&&(!i.contents||i.contents.subarray)){if(a)return i.contents=r.subarray(t,t+n),i.usedBytes=n,n;if(0===i.usedBytes&&0===o)return i.contents=r.slice(t,t+n),i.usedBytes=n,n;if(o+n<=i.usedBytes)return i.contents.set(r.subarray(t,t+n),o),n}if(Ye.expandFileStorage(i,o+n),i.contents.subarray&&r.subarray)i.contents.set(r.subarray(t,t+n),o);else for(var s=0;s<n;s++)i.contents[o+s]=r[t+s];return i.usedBytes=Math.max(i.usedBytes,o+n),n},llseek(e,r,t){var n=r;if(1===t?n+=e.position:2===t&&tr.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new tr.ErrnoError(28);return n},allocate(e,r,t){Ye.expandFileStorage(e.node,r+t),e.node.usedBytes=Math.max(e.node.usedBytes,r+t)},mmap(e,r,t,n,o){if(!tr.isFile(e.node.mode))throw new tr.ErrnoError(43);var a,i,s=e.node.contents;if(2&o||!s||s.buffer!==w.buffer){if(i=!0,!(a=Qe()))throw new tr.ErrnoError(48);s&&((t>0||t+r<s.length)&&(s=s.subarray?s.subarray(t,t+r):Array.prototype.slice.call(s,t,t+r)),w.set(s,a))}else i=!1,a=s.byteOffset;return{ptr:a,allocated:i}},msync:(e,r,t,n,o)=>(Ye.stream_ops.write(e,r,0,n,t,!1),0)}},Ze=async e=>{var r=await d(e);return new Uint8Array(r)},er=a.preloadPlugins||[],rr=(e,r)=>{var t=0;return e&&(t|=365),r&&(t|=146),t},tr={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:class{name="ErrnoError";constructor(e){this.errno=e}},filesystems:null,syncFSRequests:0,readFiles:{},FSStream:class{shared={};get object(){return this.node}set object(e){this.node=e}get isRead(){return 1!=(2097155&this.flags)}get isWrite(){return!!(2097155&this.flags)}get isAppend(){return 1024&this.flags}get flags(){return this.shared.flags}set flags(e){this.shared.flags=e}get position(){return this.shared.position}set position(e){this.shared.position=e}},FSNode:class{node_ops={};stream_ops={};readMode=365;writeMode=146;mounted=null;constructor(e,r,t,n){e||(e=this),this.parent=e,this.mount=e.mount,this.id=tr.nextInode++,this.name=r,this.mode=t,this.rdev=n,this.atime=this.mtime=this.ctime=Date.now()}get read(){return(this.mode&this.readMode)===this.readMode}set read(e){e?this.mode|=this.readMode:this.mode&=~this.readMode}get write(){return(this.mode&this.writeMode)===this.writeMode}set write(e){e?this.mode|=this.writeMode:this.mode&=~this.writeMode}get isFolder(){return tr.isDir(this.mode)}get isDevice(){return tr.isChrdev(this.mode)}},lookupPath(e,r={}){if(!e)return{path:"",node:null};r.follow_mount??=!0,qe.isAbs(e)||(e=tr.cwd()+"/"+e);e:for(var t=0;t<40;t++){for(var n=e.split("/").filter(e=>!!e&&"."!==e),o=tr.root,a="/",i=0;i<n.length;i++){var s=i===n.length-1;if(s&&r.parent)break;if(".."!==n[i]){a=qe.join2(a,n[i]);try{o=tr.lookupNode(o,n[i])}catch(e){if(44===e?.errno&&s&&r.noent_okay)return{path:a};throw e}if(!tr.isMountpoint(o)||s&&!r.follow_mount||(o=o.mounted.root),tr.isLink(o.mode)&&(!s||r.follow)){if(!o.node_ops.readlink)throw new tr.ErrnoError(52);var l=o.node_ops.readlink(o);qe.isAbs(l)||(l=qe.dirname(a)+"/"+l),e=l+"/"+n.slice(i+1).join("/");continue e}}else a=qe.dirname(a),o=o.parent}return{path:a,node:o}}throw new tr.ErrnoError(32)},getPath(e){for(var r;;){if(tr.isRoot(e)){var t=e.mount.mountpoint;return r?"/"!==t[t.length-1]?`${t}/${r}`:t+r:t}r=r?`${e.name}/${r}`:e.name,e=e.parent}},hashName(e,r){for(var t=0,n=0;n<r.length;n++)t=(t<<5)-t+r.charCodeAt(n)|0;return(e+t>>>0)%tr.nameTable.length},hashAddNode(e){var r=tr.hashName(e.parent.id,e.name);e.name_next=tr.nameTable[r],tr.nameTable[r]=e},hashRemoveNode(e){var r=tr.hashName(e.parent.id,e.name);if(tr.nameTable[r]===e)tr.nameTable[r]=e.name_next;else for(var t=tr.nameTable[r];t;){if(t.name_next===e){t.name_next=e.name_next;break}t=t.name_next}},lookupNode(e,r){var t=tr.mayLookup(e);if(t)throw new tr.ErrnoError(t);for(var n=tr.hashName(e.id,r),o=tr.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===e.id&&a===r)return o}return tr.lookup(e,r)},createNode(e,r,t,n){var o=new tr.FSNode(e,r,t,n);return tr.hashAddNode(o),o},destroyNode(e){tr.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>!(49152&~e),flagsToPermissionString(e){var r=["r","w","rw"][3&e];return 512&e&&(r+="w"),r},nodePermissions:(e,r)=>tr.ignorePermissions||(!r.includes("r")||292&e.mode)&&(!r.includes("w")||146&e.mode)&&(!r.includes("x")||73&e.mode)?0:2,mayLookup:e=>tr.isDir(e.mode)?tr.nodePermissions(e,"x")||(e.node_ops.lookup?0:2):54,mayCreate(e,r){if(!tr.isDir(e.mode))return 54;try{return tr.lookupNode(e,r),20}catch(e){}return tr.nodePermissions(e,"wx")},mayDelete(e,r,t){var n;try{n=tr.lookupNode(e,r)}catch(e){return e.errno}var o=tr.nodePermissions(e,"wx");if(o)return o;if(t){if(!tr.isDir(n.mode))return 54;if(tr.isRoot(n)||tr.getPath(n)===tr.cwd())return 10}else if(tr.isDir(n.mode))return 31;return 0},mayOpen:(e,r)=>e?tr.isLink(e.mode)?32:tr.isDir(e.mode)&&("r"!==tr.flagsToPermissionString(r)||512&r)?31:tr.nodePermissions(e,tr.flagsToPermissionString(r)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=tr.MAX_OPEN_FDS;e++)if(!tr.streams[e])return e;throw new tr.ErrnoError(33)},getStreamChecked(e){var r=tr.getStream(e);if(!r)throw new tr.ErrnoError(8);return r},getStream:e=>tr.streams[e],createStream:(e,r=-1)=>(e=Object.assign(new tr.FSStream,e),-1==r&&(r=tr.nextfd()),e.fd=r,tr.streams[r]=e,e),closeStream(e){tr.streams[e]=null},dupStream(e,r=-1){var t=tr.createStream(e,r);return t.stream_ops?.dup?.(t),t},chrdev_stream_ops:{open(e){var r=tr.getDevice(e.node.rdev);e.stream_ops=r.stream_ops,e.stream_ops.open?.(e)},llseek(){throw new tr.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,r)=>e<<8|r,registerDevice(e,r){tr.devices[e]={stream_ops:r}},getDevice:e=>tr.devices[e],getMounts(e){for(var r=[],t=[e];t.length;){var n=t.pop();r.push(n),t.push(...n.mounts)}return r},syncfs(e,r){"function"==typeof e&&(r=e,e=!1),tr.syncFSRequests++,tr.syncFSRequests>1&&p(`warning: ${tr.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var t=tr.getMounts(tr.root.mount),n=0;function o(e){return tr.syncFSRequests--,r(e)}function a(e){if(e)return a.errored?void 0:(a.errored=!0,o(e));++n>=t.length&&o(null)}t.forEach(r=>{if(!r.type.syncfs)return a(null);r.type.syncfs(r,e,a)})},mount(e,r,t){var n,o="/"===t,a=!t;if(o&&tr.root)throw new tr.ErrnoError(10);if(!o&&!a){var i=tr.lookupPath(t,{follow_mount:!1});if(t=i.path,n=i.node,tr.isMountpoint(n))throw new tr.ErrnoError(10);if(!tr.isDir(n.mode))throw new tr.ErrnoError(54)}var s={type:e,opts:r,mountpoint:t,mounts:[]},l=e.mount(s);return l.mount=s,s.root=l,o?tr.root=l:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),l},unmount(e){var r=tr.lookupPath(e,{follow_mount:!1});if(!tr.isMountpoint(r.node))throw new tr.ErrnoError(28);var t=r.node,n=t.mounted,o=tr.getMounts(n);Object.keys(tr.nameTable).forEach(e=>{for(var r=tr.nameTable[e];r;){var t=r.name_next;o.includes(r.mount)&&tr.destroyNode(r),r=t}}),t.mounted=null;var a=t.mount.mounts.indexOf(n);t.mount.mounts.splice(a,1)},lookup:(e,r)=>e.node_ops.lookup(e,r),mknod(e,r,t){var n=tr.lookupPath(e,{parent:!0}).node,o=qe.basename(e);if(!o||"."===o||".."===o)throw new tr.ErrnoError(28);var a=tr.mayCreate(n,o);if(a)throw new tr.ErrnoError(a);if(!n.node_ops.mknod)throw new tr.ErrnoError(63);return n.node_ops.mknod(n,o,r,t)},statfs(e){var r={bsize:4096,frsize:4096,blocks:1e6,bfree:5e5,bavail:5e5,files:tr.nextInode,ffree:tr.nextInode-1,fsid:42,flags:2,namelen:255},t=tr.lookupPath(e,{follow:!0}).node;return t?.node_ops.statfs&&Object.assign(r,t.node_ops.statfs(t.mount.opts.root)),r},create:(e,r=438)=>(r&=4095,r|=32768,tr.mknod(e,r,0)),mkdir:(e,r=511)=>(r&=1023,r|=16384,tr.mknod(e,r,0)),mkdirTree(e,r){for(var t=e.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{tr.mkdir(n,r)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,r,t)=>(void 0===t&&(t=r,r=438),r|=8192,tr.mknod(e,r,t)),symlink(e,r){if(!Xe.resolve(e))throw new tr.ErrnoError(44);var t=tr.lookupPath(r,{parent:!0}).node;if(!t)throw new tr.ErrnoError(44);var n=qe.basename(r),o=tr.mayCreate(t,n);if(o)throw new tr.ErrnoError(o);if(!t.node_ops.symlink)throw new tr.ErrnoError(63);return t.node_ops.symlink(t,n,e)},rename(e,r){var t,n,o=qe.dirname(e),a=qe.dirname(r),i=qe.basename(e),s=qe.basename(r);if(t=tr.lookupPath(e,{parent:!0}).node,n=tr.lookupPath(r,{parent:!0}).node,!t||!n)throw new tr.ErrnoError(44);if(t.mount!==n.mount)throw new tr.ErrnoError(75);var l,d=tr.lookupNode(t,i),u=Xe.relative(e,a);if("."!==u.charAt(0))throw new tr.ErrnoError(28);if("."!==(u=Xe.relative(r,o)).charAt(0))throw new tr.ErrnoError(55);try{l=tr.lookupNode(n,s)}catch(e){}if(d!==l){var c=tr.isDir(d.mode),f=tr.mayDelete(t,i,c);if(f)throw new tr.ErrnoError(f);if(f=l?tr.mayDelete(n,s,c):tr.mayCreate(n,s))throw new tr.ErrnoError(f);if(!t.node_ops.rename)throw new tr.ErrnoError(63);if(tr.isMountpoint(d)||l&&tr.isMountpoint(l))throw new tr.ErrnoError(10);if(n!==t&&(f=tr.nodePermissions(t,"w")))throw new tr.ErrnoError(f);tr.hashRemoveNode(d);try{t.node_ops.rename(d,n,s),d.parent=n}catch(e){throw e}finally{tr.hashAddNode(d)}}},rmdir(e){var r=tr.lookupPath(e,{parent:!0}).node,t=qe.basename(e),n=tr.lookupNode(r,t),o=tr.mayDelete(r,t,!0);if(o)throw new tr.ErrnoError(o);if(!r.node_ops.rmdir)throw new tr.ErrnoError(63);if(tr.isMountpoint(n))throw new tr.ErrnoError(10);r.node_ops.rmdir(r,t),tr.destroyNode(n)},readdir(e){var r=tr.lookupPath(e,{follow:!0}).node;if(!r.node_ops.readdir)throw new tr.ErrnoError(54);return r.node_ops.readdir(r)},unlink(e){var r=tr.lookupPath(e,{parent:!0}).node;if(!r)throw new tr.ErrnoError(44);var t=qe.basename(e),n=tr.lookupNode(r,t),o=tr.mayDelete(r,t,!1);if(o)throw new tr.ErrnoError(o);if(!r.node_ops.unlink)throw new tr.ErrnoError(63);if(tr.isMountpoint(n))throw new tr.ErrnoError(10);r.node_ops.unlink(r,t),tr.destroyNode(n)},readlink(e){var r=tr.lookupPath(e).node;if(!r)throw new tr.ErrnoError(44);if(!r.node_ops.readlink)throw new tr.ErrnoError(28);return r.node_ops.readlink(r)},stat(e,r){var t=tr.lookupPath(e,{follow:!r}).node;if(!t)throw new tr.ErrnoError(44);if(!t.node_ops.getattr)throw new tr.ErrnoError(63);return t.node_ops.getattr(t)},lstat:e=>tr.stat(e,!0),chmod(e,r,t){var n;if(!(n="string"==typeof e?tr.lookupPath(e,{follow:!t}).node:e).node_ops.setattr)throw new tr.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&r|-4096&n.mode,ctime:Date.now()})},lchmod(e,r){tr.chmod(e,r,!0)},fchmod(e,r){var t=tr.getStreamChecked(e);tr.chmod(t.node,r)},chown(e,r,t,n){var o;if(!(o="string"==typeof e?tr.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new tr.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown(e,r,t){tr.chown(e,r,t,!0)},fchown(e,r,t){var n=tr.getStreamChecked(e);tr.chown(n.node,r,t)},truncate(e,r){if(r<0)throw new tr.ErrnoError(28);var t;if(!(t="string"==typeof e?tr.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new tr.ErrnoError(63);if(tr.isDir(t.mode))throw new tr.ErrnoError(31);if(!tr.isFile(t.mode))throw new tr.ErrnoError(28);var n=tr.nodePermissions(t,"w");if(n)throw new tr.ErrnoError(n);t.node_ops.setattr(t,{size:r,timestamp:Date.now()})},ftruncate(e,r){var t=tr.getStreamChecked(e);if(!(2097155&t.flags))throw new tr.ErrnoError(28);tr.truncate(t.node,r)},utime(e,r,t){var n=tr.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{atime:r,mtime:t})},open(e,r,t=438){if(""===e)throw new tr.ErrnoError(44);var n;if(t=64&(r="string"==typeof r?(e=>{var r={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===r)throw new Error(`Unknown file open mode: ${e}`);return r})(r):r)?4095&t|32768:0,"object"==typeof e)n=e;else{var o=tr.lookupPath(e,{follow:!(131072&r),noent_okay:!0});n=o.node,e=o.path}var i=!1;if(64&r)if(n){if(128&r)throw new tr.ErrnoError(20)}else n=tr.mknod(e,t,0),i=!0;if(!n)throw new tr.ErrnoError(44);if(tr.isChrdev(n.mode)&&(r&=-513),65536&r&&!tr.isDir(n.mode))throw new tr.ErrnoError(54);if(!i){var s=tr.mayOpen(n,r);if(s)throw new tr.ErrnoError(s)}512&r&&!i&&tr.truncate(n,0),r&=-131713;var l=tr.createStream({node:n,path:tr.getPath(n),flags:r,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return l.stream_ops.open&&l.stream_ops.open(l),!a.logReadFiles||1&r||e in tr.readFiles||(tr.readFiles[e]=1),l},close(e){if(tr.isClosed(e))throw new tr.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{tr.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,r,t){if(tr.isClosed(e))throw new tr.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new tr.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new tr.ErrnoError(28);return e.position=e.stream_ops.llseek(e,r,t),e.ungotten=[],e.position},read(e,r,t,n,o){if(n<0||o<0)throw new tr.ErrnoError(28);if(tr.isClosed(e))throw new tr.ErrnoError(8);if(1==(2097155&e.flags))throw new tr.ErrnoError(8);if(tr.isDir(e.node.mode))throw new tr.ErrnoError(31);if(!e.stream_ops.read)throw new tr.ErrnoError(28);var a=void 0!==o;if(a){if(!e.seekable)throw new tr.ErrnoError(70)}else o=e.position;var i=e.stream_ops.read(e,r,t,n,o);return a||(e.position+=i),i},write(e,r,t,n,o,a){if(n<0||o<0)throw new tr.ErrnoError(28);if(tr.isClosed(e))throw new tr.ErrnoError(8);if(!(2097155&e.flags))throw new tr.ErrnoError(8);if(tr.isDir(e.node.mode))throw new tr.ErrnoError(31);if(!e.stream_ops.write)throw new tr.ErrnoError(28);e.seekable&&1024&e.flags&&tr.llseek(e,0,2);var i=void 0!==o;if(i){if(!e.seekable)throw new tr.ErrnoError(70)}else o=e.position;var s=e.stream_ops.write(e,r,t,n,o,a);return i||(e.position+=s),s},allocate(e,r,t){if(tr.isClosed(e))throw new tr.ErrnoError(8);if(r<0||t<=0)throw new tr.ErrnoError(28);if(!(2097155&e.flags))throw new tr.ErrnoError(8);if(!tr.isFile(e.node.mode)&&!tr.isDir(e.node.mode))throw new tr.ErrnoError(43);if(!e.stream_ops.allocate)throw new tr.ErrnoError(138);e.stream_ops.allocate(e,r,t)},mmap(e,r,t,n,o){if(2&n&&!(2&o)&&2!=(2097155&e.flags))throw new tr.ErrnoError(2);if(1==(2097155&e.flags))throw new tr.ErrnoError(2);if(!e.stream_ops.mmap)throw new tr.ErrnoError(43);if(!r)throw new tr.ErrnoError(28);return e.stream_ops.mmap(e,r,t,n,o)},msync:(e,r,t,n,o)=>e.stream_ops.msync?e.stream_ops.msync(e,r,t,n,o):0,ioctl(e,r,t){if(!e.stream_ops.ioctl)throw new tr.ErrnoError(59);return e.stream_ops.ioctl(e,r,t)},readFile(e,r={}){if(r.flags=r.flags||0,r.encoding=r.encoding||"binary","utf8"!==r.encoding&&"binary"!==r.encoding)throw new Error(`Invalid encoding type "${r.encoding}"`);var t,n=tr.open(e,r.flags),o=tr.stat(e).size,a=new Uint8Array(o);return tr.read(n,a,0,o,0),"utf8"===r.encoding?t=Pe(a):"binary"===r.encoding&&(t=a),tr.close(n),t},writeFile(e,r,t={}){t.flags=t.flags||577;var n=tr.open(e,t.flags,t.mode);if("string"==typeof r){var o=new Uint8Array(_e(r)+1),a=be(r,o,0,o.length);tr.write(n,o,0,a,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(r))throw new Error("Unsupported data type");tr.write(n,r,0,r.byteLength,void 0,t.canOwn)}tr.close(n)},cwd:()=>tr.currentPath,chdir(e){var r=tr.lookupPath(e,{follow:!0});if(null===r.node)throw new tr.ErrnoError(44);if(!tr.isDir(r.node.mode))throw new tr.ErrnoError(54);var t=tr.nodePermissions(r.node,"x");if(t)throw new tr.ErrnoError(t);tr.currentPath=r.path},createDefaultDirectories(){tr.mkdir("/tmp"),tr.mkdir("/home"),tr.mkdir("/home/web_user")},createDefaultDevices(){tr.mkdir("/dev"),tr.registerDevice(tr.makedev(1,3),{read:()=>0,write:(e,r,t,n,o)=>n,llseek:()=>0}),tr.mkdev("/dev/null",tr.makedev(1,3)),Je.register(tr.makedev(5,0),Je.default_tty_ops),Je.register(tr.makedev(6,0),Je.default_tty1_ops),tr.mkdev("/dev/tty",tr.makedev(5,0)),tr.mkdev("/dev/tty1",tr.makedev(6,0));var e=new Uint8Array(1024),r=0,t=()=>(0===r&&(r=Ve(e).byteLength),e[--r]);tr.createDevice("/dev","random",t),tr.createDevice("/dev","urandom",t),tr.mkdir("/dev/shm"),tr.mkdir("/dev/shm/tmp")},createSpecialDirectories(){tr.mkdir("/proc");var e=tr.mkdir("/proc/self");tr.mkdir("/proc/self/fd"),tr.mount({mount(){var r=tr.createNode(e,"fd",16895,73);return r.stream_ops={llseek:Ye.stream_ops.llseek},r.node_ops={lookup(e,r){var t=+r,n=tr.getStreamChecked(t),o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path},id:t+1};return o.parent=o,o},readdir:()=>Array.from(tr.streams.entries()).filter(([e,r])=>r).map(([e,r])=>e.toString())},r}},{},"/proc/self/fd")},createStandardStreams(e,r,t){e?tr.createDevice("/dev","stdin",e):tr.symlink("/dev/tty","/dev/stdin"),r?tr.createDevice("/dev","stdout",null,r):tr.symlink("/dev/tty","/dev/stdout"),t?tr.createDevice("/dev","stderr",null,t):tr.symlink("/dev/tty1","/dev/stderr"),tr.open("/dev/stdin",0),tr.open("/dev/stdout",1),tr.open("/dev/stderr",1)},staticInit(){tr.nameTable=new Array(4096),tr.mount(Ye,{},"/"),tr.createDefaultDirectories(),tr.createDefaultDevices(),tr.createSpecialDirectories(),tr.filesystems={MEMFS:Ye}},init(e,r,t){tr.initialized=!0,e??=a.stdin,r??=a.stdout,t??=a.stderr,tr.createStandardStreams(e,r,t)},quit(){tr.initialized=!1;for(var e=0;e<tr.streams.length;e++){var r=tr.streams[e];r&&tr.close(r)}},findObject(e,r){var t=tr.analyzePath(e,r);return t.exists?t.object:null},analyzePath(e,r){try{e=(n=tr.lookupPath(e,{follow:!r})).path}catch(e){}var t={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=tr.lookupPath(e,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=qe.basename(e),n=tr.lookupPath(e,{follow:!r}),t.exists=!0,t.path=n.path,t.object=n.node,t.name=n.node.name,t.isRoot="/"===n.path}catch(e){t.error=e.errno}return t},createPath(e,r,t,n){e="string"==typeof e?e:tr.getPath(e);for(var o=r.split("/").reverse();o.length;){var a=o.pop();if(a){var i=qe.join2(e,a);try{tr.mkdir(i)}catch(e){}e=i}}return i},createFile(e,r,t,n,o){var a=qe.join2("string"==typeof e?e:tr.getPath(e),r),i=rr(n,o);return tr.create(a,i)},createDataFile(e,r,t,n,o,a){var i=r;e&&(e="string"==typeof e?e:tr.getPath(e),i=r?qe.join2(e,r):e);var s=rr(n,o),l=tr.create(i,s);if(t){if("string"==typeof t){for(var d=new Array(t.length),u=0,c=t.length;u<c;++u)d[u]=t.charCodeAt(u);t=d}tr.chmod(l,146|s);var f=tr.open(l,577);tr.write(f,t,0,t.length,0,a),tr.close(f),tr.chmod(l,s)}},createDevice(e,r,t,n){var o=qe.join2("string"==typeof e?e:tr.getPath(e),r),a=rr(!!t,!!n);tr.createDevice.major??=64;var i=tr.makedev(tr.createDevice.major++,0);return tr.registerDevice(i,{open(e){e.seekable=!1},close(e){n?.buffer?.length&&n(10)},read(e,r,n,o,a){for(var i=0,s=0;s<o;s++){var l;try{l=t()}catch(e){throw new tr.ErrnoError(29)}if(void 0===l&&0===i)throw new tr.ErrnoError(6);if(null==l)break;i++,r[n+s]=l}return i&&(e.node.atime=Date.now()),i},write(e,r,t,o,a){for(var i=0;i<o;i++)try{n(r[t+i])}catch(e){throw new tr.ErrnoError(29)}return o&&(e.node.mtime=e.node.ctime=Date.now()),i}}),tr.mkdev(o,a,i)},forceLoadFile(e){if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");try{e.contents=u(e.url),e.usedBytes=e.contents.length}catch(e){throw new tr.ErrnoError(29)}},createLazyFile(e,r,t,n,o){class a{lengthKnown=!1;chunks=[];get(e){if(!(e>this.length-1||e<0)){var r=e%this.chunkSize,t=e/this.chunkSize|0;return this.getter(t)[r]}}setDataGetter(e){this.getter=e}cacheLength(){var e=new XMLHttpRequest;if(e.open("HEAD",t,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+t+". Status: "+e.status);var r,n=Number(e.getResponseHeader("Content-length")),o=(r=e.getResponseHeader("Accept-Ranges"))&&"bytes"===r,a=(r=e.getResponseHeader("Content-Encoding"))&&"gzip"===r,i=1048576;o||(i=n);var s=(e,r)=>{if(e>r)throw new Error("invalid range ("+e+", "+r+") or no bytes requested!");if(r>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",t,!1),n!==i&&o.setRequestHeader("Range","bytes="+e+"-"+r),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+t+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):Ke(o.responseText||"")},l=this;l.setDataGetter(e=>{var r=e*i,t=(e+1)*i-1;if(t=Math.min(t,n-1),void 0===l.chunks[e]&&(l.chunks[e]=s(r,t)),void 0===l.chunks[e])throw new Error("doXHR failed!");return l.chunks[e]}),!a&&n||(i=n=1,n=this.getter(0).length,i=n,m("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=i,this.lengthKnown=!0}get length(){return this.lengthKnown||this.cacheLength(),this._length}get chunkSize(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}if("undefined"!=typeof XMLHttpRequest){if(!l)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var i={isDevice:!1,contents:new a}}else i={isDevice:!1,url:t};var s=tr.createFile(e,r,i,n,o);i.contents?s.contents=i.contents:i.url&&(s.contents=null,s.url=i.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var d={};function u(e,r,t,n,o){var a=e.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,n);if(a.slice)for(var s=0;s<i;s++)r[t+s]=a[o+s];else for(s=0;s<i;s++)r[t+s]=a.get(o+s);return i}return Object.keys(s.stream_ops).forEach(e=>{var r=s.stream_ops[e];d[e]=(...e)=>(tr.forceLoadFile(s),r(...e))}),d.read=(e,r,t,n,o)=>(tr.forceLoadFile(s),u(e,r,t,n,o)),d.mmap=(e,r,t,n,o)=>{tr.forceLoadFile(s);var a=Qe();if(!a)throw new tr.ErrnoError(48);return u(e,w,a,r,t),{ptr:a,allocated:!0}},s.stream_ops=d,s}},nr={DEFAULT_POLLMASK:5,calculateAt(e,r,t){if(qe.isAbs(r))return r;var n;if(n=-100===e?tr.cwd():nr.getStreamFromFD(e).path,0==r.length){if(!t)throw new tr.ErrnoError(44);return n}return n+"/"+r},doStat(e,r,t){var n=e(r);b[t>>2]=n.dev,b[t+4>>2]=n.mode,k[t+8>>2]=n.nlink,b[t+12>>2]=n.uid,b[t+16>>2]=n.gid,b[t+20>>2]=n.rdev,U=[n.size>>>0,(B=n.size,+Math.abs(B)>=1?B>0?+Math.floor(B/4294967296)>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)],b[t+24>>2]=U[0],b[t+28>>2]=U[1],b[t+32>>2]=4096,b[t+36>>2]=n.blocks;var o=n.atime.getTime(),a=n.mtime.getTime(),i=n.ctime.getTime();return U=[Math.floor(o/1e3)>>>0,(B=Math.floor(o/1e3),+Math.abs(B)>=1?B>0?+Math.floor(B/4294967296)>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)],b[t+40>>2]=U[0],b[t+44>>2]=U[1],k[t+48>>2]=o%1e3*1e3*1e3,U=[Math.floor(a/1e3)>>>0,(B=Math.floor(a/1e3),+Math.abs(B)>=1?B>0?+Math.floor(B/4294967296)>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)],b[t+56>>2]=U[0],b[t+60>>2]=U[1],k[t+64>>2]=a%1e3*1e3*1e3,U=[Math.floor(i/1e3)>>>0,(B=Math.floor(i/1e3),+Math.abs(B)>=1?B>0?+Math.floor(B/4294967296)>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)],b[t+72>>2]=U[0],b[t+76>>2]=U[1],k[t+80>>2]=i%1e3*1e3*1e3,U=[n.ino>>>0,(B=n.ino,+Math.abs(B)>=1?B>0?+Math.floor(B/4294967296)>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)],b[t+88>>2]=U[0],b[t+92>>2]=U[1],0},doMsync(e,r,t,n,o){if(!tr.isFile(r.node.mode))throw new tr.ErrnoError(43);if(2&n)return 0;var a=g.slice(e,e+t);tr.msync(r,a,o,t,n)},getStreamFromFD:e=>tr.getStreamChecked(e),varargs:void 0,getStr:e=>$e(e)};(()=>{for(var e=new Array(256),r=0;r<256;++r)e[r]=String.fromCharCode(r);q=e})(),V=a.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},X=a.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},te.push(0,1,void 0,1,null,1,!0,1,!1,1),a.count_emval_handles=()=>te.length/2-5-re.length,le=a.UnboundTypeError=((e,r)=>{var t=ce(r,function(e){this.name=r,this.message=e;var t=new Error(e).stack;void 0!==t&&(this.stack=this.toString()+"\n"+t.replace(/^Error(:[^\n]*)?\n/,""))});return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},t})(Error,"UnboundTypeError"),tr.createPreloadedFile=(e,r,t,n,o,a,i,s,l,d)=>{var u=r?Xe.resolve(qe.join2(e,r)):e;function c(t){function c(t){d?.(),s||((e,r,t,n,o,a)=>{tr.createDataFile(e,r,t,n,o,a)})(e,r,t,n,o,l),a?.(),N()}((e,r,t,n)=>{"undefined"!=typeof Browser&&Browser.init();var o=!1;return er.forEach(a=>{o||a.canHandle(r)&&(a.handle(e,r,t,n),o=!0)}),o})(t,u,c,()=>{i?.(),N()})||c(t)}x(),"string"==typeof t?Ze(t).then(c,i):c(t)},tr.staticInit(),Ye.doesNotExistError=new tr.ErrnoError(44),Ye.doesNotExistError.stack="<generic error, no stack>";var or,ar={r:(e,r,t)=>{throw new H(e).init(r,t),e},x:()=>z(""),t:(e,r,t,n,o)=>{},E:(e,r,t,n)=>{ee(e,{name:r=G(r),fromWireType:function(e){return!!e},toWireType:function(e,r){return r?t:n},argPackAdvance:8,readValueFromPointer:function(e){return this.fromWireType(g[e])},destructorFunction:null})},C:e=>ee(e,de),q:(e,r,t)=>{ee(e,{name:r=G(r),fromWireType:e=>e,toWireType:(e,r)=>r,argPackAdvance:8,readValueFromPointer:ue(r,t),destructorFunction:null})},j:(e,r,t,n,o,a,i,s)=>{var l=((e,r)=>{for(var t=[],n=0;n<e;n++)t.push(k[r+4*n>>2]);return t})(r,t);e=(e=>{const r=(e=e.trim()).indexOf("(");return-1!==r?e.substr(0,r):e})(e=G(e)),o=ge(n,o),me(e,function(){((e,r)=>{var t=[],n={};throw r.forEach(function e(r){n[r]||J[r]||(Q[r]?Q[r].forEach(e):(t.push(r),n[r]=!0))}),new le(`${e}: `+t.map(ye).join([", "]))})(`Cannot call ${e} due to unbound types`,l)},r-1),((e,r,t)=>{function n(r){var n=t(r);n.length!==e.length&&Z("Mismatched type converter count");for(var o=0;o<e.length;++o)ee(e[o],n[o])}e.forEach(e=>Q[e]=r);var o=new Array(r.length),a=[],i=0;r.forEach((e,r)=>{J.hasOwnProperty(e)?o[r]=J[e]:(a.push(e),K.hasOwnProperty(e)||(K[e]=[]),K[e].push(()=>{o[r]=J[e],++i===a.length&&n(o)}))}),0===a.length&&n(o)})([],l,t=>{var n=[t[0],null].concat(t.slice(1));return pe(e,function(e,r,t,n,o){var a=r.length;a<2&&Y("argTypes array size mismatch! Must at least get return value and 'this' types!"),r[1];var i=function(e){for(var r=1;r<e.length;++r)if(null!==e[r]&&void 0===e[r].destructorFunction)return!0;return!1}(r),s="void"!==r[0].name,l=a-2,d=new Array(l),u=[],c=[];return ce(e,function(...e){c.length=0,u.length=1,u[0]=o;for(var t=0;t<l;++t)d[t]=r[t+2].toWireType(c,e[t]),u.push(d[t]);return function(e){if(i)fe(c);else for(var t=2;t<r.length;t++){var n=1===t?void 0:d[t-2];null!==r[t].destructorFunction&&r[t].destructorFunction(n)}if(s)return r[0].fromWireType(e)}(n(...u))})}(e,n,0,o,a),r-1),[]})},d:(e,r,t,n,o)=>{r=G(r);var a=e=>e;if(0===n){var i=32-8*t;a=e=>e<<i>>>i}var s=r.includes("unsigned");ee(e,{name:r,fromWireType:a,toWireType:s?function(e,r){return this.name,r>>>0}:function(e,r){return this.name,r},argPackAdvance:8,readValueFromPointer:Ee(r,t,0!==n),destructorFunction:null})},b:(e,r,t)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][r];function o(e){var r=k[e>>2],t=k[e+4>>2];return new n(w.buffer,t,r)}ee(e,{name:t=G(t),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},D:(e,r)=>{ee(e,{name:r=G(r),fromWireType(e){for(var r,t=k[e>>2],n=e+4,o=n,a=0;a<=t;++a){var i=n+a;if(a==t||0==g[i]){var s=$e(o,i-o);void 0===r?r=s:(r+=String.fromCharCode(0),r+=s),o=i+1}}return dr(e),r},toWireType(e,r){var t;r instanceof ArrayBuffer&&(r=new Uint8Array(r));var n="string"==typeof r;n||r instanceof Uint8Array||r instanceof Uint8ClampedArray||r instanceof Int8Array||Y("Cannot pass non-string to std::string"),t=n?_e(r):r.length;var o=lr(4+t+1),a=o+4;if(k[o>>2]=t,n)ke(r,a,t+1);else if(n)for(var i=0;i<t;++i){var s=r.charCodeAt(i);s>255&&(dr(a),Y("String has UTF-16 code units that do not fit in 8 bits")),g[a+i]=s}else for(i=0;i<t;++i)g[a+i]=r[i];return null!==e&&e.push(dr,o),o},argPackAdvance:8,readValueFromPointer:ie,destructorFunction(e){dr(e)}})},m:(e,r,t)=>{var n,o,a,i;t=G(t),2===r?(n=Fe,o=Se,i=Ce,a=e=>E[e>>1]):4===r&&(n=Te,o=Me,i=je,a=e=>k[e>>2]),ee(e,{name:t,fromWireType:e=>{for(var t,o=k[e>>2],i=e+4,s=0;s<=o;++s){var l=e+4+s*r;if(s==o||0==a(l)){var d=n(i,l-i);void 0===t?t=d:(t+=String.fromCharCode(0),t+=d),i=l+r}}return dr(e),t},toWireType:(e,n)=>{"string"!=typeof n&&Y(`Cannot pass non-string to C++ string type ${t}`);var a=i(n),s=lr(4+a+r);return k[s>>2]=a/r,o(n,s+4,a+r),null!==e&&e.push(dr,s),s},argPackAdvance:8,readValueFromPointer:ie,destructorFunction(e){dr(e)}})},F:(e,r)=>{ee(e,{isVoid:!0,name:r=G(r),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,r)=>{}})},B:(e,r,t)=>g.copyWithin(e,r,r+t),o:(e,r,t)=>(e=oe(e),r=Re(r,"emval::as"),xe(r,t,e)),i:(e,r,t,n)=>(e=Ne[e])(null,r=oe(r),t,n),k:(e,r,t,n,o)=>(e=Ne[e])(r=oe(r),r[t=Oe(t)],n,o),a:ne,n:e=>0===e?ae(Be()):(e=Oe(e),ae(Be()[e])),e:(e,r,t)=>{var n=((e,r)=>{for(var t=new Array(e),n=0;n<e;++n)t[n]=Re(k[r+4*n>>2],"parameter "+n);return t})(e,r),o=n.shift();e--;var a=new Array(e),i=`methodCaller<(${n.map(e=>e.name).join(", ")}) => ${o.name}>`;return(e=>{var r=Ne.length;return Ne.push(e),r})(ce(i,(r,i,s,l)=>{for(var d=0,u=0;u<e;++u)a[u]=n[u].readValueFromPointer(l+d),d+=n[u].argPackAdvance;var c=1===t?Ue(i,a):i.apply(r,a);return xe(o,s,c)}))},l:e=>(e=Oe(e),ae(a[e])),g:(e,r)=>(e=oe(e),r=oe(r),ae(e[r])),f:e=>{e>9&&(te[e+1]+=1)},h:e=>ae(Oe(e)),c:e=>{var r=oe(e);fe(r),ne(e)},u:(e,r,t,n)=>{var o=(new Date).getFullYear(),a=new Date(o,0,1),i=new Date(o,6,1),s=a.getTimezoneOffset(),l=i.getTimezoneOffset(),d=Math.max(s,l);k[e>>2]=60*d,b[r>>2]=Number(s!=l);var u=e=>{var r=e>=0?"-":"+",t=Math.abs(e);return`UTC${r}${String(Math.floor(t/60)).padStart(2,"0")}${String(t%60).padStart(2,"0")}`},c=u(s),f=u(l);l<s?(ke(c,t,17),ke(f,n,17)):(ke(c,n,17),ke(f,t,17))},A:e=>{var r=g.length,t=2147483648;if((e>>>=0)>t)return!1;for(var n=1;n<=4;n*=2){var o=r*(1+.2/n);o=Math.min(o,e+100663296);var a=Math.min(t,We(Math.max(e,o),65536));if(Le(a))return!0}return!1},v:(e,r)=>{var t=0;return He().forEach((n,o)=>{var a=r+t;k[e+4*o>>2]=a,((e,r)=>{for(var t=0;t<e.length;++t)w[r++]=e.charCodeAt(t);w[r]=0})(n,a),t+=n.length+1}),0},w:(e,r)=>{var t=He();k[e>>2]=t.length;var n=0;return t.forEach(e=>n+=e.length+1),k[r>>2]=n,0},y:function(e){try{var r=nr.getStreamFromFD(e);return tr.close(r),0}catch(e){if(void 0===tr||"ErrnoError"!==e.name)throw e;return e.errno}},z:function(e,r,t,n){try{var o=((e,r,t)=>{for(var n=0,o=0;o<t;o++){var a=k[r>>2],i=k[r+4>>2];r+=8;var s=tr.read(e,w,a,i,void 0);if(s<0)return-1;if(n+=s,s<i)break}return n})(nr.getStreamFromFD(e),r,t);return k[n>>2]=o,0}catch(e){if(void 0===tr||"ErrnoError"!==e.name)throw e;return e.errno}},s:function(e,r,t,n,o){var a=((e,r)=>r+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*r:NaN)(r,t);try{if(isNaN(a))return 61;var i=nr.getStreamFromFD(e);return tr.llseek(i,a,n),U=[i.position>>>0,(B=i.position,+Math.abs(B)>=1?B>0?+Math.floor(B/4294967296)>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)],b[o>>2]=U[0],b[o+4>>2]=U[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0}catch(e){if(void 0===tr||"ErrnoError"!==e.name)throw e;return e.errno}},p:function(e,r,t,n){try{var o=((e,r,t)=>{for(var n=0,o=0;o<t;o++){var a=k[r>>2],i=k[r+4>>2];r+=8;var s=tr.write(e,w,a,i,void 0);if(s<0)return-1;if(n+=s,s<i)break}return n})(nr.getStreamFromFD(e),r,t);return k[n>>2]=o,0}catch(e){if(void 0===tr||"ErrnoError"!==e.name)throw e;return e.errno}}};!async function(){function e(e,r){return or=e.exports,v=or.G,D(),se=or.J,function(e){S.unshift(e)}(or.H),N(),or}x();var r={a:ar};if(a.instantiateWasm)try{return a.instantiateWasm(r,e)}catch(e){p(`Module.instantiateWasm callback failed with error: ${e}`),o(e)}O??=function(){var e="dxt_encoder.wasm";return W(e)?e:function(e){return a.locateFile?a.locateFile(e,h):h+e}(e)}();try{var t=await L(P,O,r);return function(r){e(r.instance)}(t),t}catch(e){return void o(e)}}();var ir,sr=e=>(sr=or.I)(e),lr=e=>(lr=or.K)(e),dr=e=>(dr=or.L)(e);function ur(){function e(){ir||(ir=!0,a.calledRun=!0,$||(a.noFSInit||tr.initialized||tr.init(),tr.ignorePermissions=!1,I(S),r(a),a.onRuntimeInitialized?.(),function(){if(a.postRun)for("function"==typeof a.postRun&&(a.postRun=[a.postRun]);a.postRun.length;)M(a.postRun.shift());I(C)}()))}j>0||(function(){if(a.preRun)for("function"==typeof a.preRun&&(a.preRun=[a.preRun]);a.preRun.length;)T(a.preRun.shift());I(F)}(),j>0||(a.setStatus?(a.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>a.setStatus(""),1),e()},1)):e()))}if(a.dynCall_jiji=(e,r,t,n,o)=>(a.dynCall_jiji=or.M)(e,r,t,n,o),a.dynCall_viijii=(e,r,t,n,o,i,s)=>(a.dynCall_viijii=or.N)(e,r,t,n,o,i,s),a.dynCall_iiiiij=(e,r,t,n,o,i,s)=>(a.dynCall_iiiiij=or.O)(e,r,t,n,o,i,s),a.dynCall_iiiiijj=(e,r,t,n,o,i,s,l,d)=>(a.dynCall_iiiiijj=or.P)(e,r,t,n,o,i,s,l,d),a.dynCall_iiiiiijj=(e,r,t,n,o,i,s,l,d,u)=>(a.dynCall_iiiiiijj=or.Q)(e,r,t,n,o,i,s,l,d,u),R=function e(){ir||ur(),ir||(R=e)},a.preInit)for("function"==typeof a.preInit&&(a.preInit=[a.preInit]);a.preInit.length>0;)a.preInit.pop()();return ur(),i})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8231],{80200(e,t,r){r.d(t,{d:()=>p});const i={Base64:0,Hex:1,String:2,Raw:3};function s(e,t){const r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function n(e,t,r,i,n,o){return s(function(e,t){return e<<t|e>>>32-t}(s(s(t,e),s(i,o)),n),r)}function o(e,t,r,i,s,o,a){return n(t&r|~t&i,e,t,s,o,a)}function a(e,t,r,i,s,o,a){return n(t&i|r&~i,e,t,s,o,a)}function l(e,t,r,i,s,o,a){return n(t^r^i,e,t,s,o,a)}function u(e,t,r,i,s,o,a){return n(r^(t|~i),e,t,s,o,a)}function c(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;let r=1732584193,i=-271733879,n=-1732584194,c=271733878;for(let t=0;t<e.length;t+=16){const p=r,d=i,h=n,y=c;r=o(r,i,n,c,e[t],7,-680876936),c=o(c,r,i,n,e[t+1],12,-389564586),n=o(n,c,r,i,e[t+2],17,606105819),i=o(i,n,c,r,e[t+3],22,-1044525330),r=o(r,i,n,c,e[t+4],7,-176418897),c=o(c,r,i,n,e[t+5],12,1200080426),n=o(n,c,r,i,e[t+6],17,-1473231341),i=o(i,n,c,r,e[t+7],22,-45705983),r=o(r,i,n,c,e[t+8],7,1770035416),c=o(c,r,i,n,e[t+9],12,-1958414417),n=o(n,c,r,i,e[t+10],17,-42063),i=o(i,n,c,r,e[t+11],22,-1990404162),r=o(r,i,n,c,e[t+12],7,1804603682),c=o(c,r,i,n,e[t+13],12,-40341101),n=o(n,c,r,i,e[t+14],17,-1502002290),i=o(i,n,c,r,e[t+15],22,1236535329),r=a(r,i,n,c,e[t+1],5,-165796510),c=a(c,r,i,n,e[t+6],9,-1069501632),n=a(n,c,r,i,e[t+11],14,643717713),i=a(i,n,c,r,e[t],20,-373897302),r=a(r,i,n,c,e[t+5],5,-701558691),c=a(c,r,i,n,e[t+10],9,38016083),n=a(n,c,r,i,e[t+15],14,-660478335),i=a(i,n,c,r,e[t+4],20,-405537848),r=a(r,i,n,c,e[t+9],5,568446438),c=a(c,r,i,n,e[t+14],9,-1019803690),n=a(n,c,r,i,e[t+3],14,-187363961),i=a(i,n,c,r,e[t+8],20,1163531501),r=a(r,i,n,c,e[t+13],5,-1444681467),c=a(c,r,i,n,e[t+2],9,-51403784),n=a(n,c,r,i,e[t+7],14,1735328473),i=a(i,n,c,r,e[t+12],20,-1926607734),r=l(r,i,n,c,e[t+5],4,-378558),c=l(c,r,i,n,e[t+8],11,-2022574463),n=l(n,c,r,i,e[t+11],16,1839030562),i=l(i,n,c,r,e[t+14],23,-35309556),r=l(r,i,n,c,e[t+1],4,-1530992060),c=l(c,r,i,n,e[t+4],11,1272893353),n=l(n,c,r,i,e[t+7],16,-155497632),i=l(i,n,c,r,e[t+10],23,-1094730640),r=l(r,i,n,c,e[t+13],4,681279174),c=l(c,r,i,n,e[t],11,-358537222),n=l(n,c,r,i,e[t+3],16,-722521979),i=l(i,n,c,r,e[t+6],23,76029189),r=l(r,i,n,c,e[t+9],4,-640364487),c=l(c,r,i,n,e[t+12],11,-421815835),n=l(n,c,r,i,e[t+15],16,530742520),i=l(i,n,c,r,e[t+2],23,-995338651),r=u(r,i,n,c,e[t],6,-198630844),c=u(c,r,i,n,e[t+7],10,1126891415),n=u(n,c,r,i,e[t+14],15,-1416354905),i=u(i,n,c,r,e[t+5],21,-57434055),r=u(r,i,n,c,e[t+12],6,1700485571),c=u(c,r,i,n,e[t+3],10,-1894986606),n=u(n,c,r,i,e[t+10],15,-1051523),i=u(i,n,c,r,e[t+1],21,-2054922799),r=u(r,i,n,c,e[t+8],6,1873313359),c=u(c,r,i,n,e[t+15],10,-30611744),n=u(n,c,r,i,e[t+6],15,-1560198380),i=u(i,n,c,r,e[t+13],21,1309151649),r=u(r,i,n,c,e[t+4],6,-145523070),c=u(c,r,i,n,e[t+11],10,-1120210379),n=u(n,c,r,i,e[t+2],15,718787259),i=u(i,n,c,r,e[t+9],21,-343485551),r=s(r,p),i=s(i,d),n=s(n,h),c=s(c,y)}return[r,i,n,c]}function p(e,t=i.Hex){const r=t||i.Base64,s=c(function(e){const t=[];for(let r=0,i=8*e.length;r<i;r+=8)t[r>>5]|=(255&e.charCodeAt(r/8))<<r%32;return t}(e),8*e.length);switch(r){case i.Raw:return s;case i.Hex:return function(e){const t="0123456789abcdef",r=[];for(let i=0,s=4*e.length;i<s;i++)r.push(t.charAt(e[i>>2]>>i%4*8+4&15)+t.charAt(e[i>>2]>>i%4*8&15));return r.join("")}(s);case i.String:return function(e){const t=[];for(let r=0,i=32*e.length;r<i;r+=8)t.push(String.fromCharCode(e[r>>5]>>>r%32&255));return t.join("")}(s);case i.Base64:return function(e){const t=[];for(let r=0,i=4*e.length;r<i;r+=3){const i=(e[r>>2]>>r%4*8&255)<<16|(e[r+1>>2]>>(r+1)%4*8&255)<<8|e[r+2>>2]>>(r+2)%4*8&255;for(let s=0;s<4;s++)8*r+6*s>32*e.length?t.push("="):t.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(i>>6*(3-s)&63))}return t.join("")}(s)}}r.d(t,["T",0,i])},87024(e,t,r){r.d(t,{P:()=>h});var i=r(49186),s=r(80200),n=r(76553),o=r(84952),a=r(13069),l=r(96156),u=r(35666),c=r(10107),p=r(85648),d=r(97159);function h(e){const t=e?.origins??[void 0];return(r,i)=>{const s=function(e,t,r){if("resource"===e?.type)return function(e,t,r){const i=(0,l.z4)(t,r);return{type:String,read:(e,t,r)=>{const s=(0,d.r)(e,t,r);return i.type===String?s:"function"==typeof i.type?new i.type({url:s}):void 0},write:{isRequired:i.json?.write?.isRequired,writer(t,s,a,l){if(!l?.resources)return"string"==typeof t?void(s[a]=(0,d.t)(t,l)):void(s[a]=t.write({},l));const c=function(e){return null==e?null:"string"==typeof e?e:e.url}(t),h=(0,d.t)(c,{...l,verifyItemRelativeUrls:l?.verifyItemRelativeUrls?{writtenUrls:l.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},1),m=i.type!==String&&(!(0,n.H)(this)||l?.origin&&this.originIdOf(r)>(0,u.aB)(l.origin)),v={object:this,propertyName:r,value:t,targetUrl:h,dest:s,targetPropertyName:a,context:l,params:e};l?.portalItem&&h&&!(0,o.oP)(h)?m&&e?.contentAddressed?y(v):m?function(e){const{context:t,targetUrl:r,params:i,value:s,dest:n,targetPropertyName:a}=e;if(!t.portalItem)return;const l=t.portalItem.resourceFromPath(r),u=g(s,r,t),c=(0,p.n)(u),d=(0,o.Zo)(l.path),h=i?.compress??!1;c===d?(t.resources&&f({...e,resource:l,content:u,compress:h,updates:t.resources.toUpdate}),n[a]=r):y(e)}(v):function({context:e,targetUrl:t,dest:r,targetPropertyName:i}){e.portalItem&&e.resources&&(e.resources.toKeep.push({resource:e.portalItem.resourceFromPath(t),compress:!1}),r[i]=t)}(v):l?.portalItem&&(null==h||null!=(0,d.i)(h)||(0,o.w8)(h)||m)?y(v):s[a]=h}}}}(e,t,r);switch(e?.type??"other"){case"other":return{read:!0,write:!0};case"url":{const{read:e,write:t}=d.b;return{read:e,write:t}}}}(e,r,i);for(const e of t){const t=(0,c.rM)(r,e,i);for(const e in s)t[e]=s[e]}}}function y(e){const{targetUrl:t,params:r,value:n,context:l,dest:u,targetPropertyName:c}=e;if(!l.portalItem)return;const h=(0,d.p)(t),y=g(n,t,l);if(r?.contentAddressed&&"json"!==y.type)return void l.messages?.push(new i.A("persistable:contentAddressingUnsupported",`Property "${c}" is trying to serializing a resource with content of type ${y.type} with content addressing. Content addressing is only supported for json resources.`,{content:y}));const m=r?.contentAddressed&&"json"===y.type?(0,s.d)(y.jsonString):h?.filename??(0,a.lk)(),v=(0,o.fj)(r?.prefix??h?.prefix,m),b=`${v}.${(0,p.n)(y)}`;if(r?.contentAddressed&&l.resources&&"json"===y.type){const e=l.resources.toKeep.find(({resource:e})=>e.path===b)??l.resources.toAdd.find(({resource:e})=>e.path===b);if(e)return void(u[c]=e.resource.itemRelativeUrl)}const w=l.portalItem.resourceFromPath(b);(0,o.w8)(t)&&l.resources&&l.resources.pendingOperations.push((0,o.tk)(t).then(e=>{w.path=`${v}.${(0,p.n)({type:"blob",blob:e})}`,u[c]=w.itemRelativeUrl}).catch(()=>{}));const I=r?.compress??!1;l.resources&&f({...e,resource:w,content:y,compress:I,updates:l.resources.toAdd}),u[c]=w.itemRelativeUrl}function f({object:e,propertyName:t,updates:r,resource:i,content:s,compress:n}){r.push({resource:i,content:s,compress:n,finish:r=>{!function(e,t,r){"string"==typeof e[t]?e[t]=r.url:e[t].url=r.url}(e,t,r)}})}function g(e,t,r){return"string"==typeof e?{type:"url",url:t}:{type:"json",jsonString:JSON.stringify(e.toJSON(r))}}},58083(e,t,r){r.d(t,{$0:()=>m,$h:()=>L,B8:()=>c,C:()=>n,D_:()=>a,N9:()=>b,O7:()=>A,Qw:()=>u,Tl:()=>d,X_:()=>S,e$:()=>y,eL:()=>f,hM:()=>v,hZ:()=>o,hs:()=>h,kN:()=>g,l:()=>x,lw:()=>p,mg:()=>l,o1:()=>C,sC:()=>M,t2:()=>T,t5:()=>E,tZ:()=>O,ut:()=>j,v3:()=>F});var i=r(51850),s=r(34304);function n(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[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function o(e,t,r,i,s,n,o,a,l,u,c,p,d,h,y,f,g){return e[0]=t,e[1]=r,e[2]=i,e[3]=s,e[4]=n,e[5]=o,e[6]=a,e[7]=l,e[8]=u,e[9]=c,e[10]=p,e[11]=d,e[12]=h,e[13]=y,e[14]=f,e[15]=g,e}function a(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function l(e,t){if(e===t){const r=t[1],i=t[2],s=t[3],n=t[6],o=t[7],a=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=i,e[9]=n,e[11]=t[14],e[12]=s,e[13]=o,e[14]=a}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}function u(e,t){return c(e,t)||a(e),e}function c(e,t){const r=t[0],i=t[1],s=t[2],n=t[3],o=t[4],a=t[5],l=t[6],u=t[7],c=t[8],p=t[9],d=t[10],h=t[11],y=t[12],f=t[13],g=t[14],m=t[15],v=r*a-i*o,b=r*l-s*o,w=r*u-n*o,I=i*l-s*a,M=i*u-n*a,S=s*u-n*l,x=c*f-p*y,C=c*g-d*y,A=c*m-h*y,L=p*g-d*f,F=p*m-h*f,E=d*m-h*g;let P=v*E-b*F+w*L+I*A-M*C+S*x;return P?(P=1/P,e[0]=(a*E-l*F+u*L)*P,e[1]=(s*F-i*E-n*L)*P,e[2]=(f*S-g*M+m*I)*P,e[3]=(d*M-p*S-h*I)*P,e[4]=(l*A-o*E-u*C)*P,e[5]=(r*E-s*A+n*C)*P,e[6]=(g*w-y*S-m*b)*P,e[7]=(c*S-d*w+h*b)*P,e[8]=(o*F-a*A+u*x)*P,e[9]=(i*A-r*F-n*x)*P,e[10]=(y*M-f*w+m*v)*P,e[11]=(p*w-c*M-h*v)*P,e[12]=(a*C-o*L-l*x)*P,e[13]=(r*L-i*C+s*x)*P,e[14]=(f*b-y*I-g*v)*P,e[15]=(c*I-p*b+d*v)*P,e):null}function p(e,t,r){const i=t[0],s=t[1],n=t[2],o=t[3],a=t[4],l=t[5],u=t[6],c=t[7],p=t[8],d=t[9],h=t[10],y=t[11],f=t[12],g=t[13],m=t[14],v=t[15];let b=r[0],w=r[1],I=r[2],M=r[3];return e[0]=b*i+w*a+I*p+M*f,e[1]=b*s+w*l+I*d+M*g,e[2]=b*n+w*u+I*h+M*m,e[3]=b*o+w*c+I*y+M*v,b=r[4],w=r[5],I=r[6],M=r[7],e[4]=b*i+w*a+I*p+M*f,e[5]=b*s+w*l+I*d+M*g,e[6]=b*n+w*u+I*h+M*m,e[7]=b*o+w*c+I*y+M*v,b=r[8],w=r[9],I=r[10],M=r[11],e[8]=b*i+w*a+I*p+M*f,e[9]=b*s+w*l+I*d+M*g,e[10]=b*n+w*u+I*h+M*m,e[11]=b*o+w*c+I*y+M*v,b=r[12],w=r[13],I=r[14],M=r[15],e[12]=b*i+w*a+I*p+M*f,e[13]=b*s+w*l+I*d+M*g,e[14]=b*n+w*u+I*h+M*m,e[15]=b*o+w*c+I*y+M*v,e}function d(e,t,r){const i=r[0],s=r[1],n=r[2];if(t===e)e[12]=t[0]*i+t[4]*s+t[8]*n+t[12],e[13]=t[1]*i+t[5]*s+t[9]*n+t[13],e[14]=t[2]*i+t[6]*s+t[10]*n+t[14],e[15]=t[3]*i+t[7]*s+t[11]*n+t[15];else{const r=t[0],o=t[1],a=t[2],l=t[3],u=t[4],c=t[5],p=t[6],d=t[7],h=t[8],y=t[9],f=t[10],g=t[11];e[0]=r,e[1]=o,e[2]=a,e[3]=l,e[4]=u,e[5]=c,e[6]=p,e[7]=d,e[8]=h,e[9]=y,e[10]=f,e[11]=g,e[12]=r*i+u*s+h*n+t[12],e[13]=o*i+c*s+y*n+t[13],e[14]=a*i+p*s+f*n+t[14],e[15]=l*i+d*s+g*n+t[15]}return e}function h(e,t,r){const i=r[0],s=r[1],n=r[2];return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e[4]=t[4]*s,e[5]=t[5]*s,e[6]=t[6]*s,e[7]=t[7]*s,e[8]=t[8]*n,e[9]=t[9]*n,e[10]=t[10]*n,e[11]=t[11]*n,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function y(e,t,r,i){let o=i[0],a=i[1],l=i[2],u=Math.sqrt(o*o+a*a+l*l);if(u<=(0,s.FD)())return void n(e,t);u=1/u,o*=u,a*=u,l*=u;const c=Math.sin(r),p=Math.cos(r),d=1-p,h=t[0],y=t[1],f=t[2],g=t[3],m=t[4],v=t[5],b=t[6],w=t[7],I=t[8],M=t[9],S=t[10],x=t[11],C=o*o*d+p,A=a*o*d+l*c,L=l*o*d-a*c,F=o*a*d-l*c,E=a*a*d+p,P=l*a*d+o*c,T=o*l*d+a*c,j=a*l*d-o*c,O=l*l*d+p;e[0]=h*C+m*A+I*L,e[1]=y*C+v*A+M*L,e[2]=f*C+b*A+S*L,e[3]=g*C+w*A+x*L,e[4]=h*F+m*E+I*P,e[5]=y*F+v*E+M*P,e[6]=f*F+b*E+S*P,e[7]=g*F+w*E+x*P,e[8]=h*T+m*j+I*O,e[9]=y*T+v*j+M*O,e[10]=f*T+b*j+S*O,e[11]=g*T+w*j+x*O,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15])}function f(e,t,r){const i=Math.sin(r),s=Math.cos(r),n=t[4],o=t[5],a=t[6],l=t[7],u=t[8],c=t[9],p=t[10],d=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=n*s+u*i,e[5]=o*s+c*i,e[6]=a*s+p*i,e[7]=l*s+d*i,e[8]=u*s-n*i,e[9]=c*s-o*i,e[10]=p*s-a*i,e[11]=d*s-l*i,e}function g(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}function m(e,t,r){if(0===t)return a(e);let i=r[0],n=r[1],o=r[2],l=Math.sqrt(i*i+n*n+o*o);if(l<=(0,s.FD)())return null;l=1/l,i*=l,n*=l,o*=l;const u=Math.sin(t),c=Math.cos(t),p=1-c;return e[0]=i*i*p+c,e[1]=n*i*p+o*u,e[2]=o*i*p-n*u,e[3]=0,e[4]=i*n*p-o*u,e[5]=n*n*p+c,e[6]=o*n*p+i*u,e[7]=0,e[8]=i*o*p+n*u,e[9]=n*o*p-i*u,e[10]=o*o*p+c,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function v(e,t){const r=Math.sin(t),i=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i,e[6]=r,e[7]=0,e[8]=0,e[9]=-r,e[10]=i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function b(e,t){const r=Math.sin(t),i=Math.cos(t);return e[0]=i,e[1]=r,e[2]=0,e[3]=0,e[4]=-r,e[5]=i,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function w(e,t,r){const i=t[0],s=t[1],n=t[2],o=t[3],a=i+i,l=s+s,u=n+n,c=i*a,p=i*l,d=i*u,h=s*l,y=s*u,f=n*u,g=o*a,m=o*l,v=o*u;return e[0]=1-(h+f),e[1]=p+v,e[2]=d-m,e[3]=0,e[4]=p-v,e[5]=1-(c+f),e[6]=y+g,e[7]=0,e[8]=d+m,e[9]=y-g,e[10]=1-(c+h),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}const I=(0,i.vt)();function M(e,t){return e[0]=t[12],e[1]=t[13],e[2]=t[14],e}function S(e,t){const r=t[0],i=t[1],s=t[2],n=t[4],o=t[5],a=t[6],l=t[8],u=t[9],c=t[10];return e[0]=Math.sqrt(r*r+i*i+s*s),e[1]=Math.sqrt(n*n+o*o+a*a),e[2]=Math.sqrt(l*l+u*u+c*c),e}function x(e,t){const r=t[0]+t[5]+t[10];let i=0;return r>0?(i=2*Math.sqrt(r+1),e[3]=.25*i,e[0]=(t[6]-t[9])/i,e[1]=(t[8]-t[2])/i,e[2]=(t[1]-t[4])/i):t[0]>t[5]&&t[0]>t[10]?(i=2*Math.sqrt(1+t[0]-t[5]-t[10]),e[3]=(t[6]-t[9])/i,e[0]=.25*i,e[1]=(t[1]+t[4])/i,e[2]=(t[8]+t[2])/i):t[5]>t[10]?(i=2*Math.sqrt(1+t[5]-t[0]-t[10]),e[3]=(t[8]-t[2])/i,e[0]=(t[1]+t[4])/i,e[1]=.25*i,e[2]=(t[6]+t[9])/i):(i=2*Math.sqrt(1+t[10]-t[0]-t[5]),e[3]=(t[1]-t[4])/i,e[0]=(t[8]+t[2])/i,e[1]=(t[6]+t[9])/i,e[2]=.25*i),e}function C(e,t,r,i){const s=t[0],n=t[1],o=t[2],a=t[3],l=s+s,u=n+n,c=o+o,p=s*l,d=s*u,h=s*c,y=n*u,f=n*c,g=o*c,m=a*l,v=a*u,b=a*c,w=i[0],I=i[1],M=i[2];return e[0]=(1-(y+g))*w,e[1]=(d+b)*w,e[2]=(h-v)*w,e[3]=0,e[4]=(d-b)*I,e[5]=(1-(p+g))*I,e[6]=(f+m)*I,e[7]=0,e[8]=(h+v)*M,e[9]=(f-m)*M,e[10]=(1-(p+y))*M,e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}function A(e,t,r,i,s){const n=t[0],o=t[1],a=t[2],l=t[3],u=n+n,c=o+o,p=a+a,d=n*u,h=n*c,y=n*p,f=o*c,g=o*p,m=a*p,v=l*u,b=l*c,w=l*p,I=i[0],M=i[1],S=i[2],x=s[0],C=s[1],A=s[2],L=(1-(f+m))*I,F=(h+w)*I,E=(y-b)*I,P=(h-w)*M,T=(1-(d+m))*M,j=(g+v)*M,O=(y+b)*S,_=(g-v)*S,Z=(1-(d+f))*S;return e[0]=L,e[1]=F,e[2]=E,e[3]=0,e[4]=P,e[5]=T,e[6]=j,e[7]=0,e[8]=O,e[9]=_,e[10]=Z,e[11]=0,e[12]=r[0]+x-(L*x+P*C+O*A),e[13]=r[1]+C-(F*x+T*C+_*A),e[14]=r[2]+A-(E*x+j*C+Z*A),e[15]=1,e}function L(e,t,r,i,s,n,o){const a=1/(r-t),l=1/(s-i),u=1/(n-o);return e[0]=2*n*a,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*n*l,e[6]=0,e[7]=0,e[8]=(r+t)*a,e[9]=(s+i)*l,e[10]=(o+n)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*n*2*u,e[15]=0,e}function F(e,t,r,i,s,n,o){const a=1/(t-r),l=1/(i-s),u=1/(n-o);return e[0]=-2*a,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+r)*a,e[13]=(s+i)*l,e[14]=(o+n)*u,e[15]=1,e}function E(e,t,r,i){const n=t[0],o=t[1],l=t[2];let u=n-r[0],c=o-r[1],p=l-r[2];const d=(0,s.FD)();if(Math.abs(u)<d&&Math.abs(c)<d&&Math.abs(p)<d)return void a(e);let h=1/Math.sqrt(u*u+c*c+p*p);u*=h,c*=h,p*=h;const y=i[0],f=i[1],g=i[2];let m=f*p-g*c,v=g*u-y*p,b=y*c-f*u;h=Math.sqrt(m*m+v*v+b*b),h?(h=1/h,m*=h,v*=h,b*=h):(m=0,v=0,b=0);let w=c*b-p*v,I=p*m-u*b,M=u*v-c*m;h=Math.sqrt(w*w+I*I+M*M),h?(h=1/h,w*=h,I*=h,M*=h):(w=0,I=0,M=0),e[0]=m,e[1]=w,e[2]=u,e[3]=0,e[4]=v,e[5]=I,e[6]=c,e[7]=0,e[8]=b,e[9]=M,e[10]=p,e[11]=0,e[12]=-(m*n+v*o+b*l),e[13]=-(w*n+I*o+M*l),e[14]=-(u*n+c*o+p*l),e[15]=1}function P(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e[4]=t[4]-r[4],e[5]=t[5]-r[5],e[6]=t[6]-r[6],e[7]=t[7]-r[7],e[8]=t[8]-r[8],e[9]=t[9]-r[9],e[10]=t[10]-r[10],e[11]=t[11]-r[11],e[12]=t[12]-r[12],e[13]=t[13]-r[13],e[14]=t[14]-r[14],e[15]=t[15]-r[15],e}function T(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[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15]}function j(e){const t=(0,s.FD)(),r=e[0],i=e[1],n=e[2],o=e[4],a=e[5],l=e[6],u=e[8],c=e[9],p=e[10];return Math.abs(1-(r*r+o*o+u*u))<=t&&Math.abs(1-(i*i+a*a+c*c))<=t&&Math.abs(1-(n*n+l*l+p*p))<=t}function O(e){return 1===e[0]&&0===e[1]&&0===e[2]&&0===e[4]&&1===e[5]&&0===e[6]&&0===e[8]&&0===e[9]&&1===e[10]}const _=p,Z=P;Object.freeze(Object.defineProperty({__proto__:null,add:function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e[4]=t[4]+r[4],e[5]=t[5]+r[5],e[6]=t[6]+r[6],e[7]=t[7]+r[7],e[8]=t[8]+r[8],e[9]=t[9]+r[9],e[10]=t[10]+r[10],e[11]=t[11]+r[11],e[12]=t[12]+r[12],e[13]=t[13]+r[13],e[14]=t[14]+r[14],e[15]=t[15]+r[15],e},adjoint:function(e,t){const r=t[0],i=t[1],s=t[2],n=t[3],o=t[4],a=t[5],l=t[6],u=t[7],c=t[8],p=t[9],d=t[10],h=t[11],y=t[12],f=t[13],g=t[14],m=t[15];return e[0]=a*(d*m-h*g)-p*(l*m-u*g)+f*(l*h-u*d),e[1]=-(i*(d*m-h*g)-p*(s*m-n*g)+f*(s*h-n*d)),e[2]=i*(l*m-u*g)-a*(s*m-n*g)+f*(s*u-n*l),e[3]=-(i*(l*h-u*d)-a*(s*h-n*d)+p*(s*u-n*l)),e[4]=-(o*(d*m-h*g)-c*(l*m-u*g)+y*(l*h-u*d)),e[5]=r*(d*m-h*g)-c*(s*m-n*g)+y*(s*h-n*d),e[6]=-(r*(l*m-u*g)-o*(s*m-n*g)+y*(s*u-n*l)),e[7]=r*(l*h-u*d)-o*(s*h-n*d)+c*(s*u-n*l),e[8]=o*(p*m-h*f)-c*(a*m-u*f)+y*(a*h-u*p),e[9]=-(r*(p*m-h*f)-c*(i*m-n*f)+y*(i*h-n*p)),e[10]=r*(a*m-u*f)-o*(i*m-n*f)+y*(i*u-n*a),e[11]=-(r*(a*h-u*p)-o*(i*h-n*p)+c*(i*u-n*a)),e[12]=-(o*(p*g-d*f)-c*(a*g-l*f)+y*(a*d-l*p)),e[13]=r*(p*g-d*f)-c*(i*g-s*f)+y*(i*d-s*p),e[14]=-(r*(a*g-l*f)-o*(i*g-s*f)+y*(i*l-s*a)),e[15]=r*(a*d-l*p)-o*(i*d-s*p)+c*(i*l-s*a),e},copy:n,determinant:function(e){const t=e[0],r=e[1],i=e[2],s=e[3],n=e[4],o=e[5],a=e[6],l=e[7],u=e[8],c=e[9],p=e[10],d=e[11],h=e[12],y=e[13],f=e[14],g=e[15];return(t*o-r*n)*(p*g-d*f)-(t*a-i*n)*(c*g-d*y)+(t*l-s*n)*(c*f-p*y)+(r*a-i*o)*(u*g-d*h)-(r*l-s*o)*(u*f-p*h)+(i*l-s*a)*(u*y-c*h)},equals:function(e,t){if(e===t)return!0;const r=e[0],i=e[1],n=e[2],o=e[3],a=e[4],l=e[5],u=e[6],c=e[7],p=e[8],d=e[9],h=e[10],y=e[11],f=e[12],g=e[13],m=e[14],v=e[15],b=t[0],w=t[1],I=t[2],M=t[3],S=t[4],x=t[5],C=t[6],A=t[7],L=t[8],F=t[9],E=t[10],P=t[11],T=t[12],j=t[13],O=t[14],_=t[15],Z=(0,s.FD)();return Math.abs(r-b)<=Z*Math.max(1,Math.abs(r),Math.abs(b))&&Math.abs(i-w)<=Z*Math.max(1,Math.abs(i),Math.abs(w))&&Math.abs(n-I)<=Z*Math.max(1,Math.abs(n),Math.abs(I))&&Math.abs(o-M)<=Z*Math.max(1,Math.abs(o),Math.abs(M))&&Math.abs(a-S)<=Z*Math.max(1,Math.abs(a),Math.abs(S))&&Math.abs(l-x)<=Z*Math.max(1,Math.abs(l),Math.abs(x))&&Math.abs(u-C)<=Z*Math.max(1,Math.abs(u),Math.abs(C))&&Math.abs(c-A)<=Z*Math.max(1,Math.abs(c),Math.abs(A))&&Math.abs(p-L)<=Z*Math.max(1,Math.abs(p),Math.abs(L))&&Math.abs(d-F)<=Z*Math.max(1,Math.abs(d),Math.abs(F))&&Math.abs(h-E)<=Z*Math.max(1,Math.abs(h),Math.abs(E))&&Math.abs(y-P)<=Z*Math.max(1,Math.abs(y),Math.abs(P))&&Math.abs(f-T)<=Z*Math.max(1,Math.abs(f),Math.abs(T))&&Math.abs(g-j)<=Z*Math.max(1,Math.abs(g),Math.abs(j))&&Math.abs(m-O)<=Z*Math.max(1,Math.abs(m),Math.abs(O))&&Math.abs(v-_)<=Z*Math.max(1,Math.abs(v),Math.abs(_))},exactEquals:T,frob:function(e){return Math.sqrt(e[0]**2+e[1]**2+e[2]**2+e[3]**2+e[4]**2+e[5]**2+e[6]**2+e[7]**2+e[8]**2+e[9]**2+e[10]**2+e[11]**2+e[12]**2+e[13]**2+e[14]**2+e[15]**2)},fromQuat:function(e,t){const r=t[0],i=t[1],s=t[2],n=t[3],o=r+r,a=i+i,l=s+s,u=r*o,c=i*o,p=i*a,d=s*o,h=s*a,y=s*l,f=n*o,g=n*a,m=n*l;return e[0]=1-p-y,e[1]=c+m,e[2]=d-g,e[3]=0,e[4]=c-m,e[5]=1-u-y,e[6]=h+f,e[7]=0,e[8]=d+g,e[9]=h-f,e[10]=1-u-p,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},fromQuat2:function(e,t){const r=I,i=-t[0],s=-t[1],n=-t[2],o=t[3],a=t[4],l=t[5],u=t[6],c=t[7],p=i*i+s*s+n*n+o*o;return p>0?(r[0]=2*(a*o+c*i+l*n-u*s)/p,r[1]=2*(l*o+c*s+u*i-a*n)/p,r[2]=2*(u*o+c*n+a*s-l*i)/p):(r[0]=2*(a*o+c*i+l*n-u*s),r[1]=2*(l*o+c*s+u*i-a*n),r[2]=2*(u*o+c*n+a*s-l*i)),w(e,t,r),e},fromRotation:m,fromRotationTranslation:w,fromRotationTranslationScale:C,fromRotationTranslationScaleOrigin:A,fromScaling:function(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},fromTranslation:g,fromXRotation:v,fromYRotation:function(e,t){const r=Math.sin(t),i=Math.cos(t);return e[0]=i,e[1]=0,e[2]=-r,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=r,e[9]=0,e[10]=i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},fromZRotation:b,frustum:L,getRotation:x,getScale:S,getTranslation:M,hasIdentityRotation:O,identity:a,invert:c,invertOrIdentity:u,isOrthoNormal:j,lookAt:E,mul:_,multiply:p,multiplyScalar:function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e[8]=t[8]*r,e[9]=t[9]*r,e[10]=t[10]*r,e[11]=t[11]*r,e[12]=t[12]*r,e[13]=t[13]*r,e[14]=t[14]*r,e[15]=t[15]*r,e},multiplyScalarAndAdd:function(e,t,r,i){return e[0]=t[0]+r[0]*i,e[1]=t[1]+r[1]*i,e[2]=t[2]+r[2]*i,e[3]=t[3]+r[3]*i,e[4]=t[4]+r[4]*i,e[5]=t[5]+r[5]*i,e[6]=t[6]+r[6]*i,e[7]=t[7]+r[7]*i,e[8]=t[8]+r[8]*i,e[9]=t[9]+r[9]*i,e[10]=t[10]+r[10]*i,e[11]=t[11]+r[11]*i,e[12]=t[12]+r[12]*i,e[13]=t[13]+r[13]*i,e[14]=t[14]+r[14]*i,e[15]=t[15]+r[15]*i,e},ortho:F,perspective:function(e,t,r,i,s){const n=1/Math.tan(t/2);let o;return e[0]=n/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=s&&s!==1/0?(o=1/(i-s),e[10]=(s+i)*o,e[14]=2*s*i*o):(e[10]=-1,e[14]=-2*i),e},perspectiveFromFieldOfView:function(e,t,r,i){const s=Math.tan(t.upDegrees*Math.PI/180),n=Math.tan(t.downDegrees*Math.PI/180),o=Math.tan(t.leftDegrees*Math.PI/180),a=Math.tan(t.rightDegrees*Math.PI/180),l=2/(o+a),u=2/(s+n);return e[0]=l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=u,e[6]=0,e[7]=0,e[8]=-(o-a)*l*.5,e[9]=(s-n)*u*.5,e[10]=i/(r-i),e[11]=-1,e[12]=0,e[13]=0,e[14]=i*r/(r-i),e[15]=0,e},rotate:y,rotateX:f,rotateY:function(e,t,r){const i=Math.sin(r),s=Math.cos(r),n=t[0],o=t[1],a=t[2],l=t[3],u=t[8],c=t[9],p=t[10],d=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=n*s-u*i,e[1]=o*s-c*i,e[2]=a*s-p*i,e[3]=l*s-d*i,e[8]=n*i+u*s,e[9]=o*i+c*s,e[10]=a*i+p*s,e[11]=l*i+d*s,e},rotateZ:function(e,t,r){const i=Math.sin(r),s=Math.cos(r),n=t[0],o=t[1],a=t[2],l=t[3],u=t[4],c=t[5],p=t[6],d=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=n*s+u*i,e[1]=o*s+c*i,e[2]=a*s+p*i,e[3]=l*s+d*i,e[4]=u*s-n*i,e[5]=c*s-o*i,e[6]=p*s-a*i,e[7]=d*s-l*i,e},scale:h,set:o,str:function(e){return"mat4("+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]+")"},sub:Z,subtract:P,targetTo:function(e,t,r,i){const s=t[0],n=t[1],o=t[2],a=i[0],l=i[1],u=i[2];let c=s-r[0],p=n-r[1],d=o-r[2],h=c*c+p*p+d*d;h>0&&(h=1/Math.sqrt(h),c*=h,p*=h,d*=h);let y=l*d-u*p,f=u*c-a*d,g=a*p-l*c;return h=y*y+f*f+g*g,h>0&&(h=1/Math.sqrt(h),y*=h,f*=h,g*=h),e[0]=y,e[1]=f,e[2]=g,e[3]=0,e[4]=p*g-d*f,e[5]=d*y-c*g,e[6]=c*f-p*y,e[7]=0,e[8]=c,e[9]=p,e[10]=d,e[11]=0,e[12]=s,e[13]=n,e[14]=o,e[15]=1,e},translate:d,transpose:l},Symbol.toStringTag,{value:"Module"}))},54239(e,t,r){r.d(t,{A:()=>m});var i,s=r(5482),n=r(4576),o=r(66552),a=r(25482),l=r(86211),u=r(67076),c=r(91429),p=r(97348),d=r(43937),h=r(36005);const y=(0,o.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),f=y.jsonValues.slice();(0,n.Xy)(f,"orthometric");const g=(0,o.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let m=i=class extends a.o{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return y.write(e,t,r)}readHeightModel(e,t,r){return y.read(e)||(r?.messages&&r.messages.push(function(e,t){return new u.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return g.read(e)||(r?.messages&&r.messages.push(v(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,l.LA)(e)||g.read(e)||(r?.messages&&r.messages.push(v(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new i({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const r=(0,l.k1)(t);return new i({heightModel:e.heightModel,heightUnit:r??void 0,vertCRS:e.vertCRS})}static fromSpatialReference(e){const{latestVcsWkid:t,vcsWkid:r}=e;if(!r)return null;const s=(null!=t?p.B.get(t):null)??p.B.get(r);return s?new i({heightModel:0===s.type?"gravity-related-height":"ellipsoidal",heightUnit:(0,l.LA)(s.unit.name),vertCRS:s.datum}):null}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new i;return t.read(e,{origin:"web-scene"}),t}};function v(e,t){return new u.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,s.Cg)([(0,c.MZ)({type:y.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:f,default:"ellipsoidal",write:{isRequired:!0}}}}})],m.prototype,"heightModel",void 0),(0,s.Cg)([(0,d.K)("web-scene","heightModel")],m.prototype,"writeHeightModel",null),(0,s.Cg)([(0,h.w)(["web-scene","service"],"heightModel")],m.prototype,"readHeightModel",null),(0,s.Cg)([(0,c.MZ)({type:g.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g.jsonValues,write:{writer:g.write,isRequired:!0}}}}})],m.prototype,"heightUnit",void 0),(0,s.Cg)([(0,h.w)("web-scene","heightUnit")],m.prototype,"readHeightUnit",null),(0,s.Cg)([(0,h.w)("service","heightUnit")],m.prototype,"readHeightUnitService",null),(0,s.Cg)([(0,c.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],m.prototype,"vertCRS",void 0),(0,s.Cg)([(0,h.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],m.prototype,"readVertCRS",null),m=i=(0,s.Cg)([(0,c.$K)("esri.geometry.HeightModelInfo")],m)},73836(e,t,r){r.d(t,{A:()=>h});var i=r(5482),s=r(69540),n=r(25482),o=r(91429),a=r(58083),l=r(9093),u=r(67026),c=r(82534),p=r(51850),d=r(24770);let h=class extends((0,s.OU)(n.o)){constructor(e){super(e),this.translation=(0,p.vt)(),this.rotationAxis=(0,p.ci)(d.up),this.rotationAngle=0,this.scale=(0,p.fA)(1,1,1)}get rotation(){return(0,d.i4)(this.rotationAxis,this.rotationAngle)}set rotation(e){this.rotationAxis=(0,p.o8)((0,d.yo)(e)),this.rotationAngle=(0,d.g7)(e)}get localMatrix(){const e=(0,l.vt)();return(0,u.x8)(y,(0,d.yo)(this.rotation),(0,d.$I)(this.rotation)),(0,a.o1)(e,y,this.translation,this.scale),e}get localMatrixInverse(){return(0,a.B8)((0,l.vt)(),this.localMatrix)}equals(e){return this===e||null!=e&&(0,a.t2)(this.localMatrix,e.localMatrix)}};(0,i.Cg)([(0,o.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],h.prototype,"translation",void 0),(0,i.Cg)([(0,o.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],h.prototype,"rotationAxis",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],h.prototype,"rotationAngle",void 0),(0,i.Cg)([(0,o.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],h.prototype,"scale",void 0),(0,i.Cg)([(0,o.MZ)()],h.prototype,"rotation",null),(0,i.Cg)([(0,o.MZ)()],h.prototype,"localMatrix",null),(0,i.Cg)([(0,o.MZ)()],h.prototype,"localMatrixInverse",null),h=(0,i.Cg)([(0,o.$K)("esri.geometry.support.MeshTransform")],h);const y=(0,c.vt)()},24770(e,t,r){r.d(t,{$I:()=>m,AU:()=>y,Cr:()=>p,g7:()=>g,i4:()=>c,ui:()=>d,vt:()=>u,yo:()=>f});var i=r(34727),s=r(58083),n=r(67026),o=r(82534),a=r(35522),l=r(51850);function u(e=b){return[e[0],e[1],e[2],e[3]]}function c(e,t,r=u()){return(0,a.C)(r,e),r[3]=t,r}function p(e,t,r){return(0,a.$A)(r,e,t),(0,a.S8)(r,r),r[3]=-(0,a.g7)(e,t),r}function d(e,t=u()){const r=(0,s.l)(w,e);return v(t,(0,i.KJ)((0,n.Xd)(t,r))),t}function h(e,t,r=u()){return(0,n.x8)(w,e,m(e)),(0,n.x8)(I,t,m(t)),(0,n.lw)(w,I,w),v(r,(0,i.KJ)((0,n.Xd)(r,w)))}function y(e,t,r,i=u()){return c(l.Cw,e,M),c(l.JP,t,S),c(l.Cb,r,x),h(M,S,M),h(M,x,i),i}function f(e){return e}function g(e){return e[3]}function m(e){return(0,i.kU)(e[3])}function v(e,t){return e[3]=t,e}const b=[0,0,1,0],w=(0,o.vt)(),I=(0,o.vt)(),M=(u(),u()),S=u(),x=u();r.d(t,["up",0,b])},2e4(e,t,r){r.r(t),r.d(t,{default:()=>Ze});var i=r(5482),s=r(52106),n=r(37838),o=r(69540),a=r(7762),l=r(49186),u=r(36563),c=r(53966),p=r(97768),d=r(25728),h=r(17676),y=r(36708),f=r(91429),g=r(88620),m=r(86738),v=r(91218),b=r(55156),w=r(60950),I=r(89808),M=r(99959);const S=Symbol("isSceneGraphicOrigin");var x;class C extends M.A{get[(x=S,w.ym)](){return this.layer}get[b.e](){return this.layer}get[I.Q](){return this.layer}constructor(e){super(),this[x]=!0,this.type="scene",this.layer=e}get id(){return this.layer.id}}var A=r(4146),L=r(55726),F=r(52136),E=r(18768),P=r(69208),T=r(47685),j=r(34287),O=r(8303),_=r(25036),Z=r(58947),R=r(82935),U=r(60694),N=r(92009),k=r(4071),B=r(10873),D=r(15426),$=r(67202),q=r(17036),V=r(95466),z=r(30524),G=r(50805),K=r(20557),H=r(46499),Q=r(39383),J=r(37352),W=r(2976),Y=r(86390),X=r(25482);let ee=class extends X.o{constructor(){super(...arguments),this.name=null,this.field=null,this.currentRangeExtent=null,this.fullRangeExtent=null,this.type="rangeInfo"}};(0,i.Cg)([(0,f.MZ)({type:String,json:{read:!0,write:{isRequired:!0}}})],ee.prototype,"name",void 0),(0,i.Cg)([(0,f.MZ)({type:String,json:{read:!0,write:{isRequired:!0}}})],ee.prototype,"field",void 0),(0,i.Cg)([(0,f.MZ)({type:[Number],json:{read:!0,write:!0}})],ee.prototype,"currentRangeExtent",void 0),(0,i.Cg)([(0,f.MZ)({type:[Number],json:{read:!0,write:!0}})],ee.prototype,"fullRangeExtent",void 0),(0,i.Cg)([(0,f.MZ)({type:["rangeInfo"],readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],ee.prototype,"type",void 0),ee=(0,i.Cg)([(0,f.$K)("esri.layers.support.RangeInfo")],ee);var te,re=r(11254),ie=r(4718),se=r(87024),ne=r(67076),oe=r(39829);let ae=te=class extends((0,X.T)(a.A.ofType(oe.A))){constructor(e){super(e)}clone(){return new te(this.items.map(e=>e.clone()))}write(e,t){return this.toJSON(t)}toJSON(e){const t=e?.layer?.spatialReference;return t?this.toArray().map(r=>{if(!t.equals(r.spatialReference)){if(!(0,v.canProjectWithoutEngine)(r.spatialReference,t))return e?.messages?.push(new ne.A("scenefilter:unsupported","Scene filters with incompatible spatial references are not supported",{modification:this,spatialReference:e.layer.spatialReference,context:e})),null;const i=new oe.A;(0,v.projectPolygon)(r,i,t),r=i}const i=r.toJSON(e);return delete i.spatialReference,i}).filter(e=>null!=e):this.toArray().map(t=>t.toJSON(e))}static fromJSON(e,t){const r=new te;return e.forEach(e=>r.add(oe.A.fromJSON(e,t))),r}};ae=te=(0,i.Cg)([(0,f.$K)("esri.layers.support.PolygonCollection")],ae);const le=ae;var ue,ce=r(97159),pe=r(36005);let de=ue=class extends X.o{constructor(e){super(e),this.spatialRelationship="disjoint",this.geometries=new le,this._geometriesSource=null}initialize(){this.addHandles((0,y.on)(()=>this.geometries,"after-changes",()=>this.geometries=this.geometries,y.OH))}readGeometries(e,t,r){Array.isArray(e)?this.geometries=le.fromJSON(e,r):"web-scene"!==r.origin&&"portal-item"!==r.origin||(this._geometriesSource={url:(0,ce.f)(e,r),context:r})}async loadGeometries(e,t){if(null==this._geometriesSource)return;const{url:r,context:i}=this._geometriesSource,s=await(0,re.A)(r,{responseType:"json",signal:t?.signal}),n=e.toJSON(),o=s.data.map(e=>({...e,spatialReference:n}));this.geometries=le.fromJSON(o,i),this._geometriesSource=null}clone(){const e=new ue({geometries:(0,ie.o8)(this.geometries),spatialRelationship:this.spatialRelationship});return e._geometriesSource=this._geometriesSource,e}};(0,i.Cg)([(0,f.MZ)({type:["disjoint","contains"],nonNullable:!0,json:{write:{isRequired:!0}}})],de.prototype,"spatialRelationship",void 0),(0,i.Cg)([(0,f.MZ)({type:le,nonNullable:!0,json:{write:!0,origins:{"web-scene":{write:{isRequired:!0}}}}}),(0,se.P)({origins:["web-scene","portal-item"],type:"resource",prefix:"geometries",contentAddressed:!0})],de.prototype,"geometries",void 0),(0,i.Cg)([(0,pe.w)(["web-scene","portal-item","service"],"geometries")],de.prototype,"readGeometries",null),de=ue=(0,i.Cg)([(0,f.$K)("esri.layers.support.SceneFilter")],de);const he=de;function ye({associatedLayer:e,serviceUpdateTimeStamp:t}){const r=e?.editingInfo?.lastEditDate,i=e?.serverGens,s=null!=r,n=null!=t,o=s&&n&&t.lastUpdate!==r.getTime();return s&&(o||!n&&i?.minServerGen!==i?.serverGen)}var fe=r(84952);let ge=class extends X.o{constructor(){super(...arguments),this.endTimeField=null,this.startTimeField=null}};(0,i.Cg)([(0,f.MZ)({type:String})],ge.prototype,"endTimeField",void 0),(0,i.Cg)([(0,f.MZ)({type:String})],ge.prototype,"startTimeField",void 0),ge=(0,i.Cg)([(0,f.$K)("esri.layers.support.SceneServiceTimeInfo")],ge);var me=r(96184),ve=r(8947),be=r(41214),we=r(97552),Ie=r(24212),Me=r(30291);async function Se(e){const t=[];for(const r of e)r.name.toLowerCase().endsWith(".zip")?t.push(xe(r)):t.push(Promise.resolve(r));return(await Promise.all(t)).flat()}async function xe(e){const{BlobReader:t,ZipReader:i,BlobWriter:s}=await Promise.all([r.e(1077),r.e(9588)]).then(r.bind(r,9588)),n=[],o=new i(new t(e));return(await o.getEntries()).forEach(e=>{if(e.directory||/^__MACOS/i.test(e.filename))return;const t=new s;n.push(e.getData(t).then(t=>new File([t],e.filename)))}),Promise.all(n)}var Ce=r(79677),Ae=r(10184),Le=r(5682),Fe=r(45671),Ee=r(78553);const Pe=new Set(["3DObject","Point"]),Te=(0,q.p)();let je=class extends((0,T.w6)((0,Z.w6)((0,E.b)((0,j.q)((0,O.A)((0,_.j)((0,d.M)((0,P.d)((0,F.p)((0,o.OU)(A.A))))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType="ArcGISSceneServiceLayer",this.type="scene",this.fields=null,this.graphicOrigin=new C(this),this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new a.A,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.attributeTableTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0,this.serviceItemId=void 0,this.serviceTimeInfo=null}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._set("renderer",null),this.associatedLayer=(0,p.pR)(this.associatedLayer)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getField(e)?.domain??null;return this.associatedLayer?(0,D.Vq)(this.associatedLayer,e,t,r):r}getFeatureType(e){return e&&this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return this.associatedLayer?.types??[]}get typeIdField(){return this.associatedLayer?.typeIdField??null}get templates(){return this.associatedLayer?.templates??null}get formTemplate(){return this.associatedLayer?.formTemplate??null}get fieldsIndex(){return new V.A(this.fields)}readNodePages(e,t,r){return"Point"===t.layerType&&(e=t.pointNodePages),null==e||"object"!=typeof e?null:G.W4.fromJSON(e,r)}set elevationInfo(e){this._set("elevationInfo",e),this.loaded&&this._validateElevationInfo()}get effectiveCapabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.effectiveCapabilities)}get effectiveEditingEnabled(){return null!=this.associatedLayer&&(0,D.C$)(this.associatedLayer)}get geometryType(){return _e[this.profile]||"mesh"}set renderer(e){(0,z.yp)(e,this.fieldsIndex),this._set("renderer",e)}readCachedDrawingInfo(e){return null!=e&&"object"==typeof e||(e={}),null==e.color&&(e.color=!1),e}get capabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.capabilities)}_capabilitiesFromAssociatedFeatureLayer(e){e=null!=e?e:k.P;const{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsRollbackOnFailure:s,supportsUploadWithItemId:n,supportsGeometryUpdate:o,supportsReturnServiceEditsInSourceSpatialReference:a},data:{supportsZ:l,supportsM:u,isVersioned:c,supportsAttachment:p},operations:{supportsEditing:d,supportsAdd:h,supportsUpdate:y,supportsDelete:f,supportsQuery:g,supportsQueryAttachments:m,supportsAsyncConvert3D:v},attachment:b}=e,w=e.operations.supportsChangeTracking,I=!!this.associatedLayer?.infoFor3D;return{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsReturnServiceEditsInSourceSpatialReference:a,supportsRollbackOnFailure:s,supportsGeometryUpdate:I&&o,supportsUploadWithItemId:n},data:{supportsAttachment:p,supportsZ:l,supportsM:u,isVersioned:c,queryFormats:e.data.queryFormats,sourceFormats:e.data.sourceFormats},operations:{supportsQuery:g,supportsQueryAttachments:m,supportsEditing:d&&w,supportsAdd:I&&h&&w,supportsDelete:I&&f&&w,supportsUpdate:y&&w,supportsAsyncConvert3D:v},attachment:b}}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.associatedLayer?.editingEnabled??!1}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}get relationships(){return this.associatedLayer?.relationships}get defaultPopupTemplate(){return this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some(t=>("esriFieldTypeOID"===t.type&&(e=t.name),!!e)),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some(t=>("esriFieldTypeGlobalID"===t.type&&(e=t.name),!!e)),e||void 0}get displayField(){return this.associatedLayer?.displayField??null}readProfile(e,t){const r=t.store.profile;return null!=r&&Oe[r]?Oe[r]:(c.A.getLogger(this).error("Unknown or missing profile",{profile:r,layer:this}),"mesh-pyramids")}get useViewTime(){return this.associatedLayer?.useViewTime??!0}set useViewTime(e){this._override("useViewTime",e)}get timeInfo(){const e=this.associatedLayer?.timeInfo;if(null==e)return null;const t=e.clone();return(0,z.sv)(t,this.fieldsIndex),t}set timeInfo(e){(0,z.sv)(e,this.fieldsIndex),this._override("timeInfo",e)}get timeExtent(){return this.associatedLayer?.timeExtent}set timeExtent(e){this._override("timeExtent",e)}get timeOffset(){return this.associatedLayer?.timeOffset}set timeOffset(e){this._override("timeOffset",e)}get datesInUnknownTimezone(){return this.associatedLayer?.datesInUnknownTimezone??!1}set datesInUnknownTimezone(e){this._override("datesInUnknownTimezone",e)}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){const t=e?.signal;await this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(h.QP),await this._fetchService(t),await Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),this._loadFilterGeometries()]),this._validateElevationInfo(),this._applyAssociatedLayerOverrides(),this._populateFieldUsageInfo(),await this.loadTimeInfoFromService(e),await(0,ve.L)(this,{origin:"service"},t),(0,z.yp)(this.renderer,this.fieldsIndex),await this.finishLoadEditablePortalLayer(e)}async beforeSave(){null!=this.filter&&(this.filter=this.filter.clone(),await this.load())}async _loadFilterGeometries(){if(this.filter)try{await this.filter.loadGeometries(this.spatialReference)}catch(e){c.A.getLogger(this).error("#_loadFilterGeometries()",this,"Failed to load filter geometries. Geometry filter will not be applied for this layer.",{error:e}),this.filter=null}}createQuery(){const e=new we.A;return"mesh"===this.geometryType?this.capabilities.query.supportsReturnMesh&&(e.returnGeometry=!0):(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e.outFields=["*"],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryExtent(e||this.createQuery(),t))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatureCount(e||this.createQuery(),t))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatures(e||this.createQuery(),t)).then(e=>{if(e?.features)for(const t of e.features)t.layer=this,t.sourceLayer=this,t.origin=this.graphicOrigin;return e})}async queryModels(e,t){const[i,{queryModels:s}]=await Promise.all([this._getAssociatedLayerForQuery(),Promise.all([r.e(893),r.e(4678)]).then(r.bind(r,41653))]);return s(this,i,e,t)}async queryModel(e,t){const[i,{queryModel:s}]=await Promise.all([this._getAssociatedLayerForQuery(),Promise.all([r.e(893),r.e(4678)]).then(r.bind(r,41653))]);return s(this,i,e,t)}async queryRelatedFeatures(e,t){if(await this.load(),!this.associatedLayer)throw new l.A("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.associatedLayer)throw new l.A("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeaturesCount(e,t)}async queryCachedAttributes(e,t){const r=(0,z.hL)(this.fieldsIndex,await(0,Fe.TO)(this,(0,Fe.D8)(this)));return(0,Le.s1)(this.parsedUrl?.path??"",this.attributeStorageInfo??[],e,t,r,this.apiKey,this.customParameters)}async queryCachedFeature(e,t){const r=await this.queryCachedAttributes(e,[t]);if(!r||0===r.length)throw new l.A("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const i=new s.A;return i.attributes=r[0],i.layer=this,i.sourceLayer=this,i.origin=this.graphicOrigin,i}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryObjectIds(e||this.createQuery(),t))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryAttachments(e,t))}getFieldUsageInfo(e){const t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(c.A.getLogger(this).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return(0,Me.tn)(this,e)}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return e?.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),!this.associatedLayer)throw new l.A("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new l.A("scenelayer:query-not-available","SceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return null!=this.statisticsInfo&&this.statisticsInfo.some(t=>t.name===e)}async queryCachedStatistics(e,t){return await this.load(t),await this.fetchStatistics(e,t)}async saveAs(e,t){return this._debouncedSaveOperations(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(0,e)}async applyEdits(e,t){const{applyEdits:i}=await r.e(6247).then(r.bind(r,78628));let s=t;await this.load();const n=this.associatedLayer;if(!n)throw new l.A(`${this.type}-layer:not-editable`,"Service is not editable");await n.load();const{globalIdField:o}=n,a=!!n.infoFor3D,u=s?.globalIdUsed??!0;if(a&&null==o)throw new l.A(`${this.type}-layer:not-editable`,"Valid globalIdField expected on editable SceneLayer");if(a&&!u)throw new l.A(`${this.type}-layer:globalid-required`,"globalIdUsed must not be false for SceneLayer editing as globalIds are required.");return(0,U.Wo)(n.url)&&a&&null!=e.deleteFeatures&&null!=o&&(s={...s,globalIdToObjectId:await(0,D.GA)(n,e.deleteFeatures,o)}),i(this,n.source,e,s)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new l.A(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}async convertMesh(e,t){t??={};const i=e=>{throw c.A.getLogger(this).error(".convertMesh()",e.message),e};await this.load(t),this.infoFor3D||i(new l.A("invalid:layer","SceneLayer has no capability for mesh conversion"));const s=await this.extractAndFilterFiles(e);(0,h.Te)(t);const n=s.reduce((e,t)=>(0,K.oF)(this.infoFor3D,t)?e+1:e,0);0===n&&i(new L.VP),n>1&&i(new L.XQ);const o=this.spatialReference,a=t.origin,u=await(0,v.projectAsync)(a??t.defaultOrigin??new m.A({x:0,y:0,z:0,spatialReference:o}),o,t),p=o.isGeographic?"local":"georeferenced",{createWithExternalSource:d}=await Promise.all([r.e(1843),r.e(8371),r.e(118),r.e(5524)]).then(r.bind(r,40118));(0,h.Te)(t);const y=d(u,{type:"client",files:s},{vertexSpace:p,transform:(0,Y.Z)(o),unitConversionDisabled:!0}),[f]=await this.uploadAssets([y],{...t,useAssetOrigin:!a});return f}async extractAndFilterFiles(e){await this.load();const t=this.infoFor3D;return t?(await Se(e)).filter(e=>(0,K.fu)(t,e)):e}validateLayer(e){if(e.layerType&&!Pe.has(e.layerType))throw new l.A("scenelayer:layer-type-not-supported","SceneLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new l.A("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});if(this.version.major>2)throw new l.A("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});!function(e,t){let r=!1,i=!1;if(null==e)r=!0,i=!0;else{const s=t&&t.isGeographic;switch(e){case"east-north-up":case"earth-centered":r=!0,i=s;break;case"vertex-reference-frame":r=!0,i=!s;break;default:r=!1}}if(!r)throw new l.A("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!i)throw new l.A("scenelayer:incompatible-normal-reference-frame","Normal reference frame is incompatible with layer spatial reference.")}(this.normalReferenceFrame,this.spatialReference)}_getTypeKeywords(){const e=[];if("points"===this.profile)e.push("Point");else{if("mesh-pyramids"!==this.profile)throw new l.A("scenelayer:unknown-profile","SceneLayer:save() encountered an unknown SceneLayer profile: "+this.profile);e.push("3DObject")}return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(const e of this.fields){const t=!!this.attributeStorageInfo?.some(t=>t.name===e.name),r=!!this.associatedLayer?.fields?.some(t=>t&&e.name===t.name),i={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||r,supportsLayerQuery:r};this._fieldUsageInfo[e.name]=i}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPropertyOverrides(),this._applyAssociatedLayerExtentOverride(),this._applyAssociatedLayerPrivileges()}_applyAssociatedLayerFieldsOverrides(){if(!this.associatedLayer?.fields)return;let e=null;for(const t of this.associatedLayer.fields){const r=this.getField(t.name);r?(!r.domain&&t.domain&&(r.domain=t.domain.clone()),r.editable=t.editable,r.nullable=t.nullable,r.length=t.length):(e||(e=this.fields?this.fields.slice():[]),e.push(t.clone()))}e&&this._set("fields",e)}_applyAssociatedLayerPropertyOverrides(){if(!this.associatedLayer)return;const e=["popupTemplate","popupEnabled","attributeTableTemplate"],t=(0,g.oY)(this);for(let r=0;r<e.length;r++){const i=e[r],s=this.originIdOf(i),n=this.associatedLayer.originIdOf(i);s<n&&(2===n||3===n)&&t.setAtOrigin(i,this.associatedLayer[i],n)}}_applyAssociatedLayerExtentOverride(){const e=this.associatedLayer?.getAtOrigin("fullExtent","service");null!=this.associatedLayer?.infoFor3D&&e&&(0,U.Wo)(this.associatedLayer?.url)&&ye(this)&&(0,g.oY)(this).setAtOrigin("fullExtent",e.clone(),2)}_applyAssociatedLayerPrivileges(){const e=this.associatedLayer;e&&(this._set("userHasEditingPrivileges",e.userHasEditingPrivileges),this._set("userHasFullEditingPrivileges",e.userHasFullEditingPrivileges),this._set("userHasUpdateItemPrivileges",e.userHasUpdateItemPrivileges))}async _setAssociatedFeatureLayer(e){if(["mesh-pyramids","points"].includes(this.profile))try{const{serverUrl:t,layerId:r,portalItem:i}=await(0,N.L)(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e}),s=await W.U.FeatureLayer();this.associatedLayer=new s({url:t,customParameters:this.customParameters,apiKey:this.apiKey,layerId:r,portalItem:i}),await this.associatedLayer.load()}catch(e){(0,h.zf)(e)||this._logWarningOnPopupEnabled().catch(()=>{})}}async _logWarningOnPopupEnabled(){const e=new AbortController;this.addHandles((0,u.rE)(e));try{await(0,y.C_)(()=>this.popupEnabled&&null!=this.popupTemplate,e.signal)}catch(e){return void(0,h.jH)(e)}const t=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?c.A.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${t}`):c.A.getLogger(this).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${t}`)}_validateElevationInfo(){const e=this.elevationInfo;"mesh-pyramids"===this.profile&&(0,Ie.XF)(c.A.getLogger(this),(0,Ie.$7)("Mesh scene layers","relative-to-scene",e)),(0,Ie.XF)(c.A.getLogger(this),(0,Ie.tW)("Scene layers",e))}async fetchStatistics(e,t){return await async function({fieldName:e,statisticsInfo:t,errorContext:r,fieldsIndex:i,path:s,customParameters:n,apiKey:o,signal:a}){if(null==t)throw new l.A(`${r}:no-cached-statistics`,"Cached statistics are not available for this layer");const u=i.get(e);if(null==u)throw new l.A(`${r}:field-unexisting`,`Field '${e}' does not exist on the layer`);const c=t.find(e=>e.name===u.name);if(null==c)throw new l.A(`${r}:no-cached-statistics`,"Cached statistics for this attribute are not available");const p=(0,fe.fj)(s,c.href),{data:d}=await(0,re.A)(p,{query:{f:"json",...n,token:o},responseType:"json",signal:a});return d}({fieldName:e,statisticsInfo:this.statisticsInfo,errorContext:"scenelayer",fieldsIndex:this.fieldsIndex,path:this.parsedUrl?.path??"",customParameters:this.customParameters,apiKey:this.apiKey,signal:t?.signal})}async loadTimeInfoFromService(e){const{serviceTimeInfo:t}=this;if(null==t)return;const{startTimeField:r,endTimeField:i}=t;if(null==r&&null==i)return;if(ye({associatedLayer:this.associatedLayer,serviceUpdateTimeStamp:this.serviceUpdateTimeStamp}))return;const s=async t=>{let i=null;try{const r=await this.fetchStatistics(t,e);i=r?.stats}catch{}if(null==i)return null;const{minTimeStr:s,min:n,maxTimeStr:o,max:a}=i,l=t===r?s??n:o??a;return null!=l?new Date(l):null},[n,o]=await Promise.all([s(r),s(i)]);if(null!=r&&null==n||null!=i&&null==o)return;const a=new Ce.A({start:n,end:o});this.setAtOrigin("timeInfo",new me.A({endField:i,startField:r,fullTimeExtent:a}),"service")}};(0,i.Cg)([(0,f.MZ)({types:{key:"type",base:null,typeMap:{selection:$.A}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:{allowNull:!0}},"portal-item":{name:"layerDefinition.featureReduction",write:{allowNull:!0}}}}})],je.prototype,"featureReduction",void 0),(0,i.Cg)([(0,f.MZ)({type:[ee],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}},clonable:!1})],je.prototype,"rangeInfos",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:!1}})],je.prototype,"associatedLayer",void 0),(0,i.Cg)([(0,f.MZ)({type:["show","hide"]})],je.prototype,"listMode",void 0),(0,i.Cg)([(0,f.MZ)({type:["ArcGISSceneServiceLayer"]})],je.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:!1},readOnly:!0})],je.prototype,"type",void 0),(0,i.Cg)([(0,f.MZ)({...Te.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],je.prototype,"fields",void 0),(0,i.Cg)([(0,f.MZ)()],je.prototype,"types",null),(0,i.Cg)([(0,f.MZ)()],je.prototype,"typeIdField",null),(0,i.Cg)([(0,f.MZ)()],je.prototype,"templates",null),(0,i.Cg)([(0,f.MZ)()],je.prototype,"formTemplate",null),(0,i.Cg)([(0,f.MZ)({readOnly:!0})],je.prototype,"graphicOrigin",void 0),(0,i.Cg)([(0,f.MZ)({readOnly:!0,clonable:!1})],je.prototype,"fieldsIndex",null),(0,i.Cg)([(0,f.MZ)({type:J.A,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],je.prototype,"floorInfo",void 0),(0,i.Cg)([(0,f.MZ)(Te.outFields)],je.prototype,"outFields",void 0),(0,i.Cg)([(0,f.MZ)({type:G.W4,readOnly:!0,json:{read:!1},clonable:!1})],je.prototype,"nodePages",void 0),(0,i.Cg)([(0,pe.w)("service","nodePages",["nodePages","pointNodePages"])],je.prototype,"readNodePages",null),(0,i.Cg)([(0,f.MZ)({type:[G.uV],readOnly:!0,clonable:!1})],je.prototype,"materialDefinitions",void 0),(0,i.Cg)([(0,f.MZ)({type:[G.Ot],readOnly:!0,clonable:!1})],je.prototype,"textureSetDefinitions",void 0),(0,i.Cg)([(0,f.MZ)({type:[G.L0],readOnly:!0,clonable:!1})],je.prototype,"geometryDefinitions",void 0),(0,i.Cg)([(0,f.MZ)({readOnly:!0})],je.prototype,"serviceUpdateTimeStamp",void 0),(0,i.Cg)([(0,f.MZ)({readOnly:!0})],je.prototype,"attributeStorageInfo",void 0),(0,i.Cg)([(0,f.MZ)({readOnly:!0})],je.prototype,"statisticsInfo",void 0),(0,i.Cg)([(0,f.MZ)({type:a.A.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],je.prototype,"excludeObjectIds",void 0),(0,i.Cg)([(0,f.MZ)({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],je.prototype,"definitionExpression",void 0),(0,i.Cg)([(0,f.MZ)({type:he,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],je.prototype,"filter",void 0),(0,i.Cg)([(0,f.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],je.prototype,"path",void 0),(0,i.Cg)([(0,f.MZ)(B.Yj)],je.prototype,"elevationInfo",null),(0,i.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],je.prototype,"effectiveCapabilities",null),(0,i.Cg)([(0,f.MZ)({readOnly:!0})],je.prototype,"effectiveEditingEnabled",null),(0,i.Cg)([(0,f.MZ)({type:String})],je.prototype,"geometryType",null),(0,i.Cg)([(0,f.MZ)(B.kF)],je.prototype,"labelsVisible",void 0),(0,i.Cg)([(0,f.MZ)({type:[H.A],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:Q.w},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:Q.w},write:!0}})],je.prototype,"labelingInfo",void 0),(0,i.Cg)([(0,f.MZ)(B.fV)],je.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,f.MZ)({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:["opacity","layerDefinition.drawingInfo.transparency"],reader(e,t){if("number"==typeof e&&e>=0&&e<=1)return e;const r=t.layerDefinition?.drawingInfo?.transparency;return void 0!==r?(0,Ee.D)(r):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],je.prototype,"opacity",void 0),(0,i.Cg)([(0,f.MZ)({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],je.prototype,"priority",void 0),(0,i.Cg)([(0,f.MZ)({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],je.prototype,"semantic",void 0),(0,i.Cg)([(0,f.MZ)({types:be.XJ,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],je.prototype,"renderer",null),(0,i.Cg)([(0,f.MZ)({json:{read:!1}})],je.prototype,"cachedDrawingInfo",void 0),(0,i.Cg)([(0,pe.w)("service","cachedDrawingInfo")],je.prototype,"readCachedDrawingInfo",null),(0,i.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],je.prototype,"capabilities",null),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{read:!1}})],je.prototype,"editingEnabled",null),(0,i.Cg)([(0,f.MZ)({readOnly:!0,json:{write:!1,read:!1}})],je.prototype,"infoFor3D",null),(0,i.Cg)([(0,f.MZ)({readOnly:!0,json:{write:!1,read:!1}})],je.prototype,"relationships",null),(0,i.Cg)([(0,f.MZ)(B.M6)],je.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,f.MZ)({type:n.A,json:{name:"popupInfo",write:!0}})],je.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],je.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,f.MZ)(B.zQ)],je.prototype,"attributeTableTemplate",void 0),(0,i.Cg)([(0,f.MZ)({type:String,json:{read:!1}})],je.prototype,"objectIdField",void 0),(0,i.Cg)([(0,pe.w)("service","objectIdField",["objectIdField","fields"])],je.prototype,"readObjectIdField",null),(0,i.Cg)([(0,f.MZ)({type:String,json:{read:!1}})],je.prototype,"globalIdField",void 0),(0,i.Cg)([(0,pe.w)("service","globalIdField",["globalIdField","fields"])],je.prototype,"readGlobalIdField",null),(0,i.Cg)([(0,f.MZ)({readOnly:!0,type:String,json:{read:!1}})],je.prototype,"displayField",null),(0,i.Cg)([(0,f.MZ)({type:String,json:{read:!1}})],je.prototype,"profile",void 0),(0,i.Cg)([(0,pe.w)("service","profile",["store.profile"])],je.prototype,"readProfile",null),(0,i.Cg)([(0,f.MZ)({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],je.prototype,"normalReferenceFrame",void 0),(0,i.Cg)([(0,f.MZ)(B.PY)],je.prototype,"screenSizePerspectiveEnabled",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:!1,origins:{service:{read:!0}}}})],je.prototype,"serviceItemId",void 0),(0,i.Cg)([(0,f.MZ)(R.B)],je.prototype,"useViewTime",null),(0,i.Cg)([(0,f.MZ)({type:me.A,json:{read:!1,write:!1}})],je.prototype,"timeInfo",null),(0,i.Cg)([(0,f.MZ)({type:Ce.A,json:{read:!1,write:!1}})],je.prototype,"timeExtent",null),(0,i.Cg)([(0,f.MZ)({type:Ae.A,json:{read:!1,write:!1}})],je.prototype,"timeOffset",null),(0,i.Cg)([(0,f.MZ)({type:Boolean,nonNullable:!0,json:{read:!1,write:!1}})],je.prototype,"datesInUnknownTimezone",null),(0,i.Cg)([(0,f.MZ)({type:ge,readOnly:!0,json:{read:{source:"timeInfo"}},clonable:!1})],je.prototype,"serviceTimeInfo",void 0),je=(0,i.Cg)([(0,f.$K)("esri.layers.SceneLayer")],je);const Oe={"mesh-pyramids":"mesh-pyramids",meshpyramids:"mesh-pyramids","features-meshes":"mesh-pyramids",points:"points","features-points":"points",lines:"lines","features-lines":"lines",polygons:"polygons","features-polygons":"polygons"},_e={"mesh-pyramids":"mesh",points:"point"},Ze=je},55726(e,t,r){r.d(t,{$1:()=>u,H2:()=>h,MT:()=>y,VP:()=>f,WF:()=>c,Wt:()=>o,XQ:()=>g,hK:()=>d,nS:()=>p,uh:()=>a,xY:()=>l});var i=r(49186);const s="upload-assets",n=()=>new Error;class o extends i.A{constructor(){super(`${s}:unsupported`,"Layer does not support asset uploads.",n())}}class a extends i.A{constructor(){super(`${s}:no-glb-support`,"Layer does not support glb.",n())}}class l extends i.A{constructor(){super(`${s}:no-supported-source`,"No supported external source found",n())}}class u extends i.A{constructor(){super(`${s}:not-base-64`,"Expected gltf data in base64 format after conversion.",n())}}class c extends i.A{constructor(){super(`${s}:unable-to-prepare-options`,"Unable to prepare uploadAsset request options.",n())}}class p extends i.A{constructor(e,t){super(`${s}:bad-response`,`Bad response. Uploaded ${e} items and received ${t} results.`,n())}}class d extends i.A{constructor(e,t){super(`${s}-layer:upload-failed`,`Failed to upload mesh file ${e}. Error code: ${t?.code??"-1"}. Error message: ${t?.messages??"unknown"}`,n())}}class h extends i.A{constructor(e){super(`${s}-layer:unsupported-format`,`The service allowed us to upload an asset of FormatID ${e}, but it does not list it in its supported formats.`,n())}}class y extends i.A{constructor(){super(`${s}:convert3D-failed`,"convert3D failed.")}}class f extends i.A{constructor(){super("invalid-input:no-model","No supported model found")}}class g extends i.A{constructor(){super("invalid-input:multiple-models","Multiple supported models found")}}},18768(e,t,r){var i=r(5482),s=r(53966),n=r(91429),o=r(60694);r.d(t,["b",0,e=>{const t=e;let r=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,o.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,o.Jf)(e,s.A.getLogger(this)))}};return(0,i.Cg)([(0,n.MZ)()],r.prototype,"title",null),(0,i.Cg)([(0,n.MZ)({type:String})],r.prototype,"url",null),r=(0,i.Cg)([(0,n.$K)("esri.layers.mixins.ArcGISService")],r),r}])},69208(e,t,r){var i=r(5482),s=r(91429);r.d(t,["d",0,e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.customParameters=null}};return(0,i.Cg)([(0,s.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],r.prototype,"customParameters",void 0),r=(0,i.Cg)([(0,s.$K)("esri.layers.mixins.CustomParametersMixin")],r),r}])},8303(e,t,r){var i=r(5482),s=r(92602),n=r(70333),o=r(11254),a=r(60999),l=r(49186),u=r(36563),c=r(53966),p=r(97768),d=r(17676),h=r(84952),y=r(91429),f=r(77548),g=r(20655),m=r(80812),v=r(41318),b=r(10407),w=r(36005),I=r(43937);const M={credential:null,user:null};r.d(t,["A",0,e=>{const t=e;let S=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){super.destroy(),this.portalItem=(0,p.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new m.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await r.e(1204).then(r.bind(r,41204));return(0,d.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,d.zf)(e)||c.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async reloadFromPortal(e){if(!this.loaded||!this.portalItem?.id)return!1;try{const{reload:t}=await r.e(1204).then(r.bind(r,41204)),i=new AbortController,s=(0,u.rE)(i);return this.addHandles(s,"reloadFromPortal"),await t({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},{signal:i.signal})}catch(e){throw(0,d.zf)(e)||c.A.getLogger(this).warn(`Failed to reload layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}finally{this.removeHandles("reloadFromPortal")}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,d.QP)(e),!0)))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,d.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=!n.id?.findCredential(this.url),s=e===r.id;if(s&&r.portal.user)return this._getUserPrivileges(r,i);let o,a;if(s)o=r.portal.url;else try{o=await(0,f.wI)(this.url,t)}catch(e){(0,d.QP)(e)}if(!o||!(0,h.b8)(o,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(n.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.QP)(e)}const l=!0,u=!1,c=!1;if(!a)return{features:{edit:l,fullEdit:u},content:{updateItem:c}};try{if(s?await r.reload():(r=new m.default({id:e,portal:{url:o}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,i)}catch(e){(0,d.QP)(e)}return{features:{edit:l,fullEdit:u},content:{updateItem:c}}}_getUserPrivileges(e,t){const r=(0,b.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,d.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const r=M.credential===t?M.user:await this._fetchEditingUser(e);return M.credential=t,M.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=n.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,s=g.A.getDefault();if(s&&s.loaded&&(0,h.S8)(s.restUrl)===(0,h.S8)(i))return s.user;const l=`${i}/community/self`,u=null!=e?e.signal:null,c=await(0,a.Ke)((0,o.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return c.ok?v.A.fromJSON(c.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||g.A.getDefault());return r&&i&&!(0,h.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i.Cg)([(0,y.MZ)({type:m.default})],S.prototype,"portalItem",null),(0,i.Cg)([(0,w.w)("web-document","portalItem",["itemId"])],S.prototype,"readPortalItem",null),(0,i.Cg)([(0,I.K)("web-document","portalItem",{itemId:{type:String}})],S.prototype,"writePortalItem",null),(0,i.Cg)([(0,y.MZ)({clonable:!1})],S.prototype,"resourceReferences",void 0),(0,i.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],S.prototype,"userHasEditingPrivileges",void 0),(0,i.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],S.prototype,"userHasFullEditingPrivileges",void 0),(0,i.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],S.prototype,"userHasUpdateItemPrivileges",void 0),S=(0,i.Cg)([(0,y.$K)("esri.layers.mixins.PortalLayer")],S),S}])},25036(e,t,r){var i=r(5482),s=r(91429);r.d(t,["j",0,e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;void 0!==t?.effectiveScaleRange&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,i.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"minScale",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"maxScale",void 0),(0,i.Cg)([(0,s.MZ)({readOnly:!0})],r.prototype,"effectiveScaleRange",null),r=(0,i.Cg)([(0,s.$K)("esri.layers.mixins.ScaleRangeLayer")],r),r}])},82935(e,t,r){var i=r(5482),s=r(91429),n=r(89317),o=r(30524),a=r(96184),l=r(73133),u=r(79677),c=r(10184),p=r(36005);const d={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation",layerContainerTypes:n.K}}};r.d(t,["B",0,d,"e",0,e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const i=r.timeOffset,s=l.j.fromJSON(r.timeOffsetUnits);return i&&s?new c.A({value:i,unit:s}):null}get timeInfo(){return this._get("timeInfo")}set timeInfo(e){(0,o.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,i.Cg)([(0,s.MZ)({type:u.A,json:{write:!1}})],r.prototype,"timeExtent",void 0),(0,i.Cg)([(0,s.MZ)({type:c.A})],r.prototype,"timeOffset",void 0),(0,i.Cg)([(0,p.w)("service","timeOffset",["timeInfo.exportOptions"])],r.prototype,"readOffset",null),(0,i.Cg)([(0,s.MZ)({value:null,type:a.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],r.prototype,"timeInfo",null),(0,i.Cg)([(0,s.MZ)(d)],r.prototype,"useViewTime",void 0),r=(0,i.Cg)([(0,s.$K)("esri.layers.mixins.TemporalLayer")],r),r}])},67202(e,t,r){r.d(t,{A:()=>a});var i,s=r(5482),n=r(25482),o=r(91429);let a=i=class extends n.o{constructor(e){super(e),this.type="selection"}clone(){return new i}};(0,s.Cg)([(0,o.MZ)({type:["selection"],readOnly:!0,json:{write:!0}})],a.prototype,"type",void 0),a=i=(0,s.Cg)([(0,o.$K)("esri.layers.support.FeatureReductionSelection")],a)},46499(e,t,r){r.d(t,{A:()=>S});var i,s,n=r(5482),o=(r(44208),r(66552)),a=r(25482),l=r(4718),u=r(90629),c=r(91429),p=r(73913),d=r(32730),h=r(77548),y=r(59868),f=r(73838),g=r(33910),m=r(36005),v=r(43937);const b=new o.J({esriServerPointLabelPlacementAboveCenter:"above-center",esriServerPointLabelPlacementAboveLeft:"above-left",esriServerPointLabelPlacementAboveRight:"above-right",esriServerPointLabelPlacementBelowCenter:"below-center",esriServerPointLabelPlacementBelowLeft:"below-left",esriServerPointLabelPlacementBelowRight:"below-right",esriServerPointLabelPlacementCenterCenter:"center-center",esriServerPointLabelPlacementCenterLeft:"center-left",esriServerPointLabelPlacementCenterRight:"center-right",esriServerLinePlacementAboveAfter:"above-after",esriServerLinePlacementAboveAlong:"above-along",esriServerLinePlacementAboveBefore:"above-before",esriServerLinePlacementAboveStart:"above-start",esriServerLinePlacementAboveEnd:"above-end",esriServerLinePlacementBelowAfter:"below-after",esriServerLinePlacementBelowAlong:"below-along",esriServerLinePlacementBelowBefore:"below-before",esriServerLinePlacementBelowStart:"below-start",esriServerLinePlacementBelowEnd:"below-end",esriServerLinePlacementCenterAfter:"center-after",esriServerLinePlacementCenterAlong:"center-along",esriServerLinePlacementCenterBefore:"center-before",esriServerLinePlacementCenterStart:"center-start",esriServerLinePlacementCenterEnd:"center-end",esriServerPolygonPlacementAlwaysHorizontal:"always-horizontal"},{ignoreUnknown:!0});function w(e,t,r){return{enabled:!(0,h.TU)(r?.layer)}}function I(e){return!e||"service"!==e.origin&&!("map-image"===e.layer?.type)}function M(e){return!!function(e){return"map-image"===e?.type}(e)&&!!e.capabilities?.exportMap?.supportsArcadeExpressionForLabeling}let S=class extends a.o{static{i=d.vK}static{s=this}static evaluateWhere(e,t){const r=(e,t,r)=>{switch(t){case"=":return e==r;case"<>":return e!=r;case">":return e>r;case">=":return e>=r;case"<":return e<r;case"<=":return e<=r}return!1};try{if(null==e)return!0;const i=e.split(" ");if(3===i.length)return r(t[i[0]],i[1],i[2]);if(7===i.length){const e=r(t[i[0]],i[1],i[2]),s=i[3],n=r(t[i[4]],i[5],i[6]);switch(s){case"AND":return e&&n;case"OR":return e||n}}return!1}catch(e){}}constructor(e){super(e),this[i]=!0,this.type="label",this.name=null,this.allowOverrun=!1,this.deconflictionStrategy="static",this.labelExpression=null,this.labelExpressionInfo=null,this.labelPlacement=null,this.labelPosition="curved",this.maxScale=0,this.minScale=0,this.repeatLabel=!0,this.symbol=y.Hk,this.useCodedValues=void 0,this.where=null}readLabelExpression(e,t){const r=t.labelExpressionInfo;if(!r||!r.value&&!r.expression)return e}writeLabelExpression(e,t,r){if(this.labelExpressionInfo)if(null!=this.labelExpressionInfo.value)e=(0,d.D3)(this.labelExpressionInfo.value);else if(null!=this.labelExpressionInfo.expression){const t=(0,d.tH)(this.labelExpressionInfo.expression);t&&(e="["+t+"]")}null!=e&&(t[r]=e)}writeLabelExpressionInfo(e,t,r,i){if(null==e&&null!=this.labelExpression&&I(i))e=new p.A({expression:this.getLabelExpressionArcade()});else if(!e)return;const s=e.toJSON(i);s.expression&&(t[r]=s)}writeMaxScale(e,t){(e||this.minScale)&&(t.maxScale=e)}writeMinScale(e,t){(e||this.maxScale)&&(t.minScale=e)}get repeatLabelDistance(){return this._get("repeatLabelDistance")}set repeatLabelDistance(e){this._set("repeatLabelDistance",e)}getLabelExpression(){return(0,d.XJ)(this)}getLabelExpressionArcade(){return(0,d.BI)(this)}getLabelExpressionSingleField(){return(0,d.rU)(this)}hash(){return JSON.stringify(this)}clone(){return new s({allowOverrun:this.allowOverrun,deconflictionStrategy:this.deconflictionStrategy,labelExpression:this.labelExpression,labelExpressionInfo:(0,l.o8)(this.labelExpressionInfo),labelPosition:this.labelPosition,labelPlacement:this.labelPlacement,maxScale:this.maxScale,minScale:this.minScale,name:this.name,repeatLabel:this.repeatLabel,repeatLabelDistance:this.repeatLabelDistance,symbol:(0,l.o8)(this.symbol),where:this.where,useCodedValues:this.useCodedValues})}};(0,n.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],S.prototype,"name",void 0),(0,n.Cg)([(0,c.MZ)({type:Boolean,json:{write:!0,default:!1,origins:{"web-scene":{write:!1},"portal-item":{default:!1,write:{overridePolicy:w}}}}})],S.prototype,"allowOverrun",void 0),(0,n.Cg)([(0,c.MZ)({type:String,json:{write:!0,default:"static",origins:{"web-scene":{write:!1},"portal-item":{default:"static",write:{overridePolicy:w}}}}})],S.prototype,"deconflictionStrategy",void 0),(0,n.Cg)([(0,c.MZ)({type:String,json:{write:{overridePolicy(e,t,r){return this.labelExpressionInfo&&"service"===r?.origin&&M(r.layer)?{enabled:!1}:{allowNull:!0}}}}})],S.prototype,"labelExpression",void 0),(0,n.Cg)([(0,m.w)("labelExpression")],S.prototype,"readLabelExpression",null),(0,n.Cg)([(0,v.K)("labelExpression")],S.prototype,"writeLabelExpression",null),(0,n.Cg)([(0,c.MZ)({type:p.A,json:{write:{overridePolicy:(e,t,r)=>function(e){return I(e)||M(e?.layer)}(r)?{allowNull:!0}:{enabled:!1}}}})],S.prototype,"labelExpressionInfo",void 0),(0,n.Cg)([(0,v.K)("labelExpressionInfo")],S.prototype,"writeLabelExpressionInfo",null),(0,n.Cg)([(0,c.MZ)({type:b.apiValues,json:{type:b.jsonValues,read:b.read,write:b.write}})],S.prototype,"labelPlacement",void 0),(0,n.Cg)([(0,c.MZ)({type:["curved","parallel"],json:{write:!0,origins:{"web-map":{write:!1},"web-scene":{write:!1},"portal-item":{write:!1}}}})],S.prototype,"labelPosition",void 0),(0,n.Cg)([(0,c.MZ)({type:Number})],S.prototype,"maxScale",void 0),(0,n.Cg)([(0,v.K)("maxScale")],S.prototype,"writeMaxScale",null),(0,n.Cg)([(0,c.MZ)({type:Number})],S.prototype,"minScale",void 0),(0,n.Cg)([(0,v.K)("minScale")],S.prototype,"writeMinScale",null),(0,n.Cg)([(0,c.MZ)({type:Boolean,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:w}}}}})],S.prototype,"repeatLabel",void 0),(0,n.Cg)([(0,c.MZ)({type:Number,cast:u.cr,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:w}}}}})],S.prototype,"repeatLabelDistance",null),(0,n.Cg)([(0,c.MZ)({types:g.em,json:{origins:{"web-scene":{types:g.Rv,write:f.oO,default:null}},write:f.oO,default:null}})],S.prototype,"symbol",void 0),(0,n.Cg)([(0,c.MZ)({type:Boolean,json:{write:!0}})],S.prototype,"useCodedValues",void 0),(0,n.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],S.prototype,"where",void 0),S=s=(0,n.Cg)([(0,c.$K)("esri.layers.support.LabelClass")],S)},73913(e,t,r){r.d(t,{A:()=>c});var i,s=r(5482),n=r(25482),o=r(91429),a=r(32730),l=r(36005),u=r(43937);let c=class extends n.o{static{i=this}constructor(e){super(e),this.expression=null,this.title=null,this.value=null}readExpression(e,t){return t.value?(0,a.mX)(t.value):e}writeExpression(e,t,r){null!=this.value&&(e=(0,a.mX)(this.value)),null!=e&&(t[r]=e)}clone(){return new i({expression:this.expression,title:this.title,value:this.value})}};(0,s.Cg)([(0,o.MZ)({type:String,json:{write:{writerEnsuresNonNull:!0}}})],c.prototype,"expression",void 0),(0,s.Cg)([(0,l.w)("expression",["expression","value"])],c.prototype,"readExpression",null),(0,s.Cg)([(0,u.K)("expression")],c.prototype,"writeExpression",null),(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0,origins:{"web-scene":{write:!1}}}})],c.prototype,"title",void 0),(0,s.Cg)([(0,o.MZ)({json:{read:!1,write:!1}})],c.prototype,"value",void 0),c=i=(0,s.Cg)([(0,o.$K)("esri.layers.support.LabelExpressionInfo")],c)},96184(e,t,r){r.d(t,{A:()=>h});var i=r(5482),s=r(69540),n=r(25482),o=r(91429),a=r(79677),l=r(10184),u=r(56400),c=r(36005),p=r(43937);function d(e,t){return l.A.fromJSON({value:e,unit:t})}let h=class extends((0,s.OU)(n.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?a.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?d(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?d(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],h.prototype,"cumulative",void 0),(0,i.Cg)([(0,o.MZ)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"endField",void 0),(0,i.Cg)([(0,o.MZ)({type:a.A,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"fullTimeExtent",void 0),(0,i.Cg)([(0,c.w)("fullTimeExtent",["timeExtent"])],h.prototype,"readFullTimeExtent",null),(0,i.Cg)([(0,p.K)("fullTimeExtent")],h.prototype,"writeFullTimeExtent",null),(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{write:!0}})],h.prototype,"hasLiveData",void 0),(0,i.Cg)([(0,o.MZ)({type:l.A,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"interval",void 0),(0,i.Cg)([(0,c.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],h.prototype,"readInterval",null),(0,i.Cg)([(0,p.K)("interval")],h.prototype,"writeInterval",null),(0,i.Cg)([(0,o.MZ)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"startField",void 0),(0,i.Cg)([(0,o.MZ)((0,u.P6)("timeReference",!0))],h.prototype,"timeZone",void 0),(0,i.Cg)([(0,o.MZ)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"trackIdField",void 0),(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],h.prototype,"useTime",void 0),(0,i.Cg)([(0,o.MZ)({type:[Date],json:{read:!1}})],h.prototype,"stops",void 0),h=(0,i.Cg)([(0,o.$K)("esri.layers.support.TimeInfo")],h)},17036(e,t,r){r.d(t,{p:()=>l});var i=r(44208),s=r(53966),n=r(20437),o=r(95466),a=r(30524);function l(){return{fields:{type:[n.A],value:null,set:function(e){if(e&&(0,i.A)("big-integer-warning-enabled")){const t=e.filter(e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8);if(t.length){const e=t.map(e=>`'${e.name}'`).join(", ");s.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||s.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,a.DB)(this.fieldsIndex,e)}}}}},20557(e,t,r){r.d(t,{Fm:()=>l,Hz:()=>g,JQ:()=>f,JZ:()=>C,ND:()=>v,R_:()=>o,U9:()=>y,_h:()=>w,be:()=>p,fE:()=>h,fu:()=>s,nr:()=>m,oF:()=>n,qv:()=>x,rP:()=>d,rq:()=>u,z$:()=>c});const i=[["binary","application/octet-stream","bin",""]];function s(e,t){return null!=I(t.name,e?.supportedFormats??[])}function n(e,t){if(!e)return!1;const r=u(t,e.supportedFormats??[]);return null!=r&&e.editFormats.includes(r)}function o(e,t){return M(function(e,t){const r=e.toLowerCase();return b(t).find(e=>S(e)===r)}(e,t))}function a(e,t){return M(I(e,t))}function l(e,t){return S(w(e,t))}function u(e,t){return a(e.name,t)??o(e.type,t)}function c(e,t,r){return o(e,r)??a(t,r)}function p(e,t){if(!e||!w(e,t))return;const r=/^3d_(.+)$/iu.exec(e)?.[1]?.toLowerCase();return r||void 0}function d(e,t){return(e??[]).map(e=>p(e,t)).filter(e=>!!e)}function h(e,t){return M(t.find(r=>p(M(r),t)===e))}function y({supportedFormats:e}){return c("model/gltf-binary","glb",e)}function f(e){const t=y(e);return null!=t&&e.editFormats.includes(t)}function g(e){if(!e)return null;const t=y(e),r=function({supportedFormats:e}){return c("model/gltf+json","gltf",e)}(e);let i=null;for(const s of e.queryFormats){if(s===t)return s;s===r&&(i=s)}return i}function m({supportedFormats:e}){return c("application/esri3do-SR_world","wld",e)}function v({supportedFormats:e}){return c("application/esri3do-SR_prj","prj",e)}function b(e){return[...i,...e]}function w(e,t){return b(t).find(t=>M(t)===e)}function I(e,t){const r=e.toLowerCase();return b(t).find(e=>x(e).some(e=>r.endsWith(e)))}function M(e){return e?.[0]}function S(e){return e?.[1].toLowerCase()}function x(e){return e?.[2].split(",").map(e=>e.toLowerCase())??[]}function C(e){return e.tables?.find(e=>"assetMaps"===e.role)}},39383(e,t,r){r.d(t,{w:()=>l,z:()=>p});var i=r(49186),s=r(53966),n=r(46499);const o=()=>s.A.getLogger("esri.layers.support.labelingInfo"),a=/\[([^[\]]+)\]/gi;function l(e,t,r){return e?e.map(e=>{const i=new n.A;if(i.read(e,r),i.labelExpression){const e=t.fields||t.layerDefinition?.fields||this.fields;i.labelExpression=i.labelExpression.replaceAll(a,(t,r)=>`[${function(e,t){if(!t)return e;const r=e.toLowerCase();for(let e=0;e<t.length;e++){const i=t[e].name;if(i.toLowerCase()===r)return i}return e}(r,e)}]`)}return i}):null}const u=["above-right","above-center","above-left","center-center","center-left","center-right","below-center","below-left","below-right"],c={esriGeometryPoint:u,esriGeometryMultiPatch:["always-horizontal"],esriGeometryPolygon:["always-horizontal"],esriGeometryPolyline:["center-along","above-along","below-along"],esriGeometryMultipoint:u,esriGeometryEnvelope:null};function p(e,t){const r=[];for(const s of e){const e=s.labelPlacement,n=c[t];if(!s.symbol)return o().warn("No ILabelClass symbol specified."),[];if(!n)return o().error(new i.A("labeling:unsupported-geometry-type",`Unable to create labels for layer, geometry type '${t}' is not supported`)),[];if(n.includes(e))r.push(s);else{const i=n[0];e&&o().warn(`Found invalid label placement type ${e} for ${t}. Defaulting to ${i}`);const a=s.clone();a.labelPlacement=i,r.push(a)}}return r}},86390(e,t,r){r.d(t,{Z:()=>n});var i=r(86211),s=r(73836);function n(e){const t=1/(0,i.GA)(e,1);return 1!==t?new s.A({scale:[t,t,t]}):void 0}},73179(e,t,r){r.d(t,{b:()=>l,h:()=>u});var i=r(4718),s=r(53966),n=r(84952),o=r(60694),a=r(10873);function l(e){const{nonStandardUrlAllowed:t=!1,separator:r}=e??{},n=(0,i.o8)(a.OZ),l=n.json?.write;return"object"==typeof l&&l&&(l.writer=function(e,t,i,s){(0,o.LS)(this,e,r,t,s)}),{...n,set:function(e){if(null==e)return void this._set("url",e);const r=(0,o.HZ)({layer:this,url:e,nonStandardUrlAllowed:t,logger:s.A.getLogger(this)});this._set("url",r.url),null!=r.layerId&&this._set("layerId",r.layerId)}}}function u(e,t){const{separator:r}=t??{},i=(0,n.An)(e.url);return null!=i&&(null!=e.dynamicDataSource?i.path=(0,n.fj)(i.path,"dynamicLayer"):null!=e.layerId&&(i.path=(0,n.fj)(i.path,r??"",e.layerId.toString()))),i}},10407(e,t,r){r.d(t,{It:()=>h,LG:()=>o,OM:()=>u,Sm:()=>c,Y:()=>a,bK:()=>l,sQ:()=>p});var i=r(91218),s=r(16930),n=r(28735);function o(e,t){if(!a(e,t)){const r=e.typeKeywords;r?r.push(t):e.typeKeywords=[t]}}function a(e,t){return!!e.typeKeywords?.includes(t)}function l(e){return a(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 c(e,t,r){r?o(e,t):u(e,t)}async function p(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,n.ci)(e);const r=s.A.WGS84;return await(0,i.initializeProjection)(t,r),(0,i.project)(e,r)}(r)}const d={CHARTS:"Charts",CATALOG_LAYER:"CatalogLayer",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",PARCEL_FABRIC:"ParcelFabric",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery",UTILITY_NETWORK:"UtilityNetwork"};function h(e){const{portal:t,isOrgItem:r,itemControl:i}=e,s=t.user?.privileges;let n=!s||s.includes("features:user:edit"),o=!!r&&!!s?.includes("features:user:fullEdit");const a="update"===i||"admin"===i;return a?o=n=!0:o&&(n=!0),{features:{edit:n,fullEdit:o},content:{updateItem:a}}}r.d(t,["mm",0,d])},85648(e,t,r){r.d(t,{n:()=>s});var i=r(84952);function s(e){return n[function(e){return"json"===e.type?"application/json":"blob"===e.type?e.blob.type:function(e){const t=(0,i.Zo)(e);return l[t]||o}(e.url)}(e)]||a}const n={},o="text/plain",a=n[o],l={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const e in l)n[l[e]]=e},86162(e,t,r){r.d(t,{A:()=>A});var i,s=r(5482),n=r(66552),o=r(4718),a=r(53966),l=r(91429),u=r(56507),c=r(30524),p=r(92438),d=r(63988),h=r(88542),y=r(49849),f=r(20061),g=r(80911),m=r(43668),v=r(33910),b=r(36005),w=r(43937),I=r(93223);const M="percent-of-total",S="field",x=new n.J({esriNormalizeByLog:"log",esriNormalizeByPercentOfTotal:M,esriNormalizeByField:S}),C=(0,u.dp)(h.A);let A=i=class extends((0,d.h)(p.A)){constructor(e){super(e),this._compiledValueExpression={valueExpression:null,compiledFunction:null},this.backgroundFillSymbol=null,this.classBreakInfos=null,this.defaultLabel=null,this.defaultSymbol=null,this.field=null,this.isMaxInclusive=!0,this.legendOptions=null,this.normalizationField=null,this.normalizationTotal=null,this.type="class-breaks",this.valueExpression=null,this.valueExpressionTitle=null,this._set("classBreakInfos",[])}readClassBreakInfos(e,t,r){if(!Array.isArray(e))return;let i=t.minValue;return e.map(e=>{const t=new h.A;return t.read(e,r),null==t.minValue&&(t.minValue=i),null==t.maxValue&&(t.maxValue=t.minValue),i=t.maxValue,t})}writeClassBreakInfos(e,t,r,i){const s=e.map(e=>e.write({},i));this._areClassBreaksConsecutive()&&s.forEach(e=>delete e.classMinValue),t[r]=s}castField(e){return null==e?e:"function"==typeof e?(a.A.getLogger(this).error(".field: field must be a string value"),null):(0,u.GX)(e)}get minValue(){return this.classBreakInfos&&this.classBreakInfos[0]&&this.classBreakInfos[0].minValue||0}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,r=null!=this.normalizationTotal;return t||r?(e=t&&S||r&&M||null,t&&r&&a.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==S&&e!==M||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}addClassBreakInfo(e,t,r){let i=null;i="number"==typeof e?new h.A({minValue:e,maxValue:t,symbol:(0,v.dp)(r)}):C((0,o.o8)(e)),this.classBreakInfos.push(i),1===this.classBreakInfos.length&&this.notifyChange("minValue")}removeClassBreakInfo(e,t){const r=this.classBreakInfos.length;for(let i=0;i<r;i++){const r=[this.classBreakInfos[i].minValue,this.classBreakInfos[i].maxValue];if(r[0]===e&&r[1]===t){this.classBreakInfos.splice(i,1);break}}}getBreakIndex(e,t){return this.valueExpression&&null==t?.arcade&&a.A.getLogger(this).warn(""),this.valueExpression?this._getBreakIndexForExpression(e,t):this._getBreakIndexForField(e)}async getClassBreakInfo(e,t){let r=t;this.valueExpression&&null==t?.arcade&&(r={...r,arcade:await(0,m.l)()});const i=this.getBreakIndex(e,r);return-1!==i?this.classBreakInfos[i]:null}getSymbol(e,t){if(this.valueExpression&&null==t?.arcade)return void a.A.getLogger(this).error("#getSymbol()","Please use getSymbolAsync if valueExpression is used");const r=this.getBreakIndex(e,t);return-1===r?this.defaultSymbol:(0,g.c)(this.classBreakInfos[r],t?.scale)??this.defaultSymbol}async getSymbolAsync(e,t){let r=t;if(this.valueExpression&&null==t?.arcade){const e=await(0,m.l)(),{arcadeUtils:t}=e;t.hasGeometryOperations(this.valueExpression)&&await t.enableGeometryOperations(),r={...r,arcade:e}}const i=this.getBreakIndex(e,r);return-1===i?this.defaultSymbol:(0,g.c)(this.classBreakInfos[i],r?.scale)??this.defaultSymbol}get symbols(){const e=[];return this.classBreakInfos.forEach(t=>{t.symbol&&e.push(t.symbol),e.push(...t.alternateSymbols??[])}),this.defaultSymbol&&e.push(this.defaultSymbol),e}get arcadeRequired(){return this.arcadeRequiredForVisualVariables||!!this.valueExpression}clone(){return new i({field:this.field,backgroundFillSymbol:this.backgroundFillSymbol?.clone(),defaultLabel:this.defaultLabel,defaultSymbol:this.defaultSymbol?.clone(),valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,classBreakInfos:(0,o.o8)(this.classBreakInfos),isMaxInclusive:this.isMaxInclusive,normalizationField:this.normalizationField,normalizationTotal:this.normalizationTotal,normalizationType:this.normalizationType,visualVariables:(0,o.o8)(this.visualVariables),legendOptions:(0,o.o8)(this.legendOptions),authoringInfo:(0,o.o8)(this.authoringInfo)})}async collectRequiredFields(e,t){const r=[this.collectVVRequiredFields(e,t),this.collectSymbolFields(e,t)];await Promise.all(r)}async collectSymbolFields(e,t){const r=[...this.symbols.map(r=>r.collectRequiredFields(e,t)),(0,c.Dx)(e,t,null,this.valueExpression)];(0,c.rq)(e,t,this.field),(0,c.rq)(e,t,this.normalizationField),await Promise.all(r)}_getBreakIndexForExpression(e,t){const{viewingMode:r,scale:i,spatialReference:s,arcade:n,timeZone:o}=t??{},{valueExpression:a}=this;let l=this._compiledValueExpression.valueExpression===a?this._compiledValueExpression.compiledFunction:null;const u=n.arcadeUtils;if(!l){const e=u.createSyntaxTree(a);l=u.createFunction(e),this._compiledValueExpression.compiledFunction=l}this._compiledValueExpression.valueExpression=a;const c=u.executeFunction(l,u.createExecContext(e,u.getViewInfo({viewingMode:r,scale:i,spatialReference:s}),o));return this._getBreakIndexfromInfos(c)}_getBreakIndexForField(e){const t=this.field,r=e.attributes,i=this.normalizationType;let s=parseFloat(r[t]);if(i){const e=this.normalizationTotal,t=parseFloat(this.normalizationField?r[this.normalizationField]:void 0);if("log"===i)s=Math.log(s)*Math.LOG10E;else if(i!==M||null==e||isNaN(e)){if(i===S&&!isNaN(t)){if(isNaN(s)||isNaN(t))return-1;s/=t}}else s=s/e*100}return this._getBreakIndexfromInfos(s)}_getBreakIndexfromInfos(e){const t=this.isMaxInclusive;if(null!=e&&"number"==typeof e&&!isNaN(e))for(let r=0;r<this.classBreakInfos.length;r++){const i=[this.classBreakInfos[r].minValue,this.classBreakInfos[r].maxValue];if(i[0]<=e&&(t?e<=i[1]:e<i[1]))return r}return-1}_areClassBreaksConsecutive(){const e=this.classBreakInfos,t=e.length;for(let r=1;r<t;r++)if(e[r-1].maxValue!==e[r].minValue)return!1;return!0}};(0,s.Cg)([(0,l.MZ)(y.As)],A.prototype,"backgroundFillSymbol",void 0),(0,s.Cg)([(0,l.MZ)({type:[h.A],json:{write:{isRequired:!0}}})],A.prototype,"classBreakInfos",void 0),(0,s.Cg)([(0,b.w)("classBreakInfos")],A.prototype,"readClassBreakInfos",null),(0,s.Cg)([(0,w.K)("classBreakInfos")],A.prototype,"writeClassBreakInfos",null),(0,s.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],A.prototype,"defaultLabel",void 0),(0,s.Cg)([(0,l.MZ)(y.z4)],A.prototype,"defaultSymbol",void 0),(0,s.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],A.prototype,"field",void 0),(0,s.Cg)([(0,l.wg)("field")],A.prototype,"castField",null),(0,s.Cg)([(0,l.MZ)({type:Boolean})],A.prototype,"isMaxInclusive",void 0),(0,s.Cg)([(0,l.MZ)({type:f.A,json:{write:!0}})],A.prototype,"legendOptions",void 0),(0,s.Cg)([(0,l.MZ)({type:Number,readOnly:!0,value:null,json:{read:!1,write:{overridePolicy(){return 0!==this.classBreakInfos.length&&this._areClassBreaksConsecutive()?{enabled:!0}:{enabled:!1}}}}})],A.prototype,"minValue",null),(0,s.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],A.prototype,"normalizationField",void 0),(0,s.Cg)([(0,l.MZ)({type:Number,json:{write:!0}})],A.prototype,"normalizationTotal",void 0),(0,s.Cg)([(0,l.MZ)({type:x.apiValues,value:null,json:{type:x.jsonValues,read:x.read,write:x.write}})],A.prototype,"normalizationType",null),(0,s.Cg)([(0,I.e)({classBreaks:"class-breaks"})],A.prototype,"type",void 0),(0,s.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],A.prototype,"valueExpression",void 0),(0,s.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],A.prototype,"valueExpressionTitle",void 0),A=i=(0,s.Cg)([(0,l.$K)("esri.renderers.ClassBreaksRenderer")],A)},88542(e,t,r){r.d(t,{A:()=>u});var i,s=r(5482),n=r(25482),o=r(91429),a=r(49849),l=r(40863);let u=i=class extends n.o{constructor(e){super(e),this.description=null,this.label=null,this.minValue=null,this.maxValue=0,this.symbol=null}get alternateSymbols(){return this._get("alternateSymbols")??null}set alternateSymbols(e){e?this._set("alternateSymbols",e.map(e=>e instanceof l.A?e:(delete e.type,new l.A(e)))):this._set("alternateSymbols",null)}clone(){return new i({alternateSymbols:this.alternateSymbols?.map(e=>e.clone()),description:this.description,label:this.label,minValue:this.minValue,maxValue:this.maxValue,symbol:this.symbol?.clone()??null})}};(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],u.prototype,"description",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],u.prototype,"label",void 0),(0,s.Cg)([(0,o.MZ)({type:Number,json:{read:{source:"classMinValue"},write:{target:"classMinValue"}}})],u.prototype,"minValue",void 0),(0,s.Cg)([(0,o.MZ)({type:Number,json:{read:{source:"classMaxValue"},write:{target:"classMaxValue"}}})],u.prototype,"maxValue",void 0),(0,s.Cg)([(0,o.MZ)(a.Wp)],u.prototype,"symbol",void 0),(0,s.Cg)([(0,o.MZ)({type:[l.A],useTypeForAutocast:!1,json:{write:!0,origins:{"web-scene":{write:!1}}}})],u.prototype,"alternateSymbols",null),u=i=(0,s.Cg)([(0,o.$K)("esri.renderers.support.ClassBreakInfo")],u)},8947(e,t,r){r.d(t,{L:()=>o});var i=r(60999),s=r(17676),n=r(67076);async function o(e,t,r){const o=e&&e.getAtOrigin&&e.getAtOrigin("renderer",t.origin);if(o&&"unique-value"===o.type&&o.styleOrigin){const a=await(0,i.Ke)(o.populateFromStyle());if((0,s.Te)(r),!1===a.ok){const r=a.error;t?.messages&&t.messages.push(new n.A("renderer:style-reference",`Failed to create unique value renderer from style reference: ${r.message}`,{error:r,context:t})),e.clear("renderer",t?.origin)}}}}}]);
|