@arcgis/core 4.28.0-next.20230720 → 4.28.0-next.20230721
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/Color.js +1 -1
- package/analysis/AreaMeasurementAnalysis.js +1 -1
- package/arcade/arcadeCompiler.js +1 -1
- package/arcade/featureSetUtils.js +1 -1
- package/arcade/featureset/actions/Top.js +1 -1
- package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
- package/arcade/featureset/support/FeatureSet.js +1 -1
- package/arcade/featureset/support/FeatureSetIterator.js +1 -1
- package/arcade/functions/convertdirection.js +1 -1
- package/arcade/functions/featuresetbase.js +1 -1
- package/arcade/functions/geomasync.js +1 -1
- package/arcade/functions/geomsync.js +1 -1
- package/arcade/lib/comment-handler.js +1 -1
- package/arcade/lib/parser.js +1 -1
- package/arcade/lib/scanner.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{75c28da8d0b02d612d69.js → 040b3fc9c9c0736dd893.js} +1 -1
- package/assets/esri/core/workers/chunks/0652f6a8d5221e978033.js +1 -0
- package/assets/esri/core/workers/chunks/{c13b332afdb3f6be1ec9.js → 092fda62b6f62c2e4869.js} +1 -1
- package/assets/esri/core/workers/chunks/{57e0ad037188bd2997e7.js → 0af18a96cbd4e2d35436.js} +1 -1
- package/assets/esri/core/workers/chunks/0b5eeec0f66c87a46a0c.js +1 -0
- package/assets/esri/core/workers/chunks/{68e568b67b6fb34393db.js → 0cad2b991d0d0fd07846.js} +1 -1
- package/assets/esri/core/workers/chunks/0dccbc6c2559fdc0c2ad.js +1 -0
- package/assets/esri/core/workers/chunks/256a82f6f6e1405fbcc6.js +1 -0
- package/assets/esri/core/workers/chunks/{bb9213899049e1db90da.js → 2c57c9bd71637c5bed8a.js} +1 -1
- package/assets/esri/core/workers/chunks/2cdbabcbfe32286ec78d.js +1 -0
- package/assets/esri/core/workers/chunks/{2b1c83453a862e01954b.js → 2d9d80b2d0042a9c09fb.js} +1 -1
- package/assets/esri/core/workers/chunks/2f9aec2238ff6cb99e09.js +1 -0
- package/assets/esri/core/workers/chunks/{7dbd3e6406fb3e3a1a8f.js → 3cf748c025f3936c1cb2.js} +1 -1
- package/assets/esri/core/workers/chunks/4481d1103363434f16da.js +1 -0
- package/assets/esri/core/workers/chunks/5ae325e6a795c72eac6c.js +1 -0
- package/assets/esri/core/workers/chunks/5e4dde2886a1027b4b96.js +1 -0
- package/assets/esri/core/workers/chunks/730eb7e5f617fdab4f10.js +1 -0
- package/assets/esri/core/workers/chunks/{5a2e6bed9431cf4f42b1.js → 740dc67038f554431f1b.js} +1 -1
- package/assets/esri/core/workers/chunks/{09178454bda15bb7929a.js → 7fbdfd1527582c52f9b6.js} +1 -1
- package/assets/esri/core/workers/chunks/{1c026947505a9ff94a53.js → 807742f38885fa90b4fe.js} +1 -1
- package/assets/esri/core/workers/chunks/82dfbc175b52c7a10475.js +1 -0
- package/assets/esri/core/workers/chunks/870a05451e074b58f19a.js +1 -0
- package/assets/esri/core/workers/chunks/8c5a8c1dfb086069bb06.js +1 -0
- package/assets/esri/core/workers/chunks/99a5a434e0bad48c7a5c.js +1 -0
- package/assets/esri/core/workers/chunks/9a5916c66dad91d01d5b.js +1 -0
- package/assets/esri/core/workers/chunks/9c133fd8c1fbd0295b86.js +1 -0
- package/assets/esri/core/workers/chunks/9cddb504079d396779ea.js +1 -0
- package/assets/esri/core/workers/chunks/a3a1d4f32e518e97d071.js +1 -0
- package/assets/esri/core/workers/chunks/{9548aa449fe3a300c015.js → a4fa40dc77e116c954ac.js} +1 -1
- package/assets/esri/core/workers/chunks/a54ec9929a7db879d5db.js +1 -0
- package/assets/esri/core/workers/chunks/afc5b84693757fda2bc8.js +1 -0
- package/assets/esri/core/workers/chunks/{591b5c277cfd3a4101a4.js → b08f2a4aa94087c6c367.js} +1 -1
- package/assets/esri/core/workers/chunks/c0e12f6a7bb2360e4c21.js +1 -0
- package/assets/esri/core/workers/chunks/c8e656cd470a17f538e9.js +1 -0
- package/assets/esri/core/workers/chunks/d0e203405f95e14b1399.js +1 -0
- package/assets/esri/core/workers/chunks/{ec72f492f24e67e008ae.js → d8e58dc14d3495f0830c.js} +1 -1
- package/assets/esri/core/workers/chunks/ddc393a012588f799f42.js +1 -0
- package/assets/esri/core/workers/chunks/de3baa85b1639c25458d.js +1 -0
- package/assets/esri/core/workers/chunks/e66cea26064ba8353af0.js +1 -0
- package/assets/esri/core/workers/chunks/ea478f2f4a19463e13fd.js +1 -0
- package/assets/esri/core/workers/chunks/eba197e45507f56f3ed0.js +1 -0
- package/assets/esri/core/workers/chunks/ebd006fcd568a7731115.js +1 -0
- package/assets/esri/core/workers/chunks/ef9a9a7d66d818720e20.js +1 -0
- package/assets/esri/core/workers/chunks/f3b458f55236566c940b.js +1 -0
- package/assets/esri/core/workers/chunks/fd0a91b9e0216cc269c3.js +1 -0
- package/assets/esri/core/workers/chunks/{a4fe220a912b1f428e49.js → fdd6403a8390d629392b.js} +1 -1
- package/assets/esri/themes/base/widgets/_Directions.scss +13 -7
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/array.js +1 -1
- package/core/Collection.js +1 -1
- package/core/accessorSupport/decorators/subclass.js +1 -1
- package/core/accessorSupport/ensureType.js +1 -1
- package/core/accessorSupport/get.js +1 -1
- package/core/accessorSupport/tracking.js +1 -1
- package/core/accessorSupport/utils.js +1 -1
- package/core/libs/rbush/PooledRBush.js +1 -1
- package/core/urlUtils.js +1 -1
- package/geometry/GeometryCursor.js +1 -1
- package/geometry/support/TileClipper.js +1 -1
- package/geometry/support/geodesicUtils.js +1 -1
- package/interfaces.d.ts +7 -1
- package/layers/LinkChartLayer.js +1 -1
- package/layers/VectorTileLayer.js +1 -1
- package/layers/VoxelLayer.js +1 -1
- package/layers/WCSLayer.js +1 -1
- package/layers/effects/EffectView.js +1 -1
- package/layers/graphics/sources/geojson/geojson.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
- package/layers/mixins/ArcGISCachedService.js +1 -1
- package/layers/support/ElevationQuery.js +1 -1
- package/layers/support/MultidimensionalSubset.js +1 -1
- package/layers/support/TileInfo.js +1 -1
- package/layers/support/TileInfoTilemapCache.js +1 -1
- package/layers/support/TilemapCache.js +1 -1
- package/layers/support/rasterDatasets/multidimensionalUtils.js +1 -1
- package/layers/support/rasterDatasets/pamParser.js +1 -1
- package/layers/support/rasterDatasets/wcsCoverageParser.js +1 -1
- package/layers/support/rasterFormats/Raw.js +1 -1
- package/layers/support/rasterFormats/TiffDecoder.js +1 -1
- package/layers/support/rasterFunctions/ExtractBandFunction.js +1 -1
- package/layers/support/rasterFunctions/colormaps.js +1 -1
- package/layers/support/rasterFunctions/pixelUtils.js +1 -1
- package/layers/support/rasterFunctions/rasterProjectionHelper.js +1 -1
- package/layers/video/VideoController.js +1 -1
- package/layers/voxel/VoxelDimension.js +1 -1
- package/layers/voxel/VoxelTransferFunctionStyle.js +1 -1
- package/layers/voxel/VoxelVolume.js +1 -1
- package/package.json +1 -1
- package/renderers/support/RasterSymbolizer.js +1 -1
- package/renderers/support/colorRampUtils.js +1 -1
- package/renderers/visualVariables/support/visualVariableUtils.js +1 -1
- package/rest/query/operations/pbfDehydratedFeatureSet.js +1 -1
- package/rest/query/operations/pbfJSONFeatureSet.js +1 -1
- package/rest/support/generateRendererUtils.js +1 -1
- package/smartMapping/raster/renderers/classBreaks.js +1 -1
- package/smartMapping/renderers/color.js +1 -1
- package/smartMapping/renderers/support/utils.js +1 -1
- package/smartMapping/renderers/type.js +1 -1
- package/smartMapping/renderers/univariateColorSize.js +1 -1
- package/smartMapping/support/adapters/support/utils.js +1 -1
- package/statistics/utils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
- package/symbols/cim/GeometryWalker.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/symbols/cim/effects/EffectArrow.js +1 -1
- package/symbols/cim/effects/EffectControlMeasureLine.js +1 -1
- package/symbols/support/symbolUtils.js +1 -1
- package/views/2d/constraints/ZoomConstraint.js +1 -1
- package/views/2d/engine/flow/dataUtils.js +1 -1
- package/views/2d/engine/flow/utils.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTile.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
- package/views/2d/engine/vectorTiles/expression/expression.js +1 -1
- package/views/2d/engine/vectorTiles/style/VectorTileSource.js +1 -1
- package/views/2d/engine/vectorTiles/tileInfoUtils.js +1 -1
- package/views/2d/engine/webgl/TurboLine.js +1 -1
- package/views/2d/engine/webgl/mesh/MeshData.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
- package/views/2d/interactive/editingTools/ControlPointsTransformTool.js +1 -1
- package/views/2d/interactive/editingTools/draw/DrawGraphicTool2D.js +1 -1
- package/views/2d/layers/BaseLayerView2D.js +1 -1
- package/views/2d/layers/BaseLayerViewGL2D.js +1 -1
- package/views/2d/layers/BitmapTileLayerView2D.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/VectorTileLayerView2D.js +1 -1
- package/views/2d/layers/WMTSLayerView2D.js +1 -1
- package/views/2d/layers/features/support/rendererUtils.js +1 -1
- package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
- package/views/2d/layers/support/vectorTileDebugUtils.js +5 -0
- package/views/2d/tiling/TileInfoView.js +1 -1
- package/views/2d/tiling/TileInfoViewPOT.js +1 -1
- package/views/2d/tiling/TileQueue.js +1 -1
- package/views/2d/tiling.js +1 -1
- package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
- package/views/3d/environment/ChapmanAtmosphere.js +1 -1
- package/views/3d/interactive/editingTools/moveGraphic/GraphicMoveTool.js +1 -1
- package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
- package/views/3d/layers/TiledLayerView3D.js +1 -1
- package/views/3d/layers/VectorTileLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
- package/views/3d/layers/support/featureReference.js +1 -1
- package/views/3d/support/LaserLineRenderer.js +1 -1
- package/views/3d/terrain/Overlay.js +1 -1
- package/views/3d/terrain/OverlayFramebufferObject.js +1 -1
- package/views/3d/terrain/OverlayRenderTarget.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TileCompositor.js +1 -1
- package/views/3d/terrain/TileRenderer.js +1 -1
- package/views/3d/terrain/TilingScheme.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentData.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/interfaces.js +1 -1
- package/views/3d/webgl-engine/effects/ScreenSpaceGeometry.js +1 -1
- package/views/3d/webgl-engine/effects/SmaaRenderPass.js +1 -1
- package/views/3d/webgl-engine/lib/CompositingHelper.js +1 -1
- package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
- package/views/3d/webgl-engine/lib/PathBuilder.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
- package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/WebGLLayer.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/parts/requireUtils.js +1 -1
- package/views/MapView.js +1 -1
- package/views/animation/pointToPoint/Path.js +1 -1
- package/views/draw/DrawOperation.js +1 -1
- package/views/draw/support/Reshape.js +1 -1
- package/views/draw/support/createUtils.js +1 -1
- package/views/interactive/SegmentLabels.js +1 -1
- package/views/interactive/editGeometry/EditGeometry.js +1 -1
- package/views/interactive/editGeometry/EditGeometryOperations.js +1 -1
- package/views/interactive/editGeometry/operations/UndoGroup.js +1 -1
- package/views/layers/GroupLayerView.js +1 -1
- package/views/webgl/ProgramCache.js +1 -1
- package/webscene/spec-certification/api.js +1 -1
- package/webscene/spec-certification/spec.js +1 -1
- package/webscene/spec-certification/utils.js +1 -1
- package/widgets/BuildingExplorer/BuildingNumericFilterViewModel.js +1 -1
- package/widgets/BuildingExplorer/BuildingPhase.js +1 -1
- package/widgets/BuildingExplorer/support/validation.js +1 -1
- package/widgets/Directions/support/resources.js +1 -1
- package/widgets/Directions.js +1 -1
- package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureForm/FieldInput.js +1 -1
- package/widgets/FeatureForm/FormExpressionsManager.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/Features.js +1 -1
- package/widgets/Histogram/HistogramViewModel.js +1 -1
- package/widgets/HistogramRangeSlider/HistogramRangeSliderViewModel.js +1 -1
- package/widgets/Legend/styles/Card.js +1 -1
- package/widgets/Legend/styles/support/univariateUtils.js +1 -1
- package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
- package/widgets/Legend/support/colorRampUtils.js +1 -1
- package/widgets/Legend/support/sizeRampUtils.js +1 -1
- package/widgets/Legend/support/utils.js +1 -1
- package/widgets/Popup.js +1 -1
- package/widgets/ScaleRangeSlider/ScaleRangeSliderViewModel.js +1 -1
- package/widgets/ScaleRangeSlider/ScaleRanges.js +1 -1
- package/widgets/ValuePicker/ValuePickerSlider.js +1 -1
- package/widgets/smartMapping/ClassedSizeSlider.js +1 -1
- package/widgets/smartMapping/ColorSizeSlider.js +1 -1
- package/widgets/smartMapping/HeatmapSlider/HeatmapSliderViewModel.js +1 -1
- package/widgets/smartMapping/SizeSlider.js +1 -1
- package/widgets/smartMapping/SmartMappingPrimaryHandleSliderViewModel.js +1 -1
- package/widgets/smartMapping/SmartMappingSliderViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/0210f4c2e1f3ed13041b.js +0 -1
- package/assets/esri/core/workers/chunks/07bb40162d97d098bc19.js +0 -1
- package/assets/esri/core/workers/chunks/0a18317566c1fcb68422.js +0 -1
- package/assets/esri/core/workers/chunks/0de65e03db8c611af9fb.js +0 -1
- package/assets/esri/core/workers/chunks/1a60d23a92bcf91dbb22.js +0 -1
- package/assets/esri/core/workers/chunks/205a0b34b698d5329854.js +0 -1
- package/assets/esri/core/workers/chunks/25211d5904ee9d5f4a9d.js +0 -1
- package/assets/esri/core/workers/chunks/26b12d1ea713c1e07701.js +0 -1
- package/assets/esri/core/workers/chunks/2bfa7ee324c32a56b0d3.js +0 -1
- package/assets/esri/core/workers/chunks/4510a17839405146130b.js +0 -1
- package/assets/esri/core/workers/chunks/524156c3f5383c2dd0e3.js +0 -1
- package/assets/esri/core/workers/chunks/59666ecb7c2c1f5a13b2.js +0 -1
- package/assets/esri/core/workers/chunks/5c005c9514354c77ec27.js +0 -1
- package/assets/esri/core/workers/chunks/620ec5c75561183d3d73.js +0 -1
- package/assets/esri/core/workers/chunks/68512670816f59c0e6a5.js +0 -1
- package/assets/esri/core/workers/chunks/6c7374ebc18b46b3480a.js +0 -1
- package/assets/esri/core/workers/chunks/75ba2af92da232067adb.js +0 -1
- package/assets/esri/core/workers/chunks/7c1f0598a016516dcec3.js +0 -1
- package/assets/esri/core/workers/chunks/8dcec8d1b670d2b7ea2b.js +0 -1
- package/assets/esri/core/workers/chunks/8e07dfb6fc2673b640cb.js +0 -1
- package/assets/esri/core/workers/chunks/9050b167355588b7003d.js +0 -1
- package/assets/esri/core/workers/chunks/9230d68799f0b0b9ef36.js +0 -1
- package/assets/esri/core/workers/chunks/af4083f2aad5f5d49dde.js +0 -1
- package/assets/esri/core/workers/chunks/b0a57718a0765d1c8df0.js +0 -1
- package/assets/esri/core/workers/chunks/b431b81a7bf45dd527da.js +0 -1
- package/assets/esri/core/workers/chunks/bda311ad48efdb265939.js +0 -1
- package/assets/esri/core/workers/chunks/d5cce09fbe16cbb8fee4.js +0 -1
- package/assets/esri/core/workers/chunks/da547c3cabe4a89c3ce6.js +0 -1
- package/assets/esri/core/workers/chunks/dd295fa57b45b7ec4ec5.js +0 -1
- package/assets/esri/core/workers/chunks/f553b464e969d45bf451.js +0 -1
- package/assets/esri/core/workers/chunks/f5865294983eb160de8c.js +0 -1
- package/assets/esri/core/workers/chunks/fdb7b1fbdb6fe091ad83.js +0 -1
- package/views/2d/tiling/PagedTileQueue.js +0 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7096,5732,9880],{99880:(t,e,s)=>{s.d(e,{V:()=>l});var i=s(68773),n=(s(3172),s(20102)),r=s(92604),o=s(17452);const a=r.Z.getLogger("esri.assets");function l(t){if(!i.default.assetsPath)throw a.errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new n.Z("assets:path-not-set","config.assetsPath is not set");return(0,o.v_)(i.default.assetsPath,t)}},5732:(t,e,s)=>{s.d(e,{c:()=>i,g:()=>n});var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}},52138:(t,e,s)=>{s.d(e,{A:()=>p,a:()=>l,d:()=>m,e:()=>d,f:()=>f,g:()=>y,h:()=>x,i:()=>o,j:()=>v,k:()=>u,m:()=>h,s:()=>r,t:()=>a,w:()=>c,y:()=>S,z:()=>M});var i=s(65617),n=s(46851);function r(t,e,s,i,n,r,o,a,l,h,c,u,d,f,m,p,_){return t[0]=e,t[1]=s,t[2]=i,t[3]=n,t[4]=r,t[5]=o,t[6]=a,t[7]=l,t[8]=h,t[9]=c,t[10]=u,t[11]=d,t[12]=f,t[13]=m,t[14]=p,t[15]=_,t}function o(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function a(t,e){if(t===e){const s=e[1],i=e[2],n=e[3],r=e[6],o=e[7],a=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=s,t[6]=e[9],t[7]=e[13],t[8]=i,t[9]=r,t[11]=e[14],t[12]=n,t[13]=o,t[14]=a}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function l(t,e){const s=e[0],i=e[1],n=e[2],r=e[3],o=e[4],a=e[5],l=e[6],h=e[7],c=e[8],u=e[9],d=e[10],f=e[11],m=e[12],p=e[13],_=e[14],g=e[15],y=s*a-i*o,b=s*l-n*o,x=s*h-r*o,v=i*l-n*a,M=i*h-r*a,S=n*h-r*l,w=c*p-u*m,I=c*_-d*m,E=c*g-f*m,B=u*_-d*p,A=u*g-f*p,C=d*g-f*_;let z=y*C-b*A+x*B+v*E-M*I+S*w;return z?(z=1/z,t[0]=(a*C-l*A+h*B)*z,t[1]=(n*A-i*C-r*B)*z,t[2]=(p*S-_*M+g*v)*z,t[3]=(d*M-u*S-f*v)*z,t[4]=(l*E-o*C-h*I)*z,t[5]=(s*C-n*E+r*I)*z,t[6]=(_*x-m*S-g*b)*z,t[7]=(c*S-d*x+f*b)*z,t[8]=(o*A-a*E+h*w)*z,t[9]=(i*E-s*A-r*w)*z,t[10]=(m*M-p*x+g*y)*z,t[11]=(u*x-c*M-f*y)*z,t[12]=(a*I-o*B-l*w)*z,t[13]=(s*B-i*I+n*w)*z,t[14]=(p*b-m*v-_*y)*z,t[15]=(c*v-u*b+d*y)*z,t):null}function h(t,e,s){const i=e[0],n=e[1],r=e[2],o=e[3],a=e[4],l=e[5],h=e[6],c=e[7],u=e[8],d=e[9],f=e[10],m=e[11],p=e[12],_=e[13],g=e[14],y=e[15];let b=s[0],x=s[1],v=s[2],M=s[3];return t[0]=b*i+x*a+v*u+M*p,t[1]=b*n+x*l+v*d+M*_,t[2]=b*r+x*h+v*f+M*g,t[3]=b*o+x*c+v*m+M*y,b=s[4],x=s[5],v=s[6],M=s[7],t[4]=b*i+x*a+v*u+M*p,t[5]=b*n+x*l+v*d+M*_,t[6]=b*r+x*h+v*f+M*g,t[7]=b*o+x*c+v*m+M*y,b=s[8],x=s[9],v=s[10],M=s[11],t[8]=b*i+x*a+v*u+M*p,t[9]=b*n+x*l+v*d+M*_,t[10]=b*r+x*h+v*f+M*g,t[11]=b*o+x*c+v*m+M*y,b=s[12],x=s[13],v=s[14],M=s[15],t[12]=b*i+x*a+v*u+M*p,t[13]=b*n+x*l+v*d+M*_,t[14]=b*r+x*h+v*f+M*g,t[15]=b*o+x*c+v*m+M*y,t}function c(t,e,s){const i=s[0],n=s[1],r=s[2];if(e===t)t[12]=e[0]*i+e[4]*n+e[8]*r+e[12],t[13]=e[1]*i+e[5]*n+e[9]*r+e[13],t[14]=e[2]*i+e[6]*n+e[10]*r+e[14],t[15]=e[3]*i+e[7]*n+e[11]*r+e[15];else{const s=e[0],o=e[1],a=e[2],l=e[3],h=e[4],c=e[5],u=e[6],d=e[7],f=e[8],m=e[9],p=e[10],_=e[11];t[0]=s,t[1]=o,t[2]=a,t[3]=l,t[4]=h,t[5]=c,t[6]=u,t[7]=d,t[8]=f,t[9]=m,t[10]=p,t[11]=_,t[12]=s*i+h*n+f*r+e[12],t[13]=o*i+c*n+m*r+e[13],t[14]=a*i+u*n+p*r+e[14],t[15]=l*i+d*n+_*r+e[15]}return t}function u(t,e,s){const i=s[0],n=s[1],r=s[2];return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t[3]=e[3]*i,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*r,t[9]=e[9]*r,t[10]=e[10]*r,t[11]=e[11]*r,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function d(t,e,s,i){let r,o,a,l,h,c,u,d,f,m,p,_,g,y,b,x,v,M,S,w,I,E,B,A,C=i[0],z=i[1],F=i[2],O=Math.sqrt(C*C+z*z+F*F);return O<(0,n.g)()?null:(O=1/O,C*=O,z*=O,F*=O,r=Math.sin(s),o=Math.cos(s),a=1-o,l=e[0],h=e[1],c=e[2],u=e[3],d=e[4],f=e[5],m=e[6],p=e[7],_=e[8],g=e[9],y=e[10],b=e[11],x=C*C*a+o,v=z*C*a+F*r,M=F*C*a-z*r,S=C*z*a-F*r,w=z*z*a+o,I=F*z*a+C*r,E=C*F*a+z*r,B=z*F*a-C*r,A=F*F*a+o,t[0]=l*x+d*v+_*M,t[1]=h*x+f*v+g*M,t[2]=c*x+m*v+y*M,t[3]=u*x+p*v+b*M,t[4]=l*S+d*w+_*I,t[5]=h*S+f*w+g*I,t[6]=c*S+m*w+y*I,t[7]=u*S+p*w+b*I,t[8]=l*E+d*B+_*A,t[9]=h*E+f*B+g*A,t[10]=c*E+m*B+y*A,t[11]=u*E+p*B+b*A,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function f(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function m(t,e,s){if(0===e)return o(t);let i,r,a,l=s[0],h=s[1],c=s[2],u=Math.sqrt(l*l+h*h+c*c);return u<(0,n.g)()?null:(u=1/u,l*=u,h*=u,c*=u,i=Math.sin(e),r=Math.cos(e),a=1-r,t[0]=l*l*a+r,t[1]=h*l*a+c*i,t[2]=c*l*a-h*i,t[3]=0,t[4]=l*h*a-c*i,t[5]=h*h*a+r,t[6]=c*h*a+l*i,t[7]=0,t[8]=l*c*a+h*i,t[9]=h*c*a-l*i,t[10]=c*c*a+r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function p(t,e){const s=Math.sin(e),i=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=i,t[6]=s,t[7]=0,t[8]=0,t[9]=-s,t[10]=i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function _(t,e,s){const i=e[0],n=e[1],r=e[2],o=e[3],a=i+i,l=n+n,h=r+r,c=i*a,u=i*l,d=i*h,f=n*l,m=n*h,p=r*h,_=o*a,g=o*l,y=o*h;return t[0]=1-(f+p),t[1]=u+y,t[2]=d-g,t[3]=0,t[4]=u-y,t[5]=1-(c+p),t[6]=m+_,t[7]=0,t[8]=d+g,t[9]=m-_,t[10]=1-(c+f),t[11]=0,t[12]=s[0],t[13]=s[1],t[14]=s[2],t[15]=1,t}const g=(0,i.c)();function y(t,e,s,i){const n=e[0],r=e[1],o=e[2],a=e[3],l=n+n,h=r+r,c=o+o,u=n*l,d=n*h,f=n*c,m=r*h,p=r*c,_=o*c,g=a*l,y=a*h,b=a*c,x=i[0],v=i[1],M=i[2];return t[0]=(1-(m+_))*x,t[1]=(d+b)*x,t[2]=(f-y)*x,t[3]=0,t[4]=(d-b)*v,t[5]=(1-(u+_))*v,t[6]=(p+g)*v,t[7]=0,t[8]=(f+y)*M,t[9]=(p-g)*M,t[10]=(1-(u+m))*M,t[11]=0,t[12]=s[0],t[13]=s[1],t[14]=s[2],t[15]=1,t}function b(t,e,s){return t[0]=e[0]-s[0],t[1]=e[1]-s[1],t[2]=e[2]-s[2],t[3]=e[3]-s[3],t[4]=e[4]-s[4],t[5]=e[5]-s[5],t[6]=e[6]-s[6],t[7]=e[7]-s[7],t[8]=e[8]-s[8],t[9]=e[9]-s[9],t[10]=e[10]-s[10],t[11]=e[11]-s[11],t[12]=e[12]-s[12],t[13]=e[13]-s[13],t[14]=e[14]-s[14],t[15]=e[15]-s[15],t}function x(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]}function v(t,e){if(t===e)return!0;const s=t[0],i=t[1],r=t[2],o=t[3],a=t[4],l=t[5],h=t[6],c=t[7],u=t[8],d=t[9],f=t[10],m=t[11],p=t[12],_=t[13],g=t[14],y=t[15],b=e[0],x=e[1],v=e[2],M=e[3],S=e[4],w=e[5],I=e[6],E=e[7],B=e[8],A=e[9],C=e[10],z=e[11],F=e[12],O=e[13],N=e[14],R=e[15],Z=(0,n.g)();return Math.abs(s-b)<=Z*Math.max(1,Math.abs(s),Math.abs(b))&&Math.abs(i-x)<=Z*Math.max(1,Math.abs(i),Math.abs(x))&&Math.abs(r-v)<=Z*Math.max(1,Math.abs(r),Math.abs(v))&&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-w)<=Z*Math.max(1,Math.abs(l),Math.abs(w))&&Math.abs(h-I)<=Z*Math.max(1,Math.abs(h),Math.abs(I))&&Math.abs(c-E)<=Z*Math.max(1,Math.abs(c),Math.abs(E))&&Math.abs(u-B)<=Z*Math.max(1,Math.abs(u),Math.abs(B))&&Math.abs(d-A)<=Z*Math.max(1,Math.abs(d),Math.abs(A))&&Math.abs(f-C)<=Z*Math.max(1,Math.abs(f),Math.abs(C))&&Math.abs(m-z)<=Z*Math.max(1,Math.abs(m),Math.abs(z))&&Math.abs(p-F)<=Z*Math.max(1,Math.abs(p),Math.abs(F))&&Math.abs(_-O)<=Z*Math.max(1,Math.abs(_),Math.abs(O))&&Math.abs(g-N)<=Z*Math.max(1,Math.abs(g),Math.abs(N))&&Math.abs(y-R)<=Z*Math.max(1,Math.abs(y),Math.abs(R))}function M(t){const e=(0,n.g)(),s=t[0],i=t[1],r=t[2],o=t[4],a=t[5],l=t[6],h=t[8],c=t[9],u=t[10];return Math.abs(1-(s*s+o*o+h*h))<=e&&Math.abs(1-(i*i+a*a+c*c))<=e&&Math.abs(1-(r*r+l*l+u*u))<=e}function S(t){return 1===t[0]&&0===t[1]&&0===t[2]&&0===t[4]&&1===t[5]&&0===t[6]&&0===t[8]&&0===t[9]&&1===t[10]}const w=h,I=b;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,s){return t[0]=e[0]+s[0],t[1]=e[1]+s[1],t[2]=e[2]+s[2],t[3]=e[3]+s[3],t[4]=e[4]+s[4],t[5]=e[5]+s[5],t[6]=e[6]+s[6],t[7]=e[7]+s[7],t[8]=e[8]+s[8],t[9]=e[9]+s[9],t[10]=e[10]+s[10],t[11]=e[11]+s[11],t[12]=e[12]+s[12],t[13]=e[13]+s[13],t[14]=e[14]+s[14],t[15]=e[15]+s[15],t},adjoint:function(t,e){const s=e[0],i=e[1],n=e[2],r=e[3],o=e[4],a=e[5],l=e[6],h=e[7],c=e[8],u=e[9],d=e[10],f=e[11],m=e[12],p=e[13],_=e[14],g=e[15];return t[0]=a*(d*g-f*_)-u*(l*g-h*_)+p*(l*f-h*d),t[1]=-(i*(d*g-f*_)-u*(n*g-r*_)+p*(n*f-r*d)),t[2]=i*(l*g-h*_)-a*(n*g-r*_)+p*(n*h-r*l),t[3]=-(i*(l*f-h*d)-a*(n*f-r*d)+u*(n*h-r*l)),t[4]=-(o*(d*g-f*_)-c*(l*g-h*_)+m*(l*f-h*d)),t[5]=s*(d*g-f*_)-c*(n*g-r*_)+m*(n*f-r*d),t[6]=-(s*(l*g-h*_)-o*(n*g-r*_)+m*(n*h-r*l)),t[7]=s*(l*f-h*d)-o*(n*f-r*d)+c*(n*h-r*l),t[8]=o*(u*g-f*p)-c*(a*g-h*p)+m*(a*f-h*u),t[9]=-(s*(u*g-f*p)-c*(i*g-r*p)+m*(i*f-r*u)),t[10]=s*(a*g-h*p)-o*(i*g-r*p)+m*(i*h-r*a),t[11]=-(s*(a*f-h*u)-o*(i*f-r*u)+c*(i*h-r*a)),t[12]=-(o*(u*_-d*p)-c*(a*_-l*p)+m*(a*d-l*u)),t[13]=s*(u*_-d*p)-c*(i*_-n*p)+m*(i*d-n*u),t[14]=-(s*(a*_-l*p)-o*(i*_-n*p)+m*(i*l-n*a)),t[15]=s*(a*d-l*u)-o*(i*d-n*u)+c*(i*l-n*a),t},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},determinant:function(t){const e=t[0],s=t[1],i=t[2],n=t[3],r=t[4],o=t[5],a=t[6],l=t[7],h=t[8],c=t[9],u=t[10],d=t[11],f=t[12],m=t[13],p=t[14],_=t[15];return(e*o-s*r)*(u*_-d*p)-(e*a-i*r)*(c*_-d*m)+(e*l-n*r)*(c*p-u*m)+(s*a-i*o)*(h*_-d*f)-(s*l-n*o)*(h*p-u*f)+(i*l-n*a)*(h*m-c*f)},equals:v,exactEquals:x,frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2+t[9]**2+t[10]**2+t[11]**2+t[12]**2+t[13]**2+t[14]**2+t[15]**2)},fromQuat:function(t,e){const s=e[0],i=e[1],n=e[2],r=e[3],o=s+s,a=i+i,l=n+n,h=s*o,c=i*o,u=i*a,d=n*o,f=n*a,m=n*l,p=r*o,_=r*a,g=r*l;return t[0]=1-u-m,t[1]=c+g,t[2]=d-_,t[3]=0,t[4]=c-g,t[5]=1-h-m,t[6]=f+p,t[7]=0,t[8]=d+_,t[9]=f-p,t[10]=1-h-u,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromQuat2:function(t,e){const s=g,i=-e[0],n=-e[1],r=-e[2],o=e[3],a=e[4],l=e[5],h=e[6],c=e[7],u=i*i+n*n+r*r+o*o;return u>0?(s[0]=2*(a*o+c*i+l*r-h*n)/u,s[1]=2*(l*o+c*n+h*i-a*r)/u,s[2]=2*(h*o+c*r+a*n-l*i)/u):(s[0]=2*(a*o+c*i+l*r-h*n),s[1]=2*(l*o+c*n+h*i-a*r),s[2]=2*(h*o+c*r+a*n-l*i)),_(t,e,s),t},fromRotation:m,fromRotationTranslation:_,fromRotationTranslationScale:y,fromRotationTranslationScaleOrigin:function(t,e,s,i,n){const r=e[0],o=e[1],a=e[2],l=e[3],h=r+r,c=o+o,u=a+a,d=r*h,f=r*c,m=r*u,p=o*c,_=o*u,g=a*u,y=l*h,b=l*c,x=l*u,v=i[0],M=i[1],S=i[2],w=n[0],I=n[1],E=n[2],B=(1-(p+g))*v,A=(f+x)*v,C=(m-b)*v,z=(f-x)*M,F=(1-(d+g))*M,O=(_+y)*M,N=(m+b)*S,R=(_-y)*S,Z=(1-(d+p))*S;return t[0]=B,t[1]=A,t[2]=C,t[3]=0,t[4]=z,t[5]=F,t[6]=O,t[7]=0,t[8]=N,t[9]=R,t[10]=Z,t[11]=0,t[12]=s[0]+w-(B*w+z*I+N*E),t[13]=s[1]+I-(A*w+F*I+R*E),t[14]=s[2]+E-(C*w+O*I+Z*E),t[15]=1,t},fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromTranslation:f,fromXRotation:p,fromYRotation:function(t,e){const s=Math.sin(e),i=Math.cos(e);return t[0]=i,t[1]=0,t[2]=-s,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=s,t[9]=0,t[10]=i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:function(t,e){const s=Math.sin(e),i=Math.cos(e);return t[0]=i,t[1]=s,t[2]=0,t[3]=0,t[4]=-s,t[5]=i,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},frustum:function(t,e,s,i,n,r,o){const a=1/(s-e),l=1/(n-i),h=1/(r-o);return t[0]=2*r*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*r*l,t[6]=0,t[7]=0,t[8]=(s+e)*a,t[9]=(n+i)*l,t[10]=(o+r)*h,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*r*2*h,t[15]=0,t},getRotation:function(t,e){const s=e[0]+e[5]+e[10];let i=0;return s>0?(i=2*Math.sqrt(s+1),t[3]=.25*i,t[0]=(e[6]-e[9])/i,t[1]=(e[8]-e[2])/i,t[2]=(e[1]-e[4])/i):e[0]>e[5]&&e[0]>e[10]?(i=2*Math.sqrt(1+e[0]-e[5]-e[10]),t[3]=(e[6]-e[9])/i,t[0]=.25*i,t[1]=(e[1]+e[4])/i,t[2]=(e[8]+e[2])/i):e[5]>e[10]?(i=2*Math.sqrt(1+e[5]-e[0]-e[10]),t[3]=(e[8]-e[2])/i,t[0]=(e[1]+e[4])/i,t[1]=.25*i,t[2]=(e[6]+e[9])/i):(i=2*Math.sqrt(1+e[10]-e[0]-e[5]),t[3]=(e[1]-e[4])/i,t[0]=(e[8]+e[2])/i,t[1]=(e[6]+e[9])/i,t[2]=.25*i),t},getScaling:function(t,e){const s=e[0],i=e[1],n=e[2],r=e[4],o=e[5],a=e[6],l=e[8],h=e[9],c=e[10];return t[0]=Math.sqrt(s*s+i*i+n*n),t[1]=Math.sqrt(r*r+o*o+a*a),t[2]=Math.sqrt(l*l+h*h+c*c),t},getTranslation:function(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t},hasIdentityRotation:S,identity:o,invert:l,invertOrIdentity:function(t,e){return l(t,e)||o(t),t},isOrthoNormal:M,lookAt:function(t,e,s,i){const r=e[0],a=e[1],l=e[2];let h=r-s[0],c=a-s[1],u=l-s[2];const d=(0,n.g)();if(Math.abs(h)<d&&Math.abs(c)<d&&Math.abs(u)<d)return void o(t);let f=1/Math.sqrt(h*h+c*c+u*u);h*=f,c*=f,u*=f;const m=i[0],p=i[1],_=i[2];let g=p*u-_*c,y=_*h-m*u,b=m*c-p*h;f=Math.sqrt(g*g+y*y+b*b),f?(f=1/f,g*=f,y*=f,b*=f):(g=0,y=0,b=0);let x=c*b-u*y,v=u*g-h*b,M=h*y-c*g;f=Math.sqrt(x*x+v*v+M*M),f?(f=1/f,x*=f,v*=f,M*=f):(x=0,v=0,M=0),t[0]=g,t[1]=x,t[2]=h,t[3]=0,t[4]=y,t[5]=v,t[6]=c,t[7]=0,t[8]=b,t[9]=M,t[10]=u,t[11]=0,t[12]=-(g*r+y*a+b*l),t[13]=-(x*r+v*a+M*l),t[14]=-(h*r+c*a+u*l),t[15]=1},mul:w,multiply:h,multiplyScalar:function(t,e,s){return t[0]=e[0]*s,t[1]=e[1]*s,t[2]=e[2]*s,t[3]=e[3]*s,t[4]=e[4]*s,t[5]=e[5]*s,t[6]=e[6]*s,t[7]=e[7]*s,t[8]=e[8]*s,t[9]=e[9]*s,t[10]=e[10]*s,t[11]=e[11]*s,t[12]=e[12]*s,t[13]=e[13]*s,t[14]=e[14]*s,t[15]=e[15]*s,t},multiplyScalarAndAdd:function(t,e,s,i){return t[0]=e[0]+s[0]*i,t[1]=e[1]+s[1]*i,t[2]=e[2]+s[2]*i,t[3]=e[3]+s[3]*i,t[4]=e[4]+s[4]*i,t[5]=e[5]+s[5]*i,t[6]=e[6]+s[6]*i,t[7]=e[7]+s[7]*i,t[8]=e[8]+s[8]*i,t[9]=e[9]+s[9]*i,t[10]=e[10]+s[10]*i,t[11]=e[11]+s[11]*i,t[12]=e[12]+s[12]*i,t[13]=e[13]+s[13]*i,t[14]=e[14]+s[14]*i,t[15]=e[15]+s[15]*i,t},ortho:function(t,e,s,i,n,r,o){const a=1/(e-s),l=1/(i-n),h=1/(r-o);return t[0]=-2*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*h,t[11]=0,t[12]=(e+s)*a,t[13]=(n+i)*l,t[14]=(o+r)*h,t[15]=1,t},perspective:function(t,e,s,i,n){const r=1/Math.tan(e/2);let o;return t[0]=r/s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=n&&n!==1/0?(o=1/(i-n),t[10]=(n+i)*o,t[14]=2*n*i*o):(t[10]=-1,t[14]=-2*i),t},perspectiveFromFieldOfView:function(t,e,s,i){const n=Math.tan(e.upDegrees*Math.PI/180),r=Math.tan(e.downDegrees*Math.PI/180),o=Math.tan(e.leftDegrees*Math.PI/180),a=Math.tan(e.rightDegrees*Math.PI/180),l=2/(o+a),h=2/(n+r);return t[0]=l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=h,t[6]=0,t[7]=0,t[8]=-(o-a)*l*.5,t[9]=(n-r)*h*.5,t[10]=i/(s-i),t[11]=-1,t[12]=0,t[13]=0,t[14]=i*s/(s-i),t[15]=0,t},rotate:d,rotateX:function(t,e,s){const i=Math.sin(s),n=Math.cos(s),r=e[4],o=e[5],a=e[6],l=e[7],h=e[8],c=e[9],u=e[10],d=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=r*n+h*i,t[5]=o*n+c*i,t[6]=a*n+u*i,t[7]=l*n+d*i,t[8]=h*n-r*i,t[9]=c*n-o*i,t[10]=u*n-a*i,t[11]=d*n-l*i,t},rotateY:function(t,e,s){const i=Math.sin(s),n=Math.cos(s),r=e[0],o=e[1],a=e[2],l=e[3],h=e[8],c=e[9],u=e[10],d=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=r*n-h*i,t[1]=o*n-c*i,t[2]=a*n-u*i,t[3]=l*n-d*i,t[8]=r*i+h*n,t[9]=o*i+c*n,t[10]=a*i+u*n,t[11]=l*i+d*n,t},rotateZ:function(t,e,s){const i=Math.sin(s),n=Math.cos(s),r=e[0],o=e[1],a=e[2],l=e[3],h=e[4],c=e[5],u=e[6],d=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=r*n+h*i,t[1]=o*n+c*i,t[2]=a*n+u*i,t[3]=l*n+d*i,t[4]=h*n-r*i,t[5]=c*n-o*i,t[6]=u*n-a*i,t[7]=d*n-l*i,t},scale:u,set:r,str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},sub:I,subtract:b,targetTo:function(t,e,s,i){const n=e[0],r=e[1],o=e[2],a=i[0],l=i[1],h=i[2];let c=n-s[0],u=r-s[1],d=o-s[2],f=c*c+u*u+d*d;f>0&&(f=1/Math.sqrt(f),c*=f,u*=f,d*=f);let m=l*d-h*u,p=h*c-a*d,_=a*u-l*c;return f=m*m+p*p+_*_,f>0&&(f=1/Math.sqrt(f),m*=f,p*=f,_*=f),t[0]=m,t[1]=p,t[2]=_,t[3]=0,t[4]=u*_-d*p,t[5]=d*m-c*_,t[6]=c*p-u*m,t[7]=0,t[8]=c,t[9]=u,t[10]=d,t[11]=0,t[12]=n,t[13]=r,t[14]=o,t[15]=1,t},translate:c,transpose:a},Symbol.toStringTag,{value:"Module"}))},46791:(t,e,s)=>{s.d(e,{Z:()=>z});var i,n=s(43697),r=s(3894),o=s(32448),a=s(50758),l=s(22974),h=s(71143);!function(t){t[t.ADD=1]="ADD",t[t.REMOVE=2]="REMOVE",t[t.MOVE=4]="MOVE"}(i||(i={}));var c,u=s(1654),d=s(75215),f=s(58971),m=s(5600),p=s(52421),_=s(52011),g=s(10661);class y{constructor(t,e,s,i,n){this.target=t,this.added=e,this.removed=s,this.start=i,this.deleteCount=n}}const b=new h.Z(class{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(t){this.defaultPrevented=!1,this.item=t}},void 0,(t=>{t.item=null,t.target=null,t.defaultPrevented=!1,t.cancellable=!1}));function x(t){return t?t instanceof C?t.toArray():t.length?Array.prototype.slice.apply(t):[]:[]}function v(t){if(t&&t.length)return t[0]}function M(t,e,s,i){const n=Math.min(t.length-s,e.length-i);let r=0;for(;r<n&&t[s+r]===e[i+r];)r++;return r}function S(t,e,s,i){e&&e.forEach(((e,n,r)=>{t.push(e),S(t,s.call(i,e,n,r),s,i)}))}const w=new Set,I=new Set,E=new Set,B=new Map;let A=0,C=c=class extends o.Z.EventedAccessor{static isCollection(t){return null!=t&&t instanceof c}constructor(t){super(t),this._chgListeners=[],this._notifications=null,this._timer=null,this._observable=new g.s,this.length=0,this._items=[],Object.defineProperty(this,"uid",{value:A++})}normalizeCtorArgs(t){return t?Array.isArray(t)||t instanceof c?{items:t}:t:{}}destroy(){this._removeAllRaw()}*[Symbol.iterator](){yield*this.items}get items(){return(0,f.it)(this._observable),this._items}set items(t){this._emitBeforeChanges(i.ADD)||(this._splice(0,this.length,x(t)),this._emitAfterChanges(i.ADD))}hasEventListener(t){return"change"===t?this._chgListeners.length>0:this._emitter.hasEventListener(t)}on(t,e){if("change"===t){const t=this._chgListeners,s={removed:!1,callback:e};return t.push(s),this._notifications&&this._notifications.push({listeners:t.slice(),items:this._items.slice(),changes:[]}),(0,a.kB)((()=>{s.removed=!0,t.splice(t.indexOf(s),1)}))}return this._emitter.on(t,e)}once(t,e){return this.on(t,e)}add(t,e){if((0,f.it)(this._observable),this._emitBeforeChanges(i.ADD))return this;const s=this.getNextIndex(e??null);return this._splice(s,0,[t]),this._emitAfterChanges(i.ADD),this}addMany(t,e=this._items.length){if((0,f.it)(this._observable),!t||!t.length)return this;if(this._emitBeforeChanges(i.ADD))return this;const s=this.getNextIndex(e);return this._splice(s,0,x(t)),this._emitAfterChanges(i.ADD),this}at(t){if((0,f.it)(this._observable),(t=Math.trunc(t)||0)<0&&(t+=this.length),!(t<0||t>=this.length))return this._items[t]}removeAll(){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return[];const t=this._removeAllRaw();return this._emitAfterChanges(i.REMOVE),t}_removeAllRaw(){return 0===this.length?[]:this._splice(0,this.length)||[]}clone(){return(0,f.it)(this._observable),this._createNewInstance({items:this._items.map(l.d9)})}concat(...t){(0,f.it)(this._observable);const e=t.map(x);return this._createNewInstance({items:this._items.concat(...e)})}drain(t,e){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const s=this._splice(0,this.length),n=s.length;for(let i=0;i<n;i++)t.call(e,s[i],i,s);this._emitAfterChanges(i.REMOVE)}every(t,e){return(0,f.it)(this._observable),this._items.every(t,e)}filter(t,e){let s;return(0,f.it)(this._observable),s=2===arguments.length?this._items.filter(t,e):this._items.filter(t),this._createNewInstance({items:s})}find(t,e){return(0,f.it)(this._observable),this._items.find(t,e)}findIndex(t,e){return(0,f.it)(this._observable),this._items.findIndex(t,e)}flatten(t,e){(0,f.it)(this._observable);const s=[];return S(s,this,t,e),new c(s)}forEach(t,e){return(0,f.it)(this._observable),this._items.forEach(t,e)}getItemAt(t){return(0,f.it)(this._observable),this._items[t]}getNextIndex(t){(0,f.it)(this._observable);const e=this.length;return(t=t??e)<0?t=0:t>e&&(t=e),t}includes(t,e=0){return(0,f.it)(this._observable),this._items.includes(t,e)}indexOf(t,e=0){return(0,f.it)(this._observable),this._items.indexOf(t,e)}join(t=","){return(0,f.it)(this._observable),this._items.join(t)}lastIndexOf(t,e=this.length-1){return(0,f.it)(this._observable),this._items.lastIndexOf(t,e)}map(t,e){(0,f.it)(this._observable);const s=this._items.map(t,e);return new c({items:s})}reorder(t,e=this.length-1){(0,f.it)(this._observable);const s=this.indexOf(t);if(-1!==s){if(e<0?e=0:e>=this.length&&(e=this.length-1),s!==e){if(this._emitBeforeChanges(i.MOVE))return t;this._splice(s,1),this._splice(e,0,[t]),this._emitAfterChanges(i.MOVE)}return t}}pop(){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const t=v(this._splice(this.length-1,1));return this._emitAfterChanges(i.REMOVE),t}push(...t){return(0,f.it)(this._observable),this._emitBeforeChanges(i.ADD)||(this._splice(this.length,0,t),this._emitAfterChanges(i.ADD)),this.length}reduce(t,e){(0,f.it)(this._observable);const s=this._items;return 2===arguments.length?s.reduce(t,e):s.reduce(t)}reduceRight(t,e){(0,f.it)(this._observable);const s=this._items;return 2===arguments.length?s.reduceRight(t,e):s.reduceRight(t)}remove(t){return(0,f.it)(this._observable),this.removeAt(this.indexOf(t))}removeAt(t){if((0,f.it)(this._observable),t<0||t>=this.length||this._emitBeforeChanges(i.REMOVE))return;const e=v(this._splice(t,1));return this._emitAfterChanges(i.REMOVE),e}removeMany(t){if((0,f.it)(this._observable),!t||!t.length||this._emitBeforeChanges(i.REMOVE))return[];const e=t instanceof c?t.toArray():t,s=this._items,n=[],r=e.length;for(let t=0;t<r;t++){const i=e[t],r=s.indexOf(i);if(r>-1){const i=1+M(e,s,t+1,r+1),o=this._splice(r,i);o&&o.length>0&&n.push.apply(n,o),t+=i-1}}return this._emitAfterChanges(i.REMOVE),n}reverse(){if((0,f.it)(this._observable),this._emitBeforeChanges(i.MOVE))return this;const t=this._splice(0,this.length);return t&&(t.reverse(),this._splice(0,0,t)),this._emitAfterChanges(i.MOVE),this}shift(){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const t=v(this._splice(0,1));return this._emitAfterChanges(i.REMOVE),t}slice(t=0,e=this.length){return(0,f.it)(this._observable),this._createNewInstance({items:this._items.slice(t,e)})}some(t,e){return(0,f.it)(this._observable),this._items.some(t,e)}sort(t){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(i.MOVE))return this;const e=this._splice(0,this.length);return arguments.length?e.sort(t):e.sort(),this._splice(0,0,e),this._emitAfterChanges(i.MOVE),this}splice(t,e,...s){(0,f.it)(this._observable);const n=(e?i.REMOVE:0)|(s.length?i.ADD:0);if(this._emitBeforeChanges(n))return[];const r=this._splice(t,e,s)||[];return this._emitAfterChanges(n),r}toArray(){return(0,f.it)(this._observable),this._items.slice()}toJSON(){return(0,f.it)(this._observable),this.toArray()}toLocaleString(){return(0,f.it)(this._observable),this._items.toLocaleString()}toString(){return(0,f.it)(this._observable),this._items.toString()}unshift(...t){return(0,f.it)(this._observable),!t.length||this._emitBeforeChanges(i.ADD)||(this._splice(0,0,t),this._emitAfterChanges(i.ADD)),this.length}_createNewInstance(t){return new this.constructor(t)}_splice(t,e,s){const i=this._items,n=this.itemType;let r,o;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._timer=(0,u.Os)((()=>this._dispatchChange()))),t<0&&(t+=this.length),e){if(o=i.splice(t,e),this.hasEventListener("before-remove")){const e=b.acquire();e.target=this,e.cancellable=!0;for(let s=0,n=o.length;s<n;s++)r=o[s],e.reset(r),this.emit("before-remove",e),e.defaultPrevented&&(o.splice(s,1),i.splice(t,0,r),t+=1,s-=1,n-=1);b.release(e)}if(this.length=this._items.length,this.hasEventListener("after-remove")){const t=b.acquire();t.target=this,t.cancellable=!1;const e=o.length;for(let s=0;s<e;s++)t.reset(o[s]),this.emit("after-remove",t);b.release(t)}}if(s&&s.length){if(n){const t=[];for(const e of s){const s=n.ensureType(e);null==s&&null!=e||t.push(s)}s=t}const e=this.hasEventListener("before-add"),r=this.hasEventListener("after-add"),o=t===this.length;if(e||r){const n=b.acquire();n.target=this,n.cancellable=!0;const a=b.acquire();a.target=this,a.cancellable=!1;for(const l of s)e?(n.reset(l),this.emit("before-add",n),n.defaultPrevented||(o?i.push(l):i.splice(t++,0,l),this._set("length",i.length),r&&(a.reset(l),this.emit("after-add",a)))):(o?i.push(l):i.splice(t++,0,l),this._set("length",i.length),a.reset(l),this.emit("after-add",a));b.release(a),b.release(n)}else{if(o)for(const t of s)i.push(t);else i.splice(t,0,...s);this._set("length",i.length)}}if((s&&s.length||o&&o.length)&&this._notifyChangeEvent(s,o),this.hasEventListener("after-splice")){const i=new y(this,s,o,t,e);this.emit("after-splice",i)}return o}_emitBeforeChanges(t){let e=!1;if(this.hasEventListener("before-changes")){const s=b.acquire();s.target=this,s.cancellable=!0,s.type=t,this.emit("before-changes",s),e=s.defaultPrevented,b.release(s)}return e}_emitAfterChanges(t){if(this.hasEventListener("after-changes")){const e=b.acquire();e.target=this,e.cancellable=!1,e.type=t,this.emit("after-changes",e),b.release(e)}this._observable.notify()}_notifyChangeEvent(t,e){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:t,removed:e})}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),!this._notifications)return;const t=this._notifications;this._notifications=null;for(const e of t){const t=e.changes;w.clear(),I.clear(),E.clear();for(const{added:e,removed:s}of t){if(e)if(0===E.size&&0===I.size)for(const t of e)w.add(t);else for(const t of e)I.has(t)?(E.add(t),I.delete(t)):E.has(t)||w.add(t);if(s)if(0===E.size&&0===w.size)for(const t of s)I.add(t);else for(const t of s)w.has(t)?w.delete(t):(E.delete(t),I.add(t))}const s=r.Z.acquire();w.forEach((t=>{s.push(t)}));const i=r.Z.acquire();I.forEach((t=>{i.push(t)}));const n=this._items,o=e.items,a=r.Z.acquire();if(E.forEach((t=>{o.indexOf(t)!==n.indexOf(t)&&a.push(t)})),e.listeners&&(s.length||i.length||a.length)){const t={target:this,added:s,removed:i,moved:a},n=e.listeners.length;for(let s=0;s<n;s++){const i=e.listeners[s];i.removed||i.callback.call(this,t)}}r.Z.release(s),r.Z.release(i),r.Z.release(a)}w.clear(),I.clear(),E.clear()}};C.ofType=t=>{if(!t)return c;if(B.has(t))return B.get(t);let e=null;if("function"==typeof t)e=t.prototype.declaredClass;else if(t.base)e=t.base.prototype.declaredClass;else for(const s in t.typeMap){const i=t.typeMap[s].prototype.declaredClass;e?e+=` | ${i}`:e=i}let s=class extends c{};return(0,n._)([(0,p.c)({Type:t,ensureType:"function"==typeof t?(0,d.se)(t):(0,d.N7)(t)})],s.prototype,"itemType",void 0),s=(0,n._)([(0,_.j)(`esri.core.Collection<${e}>`)],s),B.set(t,s),s},(0,n._)([(0,m.Cb)()],C.prototype,"length",void 0),(0,n._)([(0,m.Cb)()],C.prototype,"items",null),C=c=(0,n._)([(0,_.j)("esri.core.Collection")],C);const z=C},32448:(t,e,s)=>{s.d(e,{Z:()=>l});var i=s(43697),n=s(92036),r=s(50758),o=s(52011);class a{constructor(){this._emitter=new a.EventEmitter(this)}emit(t,e){return this._emitter.emit(t,e)}on(t,e){return this._emitter.on(t,e)}once(t,e){return this._emitter.once(t,e)}hasEventListener(t){return this._emitter.hasEventListener(t)}}!function(t){class e{constructor(t=null){this._target=t,this._listenersMap=null}clear(){this._listenersMap?.clear(),this._listenersMap=null}destroy(){this.clear()}emit(t,e){const s=this._listenersMap&&this._listenersMap.get(t);if(!s)return!1;const i=this._target||this;return[...s].forEach((t=>{t.call(i,e)})),s.length>0}on(t,e){if(Array.isArray(t)){const s=t.map((t=>this.on(t,e)));return(0,r.AL)(s)}if(t.includes(","))throw new TypeError("Evented.on() with a comma delimited string of event types is not supported");this._listenersMap||(this._listenersMap=new Map);const s=this._listenersMap.get(t)||[];return s.push(e),this._listenersMap.set(t,s),(0,r.kB)((()=>{const s=this._listenersMap&&this._listenersMap.get(t)||[],i=s.indexOf(e);i>=0&&s.splice(i,1)}))}once(t,e){const s=this.on(t,(t=>{s.remove(),e.call(null,t)}));return s}hasEventListener(t){const e=this._listenersMap&&this._listenersMap.get(t);return null!=e&&e.length>0}}t.EventEmitter=e,t.EventedMixin=t=>{let s=class extends t{constructor(){super(...arguments),this._emitter=new e}destroy(){this._emitter.clear()}emit(t,e){return this._emitter.emit(t,e)}on(t,e){return this._emitter.on(t,e)}once(t,e){return this._emitter.once(t,e)}hasEventListener(t){return this._emitter.hasEventListener(t)}};return s=(0,i._)([(0,o.j)("esri.core.Evented")],s),s};let s=class extends n.Z{constructor(){super(...arguments),this._emitter=new a.EventEmitter(this)}destroy(){this._emitter.clear()}emit(t,e){return this._emitter.emit(t,e)}on(t,e){return this._emitter.on(t,e)}once(t,e){return this._emitter.once(t,e)}hasEventListener(t){return this._emitter.hasEventListener(t)}};s=(0,i._)([(0,o.j)("esri.core.Evented")],s),t.EventedAccessor=s}(a||(a={}));const l=a},13867:(t,e,s)=>{s.d(e,{z:()=>n});var i=s(69801);class n{constructor(t,e){this._storage=new i.WJ,this.id="",this.name="",this.size=0,this._storage.maxSize=t,this._storage.register(this),e&&this._storage.registerRemoveFunc("",e)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(t,e,s=1){this._storage.put(this,t,e,s,1)}pop(t){return this._storage.pop(this,t)}get(t){return this._storage.get(this,t)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(t){this._storage.maxSize=t}resetHitRate(){}}},69801:(t,e,s)=>{s.d(e,{WJ:()=>a,Xq:()=>o});var i,n,r=s(44553);(n=i||(i={}))[n.ALL=0]="ALL",n[n.SOME=1]="SOME";class o{constructor(t,e,s){this.name=t,this._storage=e,this.id=l+++":",this.size=0,this.maxSize=0,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),s&&(this._storage.registerRemoveFunc(this.id,s),this._removeFunc=!0)}destroy(){this._storage.clear(this),this._removeFunc&&this._storage.deregisterRemoveFunc(this.id),this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get sizeAll(){return this._storage.size}resetHitRate(){this._hit=this._miss=0}put(t,e,s,i=0){this._storage.put(this,t,e,s,i)}get(t){const e=this._storage.get(this,t);return void 0===e?++this._miss:++this._hit,e}peek(t){return this._storage.peek(this,t)}pop(t){const e=this._storage.pop(this,t);return void 0===e?++this._miss:++this._hit,e}updateSize(t,e,s){this._storage.updateSize(this,t,e,s)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class a{get size(){return this._size}constructor(t=10485760){this._maxSize=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new r.Z,this._users=new r.Z}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(t){this._users.push(t)}deregister(t){this._users.removeUnordered(t)}registerRemoveFunc(t,e){this._removeFuncs.push([t,e])}deregisterRemoveFunc(t){this._removeFuncs.filterInPlace((e=>e[0]!==t))}get maxSize(){return this._maxSize}set maxSize(t){this._maxSize=Math.max(t,0),this._checkSizeLimits()}put(t,e,s,n,r){e=t.id+e;const o=this._db.get(e);if(o&&(this._size-=o.size,t.size-=o.size,this._db.delete(e),o.entry!==s&&this._notifyRemove(e,o.entry,i.ALL)),n>this._maxSize)return void this._notifyRemove(e,s,i.ALL);if(void 0===s)return void console.warn("Refusing to cache undefined entry ");if(!n||n<0)return void console.warn("Refusing to cache entry with invalid size "+n);const a=1+Math.max(r,-3)- -3;this._db.set(e,{entry:s,size:n,lifetime:a,lives:a}),this._size+=n,t.size+=n,this._checkSizeLimits()}updateSize(t,e,s,n){e=t.id+e;const r=this._db.get(e);if(r&&r.entry===s){for(this._size-=r.size,t.size-=r.size;n>this._maxSize;){const t=this._notifyRemove(e,s,i.SOME);if(!(null!=t&&t>0))return void this._db.delete(e);n=t}r.size=n,this._size+=n,t.size+=n,this._checkSizeLimits()}}pop(t,e){e=t.id+e;const s=this._db.get(e);if(s)return this._size-=s.size,t.size-=s.size,this._db.delete(e),++this._hit,s.entry;++this._miss}get(t,e){e=t.id+e;const s=this._db.get(e);if(void 0!==s)return this._db.delete(e),s.lives=s.lifetime,this._db.set(e,s),++this._hit,s.entry;++this._miss}peek(t,e){const s=this._db.get(t.id+e);return s?++this._hit:++this._miss,s?.entry}get performanceInfo(){const t={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},e={},s=new Array;this._db.forEach(((t,i)=>{const n=t.lifetime;s[n]=(s[n]||0)+t.size,this._users.forAll((s=>{const{id:n,name:r}=s;if(i.startsWith(n)){const s=e[r]||0;e[r]=s+t.size}}))}));const i={};this._users.forAll((t=>{const s=t.name;if("hitRate"in t&&"number"==typeof t.hitRate&&!isNaN(t.hitRate)&&t.hitRate>0){const n=e[s]||0;e[s]=n,i[s]=Math.round(100*t.hitRate)+"%"}else i[s]="0%"}));const n=Object.keys(e);n.sort(((t,s)=>e[s]-e[t])),n.forEach((s=>t[s]=Math.round(e[s]/2**20)+"MB / "+i[s]));for(let e=s.length-1;e>=0;--e){const i=s[e];i&&(t["Priority "+(e+-3-1)]=Math.round(i/this._size*100)+"%")}return t}resetStats(){this._hit=this._miss=0,this._users.forAll((t=>t.resetHitRate()))}clear(t){const e=t.id;this._db.forEach(((t,s)=>{s.startsWith(e)&&(this._size-=t.size,this._db.delete(s),this._notifyRemove(s,t.entry,i.ALL))})),t.size=0}clearAll(){this._db.forEach(((t,e)=>this._notifyRemove(e,t.entry,i.ALL))),this._users.forEach((t=>t.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(t,e,s){let i;return this._removeFuncs.some((n=>{if(t.startsWith(n[0])){const t=n[1](e,s);return"number"==typeof t&&(i=t),!0}return!1})),i}_checkSizeLimits(){if(this._size>this._maxSize)for(const[t,e]of this._db)if(this._purgeItem(t,e),this._size<=.9*this.maxSize)return;this._users.forEach((t=>{if(t.maxSize>0&&t.size>t.maxSize)for(const[e,s]of this._db)if(e.startsWith(t.id)&&(this._purgeItem(e,s,t),t.size<=.9*t.maxSize))return}))}_purgeItem(t,e,s=this._users.find((e=>t.startsWith(e.id)))){if(this._db.delete(t),e.lives<=1){this._size-=e.size,s&&(s.size-=e.size);const n=this._notifyRemove(t,e.entry,i.SOME);null!=n&&n>0&&(this._size+=n,s&&(s.size+=n),e.lives=e.lifetime,e.size=n,this._db.set(t,e))}else--e.lives,this._db.set(t,e)}}let l=0},52421:(t,e,s)=>{function i(t){return(e,s)=>{e[s]=t}}s.d(e,{c:()=>i})},10661:(t,e,s)=>{s.d(e,{s:()=>n});var i=s(42100);class n extends i.s{notify(){const t=this._observers;if(t&&t.length>0){const e=t.slice();for(const t of e)t.onInvalidated(),t.onCommitted()}}}},66643:(t,e,s)=>{s.d(e,{Ed:()=>h,UI:()=>c,mt:()=>m,q6:()=>f,vr:()=>p});var i=s(43697),n=s(92036),r=s(70586),o=s(95330),a=s(5600),l=s(52011);function h(t,e,s){return(0,o.as)(t.map(((t,i)=>e.apply(s,[t,i]))))}async function c(t,e,s){return(await(0,o.as)(t.map(((t,i)=>e.apply(s,[t,i]))))).map((t=>t.value))}function u(t){return{ok:!0,value:t}}function d(t){return{ok:!1,error:t}}async function f(t){if(null==t)return{ok:!1,error:new Error("no promise provided")};try{return u(await t)}catch(t){return d(t)}}async function m(t){try{return u(await t)}catch(t){return(0,o.r9)(t),d(t)}}function p(t,e){return new _(t,e)}let _=class extends n.Z{get value(){return null!=(t=this._result)&&!0===t.ok?t.value:null;var t}get error(){return null!=(t=this._result)&&!1===t.ok?t.error:null;var t}get finished(){return null!=this._result}constructor(t,e){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,r.IM)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:s}=this._abortController;this.promise=t(s),this.promise.then((t=>{this._result=u(t),this._cleanup()}),(t=>{this._result=d(t),this._cleanup()})),this._abortHandle=(0,o.fu)(e,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,r.hw)(this._abortHandle),this._abortController=null}};(0,i._)([(0,a.Cb)()],_.prototype,"value",null),(0,i._)([(0,a.Cb)()],_.prototype,"error",null),(0,i._)([(0,a.Cb)()],_.prototype,"finished",null),(0,i._)([(0,a.Cb)()],_.prototype,"promise",void 0),(0,i._)([(0,a.Cb)()],_.prototype,"_result",void 0),_=(0,i._)([(0,l.j)("esri.core.asyncUtils.ReactiveTask")],_)},24133:(t,e,s)=>{s.d(e,{Q:()=>o});var i=s(67676),n=s(44553),r=s(88764);class o{constructor(t=9,e){this._compareMinX=c,this._compareMinY=u,this._toBBox=t=>t,this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&("function"==typeof e?this._toBBox=e:this._initFormat(e)),this.clear()}destroy(){this.clear(),b.prune(),x.prune(),v.prune(),M.prune()}all(t){this._all(this._data,t)}search(t,e){let s=this._data;const i=this._toBBox;if(g(t,s))for(b.clear();s;){for(let n=0,r=s.children.length;n<r;n++){const r=s.children[n],o=s.leaf?i(r):r;g(t,o)&&(s.leaf?e(r):_(t,o)?this._all(r,e):b.push(r))}s=b.pop()}}collides(t){let e=this._data;const s=this._toBBox;if(!g(t,e))return!1;for(b.clear();e;){for(let i=0,n=e.children.length;i<n;i++){const n=e.children[i],r=e.leaf?s(n):n;if(g(t,r)){if(e.leaf||_(t,r))return!0;b.push(n)}}e=b.pop()}return!1}load(t){if(!t.length)return this;if(t.length<this._minEntries){for(let e=0,s=t.length;e<s;e++)this.insert(t[e]);return this}let e=this._build(t.slice(0,t.length),0,t.length-1,0);if(this._data.children.length)if(this._data.height===e.height)this._splitRoot(this._data,e);else{if(this._data.height<e.height){const t=this._data;this._data=e,e=t}this._insert(e,this._data.height-e.height-1,!0)}else this._data=e;return this}insert(t){return t&&this._insert(t,this._data.height-1),this}clear(){return this._data=new I([]),this}remove(t){if(!t)return this;let e,s=this._data,n=null,r=0,o=!1;const a=this._toBBox(t);for(v.clear(),M.clear();s||v.length>0;){if(s||(s=v.pop(),n=v.data[v.length-1],r=M.pop()??0,o=!0),s.leaf&&(e=(0,i.cq)(s.children,t,s.children.length,s.indexHint),-1!==e))return s.children.splice(e,1),v.push(s),this._condense(v),this;o||s.leaf||!_(s,a)?n?(r++,s=n.children[r],o=!1):s=null:(v.push(s),M.push(r),r=0,n=s,s=s.children[0])}return this}toJSON(){return this._data}fromJSON(t){return this._data=t,this}_all(t,e){let s=t;for(x.clear();s;){if(!0===s.leaf)for(const t of s.children)e(t);else x.pushArray(s.children);s=x.pop()??null}}_build(t,e,s,i){const n=s-e+1;let r=this._maxEntries;if(n<=r){const i=new I(t.slice(e,s+1));return a(i,this._toBBox),i}i||(i=Math.ceil(Math.log(n)/Math.log(r)),r=Math.ceil(n/r**(i-1)));const o=new E([]);o.height=i;const l=Math.ceil(n/r),h=l*Math.ceil(Math.sqrt(r));y(t,e,s,h,this._compareMinX);for(let n=e;n<=s;n+=h){const e=Math.min(n+h-1,s);y(t,n,e,l,this._compareMinY);for(let s=n;s<=e;s+=l){const n=Math.min(s+l-1,e);o.children.push(this._build(t,s,n,i-1))}}return a(o,this._toBBox),o}_chooseSubtree(t,e,s,i){for(;i.push(e),!0!==e.leaf&&i.length-1!==s;){let s,i=1/0,n=1/0;for(let r=0,o=e.children.length;r<o;r++){const o=e.children[r],a=d(o),l=m(t,o)-a;l<n?(n=l,i=a<i?a:i,s=o):l===n&&a<i&&(i=a,s=o)}e=s||e.children[0]}return e}_insert(t,e,s){const i=this._toBBox,n=s?t:i(t);v.clear();const r=this._chooseSubtree(n,this._data,e,v);for(r.children.push(t),h(r,n);e>=0&&v.data[e].children.length>this._maxEntries;)this._split(v,e),e--;this._adjustParentBBoxes(n,v,e)}_split(t,e){const s=t.data[e],i=s.children.length,n=this._minEntries;this._chooseSplitAxis(s,n,i);const r=this._chooseSplitIndex(s,n,i);if(!r)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const o=s.children.splice(r,s.children.length-r),l=s.leaf?new I(o):new E(o);l.height=s.height,a(s,this._toBBox),a(l,this._toBBox),e?t.data[e-1].children.push(l):this._splitRoot(s,l)}_splitRoot(t,e){this._data=new E([t,e]),this._data.height=t.height+1,a(this._data,this._toBBox)}_chooseSplitIndex(t,e,s){let i,n,r;i=n=1/0;for(let o=e;o<=s-e;o++){const e=l(t,0,o,this._toBBox),a=l(t,o,s,this._toBBox),h=p(e,a),c=d(e)+d(a);h<i?(i=h,r=o,n=c<n?c:n):h===i&&c<n&&(n=c,r=o)}return r}_chooseSplitAxis(t,e,s){const i=t.leaf?this._compareMinX:c,n=t.leaf?this._compareMinY:u;this._allDistMargin(t,e,s,i)<this._allDistMargin(t,e,s,n)&&t.children.sort(i)}_allDistMargin(t,e,s,i){t.children.sort(i);const n=this._toBBox,r=l(t,0,e,n),o=l(t,s-e,s,n);let a=f(r)+f(o);for(let i=e;i<s-e;i++){const e=t.children[i];h(r,t.leaf?n(e):e),a+=f(r)}for(let i=s-e-1;i>=e;i--){const e=t.children[i];h(o,t.leaf?n(e):e),a+=f(o)}return a}_adjustParentBBoxes(t,e,s){for(let i=s;i>=0;i--)h(e.data[i],t)}_condense(t){for(let e=t.length-1;e>=0;e--){const s=t.data[e];if(0===s.children.length)if(e>0){const n=t.data[e-1],r=n.children;r.splice((0,i.cq)(r,s,r.length,n.indexHint),1)}else this.clear();else a(s,this._toBBox)}}_initFormat(t){const e=["return a"," - b",";"];this._compareMinX=new Function("a","b",e.join(t[0])),this._compareMinY=new Function("a","b",e.join(t[1])),this._toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}function a(t,e){l(t,0,t.children.length,e,t)}function l(t,e,s,i,n){n||(n=new I([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let r,o=e;o<s;o++)r=t.children[o],h(n,t.leaf?i(r):r);return n}function h(t,e){t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY)}function c(t,e){return t.minX-e.minX}function u(t,e){return t.minY-e.minY}function d(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function f(t){return t.maxX-t.minX+(t.maxY-t.minY)}function m(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}function p(t,e){const s=Math.max(t.minX,e.minX),i=Math.max(t.minY,e.minY),n=Math.min(t.maxX,e.maxX),r=Math.min(t.maxY,e.maxY);return Math.max(0,n-s)*Math.max(0,r-i)}function _(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function g(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function y(t,e,s,i,n){const o=[e,s];for(;o.length;){const e=o.pop(),s=o.pop();if(e-s<=i)continue;const a=s+Math.ceil((e-s)/i/2)*i;(0,r.q)(t,a,s,e,n),o.push(s,a,a,e)}}const b=new n.Z,x=new n.Z,v=new n.Z,M=new n.Z({deallocator:void 0});class S{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class w extends S{constructor(){super(...arguments),this.height=1,this.indexHint=new i.SO}}class I extends w{constructor(t){super(),this.children=t,this.leaf=!0}}class E extends w{constructor(t){super(),this.children=t,this.leaf=!1}}},14808:(t,e,s)=>{s.d(e,{Qc:()=>c,WU:()=>a,lt:()=>h});var i=s(19153),n=s(70171);const r={ar:[".",","],bg:[","," "],bs:[",","."],ca:[",","."],cs:[","," "],da:[",","."],de:[",","."],"de-ch":[".","’"],el:[",","."],en:[".",","],"en-au":[".",","],es:[",","."],"es-mx":[".",","],et:[","," "],fi:[","," "],fr:[","," "],"fr-ch":[","," "],he:[".",","],hi:[".",",","#,##,##0.###"],hr:[",","."],hu:[","," "],id:[",","."],it:[",","."],"it-ch":[".","’"],ja:[".",","],ko:[".",","],lt:[","," "],lv:[","," "],mk:[",","."],nb:[","," "],nl:[",","."],pl:[","," "],pt:[",","."],"pt-pt":[","," "],ro:[",","."],ru:[","," "],sk:[","," "],sl:[",","."],sr:[",","."],sv:[","," "],th:[".",","],tr:[",","."],uk:[","," "],vi:[",","."],zh:[".",","]};function o(t=(0,n.Kd)()){let e=(t=t.toLowerCase())in r;if(!e){const s=t.split("-");s.length>1&&s[0]in r&&(t=s[0],e=!0),e||(t="en")}const[s,i,o="#,##0.###"]=r[t];return{decimal:s,group:i,pattern:o}}function a(t,e){const s=o((e={...e}).locale);e.customs=s;const i=e.pattern||s.pattern;return isNaN(t)||Math.abs(t)===1/0?null:function(t,e,s){const i=(s=s||{}).customs.group,n=s.customs.decimal,r=e.split(";"),o=r[0];if((e=r[t<0?1:0]||"-"+o).includes("%"))t*=100;else if(e.includes("‰"))t*=1e3;else{if(e.includes("¤"))throw new Error("currency notation not supported");if(e.includes("E"))throw new Error("exponential notation not supported")}const a=l,h=o.match(a);if(!h)throw new Error("unable to find a number expression in pattern: "+e);return!1===s.fractional&&(s.places=0),e.replace(a,function(t,e,s){!0===(s=s||{}).places&&(s.places=0),s.places===1/0&&(s.places=6);const i=e.split("."),n="string"==typeof s.places&&s.places.indexOf(",");let r=s.places;n?r=s.places.substring(n+1):+r>=0||(r=(i[1]||[]).length),s.round<0||(t=Number(t.toFixed(Number(r))));const o=String(Math.abs(t)).split("."),a=o[1]||"";if(i[1]||s.places){n&&(s.places=s.places.substring(0,n));const t=void 0!==s.places?s.places:i[1]&&i[1].lastIndexOf("0")+1;+t>a.length&&(o[1]=a.padEnd(Number(t),"0")),+r<a.length&&(o[1]=a.substr(0,Number(r)))}else o[1]&&o.pop();const l=i[0].replace(",","");let h=l.indexOf("0");-1!==h&&(h=l.length-h,h>o[0].length&&(o[0]=o[0].padStart(h,"0")),l.includes("#")||(o[0]=o[0].substr(o[0].length-h)));let c,u,d=i[0].lastIndexOf(",");if(-1!==d){c=i[0].length-d-1;const t=i[0].substr(0,d);d=t.lastIndexOf(","),-1!==d&&(u=t.length-d-1)}const f=[];for(let t=o[0];t;){const e=t.length-c;f.push(e>0?t.substr(e):t),t=e>0?t.slice(0,e):"",u&&(c=u,u=void 0)}return o[0]=f.reverse().join(s.group||","),o.join(s.decimal||".")}(t,h[0],{decimal:n,group:i,places:s.places,round:s.round}))}(t,i,e)}const l=/[#0,]*[#0](?:\.0*#*)?/;function h(t){const e=o((t=t||{}).locale),s=t.pattern||e.pattern,n=e.group,r=e.decimal;let a=1;if(s.includes("%"))a/=100;else if(s.includes("‰"))a/=1e3;else if(s.includes("¤"))throw new Error("currency notation not supported");const h=s.split(";");1===h.length&&h.push("-"+h[0]);const c=d(h,(e=>(e="(?:"+(0,i.Qs)(e,".")+")").replace(l,(e=>{const s={signed:!1,separator:t.strict?n:[n,""],fractional:t.fractional,decimal:r,exponent:!1},i=e.split(".");let o=t.places;1===i.length&&1!==a&&(i[1]="###"),1===i.length||0===o?s.fractional=!1:(void 0===o&&(o=t.pattern?i[1].lastIndexOf("0")+1:1/0),o&&null==t.fractional&&(s.fractional=!0),!t.places&&+o<i[1].length&&(o+=","+i[1].length),s.places=o);const l=i[0].split(",");return l.length>1&&(s.groupSize=l.pop().length,l.length>1&&(s.groupSize2=l.pop().length)),"("+function(t){"places"in(t=t||{})||(t.places=1/0),"string"!=typeof t.decimal&&(t.decimal="."),"fractional"in t&&!/^0/.test(String(t.places))||(t.fractional=[!0,!1]),"exponent"in t||(t.exponent=[!0,!1]),"eSigned"in t||(t.eSigned=[!0,!1]);const e=u(t),s=d(t.fractional,(e=>{let s="";return e&&0!==t.places&&(s="\\"+t.decimal,t.places===1/0?s="(?:"+s+"\\d+)?":s+="\\d{"+t.places+"}"),s}),!0);let i=e+s;return s&&(i="(?:(?:"+i+")|(?:"+s+"))"),i+d(t.exponent,(e=>e?"([eE]"+u({signed:t.eSigned})+")":""))}(s)+")"}))),!0);return{regexp:c.replaceAll(/[\xa0 ]/g,"[\\s\\xa0]"),group:n,decimal:r,factor:a}}function c(t,e){const s=h(e),i=new RegExp("^"+s.regexp+"$").exec(t);if(!i)return NaN;let n=i[1];if(!i[1]){if(!i[2])return NaN;n=i[2],s.factor*=-1}return n=n.replaceAll(new RegExp("["+s.group+"\\s\\xa0]","g"),"").replace(s.decimal,"."),Number(n)*s.factor}function u(t){return"signed"in(t=t||{})||(t.signed=[!0,!1]),"separator"in t?"groupSize"in t||(t.groupSize=3):t.separator="",d(t.signed,(t=>t?"[-+]":""),!0)+d(t.separator,(e=>{if(!e)return"(?:\\d+)";" "===(e=(0,i.Qs)(e))?e="\\s":" "===e&&(e="\\s\\xa0");const s=t.groupSize,n=t.groupSize2;if(n){const t="(?:0|[1-9]\\d{0,"+(n-1)+"}(?:["+e+"]\\d{"+n+"})*["+e+"]\\d{"+s+"})";return s-n>0?"(?:"+t+"|(?:0|[1-9]\\d{0,"+(s-1)+"}))":t}return"(?:0|[1-9]\\d{0,"+(s-1)+"}(?:["+e+"]\\d{"+s+"})*)"}),!0)}const d=(t,e,s)=>{if(!(t instanceof Array))return e(t);const i=[];for(let s=0;s<t.length;s++)i.push(e(t[s]));return f(i.join("|"),Boolean(s))},f=(t,e)=>"("+(e?"?:":"")+t+")"},17445:(t,e,s)=>{s.d(e,{N1:()=>d,YP:()=>l,Z_:()=>p,gx:()=>h,nn:()=>_,on:()=>u,tX:()=>g}),s(66643),s(46791);var i=s(91460),n=s(50758),r=s(70586),o=s(95330),a=s(26258);function l(t,e,s={}){return c(t,e,s,f)}function h(t,e,s={}){return c(t,e,s,m)}function c(t,e,s={},i){let n=null;const o=s.once?(t,s)=>{i(t)&&((0,r.hw)(n),e(t,s))}:(t,s)=>{i(t)&&e(t,s)};if(n=(0,a.aQ)(t,o,s.sync,s.equals),s.initial){const e=t();o(e,e)}return n}function u(t,e,s,o={}){let a=null,h=null,c=null;function u(){a&&h&&(h.remove(),o.onListenerRemove?.(a),a=null,h=null)}function d(t){o.once&&o.once&&(0,r.hw)(c),s(t)}const f=l(t,((t,s)=>{u(),(0,i.vT)(t)&&(a=t,h=(0,i.on)(t,e,d),o.onListenerAdd?.(t))}),{sync:o.sync,initial:!0});return c=(0,n.kB)((()=>{f.remove(),u()})),c}function d(t,e){return function(t,e,s){if((0,o.Hc)(s))return Promise.reject((0,o.zE)());const i=t();if(e?.(i))return Promise.resolve(i);let a=null;function l(){a=(0,r.hw)(a)}return new Promise(((i,r)=>{a=(0,n.AL)([(0,o.fu)(s,(()=>{l(),r((0,o.zE)())})),c(t,(t=>{l(),i(t)}),{sync:!1,once:!0},e??f)])}))}(t,m,e)}function f(t){return!0}function m(t){return!!t}s(87538);const p={sync:!0},_={initial:!0},g={sync:!0,initial:!0}},16306:(t,e,s)=>{s.d(e,{aX:()=>M});var i=s(68773),n=s(20102),r=s(92604),o=s(38913),a=s(58901),l=s(73913),h=s(8744),c=s(40488),u=(s(66577),s(3172)),d=s(33955),f=s(11282),m=s(17452);async function p(t,e,s){const i="string"==typeof t?(0,m.mN)(t):t,n=e[0].spatialReference,r=(0,d.Ji)(e[0]),o={...s,query:{...i.query,f:"json",sr:n.wkid??JSON.stringify(n),geometries:JSON.stringify((l=e,{geometryType:(0,d.Ji)(l[0]),geometries:l.map((t=>t.toJSON()))}))}},{data:a}=await(0,u.Z)(i.path+"/simplify",o);var l;return function(t,e,s){const i=(0,d.q9)(e);return t.map((t=>{const e=i.fromJSON(t);return e.spatialReference=s,e}))}(a.geometries,r,n)}const _=r.Z.getLogger("esri.geometry.support.normalizeUtils");function g(t){return"polygon"===t[0].type}function y(t){return"polyline"===t[0].type}function b(t,e,s){if(e){const e=function(t,e){if(!(t instanceof a.Z||t instanceof o.Z)){const t="straightLineDensify: the input geometry is neither polyline nor polygon";throw _.error(t),new n.Z(t)}const s=(0,l.x3)(t),i=[];for(const t of s){const s=[];i.push(s),s.push([t[0][0],t[0][1]]);for(let i=0;i<t.length-1;i++){const n=t[i][0],r=t[i][1],o=t[i+1][0],a=t[i+1][1],l=Math.sqrt((o-n)*(o-n)+(a-r)*(a-r)),h=(a-r)/l,c=(o-n)/l,u=l/e;if(u>1){for(let t=1;t<=u-1;t++){const i=t*e,o=c*i+n,a=h*i+r;s.push([o,a])}const t=(l+Math.floor(u-1)*e)/2,i=c*t+n,o=h*t+r;s.push([i,o])}s.push([o,a])}}return function(t){return"polygon"===t.type}(t)?new o.Z({rings:i,spatialReference:t.spatialReference}):new a.Z({paths:i,spatialReference:t.spatialReference})}(t,1e6);t=(0,c.Sx)(e,!0)}return s&&(t=(0,l.Sy)(t,s)),t}function x(t,e,s){if(Array.isArray(t)){const i=t[0];if(i>e){const s=(0,l.XZ)(i,e);t[0]=i+s*(-2*e)}else if(i<s){const e=(0,l.XZ)(i,s);t[0]=i+e*(-2*s)}}else{const i=t.x;if(i>e){const s=(0,l.XZ)(i,e);t=t.clone().offset(s*(-2*e),0)}else if(i<s){const e=(0,l.XZ)(i,s);t=t.clone().offset(e*(-2*s),0)}}return t}function v(t,e){let s=-1;for(let i=0;i<e.cutIndexes.length;i++){const n=e.cutIndexes[i],r=e.geometries[i],o=(0,l.x3)(r);for(let t=0;t<o.length;t++){const e=o[t];e.some((s=>{if(s[0]<180)return!0;{let s=0;for(let t=0;t<e.length;t++){const i=e[t][0];s=i>s?i:s}s=Number(s.toFixed(9));const i=-360*(0,l.XZ)(s,180);for(let s=0;s<e.length;s++){const e=r.getPoint(t,s);r.setPoint(t,s,e.clone().offset(i,0))}return!0}}))}if(n===s){if(g(t))for(const e of(0,l.x3)(r))t[n]=t[n].addRing(e);else if(y(t))for(const e of(0,l.x3)(r))t[n]=t[n].addPath(e)}else s=n,t[n]=r}return t}async function M(t,e,s){if(!Array.isArray(t))return M([t],e);e&&"string"!=typeof e&&_.warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof e?e:e?.url??i.default.geometryServiceUrl;let r,m,g,y,S,w,I,E,B=0;const A=[],C=[];for(const e of t)if(null!=e)if(r||(r=e.spatialReference,m=(0,h.C5)(r),g=r.isWebMercator,w=g?102100:4326,y=l.UZ[w].maxX,S=l.UZ[w].minX,I=l.UZ[w].plus180Line,E=l.UZ[w].minus180Line),m)if("mesh"===e.type)C.push(e);else if("point"===e.type)C.push(x(e.clone(),y,S));else if("multipoint"===e.type){const t=e.clone();t.points=t.points.map((t=>x(t,y,S))),C.push(t)}else if("extent"===e.type){const t=e.clone()._normalize(!1,!1,m);C.push(t.rings?new o.Z(t):t)}else if(e.extent){const t=e.extent,s=(0,l.XZ)(t.xmin,S)*(2*y);let i=0===s?e.clone():(0,l.Sy)(e.clone(),s);t.offset(s,0),t.intersects(I)&&t.xmax!==y?(B=t.xmax>B?t.xmax:B,i=b(i,g),A.push(i),C.push("cut")):t.intersects(E)&&t.xmin!==S?(B=t.xmax*(2*y)>B?t.xmax*(2*y):B,i=b(i,g,360),A.push(i),C.push("cut")):C.push(i)}else C.push(e.clone());else C.push(e);else C.push(e);let z=(0,l.XZ)(B,y),F=-90;const O=z,N=new a.Z;for(;z>0;){const t=360*z-180;N.addPath([[t,F],[t,-1*F]]),F*=-1,z--}if(A.length>0&&O>0){const e=v(A,await async function(t,e,s,i){const n=(0,f.en)(t),r=e[0].spatialReference,o={...i,query:{...n.query,f:"json",sr:JSON.stringify(r),target:JSON.stringify({geometryType:(0,d.Ji)(e[0]),geometries:e}),cutter:JSON.stringify(s)}},a=await(0,u.Z)(n.path+"/cut",o),{cutIndexes:l,geometries:h=[]}=a.data;return{cutIndexes:l,geometries:h.map((t=>{const e=(0,d.im)(t);return e.spatialReference=r,e}))}}(n,A,N,s)),i=[],r=[];for(let s=0;s<C.length;s++){const n=C[s];if("cut"!==n)r.push(n);else{const n=e.shift(),o=t[s];null!=o&&"polygon"===o.type&&o.rings&&o.rings.length>1&&n.rings.length>=o.rings.length?(i.push(n),r.push("simplify")):r.push(g?(0,c.$)(n):n)}}if(!i.length)return r;const o=await p(n,i,s),a=[];for(let t=0;t<r.length;t++){const e=r[t];"simplify"!==e?a.push(e):a.push(g?(0,c.$)(o.shift()):o.shift())}return a}const R=[];for(let t=0;t<C.length;t++){const e=C[t];if("cut"!==e)R.push(e);else{const t=A.shift();R.push(!0===g?(0,c.$)(t):t)}}return R}},73913:(t,e,s)=>{s.d(e,{Sy:()=>l,UZ:()=>o,XZ:()=>a,x3:()=>h});var i=s(58901),n=s(82971),r=s(33955);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.Z.WebMercator}),minus180Line:new i.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.Z({paths:[[[180,-180],[180,180]]],spatialReference:n.Z.WGS84}),minus180Line:new i.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:n.Z.WGS84})}};function a(t,e){return Math.ceil((t-e)/(2*e))}function l(t,e){const s=h(t);for(const t of s)for(const s of t)s[0]+=e;return t}function h(t){return(0,r.oU)(t)?t.rings:t.paths}},70171:(t,e,s)=>{s.d(e,{G3:()=>l,Kd:()=>a,Ze:()=>d,qe:()=>c});var i=s(50758);let n;const r=globalThis.esriConfig?.locale??globalThis.dojoConfig?.locale;function o(){return r??globalThis.navigator?.language??"en"}function a(){return void 0===n&&(n=o()),n}function l(t=a()){const e=/^([a-zA-Z]{2,3})(?:[_\-]\w+)*$/.exec(t);return e?.[1].toLowerCase()}const h=[];function c(t){return h.push(t),(0,i.kB)((()=>h.splice(h.indexOf(t),1)))}const u=[];function d(t){return u.push(t),(0,i.kB)((()=>h.splice(u.indexOf(t),1)))}globalThis.addEventListener?.("languagechange",(function(){const t=o();n!==t&&(n=t,[...u].forEach((e=>{e.call(null,t)})),[...h].forEach((e=>{e.call(null,t)})))}))},37549:(t,e,s)=>{s.d(e,{H:()=>a});var i=s(80442),n=s(24133),r=s(24470);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.Q(9,(0,i.Z)("esri-csp-restrictions")?t=>({minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const t=new Array(this._idByBounds.size);let e=0;this._idByBounds.forEach(((s,i)=>{t[e++]=i})),this._indexInvalid=!1,this._index.clear(),this._index.load(t)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((t=>this._idByBounds.has(t)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const t=(0,r.cS)();for(const e of this._boundsById.values())e&&(t[0]=Math.min(e[0],t[0]),t[1]=Math.min(e[1],t[1]),t[2]=Math.max(e[2],t[2]),t[3]=Math.max(e[3],t[3]));return t}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(t){const e=this._boundsById.get(t);this._boundsById.delete(t),e&&(this._idByBounds.delete(e),this._indexInvalid||this._index.remove(e))}forEachInBounds(t,e){this._loadIndex(),function(t,e,s){(function(t){o.minX=t[0],o.minY=t[1],o.maxX=t[2],o.maxY=t[3]})(e),t.search(o,s)}(this._index,t,(t=>e(this._idByBounds.get(t))))}get(t){return this._boundsById.get(t)}has(t){return this._boundsById.has(t)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(t,e){if(!this._indexInvalid){const e=this._boundsById.get(t);e&&(this._index.remove(e),this._idByBounds.delete(e))}this._boundsById.set(t,e),e&&(this._idByBounds.set(e,t),this._indexInvalid||(this._boundsToLoad.push(e),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},57191:(t,e,s)=>{s.d(e,{Z:()=>_});var i=s(20102),n=s(32448),r=s(92604),o=s(60437),a=s(24470),l=s(98732),h=s(37549),c=s(29730),u=s(70272),d=s(5428);const f={getObjectId:t=>t.objectId,getAttributes:t=>t.attributes,getAttribute:(t,e)=>t.attributes[e],cloneWithGeometry:(t,e)=>new u.u_(e,t.attributes,null,t.objectId),getGeometry:t=>t.geometry,getCentroid:(t,e)=>(null==t.centroid&&(t.centroid=(0,c.Y)(new d.Z,t.geometry,e.hasZ,e.hasM)),t.centroid)};var m=s(11490);const p=(0,o.Ue)();class _{constructor(t){this.geometryInfo=t,this._boundsStore=new h.H,this._featuresById=new Map,this._markedIds=new Set,this.events=new n.Z,this.featureAdapter=f}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let t=0;return this._featuresById.forEach((e=>{null!=e.geometry&&e.geometry.coords&&(t+=e.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:t/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(t){if(null==this.fullBounds)return null;const[e,s,i,n]=this.fullBounds;return{xmin:e,ymin:s,xmax:i,ymax:n,spatialReference:(0,m.S2)(t)}}add(t){this._add(t),this._emitChanged()}addMany(t){for(const e of t)this._add(e);this._emitChanged()}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(t){const e=this._featuresById.get(t);return e?(this._remove(e),this._emitChanged(),e):null}removeManyById(t){this._boundsStore.invalidateIndex();for(const e of t){const t=this._featuresById.get(e);t&&this._remove(t)}this._emitChanged()}forEachBounds(t,e){for(const s of t){const t=this._boundsStore.get(s.objectId);t&&e((0,o.JR)(p,t))}}getFeature(t){return this._featuresById.get(t)}has(t){return this._featuresById.has(t)}forEach(t){this._featuresById.forEach((e=>t(e)))}forEachInBounds(t,e){this._boundsStore.forEachInBounds(t,(t=>{e(this._featuresById.get(t))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let t=!1;this._featuresById.forEach(((e,s)=>{this._markedIds.has(s)||(t=!0,this._remove(e))})),this._markedIds.clear(),t&&this._emitChanged()}_emitChanged(){this.events.emit("changed",void 0)}_add(t){if(!t)return;const e=t.objectId;if(null==e)return void r.Z.getLogger("esri.layers.graphics.data.FeatureStore").error(new i.Z("featurestore:invalid-feature","feature id is missing",{feature:t}));const s=this._featuresById.get(e);let n;if(this._markedIds.add(e),s?(t.displayId=s.displayId,n=this._boundsStore.get(e),this._boundsStore.delete(e)):null!=this.onFeatureAdd&&this.onFeatureAdd(t),null==t.geometry||!t.geometry.coords||!t.geometry.coords.length)return this._boundsStore.set(e,null),void this._featuresById.set(e,t);n=(0,l.$)(null!=n?n:(0,a.Ue)(),t.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=n&&this._boundsStore.set(e,n),this._featuresById.set(e,t)}_remove(t){null!=this.onFeatureRemove&&this.onFeatureRemove(t);const e=t.objectId;return this._markedIds.delete(e),this._boundsStore.delete(e),this._featuresById.delete(e),t}}},27793:(t,e,s)=>{s.r(e),s.d(e,{default:()=>J}),s(66577);var i=s(3172),n=s(66643),r=s(20102),o=s(92604),a=s(95330),l=s(17452),h=s(44547),c=s(37455),u=s(8744),d=s(40488),f=s(70272),m=s(5428),p=s(57191),_=s(37427),g=s(64106),y=s(14808),b=s(35671);const x=/^\s*"([\S\s]*)"\s*$/,v=/""/g,M="\n",S=[","," ",";","|","\t"];function*w(t,e,s){let i=0;for(;i<=t.length;){const n=t.indexOf(e,i),r=t.substring(i,n>-1?n:void 0);i+=r.length+e.length,s&&!r.trim()||(yield r)}}function I(t){const e=t.includes("\r\n")?"\r\n":M;return w(t,e,!0)}function E(t,e){return w(t,e,!1)}function B(t,e,s){t=t.trim(),e=e?.trim();const i=[],n=Array.from(new Set([s?.delimiter,...S])).filter((t=>null!=t));for(const s of n){const n=z(t,s).length,r=z(e,s).length??n;n>1&&i.push({weight:Math.min(n,r),delimiter:s})}const r=i.sort((({weight:t},{weight:e})=>e-t)).map((({delimiter:t})=>t));for(const e of r){const i=O(C(t,e).names,s?.longitudeField,s?.latitudeField);if(i.longitudeFieldName&&i.latitudeFieldName)return{delimiter:e,locationInfo:i}}return{delimiter:r[0],locationInfo:null}}function*A(t,e,s,i=(()=>Object.create(null))){const n=I(t);n.next();let r="",o="",a=0,l=i(),h=0;t:for(const t of n){const n=E(t,s);for(const t of n)if(r+=o+t,o="",a+=F(t),a%2==0){if(a>0){const t=x.exec(r);if(!t){l=i(),h=0,r="",a=0;continue t}l[e[h]]=t[1].replaceAll(v,'"'),h++}else l[e[h]]=r,h++;r="",a=0}else o=s;0===a?(yield l,l=i(),h=0):o=M}}function C(t,e){const s=z(t,e).filter((t=>null!=t)),i=s.map((t=>(0,b.q6)(t)));for(let t=i.length-1;t>=0;t--)i[t]||(i.splice(t,1),s.splice(t,1));return{names:i,aliases:s}}function z(t,e){if(!t?.length)return[];const s=[];let i="",n="",r=0;const o=E(t,e);for(const t of o)if(i+=n+t,n="",r+=F(t),r%2==0){if(r>0){const t=x.exec(i);t&&s.push(t[1].replaceAll(v,'"'))}else s.push(i);i="",r=0}else n=e;return s}function F(t){let e=0,s=0;for(s=t.indexOf('"',s);s>=0;)e++,s=t.indexOf('"',s+1);return e}function O(t,e,s){e=(0,b.q6)(e)?.toLowerCase(),s=(0,b.q6)(s)?.toLowerCase();const i=t.map((t=>t.toLowerCase())),n=e?t[i.indexOf(e)]:null,r=s?t[i.indexOf(s)]:null;return{longitudeFieldName:n||t[i.indexOf(X.find((t=>i.includes(t))))],latitudeFieldName:r||t[i.indexOf(D.find((t=>i.includes(t))))]}}function N(t,e,s,i,n){const r=[],o=A(t,s,e),a=[];for(const t of o){if(10===a.length)break;a.push(t)}for(let t=0;t<s.length;t++){const e=s[t],o=i[t];if(e===n.longitudeFieldName||e===n.latitudeFieldName)r.push({name:e,type:"esriFieldTypeDouble",alias:o});else{let t,s;switch(R(a.map((t=>t[e])))){case"integer":t="esriFieldTypeInteger";break;case"double":t="esriFieldTypeDouble";break;case"date":t="esriFieldTypeDate",s=36;break;default:t="esriFieldTypeString",s=255}r.push({name:e,type:t,alias:o,length:s})}}return r}function R(t){if(!t.length)return"string";const e=/[^+-.,0-9]/;return t.map((t=>{let s=!1;if(""!==t){if(e.test(t))s=!0;else{let e=T(t);if(!isNaN(e))return/[.,]/.test(t)||!Number.isInteger(e)||e>214783647||e<-214783648?"double":"integer";if(t.includes("E")){if(e=Number(t),!isNaN(e))return"double";if(t.includes(",")){if(t=t.replace(",","."),e=Number(t),!isNaN(e))return"double";s=!0}else s=!0}else s=!0}return s?/^[-]?\d*[.,]?\d*$/.test(t)?"string":Z(new Date(t),t)?"date":"string":"string"}})).reduce(((t,e)=>void 0===t?e:void 0===e?t:t===e?e:"string"===t||"string"===e?"string":"double"===t||"double"===e?"double":void 0))}function Z(t,e){if(!t||"[object Date]"!==Object.prototype.toString.call(t)||isNaN(t.getTime()))return!1;let s=!0;if(!q&&/\d+\W*$/.test(e)){const t=e.match(/[a-zA-Z]{2,}/);if(t){let e=!1,i=0;for(;!e&&i<=t.length;)e=!L.test(t[i]),i++;s=!e}}return s}const T=function(){const t=(0,y.lt)(),e=new RegExp("^"+t.regexp+"$"),s=new RegExp("["+t.group+"\\s\\xa0]","g"),i=t.factor;return n=>{const r=e.exec(n);if(t.factor=i,!r)return NaN;let o=r[1];if(!r[1]){if(!r[2])return NaN;o=r[2],t.factor*=-1}return o=o.replace(s,"").replace(t.decimal,"."),+o*t.factor}}(),L=/^((jan(uary)?)|(feb(ruary)?)|(mar(ch)?)|(apr(il)?)|(may)|(jun(e)?)|(jul(y)?)|(aug(ust)?)|(sep(tember)?)|(oct(ober)?)|(nov(ember)?)|(dec(ember)?)|(am)|(pm)|(gmt)|(utc))$/i,q=Number.isNaN(new Date("technology 10").getTime()),D=["lat","latitude","latitude83","latdecdeg","lat_dd","y","ycenter","point_y"],X=["lon","lng","long","longitude","longitude83","longdecdeg","long_dd","x","xcenter","point_x"];var k=s(25278),j=s(99514),Y=s(82971);const P=(0,k.bU)("esriGeometryPoint"),V=["csv"],U=[0,0];class ${constructor(t,e){this.x=t,this.y=e}}class J{constructor(){this._queryEngine=null,this._snapshotFeatures=async t=>{const e=await this._fetch(t);return this._createFeatures(e)}}destroy(){this._queryEngine?.destroy(),this._queryEngine=null}async load(t,e={}){this._loadOptions=t;const[s]=await Promise.all([this._fetch(e.signal),this._checkProjection(t?.parsingOptions?.spatialReference)]),i=function(t,e){const s=e.parsingOptions||{},i={delimiter:s.delimiter,layerDefinition:null,locationInfo:{latitudeFieldName:s.latitudeField,longitudeFieldName:s.longitudeField}},n=i.layerDefinition={name:(0,l.vt)(e.url,V)||"csv",drawingInfo:P,geometryType:"esriGeometryPoint",objectIdField:null,fields:[],timeInfo:s.timeInfo,extent:{xmin:Number.POSITIVE_INFINITY,ymin:Number.POSITIVE_INFINITY,xmax:Number.NEGATIVE_INFINITY,ymax:Number.NEGATIVE_INFINITY,spatialReference:s.spatialReference||{wkid:4326}}},o=I(t),a=o.next().value?.trim(),h=o.next().value?.trim();if(!a)throw new r.Z("csv-layer:empty-csv","CSV is empty",{csv:t});const{delimiter:c,locationInfo:u}=B(a,h,s);if(!c)throw new r.Z("csv-layer:invalid-delimiter","Unable to detect the delimiter from CSV",{firstLine:a,secondLine:h,parsingOptions:s});if(!u)throw new r.Z("csv-layer:location-fields-not-found","Unable to identify latitude and longitude fields from the CSV file",{firstLine:a,secondLine:h,parsingOptions:s});i.locationInfo=u,i.delimiter=c;const{names:d,aliases:f}=C(a,c),m=N(t,i.delimiter,d,f,i.locationInfo);if(s.fields?.length){const t=new j.Z(s.fields);for(const e of m){const s=t.get(e.name);s&&Object.assign(e,s)}}if(!m.some((t=>"esriFieldTypeOID"===t.type&&(n.objectIdField=t.name,!0)))){const t={name:"__OBJECTID",alias:"__OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1};n.objectIdField=t.name,m.unshift(t)}n.fields=m;const p=new j.Z(n.fields);if(i.locationInfo&&(i.locationInfo.latitudeFieldName=p.get(i.locationInfo.latitudeFieldName).name,i.locationInfo.longitudeFieldName=p.get(i.locationInfo.longitudeFieldName).name),n.timeInfo){const t=n.timeInfo;if(t.startTimeField){const e=p.get(t.startTimeField);e?(t.startTimeField=e.name,e.type="esriFieldTypeDate"):t.startTimeField=null}if(t.endTimeField){const e=p.get(t.endTimeField);e?(t.endTimeField=e.name,e.type="esriFieldTypeDate"):t.endTimeField=null}if(t.trackIdField){const e=p.get(t.trackIdField);t.trackIdField=e?e.name:null}t.startTimeField||t.endTimeField||(n.timeInfo=null)}return i}(s,t);this._locationInfo=i.locationInfo,this._delimiter=i.delimiter,this._queryEngine=this._createQueryEngine(i);const n=await this._createFeatures(s);this._queryEngine.featureStore.addMany(n);const{fullExtent:o,timeExtent:a}=await this._queryEngine.fetchRecomputedExtents();if(i.layerDefinition.extent=o,a){const{start:t,end:e}=a;i.layerDefinition.timeInfo.timeExtent=[t,e]}return i}async applyEdits(){throw new r.Z("csv-layer:editing-not-supported","applyEdits() is not supported on CSVLayer")}async queryFeatures(t={},e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(t,e.signal)}async queryFeatureCount(t={},e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(t,e.signal)}async queryObjectIds(t={},e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForIds(t,e.signal)}async queryExtent(t={},e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(t,e.signal)}async querySnapping(t,e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForSnapping(t,e.signal)}async refresh(t){this._loadOptions.customParameters=t,this._snapshotTask?.abort(),this._snapshotTask=(0,n.vr)(this._snapshotFeatures),this._snapshotTask.promise.then((t=>{this._queryEngine.featureStore.clear(),t&&this._queryEngine.featureStore.addMany(t)}),(t=>{this._queryEngine.featureStore.clear(),(0,a.D_)(t)||o.Z.getLogger("esri.layers.CSVLayer").error(new r.Z("csv-layer:refresh","An error occurred during refresh",{error:t}))})),await this._waitSnapshotComplete();const{fullExtent:e,timeExtent:s}=await this._queryEngine.fetchRecomputedExtents();return{extent:e,timeExtent:s}}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _fetch(t){const{url:e,customParameters:s}=this._loadOptions;if(!e)throw new r.Z("csv-layer:invalid-source","url not defined");const n=(0,l.mN)(e);return(await(0,i.Z)(n.path,{query:{...n.query,...s},responseType:"text",signal:t})).data}_createQueryEngine(t){const{objectIdField:e,fields:s,extent:i,timeInfo:n}=t.layerDefinition,r=new p.Z({geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1});return new g.q({fields:s,geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1,timeInfo:n,objectIdField:e,spatialReference:i.spatialReference||{wkid:4326},cacheSpatialQueries:!0,featureStore:r})}async _createFeatures(t){const{latitudeFieldName:e,longitudeFieldName:s}=this._locationInfo,{objectIdField:i,fieldsIndex:n,spatialReference:r}=this._queryEngine;let o=[];const a=[],l=n.fields.filter((t=>t.name!==i)).map((t=>t.name));let p=0;const _={};for(const t of n.fields)if("esriFieldTypeOID"!==t.type&&"esriFieldTypeGlobalID"!==t.type){const e=(0,b.os)(t);void 0!==e&&(_[t.name]=e)}const g=A(t,l,this._delimiter,(0,k.Dm)(_,i));for(const t of g){const r=this._parseCoordinateValue(t[e]),l=this._parseCoordinateValue(t[s]);if(null!=l&&null!=r&&!isNaN(r)&&!isNaN(l)){t[e]=r,t[s]=l;for(const i in t)if(i!==e&&i!==s)if(n.isDateField(i)){const e=new Date(t[i]);t[i]=Z(e,t[i])?e.getTime():null}else if(n.isNumericField(i)){const e=T(t[i]);isNaN(e)?t[i]=null:t[i]=e}t[i]=p,p++,o.push(new $(l,r)),a.push(t)}}if(!(0,u.fS)({wkid:4326},r))if((0,u.sS)(r))for(const t of o)[t.x,t.y]=(0,d.hG)(t.x,t.y,U);else o=(0,h.oj)(c.N,o,Y.Z.WGS84,r,null,null);const y=[];for(let t=0;t<o.length;t++){const{x:e,y:s}=o[t],n=a[t];n[i]=t+1,y.push(new f.u_(new m.Z([],[e,s]),n,null,n[i]))}return y}_parseCoordinateValue(t){if(null==t||""===t)return null;let e=T(t);return(isNaN(e)||Math.abs(e)>181)&&(e=parseFloat(t)),e}async _checkProjection(t){try{await(0,_._W)(u.Zn,t)}catch{throw new r.Z("csv-layer:projection-not-supported","Projection not supported")}}}},25278:(t,e,s)=>{s.d(e,{Dm:()=>c,Hq:()=>u,MS:()=>d,bU:()=>a});var i=s(80442),n=s(22974),r=s(61159),o=s(58333);function a(t){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===t||"esriGeometryMultipoint"===t?o.I4:"esriGeometryPolyline"===t?o.ET:o.lF}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let h=1;function c(t,e){if((0,i.Z)("esri-csp-restrictions"))return()=>({[e]:null,...t});try{let s=`this.${e} = null;`;for(const e in t)s+=`this${l.test(e)?`.${e}`:`["${e}"]`} = ${JSON.stringify(t[e])};`;const i=new Function(`\n return class AttributesClass$${h++} {\n constructor() {\n ${s};\n }\n }\n `)();return()=>new i}catch(s){return()=>({[e]:null,...t})}}function u(t={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.d9)(t)}}]}function d(t,e){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:t},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:e,supportsDelete:e,supportsEditing:e,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:e,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:r.g,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:e,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1}}}},11282:(t,e,s)=>{s.d(e,{cv:()=>a,en:()=>o,lA:()=>r}),s(68773),s(40330);var i=s(22974),n=s(17452);function r(t,e){return e?{...e,query:{...t??{},...e.query}}:{query:t}}function o(t){return"string"==typeof t?(0,n.mN)(t):(0,i.d9)(t)}function a(t,e,s){const i={};for(const n in t){if("declaredClass"===n)continue;const r=t[n];if(null!=r&&"function"!=typeof r)if(Array.isArray(r)){i[n]=[];for(let t=0;t<r.length;t++)i[n][t]=a(r[t])}else if("object"==typeof r)if(r.toJSON){const t=r.toJSON(s&&s[n]);i[n]=e?t:JSON.stringify(t)}else i[n]=e?r:JSON.stringify(r);else i[n]=r}return i}s(71058)},58333:(t,e,s)=>{s.d(e,{ET:()=>r,I4:()=>n,eG:()=>l,lF:()=>o,lj:()=>c,qP:()=>a,wW:()=>h});const i=[252,146,31,255],n={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},r={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},o={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},h={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},c={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5642],{55642:(e,t,i)=>{i.d(t,{ElevationQuery:()=>q});var n=i(66643),s=i(20102),l=i(70586),a=i(95330),o=i(67900),r=i(65091),c=i(94139),u=i(58901),h=i(44547),p=i(24470),m=(i(66577),i(80442),i(50758)),f=i(92604),d=i(40488);const y=f.Z.getLogger("esri.layers.support.ElevationSampler");class x{queryElevation(e){return function(e,t){const i=w(e,t.spatialReference);if(!i)return null;switch(e.type){case"point":!function(e,t,i){e.z=i.elevationAt(t.x,t.y)}(e,i,t);break;case"polyline":!function(e,t,i){g.spatialReference=t.spatialReference;const n=e.hasM&&!e.hasZ;for(let s=0;s<e.paths.length;s++){const l=e.paths[s],a=t.paths[s];for(let e=0;e<l.length;e++){const t=l[e],s=a[e];g.x=s[0],g.y=s[1],n&&(t[3]=t[2]),t[2]=i.elevationAt(g.x,g.y)}}e.hasZ=!0}(e,i,t);break;case"multipoint":!function(e,t,i){g.spatialReference=t.spatialReference;const n=e.hasM&&!e.hasZ;for(let s=0;s<e.points.length;s++){const l=e.points[s],a=t.points[s];g.x=a[0],g.y=a[1],n&&(l[3]=l[2]),l[2]=i.elevationAt(g.x,g.y)}e.hasZ=!0}(e,i,t)}return e}(e.clone(),this)}on(){return(0,m.kB)()}projectIfRequired(e,t){return w(e,t)}}class v extends x{get spatialReference(){return this.extent.spatialReference}constructor(e,t,i){super(),this.tile=e,this.noDataValue=i;const n=e.tile.extent;this.extent=(0,p.HH)(n,t.spatialReference),this.extent.zmin=e.zmin,this.extent.zmax=e.zmax,this._aaExtent=n;const s=(0,o.c9)(t.spatialReference),l=t.lodAt(e.tile.level).resolution*s;this.demResolution={min:l,max:l}}contains(e){const t=this.projectIfRequired(e,this.spatialReference);return null!=t&&this.containsAt(t.x,t.y)}containsAt(e,t){return(0,p.jE)(this._aaExtent,e,t)}elevationAt(e,t){if(!this.containsAt(e,t)){const i=this.extent,n=`${i.xmin}, ${i.ymin}, ${i.xmax}, ${i.ymax}`;return y.warn("#elevationAt()",`Point used to sample elevation (${e}, ${t}) is outside of the sampler extent (${n})`),this.noDataValue}return this.tile.sample(e,t)??this.noDataValue}}class T extends x{get spatialReference(){return this.extent.spatialReference}constructor(e,t,i){let n;super(),"number"==typeof t?(this.noDataValue=t,n=null):(n=t,this.noDataValue=i),this.samplers=n?e.map((e=>new v(e,n,this.noDataValue))):e;const s=this.samplers[0];if(s){this.extent=s.extent.clone();const{min:e,max:t}=s.demResolution;this.demResolution={min:e,max:t};for(let e=1;e<this.samplers.length;e++){const t=this.samplers[e];this.extent.union(t.extent),this.demResolution.min=Math.min(this.demResolution.min,t.demResolution.min),this.demResolution.max=Math.max(this.demResolution.max,t.demResolution.max)}}else this.extent=(0,p.HH)((0,p.Ue)(),n.spatialReference),this.demResolution={min:0,max:0}}elevationAt(e,t){for(const i of this.samplers)if(i.containsAt(e,t))return i.elevationAt(e,t);return y.warn("#elevationAt()",`Point used to sample elevation (${e}, ${t}) is outside of the sampler`),this.noDataValue}}function w(e,t){if(null==e)return null;const i=e.spatialReference;if(i.equals(t))return e;const n=(0,d.iV)(e,t);return n||y.error(`Cannot project geometry spatial reference (wkid:${i.wkid}) to elevation sampler spatial reference (wkid:${t.wkid})`),n}const g=new c.Z;class _{constructor(e,t){this.data=e,this.safeWidth=.99999999*(e.width-1),this.dx=(e.width-1)/(t[2]-t[0]),this.dy=(e.width-1)/(t[3]-t[1]),this.x0=t[0],this.y1=t[3]}}class R{constructor(e,t=null){if(this.tile=e,null!=t&&null!=e){const i=e.extent;this._samplerData=new _(t,i)}}get zmin(){return null!=this._samplerData?this._samplerData.data.minValue:0}get zmax(){return null!=this._samplerData?this._samplerData.data.maxValue:0}sample(e,t){if(null==this._samplerData)return;const{safeWidth:i,data:n,dx:s,dy:l,y1:a,x0:o}=this._samplerData,{width:r,values:c,noDataValue:u}=n,h=E(l*(a-t),0,i),p=E(s*(e-o),0,i),m=Math.floor(h),f=Math.floor(p),d=m*r+f,y=d+r,x=c[d],v=c[y],T=c[d+1],w=c[y+1];if(x!==u&&v!==u&&T!==u&&w!==u){const e=p-f,t=x+(T-x)*e;return t+(v+(w-v)*e-t)*(h-m)}}}function E(e,t,i){return e<t?t:e>i?i:e}var A=i(43077);class q{async queryAll(e,t,i){if(!(e=i&&i.ignoreInvisibleLayers?e.filter((e=>e.visible)):e.slice()).length)throw new s.Z("elevation-query:invalid-layer","Elevation queries require at least one elevation layer to fetch tiles from");const n=D.fromGeometry(t);let l=!1;i&&i.returnSampleInfo||(l=!0);const a={...F,...i,returnSampleInfo:!0},o=await this.query(e[e.length-1],n,a),r=await this._queryAllContinue(e,o,a);return r.geometry=r.geometry.export(),l&&delete r.sampleInfo,r}async query(e,t,i){if(!e)throw new s.Z("elevation-query:invalid-layer","Elevation queries require an elevation layer to fetch tiles from");if(!t||!(t instanceof D)&&"point"!==t.type&&"multipoint"!==t.type&&"polyline"!==t.type)throw new s.Z("elevation-query:invalid-geometry","Only point, polyline and multipoint geometries can be used to query elevation");const n={...F,...i},l=new M(e,t.spatialReference,n),a=n.signal;return await e.load({signal:a}),await this._createGeometryDescriptor(l,t,a),await this._selectTiles(l,a),await this._populateElevationTiles(l,a),this._sampleGeometryWithElevation(l),this._createQueryResult(l,a)}async createSampler(e,t,i){if(!e)throw new s.Z("elevation-query:invalid-layer","Elevation queries require an elevation layer to fetch tiles from");if(!t||"extent"!==t.type)throw new s.Z("elevation-query:invalid-extent","Invalid or undefined extent");const n={...F,...i};return this._createSampler(e,t,n)}async createSamplerAll(e,t,i){if(!(e=i&&i.ignoreInvisibleLayers?e.filter((e=>e.visible)):e.slice()).length)throw new s.Z("elevation-query:invalid-layer","Elevation queries require at least one elevation layer to fetch tiles from");if(!t||"extent"!==t.type)throw new s.Z("elevation-query:invalid-extent","Invalid or undefined extent");const n={...F,...i,returnSampleInfo:!0},l=await this._createSampler(e[e.length-1],t,n);return this._createSamplerAllContinue(e,t,l,n)}async _createSampler(e,t,i,n){const s=i.signal;await e.load({signal:s});const l=t.spatialReference,a=e.tileInfo.spatialReference;l.equals(a)||(await(0,h.initializeProjection)([{source:l,dest:a}],{signal:s}),t=(0,h.iV)(t,a));const o=new z(e,t,i,n);return await this._selectTiles(o,s),await this._populateElevationTiles(o,s),new T(o.elevationTiles,o.layer.tileInfo,o.options.noDataValue)}async _createSamplerAllContinue(e,t,i,n){if(e.pop(),!e.length)return i;const s=i.samplers.map((e=>(0,p.oJ)(e.extent))),l=await this._createSampler(e[e.length-1],t,n,s);if(0===l.samplers.length)return i;const a=i.samplers.concat(l.samplers),o=new T(a,n.noDataValue);return this._createSamplerAllContinue(e,t,o,n)}async _queryAllContinue(e,t,i){const n=e.pop(),s=t.geometry.coordinates,a=t.sampleInfo;(0,l.O3)(a);const o=[],r=[];for(let t=0;t<s.length;t++){const i=a[t];i.demResolution>=0?i.source||(i.source=n):e.length&&(o.push(s[t]),r.push(t))}if(!e.length||0===o.length)return t;const c=t.geometry.clone(o),u=await this.query(e[e.length-1],c,i),h=u.sampleInfo;if(!h)throw new Error("no sampleInfo");return r.forEach(((e,t)=>{s[e].z=u.geometry.coordinates[t].z,a[e].demResolution=h[t].demResolution})),this._queryAllContinue(e,t,i)}async _createQueryResult(e,t){const i=await e.geometry.project(e.outSpatialReference,t);(0,l.O3)(i);const n={geometry:i.export(),noDataValue:e.options.noDataValue};return e.options.returnSampleInfo&&(n.sampleInfo=this._extractSampleInfo(e)),e.geometry.coordinates.forEach((e=>{e.tile=null,e.elevationTile=null})),n}async _createGeometryDescriptor(e,t,i){let n;const l=e.layer.tileInfo.spatialReference;if(t instanceof D?n=await t.project(l,i):(await(0,h.initializeProjection)([{source:t.spatialReference,dest:l}],{signal:i}),n=(0,h.iV)(t,l)),!n)throw new s.Z("elevation-query:spatial-reference-mismatch",`Cannot query elevation in '${t.spatialReference.wkid}' on an elevation service in '${l.wkid}'`);e.geometry=D.fromGeometry(n)}async _selectTiles(e,t){"geometry"===e.type&&this._preselectOutsideLayerExtent(e);const i=e.options.demResolution;if("number"==typeof i)this._selectTilesClosestResolution(e,i);else if("finest-contiguous"===i)await this._selectTilesFinestContiguous(e,t);else{if("auto"!==i)throw new s.Z("elevation-query:invalid-dem-resolution",`Invalid dem resolution value '${i}', expected a number, "finest-contiguous" or "auto"`);await this._selectTilesAuto(e,t)}}_preselectOutsideLayerExtent(e){if(null==e.layer.fullExtent)return;const t=new R(null);t.sample=()=>e.options.noDataValue,e.outsideExtentTile=t;const i=e.layer.fullExtent;e.geometry.coordinates.forEach((e=>{const n=e.x,s=e.y;(n<i.xmin||n>i.xmax||s<i.ymin||s>i.ymax)&&(e.elevationTile=t)}))}_selectTilesClosestResolution(e,t){const i=this._findNearestDemResolutionLODIndex(e,t);e.selectTilesAtLOD(i)}_findNearestDemResolutionLODIndex(e,t){const{tileInfo:i,tilemapCache:n}=e.layer,s=t/(0,o.c9)(i.spatialReference),l=V(i,n);let a=l[0],r=0;for(let e=1;e<l.length;e++){const t=l[e];Math.abs(t.resolution-s)<Math.abs(a.resolution-s)&&(a=t,r=e)}return r}async _selectTilesFinestContiguous(e,t){const{tileInfo:i,tilemapCache:n}=e.layer,s=Z(i,n,e.options.minDemResolution);await this._selectTilesFinestContiguousAt(e,s,t)}async _selectTilesFinestContiguousAt(e,t,i){const n=e.layer;if(e.selectTilesAtLOD(t),t<0)return;const l=n.tilemapCache,o=e.getTilesToFetch();try{if(l&&!k(l))await(0,a.Hl)(Promise.all(o.map((e=>l.fetchAvailability(e.level,e.row,e.col,{signal:i})))),i);else if(await this._populateElevationTiles(e,i),!e.allElevationTilesFetched())throw e.clearElevationTiles(),new s.Z("elevation-query:has-unavailable-tiles")}catch(n){(0,a.r9)(n),await this._selectTilesFinestContiguousAt(e,t-1,i)}}async _populateElevationTiles(e,t){const i=e.getTilesToFetch(),n={},s=e.options.cache,l=e.options.noDataValue,o=i.map((async i=>{if(null==i.id)return;const a=`${e.layer.uid}:${i.id}:${l}`,o=null!=s?s.get(a):null,r=null!=o?o:await e.layer.fetchTile(i.level,i.row,i.col,{noDataValue:l,signal:t});null!=s&&s.put(a,r),n[i.id]=new R(i,r)}));await(0,a.Hl)(Promise.allSettled(o),t),e.populateElevationTiles(n)}async _selectTilesAuto(e,t){this._selectTilesAutoFinest(e),this._reduceTilesForMaximumRequests(e);const i=e.layer.tilemapCache;if(!i||k(i))return this._selectTilesAutoPrefetchUpsample(e,t);const s=e.getTilesToFetch(),l={},o=s.map((async e=>{const s=new A.f(null,0,0,0,(0,p.Ue)()),o=await(0,n.q6)(i.fetchAvailabilityUpsample(e.level,e.row,e.col,s,{signal:t}));!1!==o.ok?null!=e.id&&(l[e.id]=s):(0,a.r9)(o.error)}));await(0,a.Hl)(Promise.all(o),t),e.remapTiles(l)}_reduceTilesForMaximumRequests(e){const t=e.layer.tileInfo;let i=0;const n={},s=e=>{null!=e.id&&(e.id in n?n[e.id]++:(n[e.id]=1,i++))},l=e=>{if(null==e.id)return;const t=n[e.id];1===t?(delete n[e.id],i--):n[e.id]=t-1};e.forEachTileToFetch(s,l);let a=!0;for(;a&&(a=!1,e.forEachTileToFetch((n=>{i<=e.options.maximumAutoTileRequests||(l(n),t.upsampleTile(n)&&(a=!0),s(n))}),l),a););}_selectTilesAutoFinest(e){const{tileInfo:t,tilemapCache:i}=e.layer,n=Z(t,i,e.options.minDemResolution);e.selectTilesAtLOD(n,e.options.maximumAutoTileRequests)}async _selectTilesAutoPrefetchUpsample(e,t){const i=e.layer.tileInfo;await this._populateElevationTiles(e,t);let n=!1;e.forEachTileToFetch(((e,t)=>{i.upsampleTile(e)?n=!0:t()})),n&&await this._selectTilesAutoPrefetchUpsample(e,t)}_sampleGeometryWithElevation(e){e.geometry.coordinates.forEach((t=>{const i=t.elevationTile;let n=e.options.noDataValue;if(i){const e=i.sample(t.x,t.y);null!=e?n=e:t.elevationTile=null}t.z=n}))}_extractSampleInfo(e){const t=e.layer.tileInfo,i=(0,o.c9)(t.spatialReference);return e.geometry.coordinates.map((n=>{let s=-1;return n.elevationTile&&n.elevationTile!==e.outsideExtentTile&&(s=t.lodAt(n.elevationTile.tile.level).resolution*i),{demResolution:s}}))}}class D{export(){return this._exporter(this.coordinates,this.spatialReference)}clone(e){const t=new D;return t.geometry=this.geometry,t.spatialReference=this.spatialReference,t.coordinates=e||this.coordinates.map((e=>e.clone())),t._exporter=this._exporter,t}async project(e,t){if(this.spatialReference.equals(e))return this.clone();await(0,h.initializeProjection)([{source:this.spatialReference,dest:e}],{signal:t});const i=new r.Z({spatialReference:this.spatialReference,points:this.coordinates.map((e=>[e.x,e.y]))}),n=(0,h.iV)(i,e);if(!n)return null;const s=this.coordinates.map(((e,t)=>{const i=e.clone(),s=n.points[t];return i.x=s[0],i.y=s[1],i})),l=this.clone(s);return l.spatialReference=e,l}static fromGeometry(e){const t=new D;if(t.geometry=e,t.spatialReference=e.spatialReference,e instanceof D)t.coordinates=e.coordinates.map((e=>e.clone())),t._exporter=(t,i)=>{const n=e.clone(t);return n.spatialReference=i,n};else switch(e.type){case"point":{const i=e,{hasZ:n,hasM:s}=i;t.coordinates=n&&s?[new I(i.x,i.y,i.z,i.m)]:n?[new I(i.x,i.y,i.z)]:s?[new I(i.x,i.y,null,i.m)]:[new I(i.x,i.y)],t._exporter=(t,i)=>e.hasM?new c.Z(t[0].x,t[0].y,t[0].z,t[0].m,i):new c.Z(t[0].x,t[0].y,t[0].z,i);break}case"multipoint":{const i=e,{hasZ:n,hasM:s}=i;t.coordinates=n&&s?i.points.map((e=>new I(e[0],e[1],e[2],e[3]))):n?i.points.map((e=>new I(e[0],e[1],e[2]))):s?i.points.map((e=>new I(e[0],e[1],null,e[2]))):i.points.map((e=>new I(e[0],e[1]))),t._exporter=(t,i)=>e.hasM?new r.Z({points:t.map((e=>[e.x,e.y,e.z,e.m])),hasZ:!0,hasM:!0,spatiaReference:i}):new r.Z(t.map((e=>[e.x,e.y,e.z])),i);break}case"polyline":{const i=e,n=[],s=[],{hasZ:l,hasM:a}=e;let o=0;for(const e of i.paths)if(s.push([o,o+e.length]),o+=e.length,l&&a)for(const t of e)n.push(new I(t[0],t[1],t[2],t[3]));else if(l)for(const t of e)n.push(new I(t[0],t[1],t[2]));else if(a)for(const t of e)n.push(new I(t[0],t[1],null,t[2]));else for(const t of e)n.push(new I(t[0],t[1]));t.coordinates=n,t._exporter=(t,i)=>{const n=e.hasM?t.map((e=>[e.x,e.y,e.z,e.m])):t.map((e=>[e.x,e.y,e.z])),l=s.map((e=>n.slice(e[0],e[1])));return new u.Z({paths:l,hasM:e.hasM,hasZ:!0,spatialReference:i})};break}}return t}}class I{constructor(e,t,i=null,n=null,s=null,l=null){this.x=e,this.y=t,this.z=i,this.m=n,this.tile=s,this.elevationTile=l}clone(){return new I(this.x,this.y,this.z,this.m)}}class C{constructor(e,t){this.layer=e,this.options=t}}class M extends C{constructor(e,t,i){super(e,i),this.outSpatialReference=t,this.type="geometry"}selectTilesAtLOD(e){if(e<0)this.geometry.coordinates.forEach((e=>e.tile=null));else{const{tileInfo:t,tilemapCache:i}=this.layer,n=V(t,i)[e].level;this.geometry.coordinates.forEach((e=>e.tile=t.tileAt(n,e.x,e.y)))}}allElevationTilesFetched(){return!this.geometry.coordinates.some((e=>!e.elevationTile))}clearElevationTiles(){for(const e of this.geometry.coordinates)e.elevationTile!==this.outsideExtentTile&&(e.elevationTile=null)}populateElevationTiles(e){for(const t of this.geometry.coordinates)!t.elevationTile&&t.tile?.id&&(t.elevationTile=e[t.tile.id])}remapTiles(e){for(const t of this.geometry.coordinates){const i=t.tile?.id;t.tile=i?e[i]:null}}getTilesToFetch(){const e={},t=[];for(const i of this.geometry.coordinates){const n=i.tile;if(!n)continue;const s=i.tile?.id;i.elevationTile||!s||e[s]||(e[s]=n,t.push(n))}return t}forEachTileToFetch(e){for(const t of this.geometry.coordinates)t.tile&&!t.elevationTile&&e(t.tile,(()=>{t.tile=null}))}}class z extends C{constructor(e,t,i,n){super(e,i),this.type="extent",this.elevationTiles=[],this._candidateTiles=[],this._fetchedCandidates=new Set,this.extent=t.intersection(e.fullExtent),this.maskExtents=n}selectTilesAtLOD(e,t){const i=this._maximumLodForRequests(t),n=Math.min(i,e);n<0?this._candidateTiles.length=0:this._selectCandidateTilesCoveringExtentAt(n)}_maximumLodForRequests(e){const{tileInfo:t,tilemapCache:i}=this.layer,n=V(t,i);if(!e)return n.length-1;const s=this.extent;if(null==s)return-1;for(let i=n.length-1;i>=0;i--){const l=n[i],a=l.resolution*t.size[0],o=l.resolution*t.size[1];if(Math.ceil(s.width/a)*Math.ceil(s.height/o)<=e)return i}return-1}allElevationTilesFetched(){return this._candidateTiles.length===this.elevationTiles.length}clearElevationTiles(){this.elevationTiles.length=0,this._fetchedCandidates.clear()}populateElevationTiles(e){for(const t of this._candidateTiles){const i=t.id&&e[t.id];i&&(this._fetchedCandidates.add(t),this.elevationTiles.push(i))}}remapTiles(e){this._candidateTiles=this._uniqueNonOverlappingTiles(this._candidateTiles.map((t=>e[t.id])))}getTilesToFetch(){return this._candidateTiles}forEachTileToFetch(e,t){const i=this._candidateTiles;this._candidateTiles=[],i.forEach((i=>{if(this._fetchedCandidates.has(i))return void(t&&t(i));let n=!1;e(i,(()=>n=!0)),n?t&&t(i):this._candidateTiles.push(i)})),this._candidateTiles=this._uniqueNonOverlappingTiles(this._candidateTiles,t)}_uniqueNonOverlappingTiles(e,t){const i={},n=[];for(const s of e){const e=s.id;e&&!i[e]?(i[e]=s,n.push(s)):t&&t(s)}const s=n.sort(((e,t)=>e.level-t.level));return s.filter(((e,i)=>{for(let n=0;n<i;n++){const i=s[n].extent;if(i&&e.extent&&(0,p.r3)(i,e.extent))return t&&t(e),!1}return!0}))}_selectCandidateTilesCoveringExtentAt(e){this._candidateTiles.length=0;const t=this.extent;if(null==t)return;const{tileInfo:i,tilemapCache:n}=this.layer,s=V(i,n)[e],l=i.tileAt(s.level,t.xmin,t.ymin),a=l.extent;if(null==a)return;const o=s.resolution*i.size[0],r=s.resolution*i.size[1],c=Math.ceil((t.xmax-a[0])/o),u=Math.ceil((t.ymax-a[1])/r);for(let e=0;e<u;e++)for(let t=0;t<c;t++){const n=new A.f(null,l.level,l.row-e,l.col+t);i.updateTileInfo(n),this._tileIsMasked(n)||this._candidateTiles.push(n)}}_tileIsMasked(e){return!!this.maskExtents&&this.maskExtents.some((t=>e.extent&&(0,p.r3)(t,e.extent)))}}function Z(e,t,i=0){const n=V(e,t);let s=n.length-1;if(i>0){const t=i/(0,o.c9)(e.spatialReference),l=n.findIndex((e=>e.resolution<t));0===l?s=0:l>0&&(s=l-1)}return s}const F={maximumAutoTileRequests:20,noDataValue:0,returnSampleInfo:!1,demResolution:"auto",minDemResolution:0};function V(e,t){const i=e.lods;if(k(t)){const{effectiveMinLOD:e,effectiveMaxLOD:n}=t;return i.filter((t=>t.level>=e&&t.level<=n))}return i}function k(e){return null!=e?.tileInfo}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5967],{91303:(e,t,s)=>{var i;s.d(t,{Y:()=>i}),function(e){e[e.KILOBYTES=1024]="KILOBYTES",e[e.MEGABYTES=1048576]="MEGABYTES",e[e.GIGABYTES=1073741824]="GIGABYTES"}(i||(i={}))},43090:(e,t,s)=>{function i(e){return 32+e.length}function n(e){if(!e)return 0;let t=l;for(const s in e)if(e.hasOwnProperty(s)){const n=e[s];switch(typeof n){case"string":t+=i(n);break;case"number":t+=16;break;case"boolean":t+=4}}return t}function r(e){if(!e)return 0;if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return 32+8*t;let s=h;for(let i=0;i<t;i++)s+=o(e[i]);return s}(e);let t=l;for(const s in e)e.hasOwnProperty(s)&&(t+=o(e[s]));return t}function o(e){switch(typeof e){case"object":return r(e);case"string":return i(e);case"number":return 16;case"boolean":return 4;default:return 8}}function a(e,t){return h+e.length*t}s.d(t,{Ul:()=>r,do:()=>a,f2:()=>n});const l=32,h=32},24133:(e,t,s)=>{s.d(t,{Q:()=>o});var i=s(67676),n=s(44553),r=s(88764);class o{constructor(e=9,t){this._compareMinX=u,this._compareMinY=d,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),E.prune(),x.prune(),C.prune(),b.prune()}all(e){this._all(this._data,e)}search(e,t){let s=this._data;const i=this._toBBox;if(m(e,s))for(E.clear();s;){for(let n=0,r=s.children.length;n<r;n++){const r=s.children[n],o=s.leaf?i(r):r;m(e,o)&&(s.leaf?t(r):g(e,o)?this._all(r,t):E.push(r))}s=E.pop()}}collides(e){let t=this._data;const s=this._toBBox;if(!m(e,t))return!1;for(E.clear();t;){for(let i=0,n=t.children.length;i<n;i++){const n=t.children[i],r=t.leaf?s(n):n;if(m(e,r)){if(t.leaf||g(e,r))return!0;E.push(n)}}t=E.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,s=e.length;t<s;t++)this.insert(e[t]);return this}let t=this._build(e.slice(0,e.length),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new F([]),this}remove(e){if(!e)return this;let t,s=this._data,n=null,r=0,o=!1;const a=this._toBBox(e);for(C.clear(),b.clear();s||C.length>0;){if(s||(s=C.pop(),n=C.data[C.length-1],r=b.pop()??0,o=!0),s.leaf&&(t=(0,i.cq)(s.children,e,s.children.length,s.indexHint),-1!==t))return s.children.splice(t,1),C.push(s),this._condense(C),this;o||s.leaf||!g(s,a)?n?(r++,s=n.children[r],o=!1):s=null:(C.push(s),b.push(r),r=0,n=s,s=s.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_all(e,t){let s=e;for(x.clear();s;){if(!0===s.leaf)for(const e of s.children)t(e);else x.pushArray(s.children);s=x.pop()??null}}_build(e,t,s,i){const n=s-t+1;let r=this._maxEntries;if(n<=r){const i=new F(e.slice(t,s+1));return a(i,this._toBBox),i}i||(i=Math.ceil(Math.log(n)/Math.log(r)),r=Math.ceil(n/r**(i-1)));const o=new T([]);o.height=i;const l=Math.ceil(n/r),h=l*Math.ceil(Math.sqrt(r));y(e,t,s,h,this._compareMinX);for(let n=t;n<=s;n+=h){const t=Math.min(n+h-1,s);y(e,n,t,l,this._compareMinY);for(let s=n;s<=t;s+=l){const n=Math.min(s+l-1,t);o.children.push(this._build(e,s,n,i-1))}}return a(o,this._toBBox),o}_chooseSubtree(e,t,s,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==s;){let s,i=1/0,n=1/0;for(let r=0,o=t.children.length;r<o;r++){const o=t.children[r],a=c(o),l=f(e,o)-a;l<n?(n=l,i=a<i?a:i,s=o):l===n&&a<i&&(i=a,s=o)}t=s||t.children[0]}return t}_insert(e,t,s){const i=this._toBBox,n=s?e:i(e);C.clear();const r=this._chooseSubtree(n,this._data,t,C);for(r.children.push(e),h(r,n);t>=0&&C.data[t].children.length>this._maxEntries;)this._split(C,t),t--;this._adjustParentBBoxes(n,C,t)}_split(e,t){const s=e.data[t],i=s.children.length,n=this._minEntries;this._chooseSplitAxis(s,n,i);const r=this._chooseSplitIndex(s,n,i);if(!r)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const o=s.children.splice(r,s.children.length-r),l=s.leaf?new F(o):new T(o);l.height=s.height,a(s,this._toBBox),a(l,this._toBBox),t?e.data[t-1].children.push(l):this._splitRoot(s,l)}_splitRoot(e,t){this._data=new T([e,t]),this._data.height=e.height+1,a(this._data,this._toBBox)}_chooseSplitIndex(e,t,s){let i,n,r;i=n=1/0;for(let o=t;o<=s-t;o++){const t=l(e,0,o,this._toBBox),a=l(e,o,s,this._toBBox),h=p(t,a),u=c(t)+c(a);h<i?(i=h,r=o,n=u<n?u:n):h===i&&u<n&&(n=u,r=o)}return r}_chooseSplitAxis(e,t,s){const i=e.leaf?this._compareMinX:u,n=e.leaf?this._compareMinY:d;this._allDistMargin(e,t,s,i)<this._allDistMargin(e,t,s,n)&&e.children.sort(i)}_allDistMargin(e,t,s,i){e.children.sort(i);const n=this._toBBox,r=l(e,0,t,n),o=l(e,s-t,s,n);let a=_(r)+_(o);for(let i=t;i<s-t;i++){const t=e.children[i];h(r,e.leaf?n(t):t),a+=_(r)}for(let i=s-t-1;i>=t;i--){const t=e.children[i];h(o,e.leaf?n(t):t),a+=_(o)}return a}_adjustParentBBoxes(e,t,s){for(let i=s;i>=0;i--)h(t.data[i],e)}_condense(e){for(let t=e.length-1;t>=0;t--){const s=e.data[t];if(0===s.children.length)if(t>0){const n=e.data[t-1],r=n.children;r.splice((0,i.cq)(r,s,r.length,n.indexHint),1)}else this.clear();else a(s,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function a(e,t){l(e,0,e.children.length,t,e)}function l(e,t,s,i,n){n||(n=new F([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let r,o=t;o<s;o++)r=e.children[o],h(n,e.leaf?i(r):r);return n}function h(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function u(e,t){return e.minX-t.minX}function d(e,t){return e.minY-t.minY}function c(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function _(e){return e.maxX-e.minX+(e.maxY-e.minY)}function f(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function p(e,t){const s=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),r=Math.min(e.maxY,t.maxY);return Math.max(0,n-s)*Math.max(0,r-i)}function g(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function m(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function y(e,t,s,i,n){const o=[t,s];for(;o.length;){const t=o.pop(),s=o.pop();if(t-s<=i)continue;const a=s+Math.ceil((t-s)/i/2)*i;(0,r.q)(e,a,s,t,n),o.push(s,a,a,t)}}const E=new n.Z,x=new n.Z,C=new n.Z,b=new n.Z({deallocator:void 0});class v{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class I extends v{constructor(){super(...arguments),this.height=1,this.indexHint=new i.SO}}class F extends I{constructor(e){super(),this.children=e,this.leaf=!0}}class T extends I{constructor(e){super(),this.children=e,this.leaf=!1}}},37549:(e,t,s)=>{s.d(t,{H:()=>a});var i=s(80442),n=s(24133),r=s(24470);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.Q(9,(0,i.Z)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((s,i)=>{e[t++]=i})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,r.cS)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,s){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,s)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},57191:(e,t,s)=>{s.d(t,{Z:()=>g});var i=s(20102),n=s(32448),r=s(92604),o=s(60437),a=s(24470),l=s(98732),h=s(37549),u=s(29730),d=s(70272),c=s(5428);const _={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t)=>new d.u_(t,e.attributes,null,e.objectId),getGeometry:e=>e.geometry,getCentroid:(e,t)=>(null==e.centroid&&(e.centroid=(0,u.Y)(new c.Z,e.geometry,t.hasZ,t.hasM)),e.centroid)};var f=s(11490);const p=(0,o.Ue)();class g{constructor(e){this.geometryInfo=e,this._boundsStore=new h.H,this._featuresById=new Map,this._markedIds=new Set,this.events=new n.Z,this.featureAdapter=_}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach((t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,s,i,n]=this.fullBounds;return{xmin:t,ymin:s,xmax:i,ymax:n,spatialReference:(0,f.S2)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const s of e){const e=this._boundsStore.get(s.objectId);e&&t((0,o.JR)(p,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let e=!1;this._featuresById.forEach(((t,s)=>{this._markedIds.has(s)||(e=!0,this._remove(t))})),this._markedIds.clear(),e&&this._emitChanged()}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void r.Z.getLogger("esri.layers.graphics.data.FeatureStore").error(new i.Z("featurestore:invalid-feature","feature id is missing",{feature:e}));const s=this._featuresById.get(t);let n;if(this._markedIds.add(t),s?(e.displayId=s.displayId,n=this._boundsStore.get(t),this._boundsStore.delete(t)):null!=this.onFeatureAdd&&this.onFeatureAdd(e),null==e.geometry||!e.geometry.coords||!e.geometry.coords.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);n=(0,l.$)(null!=n?n:(0,a.Ue)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=n&&this._boundsStore.set(t,n),this._featuresById.set(t,e)}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._markedIds.delete(t),this._boundsStore.delete(t),this._featuresById.delete(t),e}}},99282:(e,t,s)=>{s.d(t,{a:()=>r});var i=s(67900),n=s(68441);const r={unknown:1,inches:(0,i.En)(1,"meters","inches"),feet:(0,i.En)(1,"meters","feet"),"us-feet":(0,i.En)(1,"meters","us-feet"),yards:(0,i.En)(1,"meters","yards"),miles:(0,i.En)(1,"meters","miles"),"nautical-miles":(0,i.En)(1,"meters","nautical-miles"),millimeters:(0,i.En)(1,"meters","millimeters"),centimeters:(0,i.En)(1,"meters","centimeters"),decimeters:(0,i.En)(1,"meters","decimeters"),meters:(0,i.En)(1,"meters","meters"),kilometers:(0,i.En)(1,"meters","kilometers"),"decimal-degrees":1/(0,i.ty)(1,"meters",n.sv.radius)}},86787:(e,t,s)=>{s.d(t,{Z:()=>x});var i,n=s(43697),r=s(35454),o=s(96674),a=s(70586),l=s(5600),h=(s(75215),s(67676),s(80442),s(71715)),u=s(52011),d=s(30556),c=s(35671);let _=i=class extends o.wq{constructor(e){super(e)}async collectRequiredFields(e,t){return(0,c.io)(e,t,this.expression)}clone(){return new i({expression:this.expression,title:this.title})}equals(e){return this.expression===e.expression&&this.title===e.title}};(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],_.prototype,"expression",void 0),(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],_.prototype,"title",void 0),_=i=(0,n._)([(0,u.j)("esri.layers.support.FeatureExpressionInfo")],_);const f=_;var p,g=s(12541);const m=(0,r.w)()({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),y=new r.X({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"});let E=p=class extends o.wq{constructor(e){super(e),this.offset=null}readFeatureExpressionInfo(e,t){return null!=e?e:t.featureExpression&&0===t.featureExpression.value?{expression:"0"}:void 0}writeFeatureExpressionInfo(e,t,s,i){t[s]=e.write({},i),"0"===e.expression&&(t.featureExpression={value:0})}get mode(){const{offset:e,featureExpressionInfo:t}=this;return this._isOverridden("mode")?this._get("mode"):null!=e||t?"relative-to-ground":"on-the-ground"}set mode(e){this._override("mode",e)}set unit(e){this._set("unit",e)}write(e,t){return this.offset||this.mode||this.featureExpressionInfo||this.unit?super.write(e,t):null}clone(){return new p({mode:this.mode,offset:this.offset,featureExpressionInfo:this.featureExpressionInfo?this.featureExpressionInfo.clone():void 0,unit:this.unit})}equals(e){return this.mode===e.mode&&this.offset===e.offset&&this.unit===e.unit&&(0,a._W)(this.featureExpressionInfo,e.featureExpressionInfo)}};(0,n._)([(0,l.Cb)({type:f,json:{write:!0}})],E.prototype,"featureExpressionInfo",void 0),(0,n._)([(0,h.r)("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],E.prototype,"readFeatureExpressionInfo",null),(0,n._)([(0,d.c)("featureExpressionInfo",{featureExpressionInfo:{type:f},"featureExpression.value":{type:[0]}})],E.prototype,"writeFeatureExpressionInfo",null),(0,n._)([(0,l.Cb)({type:m.apiValues,nonNullable:!0,json:{type:m.jsonValues,read:m.read,write:{writer:m.write,isRequired:!0}}})],E.prototype,"mode",null),(0,n._)([(0,l.Cb)({type:Number,json:{write:!0}})],E.prototype,"offset",void 0),(0,n._)([(0,l.Cb)({type:g.f9,json:{type:String,read:y.read,write:y.write}})],E.prototype,"unit",null),E=p=(0,n._)([(0,u.j)("esri.layers.support.ElevationInfo")],E);const x=E},12541:(e,t,s)=>{s.d(t,{Z7:()=>n,f9:()=>r});var i=s(99282);function n(e){return 1/(i.a[e]||1)}const r=function(){const e=Object.keys(i.a);return e.sort(),e}()},65967:(e,t,s)=>{s.r(t),s.d(t,{default:()=>Ee});var i=s(43697),n=s(32448),r=s(95330),o=s(17445),a=s(5600),l=(s(75215),s(67676)),h=(s(80442),s(52011)),u=s(19402),d=s(82971),c=s(57191),_=s(64106),f=s(11145),p=s(14165),g=s(86787),m=s(13867),y=s(30175),E=s(67900),x=s(12541);function C(e=!1,t){if(e){const{elevationInfo:e,alignPointsInFeatures:s,spatialReference:i}=t;return new v(e,s,i)}return new b}class b{async alignCandidates(e,t){return e}notifyElevationSourceChange(){}}class v{constructor(e,t,s){this._elevationInfo=e,this._alignPointsInFeatures=t,this.spatialReference=s,this._alignmentsCache=new m.z(1024),this._cacheVersion=0,this._metersPerVerticalUnit=(0,E._R)(s)}async alignCandidates(e,t){const s=this._elevationInfo;return null==s||"absolute-height"!==s.mode||s.featureExpressionInfo?this._alignComputedElevationCandidates(e,t):(this._alignAbsoluteElevationCandidates(e,s),e)}notifyElevationSourceChange(){this._alignmentsCache.clear(),this._cacheVersion++}_alignAbsoluteElevationCandidates(e,t){const{offset:s,unit:i}=t;if(null==s)return;const n=s*((0,x.Z7)(i??"meters")/this._metersPerVerticalUnit);for(const t of e)switch(t.type){case"edge":t.start.z+=n,t.end.z+=n;continue;case"vertex":t.target.z+=n;continue}}async _alignComputedElevationCandidates(e,t){const s=new Map;for(const t of e)(0,y.s1)(s,t.objectId,T).push(t);const[i,n,o]=this._prepareQuery(s),a=await this._alignPointsInFeatures(i,t);if((0,r.k_)(t),o!==this._cacheVersion)return this._alignComputedElevationCandidates(e,t);this._applyCacheAndResponse(i,a,n);const{drapedObjectIds:l,failedObjectIds:h}=a,u=[];for(const t of e){const{objectId:e}=t;l.has(e)&&"edge"===t.type&&(t.draped=!0),h.has(e)||u.push(t)}return u}_prepareQuery(e){const t=[],s=[];for(const[i,n]of e){const e=[];for(const t of n)this._addToQueriesOrCachedResult(i,t.target,e,s),"edge"===t.type&&(this._addToQueriesOrCachedResult(i,t.start,e,s),this._addToQueriesOrCachedResult(i,t.end,e,s));0!==e.length&&t.push({objectId:i,points:e})}return[t,s,this._cacheVersion]}_addToQueriesOrCachedResult(e,t,s,i){const n=F(e,t),r=this._alignmentsCache.get(n);null==r?s.push(t):i.push(new I(t,r))}_applyCacheAndResponse(e,{elevations:t,drapedObjectIds:s,failedObjectIds:i},n){for(const e of n)e.apply();let r=0;const o=this._alignmentsCache;for(const{objectId:n,points:a}of e){if(i.has(n)){r+=a.length;continue}const e=!s.has(n);for(const s of a){const i=F(n,s),a=t[r++];s.z=a,e&&o.put(i,a,1)}}}}class I{constructor(e,t){this.point=e,this.z=t}apply(){this.point.z=this.z}}function F(e,{x:t,y:s,z:i}){return`${e}-${t}-${s}-${i??0}}`}function T(){return[]}class S{filter(e,t){return t}notifyElevationSourceChange(){}}class w{filter(e,t){const{point:s,distance:i}=e,{z:n}=s;if(null==n)return t;if(0===t.length)return t;const r=function(e){return"number"==typeof e?{x:e,y:e,z:e}:e}(i),o=this._updateCandidatesTo3D(t,s,r).filter(B);return o.sort(R),o}_updateCandidatesTo3D(e,t,s){for(const i of e)switch(i.type){case"edge":M(i,t,s);continue;case"vertex":A(i,t,s);continue}return e}}function B(e){return e.distance<=1}function O(e=!1){return e?new w:new S}function M(e,t,{x:s,y:i,z:n}){const{start:r,end:o,target:a}=e;e.draped||function(e,t,s,i){const n=i.x-s.x,r=i.y-s.y,o=i.z-s.z,a=n*n+r*r+o*o,l=(t.x-s.x)*n+(t.y-s.y)*r+o*(t.z-s.z),h=Math.min(1,Math.max(0,l/a)),u=s.x+n*h,d=s.y+r*h,c=s.z+o*h;e.x=u,e.y=d,e.z=c}(a,t,r,o);const l=(t.x-a.x)/s,h=(t.y-a.y)/i,u=(t.z-a.z)/n;e.distance=Math.sqrt(l*l+h*h+u*u)}function A(e,t,{x:s,y:i,z:n}){const{target:r}=e,o=(t.x-r.x)/s,a=(t.y-r.y)/i,l=(t.z-r.z)/n,h=Math.sqrt(o*o+a*a+l*l);e.distance=h}function R(e,t){return e.distance-t.distance}var P=s(22974),H=s(19153);function z(e=!1,t){return e?new j(t):new D}class D{async fetch(){return[]}notifySymbologyChange(){}}class j{constructor(e){this._getSymbologyCandidates=e,this._candidatesCache=new m.z(1024),this._cacheVersion=0}async fetch(e,t){if(0===e.length)return[];const s=[],i=[],n=this._candidatesCache;for(const t of e){const e=k(t),r=n.get(e);if(r)for(const e of r)i.push((0,P.d9)(e));else s.push(t),n.put(e,[],1)}if(0===s.length)return i;const o=this._cacheVersion,{candidates:a,sourceCandidateIndices:l}=await this._getSymbologyCandidates(s,t);if((0,r.k_)(t),o!==this._cacheVersion)return this.fetch(e,t);const h=[],{length:u}=a;for(let e=0;e<u;++e){const t=a[e],i=k(s[l[e]]),r=n.get(i);r.push(t),n.put(i,r,r.length),h.push((0,P.d9)(t))}return i.concat(h)}notifySymbologyChange(){this._candidatesCache.clear(),this._cacheVersion++}}function k(e){switch(e.type){case"vertex":{const{objectId:t,target:s}=e,i=`${t}-vertex-${s.x}-${s.y}-${s.z??0}`;return(0,H.hP)(i).toString()}case"edge":{const{objectId:t,start:s,end:i}=e,n=`${t}-edge-${s.x}-${s.y}-${s.z??0}-to-${i.x}-${i.y}-${i.z??0}`;return(0,H.hP)(n).toString()}default:return""}}var N=s(92036);let Y=class extends N.Z{constructor(){super(...arguments),this.updating=!1,this._pending=[]}push(e,t){this._pending.push({promise:e,callback:t}),1===this._pending.length&&this._process()}_process(){if(!this._pending.length)return void(this.updating=!1);this.updating=!0;const e=this._pending[0];e.promise.then((t=>e.callback(t))).catch((()=>{})).then((()=>{this._pending.shift(),this._process()}))}};(0,i._)([(0,a.Cb)()],Y.prototype,"updating",void 0),Y=(0,i._)([(0,h.j)("esri.core.AsyncSequence")],Y);var U,X=s(66643),Z=s(50758),q=s(92604),V=s(6570),L=s(24470),J=s(98732),G=s(66677),$=s(78760),Q=s(34599);class W{constructor(e,t){this.data=e,this.resolution=t,this.state={type:U.CREATED},this.alive=!0}process(e){switch(this.state.type){case U.CREATED:return this.state=this._gotoFetchCount(this.state,e),this.state.task.promise.then(e.resume,e.resume);case U.FETCH_COUNT:break;case U.FETCHED_COUNT:return this.state=this._gotoFetchFeatures(this.state,e),this.state.task.promise.then(e.resume,e.resume);case U.FETCH_FEATURES:break;case U.FETCHED_FEATURES:this.state=this._goToDone(this.state,e);case U.DONE:}return null}get debugInfo(){return{data:this.data,featureCount:this._featureCount,state:this._stateToString}}get _featureCount(){switch(this.state.type){case U.CREATED:case U.FETCH_COUNT:return 0;case U.FETCHED_COUNT:return this.state.featureCount;case U.FETCH_FEATURES:return this.state.previous.featureCount;case U.FETCHED_FEATURES:return this.state.features.length;case U.DONE:return this.state.previous.features.length}}get _stateToString(){switch(this.state.type){case U.CREATED:return"created";case U.FETCH_COUNT:return"fetch-count";case U.FETCHED_COUNT:return"fetched-count";case U.FETCH_FEATURES:return"fetch-features";case U.FETCHED_FEATURES:return"fetched-features";case U.DONE:return"done"}}_gotoFetchCount(e,t){return{type:U.FETCH_COUNT,previous:e,task:(0,X.vr)((async e=>{const s=await(0,X.mt)(t.fetchCount(this,e));this.state.type===U.FETCH_COUNT&&(this.state=this._gotoFetchedCount(this.state,s.ok?s.value:1/0))}))}}_gotoFetchedCount(e,t){return{type:U.FETCHED_COUNT,featureCount:t,previous:e}}_gotoFetchFeatures(e,t){return{type:U.FETCH_FEATURES,previous:e,task:(0,X.vr)((async s=>{const i=await(0,X.mt)(t.fetchFeatures(this,e.featureCount,s));this.state.type===U.FETCH_FEATURES&&(this.state=this._gotoFetchedFeatures(this.state,i.ok?i.value:[]))}))}}_gotoFetchedFeatures(e,t){return{type:U.FETCHED_FEATURES,previous:e,features:t}}_goToDone(e,t){return t.finish(this,e.features),{type:U.DONE,previous:e}}reset(){const e=this.state;switch(this.state={type:U.CREATED},e.type){case U.CREATED:case U.FETCHED_COUNT:case U.FETCHED_FEATURES:case U.DONE:break;case U.FETCH_COUNT:case U.FETCH_FEATURES:e.task.abort()}}intersects(e){return null==e||!this.data.extent||((0,L.oJ)(e,K),(0,L.kK)(this.data.extent,K))}}!function(e){e[e.CREATED=0]="CREATED",e[e.FETCH_COUNT=1]="FETCH_COUNT",e[e.FETCHED_COUNT=2]="FETCHED_COUNT",e[e.FETCH_FEATURES=3]="FETCH_FEATURES",e[e.FETCHED_FEATURES=4]="FETCHED_FEATURES",e[e.DONE=5]="DONE"}(U||(U={}));const K=(0,L.Ue)();let ee=class extends N.Z{get _minimumVerticesPerFeature(){switch(this.store?.featureStore.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":return 1;case"esriGeometryPolygon":return 4;case"esriGeometryPolyline":return 2}}set filter(e){const t=this._get("filter"),s=this._filterProperties(e);JSON.stringify(t)!==JSON.stringify(s)&&this._set("filter",s)}set customParameters(e){const t=this._get("customParameters");JSON.stringify(t)!==JSON.stringify(e)&&this._set("customParameters",e)}get _configuration(){return{filter:this.filter,customParameters:this.customParameters,tileInfo:this.tileInfo,tileSize:this.tileSize}}set tileInfo(e){const t=this._get("tileInfo");t!==e&&(null!=e&&null!=t&&JSON.stringify(e)===JSON.stringify(t)||(this._set("tileInfo",e),this.store.tileInfo=e))}set tileSize(e){this._get("tileSize")!==e&&this._set("tileSize",e)}get updating(){return this.updatingExcludingEdits||this._pendingEdits.updating}get updatingExcludingEdits(){return this._updatingHandles.updating}get hasZ(){return this.store.featureStore.hasZ}constructor(e){super(e),this.tilesOfInterest=[],this.availability=0,this._pendingTiles=new Map,this._updatingHandles=new u.R,this._pendingEdits=new Y,this._pendingEditsAbortController=new AbortController}initialize(){this._initializeFetchExtent(),this._updatingHandles.add((()=>this._configuration),(()=>this.refresh())),this._updatingHandles.add((()=>this.tilesOfInterest),((e,t)=>{(0,l.fS)(e,t,(({id:e},{id:t})=>e===t))||this._process()}),o.Z_)}destroy(){this._pendingTiles.forEach((e=>this._deletePendingTile(e))),this._pendingTiles.clear(),this.store.destroy(),this.tilesOfInterest.length=0,this._pendingEditsAbortController.abort(),this._pendingEditsAbortController=null,this._updatingHandles.destroy()}refresh(){this.store.refresh(),this._pendingTiles.forEach((e=>this._deletePendingTile(e))),this._process()}applyEdits(e){this._pendingEdits.push(e,(async e=>{if(0===e.addedFeatures.length&&0===e.updatedFeatures.length&&0===e.deletedFeatures.length)return;for(const[,e]of this._pendingTiles)e.reset();const t={...e,deletedFeatures:e.deletedFeatures.map((({objectId:e,globalId:t})=>e&&-1!==e?e:this._lookupObjectIdByGlobalId(t)))};await this._updatingHandles.addPromise(this.store.processEdits(t,((e,t)=>this._queryFeaturesById(e,t)),this._pendingEditsAbortController.signal)),this._processPendingTiles()}))}_initializeFetchExtent(){if(!this.capabilities.query.supportsExtent||!(0,G.M8)(this.url))return;const e=(0,X.vr)((async e=>{try{const t=await(0,Q.Vr)(this.url,new p.Z({where:"1=1",outSpatialReference:this.spatialReference,cacheHint:this.capabilities.query.supportsCacheHint??void 0}),{query:this._configuration.customParameters,signal:e});this.store.extent=V.Z.fromJSON(t.data?.extent)}catch(e){(0,r.r9)(e),q.Z.getLogger(this).warn("Failed to fetch data extent",e)}}));this._updatingHandles.addPromise(e.promise.then((()=>this._process()))),this.addHandles((0,Z.kB)((()=>e.abort())))}get debugInfo(){return{numberOfFeatures:this.store.featureStore.numFeatures,tilesOfInterest:this.tilesOfInterest,pendingTiles:Array.from(this._pendingTiles.values()).map((e=>e.debugInfo)),storedTiles:this.store.debugInfo}}_process(){this._markTilesNotAlive(),this._createPendingTiles(),this._deletePendingTiles(),this._processPendingTiles()}_markTilesNotAlive(){for(const[,e]of this._pendingTiles)e.alive=!1}_createPendingTiles(){const e=this._collectMissingTilesInfo();if(this._setAvailability(null==e?1:e.coveredArea/e.fullArea),null!=e)for(const{data:t,resolution:s}of e.missingTiles){const e=this._pendingTiles.get(t.id);e?(e.resolution=s,e.alive=!0):this._createPendingTile(t,s)}}_collectMissingTilesInfo(){let e=null;for(let t=this.tilesOfInterest.length-1;t>=0;t--){const s=this.tilesOfInterest[t],i=this.store.process(s,((e,t)=>this._verifyTileComplexity(e,t)));null==e?e=i:e.prepend(i)}return e}_deletePendingTiles(){for(const[,e]of this._pendingTiles)e.alive||this._deletePendingTile(e)}_processPendingTiles(){const e={fetchCount:(e,t)=>this._fetchCount(e,t),fetchFeatures:(e,t,s)=>this._fetchFeatures(e,t,s),finish:(e,t)=>this._finishPendingTile(e,t),resume:()=>this._processPendingTiles()};if(this._ensureFetchAllCounts(e))for(const[,t]of this._pendingTiles)this._verifyTileComplexity(this.store.getFeatureCount(t.data),t.resolution)&&this._updatingHandles.addPromise(t.process(e))}_verifyTileComplexity(e,t){return this._verifyVertexComplexity(e)&&this._verifyFeatureDensity(e,t)}_verifyVertexComplexity(e){return e*this._minimumVerticesPerFeature<ie}_verifyFeatureDensity(e,t){if(null==this.tileInfo)return!1;const s=this.tileSize*t;return e*(ne/(s*s))<re}_ensureFetchAllCounts(e){let t=!0;for(const[,s]of this._pendingTiles)s.state.type<U.FETCHED_COUNT&&this._updatingHandles.addPromise(s.process(e)),s.state.type<=U.FETCH_COUNT&&(t=!1);return t}_finishPendingTile(e,t){this.store.add(e.data,t),this._deletePendingTile(e),this._updateAvailability()}_updateAvailability(){const e=this._collectMissingTilesInfo();this._setAvailability(null==e?1:e.coveredArea/e.fullArea)}_setAvailability(e){this._set("availability",e)}_createPendingTile(e,t){const s=new W(e,t);return this._pendingTiles.set(e.id,s),s}_deletePendingTile(e){e.reset(),this._pendingTiles.delete(e.data.id)}async _fetchCount(e,t){return this.store.fetchCount(e.data,this.url,this._createCountQuery(e),{query:this.customParameters,timeout:se,signal:t})}async _fetchFeatures(e,t,s){let i=0;const n=[];let r=0,o=t;for(;;){const a=this._createFeaturesQuery(e),l=this._setPagingParameters(a,i,o),{features:h,exceededTransferLimit:u}=await this._queryFeatures(a,s);l&&(i+=a.num),r+=h.length;for(const e of h)n.push(e);if(o=t-r,!l||!u||o<=0)return n}}_filterProperties(e){return null==e?{where:"1=1",gdbVersion:void 0,timeExtent:void 0}:{where:e.where||"1=1",timeExtent:e.timeExtent,gdbVersion:e.gdbVersion}}_lookupObjectIdByGlobalId(e){const t=this.globalIdField,s=this.objectIdField;if(null==t)throw new Error("Expected globalIdField to be defined");let i=null;if(this.store.featureStore.forEach((n=>{e===n.attributes[t]&&(i=n.objectId??n.attributes[s])})),null==i)throw new Error(`Expected to find a feature with globalId ${e}`);return i}_queryFeaturesById(e,t){const s=this._createFeaturesQuery();return s.objectIds=e,this._queryFeatures(s,t)}_queryFeatures(e,t){return this.capabilities.query.supportsFormatPBF?this._queryFeaturesPBF(e,t):this._queryFeaturesJSON(e,t)}async _queryFeaturesPBF(e,t){const{sourceSpatialReference:s}=this,{data:i}=await(0,Q.qp)(this.url,e,new $.J({sourceSpatialReference:s}),{query:this._configuration.customParameters,timeout:se,signal:t});return(0,J.lM)(i)}async _queryFeaturesJSON(e,t){const{sourceSpatialReference:s}=this,{data:i}=await(0,Q.JT)(this.url,e,s,{query:this._configuration.customParameters,timeout:se,signal:t});return(0,J.h_)(i,this.objectIdField)}_createCountQuery(e){const t=this._createBaseQuery(e);return this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0),t}_createFeaturesQuery(e=null){const t=this._createBaseQuery(e);return t.outFields=this.globalIdField?[this.globalIdField,this.objectIdField]:[this.objectIdField],t.returnGeometry=!0,null!=e&&(this.capabilities.query.supportsResultType?t.resultType="tile":this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0)),t}_createBaseQuery(e){const t=new p.Z({returnZ:this.hasZ,returnM:!1,geometry:null!=this.tileInfo&&null!=e?(0,L.HH)(e.data.extent,this.tileInfo.spatialReference):void 0}),s=this._configuration.filter;return null!=s&&(t.where=s.where,t.gdbVersion=s.gdbVersion,t.timeExtent=s.timeExtent),t.outSpatialReference=this.spatialReference,t}_setPagingParameters(e,t,s){if(!this.capabilities.query.supportsPagination)return!1;const{supportsMaxRecordCountFactor:i,supportsCacheHint:n,tileMaxRecordCount:r,maxRecordCount:o,supportsResultType:a}=this.capabilities.query,l=i?p.Z.MAX_MAX_RECORD_COUNT_FACTOR:1,h=l*((a||n)&&r?r:o||te);return e.start=t,i?(e.maxRecordCountFactor=Math.min(l,Math.ceil(s/h)),e.num=Math.min(s,e.maxRecordCountFactor*h)):e.num=Math.min(s,h),!0}};(0,i._)([(0,a.Cb)({constructOnly:!0})],ee.prototype,"url",void 0),(0,i._)([(0,a.Cb)({constructOnly:!0})],ee.prototype,"objectIdField",void 0),(0,i._)([(0,a.Cb)({constructOnly:!0})],ee.prototype,"globalIdField",void 0),(0,i._)([(0,a.Cb)({constructOnly:!0})],ee.prototype,"capabilities",void 0),(0,i._)([(0,a.Cb)({constructOnly:!0})],ee.prototype,"sourceSpatialReference",void 0),(0,i._)([(0,a.Cb)({constructOnly:!0})],ee.prototype,"spatialReference",void 0),(0,i._)([(0,a.Cb)({constructOnly:!0})],ee.prototype,"store",void 0),(0,i._)([(0,a.Cb)({readOnly:!0})],ee.prototype,"_minimumVerticesPerFeature",null),(0,i._)([(0,a.Cb)()],ee.prototype,"filter",null),(0,i._)([(0,a.Cb)()],ee.prototype,"customParameters",null),(0,i._)([(0,a.Cb)({readOnly:!0})],ee.prototype,"_configuration",null),(0,i._)([(0,a.Cb)()],ee.prototype,"tileInfo",null),(0,i._)([(0,a.Cb)()],ee.prototype,"tileSize",null),(0,i._)([(0,a.Cb)()],ee.prototype,"tilesOfInterest",void 0),(0,i._)([(0,a.Cb)({readOnly:!0})],ee.prototype,"updating",null),(0,i._)([(0,a.Cb)({readOnly:!0})],ee.prototype,"updatingExcludingEdits",null),(0,i._)([(0,a.Cb)({readOnly:!0})],ee.prototype,"availability",void 0),(0,i._)([(0,a.Cb)()],ee.prototype,"hasZ",null),ee=(0,i._)([(0,h.j)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiledFetcher")],ee);const te=2e3,se=6e5,ie=1e6,ne=25,re=1;var oe=s(43090),ae=s(91303),le=s(37549),he=s(43077);class ue{constructor(){this._store=new Map,this._byteSize=0}set(e,t){this.delete(e),this._store.set(e,t),this._byteSize+=t.byteSize}delete(e){const t=this._store.get(e);return!!this._store.delete(e)&&(null!=t&&(this._byteSize-=t.byteSize),!0)}get(e){return this._used(e),this._store.get(e)}has(e){return this._used(e),this._store.has(e)}clear(){this._store.clear()}applyByteSizeLimit(e,t){for(const[s,i]of this._store){if(this._byteSize<=e)break;this.delete(s),t(i)}}values(){return this._store.values()}[Symbol.iterator](){return this._store[Symbol.iterator]()}_used(e){const t=this._store.get(e);t&&(this._store.delete(e),this._store.set(e,t))}}let de=class extends N.Z{constructor(e){super(e),this.tileInfo=null,this.extent=null,this.maximumByteSize=10*ae.Y.MEGABYTES,this._tileBounds=new le.H,this._tiles=new ue,this._refCounts=new Map,this._tileFeatureCounts=new Map,this._tmpBoundingRect=(0,L.Ue)()}add(e,t){const s=[];for(const e of t)this._referenceFeature(e.objectId)===me.ADDED&&s.push(e);this._addTileStorage(e,new Set(t.map((e=>e.objectId))),function(e){return e.reduce(((e,t)=>e+function(e){return 32+function(e){if(null==e)return 0;const t=(0,oe.do)(e.lengths,4);return 32+(0,oe.do)(e.coords,8)+t}(e.geometry)+(0,oe.f2)(e.attributes)}(t)),0)}(t)),this.featureStore.addMany(s),this._tiles.applyByteSizeLimit(this.maximumByteSize,(e=>this._removeTileStorage(e)))}destroy(){this.clear(),this._tileFeatureCounts.clear()}clear(){this.featureStore.clear(),this._tileBounds.clear(),this._tiles.clear(),this._refCounts.clear()}refresh(){this.clear(),this._tileFeatureCounts.clear()}processEdits(e,t,s){return this._processEditsDelete(e.deletedFeatures.concat(e.updatedFeatures)),this._processEditsRefetch(e.addedFeatures.concat(e.updatedFeatures),t,s)}_addTileStorage(e,t,s){const i=e.id;this._tiles.set(i,new ce(e,t,s)),this._tileBounds.set(i,e.extent),this._tileFeatureCounts.set(i,t.size)}_remove({id:e}){const t=this._tiles.get(e);t&&this._removeTileStorage(t)}_removeTileStorage(e){const t=[];for(const s of e.objectIds)this._unreferenceFeature(s)===me.REMOVED&&t.push(s);this.featureStore.removeManyById(t);const s=e.data.id;this._tiles.delete(s),this._tileBounds.delete(s)}_processEditsDelete(e){this.featureStore.removeManyById(e);for(const[,t]of this._tiles){for(const s of e)t.objectIds.delete(s);this._tileFeatureCounts.set(t.data.id,t.objectIds.size)}for(const t of e)this._refCounts.delete(t)}async _processEditsRefetch(e,t,s){const i=(await t(e,s)).features,{hasZ:n,hasM:r}=this.featureStore;for(const e of i){const t=(0,J.$)(this._tmpBoundingRect,e.geometry,n,r);null!=t&&this._tileBounds.forEachInBounds(t,(t=>{const s=this._tiles.get(t);this.featureStore.add(e);const i=e.objectId;s.objectIds.has(i)||(s.objectIds.add(i),this._referenceFeature(i),this._tileFeatureCounts.set(s.data.id,s.objectIds.size))}))}}process(e,t=(()=>!0)){if(null==this.tileInfo||!e.extent||null!=this.extent&&!(0,L.kK)((0,L.oJ)(this.extent,this._tmpBoundingRect),e.extent))return new fe(e);if(this._tiles.has(e.id))return new fe(e);const s=this._createTileTree(e,this.tileInfo);return this._simplify(s,t,null,0,1),this._collectMissingTiles(e,s,this.tileInfo)}get debugInfo(){return Array.from(this._tiles.values()).map((({data:e})=>({data:e,featureCount:this._tileFeatureCounts.get(e.id)||0})))}getFeatureCount(e){return this._tileFeatureCounts.get(e.id)??0}async fetchCount(e,t,s,i){const n=this._tileFeatureCounts.get(e.id);if(null!=n)return n;const r=await(0,Q.hH)(t,s,i);return this._tileFeatureCounts.set(e.id,r.data.count),r.data.count}_createTileTree(e,t){const s=new _e(e.level,e.row,e.col);return t.updateTileInfo(s,f.Z.ExtrapolateOptions.POWER_OF_TWO),this._tileBounds.forEachInBounds(e.extent,(i=>{const n=this._tiles.get(i)?.data;n&&this._tilesAreRelated(e,n)&&this._populateChildren(s,n,t,this._tileFeatureCounts.get(n.id)||0)})),s}_tilesAreRelated(e,t){if(!e||!t)return!1;if(e.level===t.level)return e.row===t.row&&e.col===t.col;const s=e.level<t.level,i=s?e:t,n=s?t:e,r=1<<n.level-i.level;return Math.floor(n.row/r)===i.row&&Math.floor(n.col/r)===i.col}_populateChildren(e,t,s,i){const n=t.level-e.level-1;if(n<0)return void(e.isLeaf=!0);const r=t.row>>n,o=t.col>>n,a=e.row<<1,l=o-(e.col<<1)+(r-a<<1),h=e.children[l];if(null!=h)this._populateChildren(h,t,s,i);else{const n=new _e(e.level+1,r,o);s.updateTileInfo(n,f.Z.ExtrapolateOptions.POWER_OF_TWO),e.children[l]=n,this._populateChildren(n,t,s,i)}}_simplify(e,t,s,i,n){const r=n*n;if(e.isLeaf)return t(this.getFeatureCount(e),n)?0:(this._remove(e),null!=s&&(s.children[i]=null),r);const o=n/2,a=o*o;let l=0;for(let s=0;s<e.children.length;s++){const i=e.children[s];l+=null!=i?this._simplify(i,t,e,s,o):a}return 0===l?this._mergeChildren(e):1-l/r<ge&&(this._purge(e),null!=s&&(s.children[i]=null),l=r),l}_mergeChildren(e){const t=new Set;let s=0;this._forEachLeaf(e,(e=>{const i=this._tiles.get(e.id);if(i){s+=i.byteSize;for(const e of i.objectIds)t.has(e)||(t.add(e),this._referenceFeature(e));this._remove(e)}})),this._addTileStorage(e,t,s),e.isLeaf=!0,e.children[0]=e.children[1]=e.children[2]=e.children[3]=null,this._tileFeatureCounts.set(e.id,t.size)}_forEachLeaf(e,t){for(const s of e.children)null!=s&&(s.isLeaf?t(s):this._forEachLeaf(s,t))}_purge(e){if(null!=e)if(e.isLeaf)this._remove(e);else for(let t=0;t<e.children.length;t++){const s=e.children[t];this._purge(s),e.children[t]=null}}_collectMissingTiles(e,t,s){const i=new pe(s,e,this.extent);return this._collectMissingTilesRecurse(t,i,1),i.info}_collectMissingTilesRecurse(e,t,s){if(e.isLeaf)return;if(!e.hasChildren)return void t.addMissing(e.level,e.row,e.col,s);const i=s/2;for(let s=0;s<e.children.length;s++){const n=e.children[s];null==n?t.addMissing(e.level+1,(e.row<<1)+((2&s)>>1),(e.col<<1)+(1&s),i):this._collectMissingTilesRecurse(n,t,i)}}_referenceFeature(e){const t=(this._refCounts.get(e)||0)+1;return this._refCounts.set(e,t),1===t?me.ADDED:me.UNCHANGED}_unreferenceFeature(e){const t=(this._refCounts.get(e)||0)-1;return 0===t?(this._refCounts.delete(e),me.REMOVED):(t>0&&this._refCounts.set(e,t),me.UNCHANGED)}get test(){return{tiles:Array.from(this._tiles.values()).map((e=>`${e.data.id}:[${Array.from(e.objectIds)}]`)),featureReferences:Array.from(this._refCounts.keys()).map((e=>`${e}:${this._refCounts.get(e)}`))}}};(0,i._)([(0,a.Cb)({constructOnly:!0})],de.prototype,"featureStore",void 0),(0,i._)([(0,a.Cb)()],de.prototype,"tileInfo",void 0),(0,i._)([(0,a.Cb)()],de.prototype,"extent",void 0),(0,i._)([(0,a.Cb)()],de.prototype,"maximumByteSize",void 0),de=(0,i._)([(0,h.j)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTileStore")],de);class ce{constructor(e,t,s){this.data=e,this.objectIds=t,this.byteSize=s}}class _e{constructor(e,t,s){this.level=e,this.row=t,this.col=s,this.isLeaf=!1,this.extent=null,this.children=[null,null,null,null]}get hasChildren(){return!this.isLeaf&&(null!=this.children[0]||null!=this.children[1]||null!=this.children[2]||null!=this.children[3])}}class fe{constructor(e,t=[]){this.missingTiles=t,this.fullArea=0,this.coveredArea=0,this.fullArea=(0,L.SO)(e.extent),this.coveredArea=this.fullArea}prepend(e){this.missingTiles=e.missingTiles.concat(this.missingTiles),this.coveredArea+=e.coveredArea,this.fullArea+=e.fullArea}}class pe{constructor(e,t,s){this._tileInfo=e,this._extent=null,this.info=new fe(t),null!=s&&(this._extent=(0,L.oJ)(s))}addMissing(e,t,s,i){const n=new he.f(null,e,t,s);this._tileInfo.updateTileInfo(n,f.Z.ExtrapolateOptions.POWER_OF_TWO),null==n.extent||null!=this._extent&&!(0,L.kK)(this._extent,n.extent)||(this.info.missingTiles.push({data:n,resolution:i}),this.info.coveredArea-=(0,L.SO)(n.extent))}}const ge=.18751;var me;!function(e){e[e.ADDED=0]="ADDED",e[e.REMOVED=1]="REMOVED",e[e.UNCHANGED=2]="UNCHANGED"}(me||(me={}));let ye=class extends n.Z.EventedAccessor{constructor(){super(...arguments),this._isInitializing=!0,this.remoteClient=null,this._whenSetup=(0,r.hh)(),this._elevationAligner=C(),this._elevationFilter=O(),this._symbologyCandidatesFetcher=z(),this._updatingHandles=new u.R,this._editsUpdatingHandles=new u.R,this._pendingApplyEdits=new Map,this._alignPointsInFeatures=async(e,t)=>{const s={points:e},i=await this.remoteClient.invoke("alignElevation",s,{signal:t});return(0,r.k_)(t),i},this._getSymbologyCandidates=async(e,t)=>{const s={candidates:e,spatialReference:this._spatialReference.toJSON()},i=await this.remoteClient.invoke("getSymbologyCandidates",s,{signal:t});return(0,r.k_)(t),i}}get updating(){return this.updatingExcludingEdits||this._editsUpdatingHandles.updating||this._featureFetcher.updating}get updatingExcludingEdits(){return this._featureFetcher.updatingExcludingEdits||this._isInitializing||this._updatingHandles.updating}destroy(){this._featureFetcher?.destroy(),this._queryEngine?.destroy(),this._featureStore?.clear()}async setup(e){if(this.destroyed)return{result:{}};const{geometryType:t,objectIdField:s,timeInfo:i,fields:n}=e.serviceInfo,{hasZ:r}=e,a=d.Z.fromJSON(e.spatialReference);this._spatialReference=a,this._featureStore=new c.Z({...e.serviceInfo,hasZ:r,hasM:!1}),this._queryEngine=new _.q({spatialReference:e.spatialReference,featureStore:this._featureStore,geometryType:t,fields:n,hasZ:r,hasM:!1,objectIdField:s,timeInfo:i}),this._featureFetcher=new ee({store:new de({featureStore:this._featureStore}),url:e.serviceInfo.url,objectIdField:e.serviceInfo.objectIdField,globalIdField:e.serviceInfo.globalIdField,capabilities:e.serviceInfo.capabilities,spatialReference:a,sourceSpatialReference:d.Z.fromJSON(e.serviceInfo.spatialReference)});const l="3d"===e.configuration.viewType;return this._elevationAligner=C(l,{elevationInfo:null!=e.elevationInfo?g.Z.fromJSON(e.elevationInfo):null,alignPointsInFeatures:this._alignPointsInFeatures,spatialReference:a}),this._elevationFilter=O(l),this.addHandles([(0,o.YP)((()=>this._featureFetcher.availability),(e=>this.emit("notify-availability",{availability:e})),o.Z_),(0,o.YP)((()=>this.updating),(()=>this._notifyUpdating()))]),this._whenSetup.resolve(),this._isInitializing=!1,this.configure(e.configuration)}async configure(e){return await this._updatingHandles.addPromise(this._whenSetup.promise),this._updateFeatureFetcherConfiguration(e),{result:{}}}async fetchCandidates(e,t){await this._whenSetup.promise,(0,r.k_)(t);const s=function(e){return{point:e.point,mode:e.mode,distance:e.distance,returnEdge:e.returnEdge,returnVertex:e.returnVertex,query:null!=e.filter?e.filter:{where:"1=1"}}}(e),i=null!=t?t.signal:null,n=await this._queryEngine.executeQueryForSnapping(s,i);(0,r.k_)(i);const o=await this._elevationAligner.alignCandidates(n.candidates,i);(0,r.k_)(i);const a=await this._symbologyCandidatesFetcher.fetch(o,i);(0,r.k_)(i);const l=0===a.length?o:o.concat(a);return{result:{candidates:this._elevationFilter.filter(s,l)}}}async updateTiles(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.k_)(t),this._featureFetcher.tileSize=e.tileSize,this._featureFetcher.tilesOfInterest=e.tiles,this._featureFetcher.tileInfo=null!=e.tileInfo?f.Z.fromJSON(e.tileInfo):null,xe}async refresh(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.k_)(t),this._featureFetcher.refresh(),xe}async whenNotUpdating(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.k_)(t),await(0,o.N1)((()=>!this.updatingExcludingEdits),t),(0,r.k_)(t),xe}async getDebugInfo(e,t){return(0,r.k_)(t),{result:this._featureFetcher.debugInfo}}async beginApplyEdits(e,t){this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.k_)(t);const s=(0,r.hh)();return this._pendingApplyEdits.set(e.id,s),this._featureFetcher.applyEdits(s.promise),this._editsUpdatingHandles.addPromise(s.promise),xe}async endApplyEdits(e,t){const s=this._pendingApplyEdits.get(e.id);return s&&s.resolve(e.edits),(0,r.k_)(t),xe}async notifyElevationSourceChange(e,t){return this._elevationAligner.notifyElevationSourceChange(),xe}async notifySymbologyChange(e,t){return this._symbologyCandidatesFetcher.notifySymbologyChange(),xe}async setSymbologySnappingSupported(e){return this._symbologyCandidatesFetcher=z(e,this._getSymbologyCandidates),xe}_updateFeatureFetcherConfiguration(e){this._featureFetcher.filter=null!=e.filter?p.Z.fromJSON(e.filter):null,this._featureFetcher.customParameters=e.customParameters}_notifyUpdating(){this.emit("notify-updating",{updating:this.updating})}};(0,i._)([(0,a.Cb)({readOnly:!0})],ye.prototype,"updating",null),(0,i._)([(0,a.Cb)({readOnly:!0})],ye.prototype,"updatingExcludingEdits",null),(0,i._)([(0,a.Cb)()],ye.prototype,"_isInitializing",void 0),ye=(0,i._)([(0,h.j)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceSnappingSourceWorker")],ye);const Ee=ye,xe={result:{}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4982],{95401:(t,e,r)=>{r.d(e,{e:()=>l});var n,i,o,s=r(5732),a={exports:{}};n=a,i=function(){function t(t,r,i){i=i||2;var o,s,a,u,x,h,y,c=r&&r.length,f=c?r[0]*i:t.length,d=e(t,0,f,i,!0),v=[];if(!d||d.next===d.prev)return v;if(c&&(d=l(t,r,d,i)),t.length>80*i){o=a=t[0],s=u=t[1];for(var g=i;g<f;g+=i)(x=t[g])<o&&(o=x),(h=t[g+1])<s&&(s=h),x>a&&(a=x),h>u&&(u=h);y=0!==(y=Math.max(a-o,u-s))?1/y:0}return n(d,v,i,o,s,y),v}function e(t,e,r,n,i){var o,s;if(i===B(t,e,r,n)>0)for(o=e;o<r;o+=n)s=L(o,t[o],t[o+1],s);else for(o=r-n;o>=e;o-=n)s=L(o,t[o],t[o+1],s);if(s&&_(s,s.next)){var a=s.next;R(s),s=a}return s}function r(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!_(n,n.next)&&0!==p(n.prev,n,n.next))n=n.next;else{var i=n.prev;if(R(n),(n=e=i)===n.next)break;r=!0}}while(r||n!==e);return e}function n(t,e,l,u,x,h,y){if(t){!y&&h&&c(t,u,x,h);for(var f,d,v=t;t.prev!==t.next;)if(f=t.prev,d=t.next,h?o(t,u,x,h):i(t))e.push(f.i/l),e.push(t.i/l),e.push(d.i/l),R(t),t=d.next,v=d.next;else if((t=d)===v){y?1===y?n(t=s(r(t),e,l),e,l,u,x,h,2):2===y&&a(t,e,l,u,x,h):n(r(t),e,l,u,x,h,1);break}}}function i(t){var e=t.prev,r=t,n=t.next;if(p(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(v(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&p(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function o(t,e,r,n){var i=t.prev,o=t,s=t.next;if(p(i,o,s)>=0)return!1;for(var a=i.x<o.x?i.x<s.x?i.x:s.x:o.x<s.x?o.x:s.x,l=i.y<o.y?i.y<s.y?i.y:s.y:o.y<s.y?o.y:s.y,u=i.x>o.x?i.x>s.x?i.x:s.x:o.x>s.x?o.x:s.x,x=i.y>o.y?i.y>s.y?i.y:s.y:o.y>s.y?o.y:s.y,h=f(a,l,e,r,n),y=f(u,x,e,r,n),c=t.prevZ,d=t.nextZ;c&&c.z>=h&&d&&d.z<=y;){if(c!==t.prev&&c!==t.next&&v(i.x,i.y,o.x,o.y,s.x,s.y,c.x,c.y)&&p(c.prev,c,c.next)>=0)return!1;if(c=c.prevZ,d!==t.prev&&d!==t.next&&v(i.x,i.y,o.x,o.y,s.x,s.y,d.x,d.y)&&p(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;c&&c.z>=h;){if(c!==t.prev&&c!==t.next&&v(i.x,i.y,o.x,o.y,s.x,s.y,c.x,c.y)&&p(c.prev,c,c.next)>=0)return!1;c=c.prevZ}for(;d&&d.z<=y;){if(d!==t.prev&&d!==t.next&&v(i.x,i.y,o.x,o.y,s.x,s.y,d.x,d.y)&&p(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function s(t,e,n){var i=t;do{var o=i.prev,s=i.next.next;!_(o,s)&&T(o,i,i.next,s)&&b(o,s)&&b(s,o)&&(e.push(o.i/n),e.push(i.i/n),e.push(s.i/n),R(i),R(i.next),i=t=s),i=i.next}while(i!==t);return r(i)}function a(t,e,i,o,s,a){var l=t;do{for(var u=l.next.next;u!==l.prev;){if(l.i!==u.i&&g(l,u)){var x=A(l,u);return l=r(l,l.next),x=r(x,x.next),n(l,e,i,o,s,a),void n(x,e,i,o,s,a)}u=u.next}l=l.next}while(l!==t)}function l(t,n,i,o){var s,a,l,x=[];for(s=0,a=n.length;s<a;s++)(l=e(t,n[s]*o,s<a-1?n[s+1]*o:t.length,o,!1))===l.next&&(l.steiner=!0),x.push(d(l));for(x.sort(u),s=0;s<x.length;s++)i=r(i=h(x[s],i),i.next);return i}function u(t,e){return t.x-e.x}function x(t){if(t.next.prev===t)return t;let e=t;for(;;){const r=e.next;if(r.prev===e||r===e||r===t)break;e=r}return e}function h(t,e){var n=function(t,e){var r,n=e,i=t.x,o=t.y,s=-1/0;do{if(o<=n.y&&o>=n.next.y&&n.next.y!==n.y){var a=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=i&&a>s){if(s=a,a===i){if(o===n.y)return n;if(o===n.next.y)return n.next}r=n.x<n.next.x?n:n.next}}n=n.next}while(n!==e);if(!r)return null;if(i===s)return r;var l,u=r,x=r.x,h=r.y,c=1/0;n=r;do{i>=n.x&&n.x>=x&&i!==n.x&&v(o<h?i:s,o,x,h,o<h?s:i,o,n.x,n.y)&&(l=Math.abs(o-n.y)/(i-n.x),b(n,t)&&(l<c||l===c&&(n.x>r.x||n.x===r.x&&y(r,n)))&&(r=n,c=l)),n=n.next}while(n!==u);return r}(t,e);if(!n)return e;var i=A(n,t),o=r(n,n.next);let s=x(i);return r(s,s.next),o=x(o),x(e===n?o:e)}function y(t,e){return p(t.prev,t,e.prev)<0&&p(e.next,t,t.next)<0}function c(t,e,r,n){var i=t;do{null===i.z&&(i.z=f(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,r,n,i,o,s,a,l,u=1;do{for(r=t,t=null,o=null,s=0;r;){for(s++,n=r,a=0,e=0;e<u&&(a++,n=n.nextZ);e++);for(l=u;a>0||l>0&&n;)0!==a&&(0===l||!n||r.z<=n.z)?(i=r,r=r.nextZ,a--):(i=n,n=n.nextZ,l--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;r=n}o.nextZ=null,u*=2}while(s>1)}(i)}function f(t,e,r,n,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function d(t){var e=t,r=t;do{(e.x<r.x||e.x===r.x&&e.y<r.y)&&(r=e),e=e.next}while(e!==t);return r}function v(t,e,r,n,i,o,s,a){return(i-s)*(e-a)-(t-s)*(o-a)>=0&&(t-s)*(n-a)-(r-s)*(e-a)>=0&&(r-s)*(o-a)-(i-s)*(n-a)>=0}function g(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&T(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&(b(t,e)&&b(e,t)&&function(t,e){var r=t,n=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{r.y>o!=r.next.y>o&&r.next.y!==r.y&&i<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==t);return n}(t,e)&&(p(t.prev,t,e.prev)||p(t,e.prev,e))||_(t,e)&&p(t.prev,t,t.next)>0&&p(e.prev,e,e.next)>0)}function p(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function _(t,e){return t.x===e.x&&t.y===e.y}function T(t,e,r,n){var i=w(p(t,e,r)),o=w(p(t,e,n)),s=w(p(r,n,t)),a=w(p(r,n,e));return i!==o&&s!==a||!(0!==i||!m(t,r,e))||!(0!==o||!m(t,n,e))||!(0!==s||!m(r,t,n))||!(0!==a||!m(r,e,n))}function m(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function w(t){return t>0?1:t<0?-1:0}function b(t,e){return p(t.prev,t,t.next)<0?p(t,e,t.next)>=0&&p(t,t.prev,e)>=0:p(t,e,t.prev)<0||p(t,t.next,e)<0}function A(t,e){var r=new U(t.i,t.x,t.y),n=new U(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,o.next=n,n.prev=o,n}function L(t,e,r,n){var i=new U(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function R(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function U(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function B(t,e,r,n){for(var i=0,o=e,s=r-n;o<r;o+=n)i+=(t[s]-t[o])*(t[o+1]+t[s+1]),s=o;return i}return t.deviation=function(t,e,r,n){var i=e&&e.length,o=i?e[0]*r:t.length,s=Math.abs(B(t,0,o,r));if(i)for(var a=0,l=e.length;a<l;a++){var u=e[a]*r,x=a<l-1?e[a+1]*r:t.length;s-=Math.abs(B(t,u,x,r))}var h=0;for(a=0;a<n.length;a+=3){var y=n[a]*r,c=n[a+1]*r,f=n[a+2]*r;h+=Math.abs((t[y]-t[f])*(t[c+1]-t[y+1])-(t[y]-t[c])*(t[f+1]-t[y+1]))}return 0===s&&0===h?0:Math.abs((h-s)/s)},t.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},n=0,i=0;i<t.length;i++){for(var o=0;o<t[i].length;o++)for(var s=0;s<e;s++)r.vertices.push(t[i][o][s]);i>0&&(n+=t[i-1].length,r.holes.push(n))}return r},t},void 0!==(o=i())&&(n.exports=o);const l=(0,s.g)(a.exports)},35270:(t,e,r)=>{r.d(e,{B7:()=>l,St:()=>i,VL:()=>s,h$:()=>o,rW:()=>u});const n={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,50,1]};function i(t){return!!n[t]||!!n[t.toLowerCase()]}function o(t){return n[t]??n[t.toLowerCase()]}function s(t){return[...o(t)]}function a(t,e,r){r<0&&++r,r>1&&--r;const n=6*r;return n<1?t+(e-t)*n:2*r<1?e:3*r<2?t+(e-t)*(2/3-r)*6:t}function l(t,e,r,n=1){const i=(t%360+360)%360/360,o=r<=.5?r*(e+1):r+e-r*e,s=2*r-o;return[Math.round(255*a(s,o,i+1/3)),Math.round(255*a(s,o,i)),Math.round(255*a(s,o,i-1/3)),n]}function u(t){const e=t.length>5,r=e?8:4,n=(1<<r)-1,i=e?1:17,o=e?9===t.length:5===t.length;let s=Number("0x"+t.substr(1));if(isNaN(s))return null;const a=[0,0,0,1];let l;return o&&(l=s&n,s>>=r,a[3]=i*l/255),l=s&n,s>>=r,a[2]=i*l,l=s&n,s>>=r,a[1]=i*l,l=s&n,s>>=r,a[0]=i*l,a}},79087:(t,e,r)=>{r.d(e,{Z:()=>M});const n=[["(",")"],[")","("],["<",">"],[">","<"],["[","]"],["]","["],["{","}"],["}","{"],["«","»"],["»","«"],["‹","›"],["›","‹"],["⁽","⁾"],["⁾","⁽"],["₍","₎"],["₎","₍"],["≤","≥"],["≥","≤"],["〈","〉"],["〉","〈"],["﹙","﹚"],["﹚","﹙"],["﹛","﹜"],["﹜","﹛"],["﹝","﹞"],["﹞","﹝"],["﹤","﹥"],["﹥","﹤"]],i=["آ","أ","إ","ا"],o=["ﻵ","ﻷ","ﻹ","ﻻ"],s=["ﻶ","ﻸ","ﻺ","ﻼ"],a=["ا","ب","ت","ث","ج","ح","خ","د","ذ","ر","ز","س","ش","ص","ض","ط","ظ","ع","غ","ف","ق","ك","ل","م","ن","ه","و","ي","إ","أ","آ","ة","ى","ل","م","ن","ه","و","ي","إ","أ","آ","ة","ى","ی","ئ","ؤ"],l=["ﺍ","ﺏ","ﺕ","ﺙ","ﺝ","ﺡ","ﺥ","ﺩ","ﺫ","ﺭ","ﺯ","ﺱ","ﺵ","ﺹ","ﺽ","ﻁ","ﻅ","ﻉ","ﻍ","ﻑ","ﻕ","ﻙ","ﻝ","ﻡ","ﻥ","ﻩ","ﻭ","ﻱ","ﺇ","ﺃ","ﺁ","ﺓ","ﻯ","ﯼ","ﺉ","ﺅ","ﹰ","ﹲ","ﹴ","ﹶ","ﹸ","ﹺ","ﹼ","ﹾ","ﺀ","ﺉ","ﺅ"],u=["ﺎ","ﺐ","ﺖ","ﺚ","ﺞ","ﺢ","ﺦ","ﺪ","ﺬ","ﺮ","ﺰ","ﺲ","ﺶ","ﺺ","ﺾ","ﻂ","ﻆ","ﻊ","ﻎ","ﻒ","ﻖ","ﻚ","ﻞ","ﻢ","ﻦ","ﻪ","ﻮ","ﻲ","ﺈ","ﺄ","ﺂ","ﺔ","ﻰ","ﯽ","ﺊ","ﺆ","ﹰ","ﹲ","ﹴ","ﹶ","ﹸ","ﹺ","ﹼ","ﹾ","ﺀ","ﺊ","ﺆ"],x=["ﺎ","ﺒ","ﺘ","ﺜ","ﺠ","ﺤ","ﺨ","ﺪ","ﺬ","ﺮ","ﺰ","ﺴ","ﺸ","ﺼ","ﻀ","ﻄ","ﻈ","ﻌ","ﻐ","ﻔ","ﻘ","ﻜ","ﻠ","ﻤ","ﻨ","ﻬ","ﻮ","ﻴ","ﺈ","ﺄ","ﺂ","ﺔ","ﻰ","ﯿ","ﺌ","ﺆ","ﹱ","ﹲ","ﹴ","ﹷ","ﹹ","ﹻ","ﹽ","ﹿ","ﺀ","ﺌ","ﺆ"],h=["ﺍ","ﺑ","ﺗ","ﺛ","ﺟ","ﺣ","ﺧ","ﺩ","ﺫ","ﺭ","ﺯ","ﺳ","ﺷ","ﺻ","ﺿ","ﻃ","ﻇ","ﻋ","ﻏ","ﻓ","ﻗ","ﻛ","ﻟ","ﻣ","ﻧ","ﻫ","ﻭ","ﻳ","ﺇ","ﺃ","ﺁ","ﺓ","ﻯ","ﯾ","ﺋ","ﺅ","ﹰ","ﹲ","ﹴ","ﹶ","ﹸ","ﹺ","ﹼ","ﹾ","ﺀ","ﺋ","ﺅ"],y=["ء","آ","أ","ؤ","إ","ا","ة","د","ذ","ر","ز","و","ى"],c=["ً","ً","ٌ","؟","ٍ","؟","َ","َ","ُ","ُ","ِ","ِ","ّ","ّ","ْ","ْ","ء","آ","آ","أ","أ","ؤ","ؤ","إ","إ","ئ","ئ","ئ","ئ","ا","ا","ب","ب","ب","ب","ة","ة","ت","ت","ت","ت","ث","ث","ث","ث","ج","ج","ج","ج","ح","ح","ح","ح","خ","خ","خ","خ","د","د","ذ","ذ","ر","ر","ز","ز","س","س","س","س","ش","ش","ش","ش","ص","ص","ص","ص","ض","ض","ض","ض","ط","ط","ط","ط","ظ","ظ","ظ","ظ","ع","ع","ع","ع","غ","غ","غ","غ","ف","ف","ف","ف","ق","ق","ق","ق","ك","ك","ك","ك","ل","ل","ل","ل","م","م","م","م","ن","ن","ن","ن","ه","ه","ه","ه","و","و","ى","ى","ي","ي","ي","ي","ﻵ","ﻶ","ﻷ","ﻸ","ﻹ","ﻺ","ﻻ","ﻼ","؟","؟","؟"],f=["ء","ف"],d=["غ","ي"],v=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],g=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],p=0,_=1,T=2,m=3,w=4,b=5,A=6,L=7,R=8,U=10,B=11,k=12,N=18,F=["UBAT_L","UBAT_R","UBAT_EN","UBAT_AN","UBAT_ON","UBAT_B","UBAT_S","UBAT_AL","UBAT_WS","UBAT_CS","UBAT_ES","UBAT_ET","UBAT_NSM","UBAT_LRE","UBAT_RLE","UBAT_PDF","UBAT_LRO","UBAT_RLO","UBAT_BN"],V=100,S=[V+0,p,p,p,p,V+1,V+2,V+3,_,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,V+4,w,w,w,p,w,p,w,p,w,w,w,p,p,w,w,p,p,p,p,p,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,p,p,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,p,p,p,p,p,p,p,p,p,p,p,p,p,p,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,p,p,w,w,p,p,w,w,p,p,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,p,p,p,V+5,L,L,V+6,V+7],E=[[N,N,N,N,N,N,N,N,N,A,b,A,R,b,N,N,N,N,N,N,N,N,N,N,N,N,N,N,b,b,b,A,R,w,w,B,B,B,w,w,w,w,w,U,9,U,9,9,T,T,T,T,T,T,T,T,T,T,9,w,w,w,w,w,w,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,w,w,w,w,w,w,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,w,w,w,w,N,N,N,N,N,N,b,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,9,w,B,B,B,B,w,w,w,w,p,w,w,N,w,w,B,B,T,T,w,p,w,w,w,T,p,w,w,w,w,w,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,w,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,w,p,p,p,p,p,p,p,p],[p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,w,w,w,w,w,w,w,w,w,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,w,w,p,p,p,p,p,p,p,w,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,w,p,w,w,w,w,w,w,w,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,_,k,_,k,k,_,k,k,_,k,w,w,w,w,w,w,w,w,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,w,w,w,w,w,_,_,_,_,_,w,w,w,w,w,w,w,w,w,w,w],[m,m,m,m,w,w,w,w,L,B,B,L,9,L,w,w,k,k,k,k,k,k,k,k,k,k,k,L,w,w,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,m,m,m,m,m,m,m,m,m,m,B,m,m,L,L,L,k,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,k,k,k,k,k,k,k,m,w,k,k,k,k,k,k,L,L,k,k,w,k,k,k,k,L,L,T,T,T,T,T,T,T,T,T,T,L,L,L,L,L,L],[L,L,L,L,L,L,L,L,L,L,L,L,L,L,w,L,L,k,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,w,w,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,k,k,k,k,k,k,k,k,k,k,k,L,w,w,w,w,w,w,w,w,w,w,w,w,w,w,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,k,k,k,k,k,k,k,k,k,_,_,w,w,w,w,_,w,w,w,w,w],[R,R,R,R,R,R,R,R,R,R,R,N,N,N,p,_,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,R,b,13,14,15,16,17,9,B,B,B,B,B,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,9,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,R,N,N,N,N,N,w,w,w,w,w,N,N,N,N,N,N,T,p,w,w,T,T,T,T,T,T,U,U,w,w,w,p,T,T,T,T,T,T,T,T,T,T,U,U,w,w,w,w,p,p,p,p,p,p,p,p,p,p,p,p,p,w,w,w,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w],[p,p,p,p,p,p,p,w,w,w,w,w,w,w,w,w,w,w,w,p,p,p,p,p,w,w,w,w,w,_,k,_,_,_,_,_,_,_,_,_,_,U,_,_,_,_,_,_,_,_,_,_,_,_,_,w,_,_,_,_,_,w,_,w,_,_,w,_,_,w,_,_,_,_,_,_,_,_,_,_,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L],[k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,k,k,k,k,k,k,k,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,9,w,9,w,w,9,w,w,w,w,w,w,w,w,w,B,w,w,U,U,w,w,w,w,w,B,B,w,w,w,w,w,L,L,L,L,L,w,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,w,w,N],[w,w,w,B,B,B,w,w,w,w,w,U,9,U,9,9,T,T,T,T,T,T,T,T,T,T,9,w,w,w,w,w,w,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,w,w,w,w,w,w,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,w,w,w,w,w,w,w,w,w,w,w,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,w,w,w,p,p,p,p,p,p,w,w,p,p,p,p,p,p,w,w,p,p,p,p,p,p,w,w,p,p,p,w,w,w,B,B,w,w,w,B,B,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w]];class M{constructor(){this.inputFormat="ILYNN",this.outputFormat="VLNNN",this.sourceToTarget=[],this.targetToSource=[],this.levels=[]}bidiTransform(t,e,r){if(this.sourceToTarget=[],this.targetToSource=[],!t)return"";if(function(t,e,r){nt=[],ot=[];for(let n=0;n<r;n++)t[n]=n,e[n]=n,nt[n]=n}(this.sourceToTarget,this.targetToSource,t.length),!this.checkParameters(e,r))return t;e=this.inputFormat,r=this.outputFormat;let n=t;const a=st,x=K(e.charAt(1)),y=K(r.charAt(1)),f=("I"===e.charAt(0)?"L":e.charAt(0))+x,d=("I"===r.charAt(0)?"L":r.charAt(0))+y,v=e.charAt(2)+r.charAt(2);a.defInFormat=f,a.defOutFormat=d,a.defSwap=v;const g=Z(t,f,d,v,a);let p=!1;return"R"===r.charAt(1)?p=!0:"C"!==r.charAt(1)&&"D"!==r.charAt(1)||(p="rtl"===this.checkContextual(g)),this.sourceToTarget=nt,this.targetToSource=function(t){const e=new Array(t.length);for(let r=0;r<t.length;r++)e[t[r]]=r;return e}(this.sourceToTarget),it=this.targetToSource,n=e.charAt(3)===r.charAt(3)?g:"S"===r.charAt(3)?function(t,e,r){if(0===e.length)return"";void 0===t&&(t=!0),void 0===r&&(r=!0);const n=(e=String(e)).split("");let i=0,a=1,x=n.length;t||(i=n.length-1,a=-1,x=1);const y=function(t,e,r,n,i){let a=0;const x=[];let y=0;for(let c=e;c*r<n;c+=r)if(q(t[c])||J(t[c])){if("ل"===t[c]&&P(t,c+r,r,n)){t[c]=et(t[c+r],0===a?o:s),c+=r,tt(t,c,r,n),i&&(x[y]=c,y++),a=0;continue}const e=t[c];1===a?t[c]=H(t,c+r,r,n)?X(t[c]):G(t[c],u):!0===H(t,c+r,r,n)?t[c]=G(t[c],h):t[c]=G(t[c],l),J(e)||(a=1),!0===$(e)&&(a=0)}else a=0;return x}(n,i,a,x,r);let c="";for(let e=0;e<n.length;e++)r&&j(y,y.length,e)>-1?(rt(it,e,!t,-1),nt.splice(e,1)):c+=n[e];return c}(p,g,!0):function(t,e,r){if(0===t.length)return"";void 0===r&&(r=!0),void 0===e&&(e=!0);let n="";const o=(t=String(t)).split("");for(let s=0;s<t.length;s++){let a=!1;if(o[s]>="ﹰ"&&o[s]<"\ufeff"){const l=t.charCodeAt(s);o[s]>="ﻵ"&&o[s]<="ﻼ"?(e?(s>0&&r&&" "===o[s-1]?n=n.substring(0,n.length-1)+"ل":(n+="ل",a=!0),n+=i[(l-65269)/2]):(n+=i[(l-65269)/2],n+="ل",s+1<t.length&&r&&" "===o[s+1]?s++:a=!0),a&&(rt(it,s,!0,1),nt.splice(s,0,nt[s]))):n+=c[l-65136]}else n+=o[s]}return n}(g,p,!0),this.sourceToTarget=nt,this.targetToSource=it,this.levels=ot,n}_inputFormatSetter(t){if(!ht.test(t))throw new Error("dojox/string/BidiEngine: the bidi layout string is wrong!");this.inputFormat=t}_outputFormatSetter(t){if(!ht.test(t))throw new Error("dojox/string/BidiEngine: the bidi layout string is wrong!");this.outputFormat=t}checkParameters(t,e){return t?this._inputFormatSetter(t):t=this.inputFormat,e?this._outputFormatSetter(e):e=this.outputFormat,t!==e}checkContextual(t){let e=C(t);if("ltr"!==e&&"rtl"!==e){try{e=document.dir.toLowerCase()}catch(t){}"ltr"!==e&&"rtl"!==e&&(e="ltr")}return e}hasBidiChar(t){return yt.test(t)}}function Z(t,e,r,n,i){const o=function(t,e,r){if(void 0===e.inFormat&&(e.inFormat=r.defInFormat),void 0===e.outFormat&&(e.outFormat=r.defOutFormat),void 0===e.swap&&(e.swap=r.defSwap),e.inFormat===e.outFormat)return e;const n=e.inFormat.substring(0,1),i=e.outFormat.substring(0,1);let o,s=e.inFormat.substring(1,4),a=e.outFormat.substring(1,4);return"C"===s.charAt(0)&&(o=C(t),s="ltr"===o||"rtl"===o?o.toUpperCase():"L"===e.inFormat.charAt(2)?"LTR":"RTL",e.inFormat=n+s),"C"===a.charAt(0)&&(o=C(t),"rtl"===o?a="RTL":"ltr"===o?(o=function(t){const e=t.split("");return e.reverse(),C(e.join(""))}(t),a=o.toUpperCase()):a="L"===e.outFormat.charAt(2)?"LTR":"RTL",e.outFormat=i+a),e}(t,{inFormat:e,outFormat:r,swap:n},i);if(o.inFormat===o.outFormat)return t;e=o.inFormat,r=o.outFormat,n=o.swap;const s=e.substring(0,1),a=e.substring(1,4),l=r.substring(0,1),u=r.substring(1,4);if(i.inFormat=e,i.outFormat=r,i.swap=n,"L"===s&&"VLTR"===r){if("LTR"===a)return i.dir=ut,D(t,i);if("RTL"===a)return i.dir=xt,D(t,i)}if("V"===s&&"V"===l)return i.dir="RTL"===a?xt:ut,I(t,i);if("L"===s&&"VRTL"===r)return"LTR"===a?(i.dir=ut,t=D(t,i)):(i.dir=xt,t=D(t,i)),I(t);if("VLTR"===e&&"LLTR"===r)return i.dir=ut,D(t,i);if("V"===s&&"L"===l&&a!==u)return t=I(t),"RTL"===a?Z(t,"LLTR","VLTR",n,i):Z(t,"LRTL","VRTL",n,i);if("VRTL"===e&&"LRTL"===r)return Z(t,"LRTL","VRTL",n,i);if("L"===s&&"L"===l){const e=i.swap;return i.swap=e.substr(0,1)+"N","RTL"===a?(i.dir=xt,t=D(t,i),i.swap="N"+e.substr(1,2),i.dir=ut,t=D(t,i)):(i.dir=ut,t=D(t,i),i.swap="N"+e.substr(1,2),t=Z(t,"VLTR","LRTL",i.swap,i)),t}return t}function C(t){const e=/[A-Za-z\u05d0-\u065f\u066a-\u06ef\u06fa-\u07ff\ufb1d-\ufdff\ufe70-\ufefc]/.exec(t);return e?e[0]<="z"?"ltr":"rtl":""}function D(t,e){const r=t.split(""),n=[];return O(r,n,e),function(t,e,r){if(0!==r.hiLevel&&r.swap.substr(0,1)!==r.swap.substr(1,2))for(let r=0;r<t.length;r++)1===e[r]&&(t[r]=Q(t[r]))}(r,n,e),W(2,r,n,e),W(1,r,n,e),ot=n,r.join("")}function O(t,e,r){const n=t.length,i=r.dir?g:v;let o=0,s=-1;const a=[],l=[];r.hiLevel=r.dir,r.lastArabic=!1,r.hasUbatAl=!1,r.hasUbatB=!1,r.hasUbatS=!1;for(let e=0;e<n;e++)a[e]=z(t[e]);for(let u=0;u<n;u++){const n=o,x=Y(t,a,l,u,r);l[u]=x,o=i[n][x];const h=240&o;o&=15;const y=i[o][at];if(e[u]=y,h>0)if(16===h){for(let t=s;t<u;t++)e[t]=1;s=-1}else s=-1;if(i[o][lt])-1===s&&(s=u);else if(s>-1){for(let t=s;t<u;t++)e[t]=y;s=-1}a[u]===b&&(e[u]=0),r.hiLevel|=y}r.hasUbatS&&function(t,e,r,n){for(let i=0;i<r;i++)if(t[i]===A){e[i]=n.dir;for(let r=i-1;r>=0&&t[r]===R;r--)e[r]=n.dir}}(a,e,n,r)}function z(t){const e=t.charCodeAt(0),r=S[e>>8];return r<V?r:E[r-V][255&e]}function I(t,e){const r=t.split("");if(e){const t=[];O(r,t,e),ot=t}return r.reverse(),nt.reverse(),r.join("")}function j(t,e,r){for(let n=0;n<e;n++)if(t[n]===r)return n;return-1}function q(t){for(let e=0;e<f.length;e++)if(t>=f[e]&&t<=d[e])return!0;return!1}function H(t,e,r,n){for(;e*r<n&&J(t[e]);)e+=r;return!!(e*r<n&&q(t[e]))}function P(t,e,r,n){for(;e*r<n&&J(t[e]);)e+=r;let o=" ";if(!(e*r<n))return!1;o=t[e];for(let t=0;t<i.length;t++)if(i[t]===o)return!0;return!1}function W(t,e,r,n){if(n.hiLevel<t)return;if(1===t&&n.dir===xt&&!n.hasUbatB)return e.reverse(),void nt.reverse();const i=e.length;let o,s,a,l,u,x=0;for(;x<i;){if(r[x]>=t){for(o=x+1;o<i&&r[o]>=t;)o++;for(s=x,a=o-1;s<a;s++,a--)l=e[s],e[s]=e[a],e[a]=l,u=nt[s],nt[s]=nt[a],nt[a]=u;x=o}x++}}function Y(t,e,r,n,i){const o=e[n];return{UBAT_L:()=>(i.lastArabic=!1,p),UBAT_R:()=>(i.lastArabic=!1,_),UBAT_ON:()=>w,UBAT_AN:()=>m,UBAT_EN:()=>i.lastArabic?m:T,UBAT_AL:()=>(i.lastArabic=!0,i.hasUbatAl=!0,_),UBAT_WS:()=>w,UBAT_CS:()=>{let t,o;return n<1||n+1>=e.length||(t=r[n-1])!==T&&t!==m||(o=e[n+1])!==T&&o!==m?w:(i.lastArabic&&(o=m),o===t?o:w)},UBAT_ES:()=>(n>0?r[n-1]:b)===T&&n+1<e.length&&e[n+1]===T?T:w,UBAT_ET:()=>{if(n>0&&r[n-1]===T)return T;if(i.lastArabic)return w;let t=n+1;const o=e.length;for(;t<o&&e[t]===B;)t++;return t<o&&e[t]===T?T:w},UBAT_NSM:()=>{if("VLTR"===i.inFormat){const r=e.length;let i=n+1;for(;i<r&&e[i]===k;)i++;if(i<r){const r=t[n].charCodeAt(0),o=r>=1425&&r<=2303||64286===r,s=e[i];if(o&&(s===_||s===L))return _}}return n<1||e[n-1]===b?w:r[n-1]},UBAT_B:()=>(i.lastArabic=!0,i.hasUbatB=!0,i.dir),UBAT_S:()=>(i.hasUbatS=!0,w),UBAT_LRE:()=>(i.lastArabic=!1,w),UBAT_RLE:()=>(i.lastArabic=!1,w),UBAT_LRO:()=>(i.lastArabic=!1,w),UBAT_RLO:()=>(i.lastArabic=!1,w),UBAT_PDF:()=>(i.lastArabic=!1,w),UBAT_BN:()=>w}[F[o]]()}function Q(t){let e,r=0,i=n.length-1;for(;r<=i;)if(e=Math.floor((r+i)/2),t<n[e][0])i=e-1;else{if(!(t>n[e][0]))return n[e][1];r=e+1}return t}function $(t){for(let e=0;e<y.length;e++)if(y[e]===t)return!0;return!1}function X(t){for(let e=0;e<a.length;e++)if(t===a[e])return x[e];return t}function G(t,e){for(let r=0;r<a.length;r++)if(t===a[r])return e[r];return t}function J(t){return t>="ً"&&t<="ٕ"}function K(t){return"L"===t?"LTR":"R"===t?"RTL":"C"===t?"CLR":"D"===t?"CRL":""}function tt(t,e,r,n){for(;e*r<n&&J(t[e]);)e+=r;return e*r<n&&(t[e]=" ",!0)}function et(t,e){for(let r=0;r<i.length;r++)if(t===i[r])return e[r];return t}function rt(t,e,r,n){for(let i=0;i<t.length;i++)(t[i]>e||!r&&t[i]===e)&&(t[i]+=n)}let nt=[],it=[],ot=[];const st={dir:0,defInFormat:"LLTR",defoutFormat:"VLTR",defSwap:"YN",inFormat:"LLTR",outFormat:"VLTR",swap:"YN",hiLevel:0,lastArabic:!1,hasUbatAl:!1,hasBlockSep:!1,hasSegSep:!1,defOutFormat:""},at=5,lt=6,ut=0,xt=1,ht=/^[(I|V)][(L|R|C|D)][(Y|N)][(S|N)][N]$/,yt=/[\u0591-\u06ff\ufb1d-\ufefc]/},65390:(t,e,r)=>{r.d(e,{b:()=>u,j:()=>l});var n=r(99880),i=r(80442);const o=128e3;let s=null,a=null;async function l(){return s||(s=async function(){const t=(0,i.Z)("esri-csp-restrictions")?await r.e(3852).then(r.bind(r,43852)).then((t=>t.l)):await r.e(4358).then(r.bind(r,84358)).then((t=>t.l));a=await t.load({locateFile:t=>(0,n.V)(`esri/core/libs/libtess/${t}`)})}()),s}function u(t,e){const r=Math.max(t.length,o);return a.triangulate(t,e,r)}},87893:(t,e,r)=>{r.d(e,{Z:()=>n});class n{constructor(t=0,e=0,r=0,n=0){this.x=t,this.y=e,this.width=r,this.height=n}get isEmpty(){return this.width<=0||this.height<=0}union(t){this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.width=Math.max(this.width,t.width),this.height=Math.max(this.height,t.height)}}},67327:(t,e,r)=>{r.d(e,{z:()=>c});var n=r(95648),i=r(16534);function o(t,e){return t.x===e.x&&t.y===e.y}function s(t,e){return t.x=e.y,t.y=-e.x,t}function a(t,e){return t.x=-e.y,t.y=e.x,t}function l(t,e){return t.x=e.x,t.y=e.y,t}function u(t,e){return t.x=-e.x,t.y=-e.y,t}function x(t){return Math.sqrt(t.x*t.x+t.y*t.y)}function h(t,e){return t.x*e.x+t.y*e.y}function y(t,e,r,n){return t.x=e.x*r+e.y*n,t.y=e.x*n-e.y*r,t}class c{constructor(t,e,r){this._writeVertex=t,this._writeTriangle=e,this._canUseThinTessellation=r,this._prevNormal={x:void 0,y:void 0},this._nextNormal={x:void 0,y:void 0},this._textureNormalLeft={x:0,y:1},this._textureNormalRight={x:0,y:-1},this._textureNormal={x:void 0,y:void 0},this._joinNormal={x:void 0,y:void 0},this._inner={x:void 0,y:void 0},this._outer={x:void 0,y:void 0},this._roundStart={x:void 0,y:void 0},this._roundEnd={x:void 0,y:void 0},this._startBreak={x:void 0,y:void 0},this._endBreak={x:void 0,y:void 0},this._innerPrev={x:void 0,y:void 0},this._innerNext={x:void 0,y:void 0},this._bevelStart={x:void 0,y:void 0},this._bevelEnd={x:void 0,y:void 0},this._bevelMiddle={x:void 0,y:void 0}}tessellate(t,e){(function(t){if(!t)return;const e=t.length;if(e<=1)return;let r=0;for(let n=1;n<e;n++)o(t[n],t[r])||++r===n||(t[r]=t[n]);t.length=r+1})(t),this._canUseThinTessellation&&e.halfWidth<i.tQ&&!e.offset?this._tessellateThin(t,e):this._tessellate(t,e)}_tessellateThin(t,e){if(t.length<2)return;const r=e.wrapDistance||65535;let n=e.initialDistance||0,i=!1,o=t[0].x,s=t[0].y;const a=t.length;for(let e=1;e<a;++e){i&&(i=!1,n=0);let a=t[e].x,l=t[e].y,u=a-o,x=l-s,h=Math.sqrt(u*u+x*x);if(u/=h,x/=h,n+h>r){i=!0;const t=(r-n)/h;h=r-n,a=(1-t)*o+t*a,l=(1-t)*s+t*l,--e}const y=this._writeVertex(o,s,0,0,u,x,x,-u,0,-1,n),c=this._writeVertex(o,s,0,0,u,x,-x,u,0,1,n);n+=h;const f=this._writeVertex(a,l,0,0,u,x,x,-u,0,-1,n),d=this._writeVertex(a,l,0,0,u,x,-x,u,0,1,n);this._writeTriangle(y,c,f),this._writeTriangle(c,f,d),o=a,s=l}}_tessellate(t,e){const r=t[0],i=t.at(-1),c=o(r,i),f=c?3:2;if(t.length<f)return;const d=e.pixelCoordRatio,v=null!=e.capType?e.capType:n.RL.BUTT,g=null!=e.joinType?e.joinType:n.AH.MITER,p=null!=e.miterLimit?Math.min(e.miterLimit,4):2,_=null!=e.roundLimit?Math.min(e.roundLimit,1.05):1.05,T=null!=e.halfWidth?e.halfWidth:2,m=!!e.textured;let w,b,A,L=null;const R=this._prevNormal,U=this._nextNormal;let B=-1,k=-1;const N=this._joinNormal;let F,V;const S=this._textureNormalLeft,E=this._textureNormalRight,M=this._textureNormal;let Z=-1,C=-1;const D=e.wrapDistance||65535;let O=e.initialDistance||0;const z=this._writeVertex,I=this._writeTriangle,j=(t,e,r,n,i,o)=>{const s=z(b,A,F,V,r,n,t,e,i,o,O);return Z>=0&&C>=0&&s>=0&&I(Z,C,s),Z=C,C=s,s};c&&(w=t.at(-2),U.x=i.x-w.x,U.y=i.y-w.y,k=x(U),U.x/=k,U.y/=k);let q=!1;for(let e=0;e<t.length;++e){if(q&&(q=!1,O=0),w&&(R.x=-U.x,R.y=-U.y,B=k,O+B>D&&(q=!0)),q){const r=(D-O)/B;B=D-O,w={x:(1-r)*w.x+r*t[e].x,y:(1-r)*w.y+r*t[e].y},--e}else w=t[e];b=w.x,A=w.y;const r=e<=0&&!q,i=e===t.length-1;if(r||(O+=B),L=i?c?t[1]:null:t[e+1],L?(U.x=L.x-b,U.y=L.y-A,k=x(U),U.x/=k,U.y/=k):(U.x=void 0,U.y=void 0),!c){if(r){a(N,U),F=N.x,V=N.y,v===n.RL.SQUARE&&(j(-U.y-U.x,U.x-U.y,U.x,U.y,0,-1),j(U.y-U.x,-U.x-U.y,U.x,U.y,0,1)),v===n.RL.ROUND&&(j(-U.y-U.x,U.x-U.y,U.x,U.y,-1,-1),j(U.y-U.x,-U.x-U.y,U.x,U.y,-1,1)),v!==n.RL.ROUND&&v!==n.RL.BUTT||(j(-U.y,U.x,U.x,U.y,0,-1),j(U.y,-U.x,U.x,U.y,0,1));continue}if(i){s(N,R),F=N.x,V=N.y,v!==n.RL.ROUND&&v!==n.RL.BUTT||(j(R.y,-R.x,-R.x,-R.y,0,-1),j(-R.y,R.x,-R.x,-R.y,0,1)),v===n.RL.SQUARE&&(j(R.y-R.x,-R.x-R.y,-R.x,-R.y,0,-1),j(-R.y-R.x,R.x-R.y,-R.x,-R.y,0,1)),v===n.RL.ROUND&&(j(R.y-R.x,-R.x-R.y,-R.x,-R.y,1,-1),j(-R.y-R.x,R.x-R.y,-R.x,-R.y,1,1));continue}}let o,f,z=(P=U,-((H=R).x*P.y-H.y*P.x));if(Math.abs(z)<.01)h(R,U)>0?(N.x=R.x,N.y=R.y,z=1,o=Number.MAX_VALUE,f=!0):(a(N,U),z=1,o=1,f=!1);else{N.x=(R.x+U.x)/z,N.y=(R.y+U.y)/z,o=x(N);const t=(o-1)*T*d;f=o>4||t>B&&t>k}F=N.x,V=N.y;let I=g;switch(g){case n.AH.BEVEL:o<1.05&&(I=n.AH.MITER);break;case n.AH.ROUND:o<_&&(I=n.AH.MITER);break;case n.AH.MITER:o>p&&(I=n.AH.BEVEL)}switch(I){case n.AH.MITER:if(j(N.x,N.y,-R.x,-R.y,0,-1),j(-N.x,-N.y,-R.x,-R.y,0,1),i)break;if(m){const t=q?0:O;Z=this._writeVertex(b,A,F,V,U.x,U.y,N.x,N.y,0,-1,t),C=this._writeVertex(b,A,F,V,U.x,U.y,-N.x,-N.y,0,1,t)}break;case n.AH.BEVEL:{const t=z<0;let e,r,n,o;if(t){const t=Z;Z=C,C=t,e=S,r=E}else e=E,r=S;if(f)n=t?a(this._innerPrev,R):s(this._innerPrev,R),o=t?s(this._innerNext,U):a(this._innerNext,U);else{const e=t?u(this._inner,N):l(this._inner,N);n=e,o=e}const x=t?s(this._bevelStart,R):a(this._bevelStart,R);j(n.x,n.y,-R.x,-R.y,e.x,e.y);const h=j(x.x,x.y,-R.x,-R.y,r.x,r.y);if(i)break;const c=t?a(this._bevelEnd,U):s(this._bevelEnd,U);if(f){const t=this._writeVertex(b,A,F,V,-R.x,-R.y,0,0,0,0,O);Z=this._writeVertex(b,A,F,V,U.x,U.y,o.x,o.y,e.x,e.y,O),C=this._writeVertex(b,A,F,V,U.x,U.y,c.x,c.y,r.x,r.y,O),this._writeTriangle(h,t,C)}else{if(m){const t=this._bevelMiddle;t.x=(x.x+c.x)/2,t.y=(x.y+c.y)/2,y(M,t,-R.x,-R.y),j(t.x,t.y,-R.x,-R.y,M.x,M.y),y(M,t,U.x,U.y),Z=this._writeVertex(b,A,F,V,U.x,U.y,t.x,t.y,M.x,M.y,O),C=this._writeVertex(b,A,F,V,U.x,U.y,o.x,o.y,e.x,e.y,O)}else{const t=Z;Z=C,C=t}j(c.x,c.y,U.x,U.y,r.x,r.y)}if(t){const t=Z;Z=C,C=t}break}case n.AH.ROUND:{const t=z<0;let e,r;if(t){const t=Z;Z=C,C=t,e=S,r=E}else e=E,r=S;const n=t?u(this._inner,N):l(this._inner,N);let x,c;f?(x=t?a(this._innerPrev,R):s(this._innerPrev,R),c=t?s(this._innerNext,U):a(this._innerNext,U)):(x=n,c=n);const d=t?s(this._roundStart,R):a(this._roundStart,R),v=t?a(this._roundEnd,U):s(this._roundEnd,U),g=j(x.x,x.y,-R.x,-R.y,e.x,e.y),p=j(d.x,d.y,-R.x,-R.y,r.x,r.y);if(i)break;const _=this._writeVertex(b,A,F,V,-R.x,-R.y,0,0,0,0,O);f||this._writeTriangle(Z,C,_);const T=u(this._outer,n),w=this._writeVertex(b,A,F,V,U.x,U.y,v.x,v.y,r.x,r.y,O);let L,B;const k=o>2;if(k){let e;o!==Number.MAX_VALUE?(T.x/=o,T.y/=o,e=h(R,T),e=(o*(e*e-1)+1)/e):e=-1,L=t?s(this._startBreak,R):a(this._startBreak,R),L.x+=R.x*e,L.y+=R.y*e,B=t?a(this._endBreak,U):s(this._endBreak,U),B.x+=U.x*e,B.y+=U.y*e}y(M,T,-R.x,-R.y);const D=this._writeVertex(b,A,F,V,-R.x,-R.y,T.x,T.y,M.x,M.y,O);y(M,T,U.x,U.y);const I=m?this._writeVertex(b,A,F,V,U.x,U.y,T.x,T.y,M.x,M.y,O):D,q=_,H=m?this._writeVertex(b,A,F,V,U.x,U.y,0,0,0,0,O):_;let P=-1,W=-1;if(k&&(y(M,L,-R.x,-R.y),P=this._writeVertex(b,A,F,V,-R.x,-R.y,L.x,L.y,M.x,M.y,O),y(M,B,U.x,U.y),W=this._writeVertex(b,A,F,V,U.x,U.y,B.x,B.y,M.x,M.y,O)),m?k?(this._writeTriangle(q,p,P),this._writeTriangle(q,P,D),this._writeTriangle(H,I,W),this._writeTriangle(H,W,w)):(this._writeTriangle(q,p,D),this._writeTriangle(H,I,w)):k?(this._writeTriangle(_,p,P),this._writeTriangle(_,P,W),this._writeTriangle(_,W,w)):(this._writeTriangle(_,p,D),this._writeTriangle(_,I,w)),f?(Z=this._writeVertex(b,A,F,V,U.x,U.y,c.x,c.y,e.x,e.y,O),C=w):(Z=m?this._writeVertex(b,A,F,V,U.x,U.y,c.x,c.y,e.x,e.y,O):g,this._writeTriangle(Z,H,w),C=w),t){const t=Z;Z=C,C=t}break}}}var H,P}}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4982],{95401:(t,e,r)=>{r.d(e,{e:()=>l});var n,i,o,s=r(5732),a={exports:{}};n=a,i=function(){function t(t,r,i){i=i||2;var o,s,a,u,x,h,y,c=r&&r.length,f=c?r[0]*i:t.length,d=e(t,0,f,i,!0),v=[];if(!d||d.next===d.prev)return v;if(c&&(d=l(t,r,d,i)),t.length>80*i){o=a=t[0],s=u=t[1];for(var g=i;g<f;g+=i)(x=t[g])<o&&(o=x),(h=t[g+1])<s&&(s=h),x>a&&(a=x),h>u&&(u=h);y=0!==(y=Math.max(a-o,u-s))?1/y:0}return n(d,v,i,o,s,y),v}function e(t,e,r,n,i){var o,s;if(i===B(t,e,r,n)>0)for(o=e;o<r;o+=n)s=L(o,t[o],t[o+1],s);else for(o=r-n;o>=e;o-=n)s=L(o,t[o],t[o+1],s);if(s&&_(s,s.next)){var a=s.next;R(s),s=a}return s}function r(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!_(n,n.next)&&0!==p(n.prev,n,n.next))n=n.next;else{var i=n.prev;if(R(n),(n=e=i)===n.next)break;r=!0}}while(r||n!==e);return e}function n(t,e,l,u,x,h,y){if(t){!y&&h&&c(t,u,x,h);for(var f,d,v=t;t.prev!==t.next;)if(f=t.prev,d=t.next,h?o(t,u,x,h):i(t))e.push(f.i/l),e.push(t.i/l),e.push(d.i/l),R(t),t=d.next,v=d.next;else if((t=d)===v){y?1===y?n(t=s(r(t),e,l),e,l,u,x,h,2):2===y&&a(t,e,l,u,x,h):n(r(t),e,l,u,x,h,1);break}}}function i(t){var e=t.prev,r=t,n=t.next;if(p(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(v(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&p(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function o(t,e,r,n){var i=t.prev,o=t,s=t.next;if(p(i,o,s)>=0)return!1;for(var a=i.x<o.x?i.x<s.x?i.x:s.x:o.x<s.x?o.x:s.x,l=i.y<o.y?i.y<s.y?i.y:s.y:o.y<s.y?o.y:s.y,u=i.x>o.x?i.x>s.x?i.x:s.x:o.x>s.x?o.x:s.x,x=i.y>o.y?i.y>s.y?i.y:s.y:o.y>s.y?o.y:s.y,h=f(a,l,e,r,n),y=f(u,x,e,r,n),c=t.prevZ,d=t.nextZ;c&&c.z>=h&&d&&d.z<=y;){if(c!==t.prev&&c!==t.next&&v(i.x,i.y,o.x,o.y,s.x,s.y,c.x,c.y)&&p(c.prev,c,c.next)>=0)return!1;if(c=c.prevZ,d!==t.prev&&d!==t.next&&v(i.x,i.y,o.x,o.y,s.x,s.y,d.x,d.y)&&p(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;c&&c.z>=h;){if(c!==t.prev&&c!==t.next&&v(i.x,i.y,o.x,o.y,s.x,s.y,c.x,c.y)&&p(c.prev,c,c.next)>=0)return!1;c=c.prevZ}for(;d&&d.z<=y;){if(d!==t.prev&&d!==t.next&&v(i.x,i.y,o.x,o.y,s.x,s.y,d.x,d.y)&&p(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function s(t,e,n){var i=t;do{var o=i.prev,s=i.next.next;!_(o,s)&&T(o,i,i.next,s)&&b(o,s)&&b(s,o)&&(e.push(o.i/n),e.push(i.i/n),e.push(s.i/n),R(i),R(i.next),i=t=s),i=i.next}while(i!==t);return r(i)}function a(t,e,i,o,s,a){var l=t;do{for(var u=l.next.next;u!==l.prev;){if(l.i!==u.i&&g(l,u)){var x=A(l,u);return l=r(l,l.next),x=r(x,x.next),n(l,e,i,o,s,a),void n(x,e,i,o,s,a)}u=u.next}l=l.next}while(l!==t)}function l(t,n,i,o){var s,a,l,x=[];for(s=0,a=n.length;s<a;s++)(l=e(t,n[s]*o,s<a-1?n[s+1]*o:t.length,o,!1))===l.next&&(l.steiner=!0),x.push(d(l));for(x.sort(u),s=0;s<x.length;s++)i=r(i=h(x[s],i),i.next);return i}function u(t,e){return t.x-e.x}function x(t){if(t.next.prev===t)return t;let e=t;for(;;){const r=e.next;if(r.prev===e||r===e||r===t)break;e=r}return e}function h(t,e){var n=function(t,e){var r,n=e,i=t.x,o=t.y,s=-1/0;do{if(o<=n.y&&o>=n.next.y&&n.next.y!==n.y){var a=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=i&&a>s){if(s=a,a===i){if(o===n.y)return n;if(o===n.next.y)return n.next}r=n.x<n.next.x?n:n.next}}n=n.next}while(n!==e);if(!r)return null;if(i===s)return r;var l,u=r,x=r.x,h=r.y,c=1/0;n=r;do{i>=n.x&&n.x>=x&&i!==n.x&&v(o<h?i:s,o,x,h,o<h?s:i,o,n.x,n.y)&&(l=Math.abs(o-n.y)/(i-n.x),b(n,t)&&(l<c||l===c&&(n.x>r.x||n.x===r.x&&y(r,n)))&&(r=n,c=l)),n=n.next}while(n!==u);return r}(t,e);if(!n)return e;var i=A(n,t),o=r(n,n.next);let s=x(i);return r(s,s.next),o=x(o),x(e===n?o:e)}function y(t,e){return p(t.prev,t,e.prev)<0&&p(e.next,t,t.next)<0}function c(t,e,r,n){var i=t;do{null===i.z&&(i.z=f(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,r,n,i,o,s,a,l,u=1;do{for(r=t,t=null,o=null,s=0;r;){for(s++,n=r,a=0,e=0;e<u&&(a++,n=n.nextZ);e++);for(l=u;a>0||l>0&&n;)0!==a&&(0===l||!n||r.z<=n.z)?(i=r,r=r.nextZ,a--):(i=n,n=n.nextZ,l--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;r=n}o.nextZ=null,u*=2}while(s>1)}(i)}function f(t,e,r,n,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function d(t){var e=t,r=t;do{(e.x<r.x||e.x===r.x&&e.y<r.y)&&(r=e),e=e.next}while(e!==t);return r}function v(t,e,r,n,i,o,s,a){return(i-s)*(e-a)-(t-s)*(o-a)>=0&&(t-s)*(n-a)-(r-s)*(e-a)>=0&&(r-s)*(o-a)-(i-s)*(n-a)>=0}function g(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&T(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&(b(t,e)&&b(e,t)&&function(t,e){var r=t,n=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{r.y>o!=r.next.y>o&&r.next.y!==r.y&&i<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==t);return n}(t,e)&&(p(t.prev,t,e.prev)||p(t,e.prev,e))||_(t,e)&&p(t.prev,t,t.next)>0&&p(e.prev,e,e.next)>0)}function p(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function _(t,e){return t.x===e.x&&t.y===e.y}function T(t,e,r,n){var i=w(p(t,e,r)),o=w(p(t,e,n)),s=w(p(r,n,t)),a=w(p(r,n,e));return i!==o&&s!==a||!(0!==i||!m(t,r,e))||!(0!==o||!m(t,n,e))||!(0!==s||!m(r,t,n))||!(0!==a||!m(r,e,n))}function m(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function w(t){return t>0?1:t<0?-1:0}function b(t,e){return p(t.prev,t,t.next)<0?p(t,e,t.next)>=0&&p(t,t.prev,e)>=0:p(t,e,t.prev)<0||p(t,t.next,e)<0}function A(t,e){var r=new U(t.i,t.x,t.y),n=new U(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,o.next=n,n.prev=o,n}function L(t,e,r,n){var i=new U(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function R(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function U(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function B(t,e,r,n){for(var i=0,o=e,s=r-n;o<r;o+=n)i+=(t[s]-t[o])*(t[o+1]+t[s+1]),s=o;return i}return t.deviation=function(t,e,r,n){var i=e&&e.length,o=i?e[0]*r:t.length,s=Math.abs(B(t,0,o,r));if(i)for(var a=0,l=e.length;a<l;a++){var u=e[a]*r,x=a<l-1?e[a+1]*r:t.length;s-=Math.abs(B(t,u,x,r))}var h=0;for(a=0;a<n.length;a+=3){var y=n[a]*r,c=n[a+1]*r,f=n[a+2]*r;h+=Math.abs((t[y]-t[f])*(t[c+1]-t[y+1])-(t[y]-t[c])*(t[f+1]-t[y+1]))}return 0===s&&0===h?0:Math.abs((h-s)/s)},t.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},n=0,i=0;i<t.length;i++){for(var o=0;o<t[i].length;o++)for(var s=0;s<e;s++)r.vertices.push(t[i][o][s]);i>0&&(n+=t[i-1].length,r.holes.push(n))}return r},t},void 0!==(o=i())&&(n.exports=o);const l=(0,s.g)(a.exports)},35270:(t,e,r)=>{r.d(e,{B7:()=>l,St:()=>i,VL:()=>s,h$:()=>o,rW:()=>u});const n={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,50,1]};function i(t){return!!n[t]||!!n[t.toLowerCase()]}function o(t){return n[t]??n[t.toLowerCase()]}function s(t){return[...o(t)]}function a(t,e,r){r<0&&++r,r>1&&--r;const n=6*r;return n<1?t+(e-t)*n:2*r<1?e:3*r<2?t+(e-t)*(2/3-r)*6:t}function l(t,e,r,n=1){const i=(t%360+360)%360/360,o=r<=.5?r*(e+1):r+e-r*e,s=2*r-o;return[Math.round(255*a(s,o,i+1/3)),Math.round(255*a(s,o,i)),Math.round(255*a(s,o,i-1/3)),n]}function u(t){const e=t.length>5,r=e?8:4,n=(1<<r)-1,i=e?1:17,o=e?9===t.length:5===t.length;let s=Number("0x"+t.substr(1));if(isNaN(s))return null;const a=[0,0,0,1];let l;return o&&(l=s&n,s>>=r,a[3]=i*l/255),l=s&n,s>>=r,a[2]=i*l,l=s&n,s>>=r,a[1]=i*l,l=s&n,s>>=r,a[0]=i*l,a}},79087:(t,e,r)=>{r.d(e,{Z:()=>M});const n=[["(",")"],[")","("],["<",">"],[">","<"],["[","]"],["]","["],["{","}"],["}","{"],["«","»"],["»","«"],["‹","›"],["›","‹"],["⁽","⁾"],["⁾","⁽"],["₍","₎"],["₎","₍"],["≤","≥"],["≥","≤"],["〈","〉"],["〉","〈"],["﹙","﹚"],["﹚","﹙"],["﹛","﹜"],["﹜","﹛"],["﹝","﹞"],["﹞","﹝"],["﹤","﹥"],["﹥","﹤"]],i=["آ","أ","إ","ا"],o=["ﻵ","ﻷ","ﻹ","ﻻ"],s=["ﻶ","ﻸ","ﻺ","ﻼ"],a=["ا","ب","ت","ث","ج","ح","خ","د","ذ","ر","ز","س","ش","ص","ض","ط","ظ","ع","غ","ف","ق","ك","ل","م","ن","ه","و","ي","إ","أ","آ","ة","ى","ل","م","ن","ه","و","ي","إ","أ","آ","ة","ى","ی","ئ","ؤ"],l=["ﺍ","ﺏ","ﺕ","ﺙ","ﺝ","ﺡ","ﺥ","ﺩ","ﺫ","ﺭ","ﺯ","ﺱ","ﺵ","ﺹ","ﺽ","ﻁ","ﻅ","ﻉ","ﻍ","ﻑ","ﻕ","ﻙ","ﻝ","ﻡ","ﻥ","ﻩ","ﻭ","ﻱ","ﺇ","ﺃ","ﺁ","ﺓ","ﻯ","ﯼ","ﺉ","ﺅ","ﹰ","ﹲ","ﹴ","ﹶ","ﹸ","ﹺ","ﹼ","ﹾ","ﺀ","ﺉ","ﺅ"],u=["ﺎ","ﺐ","ﺖ","ﺚ","ﺞ","ﺢ","ﺦ","ﺪ","ﺬ","ﺮ","ﺰ","ﺲ","ﺶ","ﺺ","ﺾ","ﻂ","ﻆ","ﻊ","ﻎ","ﻒ","ﻖ","ﻚ","ﻞ","ﻢ","ﻦ","ﻪ","ﻮ","ﻲ","ﺈ","ﺄ","ﺂ","ﺔ","ﻰ","ﯽ","ﺊ","ﺆ","ﹰ","ﹲ","ﹴ","ﹶ","ﹸ","ﹺ","ﹼ","ﹾ","ﺀ","ﺊ","ﺆ"],x=["ﺎ","ﺒ","ﺘ","ﺜ","ﺠ","ﺤ","ﺨ","ﺪ","ﺬ","ﺮ","ﺰ","ﺴ","ﺸ","ﺼ","ﻀ","ﻄ","ﻈ","ﻌ","ﻐ","ﻔ","ﻘ","ﻜ","ﻠ","ﻤ","ﻨ","ﻬ","ﻮ","ﻴ","ﺈ","ﺄ","ﺂ","ﺔ","ﻰ","ﯿ","ﺌ","ﺆ","ﹱ","ﹲ","ﹴ","ﹷ","ﹹ","ﹻ","ﹽ","ﹿ","ﺀ","ﺌ","ﺆ"],h=["ﺍ","ﺑ","ﺗ","ﺛ","ﺟ","ﺣ","ﺧ","ﺩ","ﺫ","ﺭ","ﺯ","ﺳ","ﺷ","ﺻ","ﺿ","ﻃ","ﻇ","ﻋ","ﻏ","ﻓ","ﻗ","ﻛ","ﻟ","ﻣ","ﻧ","ﻫ","ﻭ","ﻳ","ﺇ","ﺃ","ﺁ","ﺓ","ﻯ","ﯾ","ﺋ","ﺅ","ﹰ","ﹲ","ﹴ","ﹶ","ﹸ","ﹺ","ﹼ","ﹾ","ﺀ","ﺋ","ﺅ"],y=["ء","آ","أ","ؤ","إ","ا","ة","د","ذ","ر","ز","و","ى"],c=["ً","ً","ٌ","؟","ٍ","؟","َ","َ","ُ","ُ","ِ","ِ","ّ","ّ","ْ","ْ","ء","آ","آ","أ","أ","ؤ","ؤ","إ","إ","ئ","ئ","ئ","ئ","ا","ا","ب","ب","ب","ب","ة","ة","ت","ت","ت","ت","ث","ث","ث","ث","ج","ج","ج","ج","ح","ح","ح","ح","خ","خ","خ","خ","د","د","ذ","ذ","ر","ر","ز","ز","س","س","س","س","ش","ش","ش","ش","ص","ص","ص","ص","ض","ض","ض","ض","ط","ط","ط","ط","ظ","ظ","ظ","ظ","ع","ع","ع","ع","غ","غ","غ","غ","ف","ف","ف","ف","ق","ق","ق","ق","ك","ك","ك","ك","ل","ل","ل","ل","م","م","م","م","ن","ن","ن","ن","ه","ه","ه","ه","و","و","ى","ى","ي","ي","ي","ي","ﻵ","ﻶ","ﻷ","ﻸ","ﻹ","ﻺ","ﻻ","ﻼ","؟","؟","؟"],f=["ء","ف"],d=["غ","ي"],v=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],g=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],p=0,_=1,T=2,m=3,w=4,b=5,A=6,L=7,R=8,U=10,B=11,k=12,N=18,F=["UBAT_L","UBAT_R","UBAT_EN","UBAT_AN","UBAT_ON","UBAT_B","UBAT_S","UBAT_AL","UBAT_WS","UBAT_CS","UBAT_ES","UBAT_ET","UBAT_NSM","UBAT_LRE","UBAT_RLE","UBAT_PDF","UBAT_LRO","UBAT_RLO","UBAT_BN"],V=100,S=[V+0,p,p,p,p,V+1,V+2,V+3,_,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,V+4,w,w,w,p,w,p,w,p,w,w,w,p,p,w,w,p,p,p,p,p,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,p,p,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,p,p,p,p,p,p,p,p,p,p,p,p,p,p,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,p,p,w,w,p,p,w,w,p,p,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,p,p,p,V+5,L,L,V+6,V+7],E=[[N,N,N,N,N,N,N,N,N,A,b,A,R,b,N,N,N,N,N,N,N,N,N,N,N,N,N,N,b,b,b,A,R,w,w,B,B,B,w,w,w,w,w,U,9,U,9,9,T,T,T,T,T,T,T,T,T,T,9,w,w,w,w,w,w,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,w,w,w,w,w,w,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,w,w,w,w,N,N,N,N,N,N,b,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,9,w,B,B,B,B,w,w,w,w,p,w,w,N,w,w,B,B,T,T,w,p,w,w,w,T,p,w,w,w,w,w,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,w,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,w,p,p,p,p,p,p,p,p],[p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,w,w,w,w,w,w,w,w,w,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,w,w,p,p,p,p,p,p,p,w,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,w,p,w,w,w,w,w,w,w,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,_,k,_,k,k,_,k,k,_,k,w,w,w,w,w,w,w,w,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,w,w,w,w,w,_,_,_,_,_,w,w,w,w,w,w,w,w,w,w,w],[m,m,m,m,w,w,w,w,L,B,B,L,9,L,w,w,k,k,k,k,k,k,k,k,k,k,k,L,w,w,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,m,m,m,m,m,m,m,m,m,m,B,m,m,L,L,L,k,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,k,k,k,k,k,k,k,m,w,k,k,k,k,k,k,L,L,k,k,w,k,k,k,k,L,L,T,T,T,T,T,T,T,T,T,T,L,L,L,L,L,L],[L,L,L,L,L,L,L,L,L,L,L,L,L,L,w,L,L,k,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,w,w,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,k,k,k,k,k,k,k,k,k,k,k,L,w,w,w,w,w,w,w,w,w,w,w,w,w,w,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,k,k,k,k,k,k,k,k,k,_,_,w,w,w,w,_,w,w,w,w,w],[R,R,R,R,R,R,R,R,R,R,R,N,N,N,p,_,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,R,b,13,14,15,16,17,9,B,B,B,B,B,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,9,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,R,N,N,N,N,N,w,w,w,w,w,N,N,N,N,N,N,T,p,w,w,T,T,T,T,T,T,U,U,w,w,w,p,T,T,T,T,T,T,T,T,T,T,U,U,w,w,w,w,p,p,p,p,p,p,p,p,p,p,p,p,p,w,w,w,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w],[p,p,p,p,p,p,p,w,w,w,w,w,w,w,w,w,w,w,w,p,p,p,p,p,w,w,w,w,w,_,k,_,_,_,_,_,_,_,_,_,_,U,_,_,_,_,_,_,_,_,_,_,_,_,_,w,_,_,_,_,_,w,_,w,_,_,w,_,_,w,_,_,_,_,_,_,_,_,_,_,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L],[k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,k,k,k,k,k,k,k,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,9,w,9,w,w,9,w,w,w,w,w,w,w,w,w,B,w,w,U,U,w,w,w,w,w,B,B,w,w,w,w,w,L,L,L,L,L,w,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,w,w,N],[w,w,w,B,B,B,w,w,w,w,w,U,9,U,9,9,T,T,T,T,T,T,T,T,T,T,9,w,w,w,w,w,w,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,w,w,w,w,w,w,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,w,w,w,w,w,w,w,w,w,w,w,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,w,w,w,p,p,p,p,p,p,w,w,p,p,p,p,p,p,w,w,p,p,p,p,p,p,w,w,p,p,p,w,w,w,B,B,w,w,w,B,B,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w]];class M{constructor(){this.inputFormat="ILYNN",this.outputFormat="VLNNN",this.sourceToTarget=[],this.targetToSource=[],this.levels=[]}bidiTransform(t,e,r){if(this.sourceToTarget=[],this.targetToSource=[],!t)return"";if(function(t,e,r){nt=[],ot=[];for(let n=0;n<r;n++)t[n]=n,e[n]=n,nt[n]=n}(this.sourceToTarget,this.targetToSource,t.length),!this.checkParameters(e,r))return t;e=this.inputFormat,r=this.outputFormat;let n=t;const a=st,x=K(e.charAt(1)),y=K(r.charAt(1)),f=("I"===e.charAt(0)?"L":e.charAt(0))+x,d=("I"===r.charAt(0)?"L":r.charAt(0))+y,v=e.charAt(2)+r.charAt(2);a.defInFormat=f,a.defOutFormat=d,a.defSwap=v;const g=Z(t,f,d,v,a);let p=!1;return"R"===r.charAt(1)?p=!0:"C"!==r.charAt(1)&&"D"!==r.charAt(1)||(p="rtl"===this.checkContextual(g)),this.sourceToTarget=nt,this.targetToSource=function(t){const e=new Array(t.length);for(let r=0;r<t.length;r++)e[t[r]]=r;return e}(this.sourceToTarget),it=this.targetToSource,n=e.charAt(3)===r.charAt(3)?g:"S"===r.charAt(3)?function(t,e,r){if(0===e.length)return"";void 0===t&&(t=!0),void 0===r&&(r=!0);const n=(e=String(e)).split("");let i=0,a=1,x=n.length;t||(i=n.length-1,a=-1,x=1);const y=function(t,e,r,n,i){let a=0;const x=[];let y=0;for(let c=e;c*r<n;c+=r)if(q(t[c])||J(t[c])){if("ل"===t[c]&&P(t,c+r,r,n)){t[c]=et(t[c+r],0===a?o:s),c+=r,tt(t,c,r,n),i&&(x[y]=c,y++),a=0;continue}const e=t[c];1===a?t[c]=H(t,c+r,r,n)?X(t[c]):G(t[c],u):!0===H(t,c+r,r,n)?t[c]=G(t[c],h):t[c]=G(t[c],l),J(e)||(a=1),!0===$(e)&&(a=0)}else a=0;return x}(n,i,a,x,r);let c="";for(let e=0;e<n.length;e++)r&&j(y,y.length,e)>-1?(rt(it,e,!t,-1),nt.splice(e,1)):c+=n[e];return c}(p,g,!0):function(t,e,r){if(0===t.length)return"";void 0===r&&(r=!0),void 0===e&&(e=!0);let n="";const o=(t=String(t)).split("");for(let s=0;s<t.length;s++){let a=!1;if(o[s]>="ﹰ"&&o[s]<"\ufeff"){const l=t.charCodeAt(s);o[s]>="ﻵ"&&o[s]<="ﻼ"?(e?(s>0&&r&&" "===o[s-1]?n=n.substring(0,n.length-1)+"ل":(n+="ل",a=!0),n+=i[(l-65269)/2]):(n+=i[(l-65269)/2],n+="ل",s+1<t.length&&r&&" "===o[s+1]?s++:a=!0),a&&(rt(it,s,!0,1),nt.splice(s,0,nt[s]))):n+=c[l-65136]}else n+=o[s]}return n}(g,p,!0),this.sourceToTarget=nt,this.targetToSource=it,this.levels=ot,n}_inputFormatSetter(t){if(!ht.test(t))throw new Error("dojox/string/BidiEngine: the bidi layout string is wrong!");this.inputFormat=t}_outputFormatSetter(t){if(!ht.test(t))throw new Error("dojox/string/BidiEngine: the bidi layout string is wrong!");this.outputFormat=t}checkParameters(t,e){return t?this._inputFormatSetter(t):t=this.inputFormat,e?this._outputFormatSetter(e):e=this.outputFormat,t!==e}checkContextual(t){let e=C(t);if("ltr"!==e&&"rtl"!==e){try{e=document.dir.toLowerCase()}catch(t){}"ltr"!==e&&"rtl"!==e&&(e="ltr")}return e}hasBidiChar(t){return yt.test(t)}}function Z(t,e,r,n,i){const o=function(t,e,r){if(void 0===e.inFormat&&(e.inFormat=r.defInFormat),void 0===e.outFormat&&(e.outFormat=r.defOutFormat),void 0===e.swap&&(e.swap=r.defSwap),e.inFormat===e.outFormat)return e;const n=e.inFormat.substring(0,1),i=e.outFormat.substring(0,1);let o,s=e.inFormat.substring(1,4),a=e.outFormat.substring(1,4);return"C"===s.charAt(0)&&(o=C(t),s="ltr"===o||"rtl"===o?o.toUpperCase():"L"===e.inFormat.charAt(2)?"LTR":"RTL",e.inFormat=n+s),"C"===a.charAt(0)&&(o=C(t),"rtl"===o?a="RTL":"ltr"===o?(o=function(t){const e=t.split("");return e.reverse(),C(e.join(""))}(t),a=o.toUpperCase()):a="L"===e.outFormat.charAt(2)?"LTR":"RTL",e.outFormat=i+a),e}(t,{inFormat:e,outFormat:r,swap:n},i);if(o.inFormat===o.outFormat)return t;e=o.inFormat,r=o.outFormat,n=o.swap;const s=e.substring(0,1),a=e.substring(1,4),l=r.substring(0,1),u=r.substring(1,4);if(i.inFormat=e,i.outFormat=r,i.swap=n,"L"===s&&"VLTR"===r){if("LTR"===a)return i.dir=ut,D(t,i);if("RTL"===a)return i.dir=xt,D(t,i)}if("V"===s&&"V"===l)return i.dir="RTL"===a?xt:ut,I(t,i);if("L"===s&&"VRTL"===r)return"LTR"===a?(i.dir=ut,t=D(t,i)):(i.dir=xt,t=D(t,i)),I(t);if("VLTR"===e&&"LLTR"===r)return i.dir=ut,D(t,i);if("V"===s&&"L"===l&&a!==u)return t=I(t),"RTL"===a?Z(t,"LLTR","VLTR",n,i):Z(t,"LRTL","VRTL",n,i);if("VRTL"===e&&"LRTL"===r)return Z(t,"LRTL","VRTL",n,i);if("L"===s&&"L"===l){const e=i.swap;return i.swap=e.substr(0,1)+"N","RTL"===a?(i.dir=xt,t=D(t,i),i.swap="N"+e.substr(1,2),i.dir=ut,t=D(t,i)):(i.dir=ut,t=D(t,i),i.swap="N"+e.substr(1,2),t=Z(t,"VLTR","LRTL",i.swap,i)),t}return t}function C(t){const e=/[A-Za-z\u05d0-\u065f\u066a-\u06ef\u06fa-\u07ff\ufb1d-\ufdff\ufe70-\ufefc]/.exec(t);return e?e[0]<="z"?"ltr":"rtl":""}function D(t,e){const r=t.split(""),n=[];return O(r,n,e),function(t,e,r){if(0!==r.hiLevel&&r.swap.substr(0,1)!==r.swap.substr(1,2))for(let r=0;r<t.length;r++)1===e[r]&&(t[r]=Q(t[r]))}(r,n,e),W(2,r,n,e),W(1,r,n,e),ot=n,r.join("")}function O(t,e,r){const n=t.length,i=r.dir?g:v;let o=0,s=-1;const a=[],l=[];r.hiLevel=r.dir,r.lastArabic=!1,r.hasUbatAl=!1,r.hasUbatB=!1,r.hasUbatS=!1;for(let e=0;e<n;e++)a[e]=z(t[e]);for(let u=0;u<n;u++){const n=o,x=Y(t,a,l,u,r);l[u]=x,o=i[n][x];const h=240&o;o&=15;const y=i[o][at];if(e[u]=y,h>0)if(16===h){for(let t=s;t<u;t++)e[t]=1;s=-1}else s=-1;if(i[o][lt])-1===s&&(s=u);else if(s>-1){for(let t=s;t<u;t++)e[t]=y;s=-1}a[u]===b&&(e[u]=0),r.hiLevel|=y}r.hasUbatS&&function(t,e,r,n){for(let i=0;i<r;i++)if(t[i]===A){e[i]=n.dir;for(let r=i-1;r>=0&&t[r]===R;r--)e[r]=n.dir}}(a,e,n,r)}function z(t){const e=t.charCodeAt(0),r=S[e>>8];return r<V?r:E[r-V][255&e]}function I(t,e){const r=t.split("");if(e){const t=[];O(r,t,e),ot=t}return r.reverse(),nt.reverse(),r.join("")}function j(t,e,r){for(let n=0;n<e;n++)if(t[n]===r)return n;return-1}function q(t){for(let e=0;e<f.length;e++)if(t>=f[e]&&t<=d[e])return!0;return!1}function H(t,e,r,n){for(;e*r<n&&J(t[e]);)e+=r;return!!(e*r<n&&q(t[e]))}function P(t,e,r,n){for(;e*r<n&&J(t[e]);)e+=r;let o=" ";if(!(e*r<n))return!1;o=t[e];for(let t=0;t<i.length;t++)if(i[t]===o)return!0;return!1}function W(t,e,r,n){if(n.hiLevel<t)return;if(1===t&&n.dir===xt&&!n.hasUbatB)return e.reverse(),void nt.reverse();const i=e.length;let o,s,a,l,u,x=0;for(;x<i;){if(r[x]>=t){for(o=x+1;o<i&&r[o]>=t;)o++;for(s=x,a=o-1;s<a;s++,a--)l=e[s],e[s]=e[a],e[a]=l,u=nt[s],nt[s]=nt[a],nt[a]=u;x=o}x++}}function Y(t,e,r,n,i){const o=e[n];return{UBAT_L:()=>(i.lastArabic=!1,p),UBAT_R:()=>(i.lastArabic=!1,_),UBAT_ON:()=>w,UBAT_AN:()=>m,UBAT_EN:()=>i.lastArabic?m:T,UBAT_AL:()=>(i.lastArabic=!0,i.hasUbatAl=!0,_),UBAT_WS:()=>w,UBAT_CS:()=>{let t,o;return n<1||n+1>=e.length||(t=r[n-1])!==T&&t!==m||(o=e[n+1])!==T&&o!==m?w:(i.lastArabic&&(o=m),o===t?o:w)},UBAT_ES:()=>(n>0?r[n-1]:b)===T&&n+1<e.length&&e[n+1]===T?T:w,UBAT_ET:()=>{if(n>0&&r[n-1]===T)return T;if(i.lastArabic)return w;let t=n+1;const o=e.length;for(;t<o&&e[t]===B;)t++;return t<o&&e[t]===T?T:w},UBAT_NSM:()=>{if("VLTR"===i.inFormat){const r=e.length;let i=n+1;for(;i<r&&e[i]===k;)i++;if(i<r){const r=t[n].charCodeAt(0),o=r>=1425&&r<=2303||64286===r,s=e[i];if(o&&(s===_||s===L))return _}}return n<1||e[n-1]===b?w:r[n-1]},UBAT_B:()=>(i.lastArabic=!0,i.hasUbatB=!0,i.dir),UBAT_S:()=>(i.hasUbatS=!0,w),UBAT_LRE:()=>(i.lastArabic=!1,w),UBAT_RLE:()=>(i.lastArabic=!1,w),UBAT_LRO:()=>(i.lastArabic=!1,w),UBAT_RLO:()=>(i.lastArabic=!1,w),UBAT_PDF:()=>(i.lastArabic=!1,w),UBAT_BN:()=>w}[F[o]]()}function Q(t){let e,r=0,i=n.length-1;for(;r<=i;)if(e=Math.floor((r+i)/2),t<n[e][0])i=e-1;else{if(!(t>n[e][0]))return n[e][1];r=e+1}return t}function $(t){for(let e=0;e<y.length;e++)if(y[e]===t)return!0;return!1}function X(t){for(let e=0;e<a.length;e++)if(t===a[e])return x[e];return t}function G(t,e){for(let r=0;r<a.length;r++)if(t===a[r])return e[r];return t}function J(t){return t>="ً"&&t<="ٕ"}function K(t){return"L"===t?"LTR":"R"===t?"RTL":"C"===t?"CLR":"D"===t?"CRL":""}function tt(t,e,r,n){for(;e*r<n&&J(t[e]);)e+=r;return e*r<n&&(t[e]=" ",!0)}function et(t,e){for(let r=0;r<i.length;r++)if(t===i[r])return e[r];return t}function rt(t,e,r,n){for(let i=0;i<t.length;i++)(t[i]>e||!r&&t[i]===e)&&(t[i]+=n)}let nt=[],it=[],ot=[];const st={dir:0,defInFormat:"LLTR",defoutFormat:"VLTR",defSwap:"YN",inFormat:"LLTR",outFormat:"VLTR",swap:"YN",hiLevel:0,lastArabic:!1,hasUbatAl:!1,hasBlockSep:!1,hasSegSep:!1,defOutFormat:""},at=5,lt=6,ut=0,xt=1,ht=/^[(I|V)][(L|R|C|D)][(Y|N)][(S|N)][N]$/,yt=/[\u0591-\u06ff\ufb1d-\ufefc]/},65390:(t,e,r)=>{r.d(e,{b:()=>u,j:()=>l});var n=r(99880),i=r(80442);const o=128e3;let s=null,a=null;async function l(){return s||(s=async function(){const t=(0,i.Z)("esri-csp-restrictions")?await r.e(3852).then(r.bind(r,43852)).then((t=>t.l)):await r.e(4358).then(r.bind(r,84358)).then((t=>t.l));a=await t.load({locateFile:t=>(0,n.V)(`esri/core/libs/libtess/${t}`)})}()),s}function u(t,e){const r=Math.max(t.length,o);return a.triangulate(t,e,r)}},87893:(t,e,r)=>{r.d(e,{Z:()=>n});class n{constructor(t=0,e=0,r=0,n=0){this.x=t,this.y=e,this.width=r,this.height=n}get isEmpty(){return this.width<=0||this.height<=0}union(t){this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.width=Math.max(this.width,t.width),this.height=Math.max(this.height,t.height)}}},67327:(t,e,r)=>{r.d(e,{z:()=>c});var n=r(95648),i=r(16534);function o(t,e){return t.x===e.x&&t.y===e.y}function s(t,e){return t.x=e.y,t.y=-e.x,t}function a(t,e){return t.x=-e.y,t.y=e.x,t}function l(t,e){return t.x=e.x,t.y=e.y,t}function u(t,e){return t.x=-e.x,t.y=-e.y,t}function x(t){return Math.sqrt(t.x*t.x+t.y*t.y)}function h(t,e){return t.x*e.x+t.y*e.y}function y(t,e,r,n){return t.x=e.x*r+e.y*n,t.y=e.x*n-e.y*r,t}class c{constructor(t,e,r){this._writeVertex=t,this._writeTriangle=e,this._canUseThinTessellation=r,this._prevNormal={x:void 0,y:void 0},this._nextNormal={x:void 0,y:void 0},this._textureNormalLeft={x:0,y:1},this._textureNormalRight={x:0,y:-1},this._textureNormal={x:void 0,y:void 0},this._joinNormal={x:void 0,y:void 0},this._inner={x:void 0,y:void 0},this._outer={x:void 0,y:void 0},this._roundStart={x:void 0,y:void 0},this._roundEnd={x:void 0,y:void 0},this._startBreak={x:void 0,y:void 0},this._endBreak={x:void 0,y:void 0},this._innerPrev={x:void 0,y:void 0},this._innerNext={x:void 0,y:void 0},this._bevelStart={x:void 0,y:void 0},this._bevelEnd={x:void 0,y:void 0},this._bevelMiddle={x:void 0,y:void 0}}tessellate(t,e){(function(t){if(!t)return;const e=t.length;if(e<=1)return;let r=0;for(let n=1;n<e;n++)o(t[n],t[r])||++r===n||(t[r]=t[n]);t.length=r+1})(t),this._canUseThinTessellation&&e.halfWidth<i.tQ&&!e.offset?this._tessellateThin(t,e):this._tessellate(t,e)}_tessellateThin(t,e){if(t.length<2)return;const r=e.wrapDistance||65535;let n=e.initialDistance||0,i=!1,o=t[0].x,s=t[0].y;const a=t.length;for(let e=1;e<a;++e){i&&(i=!1,n=0);let a=t[e].x,l=t[e].y,u=a-o,x=l-s,h=Math.sqrt(u*u+x*x);if(u/=h,x/=h,n+h>r){i=!0;const t=(r-n)/h;h=r-n,a=(1-t)*o+t*a,l=(1-t)*s+t*l,--e}const y=this._writeVertex(o,s,0,0,u,x,x,-u,0,-1,n),c=this._writeVertex(o,s,0,0,u,x,-x,u,0,1,n);n+=h;const f=this._writeVertex(a,l,0,0,u,x,x,-u,0,-1,n),d=this._writeVertex(a,l,0,0,u,x,-x,u,0,1,n);this._writeTriangle(y,c,f),this._writeTriangle(c,f,d),o=a,s=l}}_tessellate(t,e){const r=t[0],i=t[t.length-1],c=o(r,i),f=c?3:2;if(t.length<f)return;const d=e.pixelCoordRatio,v=null!=e.capType?e.capType:n.RL.BUTT,g=null!=e.joinType?e.joinType:n.AH.MITER,p=null!=e.miterLimit?Math.min(e.miterLimit,4):2,_=null!=e.roundLimit?Math.min(e.roundLimit,1.05):1.05,T=null!=e.halfWidth?e.halfWidth:2,m=!!e.textured;let w,b,A,L=null;const R=this._prevNormal,U=this._nextNormal;let B=-1,k=-1;const N=this._joinNormal;let F,V;const S=this._textureNormalLeft,E=this._textureNormalRight,M=this._textureNormal;let Z=-1,C=-1;const D=e.wrapDistance||65535;let O=e.initialDistance||0;const z=this._writeVertex,I=this._writeTriangle,j=(t,e,r,n,i,o)=>{const s=z(b,A,F,V,r,n,t,e,i,o,O);return Z>=0&&C>=0&&s>=0&&I(Z,C,s),Z=C,C=s,s};c&&(w=t[t.length-2],U.x=i.x-w.x,U.y=i.y-w.y,k=x(U),U.x/=k,U.y/=k);let q=!1;for(let e=0;e<t.length;++e){if(q&&(q=!1,O=0),w&&(R.x=-U.x,R.y=-U.y,B=k,O+B>D&&(q=!0)),q){const r=(D-O)/B;B=D-O,w={x:(1-r)*w.x+r*t[e].x,y:(1-r)*w.y+r*t[e].y},--e}else w=t[e];b=w.x,A=w.y;const r=e<=0&&!q,i=e===t.length-1;if(r||(O+=B),L=i?c?t[1]:null:t[e+1],L?(U.x=L.x-b,U.y=L.y-A,k=x(U),U.x/=k,U.y/=k):(U.x=void 0,U.y=void 0),!c){if(r){a(N,U),F=N.x,V=N.y,v===n.RL.SQUARE&&(j(-U.y-U.x,U.x-U.y,U.x,U.y,0,-1),j(U.y-U.x,-U.x-U.y,U.x,U.y,0,1)),v===n.RL.ROUND&&(j(-U.y-U.x,U.x-U.y,U.x,U.y,-1,-1),j(U.y-U.x,-U.x-U.y,U.x,U.y,-1,1)),v!==n.RL.ROUND&&v!==n.RL.BUTT||(j(-U.y,U.x,U.x,U.y,0,-1),j(U.y,-U.x,U.x,U.y,0,1));continue}if(i){s(N,R),F=N.x,V=N.y,v!==n.RL.ROUND&&v!==n.RL.BUTT||(j(R.y,-R.x,-R.x,-R.y,0,-1),j(-R.y,R.x,-R.x,-R.y,0,1)),v===n.RL.SQUARE&&(j(R.y-R.x,-R.x-R.y,-R.x,-R.y,0,-1),j(-R.y-R.x,R.x-R.y,-R.x,-R.y,0,1)),v===n.RL.ROUND&&(j(R.y-R.x,-R.x-R.y,-R.x,-R.y,1,-1),j(-R.y-R.x,R.x-R.y,-R.x,-R.y,1,1));continue}}let o,f,z=(P=U,-((H=R).x*P.y-H.y*P.x));if(Math.abs(z)<.01)h(R,U)>0?(N.x=R.x,N.y=R.y,z=1,o=Number.MAX_VALUE,f=!0):(a(N,U),z=1,o=1,f=!1);else{N.x=(R.x+U.x)/z,N.y=(R.y+U.y)/z,o=x(N);const t=(o-1)*T*d;f=o>4||t>B&&t>k}F=N.x,V=N.y;let I=g;switch(g){case n.AH.BEVEL:o<1.05&&(I=n.AH.MITER);break;case n.AH.ROUND:o<_&&(I=n.AH.MITER);break;case n.AH.MITER:o>p&&(I=n.AH.BEVEL)}switch(I){case n.AH.MITER:if(j(N.x,N.y,-R.x,-R.y,0,-1),j(-N.x,-N.y,-R.x,-R.y,0,1),i)break;if(m){const t=q?0:O;Z=this._writeVertex(b,A,F,V,U.x,U.y,N.x,N.y,0,-1,t),C=this._writeVertex(b,A,F,V,U.x,U.y,-N.x,-N.y,0,1,t)}break;case n.AH.BEVEL:{const t=z<0;let e,r,n,o;if(t){const t=Z;Z=C,C=t,e=S,r=E}else e=E,r=S;if(f)n=t?a(this._innerPrev,R):s(this._innerPrev,R),o=t?s(this._innerNext,U):a(this._innerNext,U);else{const e=t?u(this._inner,N):l(this._inner,N);n=e,o=e}const x=t?s(this._bevelStart,R):a(this._bevelStart,R);j(n.x,n.y,-R.x,-R.y,e.x,e.y);const h=j(x.x,x.y,-R.x,-R.y,r.x,r.y);if(i)break;const c=t?a(this._bevelEnd,U):s(this._bevelEnd,U);if(f){const t=this._writeVertex(b,A,F,V,-R.x,-R.y,0,0,0,0,O);Z=this._writeVertex(b,A,F,V,U.x,U.y,o.x,o.y,e.x,e.y,O),C=this._writeVertex(b,A,F,V,U.x,U.y,c.x,c.y,r.x,r.y,O),this._writeTriangle(h,t,C)}else{if(m){const t=this._bevelMiddle;t.x=(x.x+c.x)/2,t.y=(x.y+c.y)/2,y(M,t,-R.x,-R.y),j(t.x,t.y,-R.x,-R.y,M.x,M.y),y(M,t,U.x,U.y),Z=this._writeVertex(b,A,F,V,U.x,U.y,t.x,t.y,M.x,M.y,O),C=this._writeVertex(b,A,F,V,U.x,U.y,o.x,o.y,e.x,e.y,O)}else{const t=Z;Z=C,C=t}j(c.x,c.y,U.x,U.y,r.x,r.y)}if(t){const t=Z;Z=C,C=t}break}case n.AH.ROUND:{const t=z<0;let e,r;if(t){const t=Z;Z=C,C=t,e=S,r=E}else e=E,r=S;const n=t?u(this._inner,N):l(this._inner,N);let x,c;f?(x=t?a(this._innerPrev,R):s(this._innerPrev,R),c=t?s(this._innerNext,U):a(this._innerNext,U)):(x=n,c=n);const d=t?s(this._roundStart,R):a(this._roundStart,R),v=t?a(this._roundEnd,U):s(this._roundEnd,U),g=j(x.x,x.y,-R.x,-R.y,e.x,e.y),p=j(d.x,d.y,-R.x,-R.y,r.x,r.y);if(i)break;const _=this._writeVertex(b,A,F,V,-R.x,-R.y,0,0,0,0,O);f||this._writeTriangle(Z,C,_);const T=u(this._outer,n),w=this._writeVertex(b,A,F,V,U.x,U.y,v.x,v.y,r.x,r.y,O);let L,B;const k=o>2;if(k){let e;o!==Number.MAX_VALUE?(T.x/=o,T.y/=o,e=h(R,T),e=(o*(e*e-1)+1)/e):e=-1,L=t?s(this._startBreak,R):a(this._startBreak,R),L.x+=R.x*e,L.y+=R.y*e,B=t?a(this._endBreak,U):s(this._endBreak,U),B.x+=U.x*e,B.y+=U.y*e}y(M,T,-R.x,-R.y);const D=this._writeVertex(b,A,F,V,-R.x,-R.y,T.x,T.y,M.x,M.y,O);y(M,T,U.x,U.y);const I=m?this._writeVertex(b,A,F,V,U.x,U.y,T.x,T.y,M.x,M.y,O):D,q=_,H=m?this._writeVertex(b,A,F,V,U.x,U.y,0,0,0,0,O):_;let P=-1,W=-1;if(k&&(y(M,L,-R.x,-R.y),P=this._writeVertex(b,A,F,V,-R.x,-R.y,L.x,L.y,M.x,M.y,O),y(M,B,U.x,U.y),W=this._writeVertex(b,A,F,V,U.x,U.y,B.x,B.y,M.x,M.y,O)),m?k?(this._writeTriangle(q,p,P),this._writeTriangle(q,P,D),this._writeTriangle(H,I,W),this._writeTriangle(H,W,w)):(this._writeTriangle(q,p,D),this._writeTriangle(H,I,w)):k?(this._writeTriangle(_,p,P),this._writeTriangle(_,P,W),this._writeTriangle(_,W,w)):(this._writeTriangle(_,p,D),this._writeTriangle(_,I,w)),f?(Z=this._writeVertex(b,A,F,V,U.x,U.y,c.x,c.y,e.x,e.y,O),C=w):(Z=m?this._writeVertex(b,A,F,V,U.x,U.y,c.x,c.y,e.x,e.y,O):g,this._writeTriangle(Z,H,w),C=w),t){const t=Z;Z=C,C=t}break}}}var H,P}}}}]);
|