@arcgis/core 4.25.0-next.20220718 → 4.25.0-next.20220721

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (284) hide show
  1. package/Camera.js +1 -1
  2. package/analysis/DimensioningAnalysis.js +1 -1
  3. package/analysis/LineOfSightAnalysis.js +1 -1
  4. package/analysis/SliceAnalysis.js +1 -1
  5. package/arcade/featureset/support/RecentlyUsedCache.js +1 -1
  6. package/arcade/functions/featuresetgeom.js +1 -1
  7. package/assets/esri/core/workers/RemoteClient.js +1 -1
  8. package/assets/esri/core/workers/chunks/1751de504354d98ac3fd.js +1 -0
  9. package/assets/esri/core/workers/chunks/1f4f1896880bfa6801c5.js +1 -0
  10. package/assets/esri/core/workers/chunks/290cd411d0d18b1d0efd.js +1 -0
  11. package/assets/esri/core/workers/chunks/{ab3bd5fecdb97f2d690e.js → 3b5be512567d9c1c6fe6.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{c3236a7058e64ea3b939.js → 3c9da9b88777700879aa.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{f96e8724ae3458f5e262.js → 4a7aa1b9de61eb013647.js} +1 -1
  14. package/assets/esri/core/workers/chunks/4cb64ccb5fba126f9a66.js +1 -0
  15. package/assets/esri/core/workers/chunks/{68f19e58aae01791944e.js → 579ba109718bc2554008.js} +1 -1
  16. package/assets/esri/core/workers/chunks/59845b02b07a8ed7ce81.js +1 -0
  17. package/assets/esri/core/workers/chunks/{c705f907ce60a646d9aa.js → 652d36523efbe5c9ebb2.js} +1 -1
  18. package/assets/esri/core/workers/chunks/888d8e4471c9a2cd5009.js +1 -0
  19. package/assets/esri/core/workers/chunks/9493a8e5d6001b6bf275.js +1 -0
  20. package/assets/esri/core/workers/chunks/9d824cdfbcdf3cb3246f.js +1 -0
  21. package/assets/esri/core/workers/chunks/bf348f6f52701fa6016e.js +987 -0
  22. package/assets/esri/core/workers/chunks/d02881954c0cc0d39dfb.js +1 -0
  23. package/assets/esri/core/workers/chunks/{1ecbf642debc2207b762.js → da54483123f377e9b3e1.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{61b71b8e028eda10ccab.js → e4ad2cf5d6bded02e392.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{3bfab05ae07ac18a75fe.js → f298a70f3b6f27675d53.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{d499cce61c1c5c367380.js → f40290cfad3fe6fb4ef9.js} +1 -1
  27. package/assets/esri/layers/support/rasterFormats/lerc-wasm.wasm +0 -0
  28. package/assets/esri/themes/base/widgets/_Tooltip.scss +1 -1
  29. package/assets/esri/themes/dark/main.css +1 -1
  30. package/assets/esri/themes/light/main.css +1 -1
  31. package/assets/esri/themes/light/view.css +1 -1
  32. package/chunks/ComponentShader.glsl.js +39 -33
  33. package/chunks/Laserlines.glsl.js +4 -4
  34. package/chunks/Precipitation.glsl.js +2 -2
  35. package/chunks/RibbonLine.glsl.js +46 -44
  36. package/chunks/Stars.glsl.js +2 -2
  37. package/chunks/Terrain.glsl.js +25 -17
  38. package/chunks/boundedPlane.js +1 -1
  39. package/chunks/lerc-wasm.js +1 -1
  40. package/chunks/mat2d.js +1 -1
  41. package/chunks/quatf32.js +1 -1
  42. package/core/BidiEngine.js +1 -1
  43. package/core/accessorSupport/watch.js +1 -1
  44. package/core/libs/gl-matrix-2/factories/quatf32.js +1 -1
  45. package/core/libs/gl-matrix-2/math/mat2d.js +1 -1
  46. package/core/perspectiveUtils.js +1 -1
  47. package/core/promiseUtils.js +1 -1
  48. package/core/reactiveUtils.js +1 -1
  49. package/core/unitUtils.js +1 -1
  50. package/geometry/projection.js +1 -1
  51. package/geometry/projectionEllipsoid.js +1 -1
  52. package/geometry/support/MeshTexture.js +1 -1
  53. package/geometry/support/axisAngleDegrees.js +1 -1
  54. package/geometry/support/coordinateSystem.js +1 -1
  55. package/geometry/support/geodesicUtils.js +1 -1
  56. package/geometry/support/meshUtils/exporters/gltf/index.js +1 -1
  57. package/geometry/support/meshUtils/loadExternal.js +1 -1
  58. package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
  59. package/geometry/support/scaleUtils.js +1 -1
  60. package/geometry/support/spatialReferenceUtils.js +1 -1
  61. package/identity/IdentityManagerBase.js +1 -1
  62. package/identity/IdentityModal.js +1 -1
  63. package/interfaces.d.ts +3 -33
  64. package/layers/FeatureLayer.js +1 -1
  65. package/layers/effects/parser.js +1 -1
  66. package/layers/graphics/hydratedFeatures.js +1 -1
  67. package/layers/graphics/sources/support/sourceUtils.js +1 -1
  68. package/layers/mixins/ArcGISImageService.js +1 -1
  69. package/layers/ogc/wfsUtils.js +1 -1
  70. package/layers/support/ContingentValue.js +1 -1
  71. package/layers/support/ElevationQuery.js +1 -1
  72. package/layers/support/PixelBlock.js +1 -1
  73. package/layers/support/kmlUtils.js +1 -1
  74. package/layers/support/rasterDatasets/CloudRaster.js +1 -1
  75. package/layers/support/rasterDatasets/EphemeralBlockCache.js +1 -1
  76. package/layers/support/rasterDatasets/ImageServerRaster.js +1 -1
  77. package/layers/support/rasterDatasets/multipartParser.js +1 -1
  78. package/layers/support/rasterFormats/ImageCanvasDecoder.js +1 -1
  79. package/layers/support/rasterFormats/JpgPlus.js +1 -1
  80. package/layers/support/rasterFormats/Lerc.js +1 -1
  81. package/layers/support/rasterFormats/RasterCodec.js +1 -1
  82. package/layers/support/rasterFormats/Raw.js +1 -1
  83. package/layers/support/rasterFormats/TiffTags.js +1 -1
  84. package/layers/support/rasterFunctions/vectorFieldUtils.js +1 -1
  85. package/layers/support/vectorTileLayerLoader.js +1 -1
  86. package/layers/support/wmtsUtils.js +1 -1
  87. package/package.json +1 -1
  88. package/renderers/RasterShadedReliefRenderer.js +1 -1
  89. package/renderers/RasterStretchRenderer.js +1 -1
  90. package/renderers/UniqueValueRenderer.js +1 -1
  91. package/renderers/support/AuthoringInfo.js +1 -1
  92. package/renderers/support/RasterSymbolizer.js +1 -1
  93. package/rest/query/operations/query.js +1 -1
  94. package/rest/query/operations/queryTopFeatures.js +1 -1
  95. package/rest/support/DirectionsFeatureSet.js +1 -1
  96. package/rest/support/ImageHistogramParameters.js +1 -1
  97. package/rest/support/ImageSampleParameters.js +1 -1
  98. package/smartMapping/labels/clusters.js +1 -1
  99. package/smartMapping/renderers/relationship.js +1 -1
  100. package/smartMapping/support/adapters/support/utils.js +1 -1
  101. package/support/basemapUtils.js +1 -1
  102. package/support/revision.js +1 -1
  103. package/symbols/LabelSymbol3D.js +1 -1
  104. package/symbols/PointSymbol3D.js +1 -1
  105. package/symbols/cim/CIMCursor.js +1 -1
  106. package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
  107. package/symbols/cim/CIMSymbolRasterizer.js +1 -1
  108. package/symbols/support/previewSymbol3D.js +1 -1
  109. package/symbols/support/webStyleSymbolUtils.js +1 -1
  110. package/views/2d/ViewState.js +1 -1
  111. package/views/2d/engine/vectorTiles/Feature.js +1 -1
  112. package/views/2d/engine/vectorTiles/style/StyleRepository.js +1 -1
  113. package/views/2d/engine/webgl/SDFConverter.js +1 -1
  114. package/views/2d/engine/webgl/TurboLine.js +1 -1
  115. package/views/2d/engine/webgl/brushes/BrushClip.js +1 -1
  116. package/views/2d/engine/webgl/brushes/BrushOverlay.js +1 -1
  117. package/views/2d/engine/webgl/brushes/WGLGeometryBrushLabel.js +1 -1
  118. package/views/2d/engine/webgl/brushes/WGLGeometryBrushLine.js +1 -1
  119. package/views/2d/engine/webgl/brushes/WGLGeometryBrushText.js +1 -1
  120. package/views/2d/engine/webgl/collisions/MetricReader.js +1 -1
  121. package/views/2d/engine/webgl/cpuMapped/DisplayRecordReader.js +1 -1
  122. package/views/2d/engine/webgl/cpuMapped/FreeList.js +1 -1
  123. package/views/2d/engine/webgl/mesh/heuristics.js +1 -1
  124. package/views/2d/engine/webgl/mesh/templates/WGLDynamicFillTemplate.js +1 -1
  125. package/views/2d/engine/webgl/mesh/templates/WGLDynamicLineTemplate.js +1 -1
  126. package/views/2d/engine/webgl/mesh/templates/WGLDynamicMarkerTemplate.js +1 -1
  127. package/views/2d/engine/webgl/mesh/templates/WGLDynamicTextTemplate.js +1 -1
  128. package/views/2d/engine/webgl/mesh/templates/WGLFillTemplate.js +1 -1
  129. package/views/2d/engine/webgl/mesh/templates/WGLLineTemplate.js +1 -1
  130. package/views/2d/engine/webgl/mesh/templates/WGLMarkerTemplate.js +1 -1
  131. package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
  132. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  133. package/views/2d/input/MapViewInputManager.js +1 -1
  134. package/views/2d/layers/features/createSymbolSchema.js +1 -1
  135. package/views/2d/viewpointUtils.js +1 -1
  136. package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
  137. package/views/3d/analysis/LineOfSight/LineOfSightIntersectionResult.js +1 -1
  138. package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
  139. package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
  140. package/views/3d/analysis/LineOfSight/LineOfSightVisualization.js +1 -1
  141. package/views/3d/analysis/LineOfSightAnalysisView3D.js +1 -1
  142. package/views/3d/analysis/Slice/SliceTool.js +1 -1
  143. package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
  144. package/views/3d/camera/constraintUtils/distance.js +1 -1
  145. package/views/3d/environment/ChapmanAtmosphereTechniqueConfiguration.js +1 -1
  146. package/views/3d/environment/CloudsComposition.js +1 -1
  147. package/views/3d/environment/FogTechnique.js +1 -1
  148. package/views/3d/glTF/internal/Resource.js +1 -1
  149. package/views/3d/input/SceneInputManager.js +1 -1
  150. package/views/3d/interactive/editingTools/dragEventPipeline3D.js +1 -1
  151. package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
  152. package/views/3d/interactive/editingTools/reshapeGraphic/edgeOffsetUtils.js +1 -1
  153. package/views/3d/interactive/editingTools/transformGraphic/GraphicScaleRotateTransform.js +1 -1
  154. package/views/3d/interactive/editingTools/transformGraphic/GraphicTransformTool.js +1 -1
  155. package/views/3d/interactive/editingTools/transformGraphic/ScaleRotateObjectSymbol3DAdapter.js +1 -1
  156. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
  157. package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
  158. package/views/3d/layers/GraphicsLayerView3D.js +1 -1
  159. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  160. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  161. package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
  162. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  163. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  164. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  165. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  166. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  167. package/views/3d/layers/graphics/lineUtils.js +1 -1
  168. package/views/3d/layers/i3s/I3SGeometryUtil.js +1 -1
  169. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  170. package/views/3d/layers/i3s/IDBCache.js +1 -1
  171. package/views/3d/layers/i3s/IDBMockCache.js +1 -1
  172. package/views/3d/layers/i3s/PointRenderer.js +1 -1
  173. package/views/3d/layers/support/featureTileQuery3D.js +1 -1
  174. package/views/3d/state/ViewState.js +1 -1
  175. package/views/3d/support/cameraUtils.js +1 -1
  176. package/views/3d/support/orientedBoundingBox.js +1 -1
  177. package/views/3d/support/viewpointUtils.js +1 -1
  178. package/views/3d/terrain/Overlay.js +1 -1
  179. package/views/3d/terrain/OverlayRenderTarget.js +1 -1
  180. package/views/3d/terrain/OverlayRenderer.js +1 -1
  181. package/views/3d/terrain/TerrainRenderer.js +1 -1
  182. package/views/3d/terrain/TerrainSurface.js +1 -1
  183. package/views/3d/terrain/TilingSchemeLogic.js +1 -1
  184. package/views/3d/terrain/interfaces.js +1 -1
  185. package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
  186. package/views/3d/webgl-engine/collections/Component/DepthRange.js +1 -1
  187. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  188. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  189. package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentShader.glsl.js +1 -1
  190. package/views/3d/webgl-engine/collections/Component/RenderGeometry.js +1 -1
  191. package/views/3d/webgl-engine/core/renderPasses/AllRenderPasses.js +1 -1
  192. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  193. package/views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js +1 -1
  194. package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +2 -2
  195. package/views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js +2 -2
  196. package/views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js +9 -0
  197. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +18 -17
  198. package/views/3d/webgl-engine/lib/DefaultVertexAttributeLocations.js +1 -1
  199. package/views/3d/webgl-engine/lib/Geometry.js +1 -1
  200. package/views/3d/webgl-engine/lib/Intersector.js +1 -1
  201. package/views/3d/webgl-engine/lib/ObjectAndLayerIdRenderHelper.js +5 -0
  202. package/views/3d/webgl-engine/lib/Octree.js +1 -1
  203. package/views/3d/webgl-engine/lib/OffscreenRendering.js +1 -1
  204. package/views/3d/webgl-engine/lib/PathGeometry.js +1 -1
  205. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  206. package/views/3d/webgl-engine/lib/TextureTechniqueConfiguration.js +1 -1
  207. package/views/3d/webgl-engine/lib/VertexAttribute.js +1 -1
  208. package/views/3d/webgl-engine/lib/geometryDataUtils.js +1 -1
  209. package/views/3d/webgl-engine/lib/lodRendering/InstanceData.js +1 -1
  210. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  211. package/views/3d/webgl-engine/lib/lodRendering/RenderInstanceData.js +1 -1
  212. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  213. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  214. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  215. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  216. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  217. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  218. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  219. package/views/3d/webgl-engine/parts/ScreenshotManager.js +1 -1
  220. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  221. package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
  222. package/views/3d/webgl-engine/shaders/LaserlinePathTechniqueConfiguration.js +1 -1
  223. package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
  224. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  225. package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
  226. package/views/DOMContainer.js +1 -1
  227. package/views/MapView.js +1 -1
  228. package/views/SceneView.js +1 -1
  229. package/views/View.js +1 -1
  230. package/views/analysis/analysisViewUtils.js +1 -1
  231. package/views/animation/pointToPoint/apex/planning.js +1 -1
  232. package/views/draw/PolygonDrawAction.js +1 -1
  233. package/views/draw/PolylineDrawAction.js +1 -1
  234. package/views/draw/support/createUtils.js +1 -1
  235. package/views/draw/support/surfaceCoordinateSystems.js +1 -1
  236. package/views/input/InputManager.js +1 -1
  237. package/views/input/handlers/LatestPointer.js +1 -1
  238. package/views/input/handlers/MultiTouch.js +5 -0
  239. package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
  240. package/views/interactive/snapping/featureSources/GraphicsSnappingSource.js +1 -1
  241. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTileCache.js +1 -1
  242. package/views/interactive/tooltip/Tooltip.js +1 -1
  243. package/views/interactive/tooltip/support/measurements.js +1 -1
  244. package/views/layers/GroupLayerView.js +1 -1
  245. package/views/navigation/FilteredFiniteDifference.js +1 -1
  246. package/views/navigation/MomentumEstimator.js +1 -1
  247. package/views/navigation/PanPlanarMomentumEstimator.js +1 -1
  248. package/views/navigation/PanSphericalMomentumEstimator.js +1 -1
  249. package/views/navigation/RotationMomentumEstimator.js +1 -1
  250. package/views/support/GroundViewElevationSampler.js +1 -1
  251. package/views/support/euclideanAreaMeasurementUtils.js +1 -1
  252. package/views/support/euclideanLengthMeasurementUtils.js +1 -1
  253. package/views/support/screenshotUtils.js +1 -1
  254. package/views/webgl/BufferObject.js +1 -1
  255. package/views/webgl/FramebufferObject.js +1 -1
  256. package/views/webgl/Texture.js +1 -1
  257. package/views/webgl/capabilities/Capabilities.js +1 -1
  258. package/views/webgl/capabilities.js +1 -1
  259. package/views/webgl/renderState.js +1 -1
  260. package/webscene/spec-certification/api.js +1 -1
  261. package/widgets/CoordinateConversion/support/formatUtils.js +1 -1
  262. package/widgets/ElevationProfile/ElevationProfileController.js +1 -1
  263. package/widgets/ElevationProfile/ElevationProfileLineInput.js +1 -1
  264. package/widgets/ElevationProfile/ElevationProfileLineView.js +1 -1
  265. package/widgets/ElevationProfile/support/chartUtils.js +1 -1
  266. package/widgets/ElevationProfile/support/geometryUtils.js +1 -1
  267. package/widgets/Expand.js +1 -1
  268. package/widgets/Legend/support/sizeRampUtils.js +1 -1
  269. package/widgets/LineOfSight/LineOfSightViewModel.js +1 -1
  270. package/widgets/Popup/PopupViewModel.js +1 -1
  271. package/widgets/Popup/actionUtils.js +1 -1
  272. package/widgets/ScaleRangeSlider.js +1 -1
  273. package/widgets/Slider/SliderViewModel.js +1 -1
  274. package/widgets/Widget.js +1 -1
  275. package/assets/esri/core/workers/chunks/04ea469cb081e181ca82.js +0 -1
  276. package/assets/esri/core/workers/chunks/16c2626ca47132700519.js +0 -1
  277. package/assets/esri/core/workers/chunks/1e4e5d147263e98536bc.js +0 -1
  278. package/assets/esri/core/workers/chunks/35083def3c658d1ae9ff.js +0 -1
  279. package/assets/esri/core/workers/chunks/40032d2bf404a46b8f80.js +0 -1
  280. package/assets/esri/core/workers/chunks/613e82a3e13442685ac4.js +0 -1
  281. package/assets/esri/core/workers/chunks/64b4f1dbf61439cde801.js +0 -1
  282. package/assets/esri/core/workers/chunks/abd68b7ba3be4696611c.js +0 -1
  283. package/assets/esri/core/workers/chunks/b8a062c0c9c626acf61e.js +0 -982
  284. package/assets/esri/core/workers/chunks/e08686088be0aaca1a99.js +0 -1
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6810],{95401:(t,i,e)=>{e.d(i,{e:()=>x});var n,s,r,h={exports:{}};n=h,s=function(){function t(t,e,s){s=s||2;var r,h,x,l,a,u,_,y=e&&e.length,f=y?e[0]*s:t.length,c=i(t,0,f,s,!0),p=[];if(!c||c.next===c.prev)return p;if(y&&(c=o(t,e,c,s)),t.length>80*s){r=x=t[0],h=l=t[1];for(var m=s;m<f;m+=s)(a=t[m])<r&&(r=a),(u=t[m+1])<h&&(h=u),a>x&&(x=a),u>l&&(l=u);_=0!==(_=Math.max(x-r,l-h))?1/_:0}return n(c,p,s,r,h,_),p}function i(t,i,e,n,s){var r,h;if(s===U(t,i,e,n)>0)for(r=i;r<e;r+=n)h=R(r,t[r],t[r+1],h);else for(r=e-n;r>=i;r-=n)h=R(r,t[r],t[r+1],h);if(h&&d(h,h.next)){var x=h.next;b(h),h=x}return h}function e(t,i){if(!t)return t;i||(i=t);var e,n=t;do{if(e=!1,n.steiner||!d(n,n.next)&&0!==v(n.prev,n,n.next))n=n.next;else{var s=n.prev;if(b(n),(n=i=s)===n.next)break;e=!0}}while(e||n!==i);return i}function n(t,i,o,l,a,u,_){if(t){!_&&u&&y(t,l,a,u);for(var f,c,p=t;t.prev!==t.next;)if(f=t.prev,c=t.next,u?r(t,l,a,u):s(t))i.push(f.i/o),i.push(t.i/o),i.push(c.i/o),b(t),t=c.next,p=c.next;else if((t=c)===p){_?1===_?n(t=h(e(t),i,o),i,o,l,a,u,2):2===_&&x(t,i,o,l,a,u):n(e(t),i,o,l,a,u,1);break}}}function s(t){var i=t.prev,e=t,n=t.next;if(v(i,e,n)>=0)return!1;for(var s=t.next.next;s!==t.prev;){if(p(i.x,i.y,e.x,e.y,n.x,n.y,s.x,s.y)&&v(s.prev,s,s.next)>=0)return!1;s=s.next}return!0}function r(t,i,e,n){var s=t.prev,r=t,h=t.next;if(v(s,r,h)>=0)return!1;for(var x=s.x<r.x?s.x<h.x?s.x:h.x:r.x<h.x?r.x:h.x,o=s.y<r.y?s.y<h.y?s.y:h.y:r.y<h.y?r.y:h.y,l=s.x>r.x?s.x>h.x?s.x:h.x:r.x>h.x?r.x:h.x,a=s.y>r.y?s.y>h.y?s.y:h.y:r.y>h.y?r.y:h.y,u=f(x,o,i,e,n),_=f(l,a,i,e,n),y=t.prevZ,c=t.nextZ;y&&y.z>=u&&c&&c.z<=_;){if(y!==t.prev&&y!==t.next&&p(s.x,s.y,r.x,r.y,h.x,h.y,y.x,y.y)&&v(y.prev,y,y.next)>=0)return!1;if(y=y.prevZ,c!==t.prev&&c!==t.next&&p(s.x,s.y,r.x,r.y,h.x,h.y,c.x,c.y)&&v(c.prev,c,c.next)>=0)return!1;c=c.nextZ}for(;y&&y.z>=u;){if(y!==t.prev&&y!==t.next&&p(s.x,s.y,r.x,r.y,h.x,h.y,y.x,y.y)&&v(y.prev,y,y.next)>=0)return!1;y=y.prevZ}for(;c&&c.z<=_;){if(c!==t.prev&&c!==t.next&&p(s.x,s.y,r.x,r.y,h.x,h.y,c.x,c.y)&&v(c.prev,c,c.next)>=0)return!1;c=c.nextZ}return!0}function h(t,i,n){var s=t;do{var r=s.prev,h=s.next.next;!d(r,h)&&g(r,s,s.next,h)&&L(r,h)&&L(h,r)&&(i.push(r.i/n),i.push(s.i/n),i.push(h.i/n),b(s),b(s.next),s=t=h),s=s.next}while(s!==t);return e(s)}function x(t,i,s,r,h,x){var o=t;do{for(var l=o.next.next;l!==o.prev;){if(o.i!==l.i&&m(o,l)){var a=A(o,l);return o=e(o,o.next),a=e(a,a.next),n(o,i,s,r,h,x),void n(a,i,s,r,h,x)}l=l.next}o=o.next}while(o!==t)}function o(t,n,s,r){var h,x,o,a=[];for(h=0,x=n.length;h<x;h++)(o=i(t,n[h]*r,h<x-1?n[h+1]*r:t.length,r,!1))===o.next&&(o.steiner=!0),a.push(c(o));for(a.sort(l),h=0;h<a.length;h++)s=e(s=u(a[h],s),s.next);return s}function l(t,i){return t.x-i.x}function a(t){if(t.next.prev===t)return t;let i=t;for(;;){const e=i.next;if(e.prev===i||e===i||e===t)break;i=e}return i}function u(t,i){var n=function(t,i){var e,n=i,s=t.x,r=t.y,h=-1/0;do{if(r<=n.y&&r>=n.next.y&&n.next.y!==n.y){var x=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(x<=s&&x>h){if(h=x,x===s){if(r===n.y)return n;if(r===n.next.y)return n.next}e=n.x<n.next.x?n:n.next}}n=n.next}while(n!==i);if(!e)return null;if(s===h)return e;var o,l=e,a=e.x,u=e.y,y=1/0;n=e;do{s>=n.x&&n.x>=a&&s!==n.x&&p(r<u?s:h,r,a,u,r<u?h:s,r,n.x,n.y)&&(o=Math.abs(r-n.y)/(s-n.x),L(n,t)&&(o<y||o===y&&(n.x>e.x||n.x===e.x&&_(e,n)))&&(e=n,y=o)),n=n.next}while(n!==l);return e}(t,i);if(!n)return i;var s=A(n,t),r=e(n,n.next);let h=a(s);return e(h,h.next),r=a(r),a(i===n?r:i)}function _(t,i){return v(t.prev,t,i.prev)<0&&v(i.next,t,t.next)<0}function y(t,i,e,n){var s=t;do{null===s.z&&(s.z=f(s.x,s.y,i,e,n)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next}while(s!==t);s.prevZ.nextZ=null,s.prevZ=null,function(t){var i,e,n,s,r,h,x,o,l=1;do{for(e=t,t=null,r=null,h=0;e;){for(h++,n=e,x=0,i=0;i<l&&(x++,n=n.nextZ);i++);for(o=l;x>0||o>0&&n;)0!==x&&(0===o||!n||e.z<=n.z)?(s=e,e=e.nextZ,x--):(s=n,n=n.nextZ,o--),r?r.nextZ=s:t=s,s.prevZ=r,r=s;e=n}r.nextZ=null,l*=2}while(h>1)}(s)}function f(t,i,e,n,s){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-e)*s)|t<<8))|t<<4))|t<<2))|t<<1))|(i=1431655765&((i=858993459&((i=252645135&((i=16711935&((i=32767*(i-n)*s)|i<<8))|i<<4))|i<<2))|i<<1))<<1}function c(t){var i=t,e=t;do{(i.x<e.x||i.x===e.x&&i.y<e.y)&&(e=i),i=i.next}while(i!==t);return e}function p(t,i,e,n,s,r,h,x){return(s-h)*(i-x)-(t-h)*(r-x)>=0&&(t-h)*(n-x)-(e-h)*(i-x)>=0&&(e-h)*(r-x)-(s-h)*(n-x)>=0}function m(t,i){return t.next.i!==i.i&&t.prev.i!==i.i&&!function(t,i){var e=t;do{if(e.i!==t.i&&e.next.i!==t.i&&e.i!==i.i&&e.next.i!==i.i&&g(e,e.next,t,i))return!0;e=e.next}while(e!==t);return!1}(t,i)&&(L(t,i)&&L(i,t)&&function(t,i){var e=t,n=!1,s=(t.x+i.x)/2,r=(t.y+i.y)/2;do{e.y>r!=e.next.y>r&&e.next.y!==e.y&&s<(e.next.x-e.x)*(r-e.y)/(e.next.y-e.y)+e.x&&(n=!n),e=e.next}while(e!==t);return n}(t,i)&&(v(t.prev,t,i.prev)||v(t,i.prev,i))||d(t,i)&&v(t.prev,t,t.next)>0&&v(i.prev,i,i.next)>0)}function v(t,i,e){return(i.y-t.y)*(e.x-i.x)-(i.x-t.x)*(e.y-i.y)}function d(t,i){return t.x===i.x&&t.y===i.y}function g(t,i,e,n){var s=w(v(t,i,e)),r=w(v(t,i,n)),h=w(v(e,n,t)),x=w(v(e,n,i));return s!==r&&h!==x||!(0!==s||!T(t,e,i))||!(0!==r||!T(t,n,i))||!(0!==h||!T(e,t,n))||!(0!==x||!T(e,i,n))}function T(t,i,e){return i.x<=Math.max(t.x,e.x)&&i.x>=Math.min(t.x,e.x)&&i.y<=Math.max(t.y,e.y)&&i.y>=Math.min(t.y,e.y)}function w(t){return t>0?1:t<0?-1:0}function L(t,i){return v(t.prev,t,t.next)<0?v(t,i,t.next)>=0&&v(t,t.prev,i)>=0:v(t,i,t.prev)<0||v(t,t.next,i)<0}function A(t,i){var e=new B(t.i,t.x,t.y),n=new B(i.i,i.x,i.y),s=t.next,r=i.prev;return t.next=i,i.prev=t,e.next=s,s.prev=e,n.next=e,e.prev=n,r.next=n,n.prev=r,n}function R(t,i,e,n){var s=new B(t,i,e);return n?(s.next=n.next,s.prev=n,n.next.prev=s,n.next=s):(s.prev=s,s.next=s),s}function b(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 B(t,i,e){this.i=t,this.x=i,this.y=e,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function U(t,i,e,n){for(var s=0,r=i,h=e-n;r<e;r+=n)s+=(t[h]-t[r])*(t[r+1]+t[h+1]),h=r;return s}return t.deviation=function(t,i,e,n){var s=i&&i.length,r=s?i[0]*e:t.length,h=Math.abs(U(t,0,r,e));if(s)for(var x=0,o=i.length;x<o;x++){var l=i[x]*e,a=x<o-1?i[x+1]*e:t.length;h-=Math.abs(U(t,l,a,e))}var u=0;for(x=0;x<n.length;x+=3){var _=n[x]*e,y=n[x+1]*e,f=n[x+2]*e;u+=Math.abs((t[_]-t[f])*(t[y+1]-t[_+1])-(t[_]-t[y])*(t[f+1]-t[_+1]))}return 0===h&&0===u?0:Math.abs((u-h)/h)},t.flatten=function(t){for(var i=t[0][0].length,e={vertices:[],holes:[],dimensions:i},n=0,s=0;s<t.length;s++){for(var r=0;r<t[s].length;r++)for(var h=0;h<i;h++)e.vertices.push(t[s][r][h]);s>0&&(n+=t[s-1].length,e.holes.push(n))}return e},t},void 0!==(r=s())&&(n.exports=r);const x=h.exports},79087:(t,i,e)=>{e.d(i,{Z:()=>R});const n=[["(",")"],[")","("],["<",">"],[">","<"],["[","]"],["]","["],["{","}"],["}","{"],["«","»"],["»","«"],["‹","›"],["›","‹"],["⁽","⁾"],["⁾","⁽"],["₍","₎"],["₎","₍"],["≤","≥"],["≥","≤"],["〈","〉"],["〉","〈"],["﹙","﹚"],["﹚","﹙"],["﹛","﹜"],["﹜","﹛"],["﹝","﹞"],["﹞","﹝"],["﹤","﹥"],["﹥","﹤"]],s=["آ","أ","إ","ا"],r=["ﻵ","ﻷ","ﻹ","ﻻ"],h=["ﻶ","ﻸ","ﻺ","ﻼ"],x=["ا","ب","ت","ث","ج","ح","خ","د","ذ","ر","ز","س","ش","ص","ض","ط","ظ","ع","غ","ف","ق","ك","ل","م","ن","ه","و","ي","إ","أ","آ","ة","ى","ل","م","ن","ه","و","ي","إ","أ","آ","ة","ى","ی","ئ","ؤ"],o=["ﺍ","ﺏ","ﺕ","ﺙ","ﺝ","ﺡ","ﺥ","ﺩ","ﺫ","ﺭ","ﺯ","ﺱ","ﺵ","ﺹ","ﺽ","ﻁ","ﻅ","ﻉ","ﻍ","ﻑ","ﻕ","ﻙ","ﻝ","ﻡ","ﻥ","ﻩ","ﻭ","ﻱ","ﺇ","ﺃ","ﺁ","ﺓ","ﻯ","ﯼ","ﺉ","ﺅ","ﹰ","ﹲ","ﹴ","ﹶ","ﹸ","ﹺ","ﹼ","ﹾ","ﺀ","ﺉ","ﺅ"],l=["ﺎ","ﺐ","ﺖ","ﺚ","ﺞ","ﺢ","ﺦ","ﺪ","ﺬ","ﺮ","ﺰ","ﺲ","ﺶ","ﺺ","ﺾ","ﻂ","ﻆ","ﻊ","ﻎ","ﻒ","ﻖ","ﻚ","ﻞ","ﻢ","ﻦ","ﻪ","ﻮ","ﻲ","ﺈ","ﺄ","ﺂ","ﺔ","ﻰ","ﯽ","ﺊ","ﺆ","ﹰ","ﹲ","ﹴ","ﹶ","ﹸ","ﹺ","ﹼ","ﹾ","ﺀ","ﺊ","ﺆ"],a=["ﺎ","ﺒ","ﺘ","ﺜ","ﺠ","ﺤ","ﺨ","ﺪ","ﺬ","ﺮ","ﺰ","ﺴ","ﺸ","ﺼ","ﻀ","ﻄ","ﻈ","ﻌ","ﻐ","ﻔ","ﻘ","ﻜ","ﻠ","ﻤ","ﻨ","ﻬ","ﻮ","ﻴ","ﺈ","ﺄ","ﺂ","ﺔ","ﻰ","ﯿ","ﺌ","ﺆ","ﹱ","ﹲ","ﹴ","ﹷ","ﹹ","ﹻ","ﹽ","ﹿ","ﺀ","ﺌ","ﺆ"],u=["ﺍ","ﺑ","ﺗ","ﺛ","ﺟ","ﺣ","ﺧ","ﺩ","ﺫ","ﺭ","ﺯ","ﺳ","ﺷ","ﺻ","ﺿ","ﻃ","ﻇ","ﻋ","ﻏ","ﻓ","ﻗ","ﻛ","ﻟ","ﻣ","ﻧ","ﻫ","ﻭ","ﻳ","ﺇ","ﺃ","ﺁ","ﺓ","ﻯ","ﯾ","ﺋ","ﺅ","ﹰ","ﹲ","ﹴ","ﹶ","ﹸ","ﹺ","ﹼ","ﹾ","ﺀ","ﺋ","ﺅ"],_=["ء","آ","أ","ؤ","إ","ا","ة","د","ذ","ر","ز","و","ى"],y=["ً","ً","ٌ","؟","ٍ","؟","َ","َ","ُ","ُ","ِ","ِ","ّ","ّ","ْ","ْ","ء","آ","آ","أ","أ","ؤ","ؤ","إ","إ","ئ","ئ","ئ","ئ","ا","ا","ب","ب","ب","ب","ة","ة","ت","ت","ت","ت","ث","ث","ث","ث","ج","ج","ج","ج","ح","ح","ح","ح","خ","خ","خ","خ","د","د","ذ","ذ","ر","ر","ز","ز","س","س","س","س","ش","ش","ش","ش","ص","ص","ص","ص","ض","ض","ض","ض","ط","ط","ط","ط","ظ","ظ","ظ","ظ","ع","ع","ع","ع","غ","غ","غ","غ","ف","ف","ف","ف","ق","ق","ق","ق","ك","ك","ك","ك","ل","ل","ل","ل","م","م","م","م","ن","ن","ن","ن","ه","ه","ه","ه","و","و","ى","ى","ي","ي","ي","ي","ﻵ","ﻶ","ﻷ","ﻸ","ﻹ","ﻺ","ﻻ","ﻼ","؟","؟","؟"],f=["ء","ف"],c=["غ","ي"],p=[[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]],m=[[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]],v=10,d=11,g=12,T=18,w=["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"],L=[100,0,0,0,0,101,102,103,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,104,4,4,4,0,4,0,4,0,4,4,4,0,0,4,4,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,4,4,0,0,4,4,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,105,7,7,106,107],A=[[T,T,T,T,T,T,T,T,T,6,5,6,8,5,T,T,T,T,T,T,T,T,T,T,T,T,T,T,5,5,5,6,8,4,4,d,d,d,4,4,4,4,4,v,9,v,9,9,2,2,2,2,2,2,2,2,2,2,9,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,T,T,T,T,T,T,5,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,9,4,d,d,d,d,4,4,4,4,0,4,4,T,4,4,d,d,2,2,4,0,4,4,4,2,0,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,4,4,4,4,4,4,4,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,1,g,1,g,g,1,g,g,1,g,4,4,4,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,4,4,1,1,1,1,1,4,4,4,4,4,4,4,4,4,4,4],[3,3,3,3,4,4,4,4,7,d,d,7,9,7,4,4,g,g,g,g,g,g,g,g,g,g,g,7,4,4,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,3,3,3,3,3,3,3,3,3,3,d,3,3,7,7,7,g,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,g,g,g,g,g,g,g,3,4,g,g,g,g,g,g,7,7,g,g,4,g,g,g,g,7,7,2,2,2,2,2,2,2,2,2,2,7,7,7,7,7,7],[7,7,7,7,7,7,7,7,7,7,7,7,7,7,4,7,7,g,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,4,4,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,g,g,g,g,g,g,g,g,g,g,g,7,4,4,4,4,4,4,4,4,4,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,g,g,g,g,g,g,g,g,g,1,1,4,4,4,4,1,4,4,4,4,4],[8,8,8,8,8,8,8,8,8,8,8,T,T,T,0,1,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8,5,13,14,15,16,17,9,d,d,d,d,d,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,9,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8,T,T,T,T,T,4,4,4,4,4,T,T,T,T,T,T,2,0,4,4,2,2,2,2,2,2,v,v,4,4,4,0,2,2,2,2,2,2,2,2,2,2,v,v,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4],[0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,4,4,4,4,4,1,g,1,1,1,1,1,1,1,1,1,1,v,1,1,1,1,1,1,1,1,1,1,1,1,1,4,1,1,1,1,1,4,1,4,1,1,4,1,1,4,1,1,1,1,1,1,1,1,1,1,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7],[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,g,g,g,g,g,g,g,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,9,4,9,4,4,9,4,4,4,4,4,4,4,4,4,d,4,4,v,v,4,4,4,4,4,d,d,4,4,4,4,4,7,7,7,7,7,4,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,4,4,T],[4,4,4,d,d,d,4,4,4,4,4,v,9,v,9,9,2,2,2,2,2,2,2,2,2,2,9,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,0,0,0,0,0,0,4,4,0,0,0,0,0,0,4,4,0,0,0,0,0,0,4,4,0,0,0,4,4,4,d,d,4,4,4,d,d,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4]];class R{constructor(){this.inputFormat="ILYNN",this.outputFormat="VLNNN",this.sourceToTarget=[],this.targetToSource=[],this.levels=[]}bidiTransform(t,i,e){if(this.sourceToTarget=[],this.targetToSource=[],!t)return"";if(function(t,i,e){Y=[],Q=[];for(let n=0;n<e;n++)t[n]=n,i[n]=n,Y[n]=n}(this.sourceToTarget,this.targetToSource,t.length),!this.checkParameters(i,e))return t;i=this.inputFormat,e=this.outputFormat;let n=t;const x=$,a=H(i.charAt(1)),_=H(e.charAt(1)),f=("I"===i.charAt(0)?"L":i.charAt(0))+a,c=("I"===e.charAt(0)?"L":e.charAt(0))+_,p=i.charAt(2)+e.charAt(2);x.defInFormat=f,x.defOutFormat=c,x.defSwap=p;const m=b(t,f,c,p,x);let v=!1;return"R"===e.charAt(1)?v=!0:"C"!==e.charAt(1)&&"D"!==e.charAt(1)||(v="rtl"===this.checkContextual(m)),this.sourceToTarget=Y,this.targetToSource=function(t){const i=new Array(t.length);for(let e=0;e<t.length;e++)i[t[e]]=e;return i}(this.sourceToTarget),q=this.targetToSource,n=i.charAt(3)===e.charAt(3)?m:"S"===e.charAt(3)?function(t,i,e){if(0===i.length)return"";void 0===t&&(t=!0),void 0===e&&(e=!0);const n=(i=String(i)).split("");let s=0,x=1,a=n.length;t||(s=n.length-1,x=-1,a=1);const _=function(t,i,e,n,s){let x=0;const a=[];let _=0;for(let y=i;y*e<n;y+=e)if(F(t[y])||O(t[y])){if("ل"===t[y]&&I(t,y+e,e,n)){t[y]=X(t[y+e],0===x?r:h),y+=e,j(t,y,e,n),s&&(a[_]=y,_++),x=0;continue}const i=t[y];1===x?t[y]=S(t,y+e,e,n)?D(t[y]):z(t[y],l):!0===S(t,y+e,e,n)?t[y]=z(t[y],u):t[y]=z(t[y],o),O(i)||(x=1),!0===C(i)&&(x=0)}else x=0;return a}(n,s,x,a,e);let y="";for(let i=0;i<n.length;i++)e&&M(_,_.length,i)>-1?(W(q,i,!t,-1),Y.splice(i,1)):y+=n[i];return y}(v,m,!0):function(t,i,e){if(0===t.length)return"";void 0===e&&(e=!0),void 0===i&&(i=!0);let n="";const r=(t=String(t)).split("");for(let h=0;h<t.length;h++){let x=!1;if(r[h]>="ﹰ"&&r[h]<"\ufeff"){const o=t.charCodeAt(h);r[h]>="ﻵ"&&r[h]<="ﻼ"?(i?(h>0&&e&&" "===r[h-1]?n=n.substring(0,n.length-1)+"ل":(n+="ل",x=!0),n+=s[(o-65269)/2]):(n+=s[(o-65269)/2],n+="ل",h+1<t.length&&e&&" "===r[h+1]?h++:x=!0),x&&(W(q,h,!0,1),Y.splice(h,0,Y[h]))):n+=y[o-65136]}else n+=r[h]}return n}(m,v,!0),this.sourceToTarget=Y,this.targetToSource=q,this.levels=Q,n}_inputFormatSetter(t){if(!it.test(t))throw new Error("dojox/string/BidiEngine: the bidi layout string is wrong!");this.inputFormat=t}_outputFormatSetter(t){if(!it.test(t))throw new Error("dojox/string/BidiEngine: the bidi layout string is wrong!");this.outputFormat=t}checkParameters(t,i){return t?this._inputFormatSetter(t):t=this.inputFormat,i?this._outputFormatSetter(i):i=this.outputFormat,t!==i}checkContextual(t){let i=B(t);if("ltr"!==i&&"rtl"!==i){try{i=document.dir.toLowerCase()}catch(t){}"ltr"!==i&&"rtl"!==i&&(i="ltr")}return i}hasBidiChar(t){return et.test(t)}}function b(t,i,e,n,s){const r=function(t,i,e){if(void 0===i.inFormat&&(i.inFormat=e.defInFormat),void 0===i.outFormat&&(i.outFormat=e.defOutFormat),void 0===i.swap&&(i.swap=e.defSwap),i.inFormat===i.outFormat)return i;const n=i.inFormat.substring(0,1),s=i.outFormat.substring(0,1);let r,h=i.inFormat.substring(1,4),x=i.outFormat.substring(1,4);return"C"===h.charAt(0)&&(r=B(t),h="ltr"===r||"rtl"===r?r.toUpperCase():"L"===i.inFormat.charAt(2)?"LTR":"RTL",i.inFormat=n+h),"C"===x.charAt(0)&&(r=B(t),"rtl"===r?x="RTL":"ltr"===r?(r=function(t){const i=t.split("");return i.reverse(),B(i.join(""))}(t),x=r.toUpperCase()):x="L"===i.outFormat.charAt(2)?"LTR":"RTL",i.outFormat=s+x),i}(t,{inFormat:i,outFormat:e,swap:n},s);if(r.inFormat===r.outFormat)return t;i=r.inFormat,e=r.outFormat,n=r.swap;const h=i.substring(0,1),x=i.substring(1,4),o=e.substring(0,1),l=e.substring(1,4);if(s.inFormat=i,s.outFormat=e,s.swap=n,"L"===h&&"VLTR"===e){if("LTR"===x)return s.dir=K,U(t,s);if("RTL"===x)return s.dir=tt,U(t,s)}if("V"===h&&"V"===o)return s.dir="RTL"===x?tt:K,N(t,s);if("L"===h&&"VRTL"===e)return"LTR"===x?(s.dir=K,t=U(t,s)):(s.dir=tt,t=U(t,s)),N(t);if("VLTR"===i&&"LLTR"===e)return s.dir=K,U(t,s);if("V"===h&&"L"===o&&x!==l)return t=N(t),"RTL"===x?b(t,"LLTR","VLTR",n,s):b(t,"LRTL","VRTL",n,s);if("VRTL"===i&&"LRTL"===e)return b(t,"LRTL","VRTL",n,s);if("L"===h&&"L"===o){const i=s.swap;return s.swap=i.substr(0,1)+"N","RTL"===x?(s.dir=tt,t=U(t,s),s.swap="N"+i.substr(1,2),s.dir=K,t=U(t,s)):(s.dir=K,t=U(t,s),s.swap="N"+i.substr(1,2),t=b(t,"VLTR","LRTL",s.swap,s)),t}return t}function B(t){const i=/[A-Za-z\u05d0-\u065f\u066a-\u06ef\u06fa-\u07ff\ufb1d-\ufdff\ufe70-\ufefc]/.exec(t);return i?i[0]<="z"?"ltr":"rtl":""}function U(t,i){const e=t.split(""),n=[];return V(e,n,i),function(t,i,e){if(0!==e.hiLevel&&e.swap.substr(0,1)!==e.swap.substr(1,2))for(let e=0;e<t.length;e++)1===i[e]&&(t[e]=k(t[e]))}(e,n,i),P(2,e,n,i),P(1,e,n,i),Q=n,e.join("")}function V(t,i,e){const n=t.length,s=e.dir?m:p;let r=0,h=-1;const x=[],o=[];e.hiLevel=e.dir,e.lastArabic=!1,e.hasUbatAl=!1,e.hasUbatB=!1,e.hasUbatS=!1;for(let i=0;i<n;i++)x[i]=E(t[i]);for(let l=0;l<n;l++){const n=r,a=Z(t,x,o,l,e);o[l]=a,r=s[n][a];const u=240&r;r&=15;const _=s[r][G];if(i[l]=_,u>0)if(16===u){for(let t=h;t<l;t++)i[t]=1;h=-1}else h=-1;if(s[r][J])-1===h&&(h=l);else if(h>-1){for(let t=h;t<l;t++)i[t]=_;h=-1}5===x[l]&&(i[l]=0),e.hiLevel|=_}e.hasUbatS&&function(t,i,e,n){for(let s=0;s<e;s++)if(6===t[s]){i[s]=n.dir;for(let e=s-1;e>=0&&8===t[e];e--)i[e]=n.dir}}(x,i,n,e)}function E(t){const i=t.charCodeAt(0),e=L[i>>8];return e<100?e:A[e-100][255&i]}function N(t,i){const e=t.split("");if(i){const t=[];V(e,t,i),Q=t}return e.reverse(),Y.reverse(),e.join("")}function M(t,i,e){for(let n=0;n<i;n++)if(t[n]===e)return n;return-1}function F(t){for(let i=0;i<f.length;i++)if(t>=f[i]&&t<=c[i])return!0;return!1}function S(t,i,e,n){for(;i*e<n&&O(t[i]);)i+=e;return!!(i*e<n&&F(t[i]))}function I(t,i,e,n){for(;i*e<n&&O(t[i]);)i+=e;let r=" ";if(!(i*e<n))return!1;r=t[i];for(let t=0;t<s.length;t++)if(s[t]===r)return!0;return!1}function P(t,i,e,n){if(n.hiLevel<t)return;if(1===t&&n.dir===tt&&!n.hasUbatB)return i.reverse(),void Y.reverse();const s=i.length;let r,h,x,o,l,a=0;for(;a<s;){if(e[a]>=t){for(r=a+1;r<s&&e[r]>=t;)r++;for(h=a,x=r-1;h<x;h++,x--)o=i[h],i[h]=i[x],i[x]=o,l=Y[h],Y[h]=Y[x],Y[x]=l;a=r}a++}}function Z(t,i,e,n,s){const r=i[n];return{UBAT_L:()=>(s.lastArabic=!1,0),UBAT_R:()=>(s.lastArabic=!1,1),UBAT_ON:()=>4,UBAT_AN:()=>3,UBAT_EN:()=>s.lastArabic?3:2,UBAT_AL:()=>(s.lastArabic=!0,s.hasUbatAl=!0,1),UBAT_WS:()=>4,UBAT_CS:()=>{let t,r;return n<1||n+1>=i.length||2!==(t=e[n-1])&&3!==t||2!==(r=i[n+1])&&3!==r?4:(s.lastArabic&&(r=3),r===t?r:4)},UBAT_ES:()=>2===(n>0?e[n-1]:5)&&n+1<i.length&&2===i[n+1]?2:4,UBAT_ET:()=>{if(n>0&&2===e[n-1])return 2;if(s.lastArabic)return 4;let t=n+1;const r=i.length;for(;t<r&&i[t]===d;)t++;return t<r&&2===i[t]?2:4},UBAT_NSM:()=>{if("VLTR"===s.inFormat){const e=i.length;let s=n+1;for(;s<e&&i[s]===g;)s++;if(s<e){const e=t[n].charCodeAt[0],r=e>=1425&&e<=2303||64286===e,h=i[s];if(r&&(1===h||7===h))return 1}}return n<1||5===i[n-1]?4:e[n-1]},UBAT_B:()=>(s.lastArabic=!0,s.hasUbatB=!0,s.dir),UBAT_S:()=>(s.hasUbatS=!0,4),UBAT_LRE:()=>(s.lastArabic=!1,4),UBAT_RLE:()=>(s.lastArabic=!1,4),UBAT_LRO:()=>(s.lastArabic=!1,4),UBAT_RLO:()=>(s.lastArabic=!1,4),UBAT_PDF:()=>(s.lastArabic=!1,4),UBAT_BN:()=>4}[w[r]]()}function k(t){let i,e=0,s=n.length-1;for(;e<=s;)if(i=Math.floor((e+s)/2),t<n[i][0])s=i-1;else{if(!(t>n[i][0]))return n[i][1];e=i+1}return t}function C(t){for(let i=0;i<_.length;i++)if(_[i]===t)return!0;return!1}function D(t){for(let i=0;i<x.length;i++)if(t===x[i])return a[i];return t}function z(t,i){for(let e=0;e<x.length;e++)if(t===x[e])return i[e];return t}function O(t){return t>="ً"&&t<="ٕ"}function H(t){return"L"===t?"LTR":"R"===t?"RTL":"C"===t?"CLR":"D"===t?"CRL":""}function j(t,i,e,n){for(;i*e<n&&O(t[i]);)i+=e;return i*e<n&&(t[i]=" ",!0)}function X(t,i){for(let e=0;e<s.length;e++)if(t===s[e])return i[e];return t}function W(t,i,e,n){for(let s=0;s<t.length;s++)(t[s]>i||!e&&t[s]===i)&&(t[s]+=n)}let Y=[],q=[],Q=[];const $={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:""},G=5,J=6,K=0,tt=1,it=/^[(I|V)][(L|R|C|D)][(Y|N)][(S|N)][N]$/,et=/[\u0591-\u06ff\ufb1d-\ufefc]/},65390:(t,i,e)=>{e.d(i,{b:()=>o,j:()=>x});var n=e(99880),s=e(80442);let r=null,h=null;async function x(){return r||(r=async function(){const t=(0,s.Z)("esri-csp-restrictions")?await e.e(3852).then(e.bind(e,43852)).then((t=>t.l)):await e.e(4358).then(e.bind(e,84358)).then((t=>t.l));h=await t.load({locateFile:t=>(0,n.V)(`esri/core/libs/libtess/${t}`)})}()),r}function o(t,i){const e=Math.max(t.length,128e3);return h.triangulate(t,i,e)}},55987:(t,i,e)=>{e.d(i,{Or:()=>r,s5:()=>h,vX:()=>x}),Number.POSITIVE_INFINITY;const n=128/Math.PI;function s(t,i){return(t%=i)>=0?t:t+i}function r(t){return s(t*n,256)}function h(t){return s(.7111111111111111*t,256)}function x(t,i,e){return t>=i&&t<=e||t>=e&&t<=i}Math.LN2},87893:(t,i,e)=>{e.d(i,{Z:()=>n});class n{constructor(t=0,i=0,e=0,n=0){this.x=t,this.y=i,this.width=e,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)}}},31294:(t,i,e)=>{e.d(i,{I:()=>a,b:()=>l});var n,s,r=e(16534),h=e(35362),x=e(55987);class o{constructor(t,i,e){this.ratio=t,this.x=i,this.y=e}}class l{constructor(t,i,e,n=8,s=8){this._lines=[],this._starts=[],this.validateTessellation=!0,this._pixelRatio=n,this._pixelMargin=s,this._tileSize=r.I_*n,this._dz=t,this._yPos=i,this._xPos=e}setPixelMargin(t){t!==this._pixelMargin&&(this._pixelMargin=t,this.setExtent(this._extent))}setExtent(t){this._extent=t,this._finalRatio=this._tileSize/t*(1<<this._dz);let i=this._pixelRatio*this._pixelMargin;i/=this._finalRatio;const e=t>>this._dz;i>e&&(i=e),this._margin=i,this._xmin=e*this._xPos-i,this._ymin=e*this._yPos-i,this._xmax=this._xmin+e+2*i,this._ymax=this._ymin+e+2*i}reset(t){this._type=t,this._lines=[],this._starts=[],this._line=null,this._start=0}moveTo(t,i){this._pushLine(),this._prevIsIn=this._isIn(t,i),this._moveTo(t,i,this._prevIsIn),this._prevPt=new h.E(t,i),this._firstPt=new h.E(t,i),this._dist=0}lineTo(t,i){const e=this._isIn(t,i),n=new h.E(t,i),s=h.E.distance(this._prevPt,n);let r,x,l,a,u,_,y,f;if(e)this._prevIsIn?this._lineTo(t,i,!0):(r=this._prevPt,x=n,l=this._intersect(x,r),this._start=this._dist+s*(1-this._r),this._lineTo(l.x,l.y,!0),this._lineTo(x.x,x.y,!0));else if(this._prevIsIn)x=this._prevPt,r=n,l=this._intersect(x,r),this._lineTo(l.x,l.y,!0),this._lineTo(r.x,r.y,!1);else{const t=this._prevPt,i=n;if(t.x<=this._xmin&&i.x<=this._xmin||t.x>=this._xmax&&i.x>=this._xmax||t.y<=this._ymin&&i.y<=this._ymin||t.y>=this._ymax&&i.y>=this._ymax)this._lineTo(i.x,i.y,!1);else{const e=[];if((t.x<this._xmin&&i.x>this._xmin||t.x>this._xmin&&i.x<this._xmin)&&(a=(this._xmin-t.x)/(i.x-t.x),f=t.y+a*(i.y-t.y),f<=this._ymin?_=!1:f>=this._ymax?_=!0:e.push(new o(a,this._xmin,f))),(t.x<this._xmax&&i.x>this._xmax||t.x>this._xmax&&i.x<this._xmax)&&(a=(this._xmax-t.x)/(i.x-t.x),f=t.y+a*(i.y-t.y),f<=this._ymin?_=!1:f>=this._ymax?_=!0:e.push(new o(a,this._xmax,f))),(t.y<this._ymin&&i.y>this._ymin||t.y>this._ymin&&i.y<this._ymin)&&(a=(this._ymin-t.y)/(i.y-t.y),y=t.x+a*(i.x-t.x),y<=this._xmin?u=!1:y>=this._xmax?u=!0:e.push(new o(a,y,this._ymin))),(t.y<this._ymax&&i.y>this._ymax||t.y>this._ymax&&i.y<this._ymax)&&(a=(this._ymax-t.y)/(i.y-t.y),y=t.x+a*(i.x-t.x),y<=this._xmin?u=!1:y>=this._xmax?u=!0:e.push(new o(a,y,this._ymax))),0===e.length)u?_?this._lineTo(this._xmax,this._ymax,!0):this._lineTo(this._xmax,this._ymin,!0):_?this._lineTo(this._xmin,this._ymax,!0):this._lineTo(this._xmin,this._ymin,!0);else if(e.length>1&&e[0].ratio>e[1].ratio)this._start=this._dist+s*e[1].ratio,this._lineTo(e[1].x,e[1].y,!0),this._lineTo(e[0].x,e[0].y,!0);else{this._start=this._dist+s*e[0].ratio;for(let t=0;t<e.length;t++)this._lineTo(e[t].x,e[t].y,!0)}this._lineTo(i.x,i.y,!1)}}this._dist+=s,this._prevIsIn=e,this._prevPt=n}close(){if(this._line.length>2){const t=this._firstPt,i=this._prevPt;t.x===i.x&&t.y===i.y||this.lineTo(t.x,t.y);const e=this._line;let n=e.length;for(;n>=4&&(e[0].x===e[1].x&&e[0].x===e[n-2].x||e[0].y===e[1].y&&e[0].y===e[n-2].y);)e.pop(),e[0].x=e[n-2].x,e[0].y=e[n-2].y,--n}}result(t=!0){return this._pushLine(),0===this._lines.length?null:(this._type===h.V.Polygon&&t&&u.simplify(this._tileSize,this._margin*this._finalRatio,this._lines),this._lines)}resultWithStarts(){if(this._type!==h.V.LineString)throw new Error("Only valid for lines");this._pushLine();const t=this._lines,i=t.length;if(0===i)return null;const e=[];for(let n=0;n<i;n++)e.push({line:t[n],start:this._starts[n]||0});return e}_isIn(t,i){return t>=this._xmin&&t<=this._xmax&&i>=this._ymin&&i<=this._ymax}_intersect(t,i){let e,n,s;if(i.x>=this._xmin&&i.x<=this._xmax)n=i.y<=this._ymin?this._ymin:this._ymax,s=(n-t.y)/(i.y-t.y),e=t.x+s*(i.x-t.x);else if(i.y>=this._ymin&&i.y<=this._ymax)e=i.x<=this._xmin?this._xmin:this._xmax,s=(e-t.x)/(i.x-t.x),n=t.y+s*(i.y-t.y);else{n=i.y<=this._ymin?this._ymin:this._ymax,e=i.x<=this._xmin?this._xmin:this._xmax;const r=(e-t.x)/(i.x-t.x),h=(n-t.y)/(i.y-t.y);r<h?(s=r,n=t.y+r*(i.y-t.y)):(s=h,e=t.x+h*(i.x-t.x))}return this._r=s,new h.E(e,n)}_pushLine(){this._line&&(this._type===h.V.Point?this._line.length>0&&(this._lines.push(this._line),this._starts.push(this._start)):this._type===h.V.LineString?this._line.length>1&&(this._lines.push(this._line),this._starts.push(this._start)):this._type===h.V.Polygon&&this._line.length>3&&(this._lines.push(this._line),this._starts.push(this._start))),this._line=[],this._start=0}_moveTo(t,i,e){this._type!==h.V.Polygon?e&&(t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),i=Math.round((i-(this._ymin+this._margin))*this._finalRatio),this._line.push(new h.E(t,i))):(e||(t<this._xmin&&(t=this._xmin),t>this._xmax&&(t=this._xmax),i<this._ymin&&(i=this._ymin),i>this._ymax&&(i=this._ymax)),t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),i=Math.round((i-(this._ymin+this._margin))*this._finalRatio),this._line.push(new h.E(t,i)),this._isH=!1,this._isV=!1)}_lineTo(t,i,e){let n,s;if(this._type!==h.V.Polygon)if(e){if(t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),i=Math.round((i-(this._ymin+this._margin))*this._finalRatio),this._line.length>0&&(n=this._line[this._line.length-1],n.equals(t,i)))return;this._line.push(new h.E(t,i))}else this._line&&this._line.length>0&&this._pushLine();else if(e||(t<this._xmin&&(t=this._xmin),t>this._xmax&&(t=this._xmax),i<this._ymin&&(i=this._ymin),i>this._ymax&&(i=this._ymax)),t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),i=Math.round((i-(this._ymin+this._margin))*this._finalRatio),this._line&&this._line.length>0){n=this._line[this._line.length-1];const e=n.x===t,r=n.y===i;if(e&&r)return;this._isH&&e||this._isV&&r?(n.x=t,n.y=i,s=this._line[this._line.length-2],s.x===t&&s.y===i?(this._line.pop(),this._line.length<=1?(this._isH=!1,this._isV=!1):(s=this._line[this._line.length-2],this._isH=s.x===t,this._isV=s.y===i)):(this._isH=s.x===t,this._isV=s.y===i)):(this._line.push(new h.E(t,i)),this._isH=e,this._isV=r)}else this._line.push(new h.E(t,i))}}class a{setExtent(t){this._ratio=4096===t?1:4096/t}get validateTessellation(){return this._ratio<1}reset(t){this._lines=[],this._line=null}moveTo(t,i){this._line&&this._lines.push(this._line),this._line=[];const e=this._ratio;this._line.push(new h.E(t*e,i*e))}lineTo(t,i){const e=this._ratio;this._line.push(new h.E(t*e,i*e))}close(){const t=this._line;t&&!t[0].isEqual(t[t.length-1])&&t.push(t[0])}result(){return this._line&&this._lines.push(this._line),0===this._lines.length?null:this._lines}}(s=n||(n={}))[s.sideLeft=0]="sideLeft",s[s.sideRight=1]="sideRight",s[s.sideTop=2]="sideTop",s[s.sideBottom=3]="sideBottom";class u{static simplify(t,i,e){if(!e)return;const s=-i,r=t+i,h=-i,x=t+i,o=[],l=[],a=e.length;for(let t=0;t<a;++t){const i=e[t];if(!i||i.length<2)continue;let a,u=i[0];const _=i.length;for(let e=1;e<_;++e)a=i[e],u.x===a.x&&(u.x<=s&&(u.y>a.y?(o.push(t),o.push(e),o.push(n.sideLeft),o.push(-1)):(l.push(t),l.push(e),l.push(n.sideLeft),l.push(-1))),u.x>=r&&(u.y<a.y?(o.push(t),o.push(e),o.push(n.sideRight),o.push(-1)):(l.push(t),l.push(e),l.push(n.sideRight),l.push(-1)))),u.y===a.y&&(u.y<=h&&(u.x<a.x?(o.push(t),o.push(e),o.push(n.sideTop),o.push(-1)):(l.push(t),l.push(e),l.push(n.sideTop),l.push(-1))),u.y>=x&&(u.x>a.x?(o.push(t),o.push(e),o.push(n.sideBottom),o.push(-1)):(l.push(t),l.push(e),l.push(n.sideBottom),l.push(-1)))),u=a}if(0===o.length||0===l.length)return;u.fillParent(e,l,o),u.fillParent(e,o,l);const _=[];u.calcDeltas(_,l,o),u.calcDeltas(_,o,l),u.addDeltas(_,e)}static fillParent(t,i,e){const s=e.length,r=i.length;for(let h=0;h<r;h+=4){const r=i[h],o=i[h+1],l=i[h+2],a=t[r][o-1],u=t[r][o];let _=8092,y=-1;for(let i=0;i<s;i+=4){if(e[i+2]!==l)continue;const s=e[i],r=e[i+1],h=t[s][r-1],o=t[s][r];switch(l){case n.sideLeft:case n.sideRight:if((0,x.vX)(a.y,h.y,o.y)&&(0,x.vX)(u.y,h.y,o.y)){const t=Math.abs(o.y-h.y);t<_&&(_=t,y=i)}break;case n.sideTop:case n.sideBottom:if((0,x.vX)(a.x,h.x,o.x)&&(0,x.vX)(u.x,h.x,o.x)){const t=Math.abs(o.x-h.x);t<_&&(_=t,y=i)}}}i[h+3]=y}}static calcDeltas(t,i,e){const n=i.length;for(let s=0;s<n;s+=4){const n=[],r=u.calcDelta(s,i,e,n);t.push(i[s]),t.push(i[s+1]),t.push(i[s+2]),t.push(r)}}static calcDelta(t,i,e,n){const s=i[t+3];if(-1===s)return 0;const r=n.length;return r>1&&n[r-2]===s?0:(n.push(s),u.calcDelta(s,e,i,n)+1)}static addDeltas(t,i){const e=t.length;let s=0;for(let i=0;i<e;i+=4){const e=t[i+3];e>s&&(s=e)}for(let r=0;r<e;r+=4){const e=i[t[r]],h=t[r+1],x=s-t[r+3];switch(t[r+2]){case n.sideLeft:e[h-1].x-=x,e[h].x-=x,1===h&&(e[e.length-1].x-=x),h===e.length-1&&(e[0].x-=x);break;case n.sideRight:e[h-1].x+=x,e[h].x+=x,1===h&&(e[e.length-1].x+=x),h===e.length-1&&(e[0].x+=x);break;case n.sideTop:e[h-1].y-=x,e[h].y-=x,1===h&&(e[e.length-1].y-=x),h===e.length-1&&(e[0].y-=x);break;case n.sideBottom:e[h-1].y+=x,e[h].y+=x,1===h&&(e[e.length-1].y+=x),h===e.length-1&&(e[0].y+=x)}}}}},67327:(t,i,e)=>{e.d(i,{z:()=>y});var n=e(95648),s=e(16534);function r(t,i){return t.x===i.x&&t.y===i.y}function h(t,i){return t.x=i.y,t.y=-i.x,t}function x(t,i){return t.x=-i.y,t.y=i.x,t}function o(t,i){return t.x=i.x,t.y=i.y,t}function l(t,i){return t.x=-i.x,t.y=-i.y,t}function a(t){return Math.sqrt(t.x*t.x+t.y*t.y)}function u(t,i){return t.x*i.x+t.y*i.y}function _(t,i,e,n){return t.x=i.x*e+i.y*n,t.y=i.x*n-i.y*e,t}class y{constructor(t,i,e){this._writeVertex=t,this._writeTriangle=i,this._canUseThinTessellation=e,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,i){(function(t){if(!t)return;const i=t.length;if(i<=1)return;let e=0;for(let n=1;n<i;n++)r(t[n],t[e])||++e===n||(t[e]=t[n]);t.length=e+1})(t),this._canUseThinTessellation&&i.halfWidth<s.tQ&&!i.offset?this._tessellateThin(t,i):this._tessellate(t,i)}_tessellateThin(t,i){if(t.length<2)return;const e=i.wrapDistance||65535;let n=i.initialDistance||0,s=!1,r=t[0].x,h=t[0].y;const x=t.length;for(let i=1;i<x;++i){s&&(s=!1,n=0);let x=t[i].x,o=t[i].y,l=x-r,a=o-h,u=Math.sqrt(l*l+a*a);if(l/=u,a/=u,n+u>e){s=!0;const t=(e-n)/u;u=e-n,x=(1-t)*r+t*x,o=(1-t)*h+t*o,--i}const _=this._writeVertex(r,h,0,0,l,a,a,-l,0,-1,n),y=this._writeVertex(r,h,0,0,l,a,-a,l,0,1,n);n+=u;const f=this._writeVertex(x,o,0,0,l,a,a,-l,0,-1,n),c=this._writeVertex(x,o,0,0,l,a,-a,l,0,1,n);this._writeTriangle(_,y,f),this._writeTriangle(y,f,c),r=x,h=o}}_tessellate(t,i){const e=t[0],s=t[t.length-1],y=r(e,s),f=y?3:2;if(t.length<f)return;const c=i.pixelCoordRatio,p=null!=i.capType?i.capType:n.RL.BUTT,m=null!=i.joinType?i.joinType:n.AH.MITER,v=null!=i.miterLimit?Math.min(i.miterLimit,4):2,d=null!=i.roundLimit?Math.min(i.roundLimit,1.05):1.05,g=null!=i.halfWidth?i.halfWidth:2,T=!!i.textured;let w,L,A=null,R=null;const b=this._prevNormal,B=this._nextNormal;let U=-1,V=-1;const E=this._joinNormal;let N,M;const F=this._textureNormalLeft,S=this._textureNormalRight,I=this._textureNormal;let P=-1,Z=-1;const k=i.wrapDistance||65535;let C=i.initialDistance||0;const D=this._writeVertex,z=this._writeTriangle,O=(t,i,e,n,s,r)=>{const h=D(w,L,N,M,e,n,t,i,s,r,C);return P>=0&&Z>=0&&h>=0&&z(P,Z,h),P=Z,Z=h,h};y&&(A=t[t.length-2],B.x=s.x-A.x,B.y=s.y-A.y,V=a(B),B.x/=V,B.y/=V);let H=!1;for(let i=0;i<t.length;++i){if(H&&(H=!1,C=0),A&&(b.x=-B.x,b.y=-B.y,U=V,C+U>k&&(H=!0)),H){const e=(k-C)/U;U=k-C,A={x:(1-e)*A.x+e*t[i].x,y:(1-e)*A.y+e*t[i].y},--i}else A=t[i];w=A.x,L=A.y;const e=i<=0&&!H,s=i===t.length-1;if(e||(C+=U),R=s?y?t[1]:null:t[i+1],R?(B.x=R.x-w,B.y=R.y-L,V=a(B),B.x/=V,B.y/=V):(B.x=void 0,B.y=void 0),!y){if(e){x(E,B),N=E.x,M=E.y,p===n.RL.SQUARE&&(O(-B.y-B.x,B.x-B.y,B.x,B.y,0,-1),O(B.y-B.x,-B.x-B.y,B.x,B.y,0,1)),p===n.RL.ROUND&&(O(-B.y-B.x,B.x-B.y,B.x,B.y,-1,-1),O(B.y-B.x,-B.x-B.y,B.x,B.y,-1,1)),p!==n.RL.ROUND&&p!==n.RL.BUTT||(O(-B.y,B.x,B.x,B.y,0,-1),O(B.y,-B.x,B.x,B.y,0,1));continue}if(s){h(E,b),N=E.x,M=E.y,p!==n.RL.ROUND&&p!==n.RL.BUTT||(O(b.y,-b.x,-b.x,-b.y,0,-1),O(-b.y,b.x,-b.x,-b.y,0,1)),p===n.RL.SQUARE&&(O(b.y-b.x,-b.x-b.y,-b.x,-b.y,0,-1),O(-b.y-b.x,b.x-b.y,-b.x,-b.y,0,1)),p===n.RL.ROUND&&(O(b.y-b.x,-b.x-b.y,-b.x,-b.y,1,-1),O(-b.y-b.x,b.x-b.y,-b.x,-b.y,1,1));continue}}let r,f,D=(X=B,-((j=b).x*X.y-j.y*X.x));if(Math.abs(D)<.01)u(b,B)>0?(E.x=b.x,E.y=b.y,D=1,r=Number.MAX_VALUE,f=!0):(x(E,B),D=1,r=1,f=!1);else{E.x=(b.x+B.x)/D,E.y=(b.y+B.y)/D,r=a(E);const t=(r-1)*g*c;f=r>4||t>U&&t>V}N=E.x,M=E.y;let z=m;switch(m){case n.AH.BEVEL:r<1.05&&(z=n.AH.MITER);break;case n.AH.ROUND:r<d&&(z=n.AH.MITER);break;case n.AH.MITER:r>v&&(z=n.AH.BEVEL)}switch(z){case n.AH.MITER:if(O(E.x,E.y,-b.x,-b.y,0,-1),O(-E.x,-E.y,-b.x,-b.y,0,1),s)break;if(T){const t=H?0:C;P=this._writeVertex(w,L,N,M,B.x,B.y,E.x,E.y,0,-1,t),Z=this._writeVertex(w,L,N,M,B.x,B.y,-E.x,-E.y,0,1,t)}break;case n.AH.BEVEL:{const t=D<0;let i,e,n,r;if(t){const t=P;P=Z,Z=t,i=F,e=S}else i=S,e=F;if(f)n=t?x(this._innerPrev,b):h(this._innerPrev,b),r=t?h(this._innerNext,B):x(this._innerNext,B);else{const i=t?l(this._inner,E):o(this._inner,E);n=i,r=i}const a=t?h(this._bevelStart,b):x(this._bevelStart,b);O(n.x,n.y,-b.x,-b.y,i.x,i.y);const u=O(a.x,a.y,-b.x,-b.y,e.x,e.y);if(s)break;const y=t?x(this._bevelEnd,B):h(this._bevelEnd,B);if(f){const t=this._writeVertex(w,L,N,M,-b.x,-b.y,0,0,0,0,C);P=this._writeVertex(w,L,N,M,B.x,B.y,r.x,r.y,i.x,i.y,C),Z=this._writeVertex(w,L,N,M,B.x,B.y,y.x,y.y,e.x,e.y,C),this._writeTriangle(u,t,Z)}else{if(T){const t=this._bevelMiddle;t.x=(a.x+y.x)/2,t.y=(a.y+y.y)/2,_(I,t,-b.x,-b.y),O(t.x,t.y,-b.x,-b.y,I.x,I.y),_(I,t,B.x,B.y),P=this._writeVertex(w,L,N,M,B.x,B.y,t.x,t.y,I.x,I.y,C),Z=this._writeVertex(w,L,N,M,B.x,B.y,r.x,r.y,i.x,i.y,C)}else{const t=P;P=Z,Z=t}O(y.x,y.y,B.x,B.y,e.x,e.y)}if(t){const t=P;P=Z,Z=t}break}case n.AH.ROUND:{const t=D<0;let i,e;if(t){const t=P;P=Z,Z=t,i=F,e=S}else i=S,e=F;const n=t?l(this._inner,E):o(this._inner,E);let a,y;f?(a=t?x(this._innerPrev,b):h(this._innerPrev,b),y=t?h(this._innerNext,B):x(this._innerNext,B)):(a=n,y=n);const c=t?h(this._roundStart,b):x(this._roundStart,b),p=t?x(this._roundEnd,B):h(this._roundEnd,B),m=O(a.x,a.y,-b.x,-b.y,i.x,i.y),v=O(c.x,c.y,-b.x,-b.y,e.x,e.y);if(s)break;const d=this._writeVertex(w,L,N,M,-b.x,-b.y,0,0,0,0,C);f||this._writeTriangle(P,Z,d);const g=l(this._outer,n),A=this._writeVertex(w,L,N,M,B.x,B.y,p.x,p.y,e.x,e.y,C);let R,U;const V=r>2;if(V){let i;r!==Number.MAX_VALUE?(g.x/=r,g.y/=r,i=u(b,g),i=(r*(i*i-1)+1)/i):i=-1,R=t?h(this._startBreak,b):x(this._startBreak,b),R.x+=b.x*i,R.y+=b.y*i,U=t?x(this._endBreak,B):h(this._endBreak,B),U.x+=B.x*i,U.y+=B.y*i}_(I,g,-b.x,-b.y);const k=this._writeVertex(w,L,N,M,-b.x,-b.y,g.x,g.y,I.x,I.y,C);_(I,g,B.x,B.y);const z=T?this._writeVertex(w,L,N,M,B.x,B.y,g.x,g.y,I.x,I.y,C):k,H=d,j=T?this._writeVertex(w,L,N,M,B.x,B.y,0,0,0,0,C):d;let X=-1,W=-1;if(V&&(_(I,R,-b.x,-b.y),X=this._writeVertex(w,L,N,M,-b.x,-b.y,R.x,R.y,I.x,I.y,C),_(I,U,B.x,B.y),W=this._writeVertex(w,L,N,M,B.x,B.y,U.x,U.y,I.x,I.y,C)),T?V?(this._writeTriangle(H,v,X),this._writeTriangle(H,X,k),this._writeTriangle(j,z,W),this._writeTriangle(j,W,A)):(this._writeTriangle(H,v,k),this._writeTriangle(j,z,A)):V?(this._writeTriangle(d,v,X),this._writeTriangle(d,X,W),this._writeTriangle(d,W,A)):(this._writeTriangle(d,v,k),this._writeTriangle(d,z,A)),f?(P=this._writeVertex(w,L,N,M,B.x,B.y,y.x,y.y,i.x,i.y,C),Z=A):(P=T?this._writeVertex(w,L,N,M,B.x,B.y,y.x,y.y,i.x,i.y,C):m,this._writeTriangle(P,j,A),Z=A),t){const t=P;P=Z,Z=t}break}}}var j,X}}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6810],{95401:(t,i,e)=>{e.d(i,{e:()=>x});var n,s,r,h={exports:{}};n=h,s=function(){function t(t,e,s){s=s||2;var r,h,x,l,a,u,_,y=e&&e.length,f=y?e[0]*s:t.length,c=i(t,0,f,s,!0),p=[];if(!c||c.next===c.prev)return p;if(y&&(c=o(t,e,c,s)),t.length>80*s){r=x=t[0],h=l=t[1];for(var m=s;m<f;m+=s)(a=t[m])<r&&(r=a),(u=t[m+1])<h&&(h=u),a>x&&(x=a),u>l&&(l=u);_=0!==(_=Math.max(x-r,l-h))?1/_:0}return n(c,p,s,r,h,_),p}function i(t,i,e,n,s){var r,h;if(s===U(t,i,e,n)>0)for(r=i;r<e;r+=n)h=R(r,t[r],t[r+1],h);else for(r=e-n;r>=i;r-=n)h=R(r,t[r],t[r+1],h);if(h&&d(h,h.next)){var x=h.next;b(h),h=x}return h}function e(t,i){if(!t)return t;i||(i=t);var e,n=t;do{if(e=!1,n.steiner||!d(n,n.next)&&0!==v(n.prev,n,n.next))n=n.next;else{var s=n.prev;if(b(n),(n=i=s)===n.next)break;e=!0}}while(e||n!==i);return i}function n(t,i,o,l,a,u,_){if(t){!_&&u&&y(t,l,a,u);for(var f,c,p=t;t.prev!==t.next;)if(f=t.prev,c=t.next,u?r(t,l,a,u):s(t))i.push(f.i/o),i.push(t.i/o),i.push(c.i/o),b(t),t=c.next,p=c.next;else if((t=c)===p){_?1===_?n(t=h(e(t),i,o),i,o,l,a,u,2):2===_&&x(t,i,o,l,a,u):n(e(t),i,o,l,a,u,1);break}}}function s(t){var i=t.prev,e=t,n=t.next;if(v(i,e,n)>=0)return!1;for(var s=t.next.next;s!==t.prev;){if(p(i.x,i.y,e.x,e.y,n.x,n.y,s.x,s.y)&&v(s.prev,s,s.next)>=0)return!1;s=s.next}return!0}function r(t,i,e,n){var s=t.prev,r=t,h=t.next;if(v(s,r,h)>=0)return!1;for(var x=s.x<r.x?s.x<h.x?s.x:h.x:r.x<h.x?r.x:h.x,o=s.y<r.y?s.y<h.y?s.y:h.y:r.y<h.y?r.y:h.y,l=s.x>r.x?s.x>h.x?s.x:h.x:r.x>h.x?r.x:h.x,a=s.y>r.y?s.y>h.y?s.y:h.y:r.y>h.y?r.y:h.y,u=f(x,o,i,e,n),_=f(l,a,i,e,n),y=t.prevZ,c=t.nextZ;y&&y.z>=u&&c&&c.z<=_;){if(y!==t.prev&&y!==t.next&&p(s.x,s.y,r.x,r.y,h.x,h.y,y.x,y.y)&&v(y.prev,y,y.next)>=0)return!1;if(y=y.prevZ,c!==t.prev&&c!==t.next&&p(s.x,s.y,r.x,r.y,h.x,h.y,c.x,c.y)&&v(c.prev,c,c.next)>=0)return!1;c=c.nextZ}for(;y&&y.z>=u;){if(y!==t.prev&&y!==t.next&&p(s.x,s.y,r.x,r.y,h.x,h.y,y.x,y.y)&&v(y.prev,y,y.next)>=0)return!1;y=y.prevZ}for(;c&&c.z<=_;){if(c!==t.prev&&c!==t.next&&p(s.x,s.y,r.x,r.y,h.x,h.y,c.x,c.y)&&v(c.prev,c,c.next)>=0)return!1;c=c.nextZ}return!0}function h(t,i,n){var s=t;do{var r=s.prev,h=s.next.next;!d(r,h)&&g(r,s,s.next,h)&&L(r,h)&&L(h,r)&&(i.push(r.i/n),i.push(s.i/n),i.push(h.i/n),b(s),b(s.next),s=t=h),s=s.next}while(s!==t);return e(s)}function x(t,i,s,r,h,x){var o=t;do{for(var l=o.next.next;l!==o.prev;){if(o.i!==l.i&&m(o,l)){var a=A(o,l);return o=e(o,o.next),a=e(a,a.next),n(o,i,s,r,h,x),void n(a,i,s,r,h,x)}l=l.next}o=o.next}while(o!==t)}function o(t,n,s,r){var h,x,o,a=[];for(h=0,x=n.length;h<x;h++)(o=i(t,n[h]*r,h<x-1?n[h+1]*r:t.length,r,!1))===o.next&&(o.steiner=!0),a.push(c(o));for(a.sort(l),h=0;h<a.length;h++)s=e(s=u(a[h],s),s.next);return s}function l(t,i){return t.x-i.x}function a(t){if(t.next.prev===t)return t;let i=t;for(;;){const e=i.next;if(e.prev===i||e===i||e===t)break;i=e}return i}function u(t,i){var n=function(t,i){var e,n=i,s=t.x,r=t.y,h=-1/0;do{if(r<=n.y&&r>=n.next.y&&n.next.y!==n.y){var x=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(x<=s&&x>h){if(h=x,x===s){if(r===n.y)return n;if(r===n.next.y)return n.next}e=n.x<n.next.x?n:n.next}}n=n.next}while(n!==i);if(!e)return null;if(s===h)return e;var o,l=e,a=e.x,u=e.y,y=1/0;n=e;do{s>=n.x&&n.x>=a&&s!==n.x&&p(r<u?s:h,r,a,u,r<u?h:s,r,n.x,n.y)&&(o=Math.abs(r-n.y)/(s-n.x),L(n,t)&&(o<y||o===y&&(n.x>e.x||n.x===e.x&&_(e,n)))&&(e=n,y=o)),n=n.next}while(n!==l);return e}(t,i);if(!n)return i;var s=A(n,t),r=e(n,n.next);let h=a(s);return e(h,h.next),r=a(r),a(i===n?r:i)}function _(t,i){return v(t.prev,t,i.prev)<0&&v(i.next,t,t.next)<0}function y(t,i,e,n){var s=t;do{null===s.z&&(s.z=f(s.x,s.y,i,e,n)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next}while(s!==t);s.prevZ.nextZ=null,s.prevZ=null,function(t){var i,e,n,s,r,h,x,o,l=1;do{for(e=t,t=null,r=null,h=0;e;){for(h++,n=e,x=0,i=0;i<l&&(x++,n=n.nextZ);i++);for(o=l;x>0||o>0&&n;)0!==x&&(0===o||!n||e.z<=n.z)?(s=e,e=e.nextZ,x--):(s=n,n=n.nextZ,o--),r?r.nextZ=s:t=s,s.prevZ=r,r=s;e=n}r.nextZ=null,l*=2}while(h>1)}(s)}function f(t,i,e,n,s){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-e)*s)|t<<8))|t<<4))|t<<2))|t<<1))|(i=1431655765&((i=858993459&((i=252645135&((i=16711935&((i=32767*(i-n)*s)|i<<8))|i<<4))|i<<2))|i<<1))<<1}function c(t){var i=t,e=t;do{(i.x<e.x||i.x===e.x&&i.y<e.y)&&(e=i),i=i.next}while(i!==t);return e}function p(t,i,e,n,s,r,h,x){return(s-h)*(i-x)-(t-h)*(r-x)>=0&&(t-h)*(n-x)-(e-h)*(i-x)>=0&&(e-h)*(r-x)-(s-h)*(n-x)>=0}function m(t,i){return t.next.i!==i.i&&t.prev.i!==i.i&&!function(t,i){var e=t;do{if(e.i!==t.i&&e.next.i!==t.i&&e.i!==i.i&&e.next.i!==i.i&&g(e,e.next,t,i))return!0;e=e.next}while(e!==t);return!1}(t,i)&&(L(t,i)&&L(i,t)&&function(t,i){var e=t,n=!1,s=(t.x+i.x)/2,r=(t.y+i.y)/2;do{e.y>r!=e.next.y>r&&e.next.y!==e.y&&s<(e.next.x-e.x)*(r-e.y)/(e.next.y-e.y)+e.x&&(n=!n),e=e.next}while(e!==t);return n}(t,i)&&(v(t.prev,t,i.prev)||v(t,i.prev,i))||d(t,i)&&v(t.prev,t,t.next)>0&&v(i.prev,i,i.next)>0)}function v(t,i,e){return(i.y-t.y)*(e.x-i.x)-(i.x-t.x)*(e.y-i.y)}function d(t,i){return t.x===i.x&&t.y===i.y}function g(t,i,e,n){var s=w(v(t,i,e)),r=w(v(t,i,n)),h=w(v(e,n,t)),x=w(v(e,n,i));return s!==r&&h!==x||!(0!==s||!T(t,e,i))||!(0!==r||!T(t,n,i))||!(0!==h||!T(e,t,n))||!(0!==x||!T(e,i,n))}function T(t,i,e){return i.x<=Math.max(t.x,e.x)&&i.x>=Math.min(t.x,e.x)&&i.y<=Math.max(t.y,e.y)&&i.y>=Math.min(t.y,e.y)}function w(t){return t>0?1:t<0?-1:0}function L(t,i){return v(t.prev,t,t.next)<0?v(t,i,t.next)>=0&&v(t,t.prev,i)>=0:v(t,i,t.prev)<0||v(t,t.next,i)<0}function A(t,i){var e=new B(t.i,t.x,t.y),n=new B(i.i,i.x,i.y),s=t.next,r=i.prev;return t.next=i,i.prev=t,e.next=s,s.prev=e,n.next=e,e.prev=n,r.next=n,n.prev=r,n}function R(t,i,e,n){var s=new B(t,i,e);return n?(s.next=n.next,s.prev=n,n.next.prev=s,n.next=s):(s.prev=s,s.next=s),s}function b(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 B(t,i,e){this.i=t,this.x=i,this.y=e,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function U(t,i,e,n){for(var s=0,r=i,h=e-n;r<e;r+=n)s+=(t[h]-t[r])*(t[r+1]+t[h+1]),h=r;return s}return t.deviation=function(t,i,e,n){var s=i&&i.length,r=s?i[0]*e:t.length,h=Math.abs(U(t,0,r,e));if(s)for(var x=0,o=i.length;x<o;x++){var l=i[x]*e,a=x<o-1?i[x+1]*e:t.length;h-=Math.abs(U(t,l,a,e))}var u=0;for(x=0;x<n.length;x+=3){var _=n[x]*e,y=n[x+1]*e,f=n[x+2]*e;u+=Math.abs((t[_]-t[f])*(t[y+1]-t[_+1])-(t[_]-t[y])*(t[f+1]-t[_+1]))}return 0===h&&0===u?0:Math.abs((u-h)/h)},t.flatten=function(t){for(var i=t[0][0].length,e={vertices:[],holes:[],dimensions:i},n=0,s=0;s<t.length;s++){for(var r=0;r<t[s].length;r++)for(var h=0;h<i;h++)e.vertices.push(t[s][r][h]);s>0&&(n+=t[s-1].length,e.holes.push(n))}return e},t},void 0!==(r=s())&&(n.exports=r);const x=h.exports},79087:(t,i,e)=>{e.d(i,{Z:()=>R});const n=[["(",")"],[")","("],["<",">"],[">","<"],["[","]"],["]","["],["{","}"],["}","{"],["«","»"],["»","«"],["‹","›"],["›","‹"],["⁽","⁾"],["⁾","⁽"],["₍","₎"],["₎","₍"],["≤","≥"],["≥","≤"],["〈","〉"],["〉","〈"],["﹙","﹚"],["﹚","﹙"],["﹛","﹜"],["﹜","﹛"],["﹝","﹞"],["﹞","﹝"],["﹤","﹥"],["﹥","﹤"]],s=["آ","أ","إ","ا"],r=["ﻵ","ﻷ","ﻹ","ﻻ"],h=["ﻶ","ﻸ","ﻺ","ﻼ"],x=["ا","ب","ت","ث","ج","ح","خ","د","ذ","ر","ز","س","ش","ص","ض","ط","ظ","ع","غ","ف","ق","ك","ل","م","ن","ه","و","ي","إ","أ","آ","ة","ى","ل","م","ن","ه","و","ي","إ","أ","آ","ة","ى","ی","ئ","ؤ"],o=["ﺍ","ﺏ","ﺕ","ﺙ","ﺝ","ﺡ","ﺥ","ﺩ","ﺫ","ﺭ","ﺯ","ﺱ","ﺵ","ﺹ","ﺽ","ﻁ","ﻅ","ﻉ","ﻍ","ﻑ","ﻕ","ﻙ","ﻝ","ﻡ","ﻥ","ﻩ","ﻭ","ﻱ","ﺇ","ﺃ","ﺁ","ﺓ","ﻯ","ﯼ","ﺉ","ﺅ","ﹰ","ﹲ","ﹴ","ﹶ","ﹸ","ﹺ","ﹼ","ﹾ","ﺀ","ﺉ","ﺅ"],l=["ﺎ","ﺐ","ﺖ","ﺚ","ﺞ","ﺢ","ﺦ","ﺪ","ﺬ","ﺮ","ﺰ","ﺲ","ﺶ","ﺺ","ﺾ","ﻂ","ﻆ","ﻊ","ﻎ","ﻒ","ﻖ","ﻚ","ﻞ","ﻢ","ﻦ","ﻪ","ﻮ","ﻲ","ﺈ","ﺄ","ﺂ","ﺔ","ﻰ","ﯽ","ﺊ","ﺆ","ﹰ","ﹲ","ﹴ","ﹶ","ﹸ","ﹺ","ﹼ","ﹾ","ﺀ","ﺊ","ﺆ"],a=["ﺎ","ﺒ","ﺘ","ﺜ","ﺠ","ﺤ","ﺨ","ﺪ","ﺬ","ﺮ","ﺰ","ﺴ","ﺸ","ﺼ","ﻀ","ﻄ","ﻈ","ﻌ","ﻐ","ﻔ","ﻘ","ﻜ","ﻠ","ﻤ","ﻨ","ﻬ","ﻮ","ﻴ","ﺈ","ﺄ","ﺂ","ﺔ","ﻰ","ﯿ","ﺌ","ﺆ","ﹱ","ﹲ","ﹴ","ﹷ","ﹹ","ﹻ","ﹽ","ﹿ","ﺀ","ﺌ","ﺆ"],u=["ﺍ","ﺑ","ﺗ","ﺛ","ﺟ","ﺣ","ﺧ","ﺩ","ﺫ","ﺭ","ﺯ","ﺳ","ﺷ","ﺻ","ﺿ","ﻃ","ﻇ","ﻋ","ﻏ","ﻓ","ﻗ","ﻛ","ﻟ","ﻣ","ﻧ","ﻫ","ﻭ","ﻳ","ﺇ","ﺃ","ﺁ","ﺓ","ﻯ","ﯾ","ﺋ","ﺅ","ﹰ","ﹲ","ﹴ","ﹶ","ﹸ","ﹺ","ﹼ","ﹾ","ﺀ","ﺋ","ﺅ"],_=["ء","آ","أ","ؤ","إ","ا","ة","د","ذ","ر","ز","و","ى"],y=["ً","ً","ٌ","؟","ٍ","؟","َ","َ","ُ","ُ","ِ","ِ","ّ","ّ","ْ","ْ","ء","آ","آ","أ","أ","ؤ","ؤ","إ","إ","ئ","ئ","ئ","ئ","ا","ا","ب","ب","ب","ب","ة","ة","ت","ت","ت","ت","ث","ث","ث","ث","ج","ج","ج","ج","ح","ح","ح","ح","خ","خ","خ","خ","د","د","ذ","ذ","ر","ر","ز","ز","س","س","س","س","ش","ش","ش","ش","ص","ص","ص","ص","ض","ض","ض","ض","ط","ط","ط","ط","ظ","ظ","ظ","ظ","ع","ع","ع","ع","غ","غ","غ","غ","ف","ف","ف","ف","ق","ق","ق","ق","ك","ك","ك","ك","ل","ل","ل","ل","م","م","م","م","ن","ن","ن","ن","ه","ه","ه","ه","و","و","ى","ى","ي","ي","ي","ي","ﻵ","ﻶ","ﻷ","ﻸ","ﻹ","ﻺ","ﻻ","ﻼ","؟","؟","؟"],f=["ء","ف"],c=["غ","ي"],p=[[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]],m=[[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]],v=10,d=11,g=12,T=18,w=["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"],L=[100,0,0,0,0,101,102,103,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,104,4,4,4,0,4,0,4,0,4,4,4,0,0,4,4,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,4,4,0,0,4,4,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,105,7,7,106,107],A=[[T,T,T,T,T,T,T,T,T,6,5,6,8,5,T,T,T,T,T,T,T,T,T,T,T,T,T,T,5,5,5,6,8,4,4,d,d,d,4,4,4,4,4,v,9,v,9,9,2,2,2,2,2,2,2,2,2,2,9,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,T,T,T,T,T,T,5,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,9,4,d,d,d,d,4,4,4,4,0,4,4,T,4,4,d,d,2,2,4,0,4,4,4,2,0,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,4,4,4,4,4,4,4,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,1,g,1,g,g,1,g,g,1,g,4,4,4,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,4,4,1,1,1,1,1,4,4,4,4,4,4,4,4,4,4,4],[3,3,3,3,4,4,4,4,7,d,d,7,9,7,4,4,g,g,g,g,g,g,g,g,g,g,g,7,4,4,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,3,3,3,3,3,3,3,3,3,3,d,3,3,7,7,7,g,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,g,g,g,g,g,g,g,3,4,g,g,g,g,g,g,7,7,g,g,4,g,g,g,g,7,7,2,2,2,2,2,2,2,2,2,2,7,7,7,7,7,7],[7,7,7,7,7,7,7,7,7,7,7,7,7,7,4,7,7,g,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,4,4,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,g,g,g,g,g,g,g,g,g,g,g,7,4,4,4,4,4,4,4,4,4,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,g,g,g,g,g,g,g,g,g,1,1,4,4,4,4,1,4,4,4,4,4],[8,8,8,8,8,8,8,8,8,8,8,T,T,T,0,1,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8,5,13,14,15,16,17,9,d,d,d,d,d,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,9,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8,T,T,T,T,T,4,4,4,4,4,T,T,T,T,T,T,2,0,4,4,2,2,2,2,2,2,v,v,4,4,4,0,2,2,2,2,2,2,2,2,2,2,v,v,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4],[0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,4,4,4,4,4,1,g,1,1,1,1,1,1,1,1,1,1,v,1,1,1,1,1,1,1,1,1,1,1,1,1,4,1,1,1,1,1,4,1,4,1,1,4,1,1,4,1,1,1,1,1,1,1,1,1,1,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7],[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,g,g,g,g,g,g,g,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,9,4,9,4,4,9,4,4,4,4,4,4,4,4,4,d,4,4,v,v,4,4,4,4,4,d,d,4,4,4,4,4,7,7,7,7,7,4,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,4,4,T],[4,4,4,d,d,d,4,4,4,4,4,v,9,v,9,9,2,2,2,2,2,2,2,2,2,2,9,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,0,0,0,0,0,0,4,4,0,0,0,0,0,0,4,4,0,0,0,0,0,0,4,4,0,0,0,4,4,4,d,d,4,4,4,d,d,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4]];class R{constructor(){this.inputFormat="ILYNN",this.outputFormat="VLNNN",this.sourceToTarget=[],this.targetToSource=[],this.levels=[]}bidiTransform(t,i,e){if(this.sourceToTarget=[],this.targetToSource=[],!t)return"";if(function(t,i,e){Y=[],Q=[];for(let n=0;n<e;n++)t[n]=n,i[n]=n,Y[n]=n}(this.sourceToTarget,this.targetToSource,t.length),!this.checkParameters(i,e))return t;i=this.inputFormat,e=this.outputFormat;let n=t;const x=$,a=H(i.charAt(1)),_=H(e.charAt(1)),f=("I"===i.charAt(0)?"L":i.charAt(0))+a,c=("I"===e.charAt(0)?"L":e.charAt(0))+_,p=i.charAt(2)+e.charAt(2);x.defInFormat=f,x.defOutFormat=c,x.defSwap=p;const m=b(t,f,c,p,x);let v=!1;return"R"===e.charAt(1)?v=!0:"C"!==e.charAt(1)&&"D"!==e.charAt(1)||(v="rtl"===this.checkContextual(m)),this.sourceToTarget=Y,this.targetToSource=function(t){const i=new Array(t.length);for(let e=0;e<t.length;e++)i[t[e]]=e;return i}(this.sourceToTarget),q=this.targetToSource,n=i.charAt(3)===e.charAt(3)?m:"S"===e.charAt(3)?function(t,i,e){if(0===i.length)return"";void 0===t&&(t=!0),void 0===e&&(e=!0);const n=(i=String(i)).split("");let s=0,x=1,a=n.length;t||(s=n.length-1,x=-1,a=1);const _=function(t,i,e,n,s){let x=0;const a=[];let _=0;for(let y=i;y*e<n;y+=e)if(F(t[y])||O(t[y])){if("ل"===t[y]&&I(t,y+e,e,n)){t[y]=X(t[y+e],0===x?r:h),y+=e,j(t,y,e,n),s&&(a[_]=y,_++),x=0;continue}const i=t[y];1===x?t[y]=S(t,y+e,e,n)?D(t[y]):z(t[y],l):!0===S(t,y+e,e,n)?t[y]=z(t[y],u):t[y]=z(t[y],o),O(i)||(x=1),!0===C(i)&&(x=0)}else x=0;return a}(n,s,x,a,e);let y="";for(let i=0;i<n.length;i++)e&&M(_,_.length,i)>-1?(W(q,i,!t,-1),Y.splice(i,1)):y+=n[i];return y}(v,m,!0):function(t,i,e){if(0===t.length)return"";void 0===e&&(e=!0),void 0===i&&(i=!0);let n="";const r=(t=String(t)).split("");for(let h=0;h<t.length;h++){let x=!1;if(r[h]>="ﹰ"&&r[h]<"\ufeff"){const o=t.charCodeAt(h);r[h]>="ﻵ"&&r[h]<="ﻼ"?(i?(h>0&&e&&" "===r[h-1]?n=n.substring(0,n.length-1)+"ل":(n+="ل",x=!0),n+=s[(o-65269)/2]):(n+=s[(o-65269)/2],n+="ل",h+1<t.length&&e&&" "===r[h+1]?h++:x=!0),x&&(W(q,h,!0,1),Y.splice(h,0,Y[h]))):n+=y[o-65136]}else n+=r[h]}return n}(m,v,!0),this.sourceToTarget=Y,this.targetToSource=q,this.levels=Q,n}_inputFormatSetter(t){if(!it.test(t))throw new Error("dojox/string/BidiEngine: the bidi layout string is wrong!");this.inputFormat=t}_outputFormatSetter(t){if(!it.test(t))throw new Error("dojox/string/BidiEngine: the bidi layout string is wrong!");this.outputFormat=t}checkParameters(t,i){return t?this._inputFormatSetter(t):t=this.inputFormat,i?this._outputFormatSetter(i):i=this.outputFormat,t!==i}checkContextual(t){let i=B(t);if("ltr"!==i&&"rtl"!==i){try{i=document.dir.toLowerCase()}catch(t){}"ltr"!==i&&"rtl"!==i&&(i="ltr")}return i}hasBidiChar(t){return et.test(t)}}function b(t,i,e,n,s){const r=function(t,i,e){if(void 0===i.inFormat&&(i.inFormat=e.defInFormat),void 0===i.outFormat&&(i.outFormat=e.defOutFormat),void 0===i.swap&&(i.swap=e.defSwap),i.inFormat===i.outFormat)return i;const n=i.inFormat.substring(0,1),s=i.outFormat.substring(0,1);let r,h=i.inFormat.substring(1,4),x=i.outFormat.substring(1,4);return"C"===h.charAt(0)&&(r=B(t),h="ltr"===r||"rtl"===r?r.toUpperCase():"L"===i.inFormat.charAt(2)?"LTR":"RTL",i.inFormat=n+h),"C"===x.charAt(0)&&(r=B(t),"rtl"===r?x="RTL":"ltr"===r?(r=function(t){const i=t.split("");return i.reverse(),B(i.join(""))}(t),x=r.toUpperCase()):x="L"===i.outFormat.charAt(2)?"LTR":"RTL",i.outFormat=s+x),i}(t,{inFormat:i,outFormat:e,swap:n},s);if(r.inFormat===r.outFormat)return t;i=r.inFormat,e=r.outFormat,n=r.swap;const h=i.substring(0,1),x=i.substring(1,4),o=e.substring(0,1),l=e.substring(1,4);if(s.inFormat=i,s.outFormat=e,s.swap=n,"L"===h&&"VLTR"===e){if("LTR"===x)return s.dir=K,U(t,s);if("RTL"===x)return s.dir=tt,U(t,s)}if("V"===h&&"V"===o)return s.dir="RTL"===x?tt:K,N(t,s);if("L"===h&&"VRTL"===e)return"LTR"===x?(s.dir=K,t=U(t,s)):(s.dir=tt,t=U(t,s)),N(t);if("VLTR"===i&&"LLTR"===e)return s.dir=K,U(t,s);if("V"===h&&"L"===o&&x!==l)return t=N(t),"RTL"===x?b(t,"LLTR","VLTR",n,s):b(t,"LRTL","VRTL",n,s);if("VRTL"===i&&"LRTL"===e)return b(t,"LRTL","VRTL",n,s);if("L"===h&&"L"===o){const i=s.swap;return s.swap=i.substr(0,1)+"N","RTL"===x?(s.dir=tt,t=U(t,s),s.swap="N"+i.substr(1,2),s.dir=K,t=U(t,s)):(s.dir=K,t=U(t,s),s.swap="N"+i.substr(1,2),t=b(t,"VLTR","LRTL",s.swap,s)),t}return t}function B(t){const i=/[A-Za-z\u05d0-\u065f\u066a-\u06ef\u06fa-\u07ff\ufb1d-\ufdff\ufe70-\ufefc]/.exec(t);return i?i[0]<="z"?"ltr":"rtl":""}function U(t,i){const e=t.split(""),n=[];return V(e,n,i),function(t,i,e){if(0!==e.hiLevel&&e.swap.substr(0,1)!==e.swap.substr(1,2))for(let e=0;e<t.length;e++)1===i[e]&&(t[e]=k(t[e]))}(e,n,i),P(2,e,n,i),P(1,e,n,i),Q=n,e.join("")}function V(t,i,e){const n=t.length,s=e.dir?m:p;let r=0,h=-1;const x=[],o=[];e.hiLevel=e.dir,e.lastArabic=!1,e.hasUbatAl=!1,e.hasUbatB=!1,e.hasUbatS=!1;for(let i=0;i<n;i++)x[i]=E(t[i]);for(let l=0;l<n;l++){const n=r,a=Z(t,x,o,l,e);o[l]=a,r=s[n][a];const u=240&r;r&=15;const _=s[r][G];if(i[l]=_,u>0)if(16===u){for(let t=h;t<l;t++)i[t]=1;h=-1}else h=-1;if(s[r][J])-1===h&&(h=l);else if(h>-1){for(let t=h;t<l;t++)i[t]=_;h=-1}5===x[l]&&(i[l]=0),e.hiLevel|=_}e.hasUbatS&&function(t,i,e,n){for(let s=0;s<e;s++)if(6===t[s]){i[s]=n.dir;for(let e=s-1;e>=0&&8===t[e];e--)i[e]=n.dir}}(x,i,n,e)}function E(t){const i=t.charCodeAt(0),e=L[i>>8];return e<100?e:A[e-100][255&i]}function N(t,i){const e=t.split("");if(i){const t=[];V(e,t,i),Q=t}return e.reverse(),Y.reverse(),e.join("")}function M(t,i,e){for(let n=0;n<i;n++)if(t[n]===e)return n;return-1}function F(t){for(let i=0;i<f.length;i++)if(t>=f[i]&&t<=c[i])return!0;return!1}function S(t,i,e,n){for(;i*e<n&&O(t[i]);)i+=e;return!!(i*e<n&&F(t[i]))}function I(t,i,e,n){for(;i*e<n&&O(t[i]);)i+=e;let r=" ";if(!(i*e<n))return!1;r=t[i];for(let t=0;t<s.length;t++)if(s[t]===r)return!0;return!1}function P(t,i,e,n){if(n.hiLevel<t)return;if(1===t&&n.dir===tt&&!n.hasUbatB)return i.reverse(),void Y.reverse();const s=i.length;let r,h,x,o,l,a=0;for(;a<s;){if(e[a]>=t){for(r=a+1;r<s&&e[r]>=t;)r++;for(h=a,x=r-1;h<x;h++,x--)o=i[h],i[h]=i[x],i[x]=o,l=Y[h],Y[h]=Y[x],Y[x]=l;a=r}a++}}function Z(t,i,e,n,s){const r=i[n];return{UBAT_L:()=>(s.lastArabic=!1,0),UBAT_R:()=>(s.lastArabic=!1,1),UBAT_ON:()=>4,UBAT_AN:()=>3,UBAT_EN:()=>s.lastArabic?3:2,UBAT_AL:()=>(s.lastArabic=!0,s.hasUbatAl=!0,1),UBAT_WS:()=>4,UBAT_CS:()=>{let t,r;return n<1||n+1>=i.length||2!==(t=e[n-1])&&3!==t||2!==(r=i[n+1])&&3!==r?4:(s.lastArabic&&(r=3),r===t?r:4)},UBAT_ES:()=>2===(n>0?e[n-1]:5)&&n+1<i.length&&2===i[n+1]?2:4,UBAT_ET:()=>{if(n>0&&2===e[n-1])return 2;if(s.lastArabic)return 4;let t=n+1;const r=i.length;for(;t<r&&i[t]===d;)t++;return t<r&&2===i[t]?2:4},UBAT_NSM:()=>{if("VLTR"===s.inFormat){const e=i.length;let s=n+1;for(;s<e&&i[s]===g;)s++;if(s<e){const e=t[n].charCodeAt[0],r=e>=1425&&e<=2303||64286===e,h=i[s];if(r&&(1===h||7===h))return 1}}return n<1||5===i[n-1]?4:e[n-1]},UBAT_B:()=>(s.lastArabic=!0,s.hasUbatB=!0,s.dir),UBAT_S:()=>(s.hasUbatS=!0,4),UBAT_LRE:()=>(s.lastArabic=!1,4),UBAT_RLE:()=>(s.lastArabic=!1,4),UBAT_LRO:()=>(s.lastArabic=!1,4),UBAT_RLO:()=>(s.lastArabic=!1,4),UBAT_PDF:()=>(s.lastArabic=!1,4),UBAT_BN:()=>4}[w[r]]()}function k(t){let i,e=0,s=n.length-1;for(;e<=s;)if(i=Math.floor((e+s)/2),t<n[i][0])s=i-1;else{if(!(t>n[i][0]))return n[i][1];e=i+1}return t}function C(t){for(let i=0;i<_.length;i++)if(_[i]===t)return!0;return!1}function D(t){for(let i=0;i<x.length;i++)if(t===x[i])return a[i];return t}function z(t,i){for(let e=0;e<x.length;e++)if(t===x[e])return i[e];return t}function O(t){return t>="ً"&&t<="ٕ"}function H(t){return"L"===t?"LTR":"R"===t?"RTL":"C"===t?"CLR":"D"===t?"CRL":""}function j(t,i,e,n){for(;i*e<n&&O(t[i]);)i+=e;return i*e<n&&(t[i]=" ",!0)}function X(t,i){for(let e=0;e<s.length;e++)if(t===s[e])return i[e];return t}function W(t,i,e,n){for(let s=0;s<t.length;s++)(t[s]>i||!e&&t[s]===i)&&(t[s]+=n)}let Y=[],q=[],Q=[];const $={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:""},G=5,J=6,K=0,tt=1,it=/^[(I|V)][(L|R|C|D)][(Y|N)][(S|N)][N]$/,et=/[\u0591-\u06ff\ufb1d-\ufefc]/},65390:(t,i,e)=>{e.d(i,{b:()=>o,j:()=>x});var n=e(99880),s=e(80442);let r=null,h=null;async function x(){return r||(r=async function(){const t=(0,s.Z)("esri-csp-restrictions")?await e.e(3852).then(e.bind(e,43852)).then((t=>t.l)):await e.e(4358).then(e.bind(e,84358)).then((t=>t.l));h=await t.load({locateFile:t=>(0,n.V)(`esri/core/libs/libtess/${t}`)})}()),r}function o(t,i){const e=Math.max(t.length,128e3);return h.triangulate(t,i,e)}},55987:(t,i,e)=>{e.d(i,{Or:()=>r,s5:()=>h,vX:()=>x}),Number.POSITIVE_INFINITY;const n=128/Math.PI;function s(t,i){return(t%=i)>=0?t:t+i}function r(t){return s(t*n,256)}function h(t){return s(.7111111111111111*t,256)}function x(t,i,e){return t>=i&&t<=e||t>=e&&t<=i}Math.LN2},87893:(t,i,e)=>{e.d(i,{Z:()=>n});class n{constructor(t=0,i=0,e=0,n=0){this.x=t,this.y=i,this.width=e,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)}}},31294:(t,i,e)=>{e.d(i,{I:()=>a,b:()=>l});var n,s,r=e(16534),h=e(35362),x=e(55987);class o{constructor(t,i,e){this.ratio=t,this.x=i,this.y=e}}class l{constructor(t,i,e,n=8,s=8){this._lines=[],this._starts=[],this.validateTessellation=!0,this._pixelRatio=n,this._pixelMargin=s,this._tileSize=r.I_*n,this._dz=t,this._yPos=i,this._xPos=e}setPixelMargin(t){t!==this._pixelMargin&&(this._pixelMargin=t,this.setExtent(this._extent))}setExtent(t){this._extent=t,this._finalRatio=this._tileSize/t*(1<<this._dz);let i=this._pixelRatio*this._pixelMargin;i/=this._finalRatio;const e=t>>this._dz;i>e&&(i=e),this._margin=i,this._xmin=e*this._xPos-i,this._ymin=e*this._yPos-i,this._xmax=this._xmin+e+2*i,this._ymax=this._ymin+e+2*i}reset(t){this._type=t,this._lines=[],this._starts=[],this._line=null,this._start=0}moveTo(t,i){this._pushLine(),this._prevIsIn=this._isIn(t,i),this._moveTo(t,i,this._prevIsIn),this._prevPt=new h.E(t,i),this._firstPt=new h.E(t,i),this._dist=0}lineTo(t,i){const e=this._isIn(t,i),n=new h.E(t,i),s=h.E.distance(this._prevPt,n);let r,x,l,a,u,_,y,f;if(e)this._prevIsIn?this._lineTo(t,i,!0):(r=this._prevPt,x=n,l=this._intersect(x,r),this._start=this._dist+s*(1-this._r),this._lineTo(l.x,l.y,!0),this._lineTo(x.x,x.y,!0));else if(this._prevIsIn)x=this._prevPt,r=n,l=this._intersect(x,r),this._lineTo(l.x,l.y,!0),this._lineTo(r.x,r.y,!1);else{const t=this._prevPt,i=n;if(t.x<=this._xmin&&i.x<=this._xmin||t.x>=this._xmax&&i.x>=this._xmax||t.y<=this._ymin&&i.y<=this._ymin||t.y>=this._ymax&&i.y>=this._ymax)this._lineTo(i.x,i.y,!1);else{const e=[];if((t.x<this._xmin&&i.x>this._xmin||t.x>this._xmin&&i.x<this._xmin)&&(a=(this._xmin-t.x)/(i.x-t.x),f=t.y+a*(i.y-t.y),f<=this._ymin?_=!1:f>=this._ymax?_=!0:e.push(new o(a,this._xmin,f))),(t.x<this._xmax&&i.x>this._xmax||t.x>this._xmax&&i.x<this._xmax)&&(a=(this._xmax-t.x)/(i.x-t.x),f=t.y+a*(i.y-t.y),f<=this._ymin?_=!1:f>=this._ymax?_=!0:e.push(new o(a,this._xmax,f))),(t.y<this._ymin&&i.y>this._ymin||t.y>this._ymin&&i.y<this._ymin)&&(a=(this._ymin-t.y)/(i.y-t.y),y=t.x+a*(i.x-t.x),y<=this._xmin?u=!1:y>=this._xmax?u=!0:e.push(new o(a,y,this._ymin))),(t.y<this._ymax&&i.y>this._ymax||t.y>this._ymax&&i.y<this._ymax)&&(a=(this._ymax-t.y)/(i.y-t.y),y=t.x+a*(i.x-t.x),y<=this._xmin?u=!1:y>=this._xmax?u=!0:e.push(new o(a,y,this._ymax))),0===e.length)u?_?this._lineTo(this._xmax,this._ymax,!0):this._lineTo(this._xmax,this._ymin,!0):_?this._lineTo(this._xmin,this._ymax,!0):this._lineTo(this._xmin,this._ymin,!0);else if(e.length>1&&e[0].ratio>e[1].ratio)this._start=this._dist+s*e[1].ratio,this._lineTo(e[1].x,e[1].y,!0),this._lineTo(e[0].x,e[0].y,!0);else{this._start=this._dist+s*e[0].ratio;for(let t=0;t<e.length;t++)this._lineTo(e[t].x,e[t].y,!0)}this._lineTo(i.x,i.y,!1)}}this._dist+=s,this._prevIsIn=e,this._prevPt=n}close(){if(this._line.length>2){const t=this._firstPt,i=this._prevPt;t.x===i.x&&t.y===i.y||this.lineTo(t.x,t.y);const e=this._line;let n=e.length;for(;n>=4&&(e[0].x===e[1].x&&e[0].x===e[n-2].x||e[0].y===e[1].y&&e[0].y===e[n-2].y);)e.pop(),e[0].x=e[n-2].x,e[0].y=e[n-2].y,--n}}result(t=!0){return this._pushLine(),0===this._lines.length?null:(this._type===h.V.Polygon&&t&&u.simplify(this._tileSize,this._margin*this._finalRatio,this._lines),this._lines)}resultWithStarts(){if(this._type!==h.V.LineString)throw new Error("Only valid for lines");this._pushLine();const t=this._lines,i=t.length;if(0===i)return null;const e=[];for(let n=0;n<i;n++)e.push({line:t[n],start:this._starts[n]||0});return e}_isIn(t,i){return t>=this._xmin&&t<=this._xmax&&i>=this._ymin&&i<=this._ymax}_intersect(t,i){let e,n,s;if(i.x>=this._xmin&&i.x<=this._xmax)n=i.y<=this._ymin?this._ymin:this._ymax,s=(n-t.y)/(i.y-t.y),e=t.x+s*(i.x-t.x);else if(i.y>=this._ymin&&i.y<=this._ymax)e=i.x<=this._xmin?this._xmin:this._xmax,s=(e-t.x)/(i.x-t.x),n=t.y+s*(i.y-t.y);else{n=i.y<=this._ymin?this._ymin:this._ymax,e=i.x<=this._xmin?this._xmin:this._xmax;const r=(e-t.x)/(i.x-t.x),h=(n-t.y)/(i.y-t.y);r<h?(s=r,n=t.y+r*(i.y-t.y)):(s=h,e=t.x+h*(i.x-t.x))}return this._r=s,new h.E(e,n)}_pushLine(){this._line&&(this._type===h.V.Point?this._line.length>0&&(this._lines.push(this._line),this._starts.push(this._start)):this._type===h.V.LineString?this._line.length>1&&(this._lines.push(this._line),this._starts.push(this._start)):this._type===h.V.Polygon&&this._line.length>3&&(this._lines.push(this._line),this._starts.push(this._start))),this._line=[],this._start=0}_moveTo(t,i,e){this._type!==h.V.Polygon?e&&(t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),i=Math.round((i-(this._ymin+this._margin))*this._finalRatio),this._line.push(new h.E(t,i))):(e||(t<this._xmin&&(t=this._xmin),t>this._xmax&&(t=this._xmax),i<this._ymin&&(i=this._ymin),i>this._ymax&&(i=this._ymax)),t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),i=Math.round((i-(this._ymin+this._margin))*this._finalRatio),this._line.push(new h.E(t,i)),this._isH=!1,this._isV=!1)}_lineTo(t,i,e){let n,s;if(this._type!==h.V.Polygon)if(e){if(t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),i=Math.round((i-(this._ymin+this._margin))*this._finalRatio),this._line.length>0&&(n=this._line[this._line.length-1],n.equals(t,i)))return;this._line.push(new h.E(t,i))}else this._line&&this._line.length>0&&this._pushLine();else if(e||(t<this._xmin&&(t=this._xmin),t>this._xmax&&(t=this._xmax),i<this._ymin&&(i=this._ymin),i>this._ymax&&(i=this._ymax)),t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),i=Math.round((i-(this._ymin+this._margin))*this._finalRatio),this._line&&this._line.length>0){n=this._line[this._line.length-1];const e=n.x===t,r=n.y===i;if(e&&r)return;this._isH&&e||this._isV&&r?(n.x=t,n.y=i,s=this._line[this._line.length-2],s.x===t&&s.y===i?(this._line.pop(),this._line.length<=1?(this._isH=!1,this._isV=!1):(s=this._line[this._line.length-2],this._isH=s.x===t,this._isV=s.y===i)):(this._isH=s.x===t,this._isV=s.y===i)):(this._line.push(new h.E(t,i)),this._isH=e,this._isV=r)}else this._line.push(new h.E(t,i))}}class a{setExtent(t){this._ratio=4096===t?1:4096/t}get validateTessellation(){return this._ratio<1}reset(t){this._lines=[],this._line=null}moveTo(t,i){this._line&&this._lines.push(this._line),this._line=[];const e=this._ratio;this._line.push(new h.E(t*e,i*e))}lineTo(t,i){const e=this._ratio;this._line.push(new h.E(t*e,i*e))}close(){const t=this._line;t&&!t[0].isEqual(t[t.length-1])&&t.push(t[0])}result(){return this._line&&this._lines.push(this._line),0===this._lines.length?null:this._lines}}(s=n||(n={}))[s.sideLeft=0]="sideLeft",s[s.sideRight=1]="sideRight",s[s.sideTop=2]="sideTop",s[s.sideBottom=3]="sideBottom";class u{static simplify(t,i,e){if(!e)return;const s=-i,r=t+i,h=-i,x=t+i,o=[],l=[],a=e.length;for(let t=0;t<a;++t){const i=e[t];if(!i||i.length<2)continue;let a,u=i[0];const _=i.length;for(let e=1;e<_;++e)a=i[e],u.x===a.x&&(u.x<=s&&(u.y>a.y?(o.push(t),o.push(e),o.push(n.sideLeft),o.push(-1)):(l.push(t),l.push(e),l.push(n.sideLeft),l.push(-1))),u.x>=r&&(u.y<a.y?(o.push(t),o.push(e),o.push(n.sideRight),o.push(-1)):(l.push(t),l.push(e),l.push(n.sideRight),l.push(-1)))),u.y===a.y&&(u.y<=h&&(u.x<a.x?(o.push(t),o.push(e),o.push(n.sideTop),o.push(-1)):(l.push(t),l.push(e),l.push(n.sideTop),l.push(-1))),u.y>=x&&(u.x>a.x?(o.push(t),o.push(e),o.push(n.sideBottom),o.push(-1)):(l.push(t),l.push(e),l.push(n.sideBottom),l.push(-1)))),u=a}if(0===o.length||0===l.length)return;u.fillParent(e,l,o),u.fillParent(e,o,l);const _=[];u.calcDeltas(_,l,o),u.calcDeltas(_,o,l),u.addDeltas(_,e)}static fillParent(t,i,e){const s=e.length,r=i.length;for(let h=0;h<r;h+=4){const r=i[h],o=i[h+1],l=i[h+2],a=t[r][o-1],u=t[r][o];let _=8092,y=-1;for(let i=0;i<s;i+=4){if(e[i+2]!==l)continue;const s=e[i],r=e[i+1],h=t[s][r-1],o=t[s][r];switch(l){case n.sideLeft:case n.sideRight:if((0,x.vX)(a.y,h.y,o.y)&&(0,x.vX)(u.y,h.y,o.y)){const t=Math.abs(o.y-h.y);t<_&&(_=t,y=i)}break;case n.sideTop:case n.sideBottom:if((0,x.vX)(a.x,h.x,o.x)&&(0,x.vX)(u.x,h.x,o.x)){const t=Math.abs(o.x-h.x);t<_&&(_=t,y=i)}}}i[h+3]=y}}static calcDeltas(t,i,e){const n=i.length;for(let s=0;s<n;s+=4){const n=[],r=u.calcDelta(s,i,e,n);t.push(i[s]),t.push(i[s+1]),t.push(i[s+2]),t.push(r)}}static calcDelta(t,i,e,n){const s=i[t+3];if(-1===s)return 0;const r=n.length;return r>1&&n[r-2]===s?0:(n.push(s),u.calcDelta(s,e,i,n)+1)}static addDeltas(t,i){const e=t.length;let s=0;for(let i=0;i<e;i+=4){const e=t[i+3];e>s&&(s=e)}for(let r=0;r<e;r+=4){const e=i[t[r]],h=t[r+1],x=s-t[r+3];switch(t[r+2]){case n.sideLeft:e[h-1].x-=x,e[h].x-=x,1===h&&(e[e.length-1].x-=x),h===e.length-1&&(e[0].x-=x);break;case n.sideRight:e[h-1].x+=x,e[h].x+=x,1===h&&(e[e.length-1].x+=x),h===e.length-1&&(e[0].x+=x);break;case n.sideTop:e[h-1].y-=x,e[h].y-=x,1===h&&(e[e.length-1].y-=x),h===e.length-1&&(e[0].y-=x);break;case n.sideBottom:e[h-1].y+=x,e[h].y+=x,1===h&&(e[e.length-1].y+=x),h===e.length-1&&(e[0].y+=x)}}}}},67327:(t,i,e)=>{e.d(i,{z:()=>y});var n=e(95648),s=e(16534);function r(t,i){return t.x===i.x&&t.y===i.y}function h(t,i){return t.x=i.y,t.y=-i.x,t}function x(t,i){return t.x=-i.y,t.y=i.x,t}function o(t,i){return t.x=i.x,t.y=i.y,t}function l(t,i){return t.x=-i.x,t.y=-i.y,t}function a(t){return Math.sqrt(t.x*t.x+t.y*t.y)}function u(t,i){return t.x*i.x+t.y*i.y}function _(t,i,e,n){return t.x=i.x*e+i.y*n,t.y=i.x*n-i.y*e,t}class y{constructor(t,i,e){this._writeVertex=t,this._writeTriangle=i,this._canUseThinTessellation=e,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,i){(function(t){if(!t)return;const i=t.length;if(i<=1)return;let e=0;for(let n=1;n<i;n++)r(t[n],t[e])||++e===n||(t[e]=t[n]);t.length=e+1})(t),this._canUseThinTessellation&&i.halfWidth<s.tQ&&!i.offset?this._tessellateThin(t,i):this._tessellate(t,i)}_tessellateThin(t,i){if(t.length<2)return;const e=i.wrapDistance||65535;let n=i.initialDistance||0,s=!1,r=t[0].x,h=t[0].y;const x=t.length;for(let i=1;i<x;++i){s&&(s=!1,n=0);let x=t[i].x,o=t[i].y,l=x-r,a=o-h,u=Math.sqrt(l*l+a*a);if(l/=u,a/=u,n+u>e){s=!0;const t=(e-n)/u;u=e-n,x=(1-t)*r+t*x,o=(1-t)*h+t*o,--i}const _=this._writeVertex(r,h,0,0,l,a,a,-l,0,-1,n),y=this._writeVertex(r,h,0,0,l,a,-a,l,0,1,n);n+=u;const f=this._writeVertex(x,o,0,0,l,a,a,-l,0,-1,n),c=this._writeVertex(x,o,0,0,l,a,-a,l,0,1,n);this._writeTriangle(_,y,f),this._writeTriangle(y,f,c),r=x,h=o}}_tessellate(t,i){const e=t[0],s=t[t.length-1],y=r(e,s),f=y?3:2;if(t.length<f)return;const c=i.pixelCoordRatio,p=null!=i.capType?i.capType:n.RL.BUTT,m=null!=i.joinType?i.joinType:n.AH.MITER,v=null!=i.miterLimit?Math.min(i.miterLimit,4):2,d=null!=i.roundLimit?Math.min(i.roundLimit,1.05):1.05,g=null!=i.halfWidth?i.halfWidth:2,T=!!i.textured;let w,L,A,R=null;const b=this._prevNormal,B=this._nextNormal;let U=-1,V=-1;const E=this._joinNormal;let N,M;const F=this._textureNormalLeft,S=this._textureNormalRight,I=this._textureNormal;let P=-1,Z=-1;const k=i.wrapDistance||65535;let C=i.initialDistance||0;const D=this._writeVertex,z=this._writeTriangle,O=(t,i,e,n,s,r)=>{const h=D(L,A,N,M,e,n,t,i,s,r,C);return P>=0&&Z>=0&&h>=0&&z(P,Z,h),P=Z,Z=h,h};y&&(w=t[t.length-2],B.x=s.x-w.x,B.y=s.y-w.y,V=a(B),B.x/=V,B.y/=V);let H=!1;for(let i=0;i<t.length;++i){if(H&&(H=!1,C=0),w&&(b.x=-B.x,b.y=-B.y,U=V,C+U>k&&(H=!0)),H){const e=(k-C)/U;U=k-C,w={x:(1-e)*w.x+e*t[i].x,y:(1-e)*w.y+e*t[i].y},--i}else w=t[i];L=w.x,A=w.y;const e=i<=0&&!H,s=i===t.length-1;if(e||(C+=U),R=s?y?t[1]:null:t[i+1],R?(B.x=R.x-L,B.y=R.y-A,V=a(B),B.x/=V,B.y/=V):(B.x=void 0,B.y=void 0),!y){if(e){x(E,B),N=E.x,M=E.y,p===n.RL.SQUARE&&(O(-B.y-B.x,B.x-B.y,B.x,B.y,0,-1),O(B.y-B.x,-B.x-B.y,B.x,B.y,0,1)),p===n.RL.ROUND&&(O(-B.y-B.x,B.x-B.y,B.x,B.y,-1,-1),O(B.y-B.x,-B.x-B.y,B.x,B.y,-1,1)),p!==n.RL.ROUND&&p!==n.RL.BUTT||(O(-B.y,B.x,B.x,B.y,0,-1),O(B.y,-B.x,B.x,B.y,0,1));continue}if(s){h(E,b),N=E.x,M=E.y,p!==n.RL.ROUND&&p!==n.RL.BUTT||(O(b.y,-b.x,-b.x,-b.y,0,-1),O(-b.y,b.x,-b.x,-b.y,0,1)),p===n.RL.SQUARE&&(O(b.y-b.x,-b.x-b.y,-b.x,-b.y,0,-1),O(-b.y-b.x,b.x-b.y,-b.x,-b.y,0,1)),p===n.RL.ROUND&&(O(b.y-b.x,-b.x-b.y,-b.x,-b.y,1,-1),O(-b.y-b.x,b.x-b.y,-b.x,-b.y,1,1));continue}}let r,f,D=(X=B,-((j=b).x*X.y-j.y*X.x));if(Math.abs(D)<.01)u(b,B)>0?(E.x=b.x,E.y=b.y,D=1,r=Number.MAX_VALUE,f=!0):(x(E,B),D=1,r=1,f=!1);else{E.x=(b.x+B.x)/D,E.y=(b.y+B.y)/D,r=a(E);const t=(r-1)*g*c;f=r>4||t>U&&t>V}N=E.x,M=E.y;let z=m;switch(m){case n.AH.BEVEL:r<1.05&&(z=n.AH.MITER);break;case n.AH.ROUND:r<d&&(z=n.AH.MITER);break;case n.AH.MITER:r>v&&(z=n.AH.BEVEL)}switch(z){case n.AH.MITER:if(O(E.x,E.y,-b.x,-b.y,0,-1),O(-E.x,-E.y,-b.x,-b.y,0,1),s)break;if(T){const t=H?0:C;P=this._writeVertex(L,A,N,M,B.x,B.y,E.x,E.y,0,-1,t),Z=this._writeVertex(L,A,N,M,B.x,B.y,-E.x,-E.y,0,1,t)}break;case n.AH.BEVEL:{const t=D<0;let i,e,n,r;if(t){const t=P;P=Z,Z=t,i=F,e=S}else i=S,e=F;if(f)n=t?x(this._innerPrev,b):h(this._innerPrev,b),r=t?h(this._innerNext,B):x(this._innerNext,B);else{const i=t?l(this._inner,E):o(this._inner,E);n=i,r=i}const a=t?h(this._bevelStart,b):x(this._bevelStart,b);O(n.x,n.y,-b.x,-b.y,i.x,i.y);const u=O(a.x,a.y,-b.x,-b.y,e.x,e.y);if(s)break;const y=t?x(this._bevelEnd,B):h(this._bevelEnd,B);if(f){const t=this._writeVertex(L,A,N,M,-b.x,-b.y,0,0,0,0,C);P=this._writeVertex(L,A,N,M,B.x,B.y,r.x,r.y,i.x,i.y,C),Z=this._writeVertex(L,A,N,M,B.x,B.y,y.x,y.y,e.x,e.y,C),this._writeTriangle(u,t,Z)}else{if(T){const t=this._bevelMiddle;t.x=(a.x+y.x)/2,t.y=(a.y+y.y)/2,_(I,t,-b.x,-b.y),O(t.x,t.y,-b.x,-b.y,I.x,I.y),_(I,t,B.x,B.y),P=this._writeVertex(L,A,N,M,B.x,B.y,t.x,t.y,I.x,I.y,C),Z=this._writeVertex(L,A,N,M,B.x,B.y,r.x,r.y,i.x,i.y,C)}else{const t=P;P=Z,Z=t}O(y.x,y.y,B.x,B.y,e.x,e.y)}if(t){const t=P;P=Z,Z=t}break}case n.AH.ROUND:{const t=D<0;let i,e;if(t){const t=P;P=Z,Z=t,i=F,e=S}else i=S,e=F;const n=t?l(this._inner,E):o(this._inner,E);let a,y;f?(a=t?x(this._innerPrev,b):h(this._innerPrev,b),y=t?h(this._innerNext,B):x(this._innerNext,B)):(a=n,y=n);const c=t?h(this._roundStart,b):x(this._roundStart,b),p=t?x(this._roundEnd,B):h(this._roundEnd,B),m=O(a.x,a.y,-b.x,-b.y,i.x,i.y),v=O(c.x,c.y,-b.x,-b.y,e.x,e.y);if(s)break;const d=this._writeVertex(L,A,N,M,-b.x,-b.y,0,0,0,0,C);f||this._writeTriangle(P,Z,d);const g=l(this._outer,n),w=this._writeVertex(L,A,N,M,B.x,B.y,p.x,p.y,e.x,e.y,C);let R,U;const V=r>2;if(V){let i;r!==Number.MAX_VALUE?(g.x/=r,g.y/=r,i=u(b,g),i=(r*(i*i-1)+1)/i):i=-1,R=t?h(this._startBreak,b):x(this._startBreak,b),R.x+=b.x*i,R.y+=b.y*i,U=t?x(this._endBreak,B):h(this._endBreak,B),U.x+=B.x*i,U.y+=B.y*i}_(I,g,-b.x,-b.y);const k=this._writeVertex(L,A,N,M,-b.x,-b.y,g.x,g.y,I.x,I.y,C);_(I,g,B.x,B.y);const z=T?this._writeVertex(L,A,N,M,B.x,B.y,g.x,g.y,I.x,I.y,C):k,H=d,j=T?this._writeVertex(L,A,N,M,B.x,B.y,0,0,0,0,C):d;let X=-1,W=-1;if(V&&(_(I,R,-b.x,-b.y),X=this._writeVertex(L,A,N,M,-b.x,-b.y,R.x,R.y,I.x,I.y,C),_(I,U,B.x,B.y),W=this._writeVertex(L,A,N,M,B.x,B.y,U.x,U.y,I.x,I.y,C)),T?V?(this._writeTriangle(H,v,X),this._writeTriangle(H,X,k),this._writeTriangle(j,z,W),this._writeTriangle(j,W,w)):(this._writeTriangle(H,v,k),this._writeTriangle(j,z,w)):V?(this._writeTriangle(d,v,X),this._writeTriangle(d,X,W),this._writeTriangle(d,W,w)):(this._writeTriangle(d,v,k),this._writeTriangle(d,z,w)),f?(P=this._writeVertex(L,A,N,M,B.x,B.y,y.x,y.y,i.x,i.y,C),Z=w):(P=T?this._writeVertex(L,A,N,M,B.x,B.y,y.x,y.y,i.x,i.y,C):m,this._writeTriangle(P,j,w),Z=w),t){const t=P;P=Z,Z=t}break}}}var j,X}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6233],{26233:(t,n,e)=>{e.r(n),e.d(n,{l:()=>u});var r,i,o,s={exports:{}};r=s,i="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,"undefined"!=typeof __filename&&(i=i||__filename),o=function(t){var n,e;(t=void 0!==(t=t||{})?t:{}).ready=new Promise((function(t,r){n=t,e=r}));var r,o,s,u,a,c,f=Object.assign({},t),p="object"==typeof window,l="function"==typeof importScripts,h="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,d="";h?(d=l?require("path").dirname(d)+"/":__dirname+"/",c=()=>{a||(u=require("fs"),a=require("path"))},r=function(t,n){return c(),t=a.normalize(t),u.readFileSync(t,n?void 0:"utf8")},s=t=>{var n=r(t,!0);return n.buffer||(n=new Uint8Array(n)),n},o=(t,n,e)=>{c(),t=a.normalize(t),u.readFile(t,(function(t,r){t?e(t):n(r.buffer)}))},process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),process.argv.slice(2),process.on("uncaughtException",(function(t){if(!(t instanceof Q))throw t})),process.on("unhandledRejection",(function(t){throw t})),t.inspect=function(){return"[Emscripten Module object]"}):(p||l)&&(l?d=self.location.href:"undefined"!=typeof document&&document.currentScript&&(d=document.currentScript.src),i&&(d=i),d=0!==d.indexOf("blob:")?d.substr(0,d.replace(/[?#].*/,"").lastIndexOf("/")+1):"",r=t=>{var n=new XMLHttpRequest;return n.open("GET",t,!1),n.send(null),n.responseText},l&&(s=t=>{var n=new XMLHttpRequest;return n.open("GET",t,!1),n.responseType="arraybuffer",n.send(null),new Uint8Array(n.response)}),o=(t,n,e)=>{var r=new XMLHttpRequest;r.open("GET",t,!0),r.responseType="arraybuffer",r.onload=()=>{200==r.status||0==r.status&&r.response?n(r.response):e()},r.onerror=e,r.send(null)}),t.print||console.log.bind(console);var m,_,y=t.printErr||console.warn.bind(console);Object.assign(t,f),f=null,t.arguments&&t.arguments,t.thisProgram&&t.thisProgram,t.quit&&t.quit,t.wasmBinary&&(m=t.wasmBinary),t.noExitRuntime,"object"!=typeof WebAssembly&&W("no native wasm support detected");var g,w,b,v,A,R,x=!1,S="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function P(t,n){return t?function(t,n,e){for(var r=n+e,i=n;t[i]&&!(i>=r);)++i;if(i-n>16&&t.buffer&&S)return S.decode(t.subarray(n,i));for(var o="";n<i;){var s=t[n++];if(128&s){var u=63&t[n++];if(192!=(224&s)){var a=63&t[n++];if((s=224==(240&s)?(15&s)<<12|u<<6|a:(7&s)<<18|u<<12|a<<6|63&t[n++])<65536)o+=String.fromCharCode(s);else{var c=s-65536;o+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else o+=String.fromCharCode((31&s)<<6|u)}else o+=String.fromCharCode(s)}return o}(b,t,n):""}function E(n){g=n,t.HEAP8=w=new Int8Array(n),t.HEAP16=new Int16Array(n),t.HEAP32=v=new Int32Array(n),t.HEAPU8=b=new Uint8Array(n),t.HEAPU16=new Uint16Array(n),t.HEAPU32=A=new Uint32Array(n),t.HEAPF32=new Float32Array(n),t.HEAPF64=new Float64Array(n)}t.INITIAL_MEMORY;var I=[],j=[],T=[];function C(t){I.unshift(t)}function D(t){T.unshift(t)}var H,M=0,O=null;function W(n){t.onAbort&&t.onAbort(n),y(n="Aborted("+n+")"),x=!0,n+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(n);throw e(r),r}function k(t){return t.startsWith("data:application/octet-stream;base64,")}function U(t){return t.startsWith("file://")}function q(t){try{if(t==H&&m)return new Uint8Array(m);if(s)return s(t);throw"both async and sync fetching of the wasm failed"}catch(t){W(t)}}function F(){if(!m&&(p||l)){if("function"==typeof fetch&&!U(H))return fetch(H,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+H+"'";return t.arrayBuffer()})).catch((function(){return q(H)}));if(o)return new Promise((function(t,n){o(H,(function(n){t(new Uint8Array(n))}),n)}))}return Promise.resolve().then((function(){return q(H)}))}function B(n){for(;n.length>0;){var e=n.shift();if("function"!=typeof e){var r=e.func;"number"==typeof r?void 0===e.arg?L(r)():L(r)(e.arg):r(void 0===e.arg?null:e.arg)}else e(t)}}k(H="lerc-wasm.wasm")||(H=function(n){return t.locateFile?t.locateFile(n,d):d+n}(H));var z=[];function L(t){var n=z[t];return n||(t>=z.length&&(z.length=t+1),z[t]=n=R.get(t)),n}function G(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(t){A[this.ptr+4>>2]=t},this.get_type=function(){return A[this.ptr+4>>2]},this.set_destructor=function(t){A[this.ptr+8>>2]=t},this.get_destructor=function(){return A[this.ptr+8>>2]},this.set_refcount=function(t){v[this.ptr>>2]=t},this.set_caught=function(t){t=t?1:0,w[this.ptr+12>>0]=t},this.get_caught=function(){return 0!=w[this.ptr+12>>0]},this.set_rethrown=function(t){t=t?1:0,w[this.ptr+13>>0]=t},this.get_rethrown=function(){return 0!=w[this.ptr+13>>0]},this.init=function(t,n){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(n),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var t=v[this.ptr>>2];v[this.ptr>>2]=t+1},this.release_ref=function(){var t=v[this.ptr>>2];return v[this.ptr>>2]=t-1,1===t},this.set_adjusted_ptr=function(t){A[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return A[this.ptr+16>>2]},this.get_exception_ptr=function(){if(K(this.get_type()))return A[this.excPtr>>2];var t=this.get_adjusted_ptr();return 0!==t?t:this.excPtr}}function X(t){try{return _.grow(t-g.byteLength+65535>>>16),E(_.buffer),1}catch(t){}}var N={a:function(t,n,e,r){W("Assertion failed: "+P(t)+", at: "+[n?P(n):"unknown filename",e,r?P(r):"unknown function"])},c:function(t){return Y(t+24)+24},b:function(t,n,e){throw new G(t).init(n,e),t},d:function(){W("")},f:function(t,n,e){b.copyWithin(t,n,n+e)},e:function(t){var n=b.length,e=2147483648;if((t>>>=0)>e)return!1;let r=(t,n)=>t+(n-t%n)%n;for(var i=1;i<=4;i*=2){var o=n*(1+.2/i);if(o=Math.min(o,t+100663296),X(Math.min(e,r(Math.max(t,o),65536))))return!0}return!1}};(function(){var n={a:N};function r(n,e){var r=n.exports;t.asm=r,E((_=t.asm.g).buffer),R=t.asm.m,function(t){j.unshift(t)}(t.asm.h),function(n){if(M--,t.monitorRunDependencies&&t.monitorRunDependencies(M),0==M&&O){var e=O;O=null,e()}}()}function i(t){r(t.instance)}function o(t){return F().then((function(t){return WebAssembly.instantiate(t,n)})).then((function(t){return t})).then(t,(function(t){y("failed to asynchronously prepare wasm: "+t),W(t)}))}if(M++,t.monitorRunDependencies&&t.monitorRunDependencies(M),t.instantiateWasm)try{return t.instantiateWasm(n,r)}catch(t){return y("Module.instantiateWasm callback failed with error: "+t),!1}(m||"function"!=typeof WebAssembly.instantiateStreaming||k(H)||U(H)||h||"function"!=typeof fetch?o(i):fetch(H,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,n).then(i,(function(t){return y("wasm streaming compile failed: "+t),y("falling back to ArrayBuffer instantiation"),o(i)}))}))).catch(e)})(),t.___wasm_call_ctors=function(){return(t.___wasm_call_ctors=t.asm.h).apply(null,arguments)},t._lerc_getBlobInfo=function(){return(t._lerc_getBlobInfo=t.asm.i).apply(null,arguments)},t._lerc_getDataRanges=function(){return(t._lerc_getDataRanges=t.asm.j).apply(null,arguments)},t._lerc_decode=function(){return(t._lerc_decode=t.asm.k).apply(null,arguments)},t._lerc_decode_4D=function(){return(t._lerc_decode_4D=t.asm.l).apply(null,arguments)};var Y=t._malloc=function(){return(Y=t._malloc=t.asm.n).apply(null,arguments)};t._free=function(){return(t._free=t.asm.o).apply(null,arguments)};var J,K=t.___cxa_is_pointer_type=function(){return(K=t.___cxa_is_pointer_type=t.asm.p).apply(null,arguments)};function Q(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}function V(e){function r(){J||(J=!0,t.calledRun=!0,x||(B(j),n(t),t.onRuntimeInitialized&&t.onRuntimeInitialized(),function(){if(t.postRun)for("function"==typeof t.postRun&&(t.postRun=[t.postRun]);t.postRun.length;)D(t.postRun.shift());B(T)}()))}M>0||(function(){if(t.preRun)for("function"==typeof t.preRun&&(t.preRun=[t.preRun]);t.preRun.length;)C(t.preRun.shift());B(I)}(),M>0||(t.setStatus?(t.setStatus("Running..."),setTimeout((function(){setTimeout((function(){t.setStatus("")}),1),r()}),1)):r()))}if(O=function t(){J||V(),J||(O=t)},t.run=V,t.preInit)for("function"==typeof t.preInit&&(t.preInit=[t.preInit]);t.preInit.length>0;)t.preInit.pop()();return V(),t.ready},r.exports=o;const u=function(t,n){for(var e=0;e<n.length;e++){const r=n[e];if("string"!=typeof r&&!Array.isArray(r))for(const n in r)if("default"!==n&&!(n in t)){const e=Object.getOwnPropertyDescriptor(r,n);e&&Object.defineProperty(t,n,e.get?e:{enumerable:!0,get:()=>r[n]})}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}({__proto__:null,default:s.exports},[s.exports])}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6208],{84552:(e,t,i)=>{i.d(t,{Z:()=>d});var s,r=i(43697),n=i(96674),o=i(35463),a=i(5600),l=(i(67676),i(80442),i(75215),i(52011)),u=i(78981);let h=s=class extends n.wq{constructor(e){super(e),this.value=0,this.unit="milliseconds"}toMilliseconds(){return(0,o.rJ)(this.value,this.unit,"milliseconds")}clone(){return new s({value:this.value,unit:this.unit})}};(0,r._)([(0,a.Cb)({type:Number,json:{write:!0},nonNullable:!0})],h.prototype,"value",void 0),(0,r._)([(0,a.Cb)({type:u.v.apiValues,json:{type:u.v.jsonValues,read:u.v.read,write:u.v.write},nonNullable:!0})],h.prototype,"unit",void 0),h=s=(0,r._)([(0,l.j)("esri.TimeInterval")],h);const d=h},66643:(e,t,i)=>{i.d(t,{Ed:()=>u,UI:()=>h,mt:()=>_,q6:()=>p,vr:()=>f});var s=i(43697),r=i(15923),n=i(70586),o=i(95330),a=i(5600),l=(i(67676),i(80442),i(75215),i(52011));function u(e,t,i){return(0,o.as)(e.map(((e,s)=>t.apply(i,[e,s]))))}async function h(e,t,i){return(await(0,o.as)(e.map(((e,s)=>t.apply(i,[e,s]))))).map((e=>e.value))}function d(e){return{ok:!0,value:e}}function c(e){return{ok:!1,error:e}}async function p(e){if((0,n.Wi)(e))return{ok:!1,error:new Error("no promise provided")};try{return d(await e)}catch(e){return c(e)}}async function _(e){try{return d(await e)}catch(e){return(0,o.r9)(e),c(e)}}function f(e,t){return new m(e,t)}let m=class extends r.Z{constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,n.IM)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:i}=this._abortController;this.promise=e(i),this.promise.then((e=>{this._result=d(e),this._cleanup()}),(e=>{this._result=c(e),this._cleanup()})),this._abortHandle=(0,o.fu)(t,this.abort)}get value(){return e=this._result,(0,n.pC)(e)&&!0===e.ok?e.value:null;var e}get error(){return e=this._result,(0,n.pC)(e)&&!1===e.ok?e.error:null;var e}get finished(){return(0,n.pC)(this._result)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,n.hw)(this._abortHandle),this._abortController=null}};(0,s._)([(0,a.Cb)()],m.prototype,"value",null),(0,s._)([(0,a.Cb)()],m.prototype,"error",null),(0,s._)([(0,a.Cb)()],m.prototype,"finished",null),(0,s._)([(0,a.Cb)()],m.prototype,"promise",void 0),(0,s._)([(0,a.Cb)()],m.prototype,"_result",void 0),m=(0,s._)([(0,l.j)("esri.core.asyncUtils.ReactiveTask")],m)},43090:(e,t,i)=>{function s(e){return 32+e.length}function r(e){if(!e)return 0;let t=32;for(const i in e)if(e.hasOwnProperty(i)){const r=e[i];switch(typeof r){case"string":t+=s(r);break;case"number":t+=16;break;case"boolean":t+=4}}return t}function n(e,t){return 32+e.length*t}var o;i.d(t,{Y8:()=>o,do:()=>n,f2:()=>r}),function(e){e[e.KILOBYTES=1024]="KILOBYTES",e[e.MEGABYTES=1048576]="MEGABYTES",e[e.GIGABYTES=1073741824]="GIGABYTES"}(o||(o={}))},24133:(e,t,i)=>{i.d(t,{Q:()=>a});var s=i(67676),r=i(70586),n=i(44553),o=i(88764);class a{constructor(e=9,t){this._compareMinX=d,this._compareMinY=c,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(),b.prune(),C.prune(),T.prune(),w.prune()}all(e){this._all(this._data,e)}search(e,t){let i=this._data;const s=this._toBBox;if(g(e,i))for(b.clear();i;){for(let r=0,n=i.children.length;r<n;r++){const n=i.children[r],o=i.leaf?s(n):n;g(e,o)&&(i.leaf?t(n):y(e,o)?this._all(n,t):b.push(n))}i=b.pop()}}collides(e){let t=this._data;const i=this._toBBox;if(!g(e,t))return!1;for(b.clear();t;){for(let s=0,r=t.children.length;s<r;s++){const r=t.children[s],n=t.leaf?i(r):r;if(g(e,n)){if(t.leaf||y(e,n))return!0;b.push(r)}}t=b.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,i=e.length;t<i;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 E([]),this}remove(e){if(!e)return this;let t,i=this._data,n=null,o=0,a=!1;const l=this._toBBox(e);for(T.clear(),w.clear();i||T.length>0;){if(i||(i=(0,r.j0)(T.pop()),n=T.data[T.length-1],o=w.pop()??0,a=!0),i.leaf&&(t=(0,s.cq)(i.children,e,i.children.length,i.indexHint),-1!==t))return i.children.splice(t,1),T.push(i),this._condense(T),this;a||i.leaf||!y(i,l)?n?(o++,i=n.children[o],a=!1):i=null:(T.push(i),w.push(o),o=0,n=i,i=i.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_all(e,t){let i=e;for(C.clear();i;){if(!0===i.leaf)for(const e of i.children)t(e);else C.pushArray(i.children);i=C.pop()??null}}_build(e,t,i,s){const r=i-t+1;let n=this._maxEntries;if(r<=n){const s=new E(e.slice(t,i+1));return l(s,this._toBBox),s}s||(s=Math.ceil(Math.log(r)/Math.log(n)),n=Math.ceil(r/n**(s-1)));const o=new F([]);o.height=s;const a=Math.ceil(r/n),u=a*Math.ceil(Math.sqrt(n));v(e,t,i,u,this._compareMinX);for(let r=t;r<=i;r+=u){const t=Math.min(r+u-1,i);v(e,r,t,a,this._compareMinY);for(let i=r;i<=t;i+=a){const r=Math.min(i+a-1,t);o.children.push(this._build(e,i,r,s-1))}}return l(o,this._toBBox),o}_chooseSubtree(e,t,i,s){for(;s.push(t),!0!==t.leaf&&s.length-1!==i;){let i,s=1/0,r=1/0;for(let n=0,o=t.children.length;n<o;n++){const o=t.children[n],a=p(o),l=f(e,o)-a;l<r?(r=l,s=a<s?a:s,i=o):l===r&&a<s&&(s=a,i=o)}t=i||t.children[0]}return t}_insert(e,t,i){const s=this._toBBox,r=i?e:s(e);T.clear();const n=this._chooseSubtree(r,this._data,t,T);for(n.children.push(e),h(n,r);t>=0&&T.data[t].children.length>this._maxEntries;)this._split(T,t),t--;this._adjustParentBBoxes(r,T,t)}_split(e,t){const i=e.data[t],s=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,s);const n=this._chooseSplitIndex(i,r,s);if(!n)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const o=i.children.splice(n,i.children.length-n),a=i.leaf?new E(o):new F(o);a.height=i.height,l(i,this._toBBox),l(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(i,a)}_splitRoot(e,t){this._data=new F([e,t]),this._data.height=e.height+1,l(this._data,this._toBBox)}_chooseSplitIndex(e,t,i){let s,r,n;s=r=1/0;for(let o=t;o<=i-t;o++){const t=u(e,0,o,this._toBBox),a=u(e,o,i,this._toBBox),l=m(t,a),h=p(t)+p(a);l<s?(s=l,n=o,r=h<r?h:r):l===s&&h<r&&(r=h,n=o)}return n}_chooseSplitAxis(e,t,i){const s=e.leaf?this._compareMinX:d,r=e.leaf?this._compareMinY:c;this._allDistMargin(e,t,i,s)<this._allDistMargin(e,t,i,r)&&e.children.sort(s)}_allDistMargin(e,t,i,s){e.children.sort(s);const r=this._toBBox,n=u(e,0,t,r),o=u(e,i-t,i,r);let a=_(n)+_(o);for(let s=t;s<i-t;s++){const t=e.children[s];h(n,e.leaf?r(t):t),a+=_(n)}for(let s=i-t-1;s>=t;s--){const t=e.children[s];h(o,e.leaf?r(t):t),a+=_(o)}return a}_adjustParentBBoxes(e,t,i){for(let s=i;s>=0;s--)h(t.data[s],e)}_condense(e){for(let t=e.length-1;t>=0;t--){const i=e.data[t];if(0===i.children.length)if(t>0){const r=e.data[t-1],n=r.children;n.splice((0,s.cq)(n,i,n.length,r.indexHint),1)}else this.clear();else l(i,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 l(e,t){u(e,0,e.children.length,t,e)}function u(e,t,i,s,r){r||(r=new E([])),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let n,o=t;o<i;o++)n=e.children[o],h(r,e.leaf?s(n):n);return r}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 d(e,t){return e.minX-t.minX}function c(e,t){return e.minY-t.minY}function p(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 m(e,t){const i=Math.max(e.minX,t.minX),s=Math.max(e.minY,t.minY),r=Math.min(e.maxX,t.maxX),n=Math.min(e.maxY,t.maxY);return Math.max(0,r-i)*Math.max(0,n-s)}function y(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function g(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function v(e,t,i,s,n){const a=[t,i];for(;a.length;){const t=(0,r.j0)(a.pop()),i=(0,r.j0)(a.pop());if(t-i<=s)continue;const l=i+Math.ceil((t-i)/s/2)*s;(0,o.q)(e,l,i,t,n),a.push(i,l,l,t)}}const b=new n.Z,C=new n.Z,T=new n.Z,w=new n.Z({deallocator:void 0});class x extends class{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}{constructor(){super(...arguments),this.height=1,this.indexHint=new s.SO}}class E extends x{constructor(e){super(),this.children=e,this.leaf=!0}}class F extends x{constructor(e){super(),this.children=e,this.leaf=!1}}},37549:(e,t,i)=>{i.d(t,{H:()=>a});var s=i(80442),r=i(24133),n=i(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 r.Q(9,(0,s.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(((i,s)=>{e[t++]=s})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,n.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,i){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,i)}(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,i)=>{i.d(t,{Z:()=>f});var s=i(20102),r=i(32448),n=i(92604),o=i(70586),a=i(60437),l=i(24470),u=i(98732),h=i(37549),d=i(29730),c=i(70272),p=i(5428);const _={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t)=>new c.u_(t,e.attributes,null,e.objectId),getGeometry:e=>e.geometry,getCentroid:(e,t)=>((0,o.Wi)(e.centroid)&&(e.centroid=(0,d.Y)(new p.Z,e.geometry,t.hasZ,t.hasM)),e.centroid)};class f{constructor(e){this.geometryInfo=e,this._boundsStore=new h.H,this._featuresById=new Map,this._markedIds=new Set,this.events=new r.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=>{(0,o.pC)(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)}}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,i){for(const s of e){const e=this._boundsStore.get(s.objectId);e&&t((0,a.JR)(i,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}toArray(){return Array.from(this._featuresById.values())}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,i)=>{this._markedIds.has(i)||(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 n.Z.getLogger("esri.layers.graphics.data.FeatureStore").error(new s.Z("featurestore:invalid-feature","feature id is missing",{feature:e}));const i=this._featuresById.get(t);let r;if(this._markedIds.add(t),i?(e.displayId=i.displayId,r=this._boundsStore.get(t),this._boundsStore.delete(t)):(0,o.pC)(this.onFeatureAdd)&&this.onFeatureAdd(e),(0,o.Wi)(e.geometry)||!e.geometry.coords||!e.geometry.coords.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);r=(0,u.$)((0,o.pC)(r)?r:(0,l.Ue)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),(0,o.pC)(r)&&this._boundsStore.set(t,r),this._featuresById.set(t,e)}_remove(e){return(0,o.pC)(this.onFeatureRemove)&&this.onFeatureRemove(e),this._markedIds.delete(e.objectId),this._boundsStore.delete(e.objectId),this._featuresById.delete(e.objectId),e}}},1231:(e,t,i)=>{i.d(t,{Z:()=>m});var s,r=i(43697),n=i(35454),o=i(96674),a=i(5600),l=(i(67676),i(80442),i(75215)),u=i(36030),h=i(71715),d=i(52011),c=i(72729),p=i(86719);const _=new n.X({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let f=s=class extends o.wq{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=-1,this.name=null,this.nullable=!0,this.type=null,this.valueType=null}readDescription(e,{description:t}){let i=null;try{i=t?JSON.parse(t):null}catch(e){}return i?.value??null}readValueType(e,{description:t}){let i=null;try{i=t?JSON.parse(t):null}catch(e){}return i?_.fromJSON(i.fieldValueType):null}clone(){return new s({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType})}};(0,r._)([(0,a.Cb)({type:String,json:{write:!0}})],f.prototype,"alias",void 0),(0,r._)([(0,a.Cb)({type:[String,Number],json:{write:{allowNull:!0}}})],f.prototype,"defaultValue",void 0),(0,r._)([(0,a.Cb)()],f.prototype,"description",void 0),(0,r._)([(0,h.r)("description")],f.prototype,"readDescription",null),(0,r._)([(0,a.Cb)({types:c.V5,json:{read:{reader:c.im},write:!0}})],f.prototype,"domain",void 0),(0,r._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],f.prototype,"editable",void 0),(0,r._)([(0,a.Cb)({type:l.z8,json:{write:!0}})],f.prototype,"length",void 0),(0,r._)([(0,a.Cb)({type:String,json:{write:!0}})],f.prototype,"name",void 0),(0,r._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],f.prototype,"nullable",void 0),(0,r._)([(0,u.J)(p.v)],f.prototype,"type",void 0),(0,r._)([(0,a.Cb)()],f.prototype,"valueType",void 0),(0,r._)([(0,h.r)("valueType",["description"])],f.prototype,"readValueType",null),f=s=(0,r._)([(0,d.j)("esri.layers.support.Field")],f);const m=f},39450:(e,t,i)=>{i.d(t,{Z:()=>h});var s,r=i(43697),n=i(96674),o=i(5600),a=(i(67676),i(80442),i(75215)),l=i(52011);let u=s=class extends n.wq{constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new s({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,r._)([(0,o.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"cols",void 0),(0,r._)([(0,o.Cb)({type:a.z8,json:{write:!0}})],u.prototype,"level",void 0),(0,r._)([(0,o.Cb)({type:String,json:{write:!0}})],u.prototype,"levelValue",void 0),(0,r._)([(0,o.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"origin",void 0),(0,r._)([(0,o.Cb)({type:Number,json:{write:!0}})],u.prototype,"resolution",void 0),(0,r._)([(0,o.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"rows",void 0),(0,r._)([(0,o.Cb)({type:Number,json:{write:!0}})],u.prototype,"scale",void 0),u=s=(0,r._)([(0,l.j)("esri.layers.support.LOD")],u);const h=u},11145:(e,t,i)=>{i.d(t,{Z:()=>E});var s,r=i(43697),n=i(35454),o=i(96674),a=i(70586),l=i(67900),u=i(5600),h=(i(67676),i(80442),i(75215)),d=i(71715),c=i(52011),p=i(30556),_=i(13473),f=i(82971),m=i(24470),y=i(8744),g=i(40488),v=i(39450),b=i(43077);const C=new n.X({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});let T=s=class extends o.wq{constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.minScale=0,this.maxScale=0,this.size=null,this.spatialReference=null}static create(e={}){const{resolutionFactor:t=1,scales:i,size:r=256,spatialReference:n=f.Z.WebMercator,numLODs:o=24}=e;if(!(0,y.JY)(n)){const e=[];if(i)for(let t=0;t<i.length;t++){const s=i[t];e.push({level:t,scale:s,resolution:s})}else{let t=5e-4;for(let i=o-1;i>=0;i--)e.unshift({level:i,scale:t,resolution:t}),t*=2}return new s({dpi:96,lods:e,origin:new _.Z(0,0,n),size:[r,r],spatialReference:n})}const a=(0,y.C5)(n),u=e.origin?new _.Z({x:e.origin.x,y:e.origin.y,spatialReference:n}):new _.Z(a?{x:a.origin[0],y:a.origin[1],spatialReference:n}:{x:0,y:0,spatialReference:n}),h=1/(39.37*(0,l.c9)(n)*96),d=[];if(i)for(let e=0;e<i.length;e++){const t=i[e],s=t*h;d.push({level:e,scale:t,resolution:s})}else{let e=(0,y.sT)(n)?512/r*591657527.5917094:256/r*591657527.591555;const i=Math.ceil(o/t);d.push({level:0,scale:e,resolution:e*h});for(let s=1;s<i;s++){const i=e/2**t,r=i*h;d.push({level:s,scale:i,resolution:r}),e=i}}return new s({dpi:96,lods:d,origin:u,size:[r,r],spatialReference:n})}get isWrappable(){const{spatialReference:e,origin:t}=this;if(e&&t){const i=(0,y.C5)(e);return e.isWrappable&&Math.abs(i.origin[0]-t.x)<=i.dx}return!1}readOrigin(e,t){return _.Z.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,i=0;const s=[];this._levelToLOD={},e&&(t=-1/0,i=1/0,e.forEach((e=>{s.push(e.scale),t=e.scale>t?e.scale:t,i=e.scale<i?e.scale:i,this._levelToLOD[e.level]=e}))),this._set("scales",s),this._set("minScale",t),this._set("maxScale",i),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){const t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];const i=Math.floor(e),s=i+1;return t[i]/(t[i]/t[s])**(e-i)}scaleToZoom(e){const t=this.scales,i=t.length-1;let s=0;for(;s<i;s++){const i=t[s],r=t[s+1];if(i<=e)return s;if(r===e)return s+1;if(i>e&&r<e)return s+Math.log(i/e)/Math.log(i/r)}return s}snapScale(e,t=.95){const i=this.scaleToZoom(e);return i%Math.floor(i)>=t?this.zoomToScale(Math.ceil(i)):this.zoomToScale(Math.floor(i))}tileAt(e,t,i,s){const r=this.lodAt(e);if(!r)return null;let n,o;if("number"==typeof t)n=t,o=i;else if((0,y.fS)(t.spatialReference,this.spatialReference))n=t.x,o=t.y,s=i;else{const e=(0,g.iV)(t,this.spatialReference);if((0,a.Wi)(e))return null;n=e.x,o=e.y,s=i}const l=r.resolution*this.size[0],u=r.resolution*this.size[1];return s||(s=new b.f(null,0,0,0,(0,m.Ue)())),s.level=e,s.row=Math.floor((this.origin.y-o)/u+.001),s.col=Math.floor((n-this.origin.x)/l+.001),this.updateTileInfo(s),s}updateTileInfo(e,t=s.ExtrapolateOptions.NONE){let i=this.lodAt(e.level);if(!i&&t===s.ExtrapolateOptions.POWER_OF_TWO){const t=this.lods[this.lods.length-1];t.level<e.level&&(i=t)}if(!i)return;const r=e.level-i.level,n=i.resolution*this.size[0]/2**r,o=i.resolution*this.size[1]/2**r;e.id=`${e.level}/${e.row}/${e.col}`,e.extent||(e.extent=(0,m.Ue)()),e.extent[0]=this.origin.x+e.col*n,e.extent[1]=this.origin.y-(e.row+1)*o,e.extent[2]=e.extent[0]+n,e.extent[3]=e.extent[1]+o}upsampleTile(e){const t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){const{resolution:i}=this.lodAt(t.level),s=i*this.size[0],r=i*this.size[1];return e[0]=this.origin.x+t.col*s,e[1]=this.origin.y-(t.row+1)*r,e[2]=e[0]+s,e[3]=e[1]+r,e}lodAt(e){return this._levelToLOD&&this._levelToLOD[e]||null}clone(){return s.fromJSON(this.write({}))}getOrCreateCompatible(e,t){if(256===this.size[0]&&256===this.size[1])return 256===e?this:null;const i=[],r=this.lods.length;for(let e=0;e<r;e++){const s=this.lods[e],r=s.resolution*t;i.push(new v.Z({level:s.level,scale:s.scale,resolution:r}))}return new s({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:i})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let i=0;i<e.length;i++){const s=e[i];this._upsampleLevels[s.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/s.resolution:0},t=s}}};var w,x;(0,r._)([(0,u.Cb)({type:Number,json:{write:!0}})],T.prototype,"compressionQuality",void 0),(0,r._)([(0,u.Cb)({type:Number,json:{write:!0}})],T.prototype,"dpi",void 0),(0,r._)([(0,u.Cb)({type:String,json:{read:C.read,write:C.write,origins:{"web-scene":{read:!1,write:!1}}}})],T.prototype,"format",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],T.prototype,"isWrappable",null),(0,r._)([(0,u.Cb)({type:_.Z,json:{write:!0}})],T.prototype,"origin",void 0),(0,r._)([(0,d.r)("origin")],T.prototype,"readOrigin",null),(0,r._)([(0,u.Cb)({type:[v.Z],value:null,json:{write:!0}})],T.prototype,"lods",null),(0,r._)([(0,u.Cb)({readOnly:!0})],T.prototype,"minScale",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],T.prototype,"maxScale",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],T.prototype,"scales",void 0),(0,r._)([(0,u.Cb)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],T.prototype,"size",void 0),(0,r._)([(0,d.r)("size",["rows","cols"])],T.prototype,"readSize",null),(0,r._)([(0,p.c)("size",{cols:{type:h.z8},rows:{type:h.z8}})],T.prototype,"writeSize",null),(0,r._)([(0,u.Cb)({type:f.Z,json:{write:!0}})],T.prototype,"spatialReference",void 0),T=s=(0,r._)([(0,c.j)("esri.layers.support.TileInfo")],T),(x=(w=T||(T={})).ExtrapolateOptions||(w.ExtrapolateOptions={}))[x.NONE=0]="NONE",x[x.POWER_OF_TWO=1]="POWER_OF_TWO";const E=T},43077:(e,t,i)=>{i.d(t,{f:()=>s});class s{constructor(e,t,i,s,r){this.id=e,this.level=t,this.row=i,this.col=s,this.extent=r}}},30547:(e,t,i)=>{i.d(t,{Z:()=>v});var s,r=i(43697),n=i(92835),o=i(84552),a=i(96674),l=i(22974),u=i(70586),h=i(5600),d=(i(75215),i(71715)),c=i(52011),p=i(30556);i(67676),i(80442);let _=s=class extends a.wq{constructor(e){super(e),this.respectsDaylightSaving=!1,this.timezone=null}readRespectsDaylightSaving(e,t){return void 0!==t.respectsDaylightSaving?t.respectsDaylightSaving:void 0!==t.respectDaylightSaving&&t.respectDaylightSaving}clone(){const{respectsDaylightSaving:e,timezone:t}=this;return new s({respectsDaylightSaving:e,timezone:t})}};(0,r._)([(0,h.Cb)({type:Boolean,json:{write:!0}})],_.prototype,"respectsDaylightSaving",void 0),(0,r._)([(0,d.r)("respectsDaylightSaving",["respectsDaylightSaving","respectDaylightSaving"])],_.prototype,"readRespectsDaylightSaving",null),(0,r._)([(0,h.Cb)({type:String,json:{read:{source:"timeZone"},write:{target:"timeZone"}}})],_.prototype,"timezone",void 0),_=s=(0,r._)([(0,c.j)("esri.layers.support.TimeReference")],_);const f=_;var m,y=i(78981);let g=m=class extends a.wq{constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeReference=null,this.trackIdField=null,this.useTime=!0}readFullTimeExtent(e,t){if(!t.timeExtent||!Array.isArray(t.timeExtent)||2!==t.timeExtent.length)return null;const i=new Date(t.timeExtent[0]),s=new Date(t.timeExtent[1]);return new n.Z({start:i,end:s})}writeFullTimeExtent(e,t){e&&(0,u.pC)(e.start)&&(0,u.pC)(e.end)?t.timeExtent=[e.start.getTime(),e.end.getTime()]:t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?new o.Z({value:t.timeInterval,unit:y.v.fromJSON(t.timeIntervalUnits)}):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?new o.Z({value:t.defaultTimeInterval,unit:y.v.fromJSON(t.defaultTimeIntervalUnits)}):null}writeInterval(e,t){if(e){const i=e.toJSON();t.timeInterval=i.value,t.timeIntervalUnits=i.unit}else t.timeInterval=null,t.timeIntervalUnits=null}clone(){const{cumulative:e,endField:t,hasLiveData:i,interval:s,startField:r,timeReference:n,fullTimeExtent:o,trackIdField:a,useTime:u}=this;return new m({cumulative:e,endField:t,hasLiveData:i,interval:s,startField:r,timeReference:(0,l.d9)(n),fullTimeExtent:(0,l.d9)(o),trackIdField:a,useTime:u})}};(0,r._)([(0,h.Cb)({type:Boolean,json:{read:{source:"exportOptions.timeDataCumulative"},write:{target:"exportOptions.timeDataCumulative"}}})],g.prototype,"cumulative",void 0),(0,r._)([(0,h.Cb)({type:String,json:{read:{source:"endTimeField"},write:{target:"endTimeField",allowNull:!0}}})],g.prototype,"endField",void 0),(0,r._)([(0,h.Cb)({type:n.Z,json:{write:{enabled:!0,allowNull:!0}}})],g.prototype,"fullTimeExtent",void 0),(0,r._)([(0,d.r)("fullTimeExtent",["timeExtent"])],g.prototype,"readFullTimeExtent",null),(0,r._)([(0,p.c)("fullTimeExtent")],g.prototype,"writeFullTimeExtent",null),(0,r._)([(0,h.Cb)({type:Boolean,json:{write:!0}})],g.prototype,"hasLiveData",void 0),(0,r._)([(0,h.Cb)({type:o.Z,json:{write:{enabled:!0,allowNull:!0}}})],g.prototype,"interval",void 0),(0,r._)([(0,d.r)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],g.prototype,"readInterval",null),(0,r._)([(0,p.c)("interval")],g.prototype,"writeInterval",null),(0,r._)([(0,h.Cb)({type:String,json:{read:{source:"startTimeField"},write:{target:"startTimeField",allowNull:!0}}})],g.prototype,"startField",void 0),(0,r._)([(0,h.Cb)({type:f,json:{write:{enabled:!0,allowNull:!0}}})],g.prototype,"timeReference",void 0),(0,r._)([(0,h.Cb)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],g.prototype,"trackIdField",void 0),(0,r._)([(0,h.Cb)({type:Boolean,json:{read:{source:"exportOptions.useTime"},write:{target:"exportOptions.useTime"}}})],g.prototype,"useTime",void 0),g=m=(0,r._)([(0,c.j)("esri.layers.support.TimeInfo")],g);const v=g},72729:(e,t,i)=>{i.d(t,{im:()=>x,V5:()=>w}),i(80442);var s,r=i(43697),n=i(22974),o=i(5600),a=(i(75215),i(36030)),l=i(52011),u=i(96674);i(67676);let h=s=class extends u.wq{constructor(e){super(e),this.name=null,this.code=null}clone(){return new s({name:this.name,code:this.code})}};(0,r._)([(0,o.Cb)({type:String,json:{write:!0}})],h.prototype,"name",void 0),(0,r._)([(0,o.Cb)({type:[String,Number],json:{write:!0}})],h.prototype,"code",void 0),h=s=(0,r._)([(0,l.j)("esri.layers.support.CodedValue")],h);const d=new(i(35454).X)({inherited:"inherited",codedValue:"coded-value",range:"range"});let c=class extends u.wq{constructor(e){super(e),this.name=null,this.type=null}};(0,r._)([(0,o.Cb)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,r._)([(0,a.J)(d)],c.prototype,"type",void 0),c=(0,r._)([(0,l.j)("esri.layers.support.Domain")],c);const p=c;var _;let f=_=class extends p{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const i=String(e);this.codedValues.some((e=>(String(e.code)===i&&(t=e.name),!!t)))}return t}clone(){return new _({codedValues:(0,n.d9)(this.codedValues),name:this.name})}};(0,r._)([(0,o.Cb)({type:[h],json:{write:!0}})],f.prototype,"codedValues",void 0),(0,r._)([(0,a.J)({codedValue:"coded-value"})],f.prototype,"type",void 0),f=_=(0,r._)([(0,l.j)("esri.layers.support.CodedValueDomain")],f);const m=f;var y;i(92604),i(20102);let g=y=class extends p{constructor(e){super(e),this.type="inherited"}clone(){return new y}};(0,r._)([(0,a.J)({inherited:"inherited"})],g.prototype,"type",void 0),g=y=(0,r._)([(0,l.j)("esri.layers.support.InheritedDomain")],g);const v=g;var b;let C=b=class extends p{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new b({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,r._)([(0,o.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range&&t.range[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,i){t[i]=[this.minValue||0,e]}}}})],C.prototype,"maxValue",void 0),(0,r._)([(0,o.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range&&t.range[0]},write:{target:"range",writer(e,t,i){t[i]=[e,this.maxValue||0]}}}})],C.prototype,"minValue",void 0),(0,r._)([(0,a.J)({range:"range"})],C.prototype,"type",void 0),C=b=(0,r._)([(0,l.j)("esri.layers.support.RangeDomain")],C);const T=C,w={key:"type",base:p,typeMap:{range:C,"coded-value":m,inherited:v}};function x(e){if(!e||!e.type)return null;switch(e.type){case"range":return T.fromJSON(e);case"codedValue":return m.fromJSON(e);case"inherited":return v.fromJSON(e)}return null}},86719:(e,t,i)=>{i.d(t,{v:()=>s});const s=new(i(35454).X)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml"})},78981:(e,t,i)=>{i.d(t,{v:()=>s});const s=(0,i(35454).w)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},2255:(e,t,i)=>{i.r(t),i.d(t,{default:()=>K});var s=i(43697),r=i(32448),n=i(61247),o=i(70586),a=i(95330),l=i(17445),u=i(5600),h=i(67676),d=(i(80442),i(75215),i(52011)),c=i(72762),p=i(82971),_=i(57191),f=i(38676),m=i(11145),y=i(30547),g=i(57444),v=i(15923);let b=class extends v.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,s._)([(0,u.Cb)()],b.prototype,"updating",void 0),b=(0,s._)([(0,d.j)("esri.core.AsyncSequence")],b);var C,T=i(66643),w=i(3920),x=i(50758),E=i(92604),F=i(6570),I=i(24470),S=i(98732),O=i(66677),B=i(78760),M=i(34599);class R{constructor(e,t){this.data=e,this.resolution=t,this.state={type:C.CREATED},this.alive=!0}process(e){switch(this.state.type){case C.CREATED:return this.state=this._gotoFetchCount(this.state,e),this.state.task.promise.then(e.resume,e.resume);case C.FETCH_COUNT:break;case C.FETCHED_COUNT:return this.state=this._gotoFetchFeatures(this.state,e),this.state.task.promise.then(e.resume,e.resume);case C.FETCH_FEATURES:break;case C.FETCHED_FEATURES:this.state=this._goToDone(this.state,e);case C.DONE:}return null}get debugInfo(){return{data:this.data,featureCount:this._featureCount,state:this._stateToString}}get _featureCount(){switch(this.state.type){case C.CREATED:case C.FETCH_COUNT:return 0;case C.FETCHED_COUNT:return this.state.featureCount;case C.FETCH_FEATURES:return this.state.previous.featureCount;case C.FETCHED_FEATURES:return this.state.features.length;case C.DONE:return this.state.previous.features.length}}get _stateToString(){switch(this.state.type){case C.CREATED:return"created";case C.FETCH_COUNT:return"fetch-count";case C.FETCHED_COUNT:return"fetched-count";case C.FETCH_FEATURES:return"fetch-features";case C.FETCHED_FEATURES:return"fetched-features";case C.DONE:return"done"}}_gotoFetchCount(e,t){return{type:C.FETCH_COUNT,previous:e,task:(0,T.vr)((async e=>{const i=await(0,T.mt)(t.fetchCount(this,e));this.state.type===C.FETCH_COUNT&&(this.state=this._gotoFetchedCount(this.state,i.ok?i.value:1/0))}))}}_gotoFetchedCount(e,t){return{type:C.FETCHED_COUNT,featureCount:t,previous:e}}_gotoFetchFeatures(e,t){return{type:C.FETCH_FEATURES,previous:e,task:(0,T.vr)((async i=>{const s=await(0,T.mt)(t.fetchFeatures(this,e.featureCount,i));this.state.type===C.FETCH_FEATURES&&(this.state=this._gotoFetchedFeatures(this.state,s.ok?s.value:[]))}))}}_gotoFetchedFeatures(e,t){return{type:C.FETCHED_FEATURES,previous:e,features:t}}_goToDone(e,t){return t.finish(this,e.features),{type:C.DONE,previous:e}}reset(){const e=this.state;switch(this.state={type:C.CREATED},e.type){case C.CREATED:case C.FETCHED_COUNT:case C.FETCHED_FEATURES:case C.DONE:break;case C.FETCH_COUNT:case C.FETCH_FEATURES:e.task.abort()}}intersects(e){return!(!(0,o.Wi)(e)&&this.data.extent)||((0,I.oJ)(e,D),(0,I.kK)(this.data.extent,D))}}!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"}(C||(C={}));const D=(0,I.Ue)();let A=class extends w.r{constructor(e){super(e),this.tilesOfInterest=[],this.availability=0,this._pendingTiles=new Map,this._pendingEdits=new b,this._pendingEditsAbortController=new AbortController}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"),i=this._filterProperties(e);JSON.stringify(t)!==JSON.stringify(i)&&this._set("filter",i)}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&&((0,o.pC)(e)&&(0,o.pC)(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.updatingHandles.updating||this._pendingEdits.updating}initialize(){this._initializeFetchExtent(),this.updatingHandles.add((()=>this._configuration),(()=>this.refresh())),this.updatingHandles.add((()=>this.tilesOfInterest),((e,t)=>{(0,h.fS)(e,t,(({id:e},{id:t})=>e===t))||this._process()}),l.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}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,O.M8)(this.url))return;const e=(0,T.vr)((async e=>{try{const t=await(0,M.executeQueryForExtent)(this.url,new g.Z({where:"1=1",outSpatialReference:this.spatialReference,cacheHint:!!this.capabilities.query.supportsCacheHint||void 0}),{query:this._configuration.customParameters,signal:e});this.store.extent=F.Z.fromJSON(t.data?.extent)}catch(e){(0,a.r9)(e),E.Z.getLogger(this.declaredClass).warn("Failed to fetch data extent",e)}}));this.updatingHandles.addPromise(e.promise.then((()=>this._process()))),this.handles.add((0,x.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((0,o.Wi)(e)?1:e.coveredArea/e.fullArea),!(0,o.Wi)(e))for(const{data:t,resolution:i}of e.missingTiles){const e=this._pendingTiles.get(t.id);e?(e.resolution=i,e.alive=!0):this._createPendingTile(t,i)}}_collectMissingTilesInfo(){let e=null;for(let t=this.tilesOfInterest.length-1;t>=0;t--){const i=this.tilesOfInterest[t],s=this.store.process(i,((e,t)=>this._verifyTileComplexity(e,t)));(0,o.Wi)(e)?e=s:e.prepend(s)}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,i)=>this._fetchFeatures(e,t,i),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<P}_verifyFeatureDensity(e,t){if((0,o.Wi)(this.tileInfo))return!1;const i=this.tileSize*t;return e*(z/(i*i))<H}_ensureFetchAllCounts(e){let t=!0;for(const[,i]of this._pendingTiles)i.state.type<C.FETCHED_COUNT&&this.updatingHandles.addPromise(i.process(e)),i.state.type<=C.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((0,o.Wi)(e)?1:e.coveredArea/e.fullArea)}_setAvailability(e){this._set("availability",e)}_createPendingTile(e,t){const i=new R(e,t);return this._pendingTiles.set(e.id,i),i}_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:N,signal:t})}async _fetchFeatures(e,t,i){let s,r=0,n=0,a=t;for(;;){const l=this._createFeaturesQuery(e),u=this._setPagingParameters(l,r,a),{features:h,exceededTransferLimit:d}=await this._queryFeatures(l,i);if(u&&(r+=(0,o.Wg)(l.num)),n+=h.length,s=s?s.concat(h):h,a=t-n,!u||!d||a<=0)return s}}_filterProperties(e){return(0,o.Wi)(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,i=this.objectIdField;if((0,o.Wi)(t))throw new Error("Expected globalIdField to be defined");let s=null;if(this.store.featureStore.forEach((r=>{e===r.attributes[t]&&(s=r.objectId??r.attributes[i])})),(0,o.Wi)(s))throw new Error(`Expected to find a feature with globalId ${e}`);return s}_queryFeaturesById(e,t){const i=this._createFeaturesQuery(null);return i.objectIds=e,this._queryFeatures(i,t)}_queryFeatures(e,t){return this.capabilities.query.supportsFormatPBF?this._queryFeaturesPBF(e,t):this._queryFeaturesJSON(e,t)}async _queryFeaturesPBF(e,t){const{sourceSpatialReference:i}=this,{data:s}=await(0,M.executeQueryPBF)(this.url,e,new B.J({sourceSpatialReference:i}),{query:this._configuration.customParameters,timeout:N,signal:t});return(0,S.lM)(s)}async _queryFeaturesJSON(e,t){const{sourceSpatialReference:i}=this,{data:s}=await(0,M.executeQuery)(this.url,e,i,{query:this._configuration.customParameters,timeout:N,signal:t});return(0,S.h_)(s,this.objectIdField)}_createCountQuery(e){const t=this._createBaseQuery(e);return this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0),t}_createFeaturesQuery(e){const t=this._createBaseQuery(e);return t.outFields=this.globalIdField?[this.globalIdField,this.objectIdField]:[this.objectIdField],t.returnGeometry=!0,(0,o.pC)(e)&&(this.capabilities.query.supportsResultType?t.resultType="tile":this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0)),t}_createBaseQuery(e){const t=new g.Z({returnZ:!1,returnM:!1,geometry:(0,o.pC)(this.tileInfo)&&(0,o.pC)(e)?(0,I.HH)(e.data.extent,this.tileInfo.spatialReference):void 0}),i=this._configuration.filter;return(0,o.pC)(i)&&(t.where=i.where,t.gdbVersion=i.gdbVersion,t.timeExtent=i.timeExtent),t.outSpatialReference=this.spatialReference,t}_setPagingParameters(e,t,i){if(!this.capabilities.query.supportsPagination)return!1;const{supportsMaxRecordCountFactor:s,supportsCacheHint:r,tileMaxRecordCount:n,maxRecordCount:o,supportsResultType:a}=this.capabilities.query,l=s?g.Z.MAX_MAX_RECORD_COUNT_FACTOR:1,u=l*((a||r)&&n?n:o||j);return e.start=t,s?(e.maxRecordCountFactor=Math.min(l,Math.ceil(i/u)),e.num=Math.min(i,e.maxRecordCountFactor*u)):e.num=Math.min(i,u),!0}};(0,s._)([(0,u.Cb)({constructOnly:!0})],A.prototype,"url",void 0),(0,s._)([(0,u.Cb)({constructOnly:!0})],A.prototype,"objectIdField",void 0),(0,s._)([(0,u.Cb)({constructOnly:!0})],A.prototype,"globalIdField",void 0),(0,s._)([(0,u.Cb)({constructOnly:!0})],A.prototype,"capabilities",void 0),(0,s._)([(0,u.Cb)({constructOnly:!0})],A.prototype,"sourceSpatialReference",void 0),(0,s._)([(0,u.Cb)({constructOnly:!0})],A.prototype,"spatialReference",void 0),(0,s._)([(0,u.Cb)({constructOnly:!0})],A.prototype,"store",void 0),(0,s._)([(0,u.Cb)({readOnly:!0})],A.prototype,"_minimumVerticesPerFeature",null),(0,s._)([(0,u.Cb)()],A.prototype,"filter",null),(0,s._)([(0,u.Cb)()],A.prototype,"customParameters",null),(0,s._)([(0,u.Cb)({readOnly:!0})],A.prototype,"_configuration",null),(0,s._)([(0,u.Cb)()],A.prototype,"tileInfo",null),(0,s._)([(0,u.Cb)()],A.prototype,"tileSize",null),(0,s._)([(0,u.Cb)()],A.prototype,"tilesOfInterest",void 0),(0,s._)([(0,u.Cb)({readOnly:!0})],A.prototype,"updating",null),(0,s._)([(0,u.Cb)({readOnly:!0})],A.prototype,"availability",void 0),A=(0,s._)([(0,d.j)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiledFetcher")],A);const j=2e3,N=6e5,P=1e6,z=25,H=1;var U=i(43090),Z=i(37549),k=i(43077);class Y{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)&&(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[i,s]of this._store){if(this._byteSize<=e)break;this.delete(i),t(s)}}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 V=class extends v.Z{constructor(e){super(e),this.tileInfo=null,this.extent=null,this.maximumByteSize=10*U.Y8.MEGABYTES,this._tileBounds=new Z.H,this._tiles=new Y,this._refCounts=new Map,this._tileFeatureCounts=new Map,this._tmpBoundingRect=(0,I.Ue)()}add(e,t){const i=[];for(const e of t)this._referenceFeature(e.objectId)===G.ADDED&&i.push(e);this._addTileStorage(e,new Set(t.map((({objectId:e})=>e))),function(e){return e.reduce(((e,t)=>e+function(e){return 32+function(e){if((0,o.Wi)(e))return 0;const t=(0,U.do)(e.lengths,4);return 32+(0,U.do)(e.coords,8)+t}(e.geometry)+(0,U.f2)(e.attributes)}(t)),0)}(t)),this.featureStore.addMany(i),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,i){return this._processEditsDelete(e.deletedFeatures.concat(e.updatedFeatures)),this._processEditsRefetch(e.addedFeatures.concat(e.updatedFeatures),t,i)}_addTileStorage(e,t,i){this._tiles.set(e.id,new X(e,t,i)),this._tileBounds.set(e.id,e.extent),this._tileFeatureCounts.set(e.id,t.size)}_remove({id:e}){const t=this._tiles.get(e);t&&this._removeTileStorage(t)}_removeTileStorage(e){const t=[];for(const i of e.objectIds)this._unreferenceFeature(i)===G.REMOVED&&t.push(i);this.featureStore.removeManyById(t);const i=e.data.id;this._tiles.delete(i),this._tileBounds.delete(i)}_processEditsDelete(e){this.featureStore.removeManyById(e);for(const[,t]of this._tiles){for(const i of e)t.objectIds.delete(i);this._tileFeatureCounts.set(t.data.id,t.objectIds.size)}for(const t of e)this._refCounts.delete(t)}async _processEditsRefetch(e,t,i){const s=(await t(e,i)).features,{hasZ:r,hasM:n}=this.featureStore;for(const e of s){const t=(0,S.$)(this._tmpBoundingRect,e.geometry,r,n);(0,o.Wi)(t)||this._tileBounds.forEachInBounds(t,(t=>{const i=this._tiles.get(t);this.featureStore.add(e),i.objectIds.has(e.objectId)||(i.objectIds.add(e.objectId),this._referenceFeature(e.objectId),this._tileFeatureCounts.set(i.data.id,i.objectIds.size))}))}}process(e,t=(()=>!0)){if((0,o.Wi)(this.tileInfo)||!e.extent||(0,o.pC)(this.extent)&&!(0,I.kK)((0,I.oJ)(this.extent,this._tmpBoundingRect),e.extent))return new q(e);if(this._tiles.has(e.id))return new q(e);const i=this._createTileTree(e,this.tileInfo);return this._simplify(i,t,null,0,1),this._collectMissingTiles(e,i,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,i,s){const r=this._tileFeatureCounts.get(e.id);if(null!=r)return r;const n=await(0,M.executeQueryForCount)(t,i,s);return this._tileFeatureCounts.set(e.id,n.data.count),n.data.count}_createTileTree(e,t){const i=new L(e.level,e.row,e.col);return t.updateTileInfo(i,m.Z.ExtrapolateOptions.POWER_OF_TWO),this._tileBounds.forEachInBounds(e.extent,(s=>{const r=this._tiles.get(s).data;this._tilesAreRelated(e,r)&&this._populateChildren(i,r,t,this._tileFeatureCounts.get(r.id)||0)})),i}_tilesAreRelated(e,t){if(!e||!t)return!1;if(e.level===t.level)return e.row===t.row&&e.col===t.col;const i=e.level<t.level,s=i?e:t,r=i?t:e,n=1<<r.level-s.level;return Math.floor(r.row/n)===s.row&&Math.floor(r.col/n)===s.col}_populateChildren(e,t,i,s){const r=t.level-e.level-1;if(r<0)return void(e.isLeaf=!0);const n=t.row>>r,a=t.col>>r,l=e.row<<1,u=a-(e.col<<1)+(n-l<<1),h=e.children[u];if((0,o.pC)(h))this._populateChildren(h,t,i,s);else{const r=new L(e.level+1,n,a);i.updateTileInfo(r,m.Z.ExtrapolateOptions.POWER_OF_TWO),e.children[u]=r,this._populateChildren(r,t,i,s)}}_simplify(e,t,i,s,r){const n=r*r;if(e.isLeaf)return t(this.getFeatureCount(e),r)?0:(this._remove(e),(0,o.pC)(i)&&(i.children[s]=null),n);const a=r/2,l=a*a;let u=0;for(let i=0;i<e.children.length;i++){const s=e.children[i];u+=(0,o.pC)(s)?this._simplify(s,t,e,i,a):l}return 0===u?this._mergeChildren(e):1-u/n<W&&(this._purge(e),(0,o.pC)(i)&&(i.children[s]=null),u=n),u}_mergeChildren(e){const t=new Set;let i=0;this._forEachLeaf(e,(e=>{const s=this._tiles.get(e.id);if(s){i+=s.byteSize;for(const e of s.objectIds)t.has(e)||(t.add(e),this._referenceFeature(e));this._remove(e)}})),this._addTileStorage(e,t,i),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 i of e.children)(0,o.Wi)(i)||(i.isLeaf?t(i):this._forEachLeaf(i,t))}_purge(e){if(!(0,o.Wi)(e))if(e.isLeaf)this._remove(e);else for(let t=0;t<e.children.length;t++){const i=e.children[t];this._purge(i),e.children[t]=null}}_collectMissingTiles(e,t,i){const s=new J(i,e,this.extent);return this._collectMissingTilesRecurse(t,s,1),s.info}_collectMissingTilesRecurse(e,t,i){if(e.isLeaf)return;if(!e.hasChildren)return void t.addMissing(e.level,e.row,e.col,i);const s=i/2;for(let i=0;i<e.children.length;i++){const r=e.children[i];(0,o.Wi)(r)?t.addMissing(e.level+1,(e.row<<1)+((2&i)>>1),(e.col<<1)+(1&i),s):this._collectMissingTilesRecurse(r,t,s)}}_referenceFeature(e){const t=(this._refCounts.get(e)||0)+1;return this._refCounts.set(e,t),1===t?G.ADDED:G.UNCHANGED}_unreferenceFeature(e){const t=(this._refCounts.get(e)||0)-1;return 0===t?(this._refCounts.delete(e),G.REMOVED):(t>0&&this._refCounts.set(e,t),G.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,s._)([(0,u.Cb)({constructOnly:!0})],V.prototype,"featureStore",void 0),(0,s._)([(0,u.Cb)()],V.prototype,"tileInfo",void 0),(0,s._)([(0,u.Cb)()],V.prototype,"extent",void 0),(0,s._)([(0,u.Cb)()],V.prototype,"maximumByteSize",void 0),V=(0,s._)([(0,d.j)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTileStore")],V);class X{constructor(e,t,i){this.data=e,this.objectIds=t,this.byteSize=i}}class L{constructor(e,t,i){this.level=e,this.row=t,this.col=i,this.isLeaf=!1,this.extent=null,this.children=[null,null,null,null]}get hasChildren(){return!this.isLeaf&&((0,o.pC)(this.children[0])||(0,o.pC)(this.children[1])||(0,o.pC)(this.children[2])||(0,o.pC)(this.children[3]))}}class q{constructor(e,t=[]){this.missingTiles=t,this.fullArea=0,this.coveredArea=0,this.fullArea=(0,I.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 J{constructor(e,t,i){this._tileInfo=e,this._extent=null,this.info=new q(t),(0,o.pC)(i)&&(this._extent=(0,I.oJ)(i))}addMissing(e,t,i,s){const r=new k.f(null,e,t,i);this._tileInfo.updateTileInfo(r,m.Z.ExtrapolateOptions.POWER_OF_TWO),(0,o.Wi)(r.extent)||(0,o.pC)(this._extent)&&!(0,I.kK)(this._extent,r.extent)||(this.info.missingTiles.push({data:r,resolution:s}),this.info.coveredArea-=(0,I.SO)(r.extent))}}const W=.18751;var G,Q;(Q=G||(G={}))[Q.ADDED=0]="ADDED",Q[Q.REMOVED=1]="REMOVED",Q[Q.UNCHANGED=2]="UNCHANGED";let $=class extends r.Z.EventedAccessor{constructor(){super(...arguments),this._isInitializing=!0,this._whenSetup=(0,a.dD)(),this._handles=new n.Z,this._updatingHandles=new c.t,this._pendingApplyEdits=new Map}get updating(){return this._featureFetcher.updating||this._isInitializing||this._updatingHandles.updating}destroy(){this._featureFetcher.destroy(),this._queryEngine.destroy(),this._featureStore.clear(),this._handles.destroy()}async setup(e){const{geometryType:t,objectIdField:i,timeInfo:s,fields:r}=e.serviceInfo;return this._featureStore=new _.Z({...e.serviceInfo,hasZ:!1,hasM:!1}),this._queryEngine=new f.q({spatialReference:e.spatialReference,featureStore:this._featureStore,geometryType:t,fields:r,hasZ:!1,hasM:!1,objectIdField:i,timeInfo:s?y.Z.fromJSON(s):null}),this._featureFetcher=new A({store:new V({featureStore:this._featureStore}),url:e.serviceInfo.url,objectIdField:e.serviceInfo.objectIdField,globalIdField:e.serviceInfo.globalIdField,capabilities:e.serviceInfo.capabilities,spatialReference:p.Z.fromJSON(e.spatialReference),sourceSpatialReference:p.Z.fromJSON(e.serviceInfo.spatialReference)}),this._handles.add([(0,l.YP)((()=>this._featureFetcher.availability),(e=>this.emit("notify-availability",{availability:e})),l.Z_),(0,l.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){return await this._whenSetup.promise,(0,a.k_)(t),{result:await this._queryEngine.executeQueryForSnapping({point:e.point,distance:e.distance,types:e.types,query:(0,o.pC)(e.filter)?e.filter:{where:"1=1"}},(0,o.pC)(t)?t.signal:null)}}async updateTiles(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,a.k_)(t),this._featureFetcher.tileSize=e.tileSize,this._featureFetcher.tilesOfInterest=e.tiles,this._featureFetcher.tileInfo=(0,o.pC)(e.tileInfo)?m.Z.fromJSON(e.tileInfo):null,{result:{}}}async refresh(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,a.k_)(t),this._featureFetcher.refresh(),{result:{}}}async whenNotUpdating(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,a.k_)(t),await(0,l.N1)((()=>!this.updating),t),(0,a.k_)(t),{result:{}}}async getDebugInfo(e,t){return(0,a.k_)(t),{result:this._featureFetcher.debugInfo}}async beginApplyEdits(e,t){this._updatingHandles.addPromise(this._whenSetup.promise),(0,a.k_)(t);const i=(0,a.dD)();return this._pendingApplyEdits.set(e.id,i),this._featureFetcher.applyEdits(i.promise),this._updatingHandles.addPromise(i.promise),{result:{}}}async endApplyEdits(e,t){const i=this._pendingApplyEdits.get(e.id);return i&&i.resolve(e.edits),(0,a.k_)(t),{result:{}}}_updateFeatureFetcherConfiguration(e){this._featureFetcher.filter=(0,o.pC)(e.filter)?g.Z.fromJSON(e.filter):null,this._featureFetcher.customParameters=e.customParameters}_notifyUpdating(){this.emit("notify-updating",{updating:this.updating})}};(0,s._)([(0,u.Cb)({readOnly:!0})],$.prototype,"updating",null),(0,s._)([(0,u.Cb)()],$.prototype,"_isInitializing",void 0),$=(0,s._)([(0,d.j)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceSnappingSourceWorker")],$);const K=$}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6208],{84552:(e,t,i)=>{i.d(t,{Z:()=>d});var s,r=i(43697),n=i(96674),o=i(35463),a=i(5600),l=(i(67676),i(80442),i(75215),i(52011)),u=i(78981);let h=s=class extends n.wq{constructor(e){super(e),this.value=0,this.unit="milliseconds"}toMilliseconds(){return(0,o.rJ)(this.value,this.unit,"milliseconds")}clone(){return new s({value:this.value,unit:this.unit})}};(0,r._)([(0,a.Cb)({type:Number,json:{write:!0},nonNullable:!0})],h.prototype,"value",void 0),(0,r._)([(0,a.Cb)({type:u.v.apiValues,json:{type:u.v.jsonValues,read:u.v.read,write:u.v.write},nonNullable:!0})],h.prototype,"unit",void 0),h=s=(0,r._)([(0,l.j)("esri.TimeInterval")],h);const d=h},66643:(e,t,i)=>{i.d(t,{Ed:()=>u,UI:()=>h,mt:()=>_,q6:()=>p,vr:()=>f});var s=i(43697),r=i(15923),n=i(70586),o=i(95330),a=i(5600),l=(i(67676),i(80442),i(75215),i(52011));function u(e,t,i){return(0,o.as)(e.map(((e,s)=>t.apply(i,[e,s]))))}async function h(e,t,i){return(await(0,o.as)(e.map(((e,s)=>t.apply(i,[e,s]))))).map((e=>e.value))}function d(e){return{ok:!0,value:e}}function c(e){return{ok:!1,error:e}}async function p(e){if((0,n.Wi)(e))return{ok:!1,error:new Error("no promise provided")};try{return d(await e)}catch(e){return c(e)}}async function _(e){try{return d(await e)}catch(e){return(0,o.r9)(e),c(e)}}function f(e,t){return new m(e,t)}let m=class extends r.Z{constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,n.IM)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:i}=this._abortController;this.promise=e(i),this.promise.then((e=>{this._result=d(e),this._cleanup()}),(e=>{this._result=c(e),this._cleanup()})),this._abortHandle=(0,o.fu)(t,this.abort)}get value(){return e=this._result,(0,n.pC)(e)&&!0===e.ok?e.value:null;var e}get error(){return e=this._result,(0,n.pC)(e)&&!1===e.ok?e.error:null;var e}get finished(){return(0,n.pC)(this._result)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,n.hw)(this._abortHandle),this._abortController=null}};(0,s._)([(0,a.Cb)()],m.prototype,"value",null),(0,s._)([(0,a.Cb)()],m.prototype,"error",null),(0,s._)([(0,a.Cb)()],m.prototype,"finished",null),(0,s._)([(0,a.Cb)()],m.prototype,"promise",void 0),(0,s._)([(0,a.Cb)()],m.prototype,"_result",void 0),m=(0,s._)([(0,l.j)("esri.core.asyncUtils.ReactiveTask")],m)},43090:(e,t,i)=>{function s(e){return 32+e.length}function r(e){if(!e)return 0;let t=32;for(const i in e)if(e.hasOwnProperty(i)){const r=e[i];switch(typeof r){case"string":t+=s(r);break;case"number":t+=16;break;case"boolean":t+=4}}return t}function n(e,t){return 32+e.length*t}var o;i.d(t,{Y8:()=>o,do:()=>n,f2:()=>r}),function(e){e[e.KILOBYTES=1024]="KILOBYTES",e[e.MEGABYTES=1048576]="MEGABYTES",e[e.GIGABYTES=1073741824]="GIGABYTES"}(o||(o={}))},24133:(e,t,i)=>{i.d(t,{Q:()=>a});var s=i(67676),r=i(70586),n=i(44553),o=i(88764);class a{constructor(e=9,t){this._compareMinX=d,this._compareMinY=c,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(),b.prune(),C.prune(),T.prune(),w.prune()}all(e){this._all(this._data,e)}search(e,t){let i=this._data;const s=this._toBBox;if(g(e,i))for(b.clear();i;){for(let r=0,n=i.children.length;r<n;r++){const n=i.children[r],o=i.leaf?s(n):n;g(e,o)&&(i.leaf?t(n):y(e,o)?this._all(n,t):b.push(n))}i=b.pop()}}collides(e){let t=this._data;const i=this._toBBox;if(!g(e,t))return!1;for(b.clear();t;){for(let s=0,r=t.children.length;s<r;s++){const r=t.children[s],n=t.leaf?i(r):r;if(g(e,n)){if(t.leaf||y(e,n))return!0;b.push(r)}}t=b.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,i=e.length;t<i;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 E([]),this}remove(e){if(!e)return this;let t,i=this._data,n=null,o=0,a=!1;const l=this._toBBox(e);for(T.clear(),w.clear();i||T.length>0;){if(i||(i=(0,r.j0)(T.pop()),n=T.data[T.length-1],o=w.pop()??0,a=!0),i.leaf&&(t=(0,s.cq)(i.children,e,i.children.length,i.indexHint),-1!==t))return i.children.splice(t,1),T.push(i),this._condense(T),this;a||i.leaf||!y(i,l)?n?(o++,i=n.children[o],a=!1):i=null:(T.push(i),w.push(o),o=0,n=i,i=i.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_all(e,t){let i=e;for(C.clear();i;){if(!0===i.leaf)for(const e of i.children)t(e);else C.pushArray(i.children);i=C.pop()??null}}_build(e,t,i,s){const r=i-t+1;let n=this._maxEntries;if(r<=n){const s=new E(e.slice(t,i+1));return l(s,this._toBBox),s}s||(s=Math.ceil(Math.log(r)/Math.log(n)),n=Math.ceil(r/n**(s-1)));const o=new F([]);o.height=s;const a=Math.ceil(r/n),u=a*Math.ceil(Math.sqrt(n));v(e,t,i,u,this._compareMinX);for(let r=t;r<=i;r+=u){const t=Math.min(r+u-1,i);v(e,r,t,a,this._compareMinY);for(let i=r;i<=t;i+=a){const r=Math.min(i+a-1,t);o.children.push(this._build(e,i,r,s-1))}}return l(o,this._toBBox),o}_chooseSubtree(e,t,i,s){for(;s.push(t),!0!==t.leaf&&s.length-1!==i;){let i,s=1/0,r=1/0;for(let n=0,o=t.children.length;n<o;n++){const o=t.children[n],a=p(o),l=f(e,o)-a;l<r?(r=l,s=a<s?a:s,i=o):l===r&&a<s&&(s=a,i=o)}t=i||t.children[0]}return t}_insert(e,t,i){const s=this._toBBox,r=i?e:s(e);T.clear();const n=this._chooseSubtree(r,this._data,t,T);for(n.children.push(e),h(n,r);t>=0&&T.data[t].children.length>this._maxEntries;)this._split(T,t),t--;this._adjustParentBBoxes(r,T,t)}_split(e,t){const i=e.data[t],s=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,s);const n=this._chooseSplitIndex(i,r,s);if(!n)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const o=i.children.splice(n,i.children.length-n),a=i.leaf?new E(o):new F(o);a.height=i.height,l(i,this._toBBox),l(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(i,a)}_splitRoot(e,t){this._data=new F([e,t]),this._data.height=e.height+1,l(this._data,this._toBBox)}_chooseSplitIndex(e,t,i){let s,r,n;s=r=1/0;for(let o=t;o<=i-t;o++){const t=u(e,0,o,this._toBBox),a=u(e,o,i,this._toBBox),l=m(t,a),h=p(t)+p(a);l<s?(s=l,n=o,r=h<r?h:r):l===s&&h<r&&(r=h,n=o)}return n}_chooseSplitAxis(e,t,i){const s=e.leaf?this._compareMinX:d,r=e.leaf?this._compareMinY:c;this._allDistMargin(e,t,i,s)<this._allDistMargin(e,t,i,r)&&e.children.sort(s)}_allDistMargin(e,t,i,s){e.children.sort(s);const r=this._toBBox,n=u(e,0,t,r),o=u(e,i-t,i,r);let a=_(n)+_(o);for(let s=t;s<i-t;s++){const t=e.children[s];h(n,e.leaf?r(t):t),a+=_(n)}for(let s=i-t-1;s>=t;s--){const t=e.children[s];h(o,e.leaf?r(t):t),a+=_(o)}return a}_adjustParentBBoxes(e,t,i){for(let s=i;s>=0;s--)h(t.data[s],e)}_condense(e){for(let t=e.length-1;t>=0;t--){const i=e.data[t];if(0===i.children.length)if(t>0){const r=e.data[t-1],n=r.children;n.splice((0,s.cq)(n,i,n.length,r.indexHint),1)}else this.clear();else l(i,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 l(e,t){u(e,0,e.children.length,t,e)}function u(e,t,i,s,r){r||(r=new E([])),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let n,o=t;o<i;o++)n=e.children[o],h(r,e.leaf?s(n):n);return r}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 d(e,t){return e.minX-t.minX}function c(e,t){return e.minY-t.minY}function p(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 m(e,t){const i=Math.max(e.minX,t.minX),s=Math.max(e.minY,t.minY),r=Math.min(e.maxX,t.maxX),n=Math.min(e.maxY,t.maxY);return Math.max(0,r-i)*Math.max(0,n-s)}function y(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function g(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function v(e,t,i,s,n){const a=[t,i];for(;a.length;){const t=(0,r.j0)(a.pop()),i=(0,r.j0)(a.pop());if(t-i<=s)continue;const l=i+Math.ceil((t-i)/s/2)*s;(0,o.q)(e,l,i,t,n),a.push(i,l,l,t)}}const b=new n.Z,C=new n.Z,T=new n.Z,w=new n.Z({deallocator:void 0});class x extends class{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}{constructor(){super(...arguments),this.height=1,this.indexHint=new s.SO}}class E extends x{constructor(e){super(),this.children=e,this.leaf=!0}}class F extends x{constructor(e){super(),this.children=e,this.leaf=!1}}},37549:(e,t,i)=>{i.d(t,{H:()=>a});var s=i(80442),r=i(24133),n=i(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 r.Q(9,(0,s.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(((i,s)=>{e[t++]=s})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,n.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,i){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,i)}(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,i)=>{i.d(t,{Z:()=>f});var s=i(20102),r=i(32448),n=i(92604),o=i(70586),a=i(60437),l=i(24470),u=i(98732),h=i(37549),d=i(29730),c=i(70272),p=i(5428);const _={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t)=>new c.u_(t,e.attributes,null,e.objectId),getGeometry:e=>e.geometry,getCentroid:(e,t)=>((0,o.Wi)(e.centroid)&&(e.centroid=(0,d.Y)(new p.Z,e.geometry,t.hasZ,t.hasM)),e.centroid)};class f{constructor(e){this.geometryInfo=e,this._boundsStore=new h.H,this._featuresById=new Map,this._markedIds=new Set,this.events=new r.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=>{(0,o.pC)(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)}}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,i){for(const s of e){const e=this._boundsStore.get(s.objectId);e&&t((0,a.JR)(i,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}toArray(){return Array.from(this._featuresById.values())}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,i)=>{this._markedIds.has(i)||(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 n.Z.getLogger("esri.layers.graphics.data.FeatureStore").error(new s.Z("featurestore:invalid-feature","feature id is missing",{feature:e}));const i=this._featuresById.get(t);let r;if(this._markedIds.add(t),i?(e.displayId=i.displayId,r=this._boundsStore.get(t),this._boundsStore.delete(t)):(0,o.pC)(this.onFeatureAdd)&&this.onFeatureAdd(e),(0,o.Wi)(e.geometry)||!e.geometry.coords||!e.geometry.coords.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);r=(0,u.$)((0,o.pC)(r)?r:(0,l.Ue)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),(0,o.pC)(r)&&this._boundsStore.set(t,r),this._featuresById.set(t,e)}_remove(e){return(0,o.pC)(this.onFeatureRemove)&&this.onFeatureRemove(e),this._markedIds.delete(e.objectId),this._boundsStore.delete(e.objectId),this._featuresById.delete(e.objectId),e}}},1231:(e,t,i)=>{i.d(t,{Z:()=>m});var s,r=i(43697),n=i(35454),o=i(96674),a=i(5600),l=(i(67676),i(80442),i(75215)),u=i(36030),h=i(71715),d=i(52011),c=i(72729),p=i(86719);const _=new n.X({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let f=s=class extends o.wq{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=-1,this.name=null,this.nullable=!0,this.type=null,this.valueType=null}readDescription(e,{description:t}){let i=null;try{i=t?JSON.parse(t):null}catch(e){}return i?.value??null}readValueType(e,{description:t}){let i=null;try{i=t?JSON.parse(t):null}catch(e){}return i?_.fromJSON(i.fieldValueType):null}clone(){return new s({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType})}};(0,r._)([(0,a.Cb)({type:String,json:{write:!0}})],f.prototype,"alias",void 0),(0,r._)([(0,a.Cb)({type:[String,Number],json:{write:{allowNull:!0}}})],f.prototype,"defaultValue",void 0),(0,r._)([(0,a.Cb)()],f.prototype,"description",void 0),(0,r._)([(0,h.r)("description")],f.prototype,"readDescription",null),(0,r._)([(0,a.Cb)({types:c.V5,json:{read:{reader:c.im},write:!0}})],f.prototype,"domain",void 0),(0,r._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],f.prototype,"editable",void 0),(0,r._)([(0,a.Cb)({type:l.z8,json:{write:!0}})],f.prototype,"length",void 0),(0,r._)([(0,a.Cb)({type:String,json:{write:!0}})],f.prototype,"name",void 0),(0,r._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],f.prototype,"nullable",void 0),(0,r._)([(0,u.J)(p.v)],f.prototype,"type",void 0),(0,r._)([(0,a.Cb)()],f.prototype,"valueType",void 0),(0,r._)([(0,h.r)("valueType",["description"])],f.prototype,"readValueType",null),f=s=(0,r._)([(0,d.j)("esri.layers.support.Field")],f);const m=f},39450:(e,t,i)=>{i.d(t,{Z:()=>h});var s,r=i(43697),n=i(96674),o=i(5600),a=(i(67676),i(80442),i(75215)),l=i(52011);let u=s=class extends n.wq{constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new s({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,r._)([(0,o.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"cols",void 0),(0,r._)([(0,o.Cb)({type:a.z8,json:{write:!0}})],u.prototype,"level",void 0),(0,r._)([(0,o.Cb)({type:String,json:{write:!0}})],u.prototype,"levelValue",void 0),(0,r._)([(0,o.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"origin",void 0),(0,r._)([(0,o.Cb)({type:Number,json:{write:!0}})],u.prototype,"resolution",void 0),(0,r._)([(0,o.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"rows",void 0),(0,r._)([(0,o.Cb)({type:Number,json:{write:!0}})],u.prototype,"scale",void 0),u=s=(0,r._)([(0,l.j)("esri.layers.support.LOD")],u);const h=u},11145:(e,t,i)=>{i.d(t,{Z:()=>E});var s,r=i(43697),n=i(35454),o=i(96674),a=i(70586),l=i(67900),u=i(5600),h=(i(67676),i(80442),i(75215)),d=i(71715),c=i(52011),p=i(30556),_=i(13473),f=i(82971),m=i(24470),y=i(8744),g=i(40488),v=i(39450),b=i(43077);const C=new n.X({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});let T=s=class extends o.wq{constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.minScale=0,this.maxScale=0,this.size=null,this.spatialReference=null}static create(e={}){const{resolutionFactor:t=1,scales:i,size:r=256,spatialReference:n=f.Z.WebMercator,numLODs:o=24}=e;if(!(0,y.JY)(n)){const e=[];if(i)for(let t=0;t<i.length;t++){const s=i[t];e.push({level:t,scale:s,resolution:s})}else{let t=5e-4;for(let i=o-1;i>=0;i--)e.unshift({level:i,scale:t,resolution:t}),t*=2}return new s({dpi:96,lods:e,origin:new _.Z(0,0,n),size:[r,r],spatialReference:n})}const a=(0,y.C5)(n),u=e.origin?new _.Z({x:e.origin.x,y:e.origin.y,spatialReference:n}):new _.Z(a?{x:a.origin[0],y:a.origin[1],spatialReference:n}:{x:0,y:0,spatialReference:n}),h=1/(39.37*(0,l.c9)(n)*96),d=[];if(i)for(let e=0;e<i.length;e++){const t=i[e],s=t*h;d.push({level:e,scale:t,resolution:s})}else{let e=(0,y.sT)(n)?512/r*591657527.5917094:256/r*591657527.591555;const i=Math.ceil(o/t);d.push({level:0,scale:e,resolution:e*h});for(let s=1;s<i;s++){const i=e/2**t,r=i*h;d.push({level:s,scale:i,resolution:r}),e=i}}return new s({dpi:96,lods:d,origin:u,size:[r,r],spatialReference:n})}get isWrappable(){const{spatialReference:e,origin:t}=this;if(e&&t){const i=(0,y.C5)(e);return e.isWrappable&&Math.abs(i.origin[0]-t.x)<=i.dx}return!1}readOrigin(e,t){return _.Z.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,i=0;const s=[];this._levelToLOD={},e&&(t=-1/0,i=1/0,e.forEach((e=>{s.push(e.scale),t=e.scale>t?e.scale:t,i=e.scale<i?e.scale:i,this._levelToLOD[e.level]=e}))),this._set("scales",s),this._set("minScale",t),this._set("maxScale",i),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){const t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];const i=Math.floor(e),s=i+1;return t[i]/(t[i]/t[s])**(e-i)}scaleToZoom(e){const t=this.scales,i=t.length-1;let s=0;for(;s<i;s++){const i=t[s],r=t[s+1];if(i<=e)return s;if(r===e)return s+1;if(i>e&&r<e)return s+Math.log(i/e)/Math.log(i/r)}return s}snapScale(e,t=.95){const i=this.scaleToZoom(e);return i%Math.floor(i)>=t?this.zoomToScale(Math.ceil(i)):this.zoomToScale(Math.floor(i))}tileAt(e,t,i,s){const r=this.lodAt(e);if(!r)return null;let n,o;if("number"==typeof t)n=t,o=i;else if((0,y.fS)(t.spatialReference,this.spatialReference))n=t.x,o=t.y,s=i;else{const e=(0,g.iV)(t,this.spatialReference);if((0,a.Wi)(e))return null;n=e.x,o=e.y,s=i}const l=r.resolution*this.size[0],u=r.resolution*this.size[1];return s||(s=new b.f(null,0,0,0,(0,m.Ue)())),s.level=e,s.row=Math.floor((this.origin.y-o)/u+.001),s.col=Math.floor((n-this.origin.x)/l+.001),this.updateTileInfo(s),s}updateTileInfo(e,t=s.ExtrapolateOptions.NONE){let i=this.lodAt(e.level);if(!i&&t===s.ExtrapolateOptions.POWER_OF_TWO){const t=this.lods[this.lods.length-1];t.level<e.level&&(i=t)}if(!i)return;const r=e.level-i.level,n=i.resolution*this.size[0]/2**r,o=i.resolution*this.size[1]/2**r;e.id=`${e.level}/${e.row}/${e.col}`,e.extent||(e.extent=(0,m.Ue)()),e.extent[0]=this.origin.x+e.col*n,e.extent[1]=this.origin.y-(e.row+1)*o,e.extent[2]=e.extent[0]+n,e.extent[3]=e.extent[1]+o}upsampleTile(e){const t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){const{resolution:i}=this.lodAt(t.level),s=i*this.size[0],r=i*this.size[1];return e[0]=this.origin.x+t.col*s,e[1]=this.origin.y-(t.row+1)*r,e[2]=e[0]+s,e[3]=e[1]+r,e}lodAt(e){return this._levelToLOD&&this._levelToLOD[e]||null}clone(){return s.fromJSON(this.write({}))}getOrCreateCompatible(e,t){if(256===this.size[0]&&256===this.size[1])return 256===e?this:null;const i=[],r=this.lods.length;for(let e=0;e<r;e++){const s=this.lods[e],r=s.resolution*t;i.push(new v.Z({level:s.level,scale:s.scale,resolution:r}))}return new s({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:i})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let i=0;i<e.length;i++){const s=e[i];this._upsampleLevels[s.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/s.resolution:0},t=s}}};var w,x;(0,r._)([(0,u.Cb)({type:Number,json:{write:!0}})],T.prototype,"compressionQuality",void 0),(0,r._)([(0,u.Cb)({type:Number,json:{write:!0}})],T.prototype,"dpi",void 0),(0,r._)([(0,u.Cb)({type:String,json:{read:C.read,write:C.write,origins:{"web-scene":{read:!1,write:!1}}}})],T.prototype,"format",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],T.prototype,"isWrappable",null),(0,r._)([(0,u.Cb)({type:_.Z,json:{write:!0}})],T.prototype,"origin",void 0),(0,r._)([(0,d.r)("origin")],T.prototype,"readOrigin",null),(0,r._)([(0,u.Cb)({type:[v.Z],value:null,json:{write:!0}})],T.prototype,"lods",null),(0,r._)([(0,u.Cb)({readOnly:!0})],T.prototype,"minScale",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],T.prototype,"maxScale",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],T.prototype,"scales",void 0),(0,r._)([(0,u.Cb)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],T.prototype,"size",void 0),(0,r._)([(0,d.r)("size",["rows","cols"])],T.prototype,"readSize",null),(0,r._)([(0,p.c)("size",{cols:{type:h.z8},rows:{type:h.z8}})],T.prototype,"writeSize",null),(0,r._)([(0,u.Cb)({type:f.Z,json:{write:!0}})],T.prototype,"spatialReference",void 0),T=s=(0,r._)([(0,c.j)("esri.layers.support.TileInfo")],T),(x=(w=T||(T={})).ExtrapolateOptions||(w.ExtrapolateOptions={}))[x.NONE=0]="NONE",x[x.POWER_OF_TWO=1]="POWER_OF_TWO";const E=T},43077:(e,t,i)=>{i.d(t,{f:()=>s});class s{constructor(e,t,i,s,r){this.id=e,this.level=t,this.row=i,this.col=s,this.extent=r}}},30547:(e,t,i)=>{i.d(t,{Z:()=>v});var s,r=i(43697),n=i(92835),o=i(84552),a=i(96674),l=i(22974),u=i(70586),h=i(5600),d=(i(75215),i(71715)),c=i(52011),p=i(30556);i(67676),i(80442);let _=s=class extends a.wq{constructor(e){super(e),this.respectsDaylightSaving=!1,this.timezone=null}readRespectsDaylightSaving(e,t){return void 0!==t.respectsDaylightSaving?t.respectsDaylightSaving:void 0!==t.respectDaylightSaving&&t.respectDaylightSaving}clone(){const{respectsDaylightSaving:e,timezone:t}=this;return new s({respectsDaylightSaving:e,timezone:t})}};(0,r._)([(0,h.Cb)({type:Boolean,json:{write:!0}})],_.prototype,"respectsDaylightSaving",void 0),(0,r._)([(0,d.r)("respectsDaylightSaving",["respectsDaylightSaving","respectDaylightSaving"])],_.prototype,"readRespectsDaylightSaving",null),(0,r._)([(0,h.Cb)({type:String,json:{read:{source:"timeZone"},write:{target:"timeZone"}}})],_.prototype,"timezone",void 0),_=s=(0,r._)([(0,c.j)("esri.layers.support.TimeReference")],_);const f=_;var m,y=i(78981);let g=m=class extends a.wq{constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeReference=null,this.trackIdField=null,this.useTime=!0}readFullTimeExtent(e,t){if(!t.timeExtent||!Array.isArray(t.timeExtent)||2!==t.timeExtent.length)return null;const i=new Date(t.timeExtent[0]),s=new Date(t.timeExtent[1]);return new n.Z({start:i,end:s})}writeFullTimeExtent(e,t){e&&(0,u.pC)(e.start)&&(0,u.pC)(e.end)?t.timeExtent=[e.start.getTime(),e.end.getTime()]:t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?new o.Z({value:t.timeInterval,unit:y.v.fromJSON(t.timeIntervalUnits)}):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?new o.Z({value:t.defaultTimeInterval,unit:y.v.fromJSON(t.defaultTimeIntervalUnits)}):null}writeInterval(e,t){if(e){const i=e.toJSON();t.timeInterval=i.value,t.timeIntervalUnits=i.unit}else t.timeInterval=null,t.timeIntervalUnits=null}clone(){const{cumulative:e,endField:t,hasLiveData:i,interval:s,startField:r,timeReference:n,fullTimeExtent:o,trackIdField:a,useTime:u}=this;return new m({cumulative:e,endField:t,hasLiveData:i,interval:s,startField:r,timeReference:(0,l.d9)(n),fullTimeExtent:(0,l.d9)(o),trackIdField:a,useTime:u})}};(0,r._)([(0,h.Cb)({type:Boolean,json:{read:{source:"exportOptions.timeDataCumulative"},write:{target:"exportOptions.timeDataCumulative"}}})],g.prototype,"cumulative",void 0),(0,r._)([(0,h.Cb)({type:String,json:{read:{source:"endTimeField"},write:{target:"endTimeField",allowNull:!0}}})],g.prototype,"endField",void 0),(0,r._)([(0,h.Cb)({type:n.Z,json:{write:{enabled:!0,allowNull:!0}}})],g.prototype,"fullTimeExtent",void 0),(0,r._)([(0,d.r)("fullTimeExtent",["timeExtent"])],g.prototype,"readFullTimeExtent",null),(0,r._)([(0,p.c)("fullTimeExtent")],g.prototype,"writeFullTimeExtent",null),(0,r._)([(0,h.Cb)({type:Boolean,json:{write:!0}})],g.prototype,"hasLiveData",void 0),(0,r._)([(0,h.Cb)({type:o.Z,json:{write:{enabled:!0,allowNull:!0}}})],g.prototype,"interval",void 0),(0,r._)([(0,d.r)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],g.prototype,"readInterval",null),(0,r._)([(0,p.c)("interval")],g.prototype,"writeInterval",null),(0,r._)([(0,h.Cb)({type:String,json:{read:{source:"startTimeField"},write:{target:"startTimeField",allowNull:!0}}})],g.prototype,"startField",void 0),(0,r._)([(0,h.Cb)({type:f,json:{write:{enabled:!0,allowNull:!0}}})],g.prototype,"timeReference",void 0),(0,r._)([(0,h.Cb)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],g.prototype,"trackIdField",void 0),(0,r._)([(0,h.Cb)({type:Boolean,json:{read:{source:"exportOptions.useTime"},write:{target:"exportOptions.useTime"}}})],g.prototype,"useTime",void 0),g=m=(0,r._)([(0,c.j)("esri.layers.support.TimeInfo")],g);const v=g},72729:(e,t,i)=>{i.d(t,{im:()=>x,V5:()=>w}),i(80442);var s,r=i(43697),n=i(22974),o=i(5600),a=(i(75215),i(36030)),l=i(52011),u=i(96674);i(67676);let h=s=class extends u.wq{constructor(e){super(e),this.name=null,this.code=null}clone(){return new s({name:this.name,code:this.code})}};(0,r._)([(0,o.Cb)({type:String,json:{write:!0}})],h.prototype,"name",void 0),(0,r._)([(0,o.Cb)({type:[String,Number],json:{write:!0}})],h.prototype,"code",void 0),h=s=(0,r._)([(0,l.j)("esri.layers.support.CodedValue")],h);const d=new(i(35454).X)({inherited:"inherited",codedValue:"coded-value",range:"range"});let c=class extends u.wq{constructor(e){super(e),this.name=null,this.type=null}};(0,r._)([(0,o.Cb)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,r._)([(0,a.J)(d)],c.prototype,"type",void 0),c=(0,r._)([(0,l.j)("esri.layers.support.Domain")],c);const p=c;var _;let f=_=class extends p{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const i=String(e);this.codedValues.some((e=>(String(e.code)===i&&(t=e.name),!!t)))}return t}clone(){return new _({codedValues:(0,n.d9)(this.codedValues),name:this.name})}};(0,r._)([(0,o.Cb)({type:[h],json:{write:!0}})],f.prototype,"codedValues",void 0),(0,r._)([(0,a.J)({codedValue:"coded-value"})],f.prototype,"type",void 0),f=_=(0,r._)([(0,l.j)("esri.layers.support.CodedValueDomain")],f);const m=f;var y;i(92604),i(20102);let g=y=class extends p{constructor(e){super(e),this.type="inherited"}clone(){return new y}};(0,r._)([(0,a.J)({inherited:"inherited"})],g.prototype,"type",void 0),g=y=(0,r._)([(0,l.j)("esri.layers.support.InheritedDomain")],g);const v=g;var b;let C=b=class extends p{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new b({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,r._)([(0,o.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range&&t.range[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,i){t[i]=[this.minValue||0,e]}}}})],C.prototype,"maxValue",void 0),(0,r._)([(0,o.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range&&t.range[0]},write:{target:"range",writer(e,t,i){t[i]=[e,this.maxValue||0]}}}})],C.prototype,"minValue",void 0),(0,r._)([(0,a.J)({range:"range"})],C.prototype,"type",void 0),C=b=(0,r._)([(0,l.j)("esri.layers.support.RangeDomain")],C);const T=C,w={key:"type",base:p,typeMap:{range:C,"coded-value":m,inherited:v}};function x(e){if(!e||!e.type)return null;switch(e.type){case"range":return T.fromJSON(e);case"codedValue":return m.fromJSON(e);case"inherited":return v.fromJSON(e)}return null}},86719:(e,t,i)=>{i.d(t,{v:()=>s});const s=new(i(35454).X)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml"})},78981:(e,t,i)=>{i.d(t,{v:()=>s});const s=(0,i(35454).w)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},2255:(e,t,i)=>{i.r(t),i.d(t,{default:()=>K});var s=i(43697),r=i(32448),n=i(61247),o=i(70586),a=i(95330),l=i(17445),u=i(5600),h=i(67676),d=(i(80442),i(75215),i(52011)),c=i(72762),p=i(82971),_=i(57191),f=i(38676),m=i(11145),y=i(30547),g=i(57444),v=i(15923);let b=class extends v.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,s._)([(0,u.Cb)()],b.prototype,"updating",void 0),b=(0,s._)([(0,d.j)("esri.core.AsyncSequence")],b);var C,T=i(66643),w=i(3920),x=i(50758),E=i(92604),F=i(6570),I=i(24470),S=i(98732),O=i(66677),B=i(78760),M=i(34599);class R{constructor(e,t){this.data=e,this.resolution=t,this.state={type:C.CREATED},this.alive=!0}process(e){switch(this.state.type){case C.CREATED:return this.state=this._gotoFetchCount(this.state,e),this.state.task.promise.then(e.resume,e.resume);case C.FETCH_COUNT:break;case C.FETCHED_COUNT:return this.state=this._gotoFetchFeatures(this.state,e),this.state.task.promise.then(e.resume,e.resume);case C.FETCH_FEATURES:break;case C.FETCHED_FEATURES:this.state=this._goToDone(this.state,e);case C.DONE:}return null}get debugInfo(){return{data:this.data,featureCount:this._featureCount,state:this._stateToString}}get _featureCount(){switch(this.state.type){case C.CREATED:case C.FETCH_COUNT:return 0;case C.FETCHED_COUNT:return this.state.featureCount;case C.FETCH_FEATURES:return this.state.previous.featureCount;case C.FETCHED_FEATURES:return this.state.features.length;case C.DONE:return this.state.previous.features.length}}get _stateToString(){switch(this.state.type){case C.CREATED:return"created";case C.FETCH_COUNT:return"fetch-count";case C.FETCHED_COUNT:return"fetched-count";case C.FETCH_FEATURES:return"fetch-features";case C.FETCHED_FEATURES:return"fetched-features";case C.DONE:return"done"}}_gotoFetchCount(e,t){return{type:C.FETCH_COUNT,previous:e,task:(0,T.vr)((async e=>{const i=await(0,T.mt)(t.fetchCount(this,e));this.state.type===C.FETCH_COUNT&&(this.state=this._gotoFetchedCount(this.state,i.ok?i.value:1/0))}))}}_gotoFetchedCount(e,t){return{type:C.FETCHED_COUNT,featureCount:t,previous:e}}_gotoFetchFeatures(e,t){return{type:C.FETCH_FEATURES,previous:e,task:(0,T.vr)((async i=>{const s=await(0,T.mt)(t.fetchFeatures(this,e.featureCount,i));this.state.type===C.FETCH_FEATURES&&(this.state=this._gotoFetchedFeatures(this.state,s.ok?s.value:[]))}))}}_gotoFetchedFeatures(e,t){return{type:C.FETCHED_FEATURES,previous:e,features:t}}_goToDone(e,t){return t.finish(this,e.features),{type:C.DONE,previous:e}}reset(){const e=this.state;switch(this.state={type:C.CREATED},e.type){case C.CREATED:case C.FETCHED_COUNT:case C.FETCHED_FEATURES:case C.DONE:break;case C.FETCH_COUNT:case C.FETCH_FEATURES:e.task.abort()}}intersects(e){return!(!(0,o.Wi)(e)&&this.data.extent)||((0,I.oJ)(e,D),(0,I.kK)(this.data.extent,D))}}!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"}(C||(C={}));const D=(0,I.Ue)();let A=class extends w.r{constructor(e){super(e),this.tilesOfInterest=[],this.availability=0,this._pendingTiles=new Map,this._pendingEdits=new b,this._pendingEditsAbortController=new AbortController}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"),i=this._filterProperties(e);JSON.stringify(t)!==JSON.stringify(i)&&this._set("filter",i)}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&&((0,o.pC)(e)&&(0,o.pC)(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.updatingHandles.updating||this._pendingEdits.updating}initialize(){this._initializeFetchExtent(),this.updatingHandles.add((()=>this._configuration),(()=>this.refresh())),this.updatingHandles.add((()=>this.tilesOfInterest),((e,t)=>{(0,h.fS)(e,t,(({id:e},{id:t})=>e===t))||this._process()}),l.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}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,O.M8)(this.url))return;const e=(0,T.vr)((async e=>{try{const t=await(0,M.executeQueryForExtent)(this.url,new g.Z({where:"1=1",outSpatialReference:this.spatialReference,cacheHint:!!this.capabilities.query.supportsCacheHint||void 0}),{query:this._configuration.customParameters,signal:e});this.store.extent=F.Z.fromJSON(t.data?.extent)}catch(e){(0,a.r9)(e),E.Z.getLogger(this.declaredClass).warn("Failed to fetch data extent",e)}}));this.updatingHandles.addPromise(e.promise.then((()=>this._process()))),this.handles.add((0,x.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((0,o.Wi)(e)?1:e.coveredArea/e.fullArea),!(0,o.Wi)(e))for(const{data:t,resolution:i}of e.missingTiles){const e=this._pendingTiles.get(t.id);e?(e.resolution=i,e.alive=!0):this._createPendingTile(t,i)}}_collectMissingTilesInfo(){let e=null;for(let t=this.tilesOfInterest.length-1;t>=0;t--){const i=this.tilesOfInterest[t],s=this.store.process(i,((e,t)=>this._verifyTileComplexity(e,t)));(0,o.Wi)(e)?e=s:e.prepend(s)}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,i)=>this._fetchFeatures(e,t,i),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<P}_verifyFeatureDensity(e,t){if((0,o.Wi)(this.tileInfo))return!1;const i=this.tileSize*t;return e*(z/(i*i))<H}_ensureFetchAllCounts(e){let t=!0;for(const[,i]of this._pendingTiles)i.state.type<C.FETCHED_COUNT&&this.updatingHandles.addPromise(i.process(e)),i.state.type<=C.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((0,o.Wi)(e)?1:e.coveredArea/e.fullArea)}_setAvailability(e){this._set("availability",e)}_createPendingTile(e,t){const i=new R(e,t);return this._pendingTiles.set(e.id,i),i}_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:N,signal:t})}async _fetchFeatures(e,t,i){let s,r=0,n=0,a=t;for(;;){const l=this._createFeaturesQuery(e),u=this._setPagingParameters(l,r,a),{features:h,exceededTransferLimit:d}=await this._queryFeatures(l,i);if(u&&(r+=(0,o.Wg)(l.num)),n+=h.length,s=s?s.concat(h):h,a=t-n,!u||!d||a<=0)return s}}_filterProperties(e){return(0,o.Wi)(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,i=this.objectIdField;if((0,o.Wi)(t))throw new Error("Expected globalIdField to be defined");let s=null;if(this.store.featureStore.forEach((r=>{e===r.attributes[t]&&(s=r.objectId??r.attributes[i])})),(0,o.Wi)(s))throw new Error(`Expected to find a feature with globalId ${e}`);return s}_queryFeaturesById(e,t){const i=this._createFeaturesQuery(null);return i.objectIds=e,this._queryFeatures(i,t)}_queryFeatures(e,t){return this.capabilities.query.supportsFormatPBF?this._queryFeaturesPBF(e,t):this._queryFeaturesJSON(e,t)}async _queryFeaturesPBF(e,t){const{sourceSpatialReference:i}=this,{data:s}=await(0,M.executeQueryPBF)(this.url,e,new B.J({sourceSpatialReference:i}),{query:this._configuration.customParameters,timeout:N,signal:t});return(0,S.lM)(s)}async _queryFeaturesJSON(e,t){const{sourceSpatialReference:i}=this,{data:s}=await(0,M.executeQuery)(this.url,e,i,{query:this._configuration.customParameters,timeout:N,signal:t});return(0,S.h_)(s,this.objectIdField)}_createCountQuery(e){const t=this._createBaseQuery(e);return this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0),t}_createFeaturesQuery(e){const t=this._createBaseQuery(e);return t.outFields=this.globalIdField?[this.globalIdField,this.objectIdField]:[this.objectIdField],t.returnGeometry=!0,(0,o.pC)(e)&&(this.capabilities.query.supportsResultType?t.resultType="tile":this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0)),t}_createBaseQuery(e){const t=new g.Z({returnZ:!1,returnM:!1,geometry:(0,o.pC)(this.tileInfo)&&(0,o.pC)(e)?(0,I.HH)(e.data.extent,this.tileInfo.spatialReference):void 0}),i=this._configuration.filter;return(0,o.pC)(i)&&(t.where=i.where,t.gdbVersion=i.gdbVersion,t.timeExtent=i.timeExtent),t.outSpatialReference=this.spatialReference,t}_setPagingParameters(e,t,i){if(!this.capabilities.query.supportsPagination)return!1;const{supportsMaxRecordCountFactor:s,supportsCacheHint:r,tileMaxRecordCount:n,maxRecordCount:o,supportsResultType:a}=this.capabilities.query,l=s?g.Z.MAX_MAX_RECORD_COUNT_FACTOR:1,u=l*((a||r)&&n?n:o||j);return e.start=t,s?(e.maxRecordCountFactor=Math.min(l,Math.ceil(i/u)),e.num=Math.min(i,e.maxRecordCountFactor*u)):e.num=Math.min(i,u),!0}};(0,s._)([(0,u.Cb)({constructOnly:!0})],A.prototype,"url",void 0),(0,s._)([(0,u.Cb)({constructOnly:!0})],A.prototype,"objectIdField",void 0),(0,s._)([(0,u.Cb)({constructOnly:!0})],A.prototype,"globalIdField",void 0),(0,s._)([(0,u.Cb)({constructOnly:!0})],A.prototype,"capabilities",void 0),(0,s._)([(0,u.Cb)({constructOnly:!0})],A.prototype,"sourceSpatialReference",void 0),(0,s._)([(0,u.Cb)({constructOnly:!0})],A.prototype,"spatialReference",void 0),(0,s._)([(0,u.Cb)({constructOnly:!0})],A.prototype,"store",void 0),(0,s._)([(0,u.Cb)({readOnly:!0})],A.prototype,"_minimumVerticesPerFeature",null),(0,s._)([(0,u.Cb)()],A.prototype,"filter",null),(0,s._)([(0,u.Cb)()],A.prototype,"customParameters",null),(0,s._)([(0,u.Cb)({readOnly:!0})],A.prototype,"_configuration",null),(0,s._)([(0,u.Cb)()],A.prototype,"tileInfo",null),(0,s._)([(0,u.Cb)()],A.prototype,"tileSize",null),(0,s._)([(0,u.Cb)()],A.prototype,"tilesOfInterest",void 0),(0,s._)([(0,u.Cb)({readOnly:!0})],A.prototype,"updating",null),(0,s._)([(0,u.Cb)({readOnly:!0})],A.prototype,"availability",void 0),A=(0,s._)([(0,d.j)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiledFetcher")],A);const j=2e3,N=6e5,P=1e6,z=25,H=1;var U=i(43090),Z=i(37549),k=i(43077);class Y{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[i,s]of this._store){if(this._byteSize<=e)break;this.delete(i),t(s)}}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 V=class extends v.Z{constructor(e){super(e),this.tileInfo=null,this.extent=null,this.maximumByteSize=10*U.Y8.MEGABYTES,this._tileBounds=new Z.H,this._tiles=new Y,this._refCounts=new Map,this._tileFeatureCounts=new Map,this._tmpBoundingRect=(0,I.Ue)()}add(e,t){const i=[];for(const e of t)this._referenceFeature(e.objectId)===G.ADDED&&i.push(e);this._addTileStorage(e,new Set(t.map((({objectId:e})=>e))),function(e){return e.reduce(((e,t)=>e+function(e){return 32+function(e){if((0,o.Wi)(e))return 0;const t=(0,U.do)(e.lengths,4);return 32+(0,U.do)(e.coords,8)+t}(e.geometry)+(0,U.f2)(e.attributes)}(t)),0)}(t)),this.featureStore.addMany(i),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,i){return this._processEditsDelete(e.deletedFeatures.concat(e.updatedFeatures)),this._processEditsRefetch(e.addedFeatures.concat(e.updatedFeatures),t,i)}_addTileStorage(e,t,i){this._tiles.set(e.id,new X(e,t,i)),this._tileBounds.set(e.id,e.extent),this._tileFeatureCounts.set(e.id,t.size)}_remove({id:e}){const t=this._tiles.get(e);t&&this._removeTileStorage(t)}_removeTileStorage(e){const t=[];for(const i of e.objectIds)this._unreferenceFeature(i)===G.REMOVED&&t.push(i);this.featureStore.removeManyById(t);const i=e.data.id;this._tiles.delete(i),this._tileBounds.delete(i)}_processEditsDelete(e){this.featureStore.removeManyById(e);for(const[,t]of this._tiles){for(const i of e)t.objectIds.delete(i);this._tileFeatureCounts.set(t.data.id,t.objectIds.size)}for(const t of e)this._refCounts.delete(t)}async _processEditsRefetch(e,t,i){const s=(await t(e,i)).features,{hasZ:r,hasM:n}=this.featureStore;for(const e of s){const t=(0,S.$)(this._tmpBoundingRect,e.geometry,r,n);(0,o.Wi)(t)||this._tileBounds.forEachInBounds(t,(t=>{const i=this._tiles.get(t);this.featureStore.add(e),i.objectIds.has(e.objectId)||(i.objectIds.add(e.objectId),this._referenceFeature(e.objectId),this._tileFeatureCounts.set(i.data.id,i.objectIds.size))}))}}process(e,t=(()=>!0)){if((0,o.Wi)(this.tileInfo)||!e.extent||(0,o.pC)(this.extent)&&!(0,I.kK)((0,I.oJ)(this.extent,this._tmpBoundingRect),e.extent))return new q(e);if(this._tiles.has(e.id))return new q(e);const i=this._createTileTree(e,this.tileInfo);return this._simplify(i,t,null,0,1),this._collectMissingTiles(e,i,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,i,s){const r=this._tileFeatureCounts.get(e.id);if(null!=r)return r;const n=await(0,M.executeQueryForCount)(t,i,s);return this._tileFeatureCounts.set(e.id,n.data.count),n.data.count}_createTileTree(e,t){const i=new L(e.level,e.row,e.col);return t.updateTileInfo(i,m.Z.ExtrapolateOptions.POWER_OF_TWO),this._tileBounds.forEachInBounds(e.extent,(s=>{const r=this._tiles.get(s).data;this._tilesAreRelated(e,r)&&this._populateChildren(i,r,t,this._tileFeatureCounts.get(r.id)||0)})),i}_tilesAreRelated(e,t){if(!e||!t)return!1;if(e.level===t.level)return e.row===t.row&&e.col===t.col;const i=e.level<t.level,s=i?e:t,r=i?t:e,n=1<<r.level-s.level;return Math.floor(r.row/n)===s.row&&Math.floor(r.col/n)===s.col}_populateChildren(e,t,i,s){const r=t.level-e.level-1;if(r<0)return void(e.isLeaf=!0);const n=t.row>>r,a=t.col>>r,l=e.row<<1,u=a-(e.col<<1)+(n-l<<1),h=e.children[u];if((0,o.pC)(h))this._populateChildren(h,t,i,s);else{const r=new L(e.level+1,n,a);i.updateTileInfo(r,m.Z.ExtrapolateOptions.POWER_OF_TWO),e.children[u]=r,this._populateChildren(r,t,i,s)}}_simplify(e,t,i,s,r){const n=r*r;if(e.isLeaf)return t(this.getFeatureCount(e),r)?0:(this._remove(e),(0,o.pC)(i)&&(i.children[s]=null),n);const a=r/2,l=a*a;let u=0;for(let i=0;i<e.children.length;i++){const s=e.children[i];u+=(0,o.pC)(s)?this._simplify(s,t,e,i,a):l}return 0===u?this._mergeChildren(e):1-u/n<W&&(this._purge(e),(0,o.pC)(i)&&(i.children[s]=null),u=n),u}_mergeChildren(e){const t=new Set;let i=0;this._forEachLeaf(e,(e=>{const s=this._tiles.get(e.id);if(s){i+=s.byteSize;for(const e of s.objectIds)t.has(e)||(t.add(e),this._referenceFeature(e));this._remove(e)}})),this._addTileStorage(e,t,i),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 i of e.children)(0,o.Wi)(i)||(i.isLeaf?t(i):this._forEachLeaf(i,t))}_purge(e){if(!(0,o.Wi)(e))if(e.isLeaf)this._remove(e);else for(let t=0;t<e.children.length;t++){const i=e.children[t];this._purge(i),e.children[t]=null}}_collectMissingTiles(e,t,i){const s=new J(i,e,this.extent);return this._collectMissingTilesRecurse(t,s,1),s.info}_collectMissingTilesRecurse(e,t,i){if(e.isLeaf)return;if(!e.hasChildren)return void t.addMissing(e.level,e.row,e.col,i);const s=i/2;for(let i=0;i<e.children.length;i++){const r=e.children[i];(0,o.Wi)(r)?t.addMissing(e.level+1,(e.row<<1)+((2&i)>>1),(e.col<<1)+(1&i),s):this._collectMissingTilesRecurse(r,t,s)}}_referenceFeature(e){const t=(this._refCounts.get(e)||0)+1;return this._refCounts.set(e,t),1===t?G.ADDED:G.UNCHANGED}_unreferenceFeature(e){const t=(this._refCounts.get(e)||0)-1;return 0===t?(this._refCounts.delete(e),G.REMOVED):(t>0&&this._refCounts.set(e,t),G.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,s._)([(0,u.Cb)({constructOnly:!0})],V.prototype,"featureStore",void 0),(0,s._)([(0,u.Cb)()],V.prototype,"tileInfo",void 0),(0,s._)([(0,u.Cb)()],V.prototype,"extent",void 0),(0,s._)([(0,u.Cb)()],V.prototype,"maximumByteSize",void 0),V=(0,s._)([(0,d.j)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTileStore")],V);class X{constructor(e,t,i){this.data=e,this.objectIds=t,this.byteSize=i}}class L{constructor(e,t,i){this.level=e,this.row=t,this.col=i,this.isLeaf=!1,this.extent=null,this.children=[null,null,null,null]}get hasChildren(){return!this.isLeaf&&((0,o.pC)(this.children[0])||(0,o.pC)(this.children[1])||(0,o.pC)(this.children[2])||(0,o.pC)(this.children[3]))}}class q{constructor(e,t=[]){this.missingTiles=t,this.fullArea=0,this.coveredArea=0,this.fullArea=(0,I.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 J{constructor(e,t,i){this._tileInfo=e,this._extent=null,this.info=new q(t),(0,o.pC)(i)&&(this._extent=(0,I.oJ)(i))}addMissing(e,t,i,s){const r=new k.f(null,e,t,i);this._tileInfo.updateTileInfo(r,m.Z.ExtrapolateOptions.POWER_OF_TWO),(0,o.Wi)(r.extent)||(0,o.pC)(this._extent)&&!(0,I.kK)(this._extent,r.extent)||(this.info.missingTiles.push({data:r,resolution:s}),this.info.coveredArea-=(0,I.SO)(r.extent))}}const W=.18751;var G,Q;(Q=G||(G={}))[Q.ADDED=0]="ADDED",Q[Q.REMOVED=1]="REMOVED",Q[Q.UNCHANGED=2]="UNCHANGED";let $=class extends r.Z.EventedAccessor{constructor(){super(...arguments),this._isInitializing=!0,this._whenSetup=(0,a.dD)(),this._handles=new n.Z,this._updatingHandles=new c.t,this._pendingApplyEdits=new Map}get updating(){return this._featureFetcher.updating||this._isInitializing||this._updatingHandles.updating}destroy(){this._featureFetcher.destroy(),this._queryEngine.destroy(),this._featureStore.clear(),this._handles.destroy()}async setup(e){const{geometryType:t,objectIdField:i,timeInfo:s,fields:r}=e.serviceInfo;return this._featureStore=new _.Z({...e.serviceInfo,hasZ:!1,hasM:!1}),this._queryEngine=new f.q({spatialReference:e.spatialReference,featureStore:this._featureStore,geometryType:t,fields:r,hasZ:!1,hasM:!1,objectIdField:i,timeInfo:s?y.Z.fromJSON(s):null}),this._featureFetcher=new A({store:new V({featureStore:this._featureStore}),url:e.serviceInfo.url,objectIdField:e.serviceInfo.objectIdField,globalIdField:e.serviceInfo.globalIdField,capabilities:e.serviceInfo.capabilities,spatialReference:p.Z.fromJSON(e.spatialReference),sourceSpatialReference:p.Z.fromJSON(e.serviceInfo.spatialReference)}),this._handles.add([(0,l.YP)((()=>this._featureFetcher.availability),(e=>this.emit("notify-availability",{availability:e})),l.Z_),(0,l.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){return await this._whenSetup.promise,(0,a.k_)(t),{result:await this._queryEngine.executeQueryForSnapping({point:e.point,distance:e.distance,types:e.types,query:(0,o.pC)(e.filter)?e.filter:{where:"1=1"}},(0,o.pC)(t)?t.signal:null)}}async updateTiles(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,a.k_)(t),this._featureFetcher.tileSize=e.tileSize,this._featureFetcher.tilesOfInterest=e.tiles,this._featureFetcher.tileInfo=(0,o.pC)(e.tileInfo)?m.Z.fromJSON(e.tileInfo):null,{result:{}}}async refresh(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,a.k_)(t),this._featureFetcher.refresh(),{result:{}}}async whenNotUpdating(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,a.k_)(t),await(0,l.N1)((()=>!this.updating),t),(0,a.k_)(t),{result:{}}}async getDebugInfo(e,t){return(0,a.k_)(t),{result:this._featureFetcher.debugInfo}}async beginApplyEdits(e,t){this._updatingHandles.addPromise(this._whenSetup.promise),(0,a.k_)(t);const i=(0,a.dD)();return this._pendingApplyEdits.set(e.id,i),this._featureFetcher.applyEdits(i.promise),this._updatingHandles.addPromise(i.promise),{result:{}}}async endApplyEdits(e,t){const i=this._pendingApplyEdits.get(e.id);return i&&i.resolve(e.edits),(0,a.k_)(t),{result:{}}}_updateFeatureFetcherConfiguration(e){this._featureFetcher.filter=(0,o.pC)(e.filter)?g.Z.fromJSON(e.filter):null,this._featureFetcher.customParameters=e.customParameters}_notifyUpdating(){this.emit("notify-updating",{updating:this.updating})}};(0,s._)([(0,u.Cb)({readOnly:!0})],$.prototype,"updating",null),(0,s._)([(0,u.Cb)()],$.prototype,"_isInitializing",void 0),$=(0,s._)([(0,d.j)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceSnappingSourceWorker")],$);const K=$}}]);